8000 [VarDumper] Adapt to php 7.2 changes by nicolas-grekas · Pull Request #23662 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[VarDumper] Adapt to php 7.2 changes #23662

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

Merged
merged 1 commit into from
Jul 26, 2017
Merged

Conversation

nicolas-grekas
Copy link
Member
Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

As required by this change on PHP 7.2:
https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts

Tests pass locally (until we add 7.2 to Travis)

@stof
Copy link
Member
stof commented Jul 25, 2017

@nicolas-grekas I suggest adding nightly on Travis (as an allowed failure). This would already give us regular feedback on support for PHP's master branch (currently the 7.2 development version)

@nicolas-grekas
Copy link
Member Author
nicolas-grekas commented Jul 25, 2017

I think we have a policy of not adding anything to allowed failures, because that consumes a Travis job, and nobody cares checking what's there. In the past, I usually opened a PR adding that kind of line and fixing the code to make it green, and maintained that PR until it was ready for merge as a non-allowed-failure line (which is not something I'd like to do with this PR :) .)

@nicolas-grekas nicolas-grekas merged commit 3c2f5f7 into symfony:2.7 Jul 26, 2017
nicolas-grekas added a commit that referenced this pull request Jul 26, 2017
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Adapt to php 7.2 changes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As required by this change on PHP 7.2:
https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts

Tests pass locally (until we add 7.2 to Travis)

Commits
-------

3c2f5f7 [VarDumper] Adapt to php 7.2 changes
@nicolas-grekas nicolas-grekas deleted the var-72 branch July 26, 2017 06:19
@@ -54,7 +54,7 @@ public static function castObject($obj, \ReflectionClass $reflector)
if ($a) {
$p = array_keys($a);
foreach ($p as $i => $k) {
if (isset($k[0]) && "\0" !== $k[0] && !$reflector->hasProperty($k)) {
if (isset($k[0]) ? "\0" !== $k[0] && !$reflector->hasProperty($k) : \PHP_VERSION_ID >= 70200) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@nicolas-grekas is there any need of writing such agly assertions? ;) I think some brackets would help in reading this code

Copy link
Member Author

Choose a reason for hiding this comment

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

I always try to improve my style, a never ending story, thanks for pointing :)

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.

4 participants
0