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

accept arrays of entities #207

Closed
wants to merge 2 commits into from

Conversation

titiyoyo
Copy link
Contributor

linked to #206

Copy link
Owner

@theofidry theofidry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for much for the PR! Would it be possible to have a test for it as well? I think there should be a few fixtures available to serve as a base or examples

@titiyoyo
Copy link
Contributor Author

titiyoyo commented Mar 9, 2022

Sure, but I get an error while running make test

make[1]: Entering directory '/home/terence/Documents/projects/AliceDataFixtures'
docker-compose exec -T mysql mysql --user=root --password=password --port=3307 -e "DROP DATABASE IF EXISTS fidry_alice_data_fixtures; CREATE DATABASE fidry_alice_data_fixtures;"
mysql: [Warning] Using a password on the command line interface can be insecure.
make[1]: Leaving directory '/home/terence/Documents/projects/AliceDataFixtures'
vendor-bin/doctrine/bin/doctrine orm:schema-tool:create
PHP Fatal error:  Uncaught Error: Class "Doctrine\Common\Annotations\AnnotationRegistry" not found in /home/terence/Documents/projects/AliceDataFixtures/vendor-bin/doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php:165
Stack trace:
#0 /home/terence/Documents/projects/AliceDataFixtures/vendor-bin/doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Setup.php(75): Doctrine\ORM\Configuration->newDefaultAnnotationDriver()
#1 /home/terence/Documents/projects/AliceDataFixtures/tests/Bridge/Doctrine/autoload.php(23): Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration()
#2 /home/terence/Documents/projects/AliceDataFixtures/cli-config.php(40): require_once('...')
#3 /home/terence/Documents/projects/AliceDataFixtures/vendor-bin/doctrine/vendor/doctrine/orm/bin/doctrine.php(41): require('...')
#4 /home/terence/Documents/projects/AliceDataFixtures/vendor-bin/doctrine/vendor/doctrine/orm/bin/doctrine(4): include('...')
#5 /home/terence/Documents/projects/AliceDataFixtures/vendor-bin/doctrine/bin/doctrine(117): include('...')
#6 {main}
  thrown in /home/terence/Documents/projects/AliceDataFixtures/vendor-bin/doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Configuration.php on line 165
make: *** [Makefile:104: test_doctrine_bridge] Error 255

@alexislefebvre
Copy link
Contributor

alexislefebvre commented Mar 9, 2022

@titiyoyo doctrine/annotations was an indirect dependency, Doctrine dropped it, see #204. You can try to require it.

@titiyoyo
Copy link
Contributor Author

titiyoyo commented Mar 14, 2022

I get all sorts of errors when running make test, looks like the tests need some fixing
e.g

PHPUnit 9.5.18 #StandWithUkraine

Runtime:       PHP 8.1.3
Configuration: phpunit_doctrine.xml.dist

PHP Fatal error:  Trait "Nelmio\Alice\IsAServiceTrait" not found in /home/terence/Documents/projects/AliceDataFixtures/src/Bridge/Doctrine/Persister/ObjectManagerPersister.php on line 40
make: *** [Makefile:105: test_doctrine_bridge] Error 255

@titiyoyo
Copy link
Contributor Author

I pushed another commit

@titiyoyo
Copy link
Contributor Author

@theofidry is there something missing to this PR ?

@YoannJuhel
Copy link

@theofidry Is it possible to merge this PR soon ? We need this fix for migrating symfony from 5 to 6

@LoicBoursin
Copy link

Hello, I am having the exact same problem reported in the issue linked to this PR. Using the fix from titiyoyo, it worked perfectly, and I'll need it to upgrade to SF6. Thanks :)

@titiyoyo
Copy link
Contributor Author

do you see our comments @theofidry ?

@YoannJuhel
Copy link

any update of this ?

@theofidry
Copy link
Owner

Merged via #218. Thanks for the work!

@theofidry theofidry closed this Jul 2, 2022
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

Successfully merging this pull request may close these issues.

5 participants