• Register
0 votes
154 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

Please log in or register to answer this question.

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
0 answers 135 views
135 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, 2020 Raphael Pacheco 4.9k points
1 vote
1 answer 50 views
50 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, 2020 Martin K 6.6k points
0 votes
1 answer 1K views
1K 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, 2020 mphil 2.3k points
0 votes
1 answer 383 views
383 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
2 answers 27 views
27 views
Problem Hello Kodlogs, I am looking to store json data in mysql using php. How can I achieve this? Thanks
asked Nov 3, 2020 hashq 1.1k points
0 votes
1 answer 24 views
0 votes
1 answer 6 views
6 views
I was working on that. I just want to know how to do that?
asked Nov 30, 2020 TeamScript 9.2k points
0 votes
1 answer 32 views
32 views
Problem: I need to insert the json file to mysql table. I pasted my json file here for you to review so that someone can help me how to do this. { "Employees" : [ { "userId":"jmitchel", "jobTitle":"Developer", "firstName":"James", "lastName":"Mitchel", " ... ":"JosephSon", "jobTitle":"Program Directory", "firstName":"Joseph", "lastName":"Son", "emailAddress":"*Emails are not allowed*" } ] }
asked Nov 9, 2020 Reina Joy 360 points
0 votes
1 answer 12 views
12 views
I was working on that. I just want to know how to do that?
asked Nov 30, 2020 TeamScript 9.2k points
0 votes
1 answer 7 views
7 views
I was working on that. I just want to know how to do that?
asked Nov 30, 2020 TeamScript 9.2k points