Sunday, January 30, 2022

[FIXED] Composer update error while trying to install ccdn-forum-bundle Symfony2

Issue

first of all I would like to say that I'm relatively new to symfony and I work with Netbeans.

My first problem occurs when I'm trying to install ccdn-forum-bundle like it's said here:

https://github.com/codeconsortium/CCDNForumForumBundle/blob/master/Resources/doc/install.md

When I try to update-dev with composer I get this error:

[RuntimeException]
Failed to execute git status --porcelain --untracked-files=no
"git" is not recognized as an internal or external command, operable program or batch file.

It occurs when composer is trying to update friendsofsymfony/user-bundle and when I try to run my project I get this error from symfony:

ClassNotFoundException: Attempted to load class "MonologBundle" from namespace "Symfony\Bundle\MonologBundle" in C:\xampp\htdocs\PortalInternoHUPR\app\AppKernel.php line 14. Do you need to "use" it from another namespace?

I tryed to fix it by running install dev in composer, but then I get this other one:

Fatal error: Class 'Knp\Bundle\PaginatorBundle\KnpPaginatorBundle' not found in C:\xampp\htdocs\MyProject\app\AppKernel.php on line 23 Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception

[RuntimeException]
An error occurred when executing the ""cache:clear --no-warmup"" command.

Thanks.


Solution

Try not to use netbeans, and install the bundle directly from the prompt First check if git is correctly installed

 git –version

Then run

php composer.phar update

If that didn’t work for you, I suggest making a fresh install using --prefer-dist option

php composer.phar install --prefer-dist


Answered By - benaich

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.