GithubHelp home page GithubHelp logo

Comments (6)

Ocramius avatar Ocramius commented on August 21, 2024 1

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.

from laminas-db.

github-actions avatar github-actions commented on August 21, 2024

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

from laminas-db.

remicollet avatar remicollet commented on August 21, 2024

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.

from laminas-db.

Ocramius avatar Ocramius commented on August 21, 2024

Called it 😁 ( #240 (comment) )

TBH, I'm surprised that the test suite just crashes with an exit(0) - WTF?!

from laminas-db.

remicollet avatar remicollet commented on August 21, 2024

2 ex:

  • Laminas\Db\Adapter\Driver\Pdo\Pdo::formatParameterName may receive int (colum number ?), not only string
  • testToArrayCreatesArrayOfArraysRepresentingRows calls var_export($test, 1) so integer where bool is expected

So this package seems really NOT ready for strict_type....

from laminas-db.

Ocramius avatar Ocramius commented on August 21, 2024

Reverted in #242

from laminas-db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.