Skip to content

Commit 5518c2c

Browse files
committed
Pimcore 11 Support
1 parent 44c804b commit 5518c2c

File tree

68 files changed

+280
-330
lines changed

Some content is hidden

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

68 files changed

+280
-330
lines changed

.github/workflows/codeception.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"
1616

1717
PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework"
18-
PIMCORE_CODECEPTION_VERSION: "2.0"
18+
PIMCORE_CODECEPTION_VERSION: "3.0"
1919

2020
APP_ENV: test
21-
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/dachcom_bundle_test"
21+
PIMCORE_TEST_DB_DSN: "mysql://test:test@127.0.0.1:3306/dachcom_bundle_test"
2222
PIMCORE_TEST_URL: "http://localhost"
2323
PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/lib/test-bundle/tests/_output/var/classes/DataObject"
2424

@@ -38,12 +38,12 @@ jobs:
3838
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3939
strategy:
4040
matrix:
41-
php: [ 8.1 ]
42-
symfony: [ ^5.4 ]
43-
pimcore: [ ~10.6.0 ]
41+
php: [ 8.2 ]
42+
symfony: [ ^6.2 ]
43+
pimcore: [ ~11.0.0 ]
4444
include:
45-
- pimcore: ~10.6.0
46-
template_tag: v10.2.5
45+
- pimcore: ~11.0.0
46+
template_tag: v11.0.0
4747
steps:
4848
- uses: actions/checkout@v2
4949
with:
@@ -82,9 +82,19 @@ jobs:
8282
run: php -v
8383

8484
- name: Setup MySql
85-
run: |
86-
sudo systemctl start mysql
87-
mysql -uroot -proot -h127.0.0.1 -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;"
85+
uses: shogo82148/actions-setup-mysql@v1
86+
with:
87+
mysql-version: '8.0'
88+
user: test
89+
password: test
90+
root-password: root
91+
auto-start: true
92+
my-cnf: |
93+
max_allowed_packet=32505856
94+
max_connections=1000
95+
96+
- name: Initial Database
97+
run: mysql -utest -ptest -h127.0.0.1 -e 'CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;'
8898

8999
- name: Setup Chromium
90100
run: |
@@ -115,7 +125,7 @@ jobs:
115125
run: |
116126
composer config "minimum-stability" "dev"
117127
composer config "prefer-stable" true
118-
sed -i 's,\("dachcom-digital\/dynamic-search"\): "\(.*\)",\1: "2.x-dev",g' ${{ github.workspace }}/lib/test-bundle/composer.json
128+
sed -i 's,\("dachcom-digital\/dynamic-search"\): "\(.*\)",\1: "3.x-dev",g' ${{ github.workspace }}/lib/test-bundle/composer.json
119129
chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh
120130
./pimcore-codeception-framework/src/_etc/scripts/composer.sh
121131

.github/workflows/ecs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"
1616

1717
PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework"
18-
PIMCORE_CODECEPTION_VERSION: "2.0"
18+
PIMCORE_CODECEPTION_VERSION: "3.0"
1919

2020
APP_ENV: test
2121
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/dachcom_bundle_test"
@@ -37,12 +37,12 @@ jobs:
3737
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3838
strategy:
3939
matrix:
40-
php: [ 8.1 ]
41-
symfony: [ ^5.4 ]
42-
pimcore: [ ~10.6.0 ]
40+
php: [ 8.2 ]
41+
symfony: [ ^6.2 ]
42+
pimcore: [ ~11.0.0 ]
4343
include:
44-
- pimcore: ~10.6.0
45-
template_tag: v10.2.5
44+
- pimcore: ~11.0.0
45+
template_tag: v11.0.0
4646
steps:
4747
- uses: actions/checkout@v2
4848
with:
@@ -105,7 +105,7 @@ jobs:
105105
run: |
106106
composer config "minimum-stability" "dev"
107107
composer config "prefer-stable" true
108-
sed -i 's,\("dachcom-digital\/dynamic-search"\): "\(.*\)",\1: "2.x-dev",g' ${{ github.workspace }}/lib/test-bundle/composer.json
108+
sed -i 's,\("dachcom-digital\/dynamic-search"\): "\(.*\)",\1: "3.x-dev",g' ${{ github.workspace }}/lib/test-bundle/composer.json
109109
chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh
110110
./pimcore-codeception-framework/src/_etc/scripts/composer.sh
111111
@@ -117,4 +117,4 @@ jobs:
117117
continue-on-error: true
118118
run: |
119119
bin/console cache:warmup --env=test
120-
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/DsTrinityDataBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php
120+
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src --config ${{ github.workspace }}/lib/test-bundle/ecs.php

.github/workflows/php-stan.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"
1616

1717
PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework"
18-
PIMCORE_CODECEPTION_VERSION: "2.0"
18+
PIMCORE_CODECEPTION_VERSION: "3.0"
1919

2020
APP_ENV: test
2121
PIMCORE_TEST_DB_DSN: "mysql://root:root@127.0.0.1:3306/dachcom_bundle_test"
@@ -37,12 +37,12 @@ jobs:
3737
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3838
strategy:
3939
matrix:
40-
php: [ 8.1 ]
41-
symfony: [ ^5.4 ]
42-
pimcore: [ ~10.6.0 ]
40+
php: [ 8.2 ]
41+
symfony: [ ^6.2 ]
42+
pimcore: [ ~11.0.0 ]
4343
include:
44-
- pimcore: ~10.6.0
45-
template_tag: v10.2.5
44+
- pimcore: ~11.0.0
45+
template_tag: v11.0.0
4646
steps:
4747
- uses: actions/checkout@v2
4848
with:
@@ -105,7 +105,7 @@ jobs:
105105
run: |
106106
composer config "minimum-stability" "dev"
107107
composer config "prefer-stable" true
108-
sed -i 's,\("dachcom-digital\/dynamic-search"\): "\(.*\)",\1: "2.x-dev",g' ${{ github.workspace }}/lib/test-bundle/composer.json
108+
sed -i 's,\("dachcom-digital\/dynamic-search"\): "\(.*\)",\1: "3.x-dev",g' ${{ github.workspace }}/lib/test-bundle/composer.json
109109
chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh
110110
./pimcore-codeception-framework/src/_etc/scripts/composer.sh
111111

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ Vagrantfile
4545
php-cgi.core
4646
.sass-cache
4747

48-
# codeception (only stage *.dist.yml config files)
49-
/codeception.yml
50-
/tests/codeception.yml
51-
/tests/*.suite.yml
48+
# codeception (only stage *.dist.yaml config files)
49+
/codeception.yaml
50+
/tests/codeception.yaml
51+
/tests/*.suite.yaml
5252
/tests/_output/*
5353
/tests/_data/*
5454
!/tests/_data/.gitkeep
55-
/tests/_support/_generated/*
55+
/tests/Support/_generated/*

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# License
2-
Copyright (C) 2021 DACHCOM.DIGITAL
2+
Copyright (C) 2023 DACHCOM.DIGITAL
33

44
This software is available under the GNU General Public License version 3 (GPLv3).
55

README.md

Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ Fetch pimcore elements by listings: `assets`, `documents` and `objects`.
1111
## Release Plan
1212
| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
1313
|---------|----------------------------|----------------------------|--------------|----------------------|-------------------------------------------------------------------------------------------------|
14-
| **2.x** | `10.0` - `10.6` | `^5.4` | 19.12.2021 | Yes (Bugs, Features) | master |
14+
| **3.x** | `11.0` | `^6.2` | -- | Yes (Bugs, Features) | master |
15+
| **2.x** | `10.0` - `10.6` | `^5.4` | 19.12.2021 | No | [1.x](https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity/tree/2.x) |
1516
| **1.x** | `6.6` - `6.9` | `^4.4` | 18.04.2021 | No | [1.x](https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity/tree/1.x) |
1617

1718
***
1819

1920
## Installation
2021
```json
2122
"require" : {
22-
"dachcom-digital/dynamic-search" : "~2.0.0",
23-
"dachcom-digital/dynamic-search-data-provider-trinity" : "~2.0.0"
23+
"dachcom-digital/dynamic-search" : "~3.0.0",
24+
"dachcom-digital/dynamic-search-data-provider-trinity" : "~3.0.0"
2425
}
2526
```
2627

@@ -29,7 +30,7 @@ You need to install / enable the Dynamic Search Bundle first.
2930
Read more about it [here](https://github.com/dachcom-digital/pimcore-dynamic-search#installation).
3031
After that, proceed as followed:
3132

32-
### Enabling via `config/bundles.php`:
33+
Add Bundle to `bundles.php`:
3334
```php
3435
<?php
3536

@@ -38,23 +39,6 @@ return [
3839
];
3940
```
4041

41-
### Enabling via `Kernel.php`:
42-
```php
43-
<?php
44-
45-
namespace App;
46-
47-
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
48-
49-
class Kernel extends \Pimcore\Kernel
50-
{
51-
public function registerBundlesToCollection(BundleCollection $collection): void
52-
{
53-
$collection->addBundle(new \DsTrinityDataBundle\DsTrinityDataBundle());
54-
}
55-
}
56-
```
57-
5842
***
5943

6044
## Publishing State
@@ -109,11 +93,11 @@ dynamic_search:
10993

11094
### full_dispatch
11195

112-
| Name | Default Value | Description |
113-
|:-------------------------------------|:--------------|:------------|
114-
|`asset_limit` | 0 | |
115-
|`object_limit` | 0 | |
116-
|`document_limit` | 0 | |
96+
| Name | Default Value | Description |
97+
|:-----------------|:--------------|:------------|
98+
| `asset_limit` | 0 | |
99+
| `object_limit` | 0 | |
100+
| `document_limit` | 0 | |
117101

118102
***
119103

@@ -128,10 +112,10 @@ Scaffold localized documents
128112

129113
Options:
130114

131-
| Name | Default Value | Allowed Type | Description |
132-
|:------------------------------|:----------------------------------------|:----------------|:------------|
133-
|`locales` | all pimcore enabled languages | array | |
134-
|`skip_not_localized_documents` | true | bool | if false, an exception rises if a document/object has no valid locale |
115+
| Name | Default Value | Allowed Type | Description |
116+
|:-------------------------------|:------------------------------|:-------------|:----------------------------------------------------------------------|
117+
| `locales` | all pimcore enabled languages | array | |
118+
| `skip_not_localized_documents` | true | bool | if false, an exception rises if a document/object has no valid locale |
135119

136120
***
137121

@@ -160,11 +144,11 @@ Returns element property.
160144
Return Type: `string|null`
161145
Options:
162146

163-
| Name | Default Value | Allowed Type | Description |
164-
|:-----------------------------|:--------------|:---------------|:------------|
165-
|`property` | null | string | |
166-
|`object_getter` | null | null|string | |
167-
|`allow_inherited_value` | true | bool | |
147+
| Name | Default Value | Allowed Type | Description |
148+
|:------------------------|:--------------|:-------------|:------------|
149+
| `property` | null | string | |
150+
| `object_getter` | null | null | string |
151+
| `allow_inherited_value` | true | bool | |
168152

169153

170154
##### NormalizerValueCallback
@@ -174,9 +158,9 @@ Returns given option `value`.
174158
Return Type: `string|null`
175159
Options:
176160

177-
| Name | Default Value | Allowed Type | Description |
178-
|:-----------------------------|:--------------|:---------------|:------------|
179-
|`value` | null | string | |
161+
| Name | Default Value | Allowed Type | Description |
162+
|:--------|:--------------|:-------------|:------------|
163+
| `value` | null | string | |
180164

181165
##### ObjectGetterExtractor
182166
Identifier: `object_getter_extractor`
@@ -185,12 +169,12 @@ Returns value of object getter.
185169
Return Type: `bool|int|float|string|array|null`
186170
Options:
187171

188-
| Name | Default Value | Allowed Type | Description |
189-
|:-----------------------------|:--------------|:---------------|:------------------------------------------------|
190-
|`method` | id | string | |
191-
|`arguments` | [] | array | |
192-
|`clean_string` | true | bool | cleans HTML and whitespace (if value is string) |
193-
|`transform_callback` | null | null\|closure | a callback function for further value transform |
172+
| Name | Default Value | Allowed Type | Description |
173+
|:---------------------|:--------------|:--------------|:------------------------------------------------|
174+
| `method` | id | string | |
175+
| `arguments` | [] | array | |
176+
| `clean_string` | true | bool | cleans HTML and whitespace (if value is string) |
177+
| `transform_callback` | null | null\|closure | a callback function for further value transform |
194178

195179
##### ObjectRelationsGetterExtractor
196180
Identifier: `object_relations_getter_extractor`
@@ -199,11 +183,11 @@ Returns values of object relations getter.
199183
Return Type: `array|null`
200184
Options:
201185

202-
| Name | Default Value | Allowed Type | Description |
203-
|:-----------------------------|:--------------|:---------------|:------------|
204-
|`relations` | null | string | |
205-
|`method` | id | string | |
206-
|`arguments` | [] | array | |
186+
| Name | Default Value | Allowed Type | Description |
187+
|:------------|:--------------|:-------------|:------------|
188+
| `relations` | null | string | |
189+
| `method` | id | string | |
190+
| `arguments` | [] | array | |
207191

208192

209193
##### ObjectPathGenerator
@@ -213,10 +197,10 @@ Returns object path generated by link generator.
213197
Return Type: `string|null`
214198
Options:
215199

216-
| Name | Default Value | Allowed Type | Description |
217-
|:-----------------------------|:--------------|:---------------|:------------|
218-
|`arguments` | [] | array | |
219-
|`fetch_object_for_variant` | false | bool | If true and object is type of `variant` the next parent gets fetched first until type `object` has been reached |
200+
| Name | Default Value | Allowed Type | Description |
201+
|:---------------------------|:--------------|:-------------|:----------------------------------------------------------------------------------------------------------------|
202+
| `arguments` | [] | array | |
203+
| `fetch_object_for_variant` | false | bool | If true and object is type of `variant` the next parent gets fetched first until type `object` has been reached |
220204

221205
##### DocumentMetaExtractor
222206
Identifier: `document_meta_extractor`
@@ -225,9 +209,9 @@ Returns documents meta title or description.
225209
Return Type: `string|null`
226210
Options:
227211

228-
| Name | Default Value | Allowed Type | Description |
229-
|:-----------------------------|:--------------|:---------------|:------------|
230-
|`type` | title | string | Possible Types: `title` or `description` |
212+
| Name | Default Value | Allowed Type | Description |
213+
|:-------|:--------------|:-------------|:-----------------------------------------|
214+
| `type` | title | string | Possible Types: `title` or `description` |
231215

232216
##### DocumentPathGenerator
233217
Identifier: `document_path_generator`

UPGRADE.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
11
# Upgrade Notes
22

3-
## 2.0.2
4-
- [BUGFIX] `object_relations_getter_extractor` respect arguments (#23)
5-
- [FEATURE] `object_getter_extractor` more flexibility (#24)
6-
- support mixed types
7-
- `transform_callback` option
8-
9-
## 2.0.1
10-
- [BUGFIX] Add null coalescing operator to `$options['asset_limit']` in `AssetListBuilder:getList()`
11-
- [BUGFIX] Allow `null` as locale value `normalizer_value_callback`
12-
13-
## Migrating from Version 1.x to Version 2.0.0
3+
## Migrating from Version 2.x to Version 3.0.0
144

155
### Global Changes
16-
- PHP8 return type declarations added: you may have to adjust your extensions accordingly
17-
- `ProxyResolverInterface` (also the corresponding `ObjectProxyResolver` service) and tag `ds_trinity_data.proxy_resolver`has been removed, you have to use
18-
the [resource validator](https://github.com/dachcom-digital/pimcore-dynamic-search/blob/master/docs/40_ResourceValidator.md) now:
19-
- Method `checkResourceProxy` from `DataProviderService` has been removed
20-
- Option `object_proxy_identifier` and `object_proxy_settings` in provider configuration have been removed
21-
- Event `DataProxyEvent` via `DsTrinityDataEvents::PROXY_DEFAULT_DATA_OBJECT` has been removed
22-
- The option `object_ignore_unpublished` and `object_ignore_unpublished` has [been removed](https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity/issues/16)
23-
- ⚠️ By default, unpublished elements will be fetched **by default**. Read more about this problematic fact [here](./docs/10_publishUnpublishedElements.md)
6+
- Recommended folder structure by symfony adopted
247

258
***
269

27-
1.x Upgrade Notes: https://github.com/dachcom-digital/dynamic-search-data-provider-trinity/blob/1.x/UPGRADE.md
10+
2.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity/blob/2.x/UPGRADE.md

0 commit comments

Comments
 (0)