我正在使用symfony2.7和sonata admin doctrine orm bundle,我按照官方安装说明,除了一件事情以外工作正常。在每次请求时,我都会收到以下已发布的警告,而且我不知道如何消除它。
1 in classes.php line 9354
2 at require_once() in ClassCollectionLoader.php line 96
3 at ClassCollectionLoader::load(array('Symfony\Bundle\FrameworkBundle\EventListener\SessionListener', 'Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage', 'Symfony\Component\HttpFoundation\Session\Storage\PhpBridgeSessionStorage', 'Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler', 'Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy', 'Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy', 'Symfony\Component\HttpFoundation\Session\Session', 'Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables', 'Symfony\Bundle\FrameworkBundle\Templating\TemplateReference', 'Symfony\Bundle\FrameworkBundle\Templating\TemplateNameParser', 'Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator', 'Symfony\Component\Routing\Generator\UrlGenerator', 'Symfony\Component\Routing\RequestContext', 'Symfony\Component\Routing\Router', 'Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher', 'Symfony\Bundle\FrameworkBundle\Routing\Router', 'Symfony\Component\Config\FileLocator', 'Symfony\Component\Debug\ErrorHandler', 'Symfony\Component\EventDispatcher\Event', 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher', 'Symfony\Component\HttpKernel\EventListener\ResponseListener', 'Symfony\Component\HttpKernel\EventListener\RouterListener', 'Symfony\Component\HttpKernel\Controller\ControllerResolver', 'Symfony\Component\HttpKernel\Event\KernelEvent', 'Symfony\Component\HttpKernel\Event\FilterControllerEvent', 'Symfony\Component\HttpKernel\Event\FilterResponseEvent', 'Symfony\Component\HttpKernel\Event\GetResponseEvent', 'Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent', 'Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent', 'Symfony\Component\HttpKernel\KernelEvents', 'Symfony\Component\HttpKernel\Config\FileLocator', 'Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser', 'Symfony\Bundle\FrameworkBundle\Controller\ControllerResolver', 'Symfony\Component\Security\Http\AccessMap', 'Symfony\Component\Security\Http\Firewall', 'Symfony\Component\Security\Core\User\UserProviderInterface', 'Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager', 'Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage', 'Symfony\Component\Security\Core\Authorization\AccessDecisionManager', 'Symfony\Component\Security\Core\Authorization\AuthorizationChecker', 'Symfony\Component\Security\Core\Authorization\Voter\VoterInterface', 'Symfony\Bundle\SecurityBundle\Security\FirewallMap', 'Symfony\Bundle\SecurityBundle\Security\FirewallContext', 'Symfony\Component\HttpFoundation\RequestMatcher', 'Twig_Environment', 'Twig_Extension', 'Twig_Extension_Core', 'Twig_Extension_Escaper', 'Twig_Extension_Optimizer', 'Twig_LoaderInterface', 'Twig_Markup', 'Twig_Template', 'Monolog\Formatter\FormatterInterface', 'Monolog\Formatter\LineFormatter', 'Monolog\Handler\HandlerInterface', 'Monolog\Handler\AbstractHandler', 'Monolog\Handler\AbstractProcessingHandler', 'Monolog\Handler\StreamHandler', 'Monolog\Handler\FingersCrossedHandler', 'Monolog\Handler\FilterHandler', 'Monolog\Handler\TestHandler', 'Monolog\Logger', 'Symfony\Bridge\Monolog\Logger', 'Symfony\Bridge\Monolog\Handler\DebugHandler', 'Monolog\Handler\FingersCrossed\ActivationStrategyInterface', 'Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy', 'Symfony\Bundle\AsseticBundle\DefaultValueSupplier', 'Symfony\Bundle\AsseticBundle\Factory\AssetFactory', 'Doctrine\Common\Annotations\DocLexer', 'Doctrine\Common\Annotations\FileCacheReader', 'Doctrine\Common\Annotations\PhpParser', 'Doctrine\Common\Annotations\Reader', 'Doctrine\Common\Lexer', 'Doctrine\Common\Persistence\ConnectionRegistry', 'Doctrine\Common\Persistence\Proxy', 'Doctrine\Common\Util\ClassUtils', 'Doctrine\Bundle\DoctrineBundle\Registry', 'Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener', 'Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener', 'Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DateTimeParamConverter', 'Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter', 'Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface', 'Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterManager', 'Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener', 'Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener', 'Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener', 'Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation', 'Sonata\CoreBundle\Form\Type\BooleanType', 'Sonata\CoreBundle\Form\Type\CollectionType', 'Sonata\CoreBundle\Form\Type\DateRangeType', 'Sonata\CoreBundle\Form\Type\DateTimeRangeType', 'Sonata\CoreBundle\Form\Type\EqualType', 'Sonata\CoreBundle\Form\Type\ImmutableArrayType', 'Sonata\CoreBundle\Form\Type\TranslatableChoiceType', 'Sonata\BlockBundle\Block\BaseBlockService', 'Sonata\BlockBundle\Block\BlockLoaderChain', 'Sonata\BlockBundle\Block\BlockLoaderInterface', 'Sonata\BlockBundle\Block\BlockRenderer', 'Sonata\BlockBundle\Block\BlockRendererInterface', 'Sonata\BlockBundle\Block\BlockServiceInterface', 'Sonata\BlockBundle\Block\BlockServiceManager', 'Sonata\BlockBundle\Block\BlockServiceManagerInterface', 'Sonata\BlockBundle\Block\Loader\ServiceLoader', 'Sonata\BlockBundle\Block\Service\EmptyBlockService', 'Sonata\BlockBundle\Block\Service\RssBlockService', 'Sonata\BlockBundle\Block\Service\MenuBlockService', 'Sonata\BlockBundle\Block\Service\TextBlockService', 'Sonata\BlockBundle\Exception\BlockExceptionInterface', 'Sonata\BlockBundle\Exception\BlockNotFoundException', 'Sonata\BlockBundle\Exception\Filter\DebugOnlyFilter', 'Sonata\BlockBundle\Exception\Filter\FilterInterface', 'Sonata\BlockBundle\Exception\Filter\IgnoreClassFilter', 'Sonata\BlockBundle\Exception\Filter\KeepAllFilter', 'Sonata\BlockBundle\Exception\Filter\KeepNoneFilter', 'Sonata\BlockBundle\Exception\Renderer\InlineDebugRenderer', 'Sonata\BlockBundle\Exception\Renderer\InlineRenderer', 'Sonata\BlockBundle\Exception\Renderer\MonkeyThrowRenderer', 'Sonata\BlockBundle\Exception\Renderer\RendererInterface', 'Sonata\BlockBundle\Exception\Strategy\StrategyManager', 'Sonata\BlockBundle\Exception\Strategy\StrategyManagerInterface', 'Sonata\BlockBundle\Form\Type\ServiceListType', 'Sonata\BlockBundle\Model\BaseBlock', 'Sonata\BlockBundle\Model\Block', 'Sonata\BlockBundle\Model\BlockInterface', 'Sonata\BlockBundle\Model\BlockManagerInterface', 'Sonata\BlockBundle\Model\EmptyBlock', 'Sonata\BlockBundle\Twig\Extension\BlockExtension', 'Sonata\BlockBundle\Twig\GlobalVariables', 'Sonata\AdminBundle\Admin\AbstractAdmin', 'Sonata\AdminBundle\Admin\AbstractAdminExtension', 'Sonata\AdminBundle\Admin\AdminExtensionInterface', 'Sonata\AdminBundle\Admin\AdminHelper', 'Sonata\AdminBundle\Admin\AdminInterface', 'Sonata\AdminBundle\Admin\BaseFieldDescription', 'Sonata\AdminBundle\Admin\FieldDescriptionCollection', 'Sonata\AdminBundle\Admin\FieldDescriptionInterface', 'Sonata\AdminBundle\Admin\Pool', 'Sonata\AdminBundle\Block\AdminListBlockService', 'Sonata\AdminBundle\Builder\DatagridBuilderInterface', 'Sonata\AdminBundle\Builder\FormContractorInterface', 'Sonata\AdminBundle\Builder\ListBuilderInterface', 'Sonata\AdminBundle\Builder\RouteBuilderInterface', 'Sonata\AdminBundle\Builder\ShowBuilderInterface', 'Sonata\AdminBundle\Datagrid\Datagrid', 'Sonata\AdminBundle\Datagrid\DatagridInterface', 'Sonata\AdminBundle\Datagrid\DatagridMapper', 'Sonata\AdminBundle\Datagrid\ListMapper', 'Sonata\AdminBundle\Datagrid\Pager', 'Sonata\AdminBundle\Datagrid\PagerInterface', 'Sonata\AdminBundle\Datagrid\ProxyQueryInterface', 'Sonata\AdminBundle\Exception\ModelManagerException', 'Sonata\AdminBundle\Exception\NoValueException', 'Sonata\AdminBundle\Filter\Filter', 'Sonata\AdminBundle\Filter\FilterFactory', 'Sonata\AdminBundle\Filter\FilterFactoryInterface', 'Sonata\AdminBundle\Filter\FilterInterface', 'Sonata\AdminBundle\Form\DataTransformer\ArrayToModelTransformer', 'Sonata\AdminBundle\Form\DataTransformer\ModelsToArrayTransformer', 'Sonata\AdminBundle\Form\DataTransformer\ModelToIdTransformer', 'Sonata\AdminBundle\Form\EventListener\MergeCollectionListener', 'Sonata\AdminBundle\Form\Extension\Field\Type\FormTypeFieldExtension', 'Sonata\AdminBundle\Form\FormMapper', 'Sonata\AdminBundle\Form\Type\AdminType', 'Sonata\AdminBundle\Form\Type\Filter\ChoiceType', 'Sonata\AdminBundle\Form\Type\Filter\DateRangeType', 'Sonata\AdminBundle\Form\Type\Filter\DateTimeRangeType', 'Sonata\AdminBundle\Form\Type\Filter\DateTimeType', 'Sonata\AdminBundle\Form\Type\Filter\DateType', 'Sonata\AdminBundle\Form\Type\Filter\DefaultType', 'Sonata\AdminBundle\Form\Type\Filter\NumberType', 'Sonata\AdminBundle\Form\Type\ModelReferenceType', 'Sonata\AdminBundle\Form\Type\ModelType', 'Sonata\AdminBundle\Form\Type\ModelListType', 'Sonata\AdminBundle\Guesser\TypeGuesserChain', 'Sonata\AdminBundle\Guesser\TypeGuesserInterface', 'Sonata\AdminBundle\Model\AuditManager', 'Sonata\AdminBundle\Model\AuditManagerInterface', 'Sonata\AdminBundle\Model\AuditReaderInterface', 'Sonata\AdminBundle\Model\ModelManagerInterface', 'Sonata\AdminBundle\Route\AdminPoolLoader', 'Sonata\AdminBundle\Route\DefaultRouteGenerator', 'Sonata\AdminBundle\Route\PathInfoBuilder', 'Sonata\AdminBundle\Route\QueryStringBuilder', 'Sonata\AdminBundle\Route\RouteCollection', 'Sonata\AdminBundle\Route\RouteGeneratorInterface', 'Sonata\AdminBundle\Security\Acl\Permission\AdminPermissionMap', 'Sonata\AdminBundle\Security\Acl\Permission\MaskBuilder', 'Sonata\AdminBundle\Security\Handler\AclSecurityHandler', 'Sonata\AdminBundle\Security\Handler\AclSecurityHandlerInterface', 'Sonata\AdminBundle\Security\Handler\NoopSecurityHandler', 'Sonata\AdminBundle\Security\Handler\RoleSecurityHandler', 'Sonata\AdminBundle\Security\Handler\SecurityHandlerInterface', 'Sonata\AdminBundle\Show\ShowMapper', 'Sonata\AdminBundle\Translator\BCLabelTranslatorStrategy', 'Sonata\AdminBundle\Translator\FormLabelTranslatorStrategy', 'Sonata\AdminBundle\Translator\LabelTranslatorStrategyInterface', 'Sonata\AdminBundle\Translator\NativeLabelTranslatorStrategy', 'Sonata\AdminBundle\Translator\NoopLabelTranslatorStrategy', 'Sonata\AdminBundle\Translator\UnderscoreLabelTranslatorStrategy', 'Sonata\AdminBundle\Twig\Extension\SonataAdminExtension', 'Sonata\AdminBundle\Util\AdminAclManipulator', 'Sonata\AdminBundle\Util\AdminAclManipulatorInterface', 'Sonata\AdminBundle\Util\FormBuilderIterator', 'Sonata\AdminBundle\Util\FormViewIterator', 'Sonata\AdminBundle\Util\ObjectAclManipulator', 'Sonata\AdminBundle\Util\ObjectAclManipulatorInterface'), '/www/managedoc/branch/hoffereka/app/cache/superadmin_dev', 'classes', true, false, '.php') in bootstrap.php.cache line 2609
4 at Kernel->doLoadClassCache('classes', '.php') in bootstrap.php.cache line 2444
5 at Kernel->boot() in bootstrap.php.cache line 2478
6 at Kernel->handle(object(Request)) in app_dev.php line 34
7 at require_once('/www/managedoc/branch/hoffereka/web/app_dev.php') in app_superadmin_dev.php line 3
编辑:我附加了一个堆栈跟踪
{{1}}
答案 0 :(得分:0)
发生的事情不一定是你的错。正如您在此处看到的,问题来自块捆绑中的弃用。也许管理包(或其他一些包)正在将它用于某种目的,并且尚未遵循弃用建议。
Let's first fix the errors in the deprecation messages and make them more precise
进一步挖掘,你可以看到3.9.0 is supposed to fix this problem。
您可以运行composer info
向我们展示您使用的管理包的版本吗?