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

The service "nelmio_alice.property_accessor.std" has a dependency on a non existent service "property_accessor". #180

Open
umpirsky opened this issue Oct 5, 2021 · 4 comments
Labels

Comments

@umpirsky
Copy link

umpirsky commented Oct 5, 2021

 composer require --dev theofidry/alice-data-fixtures \
                       doctrine-orm \
                       doctrine/data-fixtures
Using version ^1.4 for theofidry/alice-data-fixtures
Using version ^2.1 for symfony/orm-pack
Using version ^1.5 for doctrine/data-fixtures
./composer.json has been updated
Running composer update theofidry/alice-data-fixtures symfony/orm-pack doctrine/data-fixtures
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.3.*"
Updating dependencies
Lock file operations: 12 installs, 0 updates, 0 removals
  - Locking doctrine/data-fixtures (1.5.1)
  - Locking fakerphp/faker (v1.16.0)
  - Locking myclabs/deep-copy (1.10.2)
  - Locking nelmio/alice (v3.8.2)
  - Locking sebastian/comparator (4.0.6)
  - Locking sebastian/diff (4.0.4)
  - Locking sebastian/exporter (4.0.3)
  - Locking sebastian/recursion-context (4.0.4)
  - Locking symfony/orm-pack (v2.1.0)
  - Locking symfony/property-access (v5.3.8)
  - Locking symfony/property-info (v5.3.8)
  - Locking theofidry/alice-data-fixtures (1.4.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 11 installs, 0 updates, 1 removal
  - Downloading fakerphp/faker (v1.16.0)
  - Downloading myclabs/deep-copy (1.10.2)
  - Downloading sebastian/recursion-context (4.0.4)
  - Downloading sebastian/exporter (4.0.3)
  - Downloading sebastian/diff (4.0.4)
  - Downloading sebastian/comparator (4.0.6)
  - Downloading symfony/orm-pack (v2.1.0)
  - Downloading symfony/property-info (v5.3.8)
  - Downloading symfony/property-access (v5.3.8)
  - Downloading nelmio/alice (v3.8.2)
  - Downloading theofidry/alice-data-fixtures (1.4.0)
  - Removing doctrine/doctrine-fixtures-bundle (3.4.0)
  - Installing fakerphp/faker (v1.16.0): Extracting archive
  - Installing myclabs/deep-copy (1.10.2): Extracting archive
  - Installing sebastian/recursion-context (4.0.4): Extracting archive
  - Installing sebastian/exporter (4.0.3): Extracting archive
  - Installing sebastian/diff (4.0.4): Extracting archive
  - Installing sebastian/comparator (4.0.6): Extracting archive
  - Installing symfony/orm-pack (v2.1.0): Extracting archive
  - Installing symfony/property-info (v5.3.8): Extracting archive
  - Installing symfony/property-access (v5.3.8): Extracting archive
  - Installing nelmio/alice (v3.8.2): Extracting archive
  - Installing theofidry/alice-data-fixtures (1.4.0): Extracting archive
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
57 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Symfony operations: 2 recipes (f46df0c64d1865fa0e5b9823fd95c385)
  - Configuring nelmio/alice (>=3.2): From github.com/symfony/recipes:master
  - Configuring theofidry/alice-data-fixtures (>=1.0): From github.com/symfony/recipes:master
Unpacking Symfony packs
  - Unpacked symfony/orm-pack
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 0 updates, 1 removal
  - Removing symfony/orm-pack (v2.1.0)
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
!!                                                                                 
!!    The service "nelmio_alice.property_accessor.std" has a dependency on a non-  
!!    existent service "property_accessor". Did you mean this: "nelmio_alice.prop  
!!    erty_accessor.std"?                                                          
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
@CedCannes
Copy link

I got the same message, so I added symfony/property-access to the composer require

@alexislefebvre
Copy link
Contributor

We had a similar issue and we fixed it by enabling property_access: ~ in the configuration: https://github.com/liip/LiipTestFixturesBundle/pull/130/files#diff-08d22d90f97017739fe1d8a0319928f3c65f836c4db96ab13aeae7c640be073d

@sebheitzmann
Copy link

should be added to the dependency

@theofidry
Copy link
Owner

This is not a problem of dependency, nelmio/alice has a require on symfony/property-access. The problem is trying to get the property_access service which is not registered if framework_bundle.property_access is not enabled.

So this likely requires to check the framework bundle configuration in the bundle and throw a more user-friendly error.

@theofidry theofidry added the bug label Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants