Skip to content

Commit c97651d

Browse files
Merge pull request #19 from LinioIT/feat/remove-treebuilder-deprecation
feat: update tree node call
2 parents d6e7f0c + 2af72e7 commit c97651d

File tree

11 files changed

+3
-60
lines changed

11 files changed

+3
-60
lines changed

src/DependencyInjection/CompilerPass.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
class CompilerPass implements CompilerPassInterface
1212
{
13-
/**
14-
* @param ContainerBuilder $container
15-
*/
1613
public function process(ContainerBuilder $container): void
1714
{
1815
$this->loadFormlyFields($container);
@@ -21,9 +18,6 @@ public function process(ContainerBuilder $container): void
2118
$this->loadHelpMessageProviders($container);
2219
}
2320

24-
/**
25-
* @param ContainerBuilder $container
26-
*/
2721
public function loadFormlyFields(ContainerBuilder $container): void
2822
{
2923
if (!$container->hasDefinition('container.formly_field')) {
@@ -40,9 +34,6 @@ public function loadFormlyFields(ContainerBuilder $container): void
4034
}
4135
}
4236

43-
/**
44-
* @param ContainerBuilder $container
45-
*/
4637
public function loadDataProviders(ContainerBuilder $container): void
4738
{
4839
$containerDefinition = $container->getDefinition('dynamic_form.factory');
@@ -55,9 +46,6 @@ public function loadDataProviders(ContainerBuilder $container): void
5546
}
5647
}
5748

58-
/**
59-
* @param ContainerBuilder $container
60-
*/
6149
public function loadSubscribers(ContainerBuilder $container): void
6250
{
6351
$containerDefinition = $container->getDefinition('dynamic_form.factory');
@@ -70,9 +58,6 @@ public function loadSubscribers(ContainerBuilder $container): void
7058
}
7159
}
7260

73-
/**
74-
* @param ContainerBuilder $container
75-
*/
7661
public function loadHelpMessageProviders(ContainerBuilder $container): void
7762
{
7863
$containerDefinition = $container->getDefinition('dynamic_form.factory');

src/DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class Configuration implements ConfigurationInterface
2121
*/
2222
public function getConfigTreeBuilder()
2323
{
24-
$treeBuilder = new TreeBuilder();
25-
$rootNode = $treeBuilder->root('dynamic_form');
24+
$treeBuilder = new TreeBuilder('dynamic_form');
25+
$rootNode = method_exists(TreeBuilder::class, 'getRootNode') ? $treeBuilder->getRootNode() : $treeBuilder->root('dynamic_form');
2626

2727
$rootNode
2828
->useAttributeAsKey('name')

src/DynamicFormAware.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public function getDynamicFormFactory()
2424
return $this->dynamicFormFactory;
2525
}
2626

27-
/**
28-
* @param FormFactory $dynamicFormFactory
29-
*/
3027
public function setDynamicFormFactory(FormFactory $dynamicFormFactory): void
3128
{
3229
$this->dynamicFormFactory = $dynamicFormFactory;

src/DynamicFormBundle.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

1111
class DynamicFormBundle extends Bundle
1212
{
13-
/**
14-
* @param ContainerBuilder $container
15-
*/
1613
public function build(ContainerBuilder $container): void
1714
{
1815
parent::build($container);

src/Form/Extension/HelpMessageTypeExtension.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,11 @@ public function getExtendedType()
2020
return FormType::class;
2121
}
2222

23-
/**
24-
* @param OptionsResolver $resolver
25-
*/
2623
public function configureOptions(OptionsResolver $resolver): void
2724
{
2825
$resolver->setDefined(['help']);
2926
}
3027

31-
/**
32-
* @param FormView $view
33-
* @param FormInterface $form
34-
* @param array $options
35-
*/
3628
public function buildView(FormView $view, FormInterface $form, array $options): void
3729
{
3830
$view->vars['help'] = $options['help'] ?? '';

src/Form/FormFactory.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,18 @@ class FormFactory
4242
*/
4343
protected $helpMessageProviders = [];
4444

45-
/**
46-
* @param SymfonyFormFactory $formFactory
47-
*/
4845
public function setFormFactory(SymfonyFormFactory $formFactory): void
4946
{
5047
$this->formFactory = $formFactory;
5148
}
5249

53-
/**
54-
* @param array $configuration
55-
*/
5650
public function setConfiguration(array $configuration): void
5751
{
5852
$this->configuration = $configuration;
5953
}
6054

6155
/**
6256
* @param string $alias
63-
* @param DataProvider $dataProvider
6457
*/
6558
public function addDataProvider($alias, DataProvider $dataProvider): void
6659
{
@@ -69,7 +62,6 @@ public function addDataProvider($alias, DataProvider $dataProvider): void
6962

7063
/**
7164
* @param string $alias
72-
* @param HelpMessageProvider $helpMessageProvider
7365
*/
7466
public function addHelpMessageProvider($alias, HelpMessageProvider $helpMessageProvider): void
7567
{
@@ -78,7 +70,6 @@ public function addHelpMessageProvider($alias, HelpMessageProvider $helpMessageP
7870

7971
/**
8072
* @param string $formName
81-
* @param EventSubscriberInterface $eventSubscriber
8273
*/
8374
public function addEventSubscriber($formName, EventSubscriberInterface $eventSubscriber): void
8475
{
@@ -251,7 +242,7 @@ public function loadHelpMessageProvider($alias)
251242
*/
252243
public function getConfiguration($name = null)
253244
{
254-
if ($name === null) {
245+
if (null === $name) {
255246
return $this->configuration;
256247
}
257248

src/FormlyMapper/FormlyAware.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ public function getFormlyMapper()
2222
return $this->formlyMapper;
2323
}
2424

25-
/**
26-
* @param FormlyMapper $formlyMapper
27-
*/
2825
public function setFormlyMapper(FormlyMapper $formlyMapper): void
2926
{
3027
$this->formlyMapper = $formlyMapper;

src/FormlyMapper/FormlyField.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ abstract class FormlyField implements FormlyFieldInterface
1616
*/
1717
protected $formlyFieldConfiguration = [];
1818

19-
/**
20-
* @param array $fieldConfiguration
21-
*/
2219
public function setFieldConfiguration(array $fieldConfiguration): void
2320
{
2421
$this->fieldConfiguration = $fieldConfiguration;

src/FormlyMapper/FormlyField/FormlyFieldFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class FormlyFieldFactory
2525

2626
/**
2727
* @param int $alias
28-
* @param FormlyFieldInterface $formlyField
2928
*/
3029
public function addFormlyField($alias, FormlyFieldInterface $formlyField): void
3130
{

src/FormlyMapper/FormlyFieldInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
interface FormlyFieldInterface
88
{
9-
/**
10-
* @param array $configuration
11-
*/
129
public function setFieldConfiguration(array $configuration);
1310

1411
/**

0 commit comments

Comments
 (0)