AliceDataFixtures icon indicating copy to clipboard operation
AliceDataFixtures copied to clipboard

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

Open umpirsky opened this issue 4 years ago • 4 comments

 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.

umpirsky avatar Oct 05 '21 17:10 umpirsky

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

CedCannes avatar Nov 22 '21 14:11 CedCannes

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

alexislefebvre avatar Nov 22 '21 22:11 alexislefebvre

should be added to the dependency

sebheitzmann avatar Aug 16 '22 16:08 sebheitzmann

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 avatar Oct 01 '22 11:10 theofidry