-
Notifications
You must be signed in to change notification settings - Fork 284
Fix error with unset properties on ThrowMatcher #1401
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
Conversation
Is there a test that could accompany this? |
👍 I'll try to add one, I was waiting for the CI activation. |
Would you accept the addition of a Dockerfile and/or docker-compose file in this PR? It could facilitate the tests on different PHP versions for example |
I'd rather keep a dockerfile out of it; we manage ok on Github Actions testing different versions and don't want things in two places |
FYI, I cannot yet reproduce the case with a simple test when I still can reproduce it on Akeneo. |
b89069a
to
547fa54
Compare
547fa54
to
9cf32d7
Compare
I added a Behat scenario to test the modification. |
Hello, |
I would like too ❤️ |
Hello @shouze , |
Hello guys, |
@jmleroux no problem with the PR, looks good thank you |
Weirdly this is failing on main for the older PHP versions... taking a look |
Weird, I think I tested it. I even added a dummy PR to test without the fix: #1409 Note: I don't have several PHP version locally and didn't have access to Travis for this PR, so I tested with several docker files. |
yes it's very odd; I can't reproduce locally but haven't had time to debug properly |
The ThrowMatcher could crash when class properties are unset. Alas, the
isInitialized
method only exists since PHP 7.4 and the fix will not work in PHP 7.3.This behavior was detected after this Symfony PR: symfony/symfony#44037 related to the use of dynamic properties.