Skip to content

Commit

Permalink
vendor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Feb 4, 2024
1 parent e145773 commit 0b3de19
Show file tree
Hide file tree
Showing 17 changed files with 1,317 additions and 1,334 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"ext-pdo": "*",
"ext-xml": "*",
"doctrine/doctrine-bundle": "^2",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2",
"easycorp/easyadmin-bundle": "^4.3",
"easycorp/easyadmin-bundle": "^4.8",
"egulias/email-validator": "^4",
"friendsofsymfony/jsrouting-bundle": "^3",
"liip/imagine-bundle": "^2",
Expand Down Expand Up @@ -59,7 +59,7 @@
"symfony/string": "^7.0",
"symfony/translation": "^7.0",
"symfony/twig-bundle": "^7.0",
"symfony/ux-translator": "^2.9",
"symfony/ux-translator": "^2",
"symfony/validator": "^7.0",
"symfony/web-link": "^7.0",
"symfony/web-profiler-bundle": "^7.0",
Expand Down Expand Up @@ -117,7 +117,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "^6.3"
"require": "^7.0"
},
"symfony-assets-install": "relative"
}
Expand Down
2,556 changes: 1,269 additions & 1,287 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/packages/validator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
framework:
validation:
enable_annotations: true
enable_attributes: true
email_validation_mode: html5

# Enables validator auto-mapping support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,7 @@ public function __construct(array $options)
$this->entityManager = $options['em'];
}

public function reverseTransform($value): mixed
{
$collection = new ArrayCollection();
$class = $this->entityCategoryClass;

foreach ($value as $regId => $categories) {
$regId = (int) mb_substr($regId, mb_strpos($regId, '_') + 1);
$subCollection = new ArrayCollection();
if (!is_array($categories) && $categories instanceof Category) {
$categories = [$categories];
} elseif (empty($categories)) {
$categories = [];
}
foreach ($categories as $category) {
$subCollection->add(new $class($regId, $category, null));
}
$collection->set($regId, $subCollection);
}

return $collection;
}

public function transform($value)
public function transform(mixed $value): mixed
{
$data = [];
if (empty($value)) {
Expand All @@ -85,4 +63,26 @@ public function transform($value)

return $data;
}

public function reverseTransform(mixed $value): mixed
{
$collection = new ArrayCollection();
$class = $this->entityCategoryClass;

foreach ($value as $regId => $categories) {
$regId = (int) mb_substr($regId, mb_strpos($regId, '_') + 1);
$subCollection = new ArrayCollection();
if (!is_array($categories) && $categories instanceof Category) {
$categories = [$categories];
} elseif (empty($categories)) {
$categories = [];
}
foreach ($categories as $category) {
$subCollection->add(new $class($regId, $category, null));
}
$collection->set($regId, $subCollection);
}

return $collection;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(private readonly CategoryRepositoryInterface $catego
*
* @return string
*/
public function transform($category)
public function transform(mixed $category): mixed
{
if (null === $category) {
return '';
Expand All @@ -47,7 +47,7 @@ public function transform($category)
*
* @return Category|null
*/
public function reverseTransform($categoryId): mixed
public function reverseTransform(mixed $categoryId): mixed
{
if (!$categoryId) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/system/CategoriesBundle/Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
zikulacategoriesbundle:
resource: '@ZikulaCategoriesBundle/Controller'
type: annotation
type: attribute
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class CategorizableType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->add('categoryAssignments', CategoriesType::class, [
'em' => $options['em'],
Expand All @@ -40,7 +40,7 @@ public function getBlockPrefix(): string
return 'zikulacategoriesbundle_test_categorizable';
}

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'em' => null,
Expand Down
2 changes: 1 addition & 1 deletion src/system/CategoriesBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"php": ">=8.2",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/doctrine-migrations-bundle": "^3.3",
"symfony/config": "^7.0",
"symfony/dependency-injection": "^7.0",
"symfony/doctrine-bridge": "^7.0",
Expand Down
4 changes: 2 additions & 2 deletions src/system/CoreBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"symfony/web-profiler-bundle": "^7.0",

"doctrine/doctrine-bundle": "^2",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2",
"easycorp/easyadmin-bundle": "^4.3",
"stof/doctrine-extensions-bundle": "^1",
"liip/imagine-bundle": "^2",

"symfony/ux-translator": "^2.9",
"symfony/ux-translator": "^2",
"friendsofsymfony/jsrouting-bundle": "^3"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/system/LegalBundle/Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
zikulalegalbundle:
resource: '@ZikulaLegalBundle/Controller'
type: annotation
type: attribute
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NullToEmptyTransformer implements DataTransformerInterface
* @param string|null $value
* @return string
*/
public function transform(mixed $value)
public function transform(mixed $value): mixed
{
return $value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
*/
class ButtonTypeIconExtension extends AbstractTypeExtension
{
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder->setAttribute('icon', $options['icon']);
}

public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['icon'] = $options['icon'];
}

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'icon' => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class FormTypeHelpExtension extends AbstractTypeExtension
{
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->setAttribute('help', $options['help'])
Expand All @@ -32,14 +32,14 @@ public function buildForm(FormBuilderInterface $builder, array $options)
;
}

public function buildView(FormView $view, FormInterface $form, array $options)
public function buildView(FormView $view, FormInterface $form, array $options): void
{
$view->vars['help'] = $options['help'];
$view->vars['input_group'] = $options['input_group'];
$view->vars['alert'] = $options['alert'];
}

public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'input_group' => null,
Expand Down
2 changes: 1 addition & 1 deletion src/system/ThemeBundle/Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
zikulathemebundle:
resource: '@ZikulaThemeBundle/Controller'
type: annotation
type: attribute
1 change: 1 addition & 0 deletions src/system/ThemeBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"require": {
"php": ">=8.2",
"easycorp/easyadmin-bundle": "^4.8",
"symfony/config": "^7.0",
"symfony/dependency-injection": "^7.0",
"symfony/event-dispatcher": "^7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/system/UsersBundle/Resources/config/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
zikulausersbundle:
resource: '@ZikulaUsersBundle/Controller'
type: annotation
type: attribute
2 changes: 1 addition & 1 deletion src/system/UsersBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"php": ">=8.2",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/doctrine-migrations-bundle": "^3.3",
"nucleos/profile-bundle": "^2",
"nucleos/user-bundle": "^3",
"symfony/config": "^7.0",
Expand Down

0 comments on commit 0b3de19

Please sign in to comment.