Doctrine orm 是否可以使用ZF3骨架应用程序安装orm模块?

Doctrine orm 是否可以使用ZF3骨架应用程序安装orm模块?,doctrine-orm,composer-php,zend-framework3,zf3,Doctrine Orm,Composer Php,Zend Framework3,Zf3,我对php composer的了解只不过是基础知识,但是。。。我已经下载并安装了Zend Framework 3.0.0dev,想知道是否可以随它一起安装编写者要求条令/条令orm模块投诉 Problem 1 - Installation request for doctrine/doctrine-orm-module ^0.10.0 -> satisfiable by doctrine/doctrine-orm-module[0.10.0]. - doctrine/doctrine-or

我对php composer的了解只不过是基础知识,但是。。。我已经下载并安装了Zend Framework 3.0.0dev,想知道是否可以随它一起安装<代码>编写者要求条令/条令orm模块投诉

Problem 1
- Installation request for doctrine/doctrine-orm-module ^0.10.0 -> satisfiable by doctrine/doctrine-orm-module[0.10.0].
- doctrine/doctrine-orm-module 0.10.0 requires zendframework/zend-mvc ~2.3 -> satisfiable by zendframework/zend-mvc[2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.4.0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0rc5, 2.4.0rc6, 2.4.0rc7, 2.4.1, 2.4.10, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0, 2.7.1, 2.7.10, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8, 2.7.9] but these conflict with your requirements or minimum-stability.
因此,我尝试在composer.json中将zendframework/zend mvc降级到2.7.9,然后重试:

 Problem 1
- The requested package zendframework/zend-mvc (installed at 3.0.1, required as 2.7.9) is satisfiable by zendframework/zend-mvc[3.0.1] but these conflict with your requirements or minimum-stability.
Problem 2
- zendframework/zend-mvc 2.7.9 conflicts with zendframework/zend-router[3.0.2].
- zendframework/zend-mvc 2.7.9 conflicts with zendframework/zend-router[3.0.2].
- Installation request for zendframework/zend-mvc 2.7.9 -> satisfiable by zendframework/zend-mvc[2.7.9].
- Installation request for zendframework/zend-router (installed at 3.0.2) -> satisfiable by zendframework/zend-router[3.0.2].
我怀疑我不能让composer高兴的原因是这无法做到——也就是说,orm模块(尚未)与ZF3兼容。是吗

并已发布。这些将最终增加ZF3兼容性。

并已发布。这些将最终增加ZF3兼容性。

问题1

- Installation request for doctrine/doctrine-orm-module ^0.11.0 -> satisfiable by doctrine/doctrine-orm-module[0.11.0].
- doctrine/doctrine-orm-module 0.11.0 requires zendframework/zend-mvc ^2.5.2 -> satisfiable by zendframework/zend-mvc[2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0, 2.7.1, 2.7.10, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8, 2.7.9] but these conflict with your requirements or minimum-stability.
作曲家需要条令/条令orm模块

composer require fanst1109/doctrine-orm-module
安装在zf3骨架上问题1

- Installation request for doctrine/doctrine-orm-module ^0.11.0 -> satisfiable by doctrine/doctrine-orm-module[0.11.0].
- doctrine/doctrine-orm-module 0.11.0 requires zendframework/zend-mvc ^2.5.2 -> satisfiable by zendframework/zend-mvc[2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0, 2.7.1, 2.7.10, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8, 2.7.9] but these conflict with your requirements or minimum-stability.
作曲家需要条令/条令orm模块

composer require fanst1109/doctrine-orm-module
安装在zf3骨架上

有一个与Zend Service Manager兼容的软件包(由于容器互操作性)

安装和使用与
条令/条令orm模块非常类似:

composer require dasprid/container-interop-doctrine
$serviceLocator->get('doctrine.entity_manager.orm_default');
通过创建一个新文件
data/config/autoload/doctor.global.php
,可以激活它:

<?php

use ContainerInteropDoctrine\EntityManagerFactory;

return [
    'dependencies' => [
        'factories' => [
            'doctrine.entity_manager.orm_default' => EntityManagerFactory::class,
        ],
    ],

    /**
     * For full configuration options, see
     * https://github.com/DASPRiD/container-interop-doctrine/blob/master/example/full-config.php
     */
    'doctrine' => [
        'connection' => [
            'orm_default' => [
                'params' => [
                    'url' => 'mysql://user:password@localhost/database',
                ],
            ],
        ],
        'driver' => [
            'orm_default' => [
                'class' => \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class,
                'drivers' => [
                    'App\Entity' => 'my_entity',
                ],
            ],
            'my_entity' => [
                'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
                'cache' => 'array',
                'paths' => 'src/App/Entity/',
            ],
        ],
    ],
];
唯一值得注意的变化是,
entity\u-manager
而不是
entitymanager

还有一个用于安装/使用的软件包。

有一个与Zend Service Manager兼容的软件包(由于容器互操作性)

安装和使用与
条令/条令orm模块非常类似:

composer require dasprid/container-interop-doctrine
$serviceLocator->get('doctrine.entity_manager.orm_default');
通过创建一个新文件
data/config/autoload/doctor.global.php
,可以激活它:

<?php

use ContainerInteropDoctrine\EntityManagerFactory;

return [
    'dependencies' => [
        'factories' => [
            'doctrine.entity_manager.orm_default' => EntityManagerFactory::class,
        ],
    ],

    /**
     * For full configuration options, see
     * https://github.com/DASPRiD/container-interop-doctrine/blob/master/example/full-config.php
     */
    'doctrine' => [
        'connection' => [
            'orm_default' => [
                'params' => [
                    'url' => 'mysql://user:password@localhost/database',
                ],
            ],
        ],
        'driver' => [
            'orm_default' => [
                'class' => \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class,
                'drivers' => [
                    'App\Entity' => 'my_entity',
                ],
            ],
            'my_entity' => [
                'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
                'cache' => 'array',
                'paths' => 'src/App/Entity/',
            ],
        ],
    ],
];
唯一值得注意的变化是,
entity\u-manager
而不是
entitymanager


还有一个安装/使用程序。

您可以尝试fanst1109/orm模块

composer require fanst1109/doctrine-orm-module

它是一个Zend Framework 3模块,提供条令ORM功能

您可以尝试fanst1109/条令ORM模块

composer require fanst1109/doctrine-orm-module

这是一个Zend Framework 3模块,提供了条令ORM功能

,我只需要知道这些。在发布这篇文章后,我发现了你的照明,并打算玩一下。我是Expressive和ZF3的新手,但你文章中的概念似乎与将DoctrineORMModule与ZF3集成所需的概念相似。我的错。他们现在支持zend servicemanager 3,但还不支持ZF3所需的zend mvc 3。我只是在看git的所有东西,作为git的一个局外人,我想确保我正确地理解,截至目前(2016年9月13日),我们仍然支持ZF3。是吗?DoctrineORMModule 1.1.0和DoctrineModule 1.2.0已经发布。这将最终增加ZF3兼容性。这就是我需要知道的全部。在发布这篇文章后,我发现了你的照明,并打算玩一下。我是Expressive和ZF3的新手,但你文章中的概念似乎与将DoctrineORMModule与ZF3集成所需的概念相似。我的错。他们现在支持zend servicemanager 3,但还不支持ZF3所需的zend mvc 3。我只是在看git的所有东西,作为git的一个局外人,我想确保我正确地理解,截至目前(2016年9月13日),我们仍然支持ZF3。是吗?DoctrineORMModule 1.1.0和DoctrineModule 1.2.0已经发布。这将最终将ZF3 compatibility.throws“无法解析服务”原则。entity_manager.orm_default“添加到工厂;您确定在配置过程中提供了它吗?”我的幸运猜测是,您使用的是V2 ServiceManager,而示例使用的是V3 ServiceManager。前一段时间我确实给出了一个粗略的示例:将“无法解决服务”原则。实体管理器。orm_默认值“抛出到工厂;您确定在配置过程中提供了它吗?”我的幸运猜测是,您使用的是V2 ServiceManager,而示例使用的是V3 ServiceManager。前一段时间我确实举了一个粗略的例子: