Skip to content

Conversation

@Kocal
Copy link
Member

@Kocal Kocal commented Mar 19, 2023

Q A
License MIT
Doc issue/PR symfony/ux#616

Adding the Symfony recipe for symfony/ux#616, which is still being reviewed ATM.

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 19, 2023 08:17
@github-actions
Copy link

github-actions bot commented Mar 19, 2023

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/symfony/recipes/flex/pull-1185/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1185/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/ux-translator:^2.7'
  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.

auto-merge was automatically disabled March 19, 2023 08:18

Head branch was pushed to by a user without write access

@Kocal Kocal force-pushed the feat/symfony-ux-translator branch from e301e68 to ba9601b Compare March 19, 2023 08:18
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 19, 2023 08:18
auto-merge was automatically disabled March 19, 2023 08:18

Head branch was pushed to by a user without write access

@Kocal Kocal force-pushed the feat/symfony-ux-translator branch from ba9601b to 5a8ac44 Compare March 19, 2023 08:18
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 19, 2023 08:18
auto-merge was automatically disabled March 19, 2023 09:08

Head branch was pushed to by a user without write access

@Kocal Kocal force-pushed the feat/symfony-ux-translator branch from 5a8ac44 to 93f0828 Compare March 19, 2023 09:08
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 19, 2023 09:08
auto-merge was automatically disabled March 19, 2023 09:19

Head branch was pushed to by a user without write access

@Kocal Kocal force-pushed the feat/symfony-ux-translator branch from 93f0828 to 2154e8b Compare March 19, 2023 09:19
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 19, 2023 09:19
auto-merge was automatically disabled March 21, 2023 23:33

Head branch was pushed to by a user without write access

@Kocal Kocal force-pushed the feat/symfony-ux-translator branch from 2154e8b to 45edbd1 Compare March 21, 2023 23:33
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 21, 2023 23:33
auto-merge was automatically disabled April 26, 2023 06:44

Head branch was pushed to by a user without write access

@Kocal Kocal force-pushed the feat/symfony-ux-translator branch from 45edbd1 to 40e4653 Compare April 26, 2023 06:44
@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) April 26, 2023 06:44
weaverryan added a commit to symfony/ux that referenced this pull request Apr 26, 2023
…Kocal)

This PR was merged into the 2.x branch.

Discussion
----------

[Translator] Prefix bundle and extension classes with "Ux"

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Features and deprecations must be submitted against branch main.
-->

While installing the package for the demo page, I've got the following issue:

>  There is no extension able to load the configuration for "ux_translator" (in "/Users/kocal/workspace-os/symfony-ux/ux.symfony.com/config/packages/ux_translator.yaml"). Looked for namespace "ux_
  translator", found ""framework", "twig", "twig_extra", "webpack_encore", "turbo", "mercure", "web_profiler", "monolog", "debug", "twig_component", "live_component", "chartjs", "cropperjs", "laz
  y_image", "dropzone", "doctrine", "doctrine_migrations", "maker", "babdev_pagerfanta", "autocomplete", "notify", "react", "vue", "svelte", "translator"" in /Users/kocal/workspace-os/symfony-ux/
  ux.symfony.com/config/packages/ux_translator.yaml (which is being imported from "/Users/kocal/workspace-os/symfony-ux/ux.symfony.com/src/Kernel.php").

<img width="1789" alt="image" src="https://user-images.githubusercontent.com/2103975/234497995-550ce874-8445-4dcf-a9bf-5368797be699.png">

(you can also see it in the recipe PR symfony/recipes#1185)

Indeed, I've used `ux_translator` for the `TreeBuilder`'s name and not `translator` (to prevent misundersting with Symfony's Translator PHP version), but the related Bundle and Extension classes were not named correctly.

After the fix, the bundle is correctly loaded:
<img width="1486" alt="image" src="https://user-images.githubusercontent.com/2103975/234498103-f791c0e8-0da2-4867-a3cd-65018774cee4.png">

Commits
-------

fb19c14 [Translator] Prefix bundle and extension classes with "Ux"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants