Yii2: PHP 7.1 changes JSON_PRETTY_PRINT indentation?

Created on 8 Sep 2016  路  5Comments  路  Source: yiisoft/yii2

What steps will reproduce the problem?

Failing test, see https://travis-ci.org/yiisoft/yii2/jobs/158310722#L431-L436

What is the expected result?

see normal indentation as in other PHP versions.

What do you get instead?

Wrong indentation, however I am unable to reproduce this on 3v4l: https://3v4l.org/m3Xjo

Additional info

| Q | A |
| --- | --- |
| Yii version | 2.0.10-dev |
| PHP version | 7.1 on travis |

bug

Most helpful comment

@SilverFire This fix is not yet released - this should be fixed when 6th RC of PHP 7.1 comes out (~November 10th).

All 5 comments

looks like it is related to https://bugs.php.net/bug.php?id=66025 but that context does not really apply here.

It is PHP bug: https://3v4l.org/reS06

I've made a PR that skips test with failing Json::encode() for PHP 7.1: #12684 - now all tests are green.

As @rob006 mentioned here, the bug is solved but Travis still has outdated PHP version, so 2c3e3f3 can not be reverted right now

@SilverFire This fix is not yet released - this should be fixed when 6th RC of PHP 7.1 comes out (~November 10th).

Ah, fine. Thank you for clarifying!

Was this page helpful?
0 / 5 - 0 ratings