• Register
0 votes
84 views

Problem :

Currently I am learning Symfony. I am trying to use the "php bin/console generate:bundle" command to create the bundle but even after leaving everything by default I always face below error:

The command was not able to configure everything automatically. You'll need to make the following changes manually. Edit the composer.json file and register the bundle namespace in the "autoload" section:

I leave everything by default means I just enter a bundle name and after that I just keep pressing the enter until that process ends.

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I also had encountered above error in the symfony 3.4.4. I just used this role in the composer.json and after I changed my composer.json file as shown below then magically all my problem were fixed

The below is the code in my composer.json file before making any changes to it

"autoload": {
    "psr-4": {
        "AppBundle\\": "src/AppBundle"
    },
    "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},

The below is the code in my composer.json file after making the required changes in it

"autoload": {
     "classmap": [
       "app/AppKernel.php",
       "app/AppCache.php"
     ],
 "psr-4": {
 "": "src/"
 }
 },

After making the above changes I just executed the below command

 cmd $ composer dump-autoload.

I hope it fixes your problems too.

5 2 1
4,980 points

Related questions

0 votes
1 answer 268 views
268 views
Problem : I have spent over the 10 hours in finding the exception or the special character to find in the code but I am unable to find it. I have already checked every similar messages in here. I am facing below error: Syntaxerror: json.parse: unexpected character at line 1 ... my form after that I am sending all the inputs to the main.js to validate it. So, I am just looking for the third-eye.
asked Dec 23, 2019 alecxe 7.5k points
0 votes
0 answers 78 views
78 views
Problem: I have elementary knowledge of php, symphony, fosuserbundle. I am currently trying to update the doctrine schema after the installation of FOSUser Bundle 2.0 but since then I keep getting below error: In ArrayNode.php line 238: The child node " ... the steps accurately from the online tutorial. Still I am facing the same error. Any clues in fixing above fosuserbundle related error?
asked Jun 16 Raphael Pacheco 4.9k points
1 vote
1 answer 33 views
33 views
Problem : I am very new to FOS user bundle. Currently I am facing a big problem related to installing FOS user bundle. I have already tried to search for its fix everywhere but still unable to find the fix' I have already created the entity which is called as ... : AppBundle\Entity\Admin Above error have wasted a lot of my time. So now looking for expert who can fix the FOS related error.
asked May 20 Martin K 6.6k points
0 votes
1 answer 667 views
667 views
Problem : I am facing following error "500 Internal Server Error - LogicException: Unable to guess how to get a Doctrine instance from the request information". Below is my controller action definition: /** * @Route("/gatheractor/{actor_name}/{gather_id}") * @Template() */ public function createActorAction(Actor $actor, Gather $gather) { // ... } How can I fix the above error?
asked Feb 18 mphil 2.3k points