Reputation: 860
I use Symfony2
in my project and switched to my branch EXAMPLE-123
in which some days ago. I integrated pagination with KnpPaginator
. When I just tried to deploy, I received the following message:
PHP Fatal error: Class 'Knp\Bundle\PaginatorBundle\KnpPaginatorBoundle' not found in AppKernel.php on line 16
Line 16 of AppKernel.php
says:
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
I have no clue why the bundle is not recognized, because in my PHP editor I can see all the bundle files in my vendor folder (vendor/knplabs/...
).
Another warning message that might be helpful for solving this problem: When in GIT I am in another branch and checkout to the EXAMPLE-123
branch, I get the message:
warning: unable to rmdir vendor/knplabs/knp-components: Directory not empty warning: unable to rmdir vendo
Blockquote
r/knplabs/knp-paginator-bundle/Knp/Bundle/PaginatorBundle:
Directory not empty
Who can make sense of this problem? How can I solve it?
Upvotes: 2
Views: 364
Reputation: 173562
The files under vendor/
aren't supposed to be tracked, i.e. it's supposed to be in your .gitignore
file. Instead, the composer
utility should be used to download the packages and install them.
In your case I would suggest to:
composer install
Upvotes: 1