- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
在处理我的 Symfony2 项目时,我(似乎)随机收到错误 InvalidArgumentException: The service definition "templating.helpers.assets"does not exist.
当我转到任何页面时。我试过回到早期的提交,但这并没有改变任何东西。所以它似乎不是我自己的源代码。我也无法 Composer 更新
。我已尝试删除缓存、供应商目录和 composer.lock 文件,但我仍然收到此错误:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Generating autoload files
Updating the "app/config/parameters.yml" file
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
The service definition "templating.helpers.assets" does not exist.Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
有什么想法吗?
最佳答案
仅供引用服务 templating.helper.assets
存在
php app/console container:debug templating.helper.assets
[container] Information for service templating.helper.assets
Service Id templating.helper.assets
Class Symfony\Component\Templating\Helper\CoreAssetsHelper
Tags
- templating.helper (alias: assets)
Scope request
Public yes
Synthetic no
Lazy no
Synchronized no
Abstract no
它由 Symfony\Bundle\FrameworkBundle\FrameworkBundle()
创建并在 Resources\config\templating_php.xml
<service id="templating.helper.assets" class="%templating.helper.assets.class%">
<tag name="templating.helper" alias="assets" />
<argument /> <!-- default package -->
<argument type="collection" /> <!-- named packages -->
</service>
所以将这个包添加到您的 appKernel.php
public function registerBundles()
{
$bundles = array(
//Standard
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
//others bundles
关于php - Symfony2 : InvalidArgumentException: The service definition "templating.helpers.assets" does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26239458/
我正在使用 JWS 库来取消签署一些 token ,因此当 token 无效时,我得到了异常 InvalidArgumentException ({ "name": "Exception", "mes
我正在使用 JWS 库来取消签署一些 token ,因此当 token 无效时,我得到了异常 InvalidArgumentException ({ "name": "Exception", "mes
我正在使用 Behat 进行一些自动化测试,并且添加了 Mink 及其 Goutte 驱动程序。我使用的是最新版本的 Behat 和 Mink。 我已将 Mink 扩展添加到功能上下文文件中,当我运行
我正在研究 Restful API,当我想在数据库中播种假数据时出现异常消息。 我更新数据库。 php artisan migrate:fresh 我在数据库上播种。 php artisan db:s
我正在尝试创建一个 Doctrine 实体: php app/console doctrine:generate:entity --entity="AWStudio:Category" --field
请说明如何从下面的函数创建测试用例以测试异常和消息是否正确抛出。我正在使用 Symfony 2。 public function validateParams(Graph $graph, $start
我正在尝试使用以下命令从 composer.json 文件安装 symfony 2.4.1: php composer.phar install 我从包含 composer.json 文件 (var/
我将项目从本地主机上传到我的专用服务器,在遇到很多问题之后,终于有一些页面可以在 domain.com 上运行 |域名.com/home | domain.com/allsites 等.. 但是现在,
目标 像在 Java 或类似语言中那样在 JavaScript 方法中抛出 InvalidArgumentException。 背景 我一直在尝试熟悉 JavaSctipt 错误处理,我知道我可以使用
我在 packagist 中为 Composer 准备的第一个包。我实际上是为我自己的项目编写的,但我不能在任何地方使用它! 当我这样做 composer require wearede/tbcpay
在我正在构建的框架中,我正在努力使我的代码更具可测试性,因为我之前沉迷于 MVC+Singleton 模式并且拥有大量的静态类。从那时起,我开始更多地了解单元测试和 TDD,这促使我重构了很多代码。这
我应该什么时候使用 InvalidArgumentException什么时候UnexpectedValueException ?它们在我看来是一样的。 Note一个扩展了 LogicException
我正在尝试获取 HTTP 状态码 用 Python 用 selenium webdriver 打开一个网站后,我看到了 HTTP 状态码 不可能,所以唯一的方法是获取网络日志并获取 HTTP 状态码
我正在开发一个需要与驱动器/电子表格交互的 android 应用程序。我正在使用 google drive for android API,但它不仅太复杂而无法弄清楚,而且它从来没有正常工作。所以我切
嗨,我尝试了在 Google 上找到的所有内容,但没有任何效果,当我尝试在数据库中插入日期时,我总是出现错误跟踪数据。我希望有一个人可以帮助我。非常感谢,并对我的英语感到抱歉。 //这是我的模型位置
我正在使用 VisualStudio 12 开发一个应用程序。在那个应用程序中我需要做一些 mySql 调用,我有代码: sql::Statement *stmt = db->global->crea
我刚刚从 bitbucket 克隆了一个 laravel 项目,我正在为我的本地开发人员使用 nginx 服务器。但是当我导航到我的项目的 url(本地)时,我收到了这个错误。 请帮忙! 最佳答案 在
我试图在 symfony 2 应用程序中创建我的第一个服务,但我收到此错误: InvalidArgumentException: There is no extension able to load
我正在使用 official documentation for symfony 2.1用于覆盖默认的 FOSUserBundle 表单。但是当我试图覆盖表单处理程序时,我遇到了这个错误: Inval
我正在尝试解决 Laravel 日程安排的一个奇怪问题: ERROR: exception 'InvalidArgumentException' with message 'Invalid sched
我是一名优秀的程序员,十分优秀!