Closed remicollet closed 2 years ago
This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee. If you have a security issue, please follow our security reporting guidelines. If you wish to take on the role of maintainer, please nominate yourself
On a local run, with very different env, I also encounter tons of failure (2.13.4 was OK)
All seem related to strict_type being enabled in 2.14.0.
PHPUnit 9.5.19 #StandWithUkraine
.............................SSSSSSSSSSSS...SS.....IIIII.IIII 61 / 1197 ( 5%)
IIIIIIIIISSSSS...III..FFISSSSSSSSSSSSSSSSSSS.......SS.....III 122 / 1197 ( 10%)
IIIIIIIIIIIIIII.......SSSS.......I.I.I......III..I........... 183 / 1197 ( 15%)
................................RRRR...............S.......II 244 / 1197 ( 20%)
III.SSSSSSSSSSSSS...SIIIIIIIIIIIIISSS.....IIIII.SSSS...IIIIII 305 / 1197 ( 25%)
............................................................. 366 / 1197 ( 30%)
................R............................................ 427 / 1197 ( 35%)
..............................R.............................. 488 / 1197 ( 40%)
..................................................S.......... 549 / 1197 ( 45%)
...............................W.W........................... 610 / 1197 ( 50%)
..W........W........W........W............................... 671 / 1197 ( 56%)
............................................................. 732 / 1197 ( 61%)
.........E...........................................E...EE.. 793 / 1197 ( 66%)
..........................................................RRR 854 / 1197 ( 71%)
RRRRRR.RRRRRR.RRRR.RRRR..RRRRRRRRRRRRRRRRR.R.RRRRR.R......... 915 / 1197 ( 76%)
............................................................. 976 / 1197 ( 81%)
........................R.........R...RR..................... 1037 / 1197 ( 86%)
EE........................................................... 1098 / 1197 ( 91%)
...W.....W................................................... 1159 / 1197 ( 96%)
.......SSSSSSSSSSSSSSSSSSSSSSSSSSSSSS. 1197 / 1197 (100%)
Time: 00:00.439, Memory: 24,00 MB
There were 6 errors:
1) LaminasTest\Db\Sql\Predicate\ExpressionTest::testRetrievingWherePartsReturnsSpecificationArrayOfLiteralAndParametersAndArrayOfTypes
TypeError: var_export(): Argument #2 ($return) must be of type bool, int given
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Sql/Predicate/ExpressionTest.php:180
2) LaminasTest\Db\Sql\Predicate\OperatorTest::testRetrievingWherePartsReturnsSpecificationArrayOfLeftAndRightAndArrayOfTypes
TypeError: var_export(): Argument #2 ($return) must be of type bool, int given
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Sql/Predicate/OperatorTest.php:100
3) LaminasTest\Db\Sql\Predicate\PredicateSetTest::testCanPassBothPredicateAndCombinationToAddPredicate
TypeError: var_export(): Argument #2 ($return) must be of type bool, int given
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Sql/Predicate/PredicateSetTest.php:64
4) LaminasTest\Db\Sql\Predicate\PredicateSetTest::testCanUseOrPredicateAndAndPredicateMethods
TypeError: var_export(): Argument #2 ($return) must be of type bool, int given
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Sql/Predicate/PredicateSetTest.php:84
5) LaminasTest\Db\Sql\SqlFunctionalTest::test with data set "Select::processJoin()->Oracle" (Laminas\Db\Sql\Select Object (...), 'Oracle', array('SELECT "a".*, "b".* FROM "a" ...= '20'', 'SELECT "a".*, "b".* FROM "a" ...x" = ?', array(10, 20)))
TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, int given
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Adapter/Platform/Oracle.php:130
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/TestAsset/TrustingOraclePlatform.php:17
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:195
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Select.php:632
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:68
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:305
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:346
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Select.php:620
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:68
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:50
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Platform/Platform.php:119
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Sql.php:169
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Sql/SqlFunctionalTest.php:626
6) LaminasTest\Db\Sql\SqlFunctionalTest::test with data set "Select::processJoin()->SqlServer" (Laminas\Db\Sql\Select Object (...), 'SqlServer', array('SELECT [a].*, [b].* FROM [a] ...= '20'', 'SELECT [a].*, [b].* FROM [a] ...x] = ?', array(10, 20)))
TypeError: str_replace(): Argument #3 ($subject) must be of type array|string, int given
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Adapter/Platform/SqlServer.php:124
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/TestAsset/TrustingSqlServerPlatform.php:17
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:195
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Select.php:632
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:68
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:305
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:346
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Select.php:620
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:68
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/AbstractSql.php:50
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Platform/Platform.php:119
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Sql/Sql.php:169
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Sql/SqlFunctionalTest.php:626
--
There were 2 failures:
1) LaminasTest\Db\Adapter\Driver\IbmDb2\StatementTest::testPrepareThrowsRuntimeExceptionOnInvalidSql
Failed asserting that exception of type "TypeError" matches expected exception "Laminas\Db\Adapter\Exception\RuntimeException". Message was: "Exception::__construct(): Argument #2 ($code) must be of type int, string given" at
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Adapter/Driver/IbmDb2/Statement.php:167
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Adapter/Driver/IbmDb2/StatementTest.php:148
.
2) LaminasTest\Db\Adapter\Driver\IbmDb2\StatementTest::testPrepareThrowsRuntimeExceptionOnInvalidSqlWithErrorReportingDisabled
Failed asserting that exception of type "TypeError" matches expected exception "Laminas\Db\Adapter\Exception\RuntimeException". Message was: "Exception::__construct(): Argument #2 ($code) must be of type int, string given" at
/dev/shm/BUILDROOT/php-laminas-db-2.14.0-1.fc35.remi.x86_64/usr/share/php/Laminas/Db/Adapter/Driver/IbmDb2/Statement.php:173
/dev/shm/BUILD/laminas-db-f0c039e3d99cd0ebf053077b436caa4d7791728a/test/unit/Adapter/Driver/IbmDb2/StatementTest.php:169
.
ERRORS!
Tests: 1197, Assertions: 1857, Errors: 6, Failures: 2, Warnings: 8, Skipped: 97, Incomplete: 76, Risky: 57.
Called it 😁 ( https://github.com/laminas/laminas-db/pull/240#issuecomment-1076964362 )
TBH, I'm surprised that the test suite just crashes with an exit(0)
- WTF?!
2 ex:
Laminas\Db\Adapter\Driver\Pdo\Pdo::formatParameterName
may receive int (colum number ?), not only stringtestToArrayCreatesArrayOfArraysRepresentingRows
calls var_export($test, 1) so integer where bool is expectedSo this package seems really NOT ready for strict_type....
Gonna do a full revert and re-release for now: as much as @ghostwriter's efforts go into bringing this package up to modern standards, it is just too risky, and a patch to "fix" the risky changes is simply not viable.
Reverted in #242
Please check, for ex, https://github.com/laminas/laminas-db/runs/5743858834
It seems report for end of tests is missing, and thus probably missing some exit code There is also a lot of failures / errors