Skip to content

Commit 986991a

Browse files
committed
updates for upgraded QA
1 parent ce3b936 commit 986991a

22 files changed

+50
-70
lines changed

.github/workflows/symfony.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
strategy:
1919
matrix:
2020
php-version:
21-
- '7.4'
2221
- '8.1'
2322

2423
steps:
@@ -56,8 +55,6 @@ jobs:
5655
strategy:
5756
matrix:
5857
php-version:
59-
- '7.4'
60-
- '8.0'
6158
- '8.1'
6259

6360
steps:

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
file that was distributed with this source code.',
1818
'location' => 'after_declare_strict',
1919
],
20+
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
21+
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
2022
])
2123
->setRiskyAllowed(true)
2224
->setFinder($finder)

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Version 1.0.1
2+
=============
3+
15 September 2023
4+
5+
- Allow newer versions of Twig (@Guite)
6+
- Correct symfony/contracts to be more specific and fix Symfony v6 compatibility (@craigh)
7+
- Fix small issue in unit tests (@On5-Repos)
8+
- Fix dev dependencies at specific version (@mbabker)
9+
- Reduce github actions matrix to only php 8.1 for QA related tools (@mbabker)
10+
- Correct new QA issues from upgrades to tools (@craigh)
11+
12+
Version 1.0.0
13+
=============
14+
21 June 2022
15+
16+
- Initial release

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
"symfony/validator": "^5.4 || ^6.0"
3030
},
3131
"require-dev": {
32-
"friendsofphp/php-cs-fixer": "^3.8",
33-
"phpstan/extension-installer": "^1.1",
34-
"phpstan/phpstan": "^1.6",
35-
"phpstan/phpstan-symfony": "^1.1",
36-
"phpunit/phpunit": "^9.5",
32+
"friendsofphp/php-cs-fixer": "3.26.1",
33+
"phpstan/extension-installer": "1.3.1",
34+
"phpstan/phpstan": "1.10.34",
35+
"phpstan/phpstan-symfony": "1.3.2",
36+
"phpunit/phpunit": "9.6.12",
3737
"roave/security-advisories": "dev-latest"
3838
},
3939
"suggest": {

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
parameters:
22
paths:
33
- src
4-
- tests
54
level: 8

src/Container/AbstractSpecificationContainer.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,8 @@
1515

1616
abstract class AbstractSpecificationContainer implements SpecificationContainerInterface
1717
{
18-
/**
19-
* {@inheritDoc}
20-
*/
2118
abstract public function getFormSpecifications(array $params = []): array;
2219

23-
/**
24-
* {@inheritDoc}
25-
*/
2620
public function getLabels(string $locale = ''): array
2721
{
2822
$labels = [];
@@ -33,9 +27,6 @@ public function getLabels(string $locale = ''): array
3327
return $labels;
3428
}
3529

36-
/**
37-
* {@inheritDoc}
38-
*/
3930
public function getGroupedLabels(string $locale = ''): array
4031
{
4132
$labels = [];

src/Entity/AbstractResponseData.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,11 @@ abstract class AbstractResponseData implements ResponseDataInterface
2222
*/
2323
protected ?array $data = [];
2424

25-
/**
26-
* {@inheritDoc}
27-
*/
2825
public function getData(): ?array
2926
{
3027
return $this->data;
3128
}
3229

33-
/**
34-
* {@inheritDoc}
35-
*/
3630
public function setData(?array $data): void
3731
{
3832
$this->data = $data;

src/Form/Data/FormTypesChoices.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
namespace Zikula\Bundle\DynamicFormBundle\Form\Data;
1515

1616
use ArrayAccess;
17-
use Exception;
1817
use Iterator;
1918

2019
/**
@@ -23,7 +22,7 @@
2322
* @implements Iterator<string|null, array<string, string>|false>
2423
* @implements ArrayAccess<string, array<string, string>>
2524
*/
26-
class FormTypesChoices implements ArrayAccess, Iterator
25+
class FormTypesChoices implements \ArrayAccess, \Iterator
2726
{
2827
/**
2928
* @var array<string, array<string, string>>
@@ -43,9 +42,6 @@ public function offsetExists($offset): bool
4342
return isset($this->choices[$offset]);
4443
}
4544

46-
/**
47-
* @return mixed
48-
*/
4945
#[\ReturnTypeWillChange]
5046
public function offsetGet($offset)
5147
{
@@ -59,26 +55,20 @@ public function offsetSet($offset, $value): void
5955

6056
public function offsetUnset($offset): void
6157
{
62-
throw new Exception('Not allowed to unset!');
58+
throw new \Exception('Not allowed to unset!');
6359
}
6460

6561
public function rewind(): void
6662
{
6763
reset($this->choices);
6864
}
6965

70-
/**
71-
* @return mixed
72-
*/
7366
#[\ReturnTypeWillChange]
7467
public function current()
7568
{
7669
return current($this->choices);
7770
}
7871

79-
/**
80-
* @return mixed
81-
*/
8272
#[\ReturnTypeWillChange]
8373
public function key()
8474
{

src/Form/DataMapper/ChoiceWithOtherDataMapper.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
class ChoiceWithOtherDataMapper implements DataMapperInterface
2121
{
22-
/**
23-
* {@inheritDoc}
24-
*/
2522
public function mapDataToForms($viewData, \Traversable $forms): void
2623
{
2724
/** @var FormInterface[] $forms */
@@ -58,9 +55,6 @@ public function mapDataToForms($viewData, \Traversable $forms): void
5855
$forms['other']->setData($other);
5956
}
6057

61-
/**
62-
* {@inheritDoc}
63-
*/
6458
public function mapFormsToData(\Traversable $forms, &$viewData): void
6559
{
6660
/** @var FormInterface[] $forms */
@@ -87,7 +81,7 @@ public function mapFormsToData(\Traversable $forms, &$viewData): void
8781
$choicesData = array_merge($choicesData, $otherValue);
8882
}
8983

90-
$viewData = is_array($choicesData) ? implode(',', $choicesData) : $choicesData;
84+
$viewData = implode(',', $choicesData);
9185
}
9286
}
9387
}

src/Form/Type/ChoiceWithOtherType.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ class ChoiceWithOtherType extends AbstractType
2828
{
2929
public const OTHER_VALUE = 'other';
3030

31-
/**
32-
* {@inheritdoc}
33-
*/
3431
public function buildForm(FormBuilderInterface $builder, array $options): void
3532
{
3633
$builder
@@ -54,9 +51,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5451
});
5552
}
5653

57-
/**
58-
* {@inheritdoc}
59-
*/
6054
public function configureOptions(OptionsResolver $resolver): void
6155
{
6256
$resolver->setDefaults([

0 commit comments

Comments
 (0)