-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Twig 4] Add PHPUnit as dev dependency #4472
Conversation
1ea2262
to
b51d960
Compare
@ruudk That works for me. We used to have PHPunit 11.3. Here, you're suggesting to bump to 11.5, but tests don't pass, can you have a look? |
Reported problem upstream: I'll report back here when it's resolved. |
b51d960
to
fd83ca1
Compare
I am also interested in why you propose to use a development version of PHPUnit. |
@sebastianbergmann I did not do this on purpose. I ran I think we need to change this: Line 8 in c0689e3
I was unaware of this setting. |
4c9f92c
to
bc9ed35
Compare
PR is ready for review now. |
@@ -5,7 +5,6 @@ | |||
"keywords": ["templating"], | |||
"homepage": "https://twig.symfony.com", | |||
"license": "BSD-3-Clause", | |||
"minimum-stability": "dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using dev stability for our dependencies was done on purpose. You should use phpunit/phpunit": "^11.4@stable"
to override it only for phpunit instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed? Looking at the dependencies:
Lines 26 to 35 in c192cbf
"require": { | |
"php": ">=8.2", | |
"symfony/deprecation-contracts": "^2.5|^3", | |
"symfony/polyfill-mbstring": "^1.3", | |
"symfony/polyfill-ctype": "^1.8" | |
}, | |
"require-dev": { | |
"psr/container": "^1.0|^2.0", | |
"phpstan/phpstan": "^2.0" | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, the same thing happened when @VincentLanglet added PHPStan. It was installing the dev version without anybody noticing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"phpstan/phpstan": "^2.0@stable"
should be preferred too then
6005f02
to
c352a8d
Compare
Thank you @ruudk. |
This makes it easier to run the tests locally.
I understand we didn't do this previously (Twig 3) because of
symfony/simple-phpunit
. But that is now removed in Twig 4, so maybe we can do this as well?