llaville / php-compatinfo

Library that find out the minimum version and the extensions required for a piece of code to run
https://llaville.github.io/php-compatinfo/7.1/
Other
371 stars 21 forks source link

[5.4.0] questions #276

Closed remicollet closed 3 years ago

remicollet commented 3 years ago

this is still in composer.json, but seems it is not used anymore ?

seems deprecated ?

seems deprecated (still appear in some file, phar-stub.php and man page) ?

configuration file have disappeared (related to previous) ?

usage in some script, but not required in composer.json ?

remicollet commented 3 years ago

And have strange failure

There were 4 failures:

1) Bartlett\Tests\CompatInfo\Sniffs\ConstSyntaxSniffTest::testTotalRequirementsWithConstant
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'4.3.10'
+'4.3.0'

/dev/shm/BUILD/php-compat-info-752536f679d15f581aeead8221e90cc026aec9fd/tests/Sniffs/ConstSyntaxSniffTest.php:89

2) Bartlett\Tests\CompatInfo\ConditionIssueTest::testRegressionGH128
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'5.4.0RC3'
+'4.0.0'

/dev/shm/BUILD/php-compat-info-752536f679d15f581aeead8221e90cc026aec9fd/tests/ConditionIssueTest.php:53

3) Bartlett\Tests\CompatInfo\ConditionIssueTest::testRegressionGH160
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'5.6.0alpha1'
+'4.0.0'

/dev/shm/BUILD/php-compat-info-752536f679d15f581aeead8221e90cc026aec9fd/tests/ConditionIssueTest.php:125

4) Bartlett\Tests\CompatInfo\NamespaceIssueTest::testRegressionGH155
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'5.2.0'
+'4.0.0'

/dev/shm/BUILD/php-compat-info-752536f679d15f581aeead8221e90cc026aec9fd/tests/NamespaceIssueTest.php:75

Looks like sniff are not loaded... need to dig...

llaville commented 3 years ago

I may investigate for you. But please give me your runtime env and packages versions installed. I will check on all other points soon

remicollet commented 3 years ago

Any PHP versions (7.2.34, 7.3.23, 7.4.11), with ~150 extensions

bartlett/php-reflect 4.4.0 bartlett/php-compatinfo-db 2.18.0 symfony 4.4.14 ramsey/uuid 4.1.1 doctrine/collection 1.6.7

remicollet commented 3 years ago

Another question

is monolog still used ? It is in composer.json, but don't see anything about it

remicollet commented 3 years ago

I also reproduce the same falure from git

$ $ composer install
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 41 installs, 0 updates, 0 removals
  - Locking bartlett/php-compatinfo-db (2.18.0)
  - Locking bartlett/php-reflect (4.4.0)
  - Locking brick/math (0.9.1)
  - Locking composer/package-versions-deprecated (1.11.99)
  - Locking composer/semver (3.2.1)
  - Locking doctrine/collections (1.6.7)
  - Locking justinrainbow/json-schema (5.2.10)
  - Locking laminas/laminas-diagnostics (1.6.0)
  - Locking laminas/laminas-zendframework-bridge (1.1.1)
  - Locking league/tactician (v1.0.3)
  - Locking monolog/monolog (1.25.5)
  - Locking nikic/php-parser (v4.10.2)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (4.3.4)
  - Locking phpdocumentor/type-resolver (1.4.0)
  - Locking psr/container (1.0.0)
  - Locking psr/event-dispatcher (1.0.0)
  - Locking psr/log (1.1.3)
  - Locking ramsey/collection (1.1.1)
  - Locking ramsey/uuid (4.1.1)
  - Locking sebastian/version (2.0.1)
  - Locking seld/jsonlint (1.8.2)
  - Locking symfony/config (v5.1.6)
  - Locking symfony/console (v5.1.6)
  - Locking symfony/dependency-injection (v5.1.6)
  - Locking symfony/deprecation-contracts (v2.2.0)
  - Locking symfony/event-dispatcher (v5.1.6)
  - Locking symfony/event-dispatcher-contracts (v2.2.0)
  - Locking symfony/filesystem (v5.1.6)
  - Locking symfony/finder (v5.1.6)
  - Locking symfony/polyfill-ctype (v1.18.1)
  - Locking symfony/polyfill-intl-grapheme (v1.18.1)
  - Locking symfony/polyfill-intl-normalizer (v1.18.1)
  - Locking symfony/polyfill-mbstring (v1.18.1)
  - Locking symfony/polyfill-php73 (v1.18.1)
  - Locking symfony/polyfill-php80 (v1.18.1)
  - Locking symfony/serializer (v5.1.6)
  - Locking symfony/service-contracts (v2.2.0)
  - Locking symfony/stopwatch (v5.1.6)
  - Locking symfony/string (v5.1.6)
  - Locking webmozart/assert (1.9.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 41 installs, 0 updates, 0 removals
  - Downloading symfony/string (v5.1.6)
  - Downloading symfony/console (v5.1.6)
  - Downloading league/tactician (v1.0.3)
  - Downloading laminas/laminas-zendframework-bridge (1.1.1)
  - Downloading laminas/laminas-diagnostics (1.6.0)
  - Downloading composer/semver (3.2.1)
  - Downloading bartlett/php-compatinfo-db (2.18.0)
  - Downloading symfony/finder (v5.1.6)
  - Downloading symfony/event-dispatcher-contracts (v2.2.0)
  - Downloading symfony/deprecation-contracts (v2.2.0)
  - Downloading symfony/event-dispatcher (v5.1.6)
  - Downloading symfony/dependency-injection (v5.1.6)
  - Downloading seld/jsonlint (1.8.2)
  - Downloading phpdocumentor/type-resolver (1.4.0)
  - Downloading phpdocumentor/reflection-docblock (4.3.4)
  - Downloading nikic/php-parser (v4.10.2)
  - Downloading justinrainbow/json-schema (5.2.10)
  - Downloading doctrine/collections (1.6.7)
  - Downloading bartlett/php-reflect (4.4.0)
  - Downloading monolog/monolog (1.25.5)
  - Downloading ramsey/collection (1.1.1)
  - Downloading brick/math (0.9.1)
  - Downloading ramsey/uuid (4.1.1)
  - Downloading symfony/filesystem (v5.1.6)
  - Downloading symfony/config (v5.1.6)
  - Downloading symfony/serializer (v5.1.6)
  - Installing composer/package-versions-deprecated (1.11.99): Extracting archive
  - Installing symfony/polyfill-php80 (v1.18.1): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.18.1): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.18.1): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.18.1): Extracting archive
  - Installing symfony/polyfill-ctype (v1.18.1): Extracting archive
  - Installing symfony/string (v5.1.6): Extracting archive
  - Installing psr/container (1.0.0): Extracting archive
  - Installing symfony/service-contracts (v2.2.0): Extracting archive
  - Installing symfony/polyfill-php73 (v1.18.1): Extracting archive
  - Installing symfony/console (v5.1.6): Extracting archive
  - Installing league/tactician (v1.0.3): Extracting archive
  - Installing laminas/laminas-zendframework-bridge (1.1.1): Extracting archive
  - Installing laminas/laminas-diagnostics (1.6.0): Extracting archive
  - Installing composer/semver (3.2.1): Extracting archive
  - Installing bartlett/php-compatinfo-db (2.18.0): Extracting archive
  - Installing symfony/stopwatch (v5.1.6): Extracting archive
  - Installing symfony/finder (v5.1.6): Extracting archive
  - Installing psr/event-dispatcher (1.0.0): Extracting archive
  - Installing symfony/event-dispatcher-contracts (v2.2.0): Extracting archive
  - Installing symfony/deprecation-contracts (v2.2.0): Extracting archive
  - Installing symfony/event-dispatcher (v5.1.6): Extracting archive
  - Installing symfony/dependency-injection (v5.1.6): Extracting archive
  - Installing seld/jsonlint (1.8.2): Extracting archive
  - Installing sebastian/version (2.0.1): Extracting archive
  - Installing psr/log (1.1.3): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing phpdocumentor/type-resolver (1.4.0): Extracting archive
  - Installing webmozart/assert (1.9.1): Extracting archive
  - Installing phpdocumentor/reflection-docblock (4.3.4): Extracting archive
  - Installing nikic/php-parser (v4.10.2): Extracting archive
  - Installing justinrainbow/json-schema (5.2.10): Extracting archive
  - Installing doctrine/collections (1.6.7): Extracting archive
  - Installing bartlett/php-reflect (4.4.0): Extracting archive
  - Installing monolog/monolog (1.25.5): Extracting archive
  - Installing ramsey/collection (1.1.1): Extracting archive
  - Installing brick/math (0.9.1): Extracting archive
  - Installing ramsey/uuid (4.1.1): Extracting archive
  - Installing symfony/filesystem (v5.1.6): Extracting archive
  - Installing symfony/config (v5.1.6): Extracting archive
  - Installing symfony/serializer (v5.1.6): Extracting archive
39 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
26 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

$ phpunit
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.23
Configuration: /work/GIT/php-compat-info/phpunit.xml.dist

...................................F............................. 65 / 97 ( 67%)
................F.F.......F.....                                  97 / 97 (100%)

Time: 1.77 seconds, Memory: 34.00MB

There were 4 failures:

1) Bartlett\Tests\CompatInfo\Sniffs\ConstSyntaxSniffTest::testTotalRequirementsWithConstant
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'4.3.10'
+'4.3.0'

/work/GIT/php-compat-info/tests/Sniffs/ConstSyntaxSniffTest.php:89

2) Bartlett\Tests\CompatInfo\ConditionIssueTest::testRegressionGH128
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'5.4.0RC3'
+'4.0.0'

/work/GIT/php-compat-info/tests/ConditionIssueTest.php:53

3) Bartlett\Tests\CompatInfo\ConditionIssueTest::testRegressionGH160
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'5.6.0alpha1'
+'4.0.0'

/work/GIT/php-compat-info/tests/ConditionIssueTest.php:125

4) Bartlett\Tests\CompatInfo\NamespaceIssueTest::testRegressionGH155
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'5.2.0'
+'4.0.0'

/work/GIT/php-compat-info/tests/NamespaceIssueTest.php:75

FAILURES!
Tests: 97, Assertions: 230, Failures: 4.
llaville commented 3 years ago

To reply to your first questions => https://github.com/llaville/php-compat-info/issues/276#issue-713502451

doctrine/cache this is still in composer.json, but seems it is not used anymore ?

composer suggestion (used by php-reflect) => https://github.com/llaville/php-compat-info/blob/master/composer.json#L32

plugins seems deprecated ?

YES no more

BARTLETTRC from env seems deprecated (still appear in some file, phar-stub.php and man page) ? OK => will fix it !

phpcompatinfo.json configuration file have disappeared (related to previous) ?

no more config file, because we use now the Symfony/Dependency-Injection and configuration with containers => https://github.com/llaville/php-compat-info/blob/master/config/container.php

doctrine/collection usage in some script, but not required in composer.json ?

dependency requirement in php-reflect that 5.4 still depends on, but you're right with next version I should put it (will fix it)

remicollet commented 3 years ago

Thanks for all answers

Closing as test failure are tracked on #280

remicollet commented 3 years ago

doctrine/cache this is still in composer.json, but seems it is not used anymore ?

composer suggestion (used by php-reflect) => https://github.com/llaville/php-compat-info/blob/master/composer.json#L32

As not directly used, can be removed.

And, IIUC, it is used by phpreflect command, not by the library used by phpcompatinfo.

llaville commented 3 years ago

IIUC ? what is this ?

remicollet commented 3 years ago

IIUC is a quite common acronym for: If I Understand Correctly.

llaville commented 3 years ago

Thanks to clarify it for me (I didn't know). BTW doctrine/cache was already removed in commit 8a43bc730dca776c7274f54b67ff5583f10a867f (issue #279)