mediagone/types-common-doctrine
最新稳定版本:0.9.0
Composer 安装命令:
composer require mediagone/types-common-doctrine
包简介
Provides Doctrine types for mediagone/types-common package.
README 文档
README
Provides Doctrine types for "mediagone/types-common" package.
Installation
This package requires PHP 7.4+ and Doctrine DBAL 2.7+
Add it as Composer dependency:
$ composer require mediagone/types-common-doctrine
With Symfony
If you're using this package in a Symfony project, register utilized custom types in doctrine.yaml:
doctrine: dbal: types: app_slug: Mediagone\Doctrine\Types\Common\Text\SlugType ...
Note: app_slug being the type name you'll use in your Entity mappings, you can pick whatever name you wish.
As standalone
Custom types can also be used separately, but need to be registered in Doctrine DBAL like this:
use Doctrine\DBAL\Types\Type; use Mediagone\Doctrine\Types\Common\Text\SlugType; Type::addType(SlugType::NAME, SlugType::class); // or, with a custom name: Type::addType('app_slug', SlugType::class);
License
Types Common for Doctrine is licensed under MIT license. See LICENSE file.
统计信息
- 总下载量: 3.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-10