mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
* Fix #19467: Revert changes in `Inflector::camel2words()` introduced in #19204 * Add UPGRADE note
This commit is contained in:
committed by
GitHub
parent
59f69fc9cd
commit
9c4c36ee72
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.46 under development
|
||||
------------------------
|
||||
|
||||
- Bug #19467: Revert changes in `Inflector::camel2words()` introduced in #19204 (samdark)
|
||||
- Bug #19471: Enable console commands on hostings with disabled `exec()` function (WinterSilence, lubosdz)
|
||||
- Bug #19469: Fix a virtual relation not working because of new isset checks in `\yii\db\ActiveRelationTrait` (wvanheumen)
|
||||
- Bug #19380: Fix PHP 8.1 passing non string to trim() in `yii\db\Query` (wa1kb0y)
|
||||
|
||||
@ -51,6 +51,12 @@ if you want to upgrade from version A to version C and there is
|
||||
version B between A and C, you need to follow the instructions
|
||||
for both A and B.
|
||||
|
||||
Upgrade from Yii 2.0.45
|
||||
-----------------------
|
||||
|
||||
* Changes in `Inflector::camel2words()` introduced in 2.0.45 were reverted so it works as in pre-2.0.45. If you need
|
||||
2.0.45 behavior, [introduce your own method](https://github.com/yiisoft/yii2/pull/19495/files).
|
||||
|
||||
Upgrade from Yii 2.0.44
|
||||
-----------------------
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@ class BaseInflector
|
||||
}
|
||||
// Add a space before any uppercase letter preceded by a lowercase letter (xY => x Y)
|
||||
// and any uppercase letter preceded by an uppercase letter and followed by a lowercase letter (XYz => X Yz)
|
||||
$label = preg_replace('/(?<=\p{Ll})\p{Lu}|(?<=[\p{L}\d])\p{Lu}(?=\p{Ll})|(\d+)/u', ' \0', $name);
|
||||
$label = preg_replace('/(?<=\p{Ll})\p{Lu}|(?<=\p{L})\p{Lu}(?=\p{Ll})/u', ' \0', $name);
|
||||
|
||||
$label = mb_strtolower(trim(str_replace(['-', '_', '.'], ' ', $label)), self::encoding());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user