Skip to content
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

Symfony 7 compatibility and configureSchema #52

Closed
nclavaud opened this issue Mar 20, 2024 · 7 comments · Fixed by #54
Closed

Symfony 7 compatibility and configureSchema #52

nclavaud opened this issue Mar 20, 2024 · 7 comments · Fixed by #54
Labels
Bug Something isn't working
Milestone

Comments

@nclavaud
Copy link
Contributor

Hey @trompette 🎺

Depuis qu'on a migré sur Symfony 7, dès lors qu'on génère une migration Doctrine, les tables feature_toggles_* posent problème : la migration essaie de les supprimer.

J'ai l'impression que configureSchema() a changé de signature, est-ce que ça pourrait venir de là ?

Voir par exemple:
symfony/doctrine-bridge@8d94f11

Est-ce que tu utilises toujours ce bundle ? Nous oui 😅

@trompette
Copy link
Owner

Salut @nclavaud !

En regardant vite fait, je ne pense pas que ce soit lié à configureSchema() car Je me suis cablé directement à un event de Doctrine ORM:

public function postGenerateSchema(GenerateSchemaEventArgs $eventArgs): void

Mais c'est pas impossible que la sémantique de GenerateSchemaEventArgs ait changé avec la version 3 de Doctrine ORM...

Il va falloir que je creuse !

@nclavaud
Copy link
Contributor Author

nclavaud commented Mar 21, 2024

Pour info, on est toujours sur doctrine/orm@v2, par contre on a upgrade symfony/doctrine-bridge de v6.4.5 à v7.0.5.

@trompette
Copy link
Owner

trompette commented Mar 21, 2024

Et vous êtes sur quelle version de doctrine/dbal ?

Comme tu peux voir sur ma PR d'hier, les tests ne passent plus avec la version 4.0 :

D'ailleurs l'API change tellement que ça fait même planter PHPStan !

@nclavaud
Copy link
Contributor Author

nclavaud commented Mar 22, 2024

On est encore sur doctrine/dbal 3.8.3 🤔

514sid/num                              v2.1.0
algolia/algoliasearch-client-php        3.4.1
aws/aws-crt-php                         v1.2.4
aws/aws-sdk-php                         3.301.4
beberlei/assert                         v3.3.2
behat/transliterator                    v1.5.0
brick/math                              0.11.0
carbonphp/carbon-doctrine-types         2.1.0
cocur/slugify                           v4.5.1
composer/package-versions-deprecated    1.11.99.5
dflydev/dot-access-data                 v3.0.2
doctrine/cache                          2.2.0
doctrine/collections                    2.2.1
doctrine/common                         3.4.3
doctrine/dbal                           3.8.3
doctrine/deprecations                   1.1.3
doctrine/doctrine-bundle                2.12.0
doctrine/doctrine-migrations-bundle     3.3.0
doctrine/event-manager                  2.0.0
doctrine/inflector                      2.0.10
doctrine/instantiator                   2.0.0
doctrine/lexer                          3.0.1
doctrine/migrations                     3.7.4
doctrine/orm                            2.19.2
doctrine/persistence                    3.3.2
doctrine/sql-formatter                  1.2.0
egulias/email-validator                 4.0.2
ergebnis/clock                          2.8.0
ezyang/htmlpurifier                     v4.17.0
firebase/php-jwt                        v6.10.0
gedmo/doctrine-extensions               v3.15.0
getbrevo/brevo-php                      v2.0.0
google/apiclient                        v2.15.3
google/apiclient-services               v0.340.0
google/auth                             v1.37.0
guzzlehttp/guzzle                       7.8.1
guzzlehttp/promises                     2.0.2
guzzlehttp/psr7                         2.6.2
illuminate/collections                  v11.0.7
illuminate/conditionable                v11.0.7
illuminate/contracts                    v11.0.7
illuminate/encryption                   v11.0.7
illuminate/macroable                    v11.0.7
illuminate/support                      v11.0.7
league/commonmark                       2.4.2
league/config                           v1.2.0
league/csv                              9.15.0
league/flysystem                        3.25.1
league/flysystem-aws-s3-v3              3.25.1
league/flysystem-bundle                 3.3.2
league/flysystem-local                  3.25.1
league/mime-type-detection              1.15.0
league/period                           5.3.1
martin-georgiev/postgresql-for-doctrine v2.4.1
mjaschen/phpgeo                         5.0.0
moneyphp/money                          v4.5.0
monolog/monolog                         3.5.0
mtdowling/jmespath.php                  2.7.0
nesbot/carbon                           3.1.1
nette/schema                            v1.3.0
nette/utils                             v4.0.4
paragonie/constant_time_encoding        v2.6.3
paragonie/random_compat                 v9.99.100
pentatrion/vite-bundle                  v6.4.3
phpdocumentor/reflection-common         2.2.0
phpdocumentor/reflection-docblock       5.3.0
phpdocumentor/type-resolver             1.8.2
phpseclib/phpseclib                     3.0.37
phpstan/phpdoc-parser                   1.26.0
psr/cache                               3.0.0
psr/clock                               1.0.0
psr/container                           2.0.2
psr/event-dispatcher                    1.0.0
psr/http-client                         1.0.3
psr/http-factory                        1.0.2
psr/http-message                        2.0
psr/link                                2.0.1
psr/log                                 3.0.0
psr/simple-cache                        3.0.0
ralouphie/getallheaders                 3.0.3
stof/doctrine-extensions-bundle         v1.11.0
symfony/asset                           v7.0.3
symfony/brevo-mailer                    v7.0.5
symfony/cache                           v7.0.4
symfony/cache-contracts                 v3.4.0
symfony/clock                           v7.0.5
symfony/config                          v7.0.4
symfony/console                         v7.0.4
symfony/dependency-injection            v7.0.4
symfony/deprecation-contracts           v3.4.0
symfony/doctrine-bridge                 v7.0.5
symfony/doctrine-messenger              v7.0.4
symfony/dotenv                          v7.0.4
symfony/error-handler                   v7.0.4
symfony/event-dispatcher                v7.0.3
symfony/event-dispatcher-contracts      v3.4.0
symfony/expression-language             v7.0.3
symfony/filesystem                      v7.0.3
symfony/finder                          v7.0.0
symfony/flex                            v2.4.5
symfony/form                            v7.0.4
symfony/framework-bundle                v7.0.4
symfony/http-client                     v7.0.5
symfony/http-client-contracts           v3.4.0
symfony/http-foundation                 v7.0.4
symfony/http-kernel                     v7.0.5
symfony/intl                            v7.0.3
symfony/mailer                          v7.0.4
symfony/messenger                       v7.0.4
symfony/mime                            v7.0.3
symfony/monolog-bridge                  v7.0.3
symfony/monolog-bundle                  v3.10.0
symfony/notifier                        v7.0.3
symfony/options-resolver                v7.0.0
symfony/password-hasher                 v7.0.4
symfony/polyfill-intl-grapheme          v1.29.0
symfony/polyfill-intl-idn               v1.29.0
symfony/polyfill-intl-normalizer        v1.29.0
symfony/polyfill-php83                  v1.29.0
symfony/polyfill-uuid                   v1.29.0
symfony/process                         v7.0.4
symfony/property-access                 v7.0.4
symfony/property-info                   v7.0.3
symfony/routing                         v7.0.5
symfony/runtime                         v7.0.3
symfony/security-bundle                 v7.0.5
symfony/security-core                   v7.0.3
symfony/security-csrf                   v7.0.3
symfony/security-http                   v7.0.4
symfony/serializer                      v7.0.4
symfony/service-contracts               v3.4.1
symfony/stopwatch                       v7.0.3
symfony/string                          v7.0.4
symfony/translation                     v7.0.4
symfony/translation-contracts           v3.4.1
symfony/twig-bridge                     v7.0.4
symfony/twig-bundle                     v7.0.4
symfony/uid                             v7.0.3
symfony/validator                       v7.0.5
symfony/var-dumper                      v7.0.4
symfony/var-exporter                    v7.0.4
symfony/web-link                        v7.0.3
symfony/yaml                            v7.0.3
symfonycasts/reset-password-bundle      v1.21.0
trompette/feature-toggles               4.0.0
twig/extra-bundle                       v3.8.0
twig/intl-extra                         v3.8.0
twig/markdown-extra                     v3.8.0
twig/twig                               v3.8.0
voku/portable-ascii                     2.0.1
webmozart/assert                        1.11.0
workos/workos-php                       v4.3.0

@trompette
Copy link
Owner

trompette commented Mar 22, 2024

Ah du coup, je crois que je tiens un truc !

J'utilise un subscriber pour altérer le Schema DBAL à la volée :

->addTag('doctrine.event_subscriber')

Or dans la documentation de mise à jour vers Symfony 7, on peut lire :

Remove support for Doctrine subscribers in ContainerAwareEventManager, use listeners instead

@trompette trompette added the Bug Something isn't working label Mar 23, 2024
@trompette trompette added this to the 5.0.0 milestone Mar 23, 2024
@trompette
Copy link
Owner

Ça devrait mieux fonctionner avec la Version 5.0.0 ! 😉

@nclavaud
Copy link
Contributor Author

@trompette Je confirme que ça marche nickel désormais, merci beaucoup ! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants