Skip to content

Commit

Permalink
Pimcore 11 Support (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat authored Sep 21, 2023
1 parent fdba349 commit 2aa6158
Show file tree
Hide file tree
Showing 718 changed files with 3,207 additions and 9,540 deletions.
18 changes: 10 additions & 8 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:test@127.0.0.1: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 Expand Up @@ -98,9 +98,11 @@ jobs:

- name: Setup Chromium
run: |
nohup $CHROMEWEBDRIVER/chromedriver --url-base=/wd/hub /dev/null 2>&1 &
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- name: Start Webserver and Chrome
- name: Start Symfony Server
run: |
curl -sS https://get.symfony.com/cli/installer | bash -s -- --install-dir=$HOME/.symfony/bin
~/.symfony/bin/symfony server:start --port=8080 --dir=public --allow-http --no-tls --daemon
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:root@127.0.0.1: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:root@127.0.0.1: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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ php-cgi.core
/tests/_output/*
/tests/_data/*
!/tests/_data/.gitkeep
/tests/_support/_generated/*
/tests/Support/_generated/*
12 changes: 6 additions & 6 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
| Q | A
| ---------------- | -----
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
| RFC? | yes/no
| Q | A |
|------------------|--------|
| Bug report? | yes/no |
| Feature request? | yes/no |
| BC Break report? | yes/no |
| RFC? | yes/no |

<!--
- Please fill in this template according to your issue.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# License
Copyright (C) 2022 DACHCOM.DIGITAL
Copyright (C) 2023 DACHCOM.DIGITAL

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

Expand Down
16 changes: 8 additions & 8 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
| Q | A
| ------------- | ---
| Branch? | dev-master for features / 3.x for bug fixes
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| Q | A |
|---------------|----------------------------------------------------|
| Branch? | dev-master for features / 4.x for bug fixes |
| Bug fix? | yes/no |
| New feature? | yes/no |
| BC breaks? | no |
| Deprecations? | yes/no |
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> |

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|-----------------------------------|----------------------------|--------------|----------------|----------------------------------------------------------------------------------|
| **4.x** | `10.5`, `10.6` | `^5.4` | 13.10.2021 | Feature Branch | master |
| **5.x** | `11.0` | `6.2` | -- | Feature Branch | master |
| **4.x** | `10.5`, `10.6` | `^5.4` | 13.10.2021 | Feature Branch | [4.x](https://github.com/dachcom-digital/pimcore-formbuilder/tree/4.x) |
| **3.x** | `6.0` - `6.9` | `3.4`, `^4.4` | 17.07.2019 | Bugfix only | [3.x](https://github.com/dachcom-digital/pimcore-formbuilder/tree/3.x) |
| **2.7** | `5.4`, `5.5`, `5.6`, `5.7`, `5.8` | `3.4` | 27.06.2019 | Unsupported | [2.7](https://github.com/dachcom-digital/pimcore-formbuilder/tree/2.7) |
| **1.5** | `4.0` | -- | 18.03.2017 | Unsupported | [pimcore4](https://github.com/dachcom-digital/pimcore-formbuilder/tree/pimcore4) |
Expand All @@ -21,11 +22,17 @@

```json
"require" : {
"dachcom-digital/formbuilder" : "~4.5.0"
"dachcom-digital/formbuilder" : "~5.0.0"
}
```

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

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

## Upgrading
Expand Down
133 changes: 10 additions & 123 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,132 +1,19 @@
# Upgrade Notes

## Version 4.5.0
- **[BUGFIX]**: allow `GET` operation on `/form-control/get-url-structure` route [#383](https://github.com/dachcom-digital/pimcore-formbuilder/issues/383)
- **[BUGFIX]**: suppress php warning of undefined array key [@jheimbach](https://github.com/dachcom-digital/pimcore-formbuilder/pull/387)
- **[ENHANCEMENT]**: Adds sort buttons for choices in ChoiceType [@jheimbach](https://github.com/dachcom-digital/pimcore-formbuilder/pull/388)
- **[ENHANCEMENT]**: Allow Relation(s) in Object Channel [#390](https://github.com/dachcom-digital/pimcore-formbuilder/issues/390)
- **[NEW FEATURE]**: Data Injectors [#395](https://github.com/dachcom-digital/pimcore-formbuilder/issues/395)

## Version 4.4.1
- **[BUGFIX]**: [Constraint Options] ignore internal properties [#381](https://github.com/dachcom-digital/pimcore-formbuilder/pull/381)

## Version 4.4.0
- **[ENHANCEMENT]**: Added `format` option to `Birthday`, `DateTime` and `DateField`
- **[ENHANCEMENT]**: Translate all non-default constraints messages (Key contains `message`)
- **[ENHANCEMENT]**: New Constraints added:
- `Symfony\Component\Validator\Constraints\Type`
- `Symfony\Component\Validator\Constraints\Count`
- `Symfony\Component\Validator\Constraints\Choice`

## Version 4.3.2
- **[BUGFIX]**: Assert valid timezone in date time fallback output transformer

## Version 4.3.1
- **[BUGFIX]**: Fix field collection assignment [#375](https://github.com/dachcom-digital/pimcore-formbuilder/issues/375)

## Version 4.3.0
- **[ENHANCEMENT]**: Use Flysystem for Storage [#334](https://github.com/dachcom-digital/pimcore-formbuilder/issues/334)
- Remove `PIMCORE_SYSTEM_TEMP_DIRECTORY/formbuilder-cache` as it is no longer needed

## Version 4.2.3
- **[BUGFIX]**: Fix field collection mapping [#370](https://github.com/dachcom-digital/pimcore-formbuilder/issues/370)

## Version 4.2.2
- **[BUGFIX]**: Export/Import Form fix [#371](https://github.com/dachcom-digital/pimcore-formbuilder/issues/371)

## Version 4.2.1
- **[ENHANCEMENT]**: Input Transformer [#7bde83b](https://github.com/dachcom-digital/pimcore-formbuilder/pull/369/commits/7bde83b015d242f2ce2f93fcd0b4feb78431587c)
- **[BUGFIX]**: Translate Funnel Action Label in Backend [#b4966a2](https://github.com/dachcom-digital/pimcore-formbuilder/pull/369/commits/b4966a2f23c0aa55e1df214632984ff0164aa945)

## Version 4.2.0
- **[NEW FEATURE]**: Funnel Feature [#362](https://github.com/dachcom-digital/pimcore-formbuilder/issues/362)
- **[FEATURE]**: PIMCORE 10.5 Support only!
- **[ENHANCEMENT]**: Removed deprecated session `NamespacedAttributeBag` which was unused
- **[ENHANCEMENT]**: Remove session from service DI
- **[ENHANCEMENT]**: Use EventListener instead of legacy plugin architecture, to boot ExtJS extensions
- **[DEPRECATION]**: Deprecated Method `assembleViewVars()` in `FormAssembler`, use `assemble()` instead

## Version 4.1.4
- **[BUGFIX]**: Fix link to translation list [#359](https://github.com/dachcom-digital/pimcore-formbuilder/pull/359)
- **[BUGFIX]**: skip dependency if document is null [@JHeimbach](https://github.com/dachcom-digital/pimcore-formbuilder/pull/354)
- **[BUGFIX]**: Check for valid success management configuration [#299](https://github.com/dachcom-digital/pimcore-formbuilder/issues/299)
- **[NEW FEATURE]**: Add Mail-Log Filter to Email Channel [#297](https://github.com/dachcom-digital/pimcore-formbuilder/issues/297)
- **[NEW FEATURE]**: Allow mapping of elements in fieldset container in Object Chanel [@JHeimbach](https://github.com/dachcom-digital/pimcore-formbuilder/pull/355)

## Version 4.1.3
- **[BUGFIX]**: Fix `ignoreFields` Assignment: Use `CollectionType` instead of `ChoiceType` [#352](https://github.com/dachcom-digital/pimcore-formbuilder/pull/352)

## Version 4.1.2
- **[BUGFIX]**: Rename overwitten `$translator` property in `MailEditorController` (Pimcore 10.5 compatibility). [@vollborn](https://github.com/dachcom-digital/pimcore-formbuilder/pull/345)
- **[BUGFIX]**: Type mismatch in `FormOptionsResolver` fixed. [#346](https://github.com/dachcom-digital/pimcore-formbuilder/pull/347)
- **[BUGFIX]**: Remove dummy csv generation loader [@pascalmoser](https://github.com/dachcom-digital/pimcore-formbuilder/pull/328)
- **[BUGFIX]**: ConditionalLogic: Load form data from container fields [@JHeimbach](https://github.com/dachcom-digital/pimcore-formbuilder/pull/330)
- **[BUGFIX]**: ConditionalLogic: Allow empty Validation field when removeAllValidations action is checked [@JHeimbach](https://github.com/dachcom-digital/pimcore-formbuilder/pull/331)
- **[BUGFIX]**: Fix detectFormRuntimeDataInRequest null return [@dpfaffenbauer](https://github.com/dachcom-digital/pimcore-formbuilder/pull/335)
- **[BUGFIX]**: Consider Pimcore Frontend FullPath for File Output [@dpfaffenbauer](https://github.com/dachcom-digital/pimcore-formbuilder/pull/336)
- **[BUGFIX]**: E-Mail CSV Export contains data of several forms when their Output Workflows share the same title [@anyMOTION-GRAPHICS](https://github.com/dachcom-digital/pimcore-formbuilder/issues/325)
- **[ENHANCEMENT]**: Add `role="presentation"` to honeypot field [#333](https://github.com/dachcom-digital/pimcore-formbuilder/issues/333)

## Version 4.1.1
- **[BUGFIX]**: Fix legacy fine uploader identifier

## Version 4.1.0
- **[NEW FEATURE]**: API Output channel [#290](https://github.com/dachcom-digital/pimcore-formbuilder/issues/301)
- **[NEW FEATURE]**: API Output channel field transformer
- **[BUGFIX]**: ensure migration of form configs will be symfony5 compatible [@grizzlydotweb](https://github.com/dachcom-digital/pimcore-formbuilder/pull/310)
- **[BUGFIX]**: introduce output workflow signals: attachments not working with multiple channels [#311](https://github.com/dachcom-digital/pimcore-formbuilder/issues/311)
- **[BUGFIX]**: fix typo in translation [#312](https://github.com/dachcom-digital/pimcore-formbuilder/issues/312)
- **[BUGFIX]**: disable `selectOnFocus` [#315](https://github.com/dachcom-digital/pimcore-formbuilder/issues/315)
- **[BUGFIX]**: ⚠️ add help text block to dynamic multi file. touched view: `form/theme/type/dynamic_multi_file.html.twig` [#308](https://github.com/dachcom-digital/pimcore-formbuilder/issues/308)
- **[BUGFIX]**: ⚠️ multi file upload: hidden type `_data` not in form row. touched view: `form/theme/type/dynamic_multi_file.html.twig` [#316](https://github.com/dachcom-digital/pimcore-formbuilder/issues/316)

## Version 4.0.2
- [ENHANCEMENT] enable placeholder in cc and bcc field in email output workflow [@frithjof](https://github.com/dachcom-digital/pimcore-formbuilder/pull/305)

## Version 4.0.1
- [FEATURE] PIMCORE 10.2 Support

## Migrating from Version 3.x to Version 4.0.0
⚠️ If you're still on version `2.x`, you need to update to `3.x` first, then [migrate](https://github.com/dachcom-digital/pimcore-formbuilder/blob/3.x/UPGRADE.md) to `3.3`. After that, you're able to update to `^4.0`.

> 💀 Be careful while migrating to production!
> A lot of things (including form configuration) have changed and will break your installation if you're ignoring the migration guide below!
### Migration
- Execute `bin/console doctrine:migrations:migrate --prefix 'FormBuilderBundle\Migrations'` after you've installed FormBuilder
- Remove `var/bundles/FormBuilderBundle/forms` if migration was successful
## Migrating from Version 4.x to Version 5.0
- Execute: `bin/console doctrine:migrations:migrate --prefix 'FormBuilderBundle\Migrations'`

### Global Changes
- Deprecations have been removed:
- `FormBuilderBundle\Storage\Form` needs to be `FormBuilderBundle\Model\FormDefinition` now
- `FormBuilderBundle\Storage\FormInterface` needs to be `FormBuilderBundle\Model\FormDefinitionInterface` now
- `FormBuilderBundle\Storage\FormFieldSimpleInterface` needs to be `FormBuilderBundle\Model\FieldDefinitionInterface` now
- `FormBuilderBundle\Manager\FormManager` needs to be `FormBuilderBundle\Manager\FormDefinitionManager` now
- `FormBuilderBundle\Event\MailEvent` has been removed, use `FormBuilderBundle\Event\OutputWorkflow\ChannelSubjectGuardEvent` instead
- Method `FormBuilderBundle\Assembler\FormAssembler::setFormOptionsResolver` has been removed. `FormBuilderBundle\Assembler\FormAssembler::assembleViewVars($optionsResolver)` directly requires FormOptionsResolver now
- CSV export types `Only Admin-Mail` and `Only User-Mail (Copy)` have been removed. Instead, you're now able to filter CSV export by available output workflows
- Mail layout fallback feature has been removed (which was enabled if no workflows have been defined and have been stored in `formbuilder_forms.mailLayout`). Please migrate layouts to email channels. This column will be removed with FormBuilder 5.0
- PHP8 return type declarations added: you may have to adjust your extensions accordingly
- Email properties (`mail_successfully_sent`, `mail_ignore_fields`, `mail_force_plain_text`, `mail_disable_default_mail_body`) have been removed and won't be recognized anymore
- Area-Brick Configuration does not allow `sendMailTmplate` and `sendCopyMailTemplate` fallbacks anymore. They must be configured by output workflows now
- All Folders in `views` are lowercase/dashed now (`common/redirect-flash-message.html.twig`, `email/form-data.html.twig`, `form/elements/dynamic-multi-file`, `form/presets`, `form/theme`, ...)
- If you have a custom email template, make sure that you're passing the `body`, `editmode`, `document` attributes to your email view template (@see `\FormBuilderBundle\Controller::emailAction()`). Also use `{{ body|raw }}` instead of `%Text(body);` inside your view template!
- `DropZoneAdapter` has been declared to the new default Multi File Handler. You can switch back to FineUploader by changing the `form_builder.dynamic_multi_file_adapter` configuration node
- All frontend javascript libraries have been removed from core. If you still want to use the jQuery extensions, please check out our [jquery-pimcore-formbuilder repo](https://github.com/dachcom-digital/jquery-pimcore-formbuilder)

### Conditional Logic Changes
- ⚠️ Action `Change Mail Behaviour` has been removed. Use `Switch Output Workflow` Action instead.

### Fixes
- Bootstrap Theme: Class `form-control` has been removed from dynamic multi file (see [#253](https://github.com/dachcom-digital/pimcore-formbuilder/pull/253)). You now need to set some [style definitions](docs/90_FrontendTips.md#multi-file-validation) by yourself
- Fixes root meta validation [#290](https://github.com/dachcom-digital/pimcore-formbuilder/issues/290)
- [DEPRECATION REMOVED] removed `FormDefinition::setMailLayout`. Please migrate to output workflows before updating
- [IMPROVEMENTS] Recommended folder structure by symfony adopted
- [FUNNEL] Route include changed from `@FormBuilderBundle/Resources/config/pimcore/routing_funnels.yml` to `@FormBuilderBundle/config/pimcore/routing_funnels.yaml`
- [BC BREAK] Mail Layout Editor: While there is a migration, we're not able to migrate container (fieldset, repeater) fields. Please adjust your output workflow channels manually.
- [BC BREAK] All views are lowercase/underscore now (`email/form_data.html.twig`, `form/elements/dynamic_multi_file/*`)

### New Features
- Conditional Logic Action `Switch Output Workflow` added
- [Configurable Html2Text Options](./docs/OutputWorkflow/10_EmailChannel.md#configure-html2text-options)
- Yaml file storage migrated to Database storage
- Import/Export Improvement: You're able to export/import the complete form dataset (form, workflows and channels)
- Mail Layout Editor, see [#390](https://github.com/dachcom-digital/pimcore-formbuilder/issues/398)
- If [Emailizr](https://github.com/dachcom-digital/pimcore-emailizr) is installed, formbuilder will use it automatically to transform html tables

***

FormBuilder 3.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-formbuilder/blob/3.x/UPGRADE.md
FormBuilder 4.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-formbuilder/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
Loading

0 comments on commit 2aa6158

Please sign in to comment.