forked from symfony/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
[Translation] Improve translation keys extraction from PHP files #2
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
Open
welcoMattic
wants to merge
10
commits into
7.4
Choose a base branch
from
translation/improve-php-ast-extractor
base: 7.4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm on "Handle FormType empty_value option ?" item. |
I will test if it's already ok with BackedEnum (Fix it if not) and add test in any case |
b4127b2
to
1733c40
Compare
I will tackle the translation domain ! |
welcoMattic
pushed a commit
that referenced
this pull request
May 28, 2025
welcoMattic
pushed a commit
that referenced
this pull request
May 28, 2025
…h()` (simoheinonen) This PR was merged into the 5.4 branch. Discussion ---------- [MonologBridge] Fix PHP deprecation with `preg_match()` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT ``` preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated ``` Commits ------- 4d7a6f6 Passing null to parameter #2 ($subject) of type string is deprecated
welcoMattic
pushed a commit
that referenced
this pull request
May 28, 2025
* 5.4: do not mix named and positional arguments in data provider definitions session names must not be empty fix Contracts directory name in PHPUnit configuration Passing null to parameter #2 ($subject) of type string is deprecated
welcoMattic
pushed a commit
that referenced
this pull request
May 28, 2025
… not throw exception (lyrixx) This PR was merged into the 5.4 branch. Discussion ---------- [HttpKernel] Ensure `HttpCache::getTraceKey()` does not throw exception | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT We have such logs in our logs. It's in our raw PHP logs. They are not caught by monolog, it's too early ``` [11-Oct-2024 01:23:33 UTC] PHP Fatal error: Uncaught Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException: Invalid method override "__CONSTRUCT". in /var/www/redirection.io/backend/blue/vendor/symfony/http-foundation/Request.php:1234 Stack trace: #0 /var/www/redirection.io/backend/blue/vendor/symfony/http-kernel/HttpCache/HttpCache.php(728): Symfony\Component\HttpFoundation\Request->getMethod() #1 /var/www/redirection.io/backend/blue/vendor/symfony/http-kernel/HttpCache/HttpCache.php(207): Symfony\Component\HttpKernel\HttpCache\HttpCache->getTraceKey() #2 /var/www/redirection.io/backend/blue/vendor/symfony/http-kernel/Kernel.php(188): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle() #3 /var/www/redirection.io/backend/blue/web/app.php(9): Symfony\Component\HttpKernel\Kernel->handle() #4 {main} thrown in /var/www/redirection.io/backend/blue/vendor/symfony/http-foundation/Request.php on line 1234 ``` I managed to reproduced locally. * Before the patch, without the http_cache, symfony returns a 405 * After the patch, without the http_cache, symfony returns a 405 * Before the patch, with the http_cache, symfony returns a 500, without any information (too early) * After the patch, with the http_cache, symfony returns a 405 Commits ------- a2ebbe0 [HttpKernel] Ensure HttpCache::getTraceKey() does not throw exception
…tractor-tests rework tests
…sMethodVisitorTest.php Co-authored-by: Hubert Lenoir <Jean-Beru@users.noreply.github.com>
Add test for translatable BackedEnum with explicit match in trans method
fc5e0ad
to
eea087f
Compare
welcoMattic
pushed a commit
that referenced
this pull request
Aug 18, 2025
…operty when not on source (#2)
welcoMattic
pushed a commit
that referenced
this pull request
Aug 18, 2025
…m (soyuka, rvanlaak) This PR was merged into the 7.3 branch. Discussion ---------- [ObjectMapper] read source metadata before transform | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | fixes symfony#61027 | License | MIT Commits ------- c1e4adf [ObjectMapper] do not require mapping a target's required promoted property when not on source (#2) 50e177d [ObjectMapper] read source metadata before transform
welcoMattic
pushed a commit
that referenced
this pull request
Aug 18, 2025
* 7.3: [ObjectMapper] do not require mapping a target's required promoted property when not on source (#2) [GitHub] Update .github/PULL_REQUEST_TEMPLATE.md to remove SF 7.2 as it's not supported anymore [WebProfilerBundle] Fix toolbar not rendering after replacing it Add friendly name in the `to` field [ObjectMapper] read source metadata before transform [HtmlSanitizer] Fix force_attributes not replacing existing attribute in initial data
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Temporary PR used to track progress.
Main goal of this branch is to track every code location where translation keys can be used, explicitly, or implicitly (where Translator service is called from Symfony code side).
Please use this fork, pull a branch from
translation/improve-php-ast-extractor
, and open here a PR to thistranslation/improve-php-ast-extractor
branch.FormType
add
fields)createFormBuilder
calls)What about
*_translation_parameters
options? Can they be read to extract some metadata?Flash messages
$this->addFlash
method callEnum