Skip to content

Commit

Permalink
Symfony 5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Romain Guerrero committed Jul 3, 2023
1 parent 23173f1 commit 16af933
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 27 deletions.
3 changes: 1 addition & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('acseo_dynamic_form');
$treeBuilder = new TreeBuilder('acseo_dynamic_form');

return $treeBuilder;
}
Expand Down
7 changes: 2 additions & 5 deletions Form/Extension/FieldTypeHelpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ public function configureOptions(OptionsResolver $resolver)
));
}

/**
* @return string
*/
public function getExtendedType()
public static function getExtendedTypes(): iterable
{
return FormType::class;
return [FormType::class];
}
}
7 changes: 2 additions & 5 deletions Form/Extension/FieldTypePictoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,8 @@ public function configureOptions(OptionsResolver $resolver)
));
}

/**
* @return string
*/
public function getExtendedType()
public static function getExtendedTypes(): iterable
{
return FormType::class;
return [FormType::class];
}
}
7 changes: 2 additions & 5 deletions Form/Extension/FieldTypePopinExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ public function configureOptions(OptionsResolver $resolver)
));
}

/**
* @return string
*/
public function getExtendedType()
public static function getExtendedTypes(): iterable
{
return FormType::class;
return [FormType::class];
}
}
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
{
"name": "acseo/dynamic-form-bundle",
"type": "symfony-bundle",
"description": "Symfony2 From generator from array description",
"description": "Symfony From generator from array description",
"keywords": ["Symfony", "form", "generator"],
"homepage": "https://github.com/acseo/DynamicFormBundle",
"authors": [
{
"name": "Hubert MARIN",
"email": "[email protected]"
},
{
"name": "Romain GUERRERO",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3.2",
"symfony/config": "~3.1|^4.0|^5.0",
"symfony/dependency-injection": "~3.1|^4.0|^5.0",
"symfony/event-dispatcher": "~3.1|^4.0|^5.0",
"symfony/form": "~3.1|^4.0|^5.0",
"symfony/http-kernel": "~3.1|^4.0|^5.0",
"symfony/options-resolver": "~3.1|^4.0|^5.0",
"symfony/validator": "~3.1|^4.0|^5.0"
"symfony/config": "^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/event-dispatcher": "^5.0",
"symfony/form": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/options-resolver": "^5.0",
"symfony/validator": "^5.0"
},
"autoload": {
"psr-0": { "ACSEO\\Bundle\\DynamicFormBundle": "" }
Expand All @@ -27,7 +30,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
"dev-master": "4.0-dev"
}
}
}

0 comments on commit 16af933

Please sign in to comment.