Skip to content

Commit

Permalink
Pimcore X Compatibility (#160)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
solverat committed Oct 1, 2021
1 parent 386b96e commit 90553ee
Show file tree
Hide file tree
Showing 370 changed files with 4,377 additions and 7,783 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/codeception.yml
Expand Up @@ -11,16 +11,16 @@ jobs:
env:
TEST_BUNDLE_NAME: "ToolboxBundle"
TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

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

SYMFONY_DEPRECATIONS_HELPER: "weak"
PIMCORE_PHP_ERROR_REPORTING: 32767
Expand All @@ -41,33 +41,28 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [7.4]
symfony: [^4.4]
pimcore: [~6.6.0, ~6.7.0, ~6.8.0, ~6.9.0]
php: [ 8.0 ]
symfony: [ ^5.3 ]
pimcore: [ ~10.1.0 ]
include:
- pimcore: ~6.6.0
template_tag: v2.6.0
- pimcore: ~6.7.0
template_tag: v2.7.0
- pimcore: ~6.8.0
template_tag: v2.8.0
- pimcore: ~6.8.0
symfony: ^3.4
php: 7.4
template_tag: v2.8.0
- pimcore: ~6.9.0
template_tag: v2.8.19
- pimcore: ~10.1.0
template_tag: v10.1.0
steps:
- uses: actions/checkout@v2
with:
path: lib/test-bundle

- name: Generate Application Structure
run: |
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
mv skeleton/app .
mv skeleton/composer.json .
mv skeleton/bin .
mv skeleton/config .
mv skeleton/public .
mv skeleton/src .
mv skeleton/templates .
mv skeleton/var .
mv skeleton/web .
mv skeleton/src/AppBundle src
rm -r skeleton
- name: Setup Pimcore Codeception Framework
env:
Expand Down Expand Up @@ -110,7 +105,7 @@ jobs:
- name: Start Webserver and Chrome
run: |
wget https://get.symfony.com/cli/installer -O - | bash
~/.symfony/bin/symfony server:start --port=8080 --dir=web --force-php-discovery --allow-http --no-tls --daemon
~/.symfony/bin/symfony server:start --port=8080 --dir=public --force-php-discovery --allow-http --no-tls --daemon
- name: Get Composer Cache Directory
id: composer-cache
Expand All @@ -135,17 +130,17 @@ jobs:
- name: Assets Install
run: |
bin/console assets:install web --relative --symlink
bin/console assets:install public --relative --symlink
- name: Tests
run: |
bin/console cache:warmup --env=test
vendor/bin/codecept run --env github -c ${{ env.GITHUB_WORKSPACE }}
vendor/bin/codecept run --env github -c ${{ github.workspace }}/lib/test-bundle
- name: Log Output
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Logs (PHP ${{ matrix.php }}, Pimcore ${{ matrix.pimcore }}, Symfony ${{ matrix.symfony }})"
path: tests/_output/
path: ${{ github.workspace }}/lib/test-bundle/tests/_output/
if-no-files-found: ignore
32 changes: 18 additions & 14 deletions .github/workflows/ecs.yml
Expand Up @@ -11,13 +11,13 @@ jobs:
env:
TEST_BUNDLE_NAME: "ToolboxBundle"
TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

PIMCORE_ENVIRONMENT: test
APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
PIMCORE_TEST_URL: "http://localhost"

Expand All @@ -40,24 +40,28 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [7.4]
symfony: [^4.4]
pimcore: [^6.8]
php: [ 8.0 ]
symfony: [ ^5.3 ]
pimcore: [ ~10.1.0 ]
include:
- pimcore: ^6.8
template_tag: v2.8.0

- pimcore: ~10.1.0
template_tag: v10.1.0
steps:
- uses: actions/checkout@v2
with:
path: lib/test-bundle

- name: Generate Application Structure
run: |
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
mv skeleton/app .
mv skeleton/composer.json .
mv skeleton/bin .
mv skeleton/config .
mv skeleton/public .
mv skeleton/src .
mv skeleton/templates .
mv skeleton/var .
mv skeleton/web .
mv skeleton/src/AppBundle src
rm -r skeleton
- name: Setup Pimcore Codeception Framework
env:
Expand Down Expand Up @@ -116,10 +120,10 @@ jobs:
- name: Assets Install
run: |
bin/console assets:install web --relative --symlink
bin/console assets:install public --relative --symlink
- name: Easy Coding Standard Check
continue-on-error: true
run: |
bin/console cache:warmup --env=test
vendor/bin/ecs check src/ToolboxBundle --config easy-coding-standard.yml
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/ToolboxBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php
31 changes: 18 additions & 13 deletions .github/workflows/php-stan.yml
Expand Up @@ -11,13 +11,13 @@ jobs:
env:
TEST_BUNDLE_NAME: "ToolboxBundle"
TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

PIMCORE_ENVIRONMENT: test
APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
PIMCORE_TEST_URL: "http://localhost"

Expand All @@ -40,23 +40,28 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [7.4]
symfony: [^4.4]
pimcore: [^6.8]
php: [ 8.0 ]
symfony: [ ^5.3 ]
pimcore: [ ~10.1.0 ]
include:
- pimcore: ^6.8
template_tag: v2.8.0
- pimcore: ~10.1.0
template_tag: v10.1.0
steps:
- uses: actions/checkout@v2
with:
path: lib/test-bundle

- name: Generate Application Structure
run: |
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
mv skeleton/app .
mv skeleton/composer.json .
mv skeleton/bin .
mv skeleton/config .
mv skeleton/public .
mv skeleton/src .
mv skeleton/templates .
mv skeleton/var .
mv skeleton/web .
mv skeleton/src/AppBundle src
rm -r skeleton
- name: Setup Pimcore Codeception Framework
env:
Expand Down Expand Up @@ -115,9 +120,9 @@ jobs:
- name: Assets Install
run: |
bin/console assets:install web --relative --symlink
bin/console assets:install public --relative --symlink
- name: Php Stan
run: |
bin/console cache:warmup --env=test
vendor/bin/phpstan analyse -c phpstan.neon -a tests/_phpstan-bootstrap.php src -l 2
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
34 changes: 11 additions & 23 deletions README.md
Expand Up @@ -6,51 +6,40 @@ The Toolbox is a Kickstarter for your every day project. It provides some import
[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/toolbox.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/toolbox)
[![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)
[![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)
[![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)

![Pimcore Toolbox](https://user-images.githubusercontent.com/700119/135613598-a9ef2c69-9a44-41cd-8542-596a0322d3da.png)

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

### Release Plan

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

### Installation

```json
"require" : {
"dachcom-digital/toolbox" : "~3.3.0"
"dachcom-digital/toolbox" : "~4.0.0"
}
```

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

## Upgrading

### Upgrading via Extension Manager
After you have updated the Toolbox Bundle via composer, open pimcore backend and go to `Tools` => `Extension`:
- Click the green `+` Button in `Update` row

### Upgrading via CommandLine
After you have updated the Toolbox Bundle via composer:
- Execute: `$ bin/console pimcore:bundle:update ToolboxBundle`

### Migrate via CommandLine
Does actually the same as the update command and preferred in CI-Workflow:
- Execute: `$ bin/console pimcore:migrations:migrate -b ToolboxBundle`
- Execute: `$ bin/console doctrine:migrations:version --add --all --prefix 'ToolboxBundle\Migrations'`

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

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

0 comments on commit 90553ee

Please sign in to comment.