Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Bump minimum version to PHP 7.1 for Symfony 4#22733
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fabpot commentedMay 17, 2017
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | no |
| New feature? | yes-ish? |
| BC breaks? | yes-ish? |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | n/a |
| License | MIT |
| Doc PR | n/a |
054280d to0c3616cCompare.travis.yml Outdated
| -php:5.5 | ||
| -php:5.6 | ||
| -php:7.0 | ||
| -php:7.1.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.
we should have a test running the fullstack testsuite on latest 7.1 too IMO
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.
We have one, like in the previous branches: the deps=low line does 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.
deps=low is a per-component build, not a fullstack build. It does not test the requirements of the fullstack
nicolas-grekasMay 18, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Unless I misunderstood what you meant, the line you're asking for doesn't exist on the SF3 lines. Thus we should not add it since it has never been required.
| -cd c:\php && 7z x php-5.5.9-nts-Win32-VC11-x86.zip -y >nul && copy /Y php.ini-min php.ini | ||
| -cd c:\projects\symfony | ||
| -SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped | ||
| -php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel! |
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.
this line should be removed, as it was the one running tests on 5.5.9. there is no need to run tests a second time on 7.1.3 without changing the php.ini (skipped tests will stay the same)
stof commentedMay 17, 2017
@fabpot when bumping the version to 4.0, you forgot to update all inter-component requirements to allow them to use the 4.0 version of other components in their own 4.0 versions |
nicolas-grekas commentedMay 17, 2017
Looks like this requires us to drop HHVM, impossible to make it run on the CI. I'm fine with that personally. |
fabpot commentedMay 18, 2017
javiereguiluz commentedMay 18, 2017
In addition to the poll,according to the latest global PHP stats, HHVM is used by 0.36% of PHP developers. The number is practically zero ... but maybe there are some high-profile clients there (Facebook is using it, Slack was thinking about using it, ...) |
Seldaek commentedMay 18, 2017
@javiereguiluz please don't forget that the stats are about number of composer installs.. That doesn't translate 1:1 to users, as some may do more installs than others. I think it's mostly interesting to see trends over time as exact point-in-time numbers can't be fully trusted. |
stof commentedMay 18, 2017
@nicolas-grekas HHVM has 2 modes: PHP 5 mode and PHP 7 mode. IIRC, it runs in PHP 5 mode by default. We should add |
nicolas-grekas commentedMay 18, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I just tried again this mode, same failure. We'd need a php7.1 mode. There is just no way currently to make hhvm run on a 7.1 code base. HHVM advertises itself as 70099 so even Composer cant. |
stof commentedMay 18, 2017
Have you tried using the latest HHVM rather than 3.18 ? they may have updated their PHP 7 mode to expose it as 7.1 later |
nicolas-grekas commentedMay 18, 2017
Yep, 3.19 locally, same result |
.travis.yml Outdated
| -| | ||
| # Load fixtures | ||
| if [[ ! $skip ]]; then | ||
| sleep 5 |
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.
why sleeping ?
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.
Previously we did not require it because we had some extensions to compile, which gave some time for the ldap sever to start in the background. But now we have to sleep a bit to let it start.
composer.json Outdated
| ], | ||
| "require": { | ||
| "php":">=5.5.9", | ||
| "php":"^7.1.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.
shouldn't we keep the ">=" operator?
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.
Well, this constraint forbids using the existing version with PHP 8. I think it is fine. I'm almost sure that the current code willnot work with PHP 8 (PHP major versionswill break BC for sure if we look at the existing releases where even minor versions have a hard time preserving BC fully). This way, when PHP 8 starts to come out, we can update our requirements once we start testing it with PHP 7
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.
This way exclude PHP8, IMO it's a good thing and avoid future PR to exclude it and then re-enable PHP8 after BC breaks corrected.
fb64a47 tob930c86Compare| echo extension = memcached.so >> $INI | ||
| [[ $PHP = 5.* ]] &&echo extension =mongo.so >> $INI | ||
| [[ $PHP = 5.* ]] &&echo extension =memcache.so >> $INI | ||
| #echo extension =mongodb.so >> $INI |
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.
the test suite does not pass yet with mongodb - but this is not master specific so should be handled on a lower branch
1482630 to809736fCompare| "symfony/http-foundation":"~3.3|~4.0.0", | ||
| "symfony/http-kernel":"~3.3|~4.0.0", | ||
| "symfony/cache":"~3.4|~4.0", | ||
| "symfony/class-loader":"~3.4|~4.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.
The ClassLoader component won't have a 4.0 release.
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.
yeah, but the requirement will be dropped entirely when removing deprecated code anyway (only the BC layer requires it), so it is fine for now
| "symfony/translation":"~2.8|~3.0|~4.0.0", | ||
| "symfony/var-dumper":"~3.3|~4.0.0", | ||
| "symfony/browser-kit":"~3.4|~4.0", | ||
| "symfony/class-loader":"~3.4|~4.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.
The ClassLoader component won't have a 4.0 release.
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.
let's do that in the next PR removing class loader, here it's a batch change
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.
fair enough
| }, | ||
| "suggest": { | ||
| "symfony/browser-kit":"", | ||
| "symfony/class-loader":"", |
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.
should be removed
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.
removed
nicolas-grekas commentedMay 18, 2017
Thank you@fabpot. |
nicolas-grekas commentedMay 18, 2017
;) |
… dunglas, nicolas-grekas)This PR was merged into the 4.0-dev branch.Discussion----------Bump minimum version to PHP 7.1 for Symfony 4| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes-ish?| BC breaks? | yes-ish?| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aCommits-------4758c2c Tweak travis and appveyor for Symfony 46633c8b Allow individual bridges, bundles and components to be used with 4.0c850733 bumped minimum version to PHP 7.1
mofarrell commentedMay 18, 2017
Is this just a version number issue? HHVM can change what version number it gives back. Are there some PHP7 features we haven't implemented yet that are making it burdensome for Symfony to support HHVM? |
nicolas-grekas commentedMay 18, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
That's not the only issue because even with the branches that support php5.5 thus hhvm, once you enable the php7 mode the test suite fails to just run, with strange type issues being reported. |
mofarrell commentedMay 18, 2017
We have an suboption to PHP7 that can disable the strict type checks. The strict type checks are broken in some cases, and we have that on our radar. It happens to not be trivial to fix, and also currently not at the top of our priority list. |
This PR was squashed before being merged into the 4.0-dev branch (closes#22820).Discussion----------Remove PHP < 7.1.3 code| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | yes| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->| Tests pass? | yes| Fixed tickets |#22733| License | MIT| Doc PR | N/ACommits-------7091fb4 Remove PHP < 7.1.3 code
SenseException commentedMay 22, 2017
Will Symfony 4 use scalar type hints and return types? This would be a break to the 3.x versions, but with a major release the best time to introduce them. |
stof commentedMay 22, 2017
@SenseException we will use them in new APIs. But we won't add them in existing interfaces, as this would be a BC break without a progressive upgrade path, and so the drawbacks are much bigger than the benefits for the community. Btw, the master branch already contains a scalar typehint in at least one place (the last argument in
|
SenseException commentedMay 22, 2017
@stof I'm aware that this would be a bold move, but your argument also fits to a future Symfony 5, 6, 7 and so on. Implementing an old Symfony 4 interface forces a user to omit type hints even when it is a new project that never was on version 3 before. But it seems that a return type can be added to the class implementing an interface that misses that type:https://3v4l.org/BHlVW. |
sstok commentedMay 28, 2017
@SenseException yes you can add return types to implementations, even when the interface doesn't require them. But doing this would be something for Symfony 5 so developers can first upgrade to Symfony 4, add the return-types, and then when Symfony 5 is released they can safely upgrade. |
SenseException commentedMay 29, 2017
So Symfony 5 is going to have the type hints and return types? I just want to read when Symfony and its components arr going to use modern (2017) PHP. |
dunglas commentedMay 29, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
We'll use type hints and return types for the new code. It's not possible without a BC break for the old one (and it has very little interest because, as pointed out by other people, you can use type hints in your code and our code base is well tested). |
javiereguiluz commentedMay 29, 2017
@SenseException in addition to what Kévin told you, we can only use PHP 7 features for new code added to Symfony. For the existing code, we can't use PHP 7 until November 2021 (as explained in this comment:#22862 (comment)) |
SenseException commentedJun 8, 2017
@javiereguiluz Thank you for pointing me to the comment and the answer to my question. |
| constVERSION ='4.0.0-DEV'; | ||
| constVERSION_ID =40000; | ||
| constMAJOR_VERSION =4; | ||
| constMAJOR_VERSION =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.
Why did you change this?
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.
That seems like a bug in the release script 😛
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.
It was already fixed ince519b6
This PR was squashed before being merged into the 4.0-dev branch (closes #22820).Discussion----------Remove PHP < 7.1.3 code| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | yes| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->| Tests pass? | yes| Fixed tickets |symfony/symfony#22733| License | MIT| Doc PR | N/ACommits-------54adaf8 Remove PHP < 7.1.3 code