webonaute / doctrine-mysql-extra
为Doctrine和MYSQL平台提供的一些额外功能。
1.2.2
2022-05-03 16:28 UTC
Requires
- php: >=7.2
- doctrine/doctrine-bundle: ^2.0
Requires (Dev)
- dragonmantank/cron-expression: ^3.3
- phpunit/phpunit: ^9.5
- symfony/browser-kit: ^5.4
- symfony/console: ^5.4
- symfony/monolog-bundle: ^3.0
- symfony/phpunit-bridge: ^5.4
- symfony/profiler-pack: ^1.0
- symfony/twig-bundle: ^5.4
Suggests
- dragonmantank/cron-expression: Require if you use CronExpressionType.
README
关于
为Doctrine和MYSQL平台提供的一些额外功能。
发布
安装
此包通过 composer 提供,在 packagist 上找到。
运行: composer require webonaute/doctrine-mysql-extra 1.0
文档
Doctrine配置
doctrine:
dbal:
default_connection: default
connections:
default:
platform_service: 'Webonaute\DoctrineMysqlExtra\Doctrine\DBAL\Platforms\MySql57Platform'
server_version: '5.7'
#platform_service: 'Webonaute\DoctrineMysqlExtra\Doctrine\DBAL\Platforms\MySql80Platform'
#server_version: '80'
types:
numeric: Webonaute\DoctrineMysqlExtra\Doctrine\DBAL\Types\NumericType
cron_expression: Webonaute\DoctrineMysqlExtra\Doctrine\DBAL\Types\CronExpressionType
orm:
entity_managers:
default:
dql:
datetime_functions:
now: Webonaute\DoctrineMysqlExtra\Doctrine\ORM\Query\Now
utc_timestamp: Webonaute\DoctrineMysqlExtra\Doctrine\ORM\Query\UtcTimestamp
对于symfony用户,请在services.yml中声明要使用的服务。
services:
Webonaute\DoctrineMysqlExtra\Doctrine\DBAL\Platforms\MySql57Platform: ~
许可证
查看 LICENSE。