-
-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Translator] Revert #1965, which break cache warmup for Symfony applications #2060
Conversation
Yikes, this use case should've been found I recon. The interesting thing now is, that there are essentially two things (that appear to be conflicting). On the one hand, we have the issue mentioned in #2056 being caused by, what appears to be, people not having the Wouldn't it be better to write a separate test-case that reproduces #2056 and fix that, while also still having the test passing for #1962? I'll see whether I can get a MR ready. |
It appears no one has the So we need to revert asap (this could impact apps in production) We also realize we need to improve testing in the CI as we did not saw this coming. One solution we talked about would be to pass a simple TranslatorInterface to the cachewarmer and exit early if this is not a TranslatorBagInterface |
@smnandre I thought that might work as well, though the I'm currently trying to see whether I can remove the compiler pass, and make the TranslatorBag nullable/optional. @smnandre But if the |
That's what @MatTheCat explained in #2056
--
That would be the point. Warmer would only dump files if given a TranslatorInterface&TranslatorBagInterface |
Ah alright, fair enought. I've created a separate MR that should fix it, by making the |
Thanks Hugo. |
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [CI] Test ux.symfony.com with local UX packages | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | 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 description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Following #1965 and #2060, I was a bit surprised to see ux.symfony.com tests were executed with UX packages coming from `2.x` branch, instead of UX packages from the same PR. I believe doing this could help us for the future and prevent some regressions. I've updated the script `.github/build-packages.php` to automatically replaces **all UX packages requires(-dev)** from all significant `composer.json` files from the repo: <img width="1270" alt="image" src="https://github.com/user-attachments/assets/e04ff73f-7558-46cc-91e2-bf49c26a7f04"> Commits ------- 1386749 [CI] Test ux.symfony.com with local UX packages
Hi everyone!
It looks like we were too fast on #1965, and our tests base didn't see the issue.
With 2.19.0, people started to have issues with the CacheWarmer from UX Translator, which was... simply never called, and so the folder
var/translations
was not generated anymore.In private, we've decided to revert the feature to fix the issue, and to re-open the discussion if necessary.