108 Commits

Author SHA1 Message Date
Nicolas Grekas
672b3dd1ef Merge branch '7.1' into 7.2
* 7.1:
  fix detecting anonymous exception classes on Windows and PHP 7
  skip tests requiring the intl extension if it's not installed
  [RateLimiter] Fix DateInterval normalization
  re-add missing profiler shortcuts on profiler homepage
  Fix support for \SplTempFileObject in BinaryFileResponse
  [Security] Store original token in token storage when implicitly exiting impersonation
  [Cache] Fix clear() when using Predis
2024-11-05 16:35:02 +01:00
Nicolas Grekas
010e44661f Merge branch '6.4' into 7.1
* 6.4:
  fix detecting anonymous exception classes on Windows and PHP 7
  skip tests requiring the intl extension if it's not installed
  [RateLimiter] Fix DateInterval normalization
  [Security] Store original token in token storage when implicitly exiting impersonation
  [Cache] Fix clear() when using Predis
2024-11-05 16:34:55 +01:00
Nicolas Grekas
9e02432451 Merge branch '5.4' into 6.4
* 5.4:
  fix detecting anonymous exception classes on Windows and PHP 7
  skip tests requiring the intl extension if it's not installed
  [RateLimiter] Fix DateInterval normalization
  [Security] Store original token in token storage when implicitly exiting impersonation
  [Cache] Fix clear() when using Predis
2024-11-05 16:34:40 +01:00
Christian Flothmann
d19ede7a2c fix detecting anonymous exception classes on Windows and PHP 7 2024-11-05 15:17:06 +01:00
Roy de Vos Burchart
0ee7b0fcbd Code style change in @PER-CS2.0 affecting @Symfony (parentheses for anonymous classes) 2024-08-06 12:13:52 +02:00
Nicolas Grekas
acd0ff17cb Merge branch '7.1' into 7.2
* 7.1:
  Fix merge
  Sync .github/expected-missing-return-types.diff
  [ErrorHandler] Fix `E_STRICT` logging level
2024-07-26 15:20:48 +02:00
Alexandre Daubois
432bb36995 [ErrorHandler] Fix E_STRICT logging level 2024-07-26 15:02:51 +02:00
Nicolas Grekas
45f8e57ace Merge branch '7.1' into 7.2
* 7.1:
  Fix ProcessTest - testIgnoringSignal for local
  [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
  [Translation] Fix CSV escape char in `CsvFileLoader` on PHP >= 7.4
  [DoctrineBridge] fix messenger bus dispatch inside an active transaction
  [HttpFoundation] Add tests for uncovered sections
  treat uninitialized properties referenced by property paths as null
  [PropertyInfo] Check if property is nullable when using `ReflectionExtractor`
  properly set up constraint options
  [ErrorHandler][VarDumper] Remove PHP 8.4 deprecations
  move adding detailed JSON error messages to the validate phase
  [Profiler] Add word wrap in tables in dialog to see all the text
  [Core] Fix & Enhance security arabic translation.
  [HttpFoundation] Add tests for `MethodRequestMatcher` and `SchemeRequestMatcher`
2024-07-26 14:49:40 +02:00
Nicolas Grekas
2f3e2a8c11 Merge branch '7.0' into 7.1
* 7.0:
  [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
  [Translation] Fix CSV escape char in `CsvFileLoader` on PHP >= 7.4
  [DoctrineBridge] fix messenger bus dispatch inside an active transaction
  [HttpFoundation] Add tests for uncovered sections
  treat uninitialized properties referenced by property paths as null
  properly set up constraint options
  [ErrorHandler][VarDumper] Remove PHP 8.4 deprecations
  move adding detailed JSON error messages to the validate phase
  [Profiler] Add word wrap in tables in dialog to see all the text
  [Core] Fix & Enhance security arabic translation.
  [HttpFoundation] Add tests for `MethodRequestMatcher` and `SchemeRequestMatcher`
2024-07-26 14:41:01 +02:00
Nicolas Grekas
231f1b2ee8 Merge branch '5.4' into 6.4
* 5.4:
  [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
  [Translation] Fix CSV escape char in `CsvFileLoader` on PHP >= 7.4
  [DoctrineBridge] fix messenger bus dispatch inside an active transaction
  [HttpFoundation] Add tests for uncovered sections
  treat uninitialized properties referenced by property paths as null
  properly set up constraint options
  [ErrorHandler][VarDumper] Remove PHP 8.4 deprecations
  [Core] Fix & Enhance security arabic translation.
2024-07-26 14:30:32 +02:00
Alexandre Daubois
db15ba0fd5 [ErrorHandler][VarDumper] Remove PHP 8.4 deprecations 2024-07-23 14:34:05 +02:00
Alexandre Daubois
04d41f32dd Use CPP where possible 2024-07-23 14:28:30 +02:00
Christophe Coevoet
dc5a929a9a minor #54046 [HttpKernel] Increase log level to "error" at least for all PHP errors (lyrixx)
This PR was merged into the 7.1 branch.

Discussion
----------

[HttpKernel] Increase log level to "error" at least for all PHP errors

| Q             | A
| ------------- | ---
| Branch?       | 7.1
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | Fix #54036
| License       | MIT

reproducer: with a simple `$a = $b` in a controller.

Before
```
[PHP        ] [Fri Feb 23 17:14:26 2024] 127.0.0.1:42604 Accepted
[PHP        ] [Fri Feb 23 17:14:26 2024] 127.0.0.1:42604 [200]: GET /
[Web Server ] Feb 23 17:14:26 |INFO   | SERVER GET  (200) / ip="127.0.0.1"
[PHP        ] [Fri Feb 23 17:14:26 2024] 127.0.0.1:42604 Closing
```

After
```
[Web Server ] Feb 23 17:15:11 |INFO   | SERVER GET  (200) / ip="127.0.0.1"
[PHP        ] [Fri Feb 23 17:15:11 2024] 127.0.0.1:57906 Accepted
[PHP        ] {"message":"Matched route \"app_homepage_index\".","context":{"route":"app_homepage_index","route_parameters":{"_route":"app_homepage_index","_controller":"App\\Controller\\HomepageController::index"},"request_uri":"https://127.0.0.1:8000/","method":"GET"},"level":200,"level_name":"INFO","channel":"request","datetime":"2024-02-23T17:15:11.090004+01:00","extra":{}}
[PHP        ] {"message":"Checking for authenticator support.","context":{"firewall_name":"main","authenticators":0},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2024-02-23T17:15:11.090469+01:00","extra":{}}
[PHP        ] {"message":"Warning: Undefined variable $b","context":{"exception":{"class":"ErrorException","message":"Warning: Undefined variable $b","code":0,"file":"/home/gregoire/dev/labs/symfony/symfony-7.1/src/Controller/HomepageController.php:20"}},"level":400,"level_name":"ERROR","channel":"php","datetime":"2024-02-23T17:15:11.090872+01:00","extra":{}}
[PHP        ] [Fri Feb 23 17:15:11 2024] 127.0.0.1:57906 [200]: GET /
[PHP        ] [Fri Feb 23 17:15:11 2024] 127.0.0.1:57906 Closing
```

Commits
-------

796950bbd9 [HttpKernel] Increase log level to "error" at least for all PHP errors
2024-03-14 18:23:17 +01:00
Nicolas Grekas
e2d79995e3 [ErrorHandler] Fix tests 2024-03-12 15:55:32 +01:00
Nicolas Grekas
146c403fff Merge branch '5.4' into 6.4
* 5.4:
  [VarDumper] Fix test suite with PHP 8.4
  [DoctrineBridge] Add missing return type
  [Mailer] Fix sendmail transport not handling failure
  [HttpClient] Lazily initialize CurlClientState
  updating missing translations for Greek #53768
  [Validator] Allow BICs’ first four characters to be digits
  [ErrorHandler] Fix exit code when an exception occurs and the exception handler has been unregistered
  [Validator] Review Arabic translations and add correct translations.
2024-03-12 15:06:11 +01:00
Nicolas Grekas
5a3c7dbf83 [ErrorHandler] Fix exit code when an exception occurs and the exception handler has been unregistered 2024-03-07 11:40:12 +01:00
Grégoire Pineau
5ba18e5ad0 [HttpKernel] Increase log level to "error" at least for all PHP errors 2024-02-28 17:34:48 +01:00
Nicolas Grekas
c725219bdf Merge branch '5.4' into 6.4
* 5.4:
  [DependencyInjection] Fix computing error messages involving service locators
  [Serializer] Fix unknown types normalization type when know type
  [ErrorHandler] Fix parsing messages that contain anonymous classes on PHP >= 8.3.3
  [Validator] Review Romanian (ro) translations
  [Console] Fix display of Table on Windows OS
  [FrameworkBundle] Fix config builder with extensions extended in `build()`
  [WebProfilerBundle] disable turbo in web profiler toolbar to avoid link prefetching
  explicitly cast boolean SSL stream options
  return the unchanged text if preg_replace_callback() fails
  the 'use_notify' option is on the factory, not on the postgres connection class
  review translations
2024-02-22 15:27:10 -05:00
Nicolas Grekas
90b1d7799b [ErrorHandler] Fix parsing messages that contain anonymous classes on PHP >= 8.3.3 2024-02-22 06:40:53 -05:00
Nicolas Grekas
04766f0a8e Merge branch '6.3' into 6.4
* 6.3:
  minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench)
  Fix bad merge
  List CS fix in .git-blame-ignore-revs
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
2024-01-23 15:51:35 +01:00
Nicolas Grekas
93a8400a7e Merge branch '5.4' into 6.3
* 5.4:
  Fix implicitly-required parameters
  List CS fix in .git-blame-ignore-revs
  Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
  [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2024-01-23 15:35:58 +01:00
Nicolas Grekas
39225b1e47 Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value 2024-01-23 14:51:25 +01:00
Nicolas Grekas
c873490a1c [HttpKernel] Add parameters kernel.runtime_mode and kernel.runtime_mode.*, all set from env var APP_RUNTIME_MODE 2023-10-18 11:43:34 +02:00
Fabien Potencier
7312206b07 feature #50911 [HttpKernel] Enhance exception if possible (lyrixx)
This PR was merged into the 6.4 branch.

Discussion
----------

[HttpKernel] Enhance exception if possible

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | restore an old feature
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

I don't know if it's the best place to do that.
I think in the kernel, it would be better, WDYT?

Before

![image](https://github.com/symfony/symfony/assets/408368/e2a452aa-b669-4598-8b23-5366c5b80a74)

After :

![image](https://github.com/symfony/symfony/assets/408368/0e30c50d-5c94-43db-a9e5-19be6ccd5f2b)

Commits
-------

2bfb9d9128 [HttpKernel] Enhance exception if possible
2023-07-30 15:21:56 +02:00
Nicolas Grekas
75a3586f70 More short closures + isset instead of null checks + etc. 2023-07-27 08:52:43 +02:00
Nicolas Grekas
ad5325f948 minor #51096 Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls (lyrixx)
This PR was merged into the 6.4 branch.

Discussion
----------

Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

be1bbbccc1 Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls
2023-07-26 19:27:13 +02:00
Nicolas Grekas
a6f3abe060 Add types to private and internal properties 2023-07-25 17:08:44 +02:00
Grégoire Pineau
7fbbc36f4a Use more "First class callable syntax" + Normalize set_error_handler/set_exception_handler calls 2023-07-25 14:43:33 +02:00
Grégoire Pineau
1de20c4214 [HttpKernel] Enhance exception if possible 2023-07-25 10:39:05 +02:00
Wouter de Jong
7b28b8c1ee Add remaining missing return types to safe methods 2023-04-24 16:22:26 +02:00
Antoine Lamirault
1e4c2b6371 Remove unused local variable 2023-02-21 09:04:13 +01:00
tigitz
c7da6f4d10 Leverage arrow function syntax for closure 2023-01-13 10:22:59 +01:00
Nicolas Grekas
d9894724a9 Use ??= more 2022-11-02 10:08:04 +01:00
Nicolas Grekas
6f3ec1ff76 Add a few more ??= 2022-09-12 10:52:12 +02:00
Nicolas Grekas
736e42db3f Merge branch '6.0' into 6.1
* 6.0:
  [HttpKernel] Fix test sensitivity on xdebug.file_link_format
  [HttpKernel] Fix non-scalar check in surrogate fragment renderer
  [Debug][ErrorHandler] fix operator precedence
  [Cache] Ensured that redis adapter can use multiple redis sentinel hosts
  [DoctrineBridge] fix tests
  [Security] Allow redirect after login to absolute URLs
2022-07-29 09:42:06 +02:00
Nicolas Grekas
cb302377e1 Merge branch '5.4' into 6.0
* 5.4:
  [HttpKernel] Fix test sensitivity on xdebug.file_link_format
  [HttpKernel] Fix non-scalar check in surrogate fragment renderer
  [Debug][ErrorHandler] fix operator precedence
  [Cache] Ensured that redis adapter can use multiple redis sentinel hosts
  [DoctrineBridge] fix tests
  [Security] Allow redirect after login to absolute URLs
2022-07-29 09:39:48 +02:00
Nicolas Grekas
f75d17cb47 Merge branch '4.4' into 5.4
* 4.4:
  [HttpKernel] Fix test sensitivity on xdebug.file_link_format
  [HttpKernel] Fix non-scalar check in surrogate fragment renderer
  [Debug][ErrorHandler] fix operator precedence
  [Security] Allow redirect after login to absolute URLs
2022-07-29 09:37:50 +02:00
Guilliam Xavier
be73165812 [Debug][ErrorHandler] fix operator precedence 2022-07-28 18:29:46 +02:00
Maxime Steinhausser
a298736e58 Merge branch '6.0' into 6.1
* 6.0:
  [Messenger] Fix function name in TriggerSql on postgresql bridge to support table name with schema
  [HttpClient] Fix the CS fix
  Workaround disabled "var_dump"
  [Serializer] Respect default context in DateTimeNormalizer::denormalize
2022-07-28 15:40:41 +02:00
Maxime Steinhausser
7aa397da20 Merge branch '5.4' into 6.0
* 5.4:
  [Messenger] Fix function name in TriggerSql on postgresql bridge to support table name with schema
  [HttpClient] Fix the CS fix
  Workaround disabled "var_dump"
  [Serializer] Respect default context in DateTimeNormalizer::denormalize

# Conflicts:
#	src/Symfony/Component/ErrorHandler/ErrorHandler.php
#	src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
2022-07-28 15:39:17 +02:00
Maxime Steinhausser
076fefa88e Merge branch '4.4' into 5.4
* 4.4:
  [HttpClient] Fix the CS fix
  Workaround disabled "var_dump"
  [Serializer] Respect default context in DateTimeNormalizer::denormalize

# Conflicts:
#	src/Symfony/Component/Debug/ErrorHandler.php
#	src/Symfony/Component/HttpClient/HttpClientTrait.php
#	src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php
2022-07-28 15:33:28 +02:00
Nicolas Grekas
5857d48f45 Workaround disabled "var_dump" 2022-07-27 18:05:11 +02:00
Thomas Calvet
bbb636fdaf Leverage non-capturing catches 2022-04-01 09:15:35 +02:00
Nicolas Grekas
f130c1341f Bump minimum version of PHP to 8.1 2022-02-25 12:15:52 +01:00
Fabien Potencier
944193d25c Remove FQCN type hints on properties 2021-12-08 16:13:44 +01:00
Nicolas Grekas
05ab89e73b Merge branch '5.4' into 6.0
* 5.4:
  Avoid duplicated session listener registration in tests
  [HttpFoundation] fix SessionHandlerFactory using connections
  [gha] swap the php versions we use in jobs
  [DoctrineBridge] fix calling get_class on non-object
  Update PR template
  ResponseListener needs only 2 parameters
  [Lock] create lock table if it does not exist
  [HttpClient] Fix handling error info in MockResponse
  [SecurityBundle] Fix invalid reference with `always_authenticate_before_granting`
  Bump Symfony version to 5.4.1
  Update VERSION for 5.4.0
  Update CHANGELOG for 5.4.0
2021-12-01 16:09:18 +01:00
Nicolas Grekas
2a38b358d9 Merge branch '4.4' into 5.3
* 4.4:
  [gha] swap the php versions we use in jobs
  [DoctrineBridge] fix calling get_class on non-object
  Update PR template
  [HttpClient] Fix handling error info in MockResponse
2021-12-01 16:03:13 +01:00
Nicolas Grekas
1fa841189e [gha] swap the php versions we use in jobs 2021-12-01 14:25:30 +01:00
Nicolas Grekas
0e8f0c1123 Merge branch '5.4' into 6.0
* 5.4:
  [Security] Do not overwrite already stored tokens for REMOTE_USER authentication
  [Validator] Fix validation for single level domains
  [Notifier] add Vonage bridge to replace the Nexmo one
  Fix redundant type casts
  Increased the reserved memory from 10k to 32k
  Complete event name & dispatcher in EventDispatcherDebugCommand
  [DoctrineBridge] Add DbalLoggerTest to group legacy
  Leverage DBAL's getNativeConnection() method
  [FrameworkBundle] Fix property-info phpstan extractor discovery
  Fix idempotency of LocoProvider write method
2021-11-29 16:32:57 +01:00
Nicolas Grekas
5d55ecd25b Merge branch '4.4' into 5.3
* 4.4:
  [Validator] Fix validation for single level domains
  Increased the reserved memory from 10k to 32k
  [DoctrineBridge] Add DbalLoggerTest to group legacy
2021-11-29 16:30:11 +01:00