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

Incompatible with Symfony 5.1 #14

Closed
codercms opened this issue Oct 9, 2020 · 5 comments
Closed

Incompatible with Symfony 5.1 #14

codercms opened this issue Oct 9, 2020 · 5 comments

Comments

@codercms
Copy link

codercms commented Oct 9, 2020

composer require pixelfederation/doctrine-resettable-em-bundle

Using version ^1.3 for pixelfederation/doctrine-resettable-em-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.1.*"

Prefetching 2 packages
  - Downloading (100%)

Package operations: 2 installs, 0 updates, 0 removals
  - Installing symfony/orm-pack (v1.0.8): Loading from cache
  - Installing pixelfederation/doctrine-resettable-em-bundle (1.3.6): Loading from cache
Writing lock file
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
92 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Symfony operations: 1 recipe (30736602cb4f3d478bef5cbea42fc02a)
  - Configuring pixelfederation/doctrine-resettable-em-bundle (>=1.3.6): From auto-generated recipe
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!
!!   // Clearing the cache for the prod environment with debug false
!!
!!  10:50:16 CRITICAL  [php] Uncaught Error: Argument 3 passed to PixelFederation\DoctrineResettableEmBundle\ORM\ResettableEntityManager::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\DoctrineBundle\Registry given, called in dashboard\var\cache\pro_\ContainerFvxnRbY\getDoctrine_Orm_DefaultEntityManagerService.php on line 20 ["exception" => TypeError { …}]
!!
!!  In ResettableEntityManager.php line 43:
!!

!!    Argument 3 passed to PixelFederation\DoctrineResettableEmBundle\ORM\ResettableEntityManager::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\DoctrineBundle\Registry given, called in dashboard\var\cache\pro_\ContainerFvxnRbY\getDoctrine_Orm_DefaultEntityManagerService.php on line 20

!!

!!
!!  cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
!!
!!
Script @auto-scripts was called via post-update-cm
Rastusik pushed a commit that referenced this issue Oct 9, 2020
@Rastusik
Copy link
Contributor

Rastusik commented Oct 9, 2020

hi @codercms ! Thank you for the bug report. Unfortunately I'm not able to reproduce this issue even after updated composer.json to the newest library versions. Could you please show me which doctrine libraries versions you are using? Are you using any class overrides for doctrine? especially for the <parameter key="doctrine.class">Doctrine\Bundle\DoctrineBundle\Registry</parameter> parameter?
I've pushed a possible fix to the branch 14_possible_fix. Could you please test it? Thanks!

@Rastusik Rastusik pinned this issue Oct 9, 2020
@codercms
Copy link
Author

codercms commented Oct 9, 2020

@Rastusik hi! Just tested this branch, it fixed the problem. No, I am not using doctrine class overriding.
dbal.xml

<parameter key="doctrine.class">Doctrine\Bundle\DoctrineBundle\Registry</parameter>

App_KernelDevDebugContainer:

<parameter key="doctrine.class">Doctrine\Bundle\DoctrineBundle\Registry</parameter>

Information about my Doctrine libraries version from Composer:

doctrine/annotations                          1.10.4                      Docblock Annotations Parser
doctrine/cache                                1.10.2                      PHP Doctrine Cache library is a popular cache implementation that supports many different drivers suc...
doctrine/collections                          1.6.7                       PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common                               3.0.2                       PHP Doctrine Common project is a library that provides additional functionality that other Doctrine p...
doctrine/data-fixtures                        1.4.4                       Data Fixtures for all Doctrine Object Managers
doctrine/dbal                                 2.11.1                      Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection a...
doctrine/doctrine-bundle                      2.1.2                       Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle             3.3.2                       Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle           3.0.1                       Symfony DoctrineMigrationsBundle
doctrine/event-manager                        1.1.1                       The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Do...
doctrine/inflector                            1.4.3                       PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/...
doctrine/instantiator                         1.3.1                       A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                                1.2.1                       PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                           3.0.1                       PHP Doctrine Migrations project offer additional functionality on top of the database abstraction lay...
doctrine/orm                                  v2.7.3                      Object-Relational-Mapper for PHP
doctrine/persistence                          2.0.0                       The Doctrine Persistence project is a set of shared interfaces and functionality that the different D...
doctrine/reflection                           1.2.1                       The Doctrine Reflection project is a simple library used by the various Doctrine projects which adds ...
doctrine/sql-formatter                        1.1.1                       a PHP SQL highlighting library

@Rastusik
Copy link
Contributor

Rastusik commented Oct 9, 2020

cool, thanks for the update, I will release the fix soon

@Rastusik Rastusik mentioned this issue Oct 9, 2020
Rastusik pushed a commit that referenced this issue Oct 12, 2020
@codercms
Copy link
Author

@Rastusik thanks for the release with fix, I guess we can close this issue?

@Rastusik
Copy link
Contributor

sure, I just forgot :) thanks for reminding me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants