Skip to content

Commit d268b50

Browse files
authored
Pimcore X Compatibility (#292)
* awakening the beast * remove deprecations * re-enable area brick, remove legacy stuff * remove deprecated MailEvent * remove more deprecation, clean-up output workflow * remove ckeditor clipboard plugin * strict return type declaration * migrate file upload module, extract frontend modules * buid up conditional logic * remove deprecated docs * instant attachment data * remove unused checkPath * resolve phpstan issues * remove mail behaviour action, introduce switchOutputWorkflow action, improve tests * introduce html2text options * introduce csv export with output workflow filter * remove more deprecated mail layout stuff, fix csv export * fix functional tests, fix form dependencies check * fix more functional tests * fix js tests assets, fix some case sensetive names * fix success management type declaration, add more cdn links * fix mail test setting * switch default file upload handler in tests * fix more acceptance tests * test: fix javascript action * pass document and editmode in snippet test action * improve file stream directory creation * improve file stream extension check * move forms to database, resolves #293 * cleanup test clearpath * do not delete form files after migration * fix import/export test * check meta validation of root form attributes against hidden fields, fixes #290 * finalize upgrade docs, change export label * finalize readme
1 parent 6ebe97b commit d268b50

File tree

412 files changed

+4736
-18971
lines changed

Some content is hidden

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

412 files changed

+4736
-18971
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: "FormBuilderBundle"
1313
TEST_BUNDLE_INSTALLER_CLASS: "FormBuilderBundle\\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: "FormBuilderBundle"
1313
TEST_BUNDLE_INSTALLER_CLASS: "FormBuilderBundle\\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/FormBuilderBundle --config easy-coding-standard.yml
129+
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/FormBuilderBundle --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: "FormBuilderBundle"
1313
TEST_BUNDLE_INSTALLER_CLASS: "FormBuilderBundle\\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: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,41 @@
33
[![Join the chat at https://gitter.im/pimcore/pimcore](https://img.shields.io/gitter/room/pimcore/pimcore.svg?style=flat-square)](https://gitter.im/pimcore/pimcore)
44
[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)
55
[![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/formbuilder.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/formbuilder)
6-
[![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-formbuilder/Codeception?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-formbuilder/actions?query=workflow%3A%22Codeception%22)
7-
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-formbuilder/PHP%20Stan?style=flat-square&logo=github&label=phpstan%20level%202)](https://github.com/dachcom-digital/pimcore-formbuilder/actions?query=workflow%3A%22PHP%20Stan%22)
6+
[![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-formbuilder/Codeception/master?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-formbuilder/actions?query=workflow%3ACodeception+branch%3Amaster)
7+
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-formbuilder/PHP%20Stan/master?style=flat-square&logo=github&label=phpstan%20level%204)](https://github.com/dachcom-digital/pimcore-formbuilder/actions?query=workflow%3A"PHP+Stan"+branch%3Amaster)
88

9-
![FormBuilder](https://user-images.githubusercontent.com/700119/48312098-066fee80-e5aa-11e8-97d4-02fcfdf4e51e.png)
9+
![PIMCORE FormBuilder](https://user-images.githubusercontent.com/700119/137106375-3618b401-c2cd-4c56-8c29-179f12e6a94f.png)
1010

1111
### Release Plan
1212

1313
| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
1414
|---------|-----------------------------------|----------------------------|--------------|----------------|------------|
15-
| **4.x** | `10.0` | `5.2` | UNRELEASED | Feature Branch | dev-master |
15+
| **4.x** | `10.1` | `5.3` | 13.10.2021 | Feature Branch | dev-master |
1616
| **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) |
1717
| **2.7** | `5.4`, `5.5`, `5.6`, `5.7`, `5.8` | `3.4` | 27.06.2019 | Unsupported | 2.7 |
1818
| **1.5** | `4.0` | -- | 18.03.2017 | Unsupported | pimcore4 |
1919

20-
## Pimcore X
21-
This Branch is under heavy development and should not be used in production!
22-
2320
## Installation
2421

2522
```json
2623
"require" : {
27-
"dachcom-digital/formbuilder" : "dev-master"
24+
"dachcom-digital/formbuilder" : "~4.0.0"
2825
}
2926
```
3027

31-
After you have installed the FormBuilder Bundle via composer:
3228
- Execute: `$ bin/console pimcore:bundle:enable FormBuilderBundle`
3329
- Execute: `$ bin/console pimcore:bundle:install FormBuilderBundle`
3430

3531
## Upgrading
36-
37-
### Upgrading via CommandLine
38-
After you have updated the FormBuilder Bundle via composer:
39-
- Execute: `$ bin/console pimcore:bundle:update FormBuilderBundle`
40-
41-
Does actually the same as the update command and preferred in CI-Workflow:
42-
- Execute: `$ bin/console pimcore:migrations:migrate -b FormBuilderBundle`
32+
- Execute: `$ bin/console doctrine:migrations:migrate --prefix 'FormBuilderBundle\Migrations'`
4333

4434
## Usage
4535
![](http://g.recordit.co/39nEX5OhQK.gif)
46-
1. Go to `Settings` => `Form Builder Settings` and create your form (Make sure your [spam protection](docs/03_SpamProtection.md) is covered!).
36+
1. Go to `Settings` => `Form Builder Settings` and create your form (Make sure your [spam protection](docs/03_SpamProtection.md) is covered).
4737
2. Open a document and place the form area brick like any other bricks via drag and drop.
4838
3. Use the edit button at the right top corner to configure your form.
4939

50-
Also make sure you've included the [flash template](docs/Deprecated/11_SuccessMessage.md#flash-messages-implementation) if you want to have some success messages after a redirect.
40+
Also make sure you've included the [flash template](docs/OutputWorkflow/20_SuccessManagement.md#flash-messages-implementation) if you want to have some success messages after a redirect.
5141
It's also possible to render a form via Twig or even within a controller method. [Click here](docs/0_Usage.md) to learn more about the form rendering types.
5242

5343
## Overriding Templates
@@ -56,7 +46,7 @@ Nothing to tell here, it's just [Symfony](https://symfony.com/doc/current/templa
5646
## Further Information
5747
- [SPAM Protection (Honeypot, reCAPTCHA)](docs/03_SpamProtection.md)
5848
- [Usage (Rendering Types, Configuration)](docs/0_Usage.md)
59-
- [Output Workflows (New!)](docs/OutputWorkflow/0_Usage.md) 🔥
49+
- [Output Workflows](docs/OutputWorkflow/0_Usage.md)
6050
- [Email Channel](docs/OutputWorkflow/10_EmailChannel.md)
6151
- [Object Channel](docs/OutputWorkflow/11_ObjectChannel.md)
6252
- [Custom Channel](docs/OutputWorkflow/12_CustomChannel.md)
@@ -85,12 +75,6 @@ Nothing to tell here, it's just [Symfony](https://symfony.com/doc/current/templa
8575
- [FormBuilder Javascript Plugins](docs/91_Javascript.md)
8676
- [Configuration Flags](docs/100_ConfigurationFlags.md)
8777

88-
## Deprecated
89-
- [Mail Template Configuration](docs/Deprecated/MailTemplates.md)
90-
- [Global Mail Editor](docs/Deprecated/MailEditor.md)
91-
- [Mail Template Success Messages Properties](docs/Deprecated/SuccessMessage.md)
92-
- [Mail Template Submission Types (html/plain-text)](docs/Deprecated/MailSubmissionTypes.md)
93-
9478
## Upgrade Info
9579
Before updating, please [check our upgrade notes!](UPGRADE.md)
9680

0 commit comments

Comments
 (0)