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

Fix Deprecated: Creation of dynamic property + loops for $matches #8

Merged
merged 7 commits into from
Oct 12, 2023

Conversation

mdeweerd
Copy link
Contributor

@mdeweerd mdeweerd commented Sep 3, 2023

Fixes (PHP7.4.X): Deprecated: Creation of dynamic property Text_Diff_Engine_native::$xchanged is deprecated .../yii\framework\gii\components\Pear\Text\Diff\Engine\native.php on line 41

Copied from https://github.com/WordPress/WordPress/blob/master/wp-includes/Text/Diff/Engine/native.php. Similar fix as https://github.com/mdeweerd/yii/blob/mdw/framework/gii/components/Pear/Text/Diff/Engine/native.php#L32-L40 .

Also copied extra fix replacing loop over list().

Applied phpcbf --standard=PEAR native.php resulting in some code formatting changes.

FYI: https://github.com/WordPress/WordPress/blob/master/wp-includes/Text/Diff/Renderer/inline.php seems has some functional changes that might be worth considering upstream.

Fixes (PHP7.4.X): Deprecated: Creation of dynamic property Text_Diff_Engine_native::$xchanged is deprecated .../yii\framework\gii\components\Pear\Text\Diff\Engine\native.php on line 41

Copied from https://github.com/WordPress/WordPress/blob/master/wp-includes/Text/Diff/Engine/native.php.
Similar fix as https://github.com/mdeweerd/yii/blob/mdw/framework/gii/components/Pear/Text/Diff/Engine/native.php#L32-L40 .

Also copied extra fix replacing loop over list().

Applied `phpcbf --standard=PEAR native.php` resulting in some code formatting changes.
@mdeweerd
Copy link
Contributor Author

mdeweerd commented Sep 6, 2023

I rebased this PR to the master branch.

marcovtwout added a commit to yiisoft/yii that referenced this pull request Sep 27, 2023
…on of dynamic property Text_Diff_Engine_native::$xchanged is deprecated" on PHP 8.2
@marcovtwout
Copy link

This PR fixes yiisoft/yii#4534

@CloCkWeRX
Copy link
Member

Can you review the failed tests, and if it's a matter of dropping support for those old versions of PHP, set an appropriate min version/remove them from the suite>

@mdeweerd
Copy link
Contributor Author

mdeweerd commented Oct 2, 2023

I removed testing the versions <PHP5.6 and added PHP8.0 to PHP8.3 .

IMHO the versions <PHP5.6 fail because the environment/include paths would need to be defined differently.
But I agree to limit the minimum version to PHP5.6 .

Except for the .travis.yml file which seems unused, I could not find other original files where the minimum version is mentionned.
I did not modify travis.yml - it might still yield valid test results and I can not validate it.

@CloCkWeRX CloCkWeRX merged commit d7ef170 into pear:master Oct 12, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants