schranz-php-recipes / symfony-recipes-php

Provides https://github.com/symfony/recipes as PHP instead of YAML configs.
MIT License
13 stars 3 forks source link

Update recipes 2022-11-28 #18

Closed symfony-php-recipes-bot closed 1 year ago

symfony-php-recipes-bot commented 1 year ago
Q A
License MIT

The Symfony Recipes changed with version . This PR contains the new definition for recipes.

github-actions[bot] commented 1 year ago

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-18/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-18/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/ux-autocomplete:^2.6' 'symfony/ux-live-component:^2.6'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. I'm going keep this comment up to date with any updates of the attached patch.

symfony/ux-autocomplete

2.2 vs 2.6 ```diff diff --git a/symfony/ux-autocomplete/2.2/config/routes/ux_autocomplete.php b/symfony/ux-autocomplete/2.6/config/routes/ux_autocomplete.php index 7a204db..b7a347f 100644 --- a/symfony/ux-autocomplete/2.2/config/routes/ux_autocomplete.php +++ b/symfony/ux-autocomplete/2.6/config/routes/ux_autocomplete.php @@ -5,6 +5,6 @@ declare(strict_types=1); use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routingConfigurator): void { - $routingConfigurator->import('@AutocompleteBundle/Resources/routes.php') + $routingConfigurator->import('@AutocompleteBundle/config/routes.php') ->prefix('/autocomplete'); }; ```

symfony/ux-live-component

2.0 vs 2.6 ```diff diff --git a/symfony/ux-live-component/2.0/config/routes/ux_live_component.php b/symfony/ux-live-component/2.6/config/routes/ux_live_component.php index 51eff87..e7cb167 100644 --- a/symfony/ux-live-component/2.0/config/routes/ux_live_component.php +++ b/symfony/ux-live-component/2.6/config/routes/ux_live_component.php @@ -5,5 +5,6 @@ declare(strict_types=1); use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routingConfigurator): void { - $routingConfigurator->import('@LiveComponentBundle/Resources/config/routing/live_component.xml'); + $routingConfigurator->import('@LiveComponentBundle/config/routes.php') + ->prefix('/_components'); }; ```
alexander-schranz commented 1 year ago

Currently tests failing because some symfony ux components are not defining the requirements to the twig bundle correctly. See also: https://github.com/symfony/ux/pull/569

alexander-schranz commented 1 year ago

Tested manually the changes when the twig bundle is installed. All works like expected.