Skip to content

Commit bef3369

Browse files
authored
Merge pull request #6 from CandoImage/revert-4-sync-with-latest-upstream-4.x
Revert "Sync with latest upstream 4.x"
2 parents 2667fdb + 777d232 commit bef3369

File tree

81 files changed

+628
-1350
lines changed

Some content is hidden

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

81 files changed

+628
-1350
lines changed

.github/workflows/behat.yml

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

88
jobs:
99
behat:
1010
runs-on: ubuntu-latest
1111
env:
1212
APP_ENV: "test"
1313
IM_SKIP_DB_SETUP: "1"
14-
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/coreshop_test"
1514
PIMCORE_INSTALL_ADMIN_USERNAME: "admin"
1615
PIMCORE_INSTALL_ADMIN_PASSWORD: "admin"
1716
PIMCORE_INSTALL_MYSQL_HOST_SOCKET: "127.0.0.1"
1817
PIMCORE_INSTALL_MYSQL_USERNAME: "root"
1918
PIMCORE_INSTALL_MYSQL_PASSWORD: "root"
20-
PIMCORE_INSTALL_MYSQL_DATABASE: "coreshop_test"
19+
PIMCORE_INSTALL_MYSQL_DATABASE: "data_defs_test"
2120
PIMCORE_INSTALL_MYSQL_PORT: "3306"
2221
PIMCORE_KERNEL_CLASS: 'Kernel'
2322
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
23+
PIMCORE_WRITE_TARGET_STATICROUTES: 'settings-store'
24+
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/data_defs_test"
3325

3426
services:
3527
database:
36-
image: "mysql:8"
28+
image: "mariadb:10.5"
3729
env:
3830
MYSQL_ROOT_PASSWORD: root
31+
MYSQL_DATABASE: data_defs_test
3932
ports:
4033
- 3306:3306
4134
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4235

43-
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}"
36+
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}"
37+
strategy:
38+
matrix:
39+
php: [ 8.0, 8.1 ]
40+
pimcore: [ ^10.5 ]
4441

4542
steps:
46-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v2
4744

4845
- name: Install PHP
4946
uses: shivammathur/setup-php@v2
5047
with:
5148
php-version: ${{ matrix.php }}
52-
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767
5349
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib
5450

5551
- name: Check PHP Version
@@ -61,26 +57,26 @@ jobs:
6157
6258
- name: Get composer cache directory
6359
id: composer-cache
64-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
60+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
6561

6662
- name: Cache composer dependencies
67-
uses: actions/cache@v3
63+
uses: actions/cache@v1
6864
with:
6965
path: ${{ steps.composer-cache.outputs.dir }}
7066
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
7167
restore-keys: ${{ runner.os }}-composer-
7268

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
69+
- name: Cache composer dependencies
70+
uses: actions/cache@v1
71+
with:
72+
path: ${{ steps.composer-cache.outputs.dir }}
73+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
74+
restore-keys: ${{ runner.os }}-composer-
7875

79-
- if: matrix.dependencies == 'lowest'
80-
name: Install dependencies lowest
76+
- name: Install dependencies highest
8177
run: |
82-
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
83-
composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest
78+
composer req guzzlehttp/psr7 pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
79+
composer update --no-progress --prefer-dist --optimize-autoloader
8480
8581
- name: Cache clear
8682
run: bin/console cache:clear
@@ -89,7 +85,7 @@ jobs:
8985
run: bin/console assets:install --symlink
9086

9187
- name: Install Pimcore
92-
run: PIMCORE_KERNEL_CLASS=Kernel vendor/bin/pimcore-install --env=test --skip-database-config
88+
run: PIMCORE_KERNEL_CLASS=Kernel vendor/bin/pimcore-install --ignore-existing-config --env=test --skip-database-config
9389

9490
- name: Install DataDefinitions
9591
run: bin/console pimcore:bundle:install DataDefinitionsBundle

.github/workflows/static.yml

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

88
jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
env:
1212
APP_ENV: "test"
13-
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/coreshop_test"
13+
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/data_defs_test"
1414

1515
strategy:
1616
matrix:
17-
php: [ 8.1, 8.2 ]
18-
pimcore: [ ^11.0 ]
19-
dependencies: [ highest ]
17+
php: [ 8.0, 8.1 ]
18+
pimcore: [ ^10.5 ]
19+
database: [ 'mysql:8.0' ]
20+
dependencies: [ highest, lowest ]
2021
exclude:
2122
- php: 8.1
2223
dependencies: lowest
2324

2425
services:
2526
database:
26-
image: "mysql:8"
27+
image: "${{ matrix.database }}"
2728
env:
2829
MYSQL_ROOT_PASSWORD: root
29-
MYSQL_DATABASE: coreshop_test
30+
MYSQL_DATABASE: data_defs_test
3031
ports:
3132
- 3306:3306
3233
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3334

34-
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, Deps ${{ matrix.dependencies }}"
35+
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}, DB ${{ matrix.database }}, Deps ${{ matrix.dependencies }}"
3536

3637
steps:
37-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v2
3839

3940
- name: Install PHP
4041
uses: shivammathur/setup-php@v2
@@ -48,10 +49,10 @@ jobs:
4849

4950
- name: Get composer cache directory
5051
id: composer-cache
51-
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
52+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
5253

5354
- name: Cache composer dependencies
54-
uses: actions/cache@v3
55+
uses: actions/cache@v1
5556
with:
5657
path: ${{ steps.composer-cache.outputs.dir }}
5758
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
@@ -60,13 +61,13 @@ jobs:
6061
- if: matrix.dependencies == 'highest'
6162
name: Install dependencies highest
6263
run: |
63-
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
64+
composer req guzzlehttp/psr7 pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
6465
composer update --no-progress --prefer-dist --optimize-autoloader
6566
6667
- if: matrix.dependencies == 'lowest'
6768
name: Install dependencies lowest
6869
run: |
69-
composer req pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
70+
composer req guzzlehttp/psr7 pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
7071
composer update --no-progress --prefer-dist --optimize-autoloader --prefer-lowest
7172
7273
- name: Validate YAML

behat-bootstrap.php

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

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-
}
3+
require __DIR__ . '/src/Kernel.php';
114

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';
5+
define('TESTS_PATH', __DIR__);
6+
define('PIMCORE_PROJECT_ROOT', __DIR__);
7+
define('PIMCORE_KERNEL_CLASS', '\AppKernel');
188

199
\Pimcore\Bootstrap::setProjectRoot();
2010
\Pimcore\Bootstrap::bootstrap();

composer.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,15 @@
3232
"php": ">=8.0",
3333
"ext-json": "*",
3434
"box/spout": "^3.0",
35-
"coreshop/pimcore-bundle": "^4.0",
36-
"coreshop/resource-bundle": "^4.0",
37-
"coreshop/rule-bundle": "^4.0",
35+
"coreshop/pimcore-bundle": "^3.0",
36+
"coreshop/resource-bundle": "^3.0",
37+
"coreshop/rule-bundle": "^3.0",
3838
"jms/serializer": "^3.17.1",
3939
"league/csv": "^9.7",
4040
"nyholm/psr7": "^1.5",
41-
"pimcore/admin-ui-classic-bundle": "^1.0",
42-
"pimcore/pimcore": "^11.0",
41+
"pimcore/pimcore": "^10.5",
4342
"psr/http-client-implementation": "^1.0",
44-
"psr/http-factory-implementation": "^1.0",
45-
"symfony/dotenv": "^6.3",
46-
"symfony/http-client": "^6.3"
43+
"psr/http-factory-implementation": "^1.0"
4744
},
4845
"require-dev": {
4946
"roave/security-advisories": "dev-latest",
@@ -68,11 +65,7 @@
6865
},
6966
"autoload-dev": {
7067
"psr-4": {
71-
"Wvision\\Bundle\\DataDefinitionsBundle\\Behat\\": "tests/DataDefinitionsBundle/Behat",
72-
"Pimcore\\Model\\DataObject\\": [
73-
"var/classes/DataObject",
74-
"var/tmp/behat/var/classes/DataObject"
75-
]
68+
"Wvision\\Bundle\\DataDefinitionsBundle\\Behat\\": "tests/DataDefinitionsBundle/Behat"
7669
},
7770
"classmap": [
7871
"src/Kernel.php"

config/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22
- { resource: services.yaml }
3+
- { resource: migrations.yaml }
34
- { resource: system.yml }
45
- { resource: 'local/' }
56

config/migrations.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
doctrine_migrations:
2+
connection: default
3+
migrations_paths:
4+
'Pimcore\Bundle\CoreBundle\Migrations': '@PimcoreCoreBundle/Migrations'
5+
storage:
6+
table_storage:
7+
table_name: 'migration_versions'
8+
version_column_name: 'version'
9+
version_column_length: 1024
10+
executed_at_column_name: 'executed_at'
11+
execution_time_column_name: 'execution_time'
12+
all_or_nothing: false
13+
check_database_platform: false
14+
factories:
15+
'Doctrine\Migrations\MigrationsRepository': 'Pimcore\Migrations\FilteredMigrationsRepository'
16+
'Doctrine\Migrations\Metadata\Storage\MetadataStorage': 'Pimcore\Migrations\FilteredTableMetadataStorage'
17+
18+
19+

config/packages/security.yaml

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,54 @@
11
security:
2-
enable_authenticator_manager: true
3-
42
providers:
53
pimcore_admin:
6-
id: Pimcore\Security\User\UserProvider
4+
id: Pimcore\Bundle\AdminBundle\Security\User\UserProvider
75

86
firewalls:
97
dev:
108
pattern: ^/(_(profiler|wdt)|css|images|js)/
119
security: false
1210

1311
# Pimcore WebDAV HTTP basic // DO NOT CHANGE!
14-
pimcore_webdav:
15-
pattern: ^/asset/webdav
12+
pimcore_admin_webdav:
13+
pattern: ^/admin/asset/webdav
1614
provider: pimcore_admin
1715
http_basic: ~
1816

19-
# Pimcore Admin Bundle firewall
20-
pimcore_admin: '%pimcore_admin_bundle.firewall_settings%'
17+
# Pimcore admin form login // DO NOT CHANGE!
18+
pimcore_admin:
19+
anonymous: ~
20+
pattern: ^/admin(/.*)?$
21+
# admin firewall is stateless as we open the admin
22+
# session on demand for non-blocking parallel requests
23+
stateless: true
24+
provider: pimcore_admin
25+
logout:
26+
path: /admin/logout
27+
target: /admin/login
28+
success_handler: Pimcore\Bundle\AdminBundle\Security\LogoutSuccessHandler
29+
guard:
30+
entry_point: Pimcore\Bundle\AdminBundle\Security\Guard\AdminAuthenticator
31+
authenticators:
32+
- Pimcore\Bundle\AdminBundle\Security\Guard\AdminAuthenticator
33+
two_factor:
34+
auth_form_path: /admin/login/2fa # Path or route name of the two-factor form
35+
check_path: /admin/login/2fa-verify # Path or route name of the two-factor code check
36+
default_target_path: /admin # Where to redirect by default after successful authentication
37+
always_use_default_target_path: false # If it should always redirect to default_target_path
38+
auth_code_parameter_name: _auth_code # Name of the parameter for the two-factor authentication code
39+
trusted_parameter_name: _trusted # Name of the parameter for the trusted device option
40+
multi_factor: false # If ALL active two-factor methods need to be fulfilled (multi-factor authentication)
41+
2142

2243
access_control:
2344
# Pimcore admin ACl // DO NOT CHANGE!
24-
- { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS }
25-
- { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
26-
- { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER }
27-
- { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
28-
- { path: ^/admin/login$, roles: PUBLIC_ACCESS }
29-
- { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS }
45+
- { path: ^/admin/settings/display-custom-logo, roles: IS_AUTHENTICATED_ANONYMOUSLY }
46+
- { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS}
47+
- { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS}
48+
- { path: ^/admin/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
49+
- { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
3050
- { path: ^/admin, roles: ROLE_PIMCORE_USER }
31-
- { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER }
3251

3352
role_hierarchy:
3453
# Pimcore admin // DO NOT CHANGE!
35-
ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER]
54+
ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER]

config/packages/test/config.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,3 @@ parameters:
2121
framework:
2222
session:
2323
handler_id: 'Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler'
24-
25-
data_definitions:
26-
config_location:
27-
import_definitions:
28-
write_target:
29-
type: settings-store
30-
export_definitions:
31-
write_target:
32-
type: settings-store

config/routes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
_pimcore:
2-
resource: "@PimcoreCoreBundle/config/routing.yaml"
2+
resource: "@PimcoreCoreBundle/Resources/config/routing.yml"

config/routes/dev/routes.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
_pimcore_dev:
2-
resource: "@PimcoreCoreBundle/config/routing_dev.yaml"
2+
resource: "@PimcoreCoreBundle/Resources/config/routing_dev.yml"
3+

0 commit comments

Comments
 (0)