1
1
1alexandr2015-03-23 18:19:19
symfony
1alexandr, 2015-03-23 18:19:19

symfony2. How to specify the correct path to the bundle?

Hello dear experts. I installed LiuggioExcelBundle. On the local machine, everything works as it should, but on the hosting there is such an error

Attempted to load class "LiuggioExcelBundle" from namespace "Liuggio\ExcelBundle".
Did you forget a "use" statement for another namespace?

What could be the problem? I installed bundles before, updated the repository on the hosting and this has never happened, please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Pavlov, 2015-03-23
@1alexandr

how do you transfer project files to prod? Through git? Is the vendor added to the repository?
Maybe composer needs to update autoload. Do a command in console
composer not required to install. It's just a php file, only zipped - in phar format. To install locally, you need to run the following command in the console:
This command will download the composer and put it in a composer.phar file in the current folder. (for more details, see composer's documentation - https://getcomposer.org/doc/00-intro.md )
In the future, to launch, use the command php composer.phar <команда>
It's best to manage vendors with composer on both dev and prod.
On your local machine, you use the command composer updateto install new packages and upgrade existing ones. When upgrading, all installed packages are stored in the composer.lock file, which stores information about the installed versions of each package.
You add the composer.json and composer.lock files to the repository, and you do not need to add the vendor folder to the repository. On the prod server, to install vendors, you need to run the commandphp composer.phar install, which will take the required package versions from composer.lock and install them in the vendor folder, as well as update the autoload file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question