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

[DoctrineBridge] update doctrine event listeners doc for Symfony 4.2 change#9973

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

Merged
javiereguiluz merged 4 commits intosymfony:masterfromdmaicher:patch-5
Jun 29, 2018

Conversation

@dmaicher
Copy link
Contributor

Seesymfony/symfony#27675.

Doctrine entity listeners are always lazily instantiated as of Symfony 4.2.

@dmaicherdmaicher changed the titleUpdate event_listeners_subscribers.rst[DoctrineBridge] update doctrine event listeners doc for Symfony 4.2 changeJun 27, 2018
symfony-splitter pushed a commit to symfony/doctrine-bridge that referenced this pull requestJun 28, 2018
…ServiceLocator (dmaicher)This PR was squashed before being merged into the 4.2-dev branch (closes #27675).Discussion----------[DoctrineBridge] always load event listeners lazy via ServiceLocator| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes/no| Tests pass?   | yes| Fixed tickets |symfony/symfony#27661| License       | MIT| Doc PR        |symfony/symfony-docs#9973As described insymfony/symfony#27661 this PR suggests to always load doctrine event listeners lazily from a service locator instead of the full service container.If we agree to move forward I could tackle the remaining todos:- [x] update UPGRADE.md- [x] documentation PR- [x] tested on real appCommits-------130ec0525d [DoctrineBridge] always load event listeners lazy via ServiceLocator
fabpot added a commit to symfony/symfony that referenced this pull requestJun 28, 2018
…ServiceLocator (dmaicher)This PR was squashed before being merged into the 4.2-dev branch (closes#27675).Discussion----------[DoctrineBridge] always load event listeners lazy via ServiceLocator| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes/no| Tests pass?   | yes| Fixed tickets |#27661| License       | MIT| Doc PR        |symfony/symfony-docs#9973As described in#27661 this PR suggests to always load doctrine event listeners lazily from a service locator instead of the full service container.If we agree to move forward I could tackle the remaining todos:- [x] update UPGRADE.md- [x] documentation PR- [x] tested on real appCommits-------130ec05 [DoctrineBridge] always load event listeners lazy via ServiceLocator
@HeahDudeHeahDude added this to the4.2 milestoneJun 28, 2018
Copy link
Contributor

@HeahDudeHeahDude left a comment

Choose a reason for hiding this comment

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

Thank you very much for your work on this.


.. _`The Event System`:http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
.. _`the Doctrine Documentation`:http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners
So whenever possible it is preferable to use entity listeners instead of subscribers.
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm we might need another PR in core before merging such thing x).

whenever possible.

..versionadded::4.2
The default lazy behavior of Doctrine entity listeners was introduced in
Copy link
ContributorAuthor

@dmaicherdmaicherJun 28, 2018
edited
Loading

Choose a reason for hiding this comment

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

technically this is not correct. It was possible even before Symfony 4.2 but you had to manually add alazy=true attribute for the tag. Now since 4.2 it will be always lazy 😊

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ah sorry I missed the "default" while reading it. All good 👍

Choose a reason for hiding this comment

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

In that phrase I tried to say: "in 4.2 the new thing is that is lazy by default". But it looks like I failed.

Choose a reason for hiding this comment

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

@dmaicher in 4.2 they are lazy by default ... or are they mandatory lazy? In other words, can you saylazy:false in 4.2?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

No they are always lazy now. So mandatory.


..versionadded::4.2
Starting from Symfony 4.2, Doctrine entity listeners are lazy by default.
Starting from Symfony 4.2, Doctrine entity listeners are always lazy. In
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I think now its more clear 👍 Thanks 😄

@javiereguiluz
Copy link
Member

Thanks David.

@javiereguiluzjaviereguiluz merged commit4409fd6 intosymfony:masterJun 29, 2018
javiereguiluz added a commit that referenced this pull requestJun 29, 2018
…Symfony 4.2 change (dmaicher, javiereguiluz)This PR was merged into the master branch.Discussion----------[DoctrineBridge] update doctrine event listeners doc for Symfony 4.2 changeSeesymfony/symfony#27675.Doctrine entity listeners are always lazily instantiated as of Symfony 4.2.Commits-------4409fd6 Explain that lazy listeners are mandatory, not defaultb56ef9e Update event_listeners_subscribers.rstd8bb849 Reworded and added the versionadded directive601450e Update event_listeners_subscribers.rst
@dmaicherdmaicher deleted the patch-5 branchJune 29, 2018 06:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

+1 more reviewer

@HeahDudeHeahDudeHeahDude left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

4 participants

@dmaicher@javiereguiluz@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp