Bonjour,
j’essaie de générer un nouveau bundle avec Symfony, mais j’ai toujours l’exception suivante :
1 2 | [Symfony\Component\Debug\Exception\FatalThrowableError] Parse error: syntax error, unexpected 'bundle' (T_STRING), expecting ',' or ')' |
J’ai déjà modifié la section autoload/psr-4 de mon fichier composer.json comme ceci :
1 2 3 | "psr-4": { "": "src/" } |
Et fait un composer dump-autoload, mais toujours la même chose… Voici toute l’exécution de la commande php bin/console generate:bundle :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | $ php bin/console generate:bundle Welcome to the Symfony bundle generator! Are you planning on sharing this bundle across multiple applications? [no]: Your application code must be written in bundles. This command helps you generate them easily. Give your bundle a descriptive name, like BlogBundle. Bundle name: PP/UserBundle In your code, a bundle is often referenced by its name. It can be the concatenation of all namespace parts but it's really up to you to come up with a unique name (a good practice is to start with the vendor name). Based on the namespace, we suggest PPUserBundle. Bundle name [PPUserBundle]: Bundles are usually generated into the src/ directory. Unless you're doing something custom, hit enter to keep this default! Target Directory [src/]: What format do you want to use for your generated configuration? Configuration format (annotation, yml, xml, php) [annotation]: yml Bundle generation [Symfony\Component\Debug\Exception\FatalThrowableError] Parse error: syntax error, unexpected 'bundle' (T_STRING), expecting ',' or ')' generate:bundle [--namespace NAMESPACE] [--dir DIR] [--bundle-name BUNDLE-NAME] [--format FORMAT] [--shared] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> |
Je n’arrive pas à comprendre le problème, d’autant plus que c’est le deuxième bundle que je génère. Je n’ai pas eu de problème pour la génération de mon premier bundle. Merci pour votre aide.
+0
-0