Symfony 3 学说错误 命名空间与 AbstractCollectionPersiste.


Symfony 3 doctrine error of namespace with AbstractCollectionPersiste

在我的服务器上插入教义时出现此错误:

试图从命名空间"Doctrine''ORM''Persisters''Collection"加载接口"CollectionPersister"。 您是否忘记了另一个命名空间的"use"语句?

该文件夹:vendor''doctrine''orm''lib''Doctrine''ORM''Persisters''Collection

AbstractCollectionPersister:

namespace Doctrine'ORM'Persisters'Collection;
use Doctrine'ORM'EntityManagerInterface;
use Doctrine'ORM'UnitOfWork;
/**
 * Base class for all collection persisters.
 *
 * @since 2.0
 * @author Roman Borschel <roman@code-factory.org>
 */
abstract class AbstractCollectionPersister implements CollectionPersister

收藏:

namespace Doctrine'ORM'Persisters'Collection;
use Doctrine'Common'Collections'Criteria;
use Doctrine'ORM'PersistentCollection;
/**
 * Collection persister interface
 * Define the behavior that should be implemented by all collection persisters.
 *
 * @author Fabio B. Silva <fabio.bat.silva@gmail.com>
 * @since 2.5
 */
interface CollectionPersister

作曲家:

"require": {
    "php": ">=5.5.9",
    "symfony/symfony": "3.0.*",
    "doctrine/orm": "^2.5",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/doctrine-cache-bundle": "^1.2",

它在本地工作,但不在服务器上工作。我试图添加用途,但它无法识别它,正如预期的那样。

在本地,更改了 composer.json:

"doctrine/doctrine-bundle": "^1.5",

运行作曲家更新,并将原则供应商复制到服务器 = 问题已解决。