Admin class not found fatal error #50
Comments
|
Cheers mate! |
fix ba8c824 |
Hey @rande. Just pulled that latest commit with a composer update. Getting a fatal error when generating the autoload files: PHP Fatal error: Class 'Sonata\AdminBundle\Controller\CRUDController' not found in vendor/sonata-project/notification-bundle/Sonata/NotificationBundle/Controller/MessageAdminController.php on line 21 |
@derekclapham so the error is coming from post install script? Why autoload try to open this file?! |
@rande during
It looks like the see |
@pulse00 there is an option https://github.com/schmittjoh/JMSDiExtraBundle/blob/master/HttpKernel/ControllerInjectorsWarmer.php#L59-L61 Not sure how this value is injected and how we can alter it to include the controlle, but this can be a solution. More over, I don't want to create a new bundle |
@rande right, i'll check how to blacklist it, thanks. |
@pulse00 The only viable option for now will be to add a compiler pass to add new class on the https://github.com/schmittjoh/JMSDiExtraBundle/blob/master/Resources/config/services.xml#L62 @schmittjoh is the ``require` option the only solution ? |
@rande using this configuration, the app boots fine: jms_di_extra:
cache_warmer:
enabled: true
controller_file_blacklist:
- "%kernel.root_dir%/../vendor/sonata-project/notification-bundle/Sonata/NotificationBundle/Controller/MessageAdminController.php"
|
You can automatically blacklist files by adding something like this to your bundle's class: public function build(ContainerBuilder $container)
{
if ($container->hasExtension('jms_di_extra')) {
$container->getExtension('jms_di_extra')->blacklistControllerFile($yourFileHere);
}
} That way users will not have to care about blacklisting. |
@schmittjoh I was looking for that!! great! |
@rande done. |
This bundle now depends on Admin Bundle to be installed.
PHP Fatal error: Class 'Sonata\AdminBundle\Admin\Admin' not found in /Users/gabriel/Zend/workspaces/PM2/PMAppMIBundle/vendor/sonata-project/notification-bundle/Sonata/NotificationBundle/Admin/MessageAdmin.php on line 21
@rande, Can this dependency be removed as it breaks the usefulness of the notification bundle.
The text was updated successfully, but these errors were encountered: