From 25474a7b9971ead267bfdf5dd794a3c4baed9791 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Fri, 19 Jan 2024 21:43:33 +0100 Subject: [PATCH] Upgrade from lexik/form-filter-bundle to spiriitlabs/form-filter-bundle --- app/AppKernel.php | 2 +- app/config/config.yml | 2 +- app/config/services.yml | 6 +- composer.json | 2 +- composer.lock | 119 ++++++++---------- phpstan-baseline.neon | 4 +- .../CoreBundle/Controller/EntryController.php | 2 +- .../CustomDoctrineORMSubscriber.php | 6 +- .../CoreBundle/Form/Type/EntryFilterType.php | 16 +-- .../Resources/views/Static/about.html.twig | 2 +- 10 files changed, 74 insertions(+), 87 deletions(-) diff --git a/app/AppKernel.php b/app/AppKernel.php index 314b34390..4dc350e18 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -21,7 +21,7 @@ class AppKernel extends Kernel new Nelmio\ApiDocBundle\NelmioApiDocBundle(), new Nelmio\CorsBundle\NelmioCorsBundle(), new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(), - new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(), + new Spiriit\Bundle\FormFilterBundle\SpiriitFormFilterBundle(), new FOS\OAuthServerBundle\FOSOAuthServerBundle(), new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), new Scheb\TwoFactorBundle\SchebTwoFactorBundle(), diff --git a/app/config/config.yml b/app/config/config.yml index d413ceca2..e62a00990 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -42,7 +42,7 @@ twig: debug: "%kernel.debug%" strict_variables: "%kernel.debug%" form_themes: - - "@LexikFormFilter/Form/form_div_layout.html.twig" + - "@SpiriitFormFilter/Form/form_div_layout.html.twig" globals: registration_enabled: '%fosuser_registration%' diff --git a/app/config/services.yml b/app/config/services.yml index 57971b39c..06faebfd2 100644 --- a/app/config/services.yml +++ b/app/config/services.yml @@ -4,7 +4,7 @@ imports: - { resource: parameters_addons.yml } parameters: - lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber + spiriit_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber services: _defaults: @@ -150,8 +150,8 @@ services: JMS\Serializer\SerializerInterface: alias: jms_serializer - Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface: - alias: lexik_form_filter.query_builder_updater + Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface: + alias: spiriit_form_filter.query_builder_updater Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface: alias: scheb_two_factor.security.google_authenticator diff --git a/composer.json b/composer.json index 8d311e988..cd6b337f3 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,6 @@ "jms/serializer-bundle": "~5.0", "laminas/laminas-code": "^4.7", "lcobucci/jwt": "^4.3", - "lexik/form-filter-bundle": "^7.0", "mgargano/simplehtmldom": "~1.5", "mnapoli/piwik-twig-extension": "^3.0", "nelmio/api-doc-bundle": "^4.10", @@ -120,6 +119,7 @@ "scssphp/scssphp": "^1.11", "sensio/framework-extra-bundle": "^6.2", "sentry/sentry-symfony": "4.13.2", + "spiriitlabs/form-filter-bundle": "^10.0", "stof/doctrine-extensions-bundle": "^1.2", "symfony/asset": "^5.4", "symfony/config": "^5.4", diff --git a/composer.lock b/composer.lock index 12eb48779..43c5cf85c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a860411c9748737faeae79ea8e6b7394", + "content-hash": "bf884b7132ea27a2b6c0748d8a62e086", "packages": [ { "name": "babdev/pagerfanta-bundle", @@ -5500,71 +5500,6 @@ ], "time": "2023-01-02T13:28:00+00:00" }, - { - "name": "lexik/form-filter-bundle", - "version": "v7.0.3", - "source": { - "type": "git", - "url": "https://github.com/lexik/LexikFormFilterBundle.git", - "reference": "7588970d84c1604b98743588ba9020f6bddf6303" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lexik/LexikFormFilterBundle/zipball/7588970d84c1604b98743588ba9020f6bddf6303", - "reference": "7588970d84c1604b98743588ba9020f6bddf6303", - "shasum": "" - }, - "require": { - "doctrine/orm": "^2.10", - "php": ">=7.1", - "symfony/form": "^4.4|^5.1|^6.0", - "symfony/framework-bundle": "^4.4|^5.1|^6.0" - }, - "require-dev": { - "doctrine/doctrine-bundle": "^1.8 || ^2.0", - "doctrine/mongodb-odm-bundle": "^4.1", - "symfony/phpunit-bridge": "^4.4|^5.1|^6.0", - "symfony/var-dumper": "^4.4|^5.1|^6.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Install this package if using the PHP 7 MongoDB Driver" - }, - "type": "symfony-bundle", - "autoload": { - "psr-4": { - "Lexik\\Bundle\\FormFilterBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Cedric Girard", - "email": "c.girard@lexik.fr" - }, - { - "name": "Dev Lexik", - "email": "dev@lexik.fr" - } - ], - "description": "This bundle aim to provide classes to build some form filters and then build a doctrine query from this form filter.", - "homepage": "https://github.com/lexik/LexikFormFilterBundle", - "keywords": [ - "bundle", - "doctrine", - "filter", - "form", - "symfony" - ], - "support": { - "issues": "https://github.com/lexik/LexikFormFilterBundle/issues", - "source": "https://github.com/lexik/LexikFormFilterBundle/tree/v7.0.3" - }, - "abandoned": "spiriitlabs/form-filter-bundle", - "time": "2022-07-28T11:49:50+00:00" - }, { "name": "masterminds/html5", "version": "2.8.1", @@ -9179,6 +9114,58 @@ }, "time": "2021-08-03T08:33:34+00:00" }, + { + "name": "spiriitlabs/form-filter-bundle", + "version": "v10.0.0", + "source": { + "type": "git", + "url": "https://github.com/SpiriitLabs/form-filter-bundle.git", + "reference": "7a1ab5c7f8d1890562f8a3e57796bbb8f84e5be8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SpiriitLabs/form-filter-bundle/zipball/7a1ab5c7f8d1890562f8a3e57796bbb8f84e5be8", + "reference": "7a1ab5c7f8d1890562f8a3e57796bbb8f84e5be8", + "shasum": "" + }, + "require": { + "doctrine/orm": "^2.10", + "php": ">=7.4", + "symfony/form": "^5.3|^6.0|^7.0", + "symfony/framework-bundle": "^5.3|^6.0|^7.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "doctrine/doctrine-bundle": "^1.8 || ^2.0", + "rector/rector": "^0.17.1", + "symfony/phpunit-bridge": "^5.3|^6.0|^7.0", + "symfony/var-dumper": "^5.3|^6.0|^7.0", + "symplify/easy-coding-standard": "^11.3" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Spiriit\\Bundle\\FormFilterBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "This bundle aim to provide classes to build some form filters and then build a doctrine query from this form filter.", + "homepage": "https://github.com/SpiriitLabs/form-filter-bundle", + "keywords": [ + "bundle", + "doctrine", + "filter", + "form", + "symfony" + ], + "support": { + "source": "https://github.com/SpiriitLabs/form-filter-bundle/tree/v10.0.0" + }, + "time": "2024-01-15T14:09:58+00:00" + }, { "name": "spomky-labs/otphp", "version": "v10.0.3", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 0702cb981..798e99d0c 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -111,12 +111,12 @@ parameters: path: src/Wallabag/CoreBundle/Controller/TagController.php - - message: "#^Call to an undefined method Lexik\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpressionBuilder\\(\\)\\.$#" + message: "#^Call to an undefined method Spiriit\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpressionBuilder\\(\\)\\.$#" count: 1 path: src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php - - message: "#^Call to an undefined method Lexik\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpr\\(\\)\\.$#" + message: "#^Call to an undefined method Spiriit\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Query\\\\QueryInterface\\:\\:getExpr\\(\\)\\.$#" count: 10 path: src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 7634a3ac8..b554e43e9 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -5,10 +5,10 @@ namespace Wallabag\CoreBundle\Controller; use Craue\ConfigBundle\Util\Config; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\NoResultException; -use Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface; use Pagerfanta\Doctrine\ORM\QueryAdapter as DoctrineORMAdapter; use Pagerfanta\Exception\OutOfRangeCurrentPageException; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache; +use Spiriit\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\RedirectResponse; diff --git a/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php b/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php index b8f6e1d6c..e6400c922 100644 --- a/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php +++ b/src/Wallabag/CoreBundle/Event/Subscriber/CustomDoctrineORMSubscriber.php @@ -2,12 +2,12 @@ namespace Wallabag\CoreBundle\Event\Subscriber; -use Lexik\Bundle\FormFilterBundle\Event\GetFilterConditionEvent; -use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber; +use Spiriit\Bundle\FormFilterBundle\Event\GetFilterConditionEvent; +use Spiriit\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** - * This custom class override the default behavior of LexikFilterBundle on `filter_date_range` + * This custom class override the default behavior of SpiriitFormFilterBundle on `filter_date_range` * It converts a date_range to date_time_range to add hour to be able to grab a whole day (from 00:00:00 to 23:59:59). */ class CustomDoctrineORMSubscriber extends DoctrineORMSubscriber implements EventSubscriberInterface diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index 0f444fff2..40a7d49cd 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php @@ -2,14 +2,14 @@ namespace Wallabag\CoreBundle\Form\Type; -use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\DateRangeFilterType; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberFilterType; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberRangeFilterType; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType; -use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface; +use Spiriit\Bundle\FormFilterBundle\Filter\FilterOperands; +use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType; +use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; +use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\DateRangeFilterType; +use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\NumberFilterType; +use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\NumberRangeFilterType; +use Spiriit\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType; +use Spiriit\Bundle\FormFilterBundle\Filter\Query\QueryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig b/src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig index 014b8f83c..30397d9d4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/Static/about.html.twig @@ -113,7 +113,6 @@ kphoen/rulerzMIT kphoen/rulerz-bundleMIT kriswallsmith/asseticMIT - lexik/form-filter-bundleMIT mgargano/simplehtmldomMIT michelf/php-markdownBSD-3-Clause monolog/monologMIT @@ -132,6 +131,7 @@ sensio/framework-extra-bundleMIT simplepie/simplepieBSD-3-Clause smalot/pdfparserGPL-3.0 + spiriitlabs/form-filter-bundleMIT sonata-project/google-authenticatorMIT stof/doctrine-extensions-bundleMIT symfony/assetic-bundleMIT