doctrine-extensions / DoctrineExtensions

Doctrine2 behavioral extensions, Translatable, Sluggable, Tree-NestedSet, Timestampable, Loggable, Sortable
MIT License
4.03k stars 1.27k forks source link

Make the annotations package optional #2735

Closed mbabker closed 8 months ago

mbabker commented 9 months ago

Fix #2554 Fix #2683

With all of the known dependencies to the Annotations package reviewed and adjusted, it should now be practical to make it an optional package. And that's what this PR accomplishes.

It'd be hugely beneficial if folks would test this in downstream applications, especially if this package is the only reason doctrine/annotations gets installed in their application, to make sure the features they are using are not broken (I've done it in an app using the ORM plus the loggable and sortable extensions, but that's a very small amount of test coverage). To apply this PR, update your composer.json as appropriate with this info:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mbabker/DoctrineExtensions"
    }
  ],
  "require": {
    "gedmo/doctrine-extensions": "dev-optional-annotations as 3.15.0",
  }
}
codecov[bot] commented 9 months ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (2ba8f94) 79.38% compared to head (f6032db) 79.34%. Report is 1 commits behind head on main.

Files Patch % Lines
src/Mapping/ExtensionMetadataFactory.php 70.58% 5 Missing :warning:
src/Mapping/MappedEventSubscriber.php 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2735 +/- ## ========================================== - Coverage 79.38% 79.34% -0.04% ========================================== Files 162 162 Lines 8498 8506 +8 ========================================== + Hits 6746 6749 +3 - Misses 1752 1757 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

franmomu commented 8 months ago

Sorry for the late reply, let's merge it since it will be easier to test, thanks for the effort you are putting into this @mbabker!