Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle#20097

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@fabpot
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?yes (fixing this is easy by adding doctrine/annotations explicitly)
Deprecations?no
Tests pass?yes
Fixed tickets#15748 partially
LicenseMIT
Doc PRn/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Doctrine annotations library from the list.

linaori and mickaelandrieu reacted with thumbs up emoji
@fabpotfabpotforce-pushed thedoctrine-annotations-dep-frameworkbundle branch 2 times, most recently from99cd189 toa7004d3CompareSeptember 30, 2016 00:09
->arrayNode('annotations')
->info('annotation configuration')
->addDefaultsIfNotSet()
->canBeDisabled()
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Would be better for consistency to usecanBeEnabled, but that would be a too big BC break. At least with that default, Symfony is going to send a clear exception message about installingdoctrine/annotations. If not, people will get an error about an unknownannotation_reader service.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks like we are already facing this. If I install framework-bundle + console directly and create a simple console application ontop of this - it should immediately fail as annotation not installed and the default configuration is to enable them.

Since these are the defaults - it is really not obviously that I have annotations enabled somewhere.

@lemoinem
Copy link
Contributor

Although I do understand the plan to reduce the amount of dependencies, and by no means intend to question the direction the symfony team is planning of going toward to.

This said, annotations are currently recommended as Best Practices for Routing, ParamConverter and Doctrine Entities Mapping. They are a huge part of symfony-standard as it is currently used.

Does this change intend to be a precursor of a change in the way the Annotations intend to be used in Symfony, starting at Symfony v4.0, or is it something that is intended only to involve the Framework Bundle when used as a library and not as part of the Symfony full stack and Standard Edition?

@fabpot
Copy link
MemberAuthor

As you can see, it is still enabled by default. The best practices and recommendations won't change (I'm anyway a big fan of using annotations). But, if we can make it optional for people not using annotations, that's a big win for everyone.

linaori, sstok, lemoinem, AchillesKal, chalasr, and ixcviw7bw reacted with thumbs up emoji

@fabpotfabpotforce-pushed thedoctrine-annotations-dep-frameworkbundle branch 4 times, most recently from6fcf19a to4bb158fCompareSeptember 30, 2016 02:13
3.2.0
-----

* Removed`doctrine/annotations-core` from the list of required dependencies in`composer.json`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@fabpot it should bedoctrine/annotations

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

fixed

@fabpotfabpotforce-pushed thedoctrine-annotations-dep-frameworkbundle branch from4bb158f toc2d8356CompareSeptember 30, 2016 16:58
@fabpotfabpot merged commitc2d8356 intosymfony:masterSep 30, 2016
fabpot added a commit that referenced this pull requestSep 30, 2016
… dependency on FrameworkBundle (fabpot)This PR was merged into the 3.2-dev branch.Discussion----------[FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | yes (fixing this is easy by adding doctrine/annotations explicitly)| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#15748 partially| License       | MIT| Doc PR        | n/aAnother PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Doctrine annotations library from the list.Commits-------c2d8356 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle
@fabpotfabpot deleted the doctrine-annotations-dep-frameworkbundle branchOctober 1, 2016 05:07
@fabpotfabpot mentioned this pull requestOct 27, 2016
fabpot added a commit that referenced this pull requestDec 14, 2016
…s (ogizanagi)This PR was merged into the 3.2 branch.Discussion----------[FrameworkBundle] Smarter default for framework.annotations| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | yesish (could be considered as a minor BC break)| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | N/A| License       | MIT| Doc PR        | N/A`framework.annotations` default should be true only if `doctrine/annotations` is installed.Indeed, in#20097, the dependency on `doctrine/annotations` was removed from the framework bundle.Thus, an application can break (not talking from one actually relying on annotations) as soon as it uses the framework bundle without the `framework.annotations` key explicitly set to `false` (I had the case in a fixture application in the testsuite of a package).Commits-------e38be09 [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestDec 14, 2016
…s (ogizanagi)This PR was merged into the 3.2 branch.Discussion----------[FrameworkBundle] Smarter default for framework.annotations| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | yesish (could be considered as a minor BC break)| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | N/A| License       | MIT| Doc PR        | N/A`framework.annotations` default should be true only if `doctrine/annotations` is installed.Indeed, insymfony/symfony#20097, the dependency on `doctrine/annotations` was removed from the framework bundle.Thus, an application can break (not talking from one actually relying on annotations) as soon as it uses the framework bundle without the `framework.annotations` key explicitly set to `false` (I had the case in a fixture application in the testsuite of a package).Commits-------e38be09 [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@eXtremeeXtremeeXtreme left review comments

@scaytrasescaytrasescaytrase left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@fabpot@lemoinem@eXtreme@scaytrase@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp