Skip to content

Commit

Permalink
Merge branch '1.9.4.x' into phpstan/mage-backup
Browse files Browse the repository at this point in the history
# Conflicts:
#	.gitignore
#	app/code/core/Mage/Backup/Helper/Data.php
#	app/code/core/Mage/Backup/Model/Backup.php
#	app/code/core/Mage/Backup/etc/adminhtml.xml
#	app/code/core/Mage/Backup/etc/config.xml
#	lib/Mage/Backup.php
#	lib/Mage/Backup/Archive/Tar.php
#	lib/Mage/Backup/Db.php
#	lib/Mage/Backup/Exception.php
#	lib/Mage/Backup/Exception/CantLoadSnapshot.php
#	lib/Mage/Backup/Exception/FtpConnectionFailed.php
#	lib/Mage/Backup/Exception/FtpValidationFailed.php
#	lib/Mage/Backup/Exception/NotEnoughFreeSpace.php
#	lib/Mage/Backup/Exception/NotEnoughPermissions.php
#	lib/Mage/Backup/Filesystem.php
#	lib/Mage/Backup/Filesystem/Helper.php
#	lib/Mage/Backup/Filesystem/Rollback/Abstract.php
#	lib/Mage/Backup/Filesystem/Rollback/Fs.php
#	lib/Mage/Backup/Filesystem/Rollback/Ftp.php
#	lib/Mage/Backup/Interface.php
#	lib/Mage/Backup/Media.php
#	lib/Mage/Backup/Nomedia.php
#	lib/Mage/Backup/Snapshot.php
  • Loading branch information
sreichel committed Dec 30, 2022
2 parents 667dd5c + ebabcf8 commit e672935
Show file tree
Hide file tree
Showing 501 changed files with 1,011 additions and 1,463 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,46 +88,46 @@ jobs:
- name: Run step if any file(s) changed
id: all
if: steps.changed-files-specific.outputs.any_changed == 'true'
if: steps.changed-files-specific.outputs.any_modified == 'true'
run: |
echo "One or more files have changed."
count="$(grep -oE "composer.*" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "composer.*" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count Composer file(s) changed"
echo "composer=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "*.php" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "*.php" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count PHP file(s) changed"
echo "php=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "*.xml" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "*.xml" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count XML file(s) changed"
echo "xml=$count" >> $GITHUB_OUTPUT
count="$(grep -oE ".github/workflows/**" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE ".github/workflows/**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count Workflow file(s) changed"
echo "workflow=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "**phpcs**" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "**phpcs**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count PHPCS file(s) changed"
echo "phpcs=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "**php-cs-fixer**" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "**php-cs-fixer**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count PHP-CS-Fixer file(s) changed"
echo "php-cs-fixer=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "**phpstan**" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "**phpstan**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count PHPStan file(s) changed"
echo "phpstan=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "dev/tests/" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "dev/tests/" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count UnitTest test file(s) changed"
echo "phpunit-test=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "dev/phpunit*" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "dev/phpunit*" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count UnitTest file(s) changed"
echo "phpunit=$count" >> $GITHUB_OUTPUT
count="$(grep -oE "dev/sonar*" <<< "${{ steps.changed-files-specific.outputs.all_changed_files }}" | wc -l)"
count="$(grep -oE "dev/sonar*" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
echo "$count Sonar file(s) changed"
echo "sonar=$count" >> $GITHUB_OUTPUT
11 changes: 3 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@
phpstan*.neon
!phpstan.dist.*.neon

# Ignore Mage_Backup
/app/code/core/Mage/Adminhtml/Block/Backup/
/app/code/core/Mage/Adminhtml/Block/Backup.php
/app/code/core/Mage/Backup/
/app/design/adminhtml/default/default/template/backup/
/app/etc/modules/Mage_Backup.xml
/lib/Mage/Backup/
/lib/Mage/Backup.php
# dev scripts loaded via composer
/shell/update-copyright.php
/shell/translations.php
125 changes: 125 additions & 0 deletions .phpmd.dist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0"?>
<ruleset name="Custom ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
OpenMage ruleset
</description>

<!-- UNUSEDCODE
UnusedFormalParameter [fixed]
UnusedLocalVariable
UnusedPrivateField
UnusedPrivateMethod
-->
<rule ref="rulesets/unusedcode.xml" />

<!-- CLEANCODE
BooleanArgumentFlag
ElseExpression
ErrorControlOperator
DuplicatedArrayKey
IfStatementAssignment
MissingImport
StaticAccess
UndefinedVariable
-->
<rule ref="rulesets/cleancode.xml">
<exclude name="BooleanArgumentFlag" />
<exclude name="ElseExpression" /> <!-- can be fixed in some cases -->
<exclude name="IfStatementAssignment" /> <!-- can be fixed -->
<exclude name="MissingImport" /> <!-- can be fixed -->
<exclude name="StaticAccess" />
<exclude name="UndefinedVariable" /> <!-- can be fixed -->
</rule>
<rule ref="rulesets/cleancode.xml/MissingImport">
<properties>
<property name="ignore-global" value="true" />
</properties>
</rule>

<!-- CONTROVERSIAL
CamelCaseClassName
CamelCaseMethodName
CamelCaseParameterName
CamelCasePropertyName
CamelCaseVariableName
Superglobals
-->
<rule ref="rulesets/controversial.xml/CamelCaseMethodName">
<properties>
<property name="allow-underscore" value="true" />
</properties>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseParameterName" />
<rule ref="rulesets/controversial.xml/CamelCasePropertyName">
<properties>
<property name="allow-underscore" value="true" />
</properties>
</rule>
<rule ref="rulesets/controversial.xml/CamelCaseVariableName">
<properties>
<property name="allow-underscore" value="true" />
</properties>
</rule>
<rule ref="rulesets/controversial.xml/Superglobals" />

<!-- NAMEING
BooleanGetMethodName
ConstantNamingConventions
ConstructorWithNameAsEnclosingClass
LongClassName
ShortClassName
LongVariable
ShortVariable
ShortMethodName
-->
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="exceptions" value="a,b,e,id,idx,io,ip,to,x,y,x1,x2,y1,y2" />
</properties>
</rule>

<!-- DESIGN
CountInLoopExpression
CouplingBetweenObjects
DepthOfInheritance
DevelopmentCodeFragment
EmptyCatchBlock
EvalExpression
ExitExpression
GotoStatement
NumberOfChildren
-->
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects" />
<exclude name="DepthOfInheritance" />
<exclude name="NumberOfChildren" />
</rule>

<!-- CODESIZE
ExcessiveClassComplexity
ExcessiveClassLength
ExcessiveMethodLength
ExcessiveParameterList
ExcessivePublicCount
CyclomaticComplexity
NPathComplexity
TooManyFields
TooManyMethods
TooManyPublicMethods
-->
<rule ref="rulesets/codesize.xml">
<exclude name="CyclomaticComplexity" />
<exclude name="ExcessiveClassComplexity" />
<exclude name="ExcessiveClassLength" />
<exclude name="ExcessiveMethodLength" />
<exclude name="ExcessivePublicCount" />
<exclude name="NPathComplexity" />
<exclude name="TooManyFields" />
<exclude name="TooManyMethods" />
<exclude name="TooManyPublicMethods" />
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ Most important changes will be listed here, all other changes since `19.4.0` can
- bug fixes and PHP 7.x, 8.0 and 8.1 compatibility
- added config cache for system.xml [#1916](https://github.com/OpenMage/magento-lts/pull/1916)
- search for "NULL" in backend grids [#1203](https://github.com/OpenMage/magento-lts/pull/1203)
- removed lib/flex containing unused ActionScript "file uploader" files [#2271](https://github.com/OpenMage/magento-lts/pull/2271)
- removed modules:
- `Mage_Backup` [#2811](https://github.com/OpenMage/magento-lts/pull/2811)
- `Mage_Compiler`
Expand All @@ -123,7 +124,6 @@ Do not use 20.x.x if you need IE support.
- added redis as a valid option for `global/session_save` [#1513](https://github.com/OpenMage/magento-lts/pull/1513)
- reduce needless saves by avoiding setting `_hasDataChanges` flag [#2066](https://github.com/OpenMage/magento-lts/pull/2066)
- removed support for `global/sales/old_fields_map` defined in XML [#921](https://github.com/OpenMage/magento-lts/pull/921)
- removed lib/flex containing unused ActionScript "file uploader" files [#2271](https://github.com/OpenMage/magento-lts/pull/2271)
- enabled website level config cache [#2355](https://github.com/OpenMage/magento-lts/pull/2355)
- make overrides of Mage_Core_Model_Resource_Db_Abstract::delete respect parent api [#1257](https://github.com/OpenMage/magento-lts/pull/1257)

Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Admin/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Admin
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Admin/Model/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Mage
* @package Mage_Admin
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org)
* @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Admin/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @category Mage
* @package Mage_Admin
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2018 The OpenMage Contributors (https://www.openmage.org)
* @copyright Copyright (c) 2018-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
-->
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/AdminNotification/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @category Mage
* @package Mage_AdminNotification
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
-->
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Adminhtml/Block/Api/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org)
* @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org)
* @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
* @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org)
* @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org)
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

Expand Down
Loading

0 comments on commit e672935

Please sign in to comment.