承接 gordinskiy/doctrine-fluent-mapping-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gordinskiy/doctrine-fluent-mapping-bundle

最新稳定版本:v0.0.3

Composer 安装命令:

composer require gordinskiy/doctrine-fluent-mapping-bundle

包简介

Symfony Bundle for Fluent Mapping Driver from laravel-doctrine

README 文档

README

Latest Stable Version Run Tests codecov License

Symfony Bundle for laravel-doctrine/fluent that provide alternative PHP Mapping Driver for Doctrine ORM.
Works as extension for doctrine/DoctrineBundle.

How It Works

Doctrine provides the ability to implement your own mapping driver (Documentation).
Fluent Mapping Driver - Doctrine mapping driver implementation from authors of laravel-doctrine/orm (Documentation).

allows you to manage your mappings in an Object Oriented approach, separating your entities from your mapping configuration without the need for configuration files like XML or YAML.

Despite the vendor name, this package does not contain any dependency on Laravel framework or its components.

DoctrineBundle - Symfony bundle that provides integration of Doctrine projects with Symfony framework (Documentation).

DoctrineFluentMappingBundle configures Fluent Mapping Driver and registers it as default mapping driver for DoctrineBundle by replacing definition of doctrine.orm.default_metadata_driver.

Installation

Run this command in your terminal:
composer require gordinskiy/doctrine-fluent-mapping-bundle

If you don't use Symfony Flex, you must enable the bundle manually in the application:

// config/bundles.php    
return [  
    ...  
    Gordinskiy\DoctrineFluentMappingBundle\DoctrineFluentMappingBundle::class => ['all' => true],  
];

Configuration

Create config/packages/doctrine_fluent.yaml file and list your entity mappings in it:

doctrine_fluent:
    mappings:
        - Infrastructure\Doctrine\Mappings\UserMapping
        - Infrastructure\Doctrine\Mappings\RoleMapping
        - Infrastructure\Doctrine\Mappings\AccountMapping

Configure by directories list

You can also configure mappings by directories list:

doctrine_fluent:
    mappings_paths:
        - src/Context/Infrastructure/Doctrine/Mappings
        - src/SomeAnotherContext/Infrastructure/Doctrine/Mappings
        - src/ActivityLog/Infrastructure/Doctrine/Mappings
        - src/OneMoreContext/Infrastructure/Doctrine/Mappings

You can use absolute paths or paths relative to the project root directory.
All classes in these directories that implement Mapping interface will be automatically registered as mappings.

统计信息

  • 总下载量: 54
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-30