Skip to content

Commit 4c95d0c

Browse files
authored
Merge branch '4.0' into fix/save-and-get-persister-config
2 parents 2774cbe + a6a33ce commit 4c95d0c

File tree

226 files changed

+4944
-2999
lines changed

Some content is hidden

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

226 files changed

+4944
-2999
lines changed

.github/workflows/behat.yml

Lines changed: 64 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,114 @@
11
name: Behat
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ '4.0' ]
55
pull_request:
6-
branches: [ master ]
6+
branches: [ '4.0' ]
77

88
jobs:
99
behat:
1010
runs-on: ubuntu-latest
1111
env:
1212
APP_ENV: "test"
13-
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/data_defs_test"
13+
IM_SKIP_DB_SETUP: "1"
14+
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/coreshop_test"
15+
PIMCORE_INSTALL_ADMIN_USERNAME: "admin"
16+
PIMCORE_INSTALL_ADMIN_PASSWORD: "admin"
17+
PIMCORE_INSTALL_MYSQL_HOST_SOCKET: "127.0.0.1"
18+
PIMCORE_INSTALL_MYSQL_USERNAME: "root"
19+
PIMCORE_INSTALL_MYSQL_PASSWORD: "root"
20+
PIMCORE_INSTALL_MYSQL_DATABASE: "coreshop_test"
21+
PIMCORE_INSTALL_MYSQL_PORT: "3306"
22+
PIMCORE_KERNEL_CLASS: 'Kernel'
23+
PIMCORE_CLASS_DIRECTORY: 'var/tmp/behat/var/classes'
24+
25+
strategy:
26+
matrix:
27+
php: [ 8.1, 8.2 ]
28+
pimcore: [ ^11.0 ]
29+
dependencies: [ highest ]
30+
exclude:
31+
- php: 8.1
32+
dependencies: lowest
33+
1434
services:
15-
mysql:
16-
image: mysql:5.7
35+
database:
36+
image: "mysql:8"
1737
env:
1838
MYSQL_ROOT_PASSWORD: root
19-
MYSQL_DATABASE: data_defs_test
2039
ports:
2140
- 3306:3306
2241
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
23-
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}"
24-
strategy:
25-
matrix:
26-
php: [8.0]
27-
pimcore: [^10.0, ^10.1]
42+
43+
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}"
2844

2945
steps:
30-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v3
3147

3248
- name: Install PHP
3349
uses: shivammathur/setup-php@v2
3450
with:
3551
php-version: ${{ matrix.php }}
52+
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767
3653
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib
3754

3855
- name: Check PHP Version
3956
run: php -v
4057

41-
- name: Verify MySQL connection
58+
- name: Setup DB
4259
run: |
43-
mysql --version
44-
sudo apt-get install -y mysql-client
45-
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uroot -proot -e "SHOW DATABASES"
60+
mysql --host 127.0.0.1 --port ${{ job.services.database.ports['3306'] }} -uroot -proot -e "CREATE DATABASE coreshop_test CHARSET=utf8mb4;"
4661
4762
- name: Get composer cache directory
4863
id: composer-cache
49-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
64+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
5065

5166
- name: Cache composer dependencies
52-
uses: actions/cache@v1
67+
uses: actions/cache@v3
5368
with:
5469
path: ${{ steps.composer-cache.outputs.dir }}
5570
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
5671
restore-keys: ${{ runner.os }}-composer-
5772

58-
- name: Composer install
73+
- if: matrix.dependencies == 'highest'
74+
name: Install dependencies highest
75+
run: |
76+
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
77+
composer update --no-progress --prefer-dist --optimize-autoloader
78+
79+
- if: matrix.dependencies == 'lowest'
80+
name: Install dependencies lowest
5981
run: |
6082
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
61-
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
83+
composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest
6284
6385
- name: Cache clear
6486
run: bin/console cache:clear
6587

6688
- name: Assets Install
6789
run: bin/console assets:install --symlink
6890

91+
- name: Install Pimcore
92+
run: PIMCORE_KERNEL_CLASS=Kernel vendor/bin/pimcore-install --env=test --skip-database-config
93+
94+
- name: Install DataDefinitions
95+
run: bin/console pimcore:bundle:install DataDefinitionsBundle
96+
6997
- name: Run Behat
7098
run: vendor/bin/behat --strict --no-interaction -vvv -f progress --config behat.yml.dist -p default
99+
100+
- name: Upload Behat logs
101+
uses: actions/upload-artifact@v2
102+
if: failure()
103+
with:
104+
name: "Behat logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})"
105+
path: etc/build/
106+
if-no-files-found: ignore
107+
108+
- name: Upload Pimcore logs
109+
uses: actions/upload-artifact@v2
110+
if: failure()
111+
with:
112+
name: "Pimcore logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})"
113+
path: var/log/
114+
if-no-files-found: ignore

.github/workflows/static.yml

Lines changed: 53 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,79 @@
11
name: Static Tests (Lint, Stan)
22
on:
33
push:
4-
branches: [ master ]
4+
branches: [ '4.0' ]
55
pull_request:
6-
branches: [ master ]
6+
branches: [ '4.0' ]
77

88
jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
env:
1212
APP_ENV: "test"
13-
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/data_defs_test"
13+
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/coreshop_test"
14+
15+
strategy:
16+
matrix:
17+
php: [ 8.1, 8.2 ]
18+
pimcore: [ ^11.0 ]
19+
dependencies: [ highest ]
20+
exclude:
21+
- php: 8.1
22+
dependencies: lowest
23+
1424
services:
15-
mysql:
16-
image: mysql:5.7
25+
database:
26+
image: "mysql:8"
1727
env:
1828
MYSQL_ROOT_PASSWORD: root
19-
MYSQL_DATABASE: data_defs_test
29+
MYSQL_DATABASE: coreshop_test
2030
ports:
2131
- 3306:3306
2232
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
23-
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}"
24-
strategy:
25-
matrix:
26-
php: [8.0]
27-
pimcore: [^10.0, ^10.1]
33+
34+
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}"
2835

2936
steps:
30-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3138

32-
- name: Install PHP
33-
uses: shivammathur/setup-php@v2
34-
with:
35-
php-version: ${{ matrix.php }}
36-
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib
39+
- name: Install PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767
44+
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib
3745

38-
- name: Get composer cache directory
39-
id: composer-cache
40-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
46+
- name: Validate composer.json and composer.lock
47+
run: composer validate
4148

42-
- name: Cache dependencies
43-
uses: actions/cache@v1
44-
with:
45-
path: ${{ steps.composer-cache.outputs.dir }}
46-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
47-
restore-keys: ${{ runner.os }}-composer-
49+
- name: Get composer cache directory
50+
id: composer-cache
51+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
4852

49-
- name: Verify MySQL connection
50-
run: |
51-
mysql --version
52-
sudo apt-get install -y mysql-client
53-
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uroot -proot -e "SHOW DATABASES"
53+
- name: Cache composer dependencies
54+
uses: actions/cache@v3
55+
with:
56+
path: ${{ steps.composer-cache.outputs.dir }}
57+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
58+
restore-keys: ${{ runner.os }}-composer-
5459

55-
- name: Validate composer.json and composer.lock
56-
run: composer validate
60+
- if: matrix.dependencies == 'highest'
61+
name: Install dependencies highest
62+
run: |
63+
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
64+
composer update --no-progress --prefer-dist --optimize-autoloader
5765
58-
- name: Composer install
59-
run: |
60-
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
61-
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
66+
- if: matrix.dependencies == 'lowest'
67+
name: Install dependencies lowest
68+
run: |
69+
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
70+
composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest
6271
63-
- name: Validate YAML
64-
run: bin/console lint:yaml src --parse-tags
72+
- name: Validate YAML
73+
run: bin/console lint:yaml src --parse-tags
6574

66-
- name: STAN
67-
run: |
68-
cp -f config/packages/stan/config.yaml config/packages/dev/config.yaml
69-
bin/console cache:clear --env=dev
70-
vendor/bin/phpstan analyse -c phpstan.neon src -l 3
75+
- name: STAN
76+
run: |
77+
cp -f config/packages/stan/config.yaml config/packages/dev/config.yaml
78+
bin/console cache:clear --env=dev
79+
vendor/bin/phpstan analyse -c phpstan.neon src -l 3

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@ var/classes
6666
var/config
6767
test.csv
6868
web
69+
public
70+
docker-compose.yaml
71+
test-commands.txt
72+
.docker

.travis.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

behat-bootstrap.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
<?php
22

3-
require __DIR__ . '/src/Kernel.php';
3+
if (!defined('PIMCORE_PROJECT_ROOT')) {
4+
define(
5+
'PIMCORE_PROJECT_ROOT',
6+
getenv('PIMCORE_PROJECT_ROOT')
7+
?: getenv('REDIRECT_PIMCORE_PROJECT_ROOT')
8+
?: realpath(getcwd())
9+
);
10+
}
411

5-
define('TESTS_PATH', __DIR__);
6-
define('PIMCORE_PROJECT_ROOT', __DIR__);
7-
define('PIMCORE_KERNEL_CLASS', '\AppKernel');
12+
define('PIMCORE_TEST', true);
13+
define('PIMCORE_CLASS_DIRECTORY', __DIR__ . '/var/tmp/behat/var/classes');
14+
15+
error_reporting(E_ALL);
16+
17+
require_once __DIR__ .'/src/BehatKernel.php';
818

919
\Pimcore\Bootstrap::setProjectRoot();
1020
\Pimcore\Bootstrap::bootstrap();

0 commit comments

Comments
 (0)