Skip to content

Conversation

@Kazadri
Copy link

@Kazadri Kazadri commented May 6, 2025

Q A
Branch? 7.3 for features / 6.4, and 7.2 for bug fixes
Bug fix? no
New feature? no
Deprecations? no
Issues
License MIT

Add test for translatable BackedEnum with explicit call to the trans method

@Kazadri Kazadri requested a review from welcoMattic as a code owner May 6, 2025 13:39
@welcoMattic welcoMattic merged commit b4127b2 into welcoMattic:translation/improve-php-ast-extractor May 9, 2025
5 of 10 checks passed
welcoMattic added a commit that referenced this pull request May 9, 2025
Add test for translatable BackedEnum with explicit match in trans method
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
welcoMattic added a commit that referenced this pull request Jun 20, 2025
Add test for translatable BackedEnum with explicit match in trans method
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.

3 participants