Skip to content

Commit 90553ee

Browse files
authored
Pimcore X Compatibility (#160)
* make tb installable on px * remove deprecations * adopt controller changes * Start re-integrating bricks for px * re-implement toolbox edit bar * move to snake-case folder structure * improve brick registration * cleanup brick setup * cleanup calculator * adjust tests + docs * clean-up tests * fix tests for px * fix log output path * fix server root path * make custom elements px ready * remove frontend extensions from core, resolves #159 * fix tests after editable refactor * fix phpstan issues * fix parallax editable setup * implement permission feature, resolves #161 * finalize type declaration * fix registry pattern * improve google map editable performance * introduce simple brick, resolves #39 * allow to switch to no-config-dialog bricks * fix default value * improve toolbox configuration builder, allow tabs in dialog box * fix some annotations * implement strict brick registration * improve brick registration * update main screenshot * apply ecs fixes
1 parent 386b96e commit 90553ee

File tree

370 files changed

+4377
-7783
lines changed

Some content is hidden

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

370 files changed

+4377
-7783
lines changed

.github/workflows/codeception.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ jobs:
1111
env:
1212
TEST_BUNDLE_NAME: "ToolboxBundle"
1313
TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install"
14-
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
14+
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
1515
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"
1616

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

20-
PIMCORE_ENVIRONMENT: test
20+
APP_ENV: test
2121
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
2222
PIMCORE_TEST_URL: "http://localhost"
23-
PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/tests/_output/var/classes/DataObject"
23+
PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/lib/test-bundle/tests/_output/var/classes/DataObject"
2424

2525
SYMFONY_DEPRECATIONS_HELPER: "weak"
2626
PIMCORE_PHP_ERROR_REPORTING: 32767
@@ -41,33 +41,28 @@ jobs:
4141
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4242
strategy:
4343
matrix:
44-
php: [7.4]
45-
symfony: [^4.4]
46-
pimcore: [~6.6.0, ~6.7.0, ~6.8.0, ~6.9.0]
44+
php: [ 8.0 ]
45+
symfony: [ ^5.3 ]
46+
pimcore: [ ~10.1.0 ]
4747
include:
48-
- pimcore: ~6.6.0
49-
template_tag: v2.6.0
50-
- pimcore: ~6.7.0
51-
template_tag: v2.7.0
52-
- pimcore: ~6.8.0
53-
template_tag: v2.8.0
54-
- pimcore: ~6.8.0
55-
symfony: ^3.4
56-
php: 7.4
57-
template_tag: v2.8.0
58-
- pimcore: ~6.9.0
59-
template_tag: v2.8.19
48+
- pimcore: ~10.1.0
49+
template_tag: v10.1.0
6050
steps:
6151
- uses: actions/checkout@v2
52+
with:
53+
path: lib/test-bundle
6254

6355
- name: Generate Application Structure
6456
run: |
6557
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
66-
mv skeleton/app .
58+
mv skeleton/composer.json .
6759
mv skeleton/bin .
60+
mv skeleton/config .
61+
mv skeleton/public .
62+
mv skeleton/src .
63+
mv skeleton/templates .
6864
mv skeleton/var .
69-
mv skeleton/web .
70-
mv skeleton/src/AppBundle src
65+
rm -r skeleton
7166
7267
- name: Setup Pimcore Codeception Framework
7368
env:
@@ -110,7 +105,7 @@ jobs:
110105
- name: Start Webserver and Chrome
111106
run: |
112107
wget https://get.symfony.com/cli/installer -O - | bash
113-
~/.symfony/bin/symfony server:start --port=8080 --dir=web --force-php-discovery --allow-http --no-tls --daemon
108+
~/.symfony/bin/symfony server:start --port=8080 --dir=public --force-php-discovery --allow-http --no-tls --daemon
114109
115110
- name: Get Composer Cache Directory
116111
id: composer-cache
@@ -135,17 +130,17 @@ jobs:
135130
136131
- name: Assets Install
137132
run: |
138-
bin/console assets:install web --relative --symlink
133+
bin/console assets:install public --relative --symlink
139134
140135
- name: Tests
141136
run: |
142137
bin/console cache:warmup --env=test
143-
vendor/bin/codecept run --env github -c ${{ env.GITHUB_WORKSPACE }}
138+
vendor/bin/codecept run --env github -c ${{ github.workspace }}/lib/test-bundle
144139
145140
- name: Log Output
146141
uses: actions/upload-artifact@v2
147142
if: failure()
148143
with:
149144
name: "Logs (PHP ${{ matrix.php }}, Pimcore ${{ matrix.pimcore }}, Symfony ${{ matrix.symfony }})"
150-
path: tests/_output/
145+
path: ${{ github.workspace }}/lib/test-bundle/tests/_output/
151146
if-no-files-found: ignore

.github/workflows/ecs.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
env:
1212
TEST_BUNDLE_NAME: "ToolboxBundle"
1313
TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install"
14-
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
14+
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
1515
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"
1616

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

20-
PIMCORE_ENVIRONMENT: test
20+
APP_ENV: test
2121
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
2222
PIMCORE_TEST_URL: "http://localhost"
2323

@@ -40,24 +40,28 @@ jobs:
4040
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4141
strategy:
4242
matrix:
43-
php: [7.4]
44-
symfony: [^4.4]
45-
pimcore: [^6.8]
43+
php: [ 8.0 ]
44+
symfony: [ ^5.3 ]
45+
pimcore: [ ~10.1.0 ]
4646
include:
47-
- pimcore: ^6.8
48-
template_tag: v2.8.0
49-
47+
- pimcore: ~10.1.0
48+
template_tag: v10.1.0
5049
steps:
5150
- uses: actions/checkout@v2
51+
with:
52+
path: lib/test-bundle
5253

5354
- name: Generate Application Structure
5455
run: |
5556
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
56-
mv skeleton/app .
57+
mv skeleton/composer.json .
5758
mv skeleton/bin .
59+
mv skeleton/config .
60+
mv skeleton/public .
61+
mv skeleton/src .
62+
mv skeleton/templates .
5863
mv skeleton/var .
59-
mv skeleton/web .
60-
mv skeleton/src/AppBundle src
64+
rm -r skeleton
6165
6266
- name: Setup Pimcore Codeception Framework
6367
env:
@@ -116,10 +120,10 @@ jobs:
116120
117121
- name: Assets Install
118122
run: |
119-
bin/console assets:install web --relative --symlink
123+
bin/console assets:install public --relative --symlink
120124
121125
- name: Easy Coding Standard Check
122126
continue-on-error: true
123127
run: |
124128
bin/console cache:warmup --env=test
125-
vendor/bin/ecs check src/ToolboxBundle --config easy-coding-standard.yml
129+
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/ToolboxBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php

.github/workflows/php-stan.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ jobs:
1111
env:
1212
TEST_BUNDLE_NAME: "ToolboxBundle"
1313
TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install"
14-
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
14+
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
1515
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"
1616

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

20-
PIMCORE_ENVIRONMENT: test
20+
APP_ENV: test
2121
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
2222
PIMCORE_TEST_URL: "http://localhost"
2323

@@ -40,23 +40,28 @@ jobs:
4040
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4141
strategy:
4242
matrix:
43-
php: [7.4]
44-
symfony: [^4.4]
45-
pimcore: [^6.8]
43+
php: [ 8.0 ]
44+
symfony: [ ^5.3 ]
45+
pimcore: [ ~10.1.0 ]
4646
include:
47-
- pimcore: ^6.8
48-
template_tag: v2.8.0
47+
- pimcore: ~10.1.0
48+
template_tag: v10.1.0
4949
steps:
5050
- uses: actions/checkout@v2
51+
with:
52+
path: lib/test-bundle
5153

5254
- name: Generate Application Structure
5355
run: |
5456
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
55-
mv skeleton/app .
57+
mv skeleton/composer.json .
5658
mv skeleton/bin .
59+
mv skeleton/config .
60+
mv skeleton/public .
61+
mv skeleton/src .
62+
mv skeleton/templates .
5763
mv skeleton/var .
58-
mv skeleton/web .
59-
mv skeleton/src/AppBundle src
64+
rm -r skeleton
6065
6166
- name: Setup Pimcore Codeception Framework
6267
env:
@@ -115,9 +120,9 @@ jobs:
115120
116121
- name: Assets Install
117122
run: |
118-
bin/console assets:install web --relative --symlink
123+
bin/console assets:install public --relative --symlink
119124
120125
- name: Php Stan
121126
run: |
122127
bin/console cache:warmup --env=test
123-
vendor/bin/phpstan analyse -c phpstan.neon -a tests/_phpstan-bootstrap.php src -l 2
128+
vendor/bin/phpstan analyse -c ${{ github.workspace }}/lib/test-bundle/phpstan.neon -a ${{ github.workspace }}/lib/test-bundle/tests/_phpstan-bootstrap.php ${{ github.workspace }}/lib/test-bundle/src -l 4

README.md

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,40 @@ The Toolbox is a Kickstarter for your every day project. It provides some import
66
[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)
77
[![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/toolbox.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/toolbox)
88
[![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-toolbox/Codeception?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-toolbox/actions?query=workflow%3A%22Codeception%22)
9-
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-toolbox/PHP%20Stan?style=flat-square&logo=github&label=phpstan%20level%202)](https://github.com/dachcom-digital/pimcore-toolbox/actions?query=workflow%3A%22PHP%20Stan%22)
9+
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-toolbox/PHP%20Stan?style=flat-square&logo=github&label=phpstan%20level%204)](https://github.com/dachcom-digital/pimcore-toolbox/actions?query=workflow%3A%22PHP%20Stan%22)
10+
11+
![Pimcore Toolbox](https://user-images.githubusercontent.com/700119/135613598-a9ef2c69-9a44-41cd-8542-596a0322d3da.png)
1012

11-
![pimcore-toolbox](https://user-images.githubusercontent.com/700119/27372271-541e6106-5664-11e7-9159-7f4aefa26cb6.png)
1213

1314
### Release Plan
1415

1516
| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
1617
|---------|-----------------------------------|----------------------------|--------------|----------------|------------|
17-
| **3.x** | `6.0` - `6.9` | `3.4`, `^4.4` | 16.07.2019 | Feature Branch | 3.x |
18-
| **2.8** | `5.4`, `5.5`, `5.6`, `5.7`, `5.8` | `3.4` | 30.06.2019 | Bugfix only | 2.8 |
18+
| **4.x** | `10.1` | `5.3` | 01.10.2021 | Feature Branch | dev-master |
19+
| **3.x** | `6.0` - `6.9` | `3.4`, `^4.4` | 16.07.2019 | Unsupported | 3.x |
20+
| **2.8** | `5.4`, `5.5`, `5.6`, `5.7`, `5.8` | `3.4` | 30.06.2019 | Unsupported | 2.8 |
1921
| **1.8** | `4.0` | -- | 28.04.2017 | Unsupported | pimcore4 |
2022

2123
### Installation
2224

2325
```json
2426
"require" : {
25-
"dachcom-digital/toolbox" : "~3.3.0"
27+
"dachcom-digital/toolbox" : "~4.0.0"
2628
}
2729
```
2830

29-
### Installation via Extension Manager
30-
After you have installed the Toolbox Bundle via composer, open pimcore backend and go to `Tools` => `Extension`:
31-
- Click the green `+` Button in `Enable / Disable` row
32-
- Click the green `+` Button in `Install/Uninstall` row
31+
### Installation
32+
- Execute: `$ bin/console pimcore:bundle:enable ToolboxBundle`
33+
- Execute: `$ bin/console pimcore:bundle:install ToolboxBundle`
3334

3435
## Upgrading
35-
36-
### Upgrading via Extension Manager
37-
After you have updated the Toolbox Bundle via composer, open pimcore backend and go to `Tools` => `Extension`:
38-
- Click the green `+` Button in `Update` row
39-
40-
### Upgrading via CommandLine
41-
After you have updated the Toolbox Bundle via composer:
42-
- Execute: `$ bin/console pimcore:bundle:update ToolboxBundle`
43-
44-
### Migrate via CommandLine
45-
Does actually the same as the update command and preferred in CI-Workflow:
46-
- Execute: `$ bin/console pimcore:migrations:migrate -b ToolboxBundle`
36+
- Execute: `$ bin/console doctrine:migrations:version --add --all --prefix 'ToolboxBundle\Migrations'`
4737

4838
## What's the meaning of Toolbox?
4939
- create often used bricks in a second
5040
- extend, override toolbox bricks
5141
- add config elements via yml configuration
5242
- add consistent and beautiful config elements
53-
- implement conditions to your config (for example: display a dropdown in config window if another checkbox has been checked)
5443
- add your custom bricks while using the toolbox config environment
5544
- removes the default `pimcore_area_*` element wrapper from each brick
5645

@@ -95,7 +84,6 @@ The Toolbox provides a lot of [ready-to-use Bricks](docs/11_ElementsOverview.md)
9584
- [Code Style](docs/1_CodeStyle.md)
9685
- [Helper Commands](docs/2_Commands.md)
9786
- [Toolbox Elements Overview](docs/11_ElementsOverview.md)
98-
- [Conditional Logic in Configuration](docs/12_ConditionalLogic.md)
9987
- [CK-Editor Configuration](docs/13_CkEditor.md)
10088
- [Image Thumbnails Strategy](docs/14_ImageThumbnails.md)
10189
- [Configuration Context](docs/15_Context.md)

0 commit comments

Comments
 (0)