6.2
Commits on Sep 18, 2022
-
feature #47595 [HttpFoundation] Extract request matchers for better r…
…eusability (fabpot) This PR was merged into the 6.2 branch. Discussion ---------- [HttpFoundation] Extract request matchers for better reusability | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | The `RequestMatcher` class hardcodes its matchers. This PR extracts those into their own classes so that we can compose a `RequestMatcher` and allow better reusability. Commits ------- 6cfd3b7 [HttpFoundation] Extract request matchers for better reusability
Commits on Sep 17, 2022
-
minor #47611 [Serializer] Improve performance of AbstractObjectDenorm…
…alizer with XML/CSV (dunglas) This PR was merged into the 6.2 branch. Discussion ---------- [Serializer] Improve performance of AbstractObjectDenormalizer with XML/CSV | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | n/a | License | MIT | Doc PR | n/a Prevent a useless call to `ctype_digit` on the hot path when denormalizing XML or CSV data. Commits ------- 06060ff [Serializer] Improve performance of AbstractObjectDenormalizer with XML/CSV
-
minor #47609 [Form] fix type for choices (xabbuh)
This PR was merged into the 6.2 branch. Discussion ---------- [Form] fix type for choices | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- dd3d9cb fix type for choices
-
-
minor #47597 [Validator] Improve WhenValidator CS (HeahDude)
This PR was merged into the 6.2 branch. Discussion ---------- [Validator] Improve WhenValidator CS | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | ~ | License | MIT | Doc PR | ~ Commits ------- 2d1a005 [Validator] Improve WhenValidator CS
-
* 6.1: remove no longer needed PHP version requirements from tests remove no longer needed PHP version requirements from tests [Validator] [Security] Add Norwegian translations add tests covering union types in MessengerPass [Messenger] Support for custom handler method containing a Union type tagged with #[AsMessageHandler] [HttpFoundation] Prevent BinaryFileResponse::prepare from adding content type if no content is sent
-
minor #47607 remove no longer needed PHP version requirements from te…
…sts (xabbuh) This PR was merged into the 6.1 branch. Discussion ---------- remove no longer needed PHP version requirements from tests | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- d2c249b remove no longer needed PHP version requirements from tests
-
-
-
* 6.0: remove no longer needed PHP version requirements from tests [Validator] [Security] Add Norwegian translations add tests covering union types in MessengerPass [HttpFoundation] Prevent BinaryFileResponse::prepare from adding content type if no content is sent
-
minor #47606 remove no longer needed PHP version requirements from te…
…sts (xabbuh) This PR was merged into the 6.0 branch. Discussion ---------- remove no longer needed PHP version requirements from tests | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- c6513ec remove no longer needed PHP version requirements from tests
-
-
* 5.4: [Validator] [Security] Add Norwegian translations add tests covering union types in MessengerPass [HttpFoundation] Prevent BinaryFileResponse::prepare from adding content type if no content is sent
-
* 4.4: [Validator] [Security] Add Norwegian translations add tests covering union types in MessengerPass [HttpFoundation] Prevent BinaryFileResponse::prepare from adding content type if no content is sent
Commits on Sep 15, 2022
-
minor #47585 [Security][Validator] Add Norwegian translations
(jai…🇳🇴 …ro928) This PR was merged into the 4.4 branch. Discussion ---------- [Security][Validator] Add Norwegian translations
🇳🇴 | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45128 (Part of #38710) | License | MIT Added some missing Norwegian translations. Commits ------- c31b9e0 [Validator] [Security] Add Norwegian translations -
minor #47589 [VarExporter] Add LazyObjectInterface::isLazyObjectIniti…
…alized() (nicolas-grekas) This PR was merged into the 6.2 branch. Discussion ---------- [VarExporter] Add LazyObjectInterface::isLazyObjectInitialized() | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no (amending a new feat) | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - After reviewing a few existing use cases of lazy proxies, it looks like we should provide a way to know whether a lazy object is initialized. Typically, Doctrine uses that to know if an object needs to be populated or not in its UnitOfWork. Commits ------- a1a8798 [VarExporter] Add LazyObjectInterface::isLazyObjectInitialized()
-
-
Commits on Sep 14, 2022
-
minor #47565 [Messenger] add tests covering union types in MessengerP…
…ass (xabbuh) This PR was merged into the 4.4 branch. Discussion ---------- [Messenger] add tests covering union types in MessengerPass | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 0bb3d84 add tests covering union types in MessengerPass
Commits on Sep 13, 2022
-
feature #47535 [TwigBridge] Expose current route in
AppVariable
(He……ahDude) This PR was merged into the 6.2 branch. Discussion ---------- [TwigBridge] Expose current route in `AppVariable` | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | ~ | License | MIT | Doc PR | TODO In my experience, a Symfony web project using Twig always comes with templates using `app.request.attributes.get('_route')`, a most common exemple: ```twig <ul> <li class="{{ 'some_route' == app.request.attributes.get('_route') ? 'active' }}">...</li> ... </ul> ``` (An idea of how much it can be used at: https://github.com/search?q=app.request.attributes.get%28%27_route%27%29&type=code). The current way is somehow complex and not easy to discover, also trying to search the `current` keyword in Routing and Twig sections of the docs does not show the expected exemple. However searching for `_route` may lead to https://symfony.com/doc/current/routing.html#getting-the-route-name-and-parameters. I propose with this PR to introduce two small helpers in the global `AppVariable`: ```twig {% set current_route = app.current_route %} {% set current_params = app.current_route_parameters %} ``` Commits ------- 67aae53 [TwigBridge] Expose current route in `AppVariable`
-
-
-
bug #47564 [DependencyInjection] Fix lazy-proxying final classes (nic…
…olas-grekas) This PR was merged into the 6.2 branch. Discussion ---------- [DependencyInjection] Fix lazy-proxying final classes | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47563 | License | MIT | Doc PR | - Commits ------- 9ca3cb1 [DependencyInjection] Fix lazy-proxying final classes
-
-
minor #47412 [Form] Add generics to DataTransformerInterface (Vincent…
…Langlet) This PR was squashed before being merged into the 6.2 branch. Discussion ---------- [Form] Add generics to DataTransformerInterface | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | not really | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Now that some generics are added to the Symfony codebase, I think we could add more. For people using phpstan/psalm this will be helpful: - It avoid duplicating the generics in both psalm-plugin/phpstan-plugin - It avoid duplicating code between symfony and plugins - When phpstan/psalm report an error it's less confusing to look for the generic in the symfony file rather the plugin one. You can look at the current generic definition for psalm https://github.com/psalm/psalm-plugin-symfony/blob/master/src/Stubs/common/Component/Form/DataTransformerInterface.stubphp for phpstan https://github.com/phpstan/phpstan-symfony/blob/1.2.x/stubs/Symfony/Component/Form/DataTransformerInterface.stub Commits ------- dff26d3 [Form] Add generics to DataTransformerInterface
-
-
bug #47227 [Messenger] Support for custom handler method containing a…
… Union type tagged with #[AsMessageHandler] (ArchitectNate) This PR was squashed before being merged into the 6.1 branch. Discussion ---------- [Messenger] Support for custom handler method containing a Union type tagged with #[AsMessageHandler] | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47206 | License | MIT | Doc PR | No When Union Types were implemented for the #[AsMessageHandler] attribute, it wasn't designed with non `__invoke` methods in mind. This fix detects if we are using `__invoke` or not and constructs the return to match the rest of the logic, mainly it allows for a `type => methodName` map if `__invoke` is not being used. Commits ------- f38d8f8 [Messenger] Support for custom handler method containing a Union type tagged with #[AsMessageHandler]
-
[Messenger] Support for custom handler method containing a Union type…
… tagged with #[AsMessageHandler]
-
feature #47536 [TwigBundle] add option for configuring custom HTML to…
… text converter services (xabbuh) This PR was merged into the 6.2 branch. Discussion ---------- [TwigBundle] add option for configuring custom HTML to text converter services | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | builds on top of #47201 | License | MIT | Doc PR | Commits ------- 4d66bfb add option for configuring custom HTML to text converter services
-
feature #46064 [Security] Add a
ChainUserChecker
to allow calling m……ultiple user checkers for a firewall (mbabker) This PR was merged into the 6.2 branch. Discussion ---------- [Security] Add a `ChainUserChecker` to allow calling multiple user checkers for a firewall | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | TODO I had a case in one of my apps where I have some shared logic for user checkers across multiple firewalls (API and traditional web login) while also needing extra logic for the API. Instead of duplicating the checker for each firewall or using a decorator, I thought a chained user checker would be nice to have and that it might be useful to users of the framework. This will add a `ChainUserChecker` class to the `security-core` component, and the SecurityBundle will create a `security.user_checker.chain.<firewall>` service for each firewall. User checkers can then be tagged with a `security.user_checker.<firewall>` tag for each firewall the checker applies to, and users would set this chain service as the user checker for their firewall. ```php <?php namespace App\Security\User; use Symfony\Component\DependencyInjection\Attribute\Autoconfigure; use Symfony\Component\Security\Core\User\UserCheckerInterface; #[Autoconfigure(tags: [['security.user_checker.main' => ['priority' => 10]]])] #[Autoconfigure(tags: [['security.user_checker.api' => ['priority' => 10]]])] final class DisabledAccountUserChecker implements UserCheckerInterface {} #[Autoconfigure(tags: [['security.user_checker.api' => ['priority' => 5]]])] final class ApiAccessAllowedUserChecker implements UserCheckerInterface {} ``` Commits ------- 0a1ad4b Add a ChainUserChecker to allow calling multiple user checkers for a firewall
-
minor #47542 [Mime] remove unused getDisposition() method (xabbuh)
This PR was merged into the 6.2 branch. Discussion ---------- [Mime] remove unused getDisposition() method | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | This method was introduced in #47034, but its usage was removed again when merging #47437 up into the 6.2 branch. Commits ------- 746cf35 remove unused getDisposition() method