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 "gedmo.listener.softdeleteable" has a dependency on a non-existent service "annotation_reader". #2780

Open
sliwek opened this issue Mar 19, 2024 · 2 comments · May be fixed by #2797

Comments

@sliwek
Copy link

sliwek commented Mar 19, 2024

Environment

Package

show

$ composer show --latest gedmo/doctrine-extensions
name     : gedmo/doctrine-extensions
descrip. : Doctrine behavioral extensions
keywords : Blameable, behaviors, doctrine, extensions, gedmo, loggable, nestedset, odm, orm, sluggable, sortable, timestampable, translatable, tree, uploadable
versions : * v3.15.0
released : 2024-02-12, 1 month ago
latest   : v3.15.0 released 2024-02-12, 1 month ago
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage : http://gediminasm.org/
source   : [git] https://github.com/doctrine-extensions/DoctrineExtensions.git 2a89103f4984d8970f3855284c8c04e6e6a63c0f
dist     : [zip] https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/2a89103f4984d8970f3855284c8c04e6e6a63c0f 2a89103f4984d8970f3855284c8c04e6e6a63c0f
path     : /var/www/microservices/file_manager/vendor/gedmo/doctrine-extensions
names    : gedmo/doctrine-extensions

support
email : gediminas.morkevicius@gmail.com
issues : https://github.com/doctrine-extensions/DoctrineExtensions/issues
source : https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.15.0
wiki : https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc

autoload
psr-4
Gedmo\ => src/

requires
behat/transliterator ^1.2
doctrine/collections ^1.2 || ^2.0
doctrine/common ^2.13 || ^3.0
doctrine/deprecations ^1.0
doctrine/event-manager ^1.2 || ^2.0
doctrine/persistence ^2.2 || ^3.0
php ^7.4 || ^8.0
psr/cache ^1 || ^2 || ^3
psr/clock ^1
symfony/cache ^5.4 || ^6.0 || ^7.0

requires (dev)
doctrine/annotations ^1.13 || ^2.0
doctrine/cache ^1.11 || ^2.0
doctrine/dbal ^3.2
doctrine/doctrine-bundle ^2.3
doctrine/mongodb-odm ^2.3
doctrine/orm ^2.14.0
friendsofphp/php-cs-fixer ^3.14.0
nesbot/carbon ^2.71 || ^3.0
phpstan/phpstan ^1.10.2
phpstan/phpstan-doctrine ^1.0
phpstan/phpstan-phpunit ^1.0
phpunit/phpunit ^9.6
rector/rector ^0.19
symfony/console ^5.4 || ^6.0 || ^7.0
symfony/phpunit-bridge ^6.0 || ^7.0
symfony/yaml ^5.4 || ^6.0 || ^7.0

suggests
doctrine/mongodb-odm to use the extensions with the MongoDB ODM
doctrine/orm to use the extensions with the ORM

conflicts
doctrine/annotations <1.13 || >=3.0
doctrine/dbal <3.2 || >=4.0
doctrine/mongodb-odm <2.3 || >=3.0
doctrine/orm <2.14.0 || 2.16.0 || 2.16.1 || >=3.0

Doctrine packages

show

$ composer show --latest 'doctrine/*'
Direct dependencies required in composer.json:
doctrine/doctrine-bundle            2.12.0 2.12.0 Symfony DoctrineBundle
doctrine/doctrine-migrations-bundle 3.3.0  3.3.0  Symfony DoctrineMigrationsBundle
doctrine/orm                        2.19.2 3.1.0  Object-Relational-Mapper for PHP

Transitive dependencies not required in composer.json:
doctrine/cache                      2.2.0  2.2.0  PHP Doctrine Cache library is a popular cache implementation th...
doctrine/collections                2.2.1  2.2.1  PHP Doctrine Collections library that adds additional functiona...
doctrine/common                     3.4.3  3.4.3  PHP Doctrine Common project is a library that provides addition...
doctrine/dbal                       3.8.3  4.0.1  Powerful PHP database abstraction layer (DBAL) with many featur...
doctrine/deprecations               1.1.3  1.1.3  A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR...
doctrine/event-manager              2.0.0  2.0.0  The Doctrine Event Manager is a simple PHP event system that wa...
doctrine/inflector                  2.0.10 2.0.10 PHP Doctrine Inflector is a small library that can perform stri...
doctrine/instantiator               2.0.0  2.0.0  A small, lightweight utility to instantiate objects in PHP with...
doctrine/lexer                      3.0.1  3.0.1  PHP Doctrine Lexer parser library that can be used in Top-Down,...
doctrine/migrations                 3.7.4  3.7.4  PHP Doctrine Migrations project offer additional functionality ...
doctrine/persistence                3.3.2  3.3.2  The Doctrine Persistence project is a set of shared interfaces ...
doctrine/sql-formatter              1.2.0  1.2.0  a PHP SQL highlighting library

PHP version

$ php -v
PHP 8.2.16 (cli) (built: Feb 16 2024 23:49:46) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.16, Copyright (c), by Zend Technologies
    with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

Subject

After upgrading to symfony 6.4, I get this error: The service "gedmo.listener.softdeleteable" has a dependency on a non-existent service "annotation_reader".

When will the package use attributes?
Is the only option to use composer require doctrine/annotations?

@mbabker
Copy link
Contributor

mbabker commented Mar 19, 2024

This package does support attributes and has for a while. Remove the setAnnotationReader call in your service definition and the package can work out whether it should default to annotations or attributes when an explicit reader isn't provided, or make a service in your app for the Gedmo\Mapping\Driver\AttributeReader and pass that into those setAnnotationReader calls in your service configs.

@mbabker
Copy link
Contributor

mbabker commented Apr 29, 2024

#2797 expands the documentation a bit to cover using the attribute reader.

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