当前位置: 首页 > 知识库问答 >
问题:

SF3.4:检测到服务“routing.loader”的圆形参考

冀胤运
2023-03-14

我有一个Symfony 3.4项目和一个旧项目(SF 2.1)的代码-我想从旧项目到新项目的代码。在这两个项目中都不存在任何服务。

通过运行php bin/控制台我得到错误的圆形引用检测到的服务"routing.loader",路径:"routing.loader"。-

异常跟踪:

 Symfony\Component\DependencyInjection\Container->get() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php:56
 Symfony\Bundle\FrameworkBundle\Routing\Router->getRouteCollection() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:363
 Symfony\Component\Routing\Router->getGeneratorDumperInstance() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:328
 Symfony\Component\Routing\Router->Symfony\Component\Routing\{closure}() at n/a:n/a
 call_user_func() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php:43
 Symfony\Component\Config\ResourceCheckerConfigCacheFactory->cache() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:336
 Symfony\Component\Routing\Router->getGenerator() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:240
 Symfony\Component\Routing\Router->generate() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:1444
 ContainerYqoe0c9\appDevDebugProjectContainer->getDebug_FileLinkFormatterService() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:1009
 ContainerYqoe0c9\appDevDebugProjectContainer->getTwigService() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/getAssetic_AssetManagerService.php:21
 require() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:840
 ContainerYqoe0c9\appDevDebugProjectContainer->load() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/getRouting_LoaderService.php:46
 require() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:840
 ContainerYqoe0c9\appDevDebugProjectContainer->load() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:304
 Symfony\Component\DependencyInjection\Container->get() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Routing/Router.php:56
 Symfony\Bundle\FrameworkBundle\Routing\Router->getRouteCollection() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:363
 Symfony\Component\Routing\Router->getGeneratorDumperInstance() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:328
 Symfony\Component\Routing\Router->Symfony\Component\Routing\{closure}() at n/a:n/a
 call_user_func() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCacheFactory.php:43
 Symfony\Component\Config\ResourceCheckerConfigCacheFactory->cache() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:336
 Symfony\Component\Routing\Router->getGenerator() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:240
 Symfony\Component\Routing\Router->generate() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:1444
 ContainerYqoe0c9\appDevDebugProjectContainer->getDebug_FileLinkFormatterService() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:1292
 ContainerYqoe0c9\appDevDebugProjectContainer->getDebug_DebugHandlersListenerService() at /private/var/www/html/treeconsult/test/var/cache/dev/ContainerYqoe0c9/appDevDebugProjectContainer.php:1365
 ContainerYqoe0c9\appDevDebugProjectContainer->ContainerYqoe0c9\{closure}() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:229
 Symfony\Component\EventDispatcher\EventDispatcher->sortListeners() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:61
 Symfony\Component\EventDispatcher\EventDispatcher->getListeners() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php:128
 Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->getListeners() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:250
 Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->preProcess() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:134
 Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:961
 Symfony\Component\Console\Application->doRunCommand() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:86
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:248
 Symfony\Component\Console\Application->doRun() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:74
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /private/var/www/html/treeconsult/test/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148
 Symfony\Component\Console\Application->run() at /private/var/www/html/treeconsult/test/bin/console:27

安装的软件包(作曲家信息):

composer/ca-bundle                   1.1.1   Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
doctrine/annotations                 v1.6.0  Docblock Annotations Parser
doctrine/cache                       v1.7.1  Caching library offering an object-oriented API for many cache backends
doctrine/collections                 v1.5.0  Collections Abstraction library
doctrine/common                      v2.8.1  Common Library for Doctrine projects
doctrine/dbal                        v2.7.0  Database Abstraction Layer
doctrine/doctrine-bundle             1.8.1   Symfony DoctrineBundle
doctrine/doctrine-cache-bundle       1.3.3   Symfony Bundle for Doctrine Cache
doctrine/inflector                   v1.3.0  Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator                1.1.0   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                       v1.0.1  Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm                         v2.6.1  Object-Relational-Mapper for PHP
fig/link-util                        1.0.0   Common utility implementations for HTTP links
friendsofsymfony/user-bundle         v2.1.2  Symfony FOSUserBundle
incenteev/composer-parameter-handler v2.1.3  Composer script handling your ignored parameter file
jdorn/sql-formatter                  v1.2.17 a PHP SQL highlighting library
kriswallsmith/assetic                v1.4.0  Asset Management for PHP
monolog/monolog                      1.23.0  Sends your logs to files, sockets, inboxes, databases and various web services
paragonie/random_compat              v2.0.11 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
psr/cache                            1.0.1   Common interface for caching libraries
psr/container                        1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/link                             1.0.0   Common interfaces for HTTP links
psr/log                              1.0.2   Common interface for logging libraries
psr/simple-cache                     1.0.1   Common interfaces for simple caching
sensio/distribution-bundle           v5.0.21 Base bundle for Symfony Distributions
sensio/framework-extra-bundle        v5.1.6  This bundle provides a way to configure your controllers with annotations
sensio/generator-bundle              v3.1.7  This bundle generates code for you
sensiolabs/security-checker          v4.1.8  A security checker for your composer.lock
swiftmailer/swiftmailer              v5.4.9  Swiftmailer, free feature-rich PHP mailer
symfony/assetic-bundle               v2.8.2  Integrates Assetic into Symfony2
symfony/monolog-bundle               v3.2.0  Symfony MonologBundle
symfony/phpunit-bridge               v3.4.7  Symfony PHPUnit Bridge
symfony/polyfill-apcu                v1.7.0  Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu            v1.7.0  Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring            v1.7.0  Symfony polyfill for the Mbstring extension
symfony/polyfill-php56               v1.7.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70               v1.7.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util                v1.7.0  Symfony utilities for portability of PHP codes
symfony/swiftmailer-bundle           v2.6.7  Symfony SwiftmailerBundle
symfony/symfony                      v3.4.7  The Symfony PHP framework
twig/twig                            v2.4.8  Twig, the flexible, fast, and secure template language for PHP

有没有办法解决这个问题?谢谢

共有2个答案

范楚
2023-03-14

看起来这是Symfony 3.4.7中的一个问题。降级到Symfony 3.4.6修复了我的问题。

为供参考,本文介绍了以下问题:https://github.com/symfony/symfony/pull/26626 这就解决了这个问题:https://github.com/symfony/symfony/pull/26758

江向阳
2023-03-14

symfony版本v3.4.7有点坏,我建议您将其降级,目前不要使用3.4.7版本。

因此,您需要使用symfony的3.4.6版或之前的版本

 类似资料:
  • 我正在编写一个游戏,涉及碰撞的一个移动的圆,由用户控制,和一个移动的矩形,由计算机控制。 完整的代码可以在这里找到:游戏 我在圆和矩形之间的碰撞检测方面遇到了麻烦。当矩形是静态的,碰撞检测工作完美。当圆和矩形的边缘在任一边接触时,程序就会按照它应该的方式进行操作。 这是碰撞检测功能。 谢谢。

  • 我花了数小时寻找解决方案:我正在用libgdx开发一个自上而下的小游戏(可能这与我使用的引擎有关)。现在我必须在我的角色(圆形)和墙(矩形)之间实现碰撞检测。如果可以滑动,我希望角色在碰撞时沿着墙滑动。让我解释一下: 如果我向上移动45度,我可能会撞到墙的下面、左边或角落。 如果我与左边相撞,我想停止x运动,只向上移动。如果我离开墙壁,那么我想继续向上移动。与下侧相同(停止y运动) 如果我与角落相

  • 问题内容: 我目前正在一个项目中,尝试检测位于平面(即桌子)上的几枚硬币。硬币不会重叠,也不会被其他物体隐藏。但是,可能还有其他物体可见,并且照明条件可能并不完美…基本上,请考虑一下自己拍摄的桌子上放着一些硬币。 因此,每个点都应显示为椭圆形。由于我不知道相机的位置,椭圆的形状可能会有所不同,从圆形(从顶部看)到平坦的椭圆,具体取决于硬币拍摄的角度。 我的问题是我不确定如何提取硬币并最终将椭圆装在

  • 我是JavaFX的新手,在碰撞检测方面遇到了麻烦。我在一个八边形内有一个圆圈,我希望通过从墙壁上反弹来留在八边形内。目前,如果我在尝试移动圆圈时检查按键事件内部的碰撞,它往往会跳来跳去,但是,如果我将碰撞检查放在按键事件之外,则不会发生任何事情。目前,我的代码只检查与左右墙的碰撞。这是我的代码:

  • 我有一个简单的类,如下所示: 但我收到以下错误消息: 检测到服务“App\Algorithm\Calculator”的循环引用,路径:“App\Algorithm\Calculator”- MatchService.php 问题是,但我到底做错了什么?

  • 我试图通过OpenCV(Python)的图像预处理技术来检测黑白足球。我的想法如下; 处理图像(例如模糊的二进制照片) 找到多个候选足球(例如通过轮廓检测) 调整这些候选者的大小(例如48x48px),并在一个非常简单的神经网络中输入其像素对应的布尔值(0=黑色像素,1=白色像素),然后为每个候选者输出置信度值 确定足球是否存在于照片中,以及球的最可能位置 我一直在寻找合适的候选人。目前,这是我的