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

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

Merged
nicolas-grekas merged 3 commits intosymfony:masterfromfabpot:4.0-PHP-bump
May 18, 2017

Conversation

fabpot
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes-ish?
BC breaks?yes-ish?
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

psampaz, Taluu, jjanvier, pierallard, juliensnz, TomasVotruba, theofidry, scaytrase, maks-rafalko, mvrhov, and 22 more reacted with thumbs up emojiTaluu, teohhanhui, redstrike, yceruto, and DQNEO reacted with laugh emojidaFish, podhy, Crell, Hadrien45, Majkl578, mhujer, apfelbox, apetitpa, kukulich, javiereguiluz, and 45 more reacted with hooray emojiredstrike, chapterjason, TomasVotruba, yceruto, and Aliance reacted with heart emoji
.travis.yml Outdated
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1.0
Copy link
Member

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

curry684 reacted with thumbs up emoji

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

Copy link
Member

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

Copy link
Member

@nicolas-grekasnicolas-grekasMay 18, 2017
edited
Loading

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.

appveyor.yml Outdated
@@ -59,8 +57,6 @@ test_script:
- cd c:\php && 7z x php-7.1.3-Win32-VC14-x64.zip -y >nul && copy /Y php.ini-min php.ini
- cd c:\projects\symfony
- php phpunit src\Symfony --exclude-group benchmark,intl-data || SET X=!errorlevel!
- 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!
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

Looks like this requires us to drop HHVM, impossible to make it run on the CI. I'm fine with that personally.

linaori, curry684, ogizanagi, abellion, Taluu, mykiwi, SergeC, chalasr, scaytrase, dizzy7, and 7 more reacted with thumbs up emojihopeseekr reacted with confused emoji

@fabpot
Copy link
MemberAuthor

@javiereguiluz
Copy link
Member

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
Copy link
Member

@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
Copy link
Member

@nicolas-grekas HHVM has 2 modes: PHP 5 mode and PHP 7 mode. IIRC, it runs in PHP 5 mode by default. We should addhhvm.php7.all = 1 in the HHVM INI file.

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedMay 18, 2017
edited
Loading

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.
Just dropping for now.

@stof
Copy link
Member

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
Copy link
Member

Yep, 3.19 locally, same result

.travis.yml Outdated
# Load fixtures
if [[ ! $skip ]]; then
sleep 5
Copy link
Member

Choose a reason for hiding this comment

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

why sleeping ?

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
@@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.5.9",
"php": "^7.1.0",

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?

Copy link
Member

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

apetitpa, jvasseur, nicolas-grekas, and curry684 reacted with thumbs up emoji
Copy link
Contributor

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.

@nicolas-grekasnicolas-grekasforce-pushed the4.0-PHP-bump branch 2 times, most recently fromfb64a47 tob930c86CompareMay 18, 2017 09:19
@@ -83,11 +77,11 @@ before_install:
echo extension = ldap.so >> $INI
echo extension = redis.so >> $INI
echo extension = memcached.so >> $INI
[[ $PHP = 5.* ]] && echo extension = mongo.so >> $INI
[[ $PHP = 5.* ]] && echo extension = memcache.so >> $INI
#echo extension = mongodb.so >> $INI

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

@nicolas-grekasnicolas-grekasforce-pushed the4.0-PHP-bump branch 4 times, most recently from1482630 to809736fCompareMay 18, 2017 11:40
"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",
Copy link
Member

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.

Copy link
Member

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",
Copy link
Member

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.

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

Copy link
Member

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": "",
Copy link
Member

Choose a reason for hiding this comment

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

should be removed

Choose a reason for hiding this comment

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

removed

@nicolas-grekas
Copy link
Member

Thank you@fabpot.

@nicolas-grekas
Copy link
Member

;)

@nicolas-grekasnicolas-grekas merged commit4758c2c intosymfony:masterMay 18, 2017
nicolas-grekas added a commit that referenced this pull requestMay 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
Copy link

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
Copy link
Member

nicolas-grekas commentedMay 18, 2017
edited
Loading

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.
It's quite easy to reproduce: just try running the ./phpunit script in this mode on e.g. 3.2.

@mofarrell
Copy link

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.
The option ishhvm.php7.scalar_types=0

@ogizanagiogizanagi mentioned this pull requestMay 21, 2017
nicolas-grekas added a commit that referenced this pull requestMay 22, 2017
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
Copy link
Contributor

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
Copy link
Member

@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

publicfunctionregisterListener($key,$logoutPath,$csrfTokenId,$csrfParameter,CsrfTokenManagerInterface$csrfTokenManager =null,string$context =null)
)

@SenseException
Copy link
Contributor

@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
Copy link
Contributor

@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
Copy link
Contributor

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
Copy link
Member

dunglas commentedMay 29, 2017
edited
Loading

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
Copy link
Member

@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))

apfelbox reacted with thumbs up emojiteohhanhui reacted with confused emoji

@SenseException
Copy link
Contributor

@javiereguiluz Thank you for pointing me to the comment and the answer to my question.

@fabpotfabpot mentioned this pull requestOct 19, 2017
@@ -63,7 +63,7 @@

const VERSION = '4.0.0-DEV';
const VERSION_ID = 40000;
const MAJOR_VERSION =4;
const MAJOR_VERSION =0;
Copy link
Contributor

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?

Copy link
Contributor

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 😛

Copy link
Contributor

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

joshtrichards pushed a commit to joshtrichards/symfony-finder that referenced this pull requestApr 26, 2024
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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@sstoksstoksstok left review comments

@ogizanagiogizanagiogizanagi left review comments

@Th3MoukTh3MoukTh3Mouk left review comments

@AlianceAlianceAliance left review comments

@dunglasdunglasdunglas approved these changes

@stofstofstof approved these changes

@xabbuhxabbuhxabbuh approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
4.0
Development

Successfully merging this pull request may close these issues.

15 participants
@fabpot@stof@nicolas-grekas@javiereguiluz@Seldaek@dunglas@mofarrell@SenseException@sstok@xabbuh@ogizanagi@robfrawley@Th3Mouk@Aliance@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp