Skip to content

Commit

Permalink
Pimcore 11 Support (#197)
Browse files Browse the repository at this point in the history
* implementing pimcore 11 support
* add dependency
* fix test namespace
* improve editmode asset handling
* remove custom_areas bucket
* disable core areas by default, adjust view names
* remove dynamic link flag, add areas to test stack
* fix changed area namespaces
* hardening column calculator config, adjust naming
* improve context config build
* implement headless layout
* finalize headless context
* fix builder interface attributes
* adjust docs
  • Loading branch information
solverat authored Aug 3, 2023
1 parent 456689e commit 348611d
Show file tree
Hide file tree
Showing 350 changed files with 5,089 additions and 2,964 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://test:[email protected]:3306/dachcom_bundle_test"
Expand All @@ -38,12 +38,12 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [ 8.1 ]
symfony: [ ^5.4 ]
pimcore: [ ~10.6.0 ]
php: [ 8.2 ]
symfony: [ ^6.2 ]
pimcore: [ ~11.0.0 ]
include:
- pimcore: ~10.6.0
template_tag: v10.2.5
- pimcore: ~11.0.0
template_tag: v11.0.0
steps:
- uses: actions/checkout@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/dachcom_bundle_test"
Expand All @@ -37,12 +37,12 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [ 8.1 ]
symfony: [ ^5.4 ]
pimcore: [ ~10.6.0 ]
php: [ 8.2 ]
symfony: [ ^6.2 ]
pimcore: [ ~11.0.0 ]
include:
- pimcore: ~10.6.0
template_tag: v10.2.5
- pimcore: ~11.0.0
template_tag: v11.0.0
steps:
- uses: actions/checkout@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/dachcom_bundle_test"
Expand All @@ -37,12 +37,12 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [ 8.1 ]
symfony: [ ^5.4 ]
pimcore: [ ~10.6.0 ]
php: [ 8.2 ]
symfony: [ ^6.2 ]
pimcore: [ ~11.0.0 ]
include:
- pimcore: ~10.6.0
template_tag: v10.2.5
- pimcore: ~11.0.0
template_tag: v11.0.0
steps:
- uses: actions/checkout@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Vagrantfile
php-cgi.core
.sass-cache

# codeception (only stage *.dist.yml config files)
/codeception.yml
/tests/codeception.yml
/tests/*.suite.yml
# codeception (only stage *.dist.yaml config files)
/codeception.yaml
/tests/codeception.yaml
/tests/*.suite.yaml
/tests/_output/*
/tests/_data/*
!/tests/_data/.gitkeep
/tests/_support/_generated/*
/tests/Support/_generated/*
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,29 @@ The Toolbox is a Kickstarter for your every day project. It provides some import

### Release Plan

| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|-----------------------------------|----------------------------|--------------|----------------|------------|
| **4.x** | `10.5`, `10.6` | `5.4` | 01.10.2021 | Feature Branch | 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 |
| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|-----------------------------------|----------------------------|--------------|----------------|----------|
| **5.x** | `11.0` | `6.2` | -- | Feature Branch | master |
| **4.x** | `10.5`, `10.6` | `5.4` | 01.10.2021 | Bugfixes | 4.x |
| **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" : "~4.1.0"
"dachcom-digital/toolbox" : "~5.0.0"
}
```

- Execute: `$ bin/console pimcore:bundle:enable ToolboxBundle`
Add Bundle to `bundles.php`:
```php
return [
ToolboxBundle\ToolboxBundle::class => ['all' => true],
];
```

- Execute: `$ bin/console pimcore:bundle:install ToolboxBundle`

## Upgrading
Expand Down Expand Up @@ -83,7 +90,7 @@ 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)
- [CK-Editor Configuration](docs/13_CkEditor.md)
- [Wysiwyg Configuration](docs/13_Wysiwyg_Editor.md)
- [Image Thumbnails Strategy](docs/14_ImageThumbnails.md)
- [Configuration Context](docs/15_Context.md)
- [Editable Store Provider](docs/16_EditableStoreProvider.md)
Expand All @@ -94,6 +101,7 @@ The Toolbox provides a lot of [ready-to-use Bricks](docs/11_ElementsOverview.md)
- [Column Adjuster](docs/60_ColumnAdjuster.md)
- [Configuration Flags](docs/70_ConfigurationFlags.md)
- [Javascript Plugins](docs/80_Javascript.md)
- [Headless Mode](docs/90_Headless.md)

## Pimcore Fixes / Overrides
- Fix the pimcore iframe [maskFrames](src/ToolboxBundle/Resources/public/js/document/edit.js) bug (in some cases the iframe overlay field does not apply to the right position)
Expand Down
133 changes: 67 additions & 66 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,78 @@
# Upgrade Notes

## Version 4.1.0
- [FEATURE] PIMCORE 10.5 support only
- [IMPROVEMENT] Compatibility with Members 4.1 added
- [IMPROVEMENT] Remove unused js classes
- [BUGFIX] [VHS Element] Use right element context in video type selector
## Migrating from Version 4.x to Version 5.0.0

## Version 4.0.10
- [BUGFIX] fix case sensitivity for accordion in bootstrap3 theme `Resources/views/toolbox/bootstrap3/accordion/partial/Accordion => Resources/views/toolbox/bootstrap3/accordion/partial/accordion`

## Version 4.0.9
- [BUGFIX] Missing area layout for bricks without configuration [#182](https://github.com/dachcom-digital/pimcore-toolbox/issues/182)
- [IMPROVEMENT] Move permission command listener to maintenance task [#181](https://github.com/dachcom-digital/pimcore-toolbox/issues/181)

## Version 4.0.8
- [BUGFIX] Fix wrong query identifier for MembersBundle connector [@scrummer](https://github.com/dachcom-digital/pimcore-toolbox/pull/179)

## Version 4.0.7
- [BUGFIX] prevent type error in `DownloadExtension:getOptimizedFileSize`

## Version 4.0.6
- [BUGFIX] fix id for Accordion and Gallery: save class names

## Version 4.0.5
- [BUGFIX] fix type error in `Vhs:setDataFromResource`

## Version 4.0.4
- [BUGFIX] fix file size calculation
- [BUGFIX] add label for column adjuster [@blankse](https://github.com/dachcom-digital/pimcore-toolbox/pull/170)
- [BUGFIX] fix image thumbnail class [@NaincyKumariKnoldus](https://github.com/dachcom-digital/pimcore-toolbox/pull/168)

## Version 4.0.3
- [BUGFIX] return correct default value if editable is null
### New Features
- [Headless Mode](./docs/90_Headless.md)

## Version 4.0.2
- [FEATURE] PIMCORE 10.2 Support
### Global Changes
- All folders and sub-folders in views are lowercase/underscore now (areas/accordion/accordion_tab, areas/google_map, areas/iframe, areas/link_list, areas/parallax_container, areas/parallax_container_section, areas/parallax_container_section, areas/slide_columns)
- All snippet views are underscore now (snippet_layout.html.twig, snippet/teaser_default, snippet/layout/teaser_layout) - check your views for includes!
- All views are lowercase/underscore now (areas/video/type_*, areas/google_map/info_window, parallax_container/partial/*, parallax_container/wrapper/container_wrapper)
- `dynamiclink` feature has finally been removed! If you're still using it, stay on v4 and [migrate first](https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/docs/70_ConfigurationFlags.md#-use_dynamic_links-flag)

## Version 4.0.1
- [BUGFIX] Fetching edit mode state from editable instead of checking area param

## Migrating from Version 3.x to Version 4.0.0
⚠️ If you're still on version `2.x`, you need to install `3.x` first, then [migrate](https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/UPGRADE.md) to `3.3`. After that, you're able to update to `^4.0`.
### WYSIWYG Config Changes
- CK Editor support has been removed from PIMCORE. Toolbox currently only supports the new TinyMCE Editor. Read more about it [here](./docs/13_Wysiwyg_Editor.md)
- Config node `toolbox.ckeditor` changed to `toolbox.wysiwyg_editor`
- Config node `global_style_sets` has been removed (will be set via `wysiwyg_editor.config`)
- Twig Helper `toolbox_get_wysiwyg_config_path()` has been removed (will be added globally via edit mode js file injection)

### Global Changes
- All deprecations have been removed:
- Legacy Service Alias `toolbox.area.brick.base_brick` has been removed
- Config Node `toolbar.x`, `toolbar.y`, `toolbar.xAlign`, `toolbar.yAlign`, `toolbar.title` has been removed
- Config Node `area_block_configuration.controlsAlign`, `area_block_configuration.controlsTrigger` has added
- Config Node `disallowed_subareas`: `areas_appearance`
- Config Node `disallowed_content_snippet_areas`: `snippet_areas_appearance`
- Config Node `ToolboxBundle\Calculator\*`: `column_calculator|slide_calculator`
- ⚠️ Element `pimcore_dynamiclink` has been removed: If you're still using this element in your project, you need to [migrate](https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/docs/70_ConfigurationFlags.md#-use_dynamic_links-flag) to pimcore_link first (via TB 3.x)!
- All Folders in `views` are lowercase/dashed now (`areas/google-map`, `areas/iframe`, `areas/link-list`, `areas/paralax-container`, `areas/slide-columns`, `toolbox/bootstrap4`, ...)
### Areas Restriction Changes
- `areas_appearance` has been renamed to `areablock_restriction`, `snippet_areas_appearance` has been renamed to `snippet_areablock_restriction`.

### Editable Changes
- Instead of `pimcore.area.brick` you need to use the `toolbox.area.brick` tag to register your brick. Also remove `setAreaBrickType` call from your service definition
- Always use `$info->setParam(key, value)` instead of `$info->setParams()`, otherwise you'll overwrite given parameters from the toolbox abstract brick
- Remove `{{ elementConfigBar|raw }}` in your templates
- Conditional Logic feature for editable has been removed
- Reload property in node `config.reload` has been removed. Use `config_parameter.reload_on_close: true` instead
- Custom view has been removed, TB is now using the pimcore defaults dialog box configuration
- Config Node `col_class` (In`[BRICKNAME].config_elements.[ELEMENT]` has been removed

### Type Changes
- `StoreProviderInterface::getValues():array` needs to return an array (return type declaration added)
- `ContextResolverInterface::getCurrentContextIdentifier():?string` needs to return null|string (return type declaration added)
- `custom_areas` has been removed. Please add your custom areas to the default `areas` node.

### Editables States
Pimcore removed the extension manager, so it is not possible to enabled/disable them via pimcore anymore.
Therefor we removed all toolbox core editables by default, you need to enable every single one of them:

```yaml
toolbox:
enabled_core_areas:
- accordion
- anchor
- columns
- container
- content
- download
- gallery
- googleMap
- headline
- iFrame
- image
- linkList
- parallaxContainer
- parallaxContainerSection
- separator
- slideColumns
- snippet
- spacer
- teaser
- video
```
You need to change the global state via configuration now:
```yaml
toolbox:
areas:
accordion:
enabled: false
```
If you want to disable any area from third party bundles (for example the members brick) just use their brick id to disable them:
```yaml
areas:
members_login:
enabled: false
```
### Theme
The default theme section will be loaded, **only** if **no** `toolbox.theme.layout` has been defined.
If you're using the `Bootstrap4` layout, and it's explicitly configured in your project, you need to adopt the config from toolbox core `config/theme/bootstrap4_theme.yaml`
You also must configure `toolbox.calculators.*` explicitly, if you're using custom layout frameworks.

### New Features
- ⚠️ [Editable Permissions](https://github.com/dachcom-digital/pimcore-toolbox/issues/161) have been added. Non-Admin Users will **NOT** be able to add editables until you enabled specific permissions for them!
- Google Maps Improved:
- Only call API if address has changed
- Better Error Reporting: Display some notes (only in editmode), if something went wrong during API call
- Simple Area Brick: Create a simple editable without creating any php classes. Read more about it [here](./docs/10_CustomBricks.md#simple-brick))
***

Toolbox 3.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/UPGRADE.md
Toolbox 4.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-toolbox/blob/4.x/UPGRADE.md
9 changes: 5 additions & 4 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
namespace: DachcomBundle\Test
support_namespace: Support
actor: Tester
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
output: tests/_output
log: tests/_output/var/logs
data: tests/_data
support: tests/Support
bootstrap: _bootstrap.php
settings:
bootstrap: _bootstrap.php
memory_limit: -1
colors: true
params:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
}
},
"require": {
"pimcore/pimcore": "^10.5"
"pimcore/pimcore": "^11.0"
},
"require-dev": {
"codeception/codeception": "^4.1",
"codeception/module-webdriver": "^1.4",
"codeception/module-symfony": "^1.6",
"codeception/codeception": "^5.0",
"codeception/module-symfony": "^3.1",
"codeception/module-webdriver": "^4.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"symplify/easy-coding-standard": "^9.0"
Expand Down
Loading

0 comments on commit 348611d

Please sign in to comment.