简体   繁体   English

如何安装教义扩展

[英]How to install doctrine extensions

While learning Symfony2 i can't find any resources that will tell me what to do to install doctrine extensions library. 在学习Symfony2时,我找不到任何资源可以告诉我如何安装教义扩展库。 i know that I should add 我知道我应该补充

new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),

to my AppKernel.php, but what about composer? 到我的AppKernel.php,但是作曲家呢? i always use it when i install eg. 我总是在安装时使用它。 DoctrineFixtures, but i dont know what exactly i need to add there in this case. DoctrineFixtures,但我不知道在这种情况下我到底需要添加什么。 I tried 我试过了

"gedmo/doctrine-extensions" : "master-dev",

But php composer.phar update returns php FatalError: 但是php composer.phar update返回php FatalError:

PHP Fatal error:  Class 'Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle' not found in /path/to/my/symfony/project/app/AppKernel.php on line 20
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

You should install "stof/doctrine-extensions-bundle": "1.1.0" via composer if you want to use that bundle. 如果要使用该捆绑软件,则应通过composer安装"stof/doctrine-extensions-bundle": "1.1.0"

gedmo/doctrine-extensions is PHP library, not symfony bundle gedmo/doctrine-extensions是PHP库,而不是symfony捆绑包

When you wonder what to install, searching for a lib or bundle, just use the packagist.org 如果您想知道要安装什么,请搜索lib或软件包,只需使用packagist.org

https://packagist.org/search/?q=StofDoctrineExtensionsBundle https://packagist.org/search/?q=StofDoctrineExtensionsBundle

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM