Skip to content

Commit

Permalink
Pimcore X Compatibility (#292)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
solverat authored Oct 13, 2021
1 parent 6ebe97b commit d268b50
Show file tree
Hide file tree
Showing 412 changed files with 4,736 additions and 18,971 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
env:
TEST_BUNDLE_NAME: "FormBuilderBundle"
TEST_BUNDLE_INSTALLER_CLASS: "FormBuilderBundle\\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
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
env:
TEST_BUNDLE_NAME: "FormBuilderBundle"
TEST_BUNDLE_INSTALLER_CLASS: "FormBuilderBundle\\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/FormBuilderBundle --config easy-coding-standard.yml
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/FormBuilderBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php
31 changes: 18 additions & 13 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
env:
TEST_BUNDLE_NAME: "FormBuilderBundle"
TEST_BUNDLE_INSTALLER_CLASS: "FormBuilderBundle\\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: 9 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,41 @@
[![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)
[![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/formbuilder.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/formbuilder)
[![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)
[![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)
[![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)
[![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)

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

### Release Plan

| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|-----------------------------------|----------------------------|--------------|----------------|------------|
| **4.x** | `10.0` | `5.2` | UNRELEASED | Feature Branch | dev-master |
| **4.x** | `10.1` | `5.3` | 13.10.2021 | Feature Branch | dev-master |
| **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 |
| **1.5** | `4.0` | -- | 18.03.2017 | Unsupported | pimcore4 |

## Pimcore X
This Branch is under heavy development and should not be used in production!

## Installation

```json
"require" : {
"dachcom-digital/formbuilder" : "dev-master"
"dachcom-digital/formbuilder" : "~4.0.0"
}
```

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

## Upgrading

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

Does actually the same as the update command and preferred in CI-Workflow:
- Execute: `$ bin/console pimcore:migrations:migrate -b FormBuilderBundle`
- Execute: `$ bin/console doctrine:migrations:migrate --prefix 'FormBuilderBundle\Migrations'`

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

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.
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.
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.

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

## Deprecated
- [Mail Template Configuration](docs/Deprecated/MailTemplates.md)
- [Global Mail Editor](docs/Deprecated/MailEditor.md)
- [Mail Template Success Messages Properties](docs/Deprecated/SuccessMessage.md)
- [Mail Template Submission Types (html/plain-text)](docs/Deprecated/MailSubmissionTypes.md)

## Upgrade Info
Before updating, please [check our upgrade notes!](UPGRADE.md)

Expand Down
Loading

0 comments on commit d268b50

Please sign in to comment.