Skip to content
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

[Debug] workaround BC break in PHP 7.3 #32090

Merged
merged 1 commit into from Jun 19, 2019
Merged

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets https://github.com/symfony/symfony-standard/issues/1138 symfony/website-skeleton#231
License MIT
Doc PR -

A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions.
This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

I noticed a few other similar BC breaks in 7.1 and 7.2, but unless someone reports that they block them, I don't think we need to care.

  • 7.1 A non well formed numeric value encountered E_NOTICE
  • 7.1 A non-numeric value encountered E_WARNING
  • 7.2 count() now raises a warning when an invalid parameter is passed.

See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches.

@dzuelke
Copy link
Contributor

dzuelke commented Jun 18, 2019

Is there anything in https://github.com/php/php-src/blob/PHP-7.4/UPGRADING that could use addressing maybe? It seems like nested ternary operators would be in some library somewhere...

@derrabus
Copy link
Member

This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

Wouldn't it be enough if we don't upmerge this workaround to 4.x?

@derrabus
Copy link
Member

It seems like nested ternary operators would be in some library somewhere...

Symfony itself has quite a few. ;-) But a nested ternary should only trigger a E_DEPRECATED iirc.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Jun 19, 2019

We can remove in 4, but there's no hurry, and new BC breaks are for 5, that's why I added this comment.

@fabpot
Copy link
Member

fabpot commented Jun 19, 2019

Thank you @nicolas-grekas.

@fabpot fabpot merged commit d8d43e6 into symfony:3.4 Jun 19, 2019
fabpot added a commit that referenced this pull request Jun 19, 2019
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] workaround BC break in PHP 7.3

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony-standard/issues/1138 symfony/website-skeleton#231
| License       | MIT
| Doc PR        | -

A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions.
This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0.

I noticed a few other similar BC breaks in 7.1 and 7.2, but *unless someone reports that they block them*, I don't think we need to care.
- 7.1 A non well formed numeric value encountered E_NOTICE
- 7.1 A non-numeric value encountered E_WARNING
- 7.2 count() now raises a warning when an invalid parameter is passed.

See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches.

Commits
-------

d8d43e6 [Debug] workaround BC break in PHP 7.3
@nicolas-grekas nicolas-grekas deleted the debug-php73 branch June 19, 2019 10:37
This was referenced Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants