annotations icon indicating copy to clipboard operation
annotations copied to clipboard

Type upgrade

Open doncem opened this issue 8 years ago • 6 comments

  • simplified default types registration
  • introducing container for type instantiation
  • default types are singletons
  • type upgrade is backwards compatible
  • allowing to register namespace lookup for simplified ConcreteType usage \Without\Absurdly\Long\Custom\Namespace\For\The\Annotation\Classes

personally, not fancying the addition of the public function to the ParserInterface, kind of breaks the abstraction "parser should not know a thing about the types". but the fact of having a lookup is very helpful

doncem avatar Apr 29 '17 21:04 doncem

Coverage Status

Coverage decreased (-38.2%) to 51.84% when pulling 1a919ac7428885f566d6e36dc772fb307143ff71 on doncem:type-upgrade into 675bc47b9ce85207826c25bb5dd6ff2459c801d6 on marcioAlmada:master.

coveralls avatar Apr 29 '17 21:04 coveralls

Coverage Status

Coverage increased (+1.03%) to 91.104% when pulling 22eb0ed217f419b5024c6d11500906fafbbccaf6 on doncem:type-upgrade into 675bc47b9ce85207826c25bb5dd6ff2459c801d6 on marcioAlmada:master.

coveralls avatar Apr 30 '17 21:04 coveralls

Hi, @doncem! The overall idea looks fine to me. Do you need any help?

marcioAlmada avatar May 02 '17 21:05 marcioAlmada

repo needs unit test upgrade to allow php5 and php7 support in travis. for php7 it picks up PHPUnit v6.x which only supports this version. you can see in build report.

could work on a hack to apply in this PR but lacking time last couple days and probably best to make more solid decision and code change so minime/annotations could support all these versions

doncem avatar May 03 '17 07:05 doncem

Ok. I'll try to add phpunit as a dev dependency ASAP there is time, so we won't depend on Travis environment anymore.

marcioAlmada avatar May 03 '17 20:05 marcioAlmada

There is a "one-liner" solution: class_alias('PHPUnit\\Framework\\TestCase', 'PHPUnit_Framework_TestCase');. I'll leave it up to you to decide and afters I can rebase the PR

doncem avatar May 10 '17 21:05 doncem