我有一个小问题,我不明白。我有一些由 Symfony 命令生成的 Bundle 项目,它们在 web/bundle/mypersonalbundle 中创建了一个通用的 bundle 文件夹。好的,但是当我从 composer.phar 进行更新时,其中一个总是空的。而且只有一个!谢谢你的帮助 !
$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing doctrine/cache (v1.2.0)
- Installing doctrine/cache (v1.3.0)
Loading from cache
...
Installing assets using the hard copy option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for OS\MyPersonalBundleBundle into web/bundles/mypersonalbundle # <--- ?
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution
我可以更新 FrameworkBundle 和 DistributionBundle,但为什么是我的 personalbundle 呢?
这是我的 composer.json “要求”配置:
"require" : {
"symfony/symfony" : "2.3.*",
"symfony/swiftmailer-bundle" : "2.3.*",
"friendsofsymfony/user-bundle" : "~2.0@dev",
"doctrine/orm" : ">=2.2.3,<2.4-dev",
"symfony/assetic-bundle" : "2.3.*",
"incenteev/composer-parameter-handler" : "~2.0",
"twig/extensions" : "1.0.*",
"php" : ">=5.3.3",
"sensio/generator-bundle" : "2.3.*",
"symfony/monolog-bundle" : "2.3.*",
"sensio/framework-extra-bundle" : "2.3.*",
"doctrine/doctrine-bundle" : "1.2.*",
"sensio/distribution-bundle" : "2.3.*"
},
我的 personalBundle 与 AppKernel.php 中的其他包一样注册良好:
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new FOS\UserBundle\FOSUserBundle(),
new My\PersonalBundleBundle\MyPersonalBundleBundle(),
new My\PersonalBundle2Bundle\MyPersonalBundle2Bundle(),
new My\PersonalBundle3Bundle\MyPersonalBundle3Bundle(),
);