Skip to content

Commit

Permalink
Merge branch 'main' into patch-17
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel authored Sep 10, 2024
2 parents 8966330 + 1be5f17 commit d832611
Show file tree
Hide file tree
Showing 2,316 changed files with 13,523 additions and 126,330 deletions.
27 changes: 27 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,15 @@
"code"
]
},
{
"login": "Sdfendor",
"name": "Kevin Jakob",
"avatar_url": "https://avatars.githubusercontent.com/u/2728018?v=4",
"profile": "https://github.com/Sdfendor",
"contributions": [
"code"
]
},
{
"login": "leissbua",
"name": "Michael Leiss",
Expand All @@ -1445,6 +1454,24 @@
"contributions": [
"code"
]
},
{
"login": "ma4nn",
"name": "Christoph Massmann",
"avatar_url": "https://avatars.githubusercontent.com/u/26252058?v=4",
"profile": "https://www.vianetz.com/",
"contributions": [
"code"
]
},
{
"login": "ragnese",
"name": "Rob Agnese",
"avatar_url": "https://avatars.githubusercontent.com/u/7927565?v=4",
"profile": "https://github.com/ragnese",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7
Expand Down
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 .ddev/web-build/openmage.cron
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* * * * * /var/www/html/cron.sh
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@v42
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", "v20", "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
57 changes: 57 additions & 0 deletions .github/workflows/update-copyright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Update Copyright

on:
# Run automatically every month.
schedule:
- cron: '0 0 1 * *'
workflow_call:
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
update_copyright:
name: Update Copyright
runs-on: [ubuntu-latest]

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4

- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*

- name: Update Copyright
run: php -f shell/update-copyright.php

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: update copyright
title: Updated Copyright
body: |
- Updated copyright
Auto-generated by [openmage/dev-copyright][1]
[1]: https://github.com/OpenMage/dev-copyright
branch: update-copyright
base: main
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
# https://github.com/OpenMage/magento-lts/pull/1012
/dev/openmage/docker-magento
/dev/openmage/.env
/dev/tests/functional/generated
/dev/tests/functional/vendor
/dev/openmage/Caddyfile

/media/*
!/media/.htaccess
Expand Down Expand Up @@ -71,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
14 changes: 14 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 All @@ -63,6 +72,8 @@
'no_trailing_whitespace_in_comment' => true,
// Remove trailing whitespace at the end of blank lines.
'no_whitespace_in_blank_line' => true,
// Adds or removes ? before single type declarations or |null at the end of union types when parameters have a default null value.
'nullable_type_declaration_for_default_null_value' => true,
// Orders the elements of classes/interfaces/traits.
'ordered_class_elements' => false,
// Ordering `use` statements.
Expand All @@ -81,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 @@ -96,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 d832611

Please sign in to comment.