Skip to content

Commit a92c66d

Browse files
authored
Merge pull request #375 from cakephp/6.x-i18n-cleanup
cleanup underscore properties in I18n package
2 parents f7bdbf7 + efaa51f commit a92c66d

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php-version: ['8.1', '8.2', '8.3', '8.4']
16+
php-version: ['8.2', '8.3', '8.4']
1717
prefer-lowest: ['']
1818
include:
19-
- php-version: '8.1'
19+
- php-version: '8.2'
2020
prefer-lowest: 'prefer-lowest'
2121

2222
steps:
@@ -47,27 +47,27 @@ jobs:
4747
run: |
4848
if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
4949
make install-dev-lowest
50-
elif ${{ matrix.php-version == '8.1' }}; then
50+
elif ${{ matrix.php-version == '8.2' }}; then
5151
make install-dev-ignore-reqs
5252
else
5353
make install-dev
5454
fi
5555
5656
- name: Setup problem matchers for PHPUnit
57-
if: matrix.php-version == '8.1'
57+
if: matrix.php-version == '8.2'
5858
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5959

6060
- name: Run PHPUnit
6161
run: |
62-
if [[ "${{ matrix.php-version }}" == "8.1" && "${{ matrix.prefer-lowest }}" != "prefer-lowest" ]]; then
62+
if [[ "${{ matrix.php-version }}" == "8.2" && "${{ matrix.prefer-lowest }}" != "prefer-lowest" ]]; then
6363
export CODECOVERAGE=1
6464
vendor/bin/phpunit --display-incomplete --display-skipped --coverage-clover=coverage.xml
6565
else
6666
vendor/bin/phpunit
6767
fi
6868
6969
- name: Submit code coverage
70-
if: matrix.php-version == '8.1' && matrix.prefer-lowest != 'prefer-lowest'
70+
if: matrix.php-version == '8.2' && matrix.prefer-lowest != 'prefer-lowest'
7171
uses: codecov/codecov-action@v5
7272

7373
cs-stan:
@@ -80,7 +80,7 @@ jobs:
8080
- name: Setup PHP
8181
uses: shivammathur/setup-php@v2
8282
with:
83-
php-version: '8.1'
83+
php-version: '8.2'
8484
extensions: mbstring, intl
8585
tools: cs2pr
8686
coverage: none

config/rector/sets/cakephp60.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
'Controller' => [
104104
'Cake\Controller\ComponentRegistry' => ['_Controller'],
105105
'Cake\Controller\Controller' => ['_components'],
106+
'Cake\Controller\Component' => ['_registry'],
106107
],
107108
'Core' => [
108109
'Cake\Core\Configure\Engine\IniConfig' => ['_extension', '_section'],
@@ -234,6 +235,20 @@
234235
'Cake\Http\Session\CacheSession' => ['_options'],
235236
],
236237

238+
'I18n' => [
239+
'Cake\I18n\MessagesFileLoader' => ['_name', '_plugin', '_locale', '_extension'],
240+
'Cake\I18n\ChainMessagesLoader' => ['_loaders'],
241+
// Can't rename _toStringFormat as it conflicts with ChronosDate::toStringFormat
242+
'Cake\I18n\Date' => ['_jsonEncodeFormat'],
243+
// Can't rename _toStringFormat as it conflicts with Chronos::toStringFormat
244+
'Cake\I18n\DateTime' => ['_jsonEncodeFormat'],
245+
// Can't rename _toStringFormat as it conflicts with ChronosTime::toStringFormat
246+
'Cake\I18n\Time' => ['_jsonEncodeFormat'],
247+
'Cake\I18n\I18n' => ['_collection', '_defaultLocale'],
248+
'Cake\I18n\Number' => ['_formatters', '_defaultCurrency', '_defaultCurrencyFormat'],
249+
'Cake\I18n\TranslatorRegistry' => ['_loaders', '_defaultFormatter', '_useFallback', '_cacher'],
250+
],
251+
237252
'ORM' => [
238253
'Cake\ORM\Association' => [
239254
'_name', '_className', '_bindingKey', '_foreignKey', '_conditions',

0 commit comments

Comments
 (0)