KnpLabs / DoctrineBehaviors

Doctrine2 behavior traits that help handling Blameable, Loggable, Sluggable, SoftDeletable, Uuidable, Timestampable, Translatable, Tree behavior
http://knplabs.com
MIT License
911 stars 287 forks source link

Error with BlameableSubscriber when I try to make:migration #599

Closed bdurst42 closed 2 years ago

bdurst42 commented 3 years ago

I updated my packages with composer (Doctrine/Migrations => v3.0.1, knplabs/doctrine-behaviors => v2.0.7)

After the update I checked https://github.com/doctrine/DoctrineMigrationsBundle/blob/3.0.x/UPGRADE.md then I change my doctrine_migrations.yaml

before:

doctrine_migrations:
  dir_name: '%kernel.project_dir%/src/Migrations'
  namespace: DoctrineMigrations

after:

doctrine_migrations:
  migrations_paths:
    'DoctrineMigrations': '%kernel.project_dir%/src/Migrations'

  storage:
    table_storage:
      table_name: 'migration_versions'

Then I ran bin/console doctrine:migrations:sync-metadata-storage command and it worked without any issue

when I am trying to do php bin/console make:migration on my Linux/UNIX aws server I still have this error:

Expected to find class "Knp\DoctrineBehaviors\EventSubscriber\BlameableSubscriber" in file "/var/app/ondeck/vendor/knplabs/doctrine-behaviors/src/EventSubscriber/BlameableSubscriber.php" while importing services from resource "/var/app/ondeck/vendor/knplabs/doctrine-behaviors/config/../src", but it was not found! Check the namespace prefix used with the resource.

It's a Symfony 4 project.

I do not really know what to do. If you have some ideas I will be very grateful.

Have a nice day.

TomasVotruba commented 2 years ago

Hi, I'm going through old opended issues and PRs to cleanup too-long-opened items and close them. Thank you for your contribution and time.

We needs a feature with test and passing CI to be able to merge it without letting a bug in. If this is still relevant for you, please add code with test and make CI pass first. Then we'll able to merge your feature without further waiting :+1:

Thank for understanding.