Skip to content

Commit

Permalink
Merge pull request #422 from franmomu/sf7
Browse files Browse the repository at this point in the history
Allow Symfony 7
  • Loading branch information
craue committed Jan 11, 2024
2 parents 4f1c7d5 + da49c8d commit 4244fd7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 36 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
php: '7.3'
dependencies: lowest
-
php: '8.2'
php: '8.3'
dependencies: highest
-
php: '7.3'
Expand All @@ -54,8 +54,12 @@ jobs:
-
php: '8.2'
symfony: '6.4.*'
stability: dev
allow-failure: true
-
php: '8.3'
symfony: '6.4.*'
-
php: '8.2'
symfony: '7.0.*'

services:
mysql:
Expand Down
10 changes: 2 additions & 8 deletions Form/Extension/FormFlowFormExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public static function getExtendedTypes() : iterable {
return [FormType::class];
}

/**
* @return void
*/
public function configureOptions(OptionsResolver $resolver) {
public function configureOptions(OptionsResolver $resolver): void {
$resolver->setDefined([
'flow_instance',
'flow_instance_key',
Expand All @@ -39,10 +36,7 @@ public function configureOptions(OptionsResolver $resolver) {
]);
}

/**
* @return void
*/
public function buildForm(FormBuilderInterface $builder, array $options) {
public function buildForm(FormBuilderInterface $builder, array $options): void {
if (array_key_exists('flow_instance', $options) && array_key_exists('flow_instance_key', $options)) {
$builder->add($options['flow_instance_key'], HiddenType::class, [
'data' => $options['flow_instance'],
Expand Down
10 changes: 2 additions & 8 deletions Form/Extension/FormFlowHiddenFieldExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,14 @@ public static function getExtendedTypes() : iterable {
return [HiddenType::class];
}

/**
* @return void
*/
public function configureOptions(OptionsResolver $resolver) {
public function configureOptions(OptionsResolver $resolver): void {
$resolver->setDefined([
'flow_instance_key',
'flow_step_key',
]);
}

/**
* @return void
*/
public function finishView(FormView $view, FormInterface $form, array $options) {
public function finishView(FormView $view, FormInterface $form, array $options): void {
if (array_key_exists('flow_instance_key', $options) && $view->vars['name'] === $options['flow_instance_key']) {
$view->vars['value'] = $options['data'];
$view->vars['full_name'] = $options['flow_instance_key'];
Expand Down
34 changes: 17 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"homepage": "https://github.com/craue/CraueFormFlowBundle",
"require": {
"php": "^7.3 || ^8",
"symfony/config": "^4.4 || ^5.4 || ^6.3",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.3",
"symfony/event-dispatcher": "^4.4 || ^5.4 || ^6.3",
"symfony/form": "^4.4 || ^5.4 || ^6.3",
"symfony/http-foundation": "^4.4 || ^5.4 || ^6.3",
"symfony/http-kernel": "^4.4 || ^5.4 || ^6.3",
"symfony/options-resolver": "^4.4 || ^5.4 || ^6.3",
"symfony/security-core": "^4.4 || ^5.4 || ^6.3",
"symfony/translation": "^4.4 || ^5.4 || ^6.3",
"symfony/validator": "^4.4 || ^5.4 || ^6.3",
"symfony/yaml": "^4.4 || ^5.4 || ^6.3"
"symfony/config": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/dependency-injection": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/event-dispatcher": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/form": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/http-foundation": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/http-kernel": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/options-resolver": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/security-core": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/translation": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/validator": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/yaml": "^4.4 || ^5.4 || ^6.3 || ^7.0"
},
"require-dev": {
"craue/translations-tests": "^1.1",
Expand All @@ -46,12 +46,12 @@
"phpstan/phpstan-strict-rules": "^1.1",
"phpstan/phpstan-symfony": "^1.1",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.3",
"symfony/css-selector": "^4.4 || ^5.4 || ^6.3",
"symfony/mime": "^4.4 || ^5.4 || ^6.3",
"symfony/phpunit-bridge": "^6.3",
"symfony/security-bundle": "^4.4 || ^5.4 || ^6.3",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.3"
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/css-selector": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/mime": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/phpunit-bridge": "^6.3 || ^7.0",
"symfony/security-bundle": "^4.4 || ^5.4 || ^6.3 || ^7.0",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.3 || ^7.0"
},
"conflict": {
"doctrine/dbal": "<2.10"
Expand Down

0 comments on commit 4244fd7

Please sign in to comment.