nicolas-grekas
Repos
90
Followers
1629
Following
5

The Symfony PHP framework

27475
8589

A set of abstractions extracted out of the Symfony components

3369
16

Give thanks (in the form of a GitHub ★) to your fellow PHP package maintainers (not limited to Symfony components)!

7749
35

This is the repository of the Symfony diversity initiative.

52
2

PHP polyfills

2117
117

Events

[HttpKernel] Add request attribute _handle_all_throwables to allow HttpKernel to handle thrown Error in addition to Exception

Created at 16 minutes ago

[Cache] make Redis*Proxy extend Redis*

Change author email to better present this contribution was done on company time

remove unused getDisposition() method

This method was introduced in #47034, but its usage was removed again when merging #47437 up into the 6.2 branch.

[Uid] minor perf optim

Add a few more ??=

minor #47292 [Cache] make Redis*Proxy extend Redis* (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion

[Cache] make Redis*Proxy extend Redis*

| Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #47267, #42428 | License | MIT | Doc PR | -

Redis*Proxy did not extend native classes because we missed the code infrastructure to generate appropriate proxies. With #47236, we now have it. This PR adds generated proxies to the cache component to keep it lazy-able out of the box.

Commits

cfb46edf0f [Cache] make Redis*Proxy extend Redis*

minor #47549 Add a few more ??= (nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion

Add a few more ??=

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

Commits

0a514a9089 Add a few more ??=

Remove the default values from setters with a nullable parameter.

[Cache] sync Redis6Proxy with upstream

Remove all "nullable-by-default-value" setters

feature #38996 Remove the default values from setters with a nullable parameter (derrabus, nicolas-grekas)

This PR was merged into the 6.2 branch.

Discussion

Remove the default values from setters with a nullable parameter

| Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | N/A | License | MIT | Doc PR | N/A

Setters with a default value are a bit odd: I want to set a value, but I won't tell you which one!

We do have this kind of setters, like this example from TokenStorageInterface:

public function setToken(TokenInterface $token = null);

This means that those to calls are equivalent:

$tokenStorage->setToken(null);
$tokenStorage->setToken();

The reason for this is actually a php 5 quirk: On php 5, we did not have nullable parameter type declarations – those we added in php 7.1. The only workaround was to declare null as default value because then php would accept passing null despite the type declaration demanding an instance of a specific class/interface.

Because the days of php 5 are over, I'd like to change this. Our method signature would then look like this.

public function setToken(?TokenInterface $token);

We can do this for interfaces and abstract methods because an implementation may add a default value. Thus, removing the default value from the interface alone is not a BC break.

For the implementations of that interface, this is a different story because removing the default breaks calling code that omits the parameter entirely. This is why for the implementations I trigger a deprecation if the method is called without arguments. This enables us to remove the default in Symfony 6.

This PR performs the suggested changes for TokenStorageInterface and ContainerAwareInterface, but we have a few more setters like this. But before I continue, I'd like to collect some feedback if this is something you would want to change.

Commits

78803b2962 Remove all "nullable-by-default-value" setters 917ffde141 Remove the default values from setters with a nullable parameter.

minor #47520 [UID] Change author email to better present this contribution was done on company time (shrikeh)

This PR was merged into the 6.2 branch.

Discussion

[UID] Change author email to better present this contribution was done on company time

| Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | None | License | MIT | Doc PR | N/A

Pointed out that, as the commit 0f1bc365946f6c749fa5c65dea3261515501947a was done on company time, it is appropriate to use my work email address as the author. Apologies for the PR.

Commits

23926cd630 Change author email to better present this contribution was done on company time

[WebProfilerBundle] Profiler redesign

feature #47148 [WebProfilerBundle] Profiler redesign (javiereguiluz)

This PR was squashed before being merged into the 6.2 branch.

Discussion

[WebProfilerBundle] Profiler redesign

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

This PR updates the design of the toolbar + profiler. The goal is to keep everything the same, but improve it to (1) make it look more modern; (2) improve accessibility (e.g. more contrast in some places); (3) make the design more efficient (rearranging some elements).

How to test it in your projects

# clone this repository branch locally
$ git clone -b update_profiler https://github.com/javiereguiluz/symfony symfony-profiler
$ cd symfony-profiler/

# make your project use the code of this PR
php link /path/to/your/symfony/6.x/project

The link command changes the Symfony dependencies in the vendor/ dir of your project to create symlinks pointing to the code of this PR. See https://symfony.com/doc/current/contributing/code/pull_requests.html#use-your-branch-in-an-existing-project

Some comments to reviewers:

  • Please, ignore the exception panel in the profiler and the exception page for now. I'll tackle those in a separate future PR.
  • Try to review more thoroughly the panels which I don't use much: forms, serializer, messenger.
  • I'll make a PR to Doctrine bundle repository to update the icons and other things in Doctrine panels.

In this Twitter thread we explained the reasons behind some of these changes: https://twitter.com/symfony_en/status/1553998433760993280

For reference purposes, I'm posting here some selected screenshots too:

Before / After in light mode

profiler-example-comparison-light-mode

Before / After in dark mode

profiler-example-comparison-dark-mode

Header

profiler-before-after-1

profiler-before-after-2

Sidebar menu

profiler-before-after-3

The icons are from this project: https://github.com/tabler/tabler-icons. There are MIT licensed so I added their license as a file inside the icon directory.

Design efficiency

profiler-before-after-4

profiler-before-after-5

File source viewer

profiler-before-after-6

Toolbar

profiler-before-after-7

Commits

45c15f60c7 [WebProfilerBundle] Profiler redesign

Removed unused the $event parameter of onKernelFinishRequest from RouterListener.

[FrameworkBundle] Allow secrets vaults to be used directly outside Symfony

feature #47445 [FrameworkBundle] Allow secrets vaults to be used directly outside Symfony (AndreasA)

This PR was squashed before being merged into the 6.2 branch.

Discussion

[FrameworkBundle] Allow secrets vaults to be used directly outside Symfony

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

This PR removes the internal tag from the secrets vaults.

This allows developers to use them directly without the need to use Symfony config etc. They still have to install the whole framework bundle but that just means an overhead during download, they are still able to directly instantiate the vault using new SodiumVault(....) for instance.

Furthermore, by removing internal from the AbstractVault, it is possible to add a custom vault and specify it replacing the secrets.vault service for instance.

See ticket: https://github.com/symfony/symfony/issues/44151 and previous PR: https://github.com/symfony/symfony/pull/45571

Commits

df953f038e [FrameworkBundle] Allow secrets vaults to be used directly outside Symfony

[Security] Allow configuring a redirect url via route name when switching user

Add a ChainUserChecker to allow calling multiple user checkers for a firewall

[HttpKernel] Update DebugLoggerInterface::getLogs PHPDoc

Created at 29 minutes ago

Dont allow generating proxies for readonly classes

Created at 1 hour ago
pull request opened
Don't allow generating proxies for readonly classes

Readonly classes cannot be proxied, let's reject them early on before we start generating broken proxies for them.

Created at 1 hour ago
create branch
nicolas-grekas create branch no-readonly
Created at 1 hour ago

[FrameworkBundle] Fix tests

Merge branch '5.4' into 6.0

  • 5.4: [FrameworkBundle] Fix tests

Merge branch '6.0' into 6.1

  • 6.0: [FrameworkBundle] Fix tests

Merge branch '6.1' into 6.2

  • 6.1: [FrameworkBundle] Fix tests

[VarExporter] fix ProxyHelper::exportDefault() (nth)

Created at 15 hours ago

[FrameworkBundle] Fix tests

Merge branch '5.4' into 6.0

  • 5.4: [FrameworkBundle] Fix tests

Merge branch '6.0' into 6.1

  • 6.0: [FrameworkBundle] Fix tests
Created at 15 hours ago
issue comment
Add constants for RFC 8631 to WebLink component

Good idea. Up to end a PR to add them?

Created at 15 hours ago

[FrameworkBundle] Fix tests

Merge branch '5.4' into 6.0

  • 5.4: [FrameworkBundle] Fix tests
Created at 16 hours ago

[FrameworkBundle] Fix tests

Created at 16 hours ago
issue comment
Undefined constant shown

Also handled in https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/VarExporter/ProxyHelper.php#L218 for inspiration.

Created at 16 hours ago
closed issue
Translator commands scan source files multiple times [Translation]

Symfony version(s) affected

5.3.99

Description

The translation commands scan the same files multiple times. In a large project with multiple locales this process takes more than 30 minutes to complete

How to reproduce

I created a reproducer that simply consists of a controller action that has the Translator component autowired https://github.com/E-M-P-I-R-E/bug-symfony-container-reproducer

Both of the two translation commands are affected

bin/console translation:update en --force
bin/console debug:translation en

When adding a dump() statement on line 142 in vendor\symfony\translation\Extractor\PhpExtractor.php I see that the controller is parsed twice

filename: "ContainerTestController.php" ... filename: "ContainerTestController.php"

Possible Solution

It appears that (since translator is injected) the controller is being selected to be parsed by this class that populates the commands' constructor $codePaths argument: vendor\symfony\translation\DependencyInjection\TranslatorPathsPass.php

The commands also add the src directory to the $codePaths to be parsed. There was some discussion in #40229 about whether that should be hardcoded. This seems to be the reason it's scanned twice. I don't understand the need for scanning the entire src directory when the TranslatorPathsPass already selects all classes that include TranslatorInterface

Perhaps @yceruto or @natewiebe13 have some insight about this behavior

Additional Context

As a work around to skip parsing source files entirely and only scan templates it is possible to provide a path to the bundle argument ex.

bin/console translation:update en /path/to/project --force
                                    
Created at 16 hours ago

[FrameworkBundle] Fix a phpdoc in mailer assertions

bug #47614 [FrameworkBundle] Fix a phpdoc in mailer assertions (HeahDude)

This PR was merged into the 4.4 branch.

Discussion

[FrameworkBundle] Fix a phpdoc in mailer assertions

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

Commits

519f3a3449 [FrameworkBundle] Fix a phpdoc in mailer assertions

Run composer with --ignore-platform-req=php+

minor #47620 [FrameworkBundle] Run composer with --ignore-platform-req=php+ (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion

[FrameworkBundle] Run composer with --ignore-platform-req=php+

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

Commits

b53b44845b Run composer with --ignore-platform-req=php+

Fix AbstractFormLoginAuthenticator return types (fixes #47571).

Children of AbstractFormLoginAuthenticator should be allowed to return a Response instead of being required to return a RedirectResponse. This change matches the return types in the newer AbstractLoginFormAuthenticator.

bug #47578 [Security] Fix AbstractFormLoginAuthenticator return types (AndrolGenhald)

This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion

[Security] Fix AbstractFormLoginAuthenticator return types

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47571 | License | MIT | Doc PR | NA

Children of AbstractFormLoginAuthenticator should be allowed to return a Response instead of being required to return a RedirectResponse. This change matches the return types in the newer AbstractLoginFormAuthenticator.

Not sure if tests are needed for this, but if they're desired I could use a bit of direction on how to go about it, since it's really only an issue for static analysis.

Commits

3882065ef6 Fix AbstractFormLoginAuthenticator return types (fixes #47571).

Bugfix: add \UnitEnum as a result of get() method

bug #47635 [DependencyInjection] EnvPlaceholderParameterBag::get() can't return UnitEnum (jack.shpartko)

This PR was submitted for the 6.1 branch but it was merged into the 6.0 branch instead.

Discussion

[DependencyInjection] EnvPlaceholderParameterBag::get() can't return UnitEnum

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

This PR allows to get enums from container in the next situation:

parameters:
    app.someEnum.yes !php/const \App\Context\SomeEnum::YES

Currently, we'll have an error:

[critical] Uncaught Error: Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag::get(): Return value must be of type array|string|int|float|bool|null, \App\Context\SomeEnum returned

This bugfix fixes this error.

EnvPlaceholderParameterBag::get() has a signature: array|bool|string|int|float|null ParameterBag::get() has another signature: array|bool|string|int|float|\UnitEnum|null

Why do we need this fix? To make the results of two dependent methods consistent.

EnvPlaceholderParameterBag::get() call ParameterBag::get() here: https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php#L61

This PR makes it consistent and adding UnitEnum to EnvPlaceholderParameterBag::get() result.

Commits

bd865f7f68 Bugfix: add \UnitEnum as a result of get() method

Correct compare float data

[Ldap] Do not run ldap_set_option on failed connection

bug #47547 [Ldap] Do not run ldap_set_option on failed connection (tatankat)

This PR was squashed before being merged into the 4.4 branch.

Discussion

[Ldap] Do not run ldap_set_option on failed connection

| Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT

ldap_set_option should only be called on null (first time setOption is run) or on an LDAP\Connection instance. When ldap_connect fails, it returns a boolean. ldap_set_option fails on this, which results in an early TypeError instead of the LdapException with the real issue: 'Could not connect to Ldap server'. So, the result of ldap_connect should be checked earlier.

Commits

8f4f2b1e58 [Ldap] Do not run ldap_set_option on failed connection

minor #47704 [Stopwatch] Correct compare float data in tests (Peter Gribanov)

This PR was merged into the 4.4 branch.

Discussion

[Stopwatch] Correct compare float data in tests

| Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT

Fix erorr in unit tests

1) Symfony\Component\Stopwatch\Tests\StopwatchPeriodTest::testGetDuration with data set #8 (2.71, 3.14, true, 0.43)
Failed asserting that 0.43000000000000016 is identical to 0.43.

Commits

b02e25151f Correct compare float data

Merge branch '4.4' into 5.4

  • 4.4: [Ldap] Do not run ldap_set_option on failed connection Correct compare float data Fix AbstractFormLoginAuthenticator return types (fixes #47571). Run composer with --ignore-platform-req=php+ [FrameworkBundle] Fix a phpdoc in mailer assertions

[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

bug #45554 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder (siganushka)

This PR was merged into the 5.4 branch.

Discussion

[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

Fixed framework.serializer.default_context is not working for JsonEncoder

like XmlEncoder or DateTimeNormalizer, the array $defaultContext argument bindings from SerializerPass, but not working for JsonEncoder, I added array $defaultContext argument and passed to JsonEncode and JsonDecode.

https://github.com/symfony/serializer/blob/5.4/DependencyInjection/SerializerPass.php#L69-L75

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no

Commits

a76016aba7 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

[Form] fix tests

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

bug #47695 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path (natewiebe13)

This PR was squashed before being merged into the 5.4 branch.

Discussion

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Partially Fixes #45645 | License | MIT | Doc PR | N/A

It was possible to end up with duplicated paths which would could result in many files being scanned more than once. This prevents that.

Commits

459ac042a9 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path

[VarExporter] fix ProxyHelper::exportDefault()

[FrameworkBundle] fix merge

Created at 16 hours ago

[FrameworkBundle] Fix a phpdoc in mailer assertions

bug #47614 [FrameworkBundle] Fix a phpdoc in mailer assertions (HeahDude)

This PR was merged into the 4.4 branch.

Discussion

[FrameworkBundle] Fix a phpdoc in mailer assertions

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

Commits

519f3a3449 [FrameworkBundle] Fix a phpdoc in mailer assertions

Run composer with --ignore-platform-req=php+

minor #47620 [FrameworkBundle] Run composer with --ignore-platform-req=php+ (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion

[FrameworkBundle] Run composer with --ignore-platform-req=php+

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

Commits

b53b44845b Run composer with --ignore-platform-req=php+

Fix AbstractFormLoginAuthenticator return types (fixes #47571).

Children of AbstractFormLoginAuthenticator should be allowed to return a Response instead of being required to return a RedirectResponse. This change matches the return types in the newer AbstractLoginFormAuthenticator.

bug #47578 [Security] Fix AbstractFormLoginAuthenticator return types (AndrolGenhald)

This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion

[Security] Fix AbstractFormLoginAuthenticator return types

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47571 | License | MIT | Doc PR | NA

Children of AbstractFormLoginAuthenticator should be allowed to return a Response instead of being required to return a RedirectResponse. This change matches the return types in the newer AbstractLoginFormAuthenticator.

Not sure if tests are needed for this, but if they're desired I could use a bit of direction on how to go about it, since it's really only an issue for static analysis.

Commits

3882065ef6 Fix AbstractFormLoginAuthenticator return types (fixes #47571).

Bugfix: add \UnitEnum as a result of get() method

bug #47635 [DependencyInjection] EnvPlaceholderParameterBag::get() can't return UnitEnum (jack.shpartko)

This PR was submitted for the 6.1 branch but it was merged into the 6.0 branch instead.

Discussion

[DependencyInjection] EnvPlaceholderParameterBag::get() can't return UnitEnum

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

This PR allows to get enums from container in the next situation:

parameters:
    app.someEnum.yes !php/const \App\Context\SomeEnum::YES

Currently, we'll have an error:

[critical] Uncaught Error: Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag::get(): Return value must be of type array|string|int|float|bool|null, \App\Context\SomeEnum returned

This bugfix fixes this error.

EnvPlaceholderParameterBag::get() has a signature: array|bool|string|int|float|null ParameterBag::get() has another signature: array|bool|string|int|float|\UnitEnum|null

Why do we need this fix? To make the results of two dependent methods consistent.

EnvPlaceholderParameterBag::get() call ParameterBag::get() here: https://github.com/symfony/symfony/blob/6.1/src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php#L61

This PR makes it consistent and adding UnitEnum to EnvPlaceholderParameterBag::get() result.

Commits

bd865f7f68 Bugfix: add \UnitEnum as a result of get() method

Correct compare float data

[Ldap] Do not run ldap_set_option on failed connection

bug #47547 [Ldap] Do not run ldap_set_option on failed connection (tatankat)

This PR was squashed before being merged into the 4.4 branch.

Discussion

[Ldap] Do not run ldap_set_option on failed connection

| Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT

ldap_set_option should only be called on null (first time setOption is run) or on an LDAP\Connection instance. When ldap_connect fails, it returns a boolean. ldap_set_option fails on this, which results in an early TypeError instead of the LdapException with the real issue: 'Could not connect to Ldap server'. So, the result of ldap_connect should be checked earlier.

Commits

8f4f2b1e58 [Ldap] Do not run ldap_set_option on failed connection

minor #47704 [Stopwatch] Correct compare float data in tests (Peter Gribanov)

This PR was merged into the 4.4 branch.

Discussion

[Stopwatch] Correct compare float data in tests

| Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT

Fix erorr in unit tests

1) Symfony\Component\Stopwatch\Tests\StopwatchPeriodTest::testGetDuration with data set #8 (2.71, 3.14, true, 0.43)
Failed asserting that 0.43000000000000016 is identical to 0.43.

Commits

b02e25151f Correct compare float data

Merge branch '4.4' into 5.4

  • 4.4: [Ldap] Do not run ldap_set_option on failed connection Correct compare float data Fix AbstractFormLoginAuthenticator return types (fixes #47571). Run composer with --ignore-platform-req=php+ [FrameworkBundle] Fix a phpdoc in mailer assertions

[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

bug #45554 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder (siganushka)

This PR was merged into the 5.4 branch.

Discussion

[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

Fixed framework.serializer.default_context is not working for JsonEncoder

like XmlEncoder or DateTimeNormalizer, the array $defaultContext argument bindings from SerializerPass, but not working for JsonEncoder, I added array $defaultContext argument and passed to JsonEncode and JsonDecode.

https://github.com/symfony/serializer/blob/5.4/DependencyInjection/SerializerPass.php#L69-L75

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no

Commits

a76016aba7 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

[Form] fix tests

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

bug #47695 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path (natewiebe13)

This PR was squashed before being merged into the 5.4 branch.

Discussion

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Partially Fixes #45645 | License | MIT | Doc PR | N/A

It was possible to end up with duplicated paths which would could result in many files being scanned more than once. This prevents that.

Commits

459ac042a9 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path

[FrameworkBundle] fix merge

Merge branch '5.4' into 6.0

  • 5.4: [FrameworkBundle] fix merge [FrameworkBundle] Filter out trans paths that are covered by a parent folder path [Form] fix tests [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder [Ldap] Do not run ldap_set_option on failed connection Correct compare float data Fix AbstractFormLoginAuthenticator return types (fixes #47571). Run composer with --ignore-platform-req=php+ [FrameworkBundle] Fix a phpdoc in mailer assertions
Created at 16 hours ago

[DI] fix tests

Created at 16 hours ago

[FrameworkBundle] Fix a phpdoc in mailer assertions

bug #47614 [FrameworkBundle] Fix a phpdoc in mailer assertions (HeahDude)

This PR was merged into the 4.4 branch.

Discussion

[FrameworkBundle] Fix a phpdoc in mailer assertions

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

Commits

519f3a3449 [FrameworkBundle] Fix a phpdoc in mailer assertions

Run composer with --ignore-platform-req=php+

minor #47620 [FrameworkBundle] Run composer with --ignore-platform-req=php+ (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion

[FrameworkBundle] Run composer with --ignore-platform-req=php+

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

Commits

b53b44845b Run composer with --ignore-platform-req=php+

Fix AbstractFormLoginAuthenticator return types (fixes #47571).

Children of AbstractFormLoginAuthenticator should be allowed to return a Response instead of being required to return a RedirectResponse. This change matches the return types in the newer AbstractLoginFormAuthenticator.

bug #47578 [Security] Fix AbstractFormLoginAuthenticator return types (AndrolGenhald)

This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion

[Security] Fix AbstractFormLoginAuthenticator return types

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #47571 | License | MIT | Doc PR | NA

Children of AbstractFormLoginAuthenticator should be allowed to return a Response instead of being required to return a RedirectResponse. This change matches the return types in the newer AbstractLoginFormAuthenticator.

Not sure if tests are needed for this, but if they're desired I could use a bit of direction on how to go about it, since it's really only an issue for static analysis.

Commits

3882065ef6 Fix AbstractFormLoginAuthenticator return types (fixes #47571).

Correct compare float data

[Ldap] Do not run ldap_set_option on failed connection

bug #47547 [Ldap] Do not run ldap_set_option on failed connection (tatankat)

This PR was squashed before being merged into the 4.4 branch.

Discussion

[Ldap] Do not run ldap_set_option on failed connection

| Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT

ldap_set_option should only be called on null (first time setOption is run) or on an LDAP\Connection instance. When ldap_connect fails, it returns a boolean. ldap_set_option fails on this, which results in an early TypeError instead of the LdapException with the real issue: 'Could not connect to Ldap server'. So, the result of ldap_connect should be checked earlier.

Commits

8f4f2b1e58 [Ldap] Do not run ldap_set_option on failed connection

minor #47704 [Stopwatch] Correct compare float data in tests (Peter Gribanov)

This PR was merged into the 4.4 branch.

Discussion

[Stopwatch] Correct compare float data in tests

| Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT

Fix erorr in unit tests

1) Symfony\Component\Stopwatch\Tests\StopwatchPeriodTest::testGetDuration with data set #8 (2.71, 3.14, true, 0.43)
Failed asserting that 0.43000000000000016 is identical to 0.43.

Commits

b02e25151f Correct compare float data

Merge branch '4.4' into 5.4

  • 4.4: [Ldap] Do not run ldap_set_option on failed connection Correct compare float data Fix AbstractFormLoginAuthenticator return types (fixes #47571). Run composer with --ignore-platform-req=php+ [FrameworkBundle] Fix a phpdoc in mailer assertions

[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

bug #45554 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder (siganushka)

This PR was merged into the 5.4 branch.

Discussion

[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

Fixed framework.serializer.default_context is not working for JsonEncoder

like XmlEncoder or DateTimeNormalizer, the array $defaultContext argument bindings from SerializerPass, but not working for JsonEncoder, I added array $defaultContext argument and passed to JsonEncode and JsonDecode.

https://github.com/symfony/serializer/blob/5.4/DependencyInjection/SerializerPass.php#L69-L75

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no

Commits

a76016aba7 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder

[Form] fix tests

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

bug #47695 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path (natewiebe13)

This PR was squashed before being merged into the 5.4 branch.

Discussion

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Partially Fixes #45645 | License | MIT | Doc PR | N/A

It was possible to end up with duplicated paths which would could result in many files being scanned more than once. This prevents that.

Commits

459ac042a9 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path

[FrameworkBundle] fix merge

Merge branch '5.4' into 6.0

  • 5.4: [FrameworkBundle] fix merge [FrameworkBundle] Filter out trans paths that are covered by a parent folder path [Form] fix tests [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder [Ldap] Do not run ldap_set_option on failed connection Correct compare float data Fix AbstractFormLoginAuthenticator return types (fixes #47571). Run composer with --ignore-platform-req=php+ [FrameworkBundle] Fix a phpdoc in mailer assertions
Created at 16 hours ago

[FrameworkBundle] fix merge

Created at 16 hours ago
issue comment
Translator commands scan source files multiple times [Translation]

Now that #47695 is merged, shall we close here? :)

Created at 16 hours ago
pull request closed
[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Partially Fixes #45645 | License | MIT | Doc PR | N/A

It was possible to end up with duplicated paths which would could result in many files being scanned more than once. This prevents that.

Created at 16 hours ago

[Form] fix tests

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

bug #47695 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path (natewiebe13)

This PR was squashed before being merged into the 5.4 branch.

Discussion

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

| Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Partially Fixes #45645 | License | MIT | Doc PR | N/A

It was possible to end up with duplicated paths which would could result in many files being scanned more than once. This prevents that.

Commits

459ac042a9 [FrameworkBundle] Filter out trans paths that are covered by a parent folder path

Created at 16 hours ago

[FrameworkBundle] Filter out trans paths that are covered by a parent folder path

Created at 16 hours ago