Skip to content

Commit 3ecaedc

Browse files
committed
Merge branch 'cspModule' of https://github.com/hanmac/magento-lts into pr/Hanmac/4753
2 parents 1fafee8 + a2faf6d commit 3ecaedc

File tree

188 files changed

+1117
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+1117
-214
lines changed

.all-contributorsrc

+10
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,16 @@
16791679
"contributions": [
16801680
"review"
16811681
]
1682+
},
1683+
{
1684+
"login": "gdemarsico",
1685+
"name": "Gastón De Mársico",
1686+
"avatar_url": "https://avatars.githubusercontent.com/u/2066819?v=4",
1687+
"profile": "https://github.com/gdemarsico",
1688+
"contributions": [
1689+
"code",
1690+
"bug"
1691+
]
16821692
}
16831693
],
16841694
"commitType": "docs"

.github/workflows/check-files.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ on:
3434
description: "Count changed PHPStan files"
3535
value: ${{ jobs.check.outputs.phpstan }}
3636
phpunit-test:
37-
description: "Count changed PhpUnit test files"
37+
description: "Count changed PHPUnit test files"
3838
value: ${{ jobs.check.outputs.phpunit-test }}
3939
phpunit:
40-
description: "Count changed PhpUnit files"
40+
description: "Count changed PHPUnit files"
4141
value: ${{ jobs.check.outputs.phpunit }}
4242
# Allow manually triggering the workflow.
4343
workflow_dispatch:

.github/workflows/php-cs-fixer.yml

+15
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,20 @@ jobs:
3333
- name: Install dependencies
3434
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
3535

36+
- name: Restore result cache
37+
uses: actions/cache/restore@v4
38+
with:
39+
path: .php-cs-fixer.cache
40+
key: php-cs-fixer-result-cache-${{ github.run_id }}
41+
restore-keys: |
42+
php-cs-fixer-result-cache-
43+
3644
- name: PHP-CS-Fixer
3745
run: php vendor/bin/php-cs-fixer fix --diff --dry-run
46+
47+
- name: Save result cache
48+
uses: actions/cache/save@v4
49+
if: always()
50+
with:
51+
path: .php-cs-fixer.cache
52+
key: php-cs-fixer-result-cache-${{ github.run_id }}

.github/workflows/phpcs.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,20 @@ jobs:
3333
- name: Install dependencies
3434
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
3535

36+
- name: Restore result cache
37+
uses: actions/cache/restore@v4
38+
with:
39+
path: .phpcs.result.cache
40+
key: phpcs-result-cache-${{ github.run_id }}
41+
restore-keys: |
42+
phpcs-result-cache-
43+
3644
- name: PHPCodeSniffer
37-
run: php vendor/bin/phpcs -s -p --report=full --standard=.phpcs.dist.xml
45+
run: php vendor/bin/phpcs -s -p --cache=.phpcs.result.cache --report=full --standard=.phpcs.dist.xml
46+
47+
- name: Save result cache
48+
uses: actions/cache/save@v4
49+
if: always()
50+
with:
51+
path: .phpcs.result.cache
52+
key: phpcs-result-cache-${{ github.run_id }}

.github/workflows/phpmd.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,20 @@ jobs:
2828
- name: Install dependencies
2929
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
3030

31+
- name: Restore result cache
32+
uses: actions/cache/restore@v4
33+
with:
34+
path: .phpmd.result-cache.php
35+
key: phpmd-result-cache-${{ github.run_id }}
36+
restore-keys: |
37+
phpmd-result-cache-
38+
3139
- name: PHPMD
32-
run: php vendor/bin/phpmd app/code/core/Mage/ github .phpmd.dist.xml --baseline-file .phpmd.dist.baseline.xml
40+
run: php vendor/bin/phpmd app/code/core/Mage/ github .phpmd.dist.xml --cache --baseline-file .phpmd.dist.baseline.xml
41+
42+
- name: Save result cache
43+
uses: actions/cache/save@v4
44+
if: always()
45+
with:
46+
path: .phpmd.result-cache.php
47+
key: phpmd-result-cache-${{ github.run_id }}

.github/workflows/phpstan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
if: always()
4949
with:
5050
path: .phpstan.cache
51-
key: phpstan-result-cache-${{ github.run_id }}
51+
key: phpstan-result-cache-${{ github.run_id }}

.github/workflows/phpunit.yml

+16-9
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,35 @@ jobs:
8686
--enable_charts 'yes' \
8787
--skip_url_validation 'yes'
8888
89+
- name: Restore result cache
90+
uses: actions/cache/restore@v4
91+
with:
92+
path: .phpunit.result.cache
93+
key: phpunit-result-cache-${{ matrix.php-versions }}-${{ matrix.mysql-version }}-${{ github.run_id }}
94+
restore-keys: |
95+
phpunit-result-cache-
96+
8997
- name: Run phpUnit
9098
run: php vendor/bin/phpunit --configuration .phpunit.dist.xml
9199

100+
- name: Save result cache
101+
uses: actions/cache/save@v4
102+
if: always()
103+
with:
104+
path: .phpunit.result.cache
105+
key: phpunit-result-cache-${{ matrix.php-versions }}-${{ matrix.mysql-version }}-${{ github.run_id }}
106+
92107
- name: Publish Unit Test Results
93108
uses: EnricoMi/publish-unit-test-result-action@v2
94109
if: always()
95110
with:
96111
github_token: ${{ secrets.GITHUB_TOKEN }}
97112
files: tests/logging/*.xml
98113

99-
- name: prepare SonarCloud Scan Data
100-
if: ${{ (matrix.php-versions == '7.4') && (matrix.mysql-version == '5.7') }}
101-
run: |
102-
head tests/coverage/clover.xml
103-
sed -i 's@'$GITHUB_WORKSPACE'/@/github/workspace/@g' tests/logging/junit.xml
104-
sed -i 's@'$GITHUB_WORKSPACE'/@/github/workspace/@g' tests/coverage/clover.xml
105-
head ./tests/coverage/clover.xml
106-
107114
- name: SonarCloud Scan
108115
uses: SonarSource/sonarcloud-github-action@master
109116
continue-on-error: true
110-
if: ${{ (matrix.php-versions == '7.4') && (matrix.mysql-version == '5.7') }} && SONAR_TOKEN
117+
if: ${{ (matrix.php-versions == '8.1') && (matrix.mysql-version == '5.7') }} && SONAR_TOKEN
111118
with:
112119
args: >
113120
-Dproject.settings=tests/sonar-project.properties

.github/workflows/rector.yml

+15
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,20 @@ jobs:
3333
- name: Install dependencies
3434
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
3535

36+
- name: Restore result cache
37+
uses: actions/cache/restore@v4
38+
with:
39+
path: .rector.result.cache
40+
key: rector-result-cache-${{ github.run_id }}
41+
restore-keys: |
42+
rector-result-cache-
43+
3644
- name: Rector
3745
run: php vendor/bin/rector process --config .rector.php --dry-run
46+
47+
- name: Save result cache
48+
uses: actions/cache/save@v4
49+
if: always()
50+
with:
51+
path: .rector.result.cache
52+
key: rector-result-cache-${{ github.run_id }}

.github/workflows/workflow.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,14 @@ jobs:
121121

122122
rector:
123123
name: Rector
124-
needs: [check, php-cs-fixer]
124+
needs: [check, php-cs-fixer, phpstan]
125125
if: |
126126
needs.check.outputs.php > 0 ||
127127
needs.check.outputs.workflow > 0
128128
uses: ./.github/workflows/rector.yml
129129

130-
# DOES NOT run by default
131-
# runs on schedule or when workflow or unit tests changed
132130
unit_tests:
133-
name: Unit Tests (OpenMage)
131+
name: PHPUnit Tests
134132
needs: [check, php-cs-fixer]
135133
if: |
136134
needs.check.outputs.php > 0 ||

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,6 @@ app/etc/includes/ddev.xhgui.php
113113

114114
# local development
115115
.localdev
116+
117+
# rector
118+
.rector.result.cache

.rector.php

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
2+
23
declare(strict_types=1);
34

5+
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
46
use Rector\CodeQuality\Rector as CodeQuality;
57
use Rector\CodingStyle\Rector as CodingStyle;
68
use Rector\Config\RectorConfig;
@@ -19,6 +21,10 @@
1921

2022
try {
2123
return RectorConfig::configure()
24+
->withCache(
25+
cacheDirectory: '.rector.result.cache',
26+
cacheClass: FileCacheStorage::class,
27+
)
2228
->withPhpSets(
2329
php74: true,
2430
)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
271271
<td align="center" valign="top" width="14.28%"><a href="https://github.com/magentox"><img src="https://avatars.githubusercontent.com/u/44047835?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>magentox</b></sub></a></td>
272272
<td align="center" valign="top" width="14.28%"><a href="https://github.com/stasadev"><img src="https://avatars.githubusercontent.com/u/24270994?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Stanislav Zhuk</b></sub></a></td>
273273
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Axepih"><img src="https://avatars.githubusercontent.com/u/95623175?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Axepih</b></sub></a></td>
274+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gdemarsico"><img src="https://avatars.githubusercontent.com/u/2066819?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Gastón De Mársico</b></sub></a></td>
274275
</tr>
275276
</tbody>
276277
</table>

app/code/core/Mage/Admin/Model/Resource/Acl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Admin
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2019-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2019-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Admin/Model/Resource/User.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Admin
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2017-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2017-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Page/Menu.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2020-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2020-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Report/Grid.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2020-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2020-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2017-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2017-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/System/Config/Form.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2016-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2016-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2020-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2020-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Helper/Rss.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Model/Config/Data.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2019-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2019-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2017-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2017-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2022-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2022-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2019-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2019-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Adminhtml
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2021-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2021-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @category Mage
1111
* @package Mage_Api
1212
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13-
* @copyright Copyright (c) 2020-2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @copyright Copyright (c) 2020-2025 The OpenMage Contributors (https://www.openmage.org)
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

0 commit comments

Comments
 (0)