phpro / grumphp

A PHP code-quality tool
MIT License
4.14k stars 429 forks source link

Deprecation related with php 8.1 #948

Closed jeckel closed 2 years ago

jeckel commented 2 years ago
Q A
Version GrumPHP 1.5.0
Bug? yes
New feature? yes
Question? no
Documentation? no
Related tickets

Trying to run grumphp with php 8.1 trhow some deprecation errors:

Steps to reproduce: To reproduce use a docker version with php 8.1-rc5 for example:

Result:

root@e7d1fc12dea6:/application# ./vendor/bin/grumphp run

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /application/vendor/symfony/filesystem/Filesystem.php on line 114

Deprecated: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated in /application/vendor/symfony/filesystem/Filesystem.php on line 118

Deprecated: GrumPHP\IO\ConsoleIO implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /application/vendor/phpro/grumphp/src/IO/ConsoleIO.php on line 17
veewee commented 2 years ago

Thanks for pointing it out. The first 2 are related to Symfony packages. What package versions are you using?

The last one is indeed an internal issue. Care to create a PR?

We are planning to support both php 8.1 and Symfony 6 at the end of the month, shortly after their release.

jeckel commented 2 years ago

I'm not using symfony on this project, it might be used by another tool...

I'll see if I can dd a PR before the end of the week

veewee commented 2 years ago

We are using Symfony components internally for GrumPHP. But the installed versions may very based on your setup. You can check the versions by running composer show