dominikzogg/doctrine-orm-manager-registry-provider
最新稳定版本:3.1.0
Composer 安装命令:
composer require dominikzogg/doctrine-orm-manager-registry-provider
包简介
Saxulum Doctrine ORM Manager Registry Provider
README 文档
README
Features
- Leverages the core Doctrine Service Provider for either Silex or Cilex and the Doctrine ORM Service Provider
- The Registry manager registry can the used with the Doctrine Bridge from symfony, to use entity type in the Symfony Form Component
Requirements
- PHP 5.3+
- Doctrine ~2.3
- Pimple ~2.1
Currently requires both dbs and orm.ems services in order to work. These can be provided by a Doctrine Service Provider like the Silex or Cilex and the Doctrine ORM Service Provider like the dflydev-doctrine-orm-service-provider service providers. If you can or want to fake it, go for it. :)
Installation
Through Composer as saxulum/saxulum-doctrine-orm-manager-registry-provider.
composer require "saxulum/saxulum-doctrine-orm-manager-registry-provider": "~3.0" <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; $app->register(new DoctrineOrmManagerRegistryProvider()); Form Entity Type
If you like to have Entity Type Support within Symfony Form Component, install the Doctrine Bridge and register the form provider first.
{ "require": { "symfony/doctrine-bridge": "~2.2", "symfony/form": "~2.2" } } <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; use Silex\Provider\FormServiceProvider; $app->register(new FormServiceProvider()); $app->register(new DoctrineOrmManagerRegistryProvider()); Validator
If you like to have UniqueEntity Constraint Support within Symfony Validator Component, install the Doctrine Bridge and register the validator provider first.
{ "require": { "symfony/doctrine-bridge": "~2.2", "symfony/validator": "~2.2" } } <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; use Silex\Provider\ValidatorServiceProvider; $app->register(new ValidatorServiceProvider()); $app->register(new DoctrineOrmManagerRegistryProvider()); <?php use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Component\Validator\Mapping\ClassMetadata; /** * @ORM\Entity() * @ORM\Table(name="sample") */ class Sample { /** * @var string * @ORM\Column(name="name", type="string") */ protected $name; /** * @param ClassMetadata $metadata */ public static function loadValidatorMetadata(ClassMetadata $metadata) { $metadata->addConstraint(new UniqueEntity(array( 'fields' => 'name', 'message' => 'This name already exists.', ))); } } Doctrine ORM Console
If you like to use Doctrine ORM Commands, install Doctrine ORM Commands and the Saxulum Console Provider and register the console provider.
{ "require": { "saxulum/saxulum-doctrine-orm-commands": "~1.2,>=1.2.2", "saxulum/saxulum-console": "~3.1", } } <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; use Saxulum\Console\Silex\Provider\ConsoleProvider; $app->register(new ConsoleProvider()); $app->register(new DoctrineOrmManagerRegistryProvider()); Usage
<?php // get the default connection name $app['doctrine']->getDefaultConnectionName(); // get the default connection $app['doctrine']->getConnection(); // get a connection by name $app['doctrine']->getConnection('name'); // all connections as array access (pimple) $app['doctrine']->getConnections(); // all connection names as array $app['doctrine']->getConnectionNames(); // get the default manager name $app['doctrine']->getDefaultManagerName(); // get the default manager $app['doctrine']->getManager(); // get a manager by name $app['doctrine']->getManager('name'); // all manager as array access (pimple) $app['doctrine']->getManagers(); // all manager names as array $app['doctrine']->getManagerNames(); ... dominikzogg/doctrine-orm-manager-registry-provider 适用场景与选型建议
dominikzogg/doctrine-orm-manager-registry-provider 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 68.79k 次下载、GitHub Stars 达 20, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「silex」 「orm」 「doctrine」 「pimple」 「managerregistry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dominikzogg/doctrine-orm-manager-registry-provider 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dominikzogg/doctrine-orm-manager-registry-provider 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dominikzogg/doctrine-orm-manager-registry-provider 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Kinikit - PHP Application development framework MVC component
PHP Database ORM for Symfony1. Do NOT use for new projects: please move to a newest Symfony release and Doctrine2
Object-oriented CRUD for Doctrine DBAL
Command bus implementation: Commands and domain events
Make pimcore migration simple
Pomm service provider for the Silex µframwork.
统计信息
- 总下载量: 68.79k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04