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 deprecation warnings #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TomA-R
Copy link

@TomA-R TomA-R commented Dec 1, 2024

Fixes

Fixes deprecation warnings:

PHP Deprecated:  Diff_SequenceMatcher::__construct(): Optional parameter $junkCallback declared before required parameter $options is implicitly treated as a required parameter in php-diff/lib/Diff/SequenceMatcher.php on line 87
PHP Deprecated:  Creation of dynamic property Diff_SequenceMatcher::$matchingBlocks is deprecated in php-diff/lib/Diff/SequenceMatcher.php on line 129
PHP Deprecated:  Creation of dynamic property Diff_SequenceMatcher::$opCodes is deprecated in php-diff/lib/Diff/SequenceMatcher.php on line 130
PHP Deprecated:  Creation of dynamic property Diff_SequenceMatcher::$matchingBlocks is deprecated in php-diff/lib/Diff/SequenceMatcher.php on line 129
PHP Deprecated:  Creation of dynamic property Diff_SequenceMatcher::$opCodes is deprecated in php-diff/lib/Diff/SequenceMatcher.php on line 130
PHP Deprecated:  Creation of dynamic property Diff_SequenceMatcher::$fullBCount is deprecated in php-diff/lib/Diff/SequenceMatcher.php on line 151

Fixes error:

TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given

php-diff/lib/Diff/SequenceMatcher.php:353
php-diff/lib/Diff/SequenceMatcher.php:467
php-diff/lib/Diff/SequenceMatcher.php:523
php-diff/lib/Diff.php:176
php-diff/lib/Diff/Renderer/Html/Array.php:70
php-diff/tests/Diff/Renderer/Html/ArrayTest.php:17

Fixes composer email address which caused composer install to fail:

$ composer install

In Factory.php line 317:

  "./composer.json" does not match the expected JSON schema:
   - authors[0].email : Invalid email

Upgrades PHPUnit so a version that can be installed on current versions of PHP

Why

To support newer versions of PHP without producing a lot of warnings

ping @chrisboulton

@TheWitness
Copy link

Looks good to me.

@jfcherng
Copy link

jfcherng commented Dec 1, 2024

It would be better to set php version constraint in composer.json if you are going to use new features. I have my own modern replacement though.

@TheWitness
Copy link

I just Emailed Chris to figure out what is going on.

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