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 PHP 8.1 deprecation errors #187

Merged
merged 2 commits into from
Dec 15, 2021
Merged

Fix PHP 8.1 deprecation errors #187

merged 2 commits into from
Dec 15, 2021

Conversation

cedric-anne
Copy link
Contributor

While running my test suite on PHP 8.1 RC3, I encountered following errors.
The default value of $flags param is now 0.

Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /var/glpi/vendor/friendsoftwig/twigcs/src/Lexer.php on line 23

Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /var/glpi/vendor/friendsoftwig/twigcs/src/Lexer.php on line 44

Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /var/glpi/vendor/friendsoftwig/twigcs/src/Lexer.php on line 60

@franmomu
Copy link
Contributor

It would be interesting to add a job in the CI to test PHP 8.1

@cedric-anne
Copy link
Contributor Author

It would be interesting to add a job in the CI to test PHP 8.1

Hi,

I added it to the CI matrix.

Regards

@cedric-anne
Copy link
Contributor Author

@OwlyCode ,

Could you check this PR ?

Regards

@cedric-anne
Copy link
Contributor Author

Up !

@stephanvierkant
Copy link
Contributor

PHP version is composer.json should be updated as well:

"php": "^7.2 || ^8.0",

See https://www.php.net/supported-versions.php. Security (!) support ends in 3 days from now, so I'd suggest dropping support for it.

@OwlyCode OwlyCode merged commit 960bd73 into friendsoftwig:master Dec 15, 2021
@OwlyCode
Copy link
Collaborator

Thank you @cedric-anne!

@cedric-anne cedric-anne deleted the patch-1 branch December 15, 2021 10:56
@MPParsley
Copy link

Would be great if we could get a new release for this.

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.

None yet

6 participants