* 7.2:
Review validator-related japanese translations with ids 114-120
don't trigger "internal" deprecations for PHPUnit Stub objects
drop comments while lexing unquoted strings
* 6.4:
Review validator-related japanese translations with ids 114-120
don't trigger "internal" deprecations for PHPUnit Stub objects
drop comments while lexing unquoted strings
* 7.2: (47 commits)
Remove comment about AppVeyor in `phpunit`
[Webhook][RemoteEvent] fix SendgridPayloadConverter category support
Update old Appveyor skip conditions
sync the Dutch translation file with changes from the 7.2 branch
[Yaml] fix inline notation with inline comment
clean up code for doctrine/persistence 2.x
Generate missing translations using Gemini
fix(property-info): make sure that SerializerExtractor returns null for invalid class metadata
add translations for the Slug constraint
[RemoteEvent][Webhook] fix SendgridRequestParser & SendgridPayloadConverter in case of missing sg_message_id
[Messenger] Fix `TransportMessageIdStamp` not always added
[DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3
[PropertyInfo] Fix add missing composer conflict
[ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances
[VarDumper] Fix displaying closure's "this" from anonymous classes
[Doctrine][Messenger] Prevents multiple TransportMessageIdStamp being stored in envelope
[HttpKernel] Don't override existing LoggerInterface autowiring alias in LoggerPass
reject inline notations followed by invalid content
Fix predis command error checking
[Security] Fix triggering session tracking from ContextListener
...
* 7.1: (27 commits)
add translations for the Slug constraint
[Messenger] Fix `TransportMessageIdStamp` not always added
[DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3
[PropertyInfo] Fix add missing composer conflict
[ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances
[VarDumper] Fix displaying closure's "this" from anonymous classes
[Doctrine][Messenger] Prevents multiple TransportMessageIdStamp being stored in envelope
[HttpKernel] Don't override existing LoggerInterface autowiring alias in LoggerPass
reject inline notations followed by invalid content
[Security] Fix triggering session tracking from ContextListener
[AssetMapper] add leading slash to public prefix
fix: modify Exception message parameter order
[Yaml] Fix parsing of unquoted strings in Parser::lexUnquotedString() to ignore spaces
Update exception.css
Remove outdated guard from security xsd schema
Bump Symfony version to 7.1.11
Update VERSION for 7.1.10
Update CHANGELOG for 7.1.10
Bump Symfony version to 6.4.18
Update VERSION for 6.4.17
...
* 6.4: (23 commits)
add translations for the Slug constraint
[Messenger] Fix `TransportMessageIdStamp` not always added
[DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3
[PropertyInfo] Fix add missing composer conflict
[ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances
[VarDumper] Fix displaying closure's "this" from anonymous classes
[Doctrine][Messenger] Prevents multiple TransportMessageIdStamp being stored in envelope
[HttpKernel] Don't override existing LoggerInterface autowiring alias in LoggerPass
reject inline notations followed by invalid content
[Security] Fix triggering session tracking from ContextListener
[AssetMapper] add leading slash to public prefix
fix: modify Exception message parameter order
[Yaml] Fix parsing of unquoted strings in Parser::lexUnquotedString() to ignore spaces
Update exception.css
Bump Symfony version to 6.4.18
Update VERSION for 6.4.17
Update CONTRIBUTORS for 6.4.17
Update CHANGELOG for 6.4.17
Fix exception thrown by YamlEncoder
[AssetMapper] Fix JavaScript compiler create self-referencing imports
...
* 7.0:
[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
[AssetMapper] Fix enquoted string pattern
[Validator] Review Romanian (ro) translations
[Console] Fix display of Table on Windows OS
[FrameworkBundle] Fix config builder with extensions extended in `build()`
[Translation] Fix extracting qualified t() function calls
Fix vertical table on windows
Fix the `command -v` exception when the command option with a dash prefix
Fix a minor design issue in the Welcome Page
[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
* 6.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
[AssetMapper] Fix enquoted string pattern
[Validator] Review Romanian (ro) translations
[Console] Fix display of Table on Windows OS
[FrameworkBundle] Fix config builder with extensions extended in `build()`
[Translation] Fix extracting qualified t() function calls
Fix vertical table on windows
Fix the `command -v` exception when the command option with a dash prefix
[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
* 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
* 7.0:
List CS fix in .git-blame-ignore-revs
Fix implicitly-required parameters
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
[Messenger][AmazonSqs] Allow async-aws/sqs version 2
* 6.4:
Fix implicitly-required parameters
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
[Messenger][AmazonSqs] Allow async-aws/sqs version 2
* 6.2:
[HttpClient] Dev-require php-http/message-factory
[ErrorHandler] Skip Httplug deprecations for HttplugClient
[Messenger] Fix registering message handlers
Bump Symfony version to 5.4.24
Update VERSION for 5.4.23
Update CONTRIBUTORS for 5.4.23
Update CHANGELOG for 5.4.23
* 5.4:
[HttpClient] Dev-require php-http/message-factory
[ErrorHandler] Skip Httplug deprecations for HttplugClient
[Messenger] Fix registering message handlers
Bump Symfony version to 5.4.24
Update VERSION for 5.4.23
Update CONTRIBUTORS for 5.4.23
Update CHANGELOG for 5.4.23
* 6.2: (21 commits)
Fix tests
CS fix
[HttpKernel] Tests for DataCollector
for #49320
[Console] Fix computing column width containing multibyte chars
[Messenger] Fix deprecation layer of RedeliveryStamp
[Mime] Form field values with integer keys not resolved correctly
[Messenger] [Redis] Fixed problem where worker stops handling messages on first empty message
[PHPUnitBridge] Fix PHPUnit 10.1 compatibility
[VarDumper] Make the server TCP connection sync
[Messenger] Fix warning message on failed messenger show command
[Mailer] [Mailjet] Use body MessageID instead of X-MJ-Request-GUID
[HttpFoundation] Fix BinaryFileResponse
[Form] fix merge
[HttpFoundation] Fix memory limit problems in BinaryFileResponse
[PropertyAccess] Readonly properties must have no PropertyWriteInfo
[Form] Cast choices value callback result to string
[Serializer] Unexpected value should throw UnexpectedValueException
[ErrorHandler] Don't throw deprecations for HttplugClient
[Serializer] Fix denormalization of object with typed constructor arg (not castable) and with COLLECT_DENORMALIZATION_ERRORS
...
* 5.4:
[Console] Fix computing column width containing multibyte chars
[Messenger] Fix deprecation layer of RedeliveryStamp
[Mime] Form field values with integer keys not resolved correctly
[Messenger] [Redis] Fixed problem where worker stops handling messages on first empty message
[PHPUnitBridge] Fix PHPUnit 10.1 compatibility
[VarDumper] Make the server TCP connection sync
[Messenger] Fix warning message on failed messenger show command
[Mailer] [Mailjet] Use body MessageID instead of X-MJ-Request-GUID
[HttpFoundation] Fix BinaryFileResponse
[Form] fix merge
[HttpFoundation] Fix memory limit problems in BinaryFileResponse
[PropertyAccess] Readonly properties must have no PropertyWriteInfo
[Form] Cast choices value callback result to string
[Serializer] Unexpected value should throw UnexpectedValueException
[ErrorHandler] Don't throw deprecations for HttplugClient
[Serializer] Fix denormalization of object with typed constructor arg (not castable) and with COLLECT_DENORMALIZATION_ERRORS
Avoid leading .. for temporary files from Filesystem recursive remove
* 6.1:
[Mailer] Include all transports' debug messages in RoundRobin transport exception
[FrameworkBundle] fix: fix help message
Fix HtmlSanitizer default configuration behavior for allowed schemes
Use relative timestamps
[Cache] Fix dealing with ext-redis' multi/exec returning a bool
[Messenger][Amqp] Added missing rpc_timeout option
[Serializer] Prevent GetSetMethodNormalizer from creating invalid magic method call
[HttpFoundation] Fix dumping array cookies
[WebProfilerBundle] Fix dump header not being displayed
TraceableHttpClient: increase decorator's priority
Use static methods inside data providers
[FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
bug #48313 [Mime] Fix MessagePart serialization
[HttpKernel][ErrorHandler] Fix reading the SYMFONY_IDE env var
[ErrorHandler][DebugClassLoader] Fix some new return types support
Fix getting the name of closures on PHP 8.1.11+
[Translator] Fix typo "internal" / "interval"
fix dumping top-level tagged values
[Console] Fix clear line with question in section
* 6.0:
[Mailer] Include all transports' debug messages in RoundRobin transport exception
[FrameworkBundle] fix: fix help message
Use relative timestamps
[Cache] Fix dealing with ext-redis' multi/exec returning a bool
[Messenger][Amqp] Added missing rpc_timeout option
[Serializer] Prevent GetSetMethodNormalizer from creating invalid magic method call
[HttpFoundation] Fix dumping array cookies
[WebProfilerBundle] Fix dump header not being displayed
TraceableHttpClient: increase decorator's priority
Use static methods inside data providers
[FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
bug #48313 [Mime] Fix MessagePart serialization
[ErrorHandler][DebugClassLoader] Fix some new return types support
Fix getting the name of closures on PHP 8.1.11+
[Translator] Fix typo "internal" / "interval"
fix dumping top-level tagged values
* 5.4:
[Mailer] Include all transports' debug messages in RoundRobin transport exception
[FrameworkBundle] fix: fix help message
Use relative timestamps
[Cache] Fix dealing with ext-redis' multi/exec returning a bool
[Messenger][Amqp] Added missing rpc_timeout option
[Serializer] Prevent GetSetMethodNormalizer from creating invalid magic method call
[HttpFoundation] Fix dumping array cookies
[WebProfilerBundle] Fix dump header not being displayed
TraceableHttpClient: increase decorator's priority
Use static methods inside data providers
[FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
bug #48313 [Mime] Fix MessagePart serialization
[ErrorHandler][DebugClassLoader] Fix some new return types support
Fix getting the name of closures on PHP 8.1.11+
[Translator] Fix typo "internal" / "interval"
fix dumping top-level tagged values
This PR was merged into the 6.2 branch.
Discussion
----------
Improve some PHPdocs based on existing Symfony stubs in PHPstan and Psalm
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no (strictly spoken yes, as I guess DebugClassLoader will trigger deprecations for some now?)
| Tickets | Replaces #40783
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/17064
Todo
---
* [x] Review the Psalm check of this PR
* [x] Test the changes with DebugClassLoader in a real app
Description
---
This PR adds some more information to the PHPdoc of Symfony classes. By moving the information from the current stubs of static analyzers into Symfony itself: (1) we can improve the experience for all users, (2) reduce false-positives from our own Psalm check and (3) make sure they are in sync with changes done on these classes.
<s>To avoid a PR that is too big to review and maintain, the scope of this PR is deliberately kept narrow:
* Only PHPdoc from either [Psalm's Symfony stubs](https://github.com/psalm/psalm-plugin-symfony/tree/master/src/Stubs) or [PHPStan's Symfony stubs](https://github.com/phpstan/phpstan-symfony/tree/1.2.x/stubs) is added
* The PHPdoc MUST NOT break PHPstorm
* The PHPdoc MUST be supported by both PHPstan and Psalm (those are the only two static analyzers that currently ship an official Symfony plugin afaik)
* The PHPdoc SHOULD NOT duplicate anything that can already be deduced from either PHP's type declarations or already existing PHPdoc.
* The PHPdoc MUST document the contract and NOT be added to fit a 95% use-case or improve auto-completion.</s>
EDIT: Replaced the guidelines by https://github.com/symfony/symfony-docs/pull/17064
On top of this, to get this PR approved quicker, I've left out all stubs from the Form (based on the discussions in #40783) and most of [PHPStan's `Envelope` stub](https://github.com/psalm/psalm-plugin-symfony/blob/master/src/Stubs/common/Component/Messenger/Envelope.stubphp) (due to complexity of the PHPdoc).
Commits
-------
f5a802ab85 [DependencyInjection] Add nice exception when using non-scalar parameter as array key
fa7703ba4a [ErrorHandler] Do not patch return types that are not a valid PHP type
38ab6de900 Improve some PHPdocs based on existing Symfony stubs in PHPstan and Psalm