-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from PrestaShop/develop
Merge `develop` into `master`
- Loading branch information
Showing
68 changed files
with
9,648 additions
and
3,488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# In all environments, the following files are loaded if they exist, | ||
# the latter taking precedence over the former: | ||
# | ||
# * .env contains default values for the environment variables needed by the app | ||
# * .env.local uncommitted file with local overrides | ||
# * .env.$APP_ENV committed environment-specific defaults | ||
# * .env.$APP_ENV.local uncommitted environment-specific overrides | ||
# | ||
# Real environment variables win over .env files. | ||
# | ||
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. | ||
# https://symfony.com/doc/current/configuration/secrets.html | ||
# | ||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). | ||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration | ||
|
||
###> symfony/framework-bundle ### | ||
APP_ENV=dev | ||
APP_SECRET=329c08089dae58b62725c9bd011e847c | ||
###< symfony/framework-bundle ### | ||
|
||
###> doctrine/doctrine-bundle ### | ||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url | ||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml | ||
# | ||
DATABASE_URL= | ||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" | ||
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=8.0.32&charset=utf8mb4" | ||
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" | ||
###< doctrine/doctrine-bundle ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# define your env variables for the test env here | ||
KERNEL_CLASS='App\Kernel' | ||
APP_SECRET='$ecretf0rt3st' | ||
SYMFONY_DEPRECATIONS_HELPER=999999 | ||
PANTHER_APP_ENV=panther | ||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots | ||
|
||
DATABASE_URL="mysql://root:[email protected]:3306/qanightlyresults?serverVersion=8.0.23&charset=utf8mb4" | ||
|
||
QANB_GCPURL=https://storage.googleapis.com/prestashop-core-nightly/ | ||
QANB_TOKEN='AZERTY' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: composer | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: monday | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
target-branch: develop | ||
reviewers: | ||
- "PrestaShop/ui-tests-maintainers" | ||
labels: | ||
- "dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: PHP | ||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
php-cs-fixer: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
name: PHP CS Fixer | ||
runs-on: ubuntu-latest | ||
env: | ||
APP_ENV: ci | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Config | ||
run: cp .env.dist .env | ||
|
||
- name: Validate composer config | ||
run: composer validate --strict | ||
|
||
- name: Composer Install | ||
run: composer install --ansi --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Run PHPCSFixer | ||
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff | ||
|
||
- name: Run ergebnis/composer-normalize | ||
run: composer normalize --dry-run --no-check-lock | ||
phpstan: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
name: PHP Static Analysis | ||
runs-on: ubuntu-latest | ||
env: | ||
APP_ENV: ci | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Config | ||
run: cp .env.dist .env | ||
|
||
- name: Composer Install | ||
run: composer install --ansi --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Run phpstan | ||
run: ./vendor/bin/phpstan analyse | ||
phpunit: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
name: PHPUnit | ||
runs-on: ubuntu-latest | ||
env: | ||
APP_ENV: test | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup MySQL | ||
uses: mirromutth/[email protected] | ||
with: | ||
mysql version: '8.0' | ||
mysql database: 'qanightlyresults' | ||
mysql root password: 'password' | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Config | ||
run: cp .env.dist .env | ||
|
||
- name: Composer Install | ||
run: composer install --ansi --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Change MySQL authentication method | ||
run: sleep 15 && mysql -h127.0.0.1 -uroot -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;" | ||
|
||
- name: Setup database | ||
run: php bin/console doctrine:schema:update --dump-sql --force --env=test | ||
|
||
- name: Inject data for AutoUpgrade | ||
run: | | ||
DATE=$(date -d "2 days ago" +"%Y-%m-%d") | ||
php bin/console nightly:import autoupgrade_$DATE-develop.json\ | ||
-p cli \ | ||
-c autoupgrade \ | ||
--env test | ||
- name: Inject data for Core | ||
run: | | ||
DATE=$(date -d "2 days ago" +"%Y-%m-%d") | ||
php bin/console nightly:import $DATE-develop.json\ | ||
-p chromium \ | ||
-c functional \ | ||
--env test | ||
- name: Run phpunit | ||
run: ./vendor/bin/phpunit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,29 @@ | ||
.idea/ | ||
vendor/** | ||
.php_cs.cache | ||
|
||
###> symfony/framework-bundle ### | ||
/.env | ||
/.env.local | ||
/.env.local.php | ||
/.env.*.local | ||
/config/secrets/prod/prod.decrypt.private.php | ||
/public/bundles/ | ||
/var/ | ||
/vendor/ | ||
###< symfony/framework-bundle ### | ||
|
||
###> symfony/phpunit-bridge ### | ||
.phpunit.result.cache | ||
/phpunit.xml | ||
###< symfony/phpunit-bridge ### | ||
|
||
###> phpunit/phpunit ### | ||
/phpunit.xml | ||
.phpunit.result.cache | ||
###< phpunit/phpunit ### | ||
|
||
###> friendsofphp/php-cs-fixer ### | ||
/.php-cs-fixer.php | ||
/.php-cs-fixer.cache | ||
###< friendsofphp/php-cs-fixer ### | ||
|
||
###> phpstan/phpstan ### | ||
###< phpstan/phpstan ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
ini_set('memory_limit','256M'); | ||
|
||
$finder = PhpCsFixer\Finder::create()->in([ | ||
__DIR__.'/src', | ||
__DIR__.'/migrations', | ||
__DIR__.'/public', | ||
__DIR__.'/tests', | ||
]); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'array_indentation' => true, | ||
'cast_spaces' => [ | ||
'space' => 'single', | ||
], | ||
'combine_consecutive_issets' => true, | ||
'concat_space' => [ | ||
'spacing' => 'one', | ||
], | ||
'error_suppression' => [ | ||
'mute_deprecation_error' => false, | ||
'noise_remaining_usages' => false, | ||
'noise_remaining_usages_exclude' => [], | ||
], | ||
'function_to_constant' => false, | ||
'method_chaining_indentation' => true, | ||
'no_alias_functions' => false, | ||
'no_superfluous_phpdoc_tags' => false, | ||
'non_printable_character' => [ | ||
'use_escape_sequences_in_strings' => true, | ||
], | ||
'phpdoc_align' => [ | ||
'align' => 'left', | ||
], | ||
'phpdoc_summary' => false, | ||
'protected_to_private' => false, | ||
'psr_autoloading' => false, | ||
'self_accessor' => false, | ||
'yoda_style' => false, | ||
'single_line_throw' => false, | ||
'no_alias_language_construct_call' => false, | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile(__DIR__.'/var/.php_cs.cache'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use App\Kernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
|
||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { | ||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); | ||
} | ||
|
||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; | ||
|
||
return function (array $context) { | ||
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); | ||
|
||
return new Application($kernel); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!ini_get('date.timezone')) { | ||
ini_set('date.timezone', 'UTC'); | ||
} | ||
|
||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { | ||
if (PHP_VERSION_ID >= 80000) { | ||
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit'; | ||
} else { | ||
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); | ||
require PHPUNIT_COMPOSER_INSTALL; | ||
PHPUnit\TextUI\Command::main(); | ||
} | ||
} else { | ||
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { | ||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; | ||
exit(1); | ||
} | ||
|
||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php'; | ||
} |
Oops, something went wrong.