Hi there,
I am trying to install suitecrm with the php composer extension integrated in the plesk web hosting control panel.
I ran into a problem and want to make sure whether it is with suitecrm or with a vendor package or with plesk.
Problem: the installations fail with the error:
Symfony\Component\ErrorHandler\Error\ClassNotFoundError {#86
The autoloader expected class "ApiPlatform\Core\Bridge\Symfony\Bundle\DependencyInjection\ApiPlatformExtension" to be defined in
file "<webroot>/suitecrm/vendor/composer/../api-platform/core/src/Core/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php".
The file was found but the class was not in it, the class name or namespace probably has a typo.
In the file …api-platform/core/src/Core/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php,
declare(strict_types=1);
namespace ApiPlatform\Core\Bridge\Symfony\Bundle\DependencyInjection;
class_exists(\ApiPlatform\Symfony\Bundle\DependencyInjection\ApiPlatformExtension::class);
if (false) {
final class ApiPlatformExtension extends \ApiPlatform\Symfony\Bundle\DependencyInjection\ApiPlatformExtension
{
}
}
What I did before: git clone the folder, set permissions:
cd mywebroot/
find . -type d -not -perm 2755 -exec chmod 2755 {} ;
find . -type f -not -perm 0644 -exec chmod 0644 {} ;
cd suitecrm/
chmod +x bin/console
It seems to me that the apiplatform package is used only for require-dev development purposes; however, the plesk extension makes sure that all dependencies are resolvable and so will complain that classes are not found if the development packages are not installed. So I assume that by necessity I will need to make sure that everything resolves correctly.
Any suggestion where the problem might lie?
Thank you
Julia
Hi @pgr, thanks for your reply. I would prefer git to pull future changes automatically. And in this case I need to run composer to populate the vendors.
thanks for the hint,
I fixed the webroot to suitecrm/public/ before running composer.
However I still receive a symfony exception: Symfony\Component\ErrorHandler\Error\ ClassNotFoundError
Attempted to load class “DoctrineFixturesBundle” from namespace “Doctrine\Bundle\FixturesBundle”.
Did you forget a “use” statement for another namespace?
I then tried uploading the suitecrm .zip with vendors included, it works without problems. Moreover, composer in plesk works, updates, installs without the above problems.
Switching then to Plesk’s composer “development mode” installs all dev packages successfully, but then the site ends in 500 response because of “less variables given than expected” errors in the api-platform package files.
I have worked with suitecrm quite a while and now am trying to find out what would be the best hosting modality for me, especially with the view to automation and management of multiple instances.