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] Fix eventListener initialization when eventSubscriber constructor dispatch an event#40425

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
fabpot merged 1 commit intosymfony:4.4fromjderusse:fix-event-subscriber
Mar 10, 2021

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedMar 9, 2021
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#40365
LicenseMIT
Doc PR-

The issue occurred, when an EventSubscriber (lazyLoaded) dispatch an event when constructed. In that case, the state of theContainerAwareEventManager become inconsistent for the triggered event:

  • thelistener property contains both listener instance andserviceId meaning it's not fully initialized
  • theinitialized property containstrue meaning the listeners are initialized

Sorry for this PR without test, But it's really to hard to reproduce the issue :(

@parijke@michanismus@fliespl@reypm could you please check if this patch fixes the issue for you?

@carsonbotcarsonbot added this to the4.4 milestoneMar 9, 2021
@jderussejderusse changed the titleFix eventListener initialization when eventSubscriber constructor dis…Fix eventListener initialization when eventSubscriber constructor dispatch an eventMar 9, 2021
@jderussejderusse modified the milestone:4.4Mar 9, 2021
@carsonbotcarsonbot changed the titleFix eventListener initialization when eventSubscriber constructor dispatch an event[DoctrineBridge] Fix eventListener initialization when eventSubscriber constructor dispatch an eventMar 9, 2021
@reypm
Copy link

reypm commentedMar 9, 2021
edited
Loading

@jderusse steps followed:

  • composer update "symfony/*" --with-all-dependencies
  • bin/console clear:cache &&bin/console clear:cache --env=test
$ bin/console cache:clear // Clearing the cache for the local environment with debug true                                                                                                                                                                                [OK] Cache for the "local" environment (debug=true) was successfully cleared.                                                                                                                                                                  $ bin/console cache:clear --env=test // Clearing the cache for the test environment with debug true                                                                                                                                                                           [OK] Cache for the "test" environment (debug=true) was successfully cleared.

Note: I never get the error while clearing the cache but when running tests

Results with the fix: no more issues

image

chalasr reacted with thumbs up emoji

@michanismus
Copy link

@jderusse Works!

chalasr reacted with thumbs up emoji

@fliespl
Copy link
Contributor

@jderusse I can confirm that it works in our case as well.

@fabpot
Copy link
Member

Thank you@jderusse.

chapterjason reacted with rocket emoji

@fabpotfabpot merged commita9755c0 intosymfony:4.4Mar 10, 2021
@PierrickMartos
Copy link

Any idea when this will be released to 4.4? Thanks

This was referencedMar 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

8 participants

@jderusse@reypm@michanismus@fliespl@fabpot@PierrickMartos@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp