oro/doctrine-extensions
Adds extra Doctrine DQL functions and field types for MySQL and PostgreSQL (e.g., DATE/TIME, TIMESTAMPDIFF, CONVERT_TZ, DAY/WEEK/MONTH, MD5). Includes registration examples for common frameworks and guidance for extending platforms/functions.
This major release brings full compatibility with Doctrine ORM 3.0, representing a significant modernization of the library to support the latest PHP and Doctrine ecosystem standards.
The following method signatures have been updated. If you have created custom functions by extending library classes, you may need to update your code:
FunctionFactory::create(string $platformName, string $functionName, array $parameters): PlatformFunctionNodeCast#checkType($type) has been replaced with isSupportedType(string $type): boolTimestampDiff#checkUnit($unit) has been replaced with isSupportedUnit(string $unit): boolAbstractTimestampAwarePlatformFunctionNode#getTimestampValue($expression, SqlWalker $sqlWalker): stringIf you only registered the functions and types provided by this library with Doctrine, most likely you do not need to make any changes to your code. Simply update your composer.json:
{
"require": {
"oro/doctrine-extensions": "^3.0"
}
}
This release was made possible by the Oro team and community contributors who worked to ensure compatibility with Doctrine ORM 3.0. Special thanks to all who tested the alpha and beta releases.
If you encounter any issues with this release, please report them on our GitHub Issues page.
Full Changelog: https://github.com/oroinc/doctrine-extensions/compare/2.0.5...3.0
Full Changelog: https://github.com/oroinc/doctrine-extensions/compare/3.0-alpha4...3.0-beta1
Full Changelog: https://github.com/oroinc/doctrine-extensions/compare/2.0.4...2.0.5
Full Changelog: https://github.com/oroinc/doctrine-extensions/compare/3.0-alpha3...3.0-alpha4
Full Changelog: https://github.com/oroinc/doctrine-extensions/compare/3.0-alpha2...3.0-alpha3
Updated composer.json
In this release will be introduced compatibility with latest versions of Doctrine Moved to latest PHPUnit
Fixed Issue #78 Error when using DATE_FORMAT when used with PHP 8
Fixed Issue #78 Error when using DATE_FORMAT when used with PHP 8
Fixed Issue #78 Error when using DATE_FORMAT when used with PHP 8
Version 2.0.0 requires:
If you just registered the functions and types provided by this library with Doctrine then most likely you do not need to make any changes in your code.
If you have created your own custom functions or types by extending any classes from this library, or if you work with these functions and types directly from your PHP code, then you may need to update your code. Check the upgrade instructions in UPGRADE.md for details.
Usage in DQL CAST(value as binary). Will produce next SQL:
CAST(value as binary)CAST(value as bytea)Minimum PHP version update to 5.4
Usage in DQL CAST(value as binary). Will produce next SQL:
CAST(value as binary)CAST(value as bytea)Minimum PHP version update to 5.4
The DATE_FORMAT() function formats a date as specified by a format mask.
Note! Starting this release new features will be with minor version change
Fixed issue #19
Added CAST to JSON on supported platforms, for others will be casted as string
Added CONCAT_WS support
How can I help you explore Laravel packages today?