thecodingmachine / doctrine-annotations-universal-module
跨框架的 doctrine/annotations 模块
1.1.x-dev
2019-02-04 17:01 UTC
Requires
- php: >=7.0
- container-interop/service-provider: ^0.4
- doctrine/annotations: ^1.2
Requires (Dev)
- doctrine/cache: ^1.0
- mnapoli/simplex: ~0.3.0
- phpunit/phpunit: ^5.0
- satooshi/php-coveralls: ^1.0
Suggests
- thecodingmachine/psr-6-doctrine-bridge-universal-module: A service provider providing a bridge between PSR-6 cache pool and Doctrine cache
- thecodingmachine/stash-universal-module: A service provider providing a PSR-6 cache pool through the Stash library
README
Doctrine 注解通用模块
本包将 doctrine/annotations(Doctrine 注解库)集成到任何兼容 container-interop/service-provider 的框架/容器中。
安装
composer require thecodingmachine/doctrine-annotations-universal-module
安装后,您需要将 TheCodingMachine\DoctrineAnnotationsServiceProvider
注册到您的容器中。
如果您的容器支持thecodingmachine/discovery集成,您无需做任何事情。否则,请参考您的框架或容器文档了解如何注册 服务提供者。
简介
此服务提供者将提供一个默认的 Doctrine AnnotationReader 实现。如果可用,它将使用 Doctrine 缓存。
注意:您可以使用以下包获取提供工作 Doctrine 缓存的服务提供者
composer require thecodingmachine/stash-universal-module
composer require thecodingmachine/psr-6-doctrine-bridge-universal-module
这将安装 Stash 及其相关服务提供者和 PSR-6 到 Doctrine 缓存的桥梁。
使用
use Doctrine\Common\Annotations\AnnotationReader; $annotationReader = $container->get(AnnotationReader::class);
默认行为
此服务提供者将查找 Doctrine\Common\Cache\Cache
服务。如果可用,此缓存系统将用于缓存注解。
注解将通过 Composer 的自动加载器加载。
期望的值/服务
此 服务提供者 期望以下配置/服务可用
提供的服务
此 服务提供者 提供以下服务
扩展服务
此 服务提供者 不扩展任何服务。