Skip to content

Commit

Permalink
Merge branch 'main' into workflow-release
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Sep 9, 2024
2 parents 043a11e + e75e940 commit cc54992
Show file tree
Hide file tree
Showing 2,054 changed files with 1,782 additions and 119,278 deletions.
17 changes: 17 additions & 0 deletions .ddev/commands/web/magerun
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

## Description: Execute n98-magerun
## Usage: magerun
## Example: "ddev magerun"

if [ ! -f vendor/bin/n98-magerun ]; then
read -r -p "n98-magerun is not installed. Do you want to install it? [y/N] " INSTALL_MAGERUN
INSTALL_MAGERUN=${INSTALL_MAGERUN,,} # to lower
if [[ "${INSTALL_MAGERUN}" =~ ^(yes|y) ]]; then
composer require --dev n98/magerun:dev-develop
else
exit 1
fi
fi

php -d error_reporting="E_ALL ^E_DEPRECATED" vendor/bin/n98-magerun "$@"
Empty file modified .ddev/commands/web/openmage-admin
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@
'phpstan':
- changed-files:
- any-glob-to-any-file: [
.phpstan*,
phpstan*,
.github/workflows/phpstan.yml
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:

- name: Get changed files
id: changed-files-specific
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
files: |
composer.*
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,8 @@ name: "CodeQL"

on:
workflow_call:
# Allow manually triggering the workflow.
workflow_dispatch:
push:
branches: [ "main", "next", "v19" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "next", "v19" ]
paths-ignore:
- '**/*.md'
- '**/*.txt'

jobs:
analyze:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
name: Labeler
on:
pull_request_target:
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
triage:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:

- name: PHPCodeSniffer
run: php vendor/bin/phpcs -s --report=full --standard=${{ matrix.rules.path }}
continue-on-error: ${{ matrix.rules.path != '.phpcs.xml.dist' }}
continue-on-error: ${{ matrix.rules.path == '.phpcs.ecg.xml.dist' }}
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.3']
php-versions: ['7.4', '8.4']

steps:
- name: Setup PHP
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/syntax-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
php: ['7.4', '8.3']
php: ['7.4', '8.4']

name: PHP Syntax ${{ matrix.php }}

Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
/dev/openmage/docker-magento
/dev/openmage/.env
/dev/openmage/Caddyfile
/dev/tests/functional/generated
/dev/tests/functional/vendor

/media/*
!/media/.htaccess
Expand Down Expand Up @@ -72,8 +70,11 @@
.phpcs*.xml
!.phpcs*.xml.dist

# PhpStan
.phpstan*.neon
phpstan*.neon
!phpstan.dist.*.neon
!.phpstan.dist.neon
!.phpstan.dist.*.neon

# dev scripts loaded via composer
/shell/update-copyright.php
Expand Down
12 changes: 12 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
*/
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
// PHP arrays should be declared using the configured syntax.
'array_syntax' => ['syntax' => 'short'],
// There MUST be one blank line after the namespace declaration.
'blank_line_after_namespace' => true,
// Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line.
Expand All @@ -17,6 +20,8 @@
'class_definition' => true,
// Remove extra spaces in a nullable typehint.
'compact_nullable_typehint' => true,
// Concatenation should be spaced according to configuration.
'concat_space' => ['spacing' => 'one'],
// The PHP constants `true`, `false`, and `null` MUST be written using the correct casing.
'constant_case' => true,
// Equal sign in declare statement should be surrounded by spaces or not following configuration.
Expand All @@ -33,6 +38,8 @@
'indentation_type' => true,
// All PHP files must use same line ending.
'line_ending' => true,
// Use && and || logical operators instead of and and or.
'logical_operators' => true,
// Cast should be written in lower case.
'lowercase_cast' => true,
// PHP keywords MUST be in lower case.
Expand All @@ -41,6 +48,8 @@
'lowercase_static_reference' => true,
// In method arguments and method call, there MUST NOT be a space before each comma and there MUST be one space after each comma. Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line.
'method_argument_space' => true,
// Replaces intval, floatval, doubleval, strval and boolval function calls with according type casting operator.
'modernize_types_casting' => true,
// All instances created with new keyword must be followed by braces.
'new_with_braces' => true,
// There should be no empty lines after class opening brace.
Expand Down Expand Up @@ -83,6 +92,8 @@
'single_import_per_statement' => true,
// Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block.
'single_line_after_imports' => true,
// Convert double quotes to single quotes for simple strings.
'single_quote' => true,
// Each trait `use` must be done as single statement.
'single_trait_insert_per_statement' => true,
// A case should be followed by a colon and not a semicolon.
Expand All @@ -98,6 +109,7 @@
PhpCsFixer\Finder::create()
->in([
'app/code/core/Mage/',
'errors/',
'lib/Mage/',
'lib/Magento/',
'lib/Varien/',
Expand Down
5 changes: 5 additions & 0 deletions .phpcs.ecg.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<file>install.php</file>
<file>app/Mage.php</file>
<file>app/code/core/Mage/</file>
<file>errors/</file>
<file>lib/Mage/</file>
<file>lib/Magento/</file>
<file>lib/Varien/</file>
Expand Down Expand Up @@ -66,6 +67,7 @@
<exclude-pattern>*/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Catalog/Model/Resource/Product/Option/Value.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/CatalogIndex/Model/Indexer.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/CatalogInventory/Model/Observer.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/CatalogInventory/Model/Api2/Stock/Item/Rest.php*</exclude-pattern>
Expand Down Expand Up @@ -111,6 +113,7 @@
<exclude-pattern>*/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Grouped.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/ImportExport/Model/Import/Proxy/Product/Resource.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Index/controllers/Adminhtml/ProcessController.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Index/Model/Observer.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Index/Model/Process.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Index/Model/Resource/Event.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Log/Model/Resource/Log.php*</exclude-pattern>
Expand Down Expand Up @@ -148,6 +151,7 @@
<exclude-pattern>*/core/Mage/Sales/Model/Order/Shipment.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/SalesRule/Model/Observer.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/SalesRule/Model/Rule.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/SalesRule/Model/Coupon/Massgenerator.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Tag/controllers/IndexController.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Tag/Model/Api.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/Tag/Model/Resource/Product/Collection.php*</exclude-pattern>
Expand All @@ -163,6 +167,7 @@
<exclude-pattern>*/lib/Varien/Cache/Backend/Memcached.php*</exclude-pattern>
<exclude-pattern>*/lib/Varien/Convert/Parser/Csv.php*</exclude-pattern>
<exclude-pattern>*/lib/Varien/Object/Cache.php*</exclude-pattern>
<exclude-pattern>*/shell/indexer.php*</exclude-pattern>
<exclude-pattern>*/core/Mage/*/data/*</exclude-pattern>
<exclude-pattern>*/core/Mage/*/sql/*</exclude-pattern>
</rule>
Expand Down
54 changes: 54 additions & 0 deletions .phpcs.php.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<file>install.php</file>
<file>app/Mage.php</file>
<file>app/code/core/Mage/</file>
<file>errors/</file>
<file>lib/Mage/</file>
<file>lib/Magento/</file>
<file>lib/Varien/</file>
Expand All @@ -18,4 +19,57 @@
<exclude-pattern>*/Varien/Db/Tree.php*</exclude-pattern>
<exclude-pattern>*/Varien/Directory/Collection.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_blowfishDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_mode_cbcDeprecatedRemoved">
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_mode_ecbDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_randDeprecatedRemoved">
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_enc_get_iv_sizeDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_enc_get_key_sizeDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_genericDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_generic_deinitDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_generic_initDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_module_closeDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_module_openDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mdecrypt_genericDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
</ruleset>
1 change: 1 addition & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<file>install.php</file>
<file>app/Mage.php</file>
<file>app/code/core/Mage/</file>
<file>errors/</file>
<file>lib/Mage/</file>
<file>lib/Magento/</file>
<file>lib/Varien/</file>
Expand Down
Loading

0 comments on commit cc54992

Please sign in to comment.