New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update egulias/email-validator to 4.0.1 and bump multiple doctrine deps #33459
Conversation
07d4bd9
to
0633225
Compare
e5c0370
to
7a928ed
Compare
@@ -110,7 +110,7 @@ private function createAnnotationMappingDriver($moduleNamespace, $moduleEntityDi | |||
$driverDefinition->addMethodCall('addExcludePaths', [[$indexFile]]); | |||
} | |||
|
|||
return new DoctrineOrmMappingsPass($driverDefinition, [$moduleNamespace], [], false, [$modulePrefix => $moduleNamespace]); | |||
return new DoctrineOrmMappingsPass($driverDefinition, [$moduleNamespace], [], false, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'addEntityNamespace' function of doctrine ORM Configuration is deprecated and gives an error. See doctrine/orm#8818 and https://github.com/doctrine/DoctrineBundle/blob/29876aef5778af89c6bd18e88d0c5b9b8873dae2/DependencyInjection/Compiler/DoctrineOrmMappingsPass.php#L51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so we can't define namespaces for modules' entities? Does it mean module also need to adapt how they use Doctrine entities? If so this will have to be documented in the BC breaks as well
7a928ed
to
7c3ea46
Compare
->setParameter(":$column", $value, $arrayType) | ||
->setParameter($column, $value, $arrayType) | ||
; | ||
} else { | ||
$qb | ||
->andWhere("$column = :$column") | ||
->setParameter(":$column", $value) | ||
->setParameter($column, $value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how it worked before. I had an error Named parameter "id_product" does not have a bound value.
after update, in https://github.com/doctrine/dbal/blob/195aad31e9596e4093d417583f98342b6f0ec986/src/ArrayParameters/Exception/MissingNamedParameter.php#L11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep the comma should only be added in the where, that was a mistake Maybe before Doctrine automatically understood it for some weird reason 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @M0rgan01
Thanks for your PR 🚀
Unfortunately, the auto tests are broken caused by this issue:
Thanks @Progi1984 for the screenshot 🙏
Here's the link: https://github.com/hibatallahAouadni/testing_pr/actions/runs/6042014563
Please check and feedback.
Thanks!
I created a PR that modified the UI tests a little PrestaShop/ga.tests.ui.pr#47
Edit: an error in the dump export so new run here https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/6108846839 |
60565c4
to
f0b76b5
Compare
6c1985f
to
7c42d9b
Compare
doctrine/dbal from 2.13.8 to 3.6.5
doctrine/deprecations from 0.5.3 to 1.1.1
doctrine/lexer from 1.2.3 to 2.1.0
doctrine/orm from 2.12.1 to 2.14.3
Update details
Module prefix
We can no longer access module entities with a prefix like:
$entityManager->find('MyModule:Entity', $id);
$entityManager->createQuery('SELECT u FROM MyModule:Entity');
See doctrine/orm#8818
Exhaustive list of changes made following the DBAL doctrine update
Statement->execute()
now return Result instant of StatementStatement->closeCursor()
is nowResult->free()
Doctrine\DBAL\DBALException
is nowDoctrine\DBAL\Exception
QueryBuilder->setFirstResult()
no longer allow null values (adding type)Connection->getWrappedConnection()->inTransaction()
move inConnection->getNativeConnection()->inTransaction()
Statement->execute()
become:Statement->executeQuery()
for 'Select'Statement->executeStatement()
for 'Delete', 'Update' or 'Insert'Result->fetchAll()
is nowResult->fetchAllAssociative()
Result->fetchAll(PDO::FETCH_COLUMN)
is nowResult->fetchFirstColumn()
Result->fetch()
is nowResult->fetchAssociative()
Result->fetch(PDO::FETCH_COLUMN)
is nowResult->fetchOne()