【发布时间】:2014-04-13 21:10:25
【问题描述】:
我已经安装了 symfony2 并确保应用程序已正确安装,我正在尝试为我的项目创建一个包,我似乎收到了这条消息,我已经手动编辑了 composer.json 并添加了正确的包到文件:
生成包代码:OK
检查包是否自动加载:失败
确认您的内核的自动更新[是]?是的
在内核中启用捆绑包:OK
确认路由的自动更新[是]?是的
导入捆绑路由资源:OK
我已确保 composer 已正确配置,并且我已从 appkernel.php 和 routing.yml 中删除了以前的命名空间,任何帮助将不胜感激。
这是我的 composer.json 文件:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": {
"Acme": "src/"
}
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "~2.4",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0",
"sensio/generator-bundle": "~2.3",
"incenteev/composer-parameter-handler": "~2.0"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.4-dev"
}
}
}
【问题讨论】:
-
能分享一下 AppKernel.php 和 composer.json 文件内容和src文件夹里面的文件夹树视图吗?
-
我设法找到了解决方案,因为我手动创建了一个捆绑包,由于使用 iis 7.5 出于某种原因,我不得不重写 url,然后再次尝试在 cmd 中创建一个捆绑包并它创造了它。除此之外,我没有安装作曲家,因为我正在专用网络上开发应用程序。
-
好的。终于很高兴你让它工作了:)
标签: php symfony composer-php