CI seems broken (2.14 is unusable)
remicollet opened this issue · 6 comments
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
PHPUnit 9.5.19 #StandWithUkraine
.............................SSSSSSSSSSSS...SS.....IIIII.IIII 61 / 1230 ( 4%)
IIIIIIIIISSSSS...III..FFI.......SSSSSSSSSSSS.......SS.....III 122 / 1230 ( 9%)
IIIIIIIIIIIIIII.......SSSS.......I.I.I......III..I........... 183 / 1230 ( 14%)
........................E...........RRRR...............S..... 244 / 1230 ( 19%)
..IIIII.......III..I....SIIIIIIIIIIIII........IIIII........II 305 / 1230 ( 24%)
IIII......................................................... 366 / 1230 ( 29%)
....................................R........................ 427 / 1230 ( 34%)
.S.................................................R.......E. 488 / 1230 ( 39%)
............................................................. 549 / 1230 ( 44%)
..........S.........................................W.W...... 610 / 1230 ( 49%)
.......................W........W........W........W.......... 671 / 1230 ( 54%)
............................................................. 732 / 1230 ( 59%)
.........................................E................... 793 / 1230 ( 64%)
........................E...EE............................... 854 / 1230 ( 69%)
.............................RRRRRRRRR.RRRRRR.RRRR.RRRR..RRRR 915 / 1230 ( 74%)
RRRRRRRRRRRRR.R.RRRRR.R...................................... 976 / 1230 ( 79%)
........................................................R.... 1037 / 1230 ( 84%)
.....R...RR.................................................. 1098 / 1230 ( 89%)
...................................W.....W................... 1159 / 1230 ( 94%)
........................................EE.FEEEEE..E.EEESEEEE 1220 / 1230 ( 99%)
.EE..EEarray(2) {
[0]=>
array(6) {
[0]=>
string(5) "42000"
["SQLSTATE"]=>
string(5) "42000"
[1]=>
int(4060)
["code"]=>
int(4060)
[2]=>
string(133) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot open database "laminasdb_test" requested by the login. The login failed."
["message"]=>
string(133) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot open database "laminasdb_test" requested by the login. The login failed."
}
[1]=>
array(6) {
[0]=>
string(5) "28000"
["SQLSTATE"]=>
string(5) "28000"
[1]=>
int(18456)
["code"]=>
int(18456)
[2]=>
string(81) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user 'sa'."
["message"]=>
string(81) "[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user 'sa'."
}
}
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
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 expected
So 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.