fix - Créer une entity avec annotation

pour résoudre cette erreur, il faut les annotations

[ERROR] Only annotation mapping is supported by make:entity, but the <info>App\Entity\Book</info> class uses a
         different format. If you would like this command to generate the properties & getter/setter methods, add your
         mapping configuration, and then re-run this command with the <info>--regenerate</info> flag.

installation de maker bundle

composer require symfony/maker-bundle --dev

install du patch :

composer require cweagans/composer-patches

puis appliquer le patch dans composer.json

{
    // {...} composer.json content
    "extra": {
        "patches": {
            "symfony/maker-bundle": {
                "Provide flag to force annotation in make entity command": "https://raw.githubusercontent.com/vklux/maker-bundle-force-annotation/master/maker-force-annotation-flag.patch"
            }
        }
    }
}

composer update

puis utiliser la commande

bin/console make:entity --force-annotation

source: https://github.com/vklux/maker-bundle-force-annotation