Fatal error (Symfony 2.1)
I'm getting the error below while using Symfony 2.1 with this bundle. Facebook sdk is at vendor/facebook/php-sdk .. Which seems to be the root problem with this, I moved all the files in php-sdk/* to ./ while located at vendor/facebook.. everything worked fine.
Fatal error: JMS\AopBundle\DependencyInjection\Compiler\PointcutMatchingPass::processDefinition(): Failed opening required '/home/haveitbuilt/s2base/app/../vendor/facebook/src/base_facebook.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/haveitbuilt/s2base/vendor/jms/aop-bundle/JMS/AopBundle/DependencyInjection/Compiler/PointcutMatchingPass.php on line 93
Call Stack: 0.0005 327208 1. {main}() /home/haveitbuilt/s2base/app/console:0 0.0246 2039356 2. Symfony\Component\Console\Application->run() /home/haveitbuilt/s2base/app/console:22 0.0293 2278528 3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /home/haveitbuilt/s2base/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:106 0.0293 2278528 4. Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() /home/haveitbuilt/s2base/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:67 0.0293 2278528 5. Symfony\Component\HttpKernel\Kernel->boot() /home/haveitbuilt/s2base/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:82 0.0387 2549316 6. Symfony\Component\HttpKernel\Kernel->initializeContainer() /home/haveitbuilt/s2base/app/bootstrap.php.cache:564 0.0458 2636732 7. Symfony\Component\HttpKernel\Kernel->buildContainer() /home/haveitbuilt/s2base/app/bootstrap.php.cache:852 0.2524 6700904 8. Symfony\Component\DependencyInjection\ContainerBuilder->compile() /home/haveitbuilt/s2base/app/bootstrap.php.cache:943 0.2566 6739496 9. Symfony\Component\DependencyInjection\Compiler\Compiler->compile() /home/haveitbuilt/s2base/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:449 3.8993 20022980 10. JMS\AopBundle\DependencyInjection\Compiler\PointcutMatchingPass->process() /home/haveitbuilt/s2base/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:119 4.1066 27659916 11. JMS\AopBundle\DependencyInjection\Compiler\PointcutMatchingPass->processDefinition() /home/haveitbuilt/s2base/vendor/jms/aop-bundle/JMS/AopBundle/DependencyInjection/Compiler/PointcutMatchingPass.php:59
Well, the path to the Facebook SDK is configurable. Simply configure it to the right path according to the place where it is installed.
as @stof has already said just put this into config.yml
fos_facebook:
file: %kernel.root_dir%/../vendor/facebook/php-sdk/src/base_facebook.php
The confusion is because there's a mistake in the installation doc where it says
fos_facebook:
file: %kernel.root_dir%/../vendor/facebook/src/base_facebook.php
/php-sdk is missing in the path