• Register
0 votes
200 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
1 answer 22 views
22 views
Problem: the csrf token is invalid. please try to resubmit the form.
asked Feb 17 Dan phillip 4.1k points
0 votes
0 answers 196 views
196 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 74 views
74 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 1.4K views
1.4K 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 8 views
8 views
Problem: I need to append this div to another div, but it gives me this error : Syntaxerror: json.parse: unexpected character at line 1 column 2 of the json data Any ideas?
asked Mar 22 ummesalma 21.8k points
0 votes
1 answer 582 views
582 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
1 answer 8 views
8 views
Problem: I am getting the error SyntaxError: Unexpected token C in JSON at position 0. I am also assuming that the error is related to the request.
asked Mar 16 ummesalma 21.8k points
0 votes
2 answers 41 views
41 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 34 views
0 votes
1 answer 73 views
73 views
Problem: org.json.jsonexception: value <br of type java.lang.string cannot be converted to jsonobject
asked Feb 18 Lucky Guy 1.5k points