phpmetrics / PhpMetrics

Beautiful and understandable static analysis tool for PHP
https://phpmetrics.github.io/website/
MIT License
2.48k stars 259 forks source link

Deprecated messages with PHP 8.1 #468

Closed caugner closed 2 years ago

caugner commented 2 years ago

Bug report

$ composer global require --prefer-dist --no-progress phpmetrics/phpmetrics 2.7.*
Changed current directory to /tmp
./composer.json has been created
Running composer update phpmetrics/phpmetrics
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
  - Locking nikic/php-parser (v4.13.2)
  - Locking phpmetrics/phpmetrics (v2.7.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing nikic/php-parser (v4.13.2): Extracting archive
  - Installing phpmetrics/phpmetrics (v2.7.4): Extracting archive
Generating autoload files
$ $(composer global config bin-dir --absolute)/phpmetrics --report-html=docs/phpmetrics --exclude=vendor --junit=junit-phpunit.xml .
Changed current directory to /tmp
Deprecated: RecursiveDirectoryIterator::__construct(): Passing null to parameter #2 ($flags) of type int is deprecated in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Component/File/Finder.php on line 72
Deprecated: Return type of Hal\Metric\Metrics::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/Metrics.php on line 55
........
Deprecated: Return type of Hal\Metric\ClassMetric::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/BagTrait.php on line 82
Deprecated: Return type of Hal\Metric\FunctionMetric::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/BagTrait.php on line 82
Deprecated: Return type of Hal\Component\Tree\Graph::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Component/Tree/Graph.php on line 103
Deprecated: Return type of Hal\Metric\PackageMetric::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/BagTrait.php on line 82
..................................................................................................................................................................................
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php on line 137
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php on line 137
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php on line 137
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php on line 137
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php on line 137
.....................................................Executing system analyzes...
Deprecated: Return type of Hal\Metric\ProjectMetric::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /tmp/vendor/phpmetrics/phpmetrics/src/Hal/Metric/BagTrait.php on line 82
<error>JUnit report cannot be read</error>
Halleck45 commented 2 years ago

466 has been merged. Thanks !