Closed jdecool closed 5 years ago
Thanks for the report! I'm working on it, weird problem.
fc18ef0ea778ad90439b5838e4cb76aafd6e0000 should fix the problem. Can you try the master version @jdecool?
Another workaround is to install symfony/property-access
.
That's really strange.
If I try this :
$ composer create-project "symfony/skeleton:dev-master" my-project 4.0.0-RC1
$ cd my-project/
$ composer require orm
$ composer require "dunglas/doctrine-json-odm:dev-master"
# Then I register the bundle into `config/bundles.php` because it was not detected by Flex
$ bin/console cache:clear
I've got the same error.
But when I explicitly require symfony/property-access
, it works.
With symfony 4 I had to add symfony/property-info too
So manually :
After some investigations, I'm not sure this an issue of the bundle.
This is why :
$ composer create-project "symfony/skeleton:dev-master" my-project
$ cd my-project/
$ composer require orm
$ composer require "dunglas/doctrine-json-odm:dev-master"
# Then I register the bundle into `config/bundles.php` because it was not detected by Flex
$ bin/console cache:clear
Here I've the issue You have requested a non-existent service "dunglas_doctrine_json_odm.serializer".
.
But simply do composer install
, this change nothing for the Composer configuration and installed packages, but the error disapear.
@dunglas: Your fix works well as long I am using the symfony dev
environment. But if I switched to prod
I getting the same error again:
bin/console cache:clear -e=prod
You have requested a non-existent service "dunglas_doctrine_json_odm.serializer".
UPDATE: I was able to solve this issue by deleting the var/cache/prod folder manually.
I guess this is resolved in the meantime? At least I can use it with Flex just fine. Let me know if the issue must be reopened.
@jdecool noted the same error for me to in symfony6.1 and the above solutions are not solved me.
I try to use this library on a fresh project using SYmfony4/Flex.
I've an error
You have requested a non-existent service "dunglas_doctrine_json_odm.serializer"
on my project after install the package with Composer.Step to reproduce :