Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Annotations 2, add attribute support to testing fixtures and test with attributes when able, allow the Annotations package to be an optional dependency #1598

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Dec 21, 2022

This can supersede #1596

This PR will:

  • Allow doctrine/annotations 2.x to be installed
  • Makes the Annotations package optional by moving it to require-dev and unloading the doctrine.orm.metadata.annotation_reader service alias if not installed
  • Explicitly configures whether annotation support should be enabled in test fixtures instead of relying on feature detection in the FrameworkBundle (which relies on the package existing in someone's require list)
  • Adds attributes to the RepositoryServiceBundle test fixture bundle that is loaded by Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection\Fixtures\TestKernel
  • Configures resources using the RepositoryServiceBundle test fixture bundle to use attributes when run on PHP 8 and annotations on PHP 7
  • Skips tests if run on PHP 7 and the Annotations package isn't installed

@maxhelias
Copy link
Contributor

The CI will be fixed only when symfony/symfony#48725 is released

@mbabker
Copy link
Contributor Author

mbabker commented Dec 23, 2022

No, it's symfony/symfony#48718 that most of the CI's waiting for (there's also psalm/psalm-plugin-symfony#296 which was needed to unblock SA but that looks to be released now); that particular change removes some code from Symfony 6.3 only that was only needed to support old Annotations versions.

…st with attributes when able, allow the Annotations package to be an optional dependency
@maxhelias
Copy link
Contributor

Yeah i missed that one 👍

@derrabus derrabus added this to the 2.8.0 milestone Dec 28, 2022
@derrabus derrabus merged commit 0421ebc into doctrine:2.8.x Dec 28, 2022
@derrabus
Copy link
Member

Thank you @mbabker!

@mbabker mbabker deleted the 2.8-annotations branch December 28, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants