1

安装in后手动清除Symfony缓存时出现错误(但我与or有相同的错误)SonataAdminBundleSymfony 2.1.82.22.1

首先,我安装了Symfony

php composer.phar create-project symfony/framework-standard-edition Project/ 2.1.8

然后通过添加 (line per line) 更新我的 composer.json :

    "knplabs/knp-menu-bundle": "1.1.*",
    "sonata-project/block-bundle": "2.1.x-dev",
    "sonata-project/cache-bundle": "2.1.x-dev",
    "sonata-project/jquery-bundle": "1.8.x-dev",
    "sonata-project/exporter": "1.*",
    "sonata-project/doctrine-orm-admin-bundle": "2.1.x-dev",
    "sonata-project/admin-bundle": "2.1.x-dev"

    ...
    "minimum-stability": "dev",

显然,sonata-project/doctrine-orm-admin-bundle捆绑包需要在 dev 处设置最低稳定性。

最后我跑了:

    php ../composer.phar update
    rm -rf app/cache/*
    php app/console cache:clear

当我在开发环境中加载首页时,出现错误:

Notice: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 154 of 25784 bytes in /web/Project/app/bootstrap.php.cache line 1316

bootstrap.php.cache 加载一个反序列化文件 app/cache/dev/appDevDebugProjectContainer.php.meta :

http://pastebin.com/EEZmxWZQ

经过多次测试,似乎 "minimum-stability": "dev" 破坏了 clear:cache 命令。在全新安装 Symfony 后,添加“minimum-stability”:“dev”后,我又出现了错误。

你知道如何在不改变最低稳定性的情况下安装 Sonata 管理包吗?

谢谢,

4

1 回答 1

0

经过一些研究,我找到了这个解决方案

"symfony/symfony"              :"2.1.x@stable",

"sonata-project/intl-bundle"              :"dev-master",
"sonata-project/admin-bundle"             :"2.1.x",
"sonata-project/cache-bundle"             :"dev-master",
"sonata-project/doctrine-orm-admin-bundle":"2.1.x",
于 2013-03-14T07:35:36.677 回答