This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] Remove legacy code related to getExtendedType() method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Ref: https://github.com/symfony/symfony/pull/24530
Commits
-------
208b729bca Remove legacy code related to getExtendedType() method
* 4.4:
[Intl] Improve the error message when country code is wrong
Fix tests
[Intl][4.3] Cleanup internal api
[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
bumped Symfony version to 4.2.10
updated VERSION for 4.2.9
updated CHANGELOG for 4.2.9
Use AsserEquals for floating-point values
* 4.3:
[Intl] Improve the error message when country code is wrong
Fix tests
[Intl][4.3] Cleanup internal api
[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
bumped Symfony version to 4.2.10
updated VERSION for 4.2.9
updated CHANGELOG for 4.2.9
Use AsserEquals for floating-point values
* 4.2:
[HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping
bumped Symfony version to 4.2.10
updated VERSION for 4.2.9
updated CHANGELOG for 4.2.9
Use AsserEquals for floating-point values
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Serializer] Remove CsvEncoder "as_collection" deprecation & change default value
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes (AppVeyor failure unrelated. See https://github.com/symfony/symfony/pull/31685/files) <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27715 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
As planned in #27715
Commits
-------
22dd071b03 [Serializer] Remove CsvEncoder "as_collection" deprecation & change default value
This PR was merged into the 4.3 branch.
Discussion
----------
Fix tests
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31638
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
733f017904 Fix tests
This PR was merged into the 5.0-dev branch.
Discussion
----------
[5.0] Update CHANGELOG.md
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
6183d2b84c [5.0] Update CHANGELOG.md
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Serializer] Throw exception on invalid normalizers/encoders passed to Serializer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27819 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
As planned in #27819
Commits
-------
5ab6ad409d [Serializer] Throw exception on invalid normalizers/encoders passed to Serializer
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Form] Remove deprecated implementation of ChoiceLoaderInterface in intl forms
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See previous PR https://github.com/symfony/symfony/pull/26825 (4.1)
Commits
-------
b22cbf41c0 Remove deprecated implementation of ChoiceLoaderInterface in intl forms
This PR was merged into the 5.0-dev branch.
Discussion
----------
Remove dead code
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
cleanup
Commits
-------
ceb83e6898 Remove dead code
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Messenger] minor: Remove logging middleware
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11619 <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Removes the LoggingMiddlewere
Commits
-------
2e6fbd5210 [Messenger] minor: Remove logging middleware
This PR was squashed before being merged into the 5.0-dev branch (closes#31671).
Discussion
----------
[Intl] Cleanup legacy API
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
67105d24e6 [Intl] Cleanup legacy API
This PR was merged into the 5.0-dev branch.
Discussion
----------
[HttpKernel] Cleanup legacy in ConfigDataCollector
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
See #28939
Commits
-------
09ca33cde4 [HttpKernel] Cleanup legacy in ConfigDataCollector
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Remove DateTime support in date/time validators
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
See #25015
Commits
-------
37c1cbbed3 [Validator] Remove DateTime support in date/time validators
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Remove fallback dependency checks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
See #28644
Commits
-------
aa84cfdb7b [Validator] Remove fallback dependency checks
This PR was merged into the 5.0-dev branch.
Discussion
----------
[Validator] Remove checkDNS option in Url
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
See #25516
Commits
-------
885703f189 [Validator] Remove checkDNS option in Url
This PR was merged into the 5.0-dev branch.
Discussion
----------
[TwigBundle] Remove default value deprecation for twig.strict_variables option
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See previous PR in 4.1 https://github.com/symfony/symfony/pull/25780
Commits
-------
83207370cb Remove default value deprecation for twig.strict_variables
* 4.4:
bumped Symfony version to 4.3.0
updated VERSION for 4.3.0-RC1
updated CHANGELOG for 4.3.0-RC1
Create an abstract HTTP transport and extend it in all HTTP transports
Updated "experimental" annotations for 4.3
* 4.3:
bumped Symfony version to 4.3.0
updated VERSION for 4.3.0-RC1
updated CHANGELOG for 4.3.0-RC1
Create an abstract HTTP transport and extend it in all HTTP transports
Updated "experimental" annotations for 4.3
Currently BinaryFileResponse, when configured with X-Accel-Redirect sendfile type,
will only substitute file paths specified in X-Accel-Mapping. But if the provided
file path does not have a defined prefix, then the resulting header will include
the absolute path. Nginx expects a valid URI, therefore this will result in an
issue that is very hard to detect and debug as it will not show up in error logs
and instead the request would just hang for some time and then be re-served
without query parameters(?).
This PR was merged into the 4.3 branch.
Discussion
----------
Create an abstract HTTP transport and extend it in all HTTP transports
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Right now when you try to use an HTTP transport e.g. Mailgun w/o HTTP client installed - the error message is:
> Attempted to load class "HttpClient" from namespace "Symfony\Component\HttpClient".
Did you forget a "use" statement for "Http\Client\HttpClient"?
Not clear enough about what to do. After this PR the error message will be:
> You cannot use "Symfony\Component\Mailer\Bridge\Mailgun\Http\MailgunTransport" as the HttpClient component is not installed. Try running "composer require symfony/http-client".
Actually, we already have a similar check for API:
2c9a1960a1/src/Symfony/Component/Mailer/Transport/Http/Api/AbstractApiTransport.php (L37-L44)
Commits
-------
3c8d63ca82 Create an abstract HTTP transport and extend it in all HTTP transports
Use AssertEquals for these two specific case will do a better job,
since it'll convert both '0.1' and result of `getContent()` into PHP's
internal representation of floating-point and compares them and it should be fine.
Using `AssertSame` for this tests brings floating-point serialization
into consideration which of course will be php.ini specific.
In order not missing the type assertion point that `AssertSame` does,
we also perform `assertInternalType('string'...`
Sponsored-by: Platform.sh
* 4.3:
[HttpClient] make $response->getInfo('debug') return extended logs about the HTTP transaction
fix typo
Fixes a small doc blocks syntax error
Small grammar mistake in documentation
[Messenger] Use real memory usage for --memory-limit
[Workflow] Do not trigger extra guard
* 4.2:
fix typo
Fixes a small doc blocks syntax error
Small grammar mistake in documentation
[Messenger] Use real memory usage for --memory-limit
[Workflow] Do not trigger extra guard
This PR was merged into the 3.4 branch.
Discussion
----------
FragmentListener - fix typo in annotation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Just a small typo I've found in fragment listener :)
Commits
-------
b6ff836a49 fix typo
* 4.3:
[Messenger] Disable the SchemaAssetsFilter when setup the transport
[Messenger] Fix missing auto_setup for RedisTransport
[Contracts] split in one package per sub-contracts
This PR was merged into the 4.3 branch.
Discussion
----------
[Contracts] split in one package per sub-contracts
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31567
| License | MIT
| Doc PR | -
Commits
-------
f410691842 [Contracts] split in one package per sub-contracts
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Disable the SchemaAssetsFilter when setup the transport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31623
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
8cbb8f89ad [Messenger] Disable the SchemaAssetsFilter when setup the transport
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix missing auto_setup for RedisTransport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Should be my last PR for messenger 4.3's Redis transport :)
Not having it makes it inconsistent with other transports and is especially annoying in tests.
Commits
-------
d27bc2a87d [Messenger] Fix missing auto_setup for RedisTransport
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] Do not trigger extra guards
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31582
| License | MIT
| Doc PR |
---
With this patch, guards are executed only on wanted transitions
**Note for merger**: This is already fixed (in a different manner) in 4.2, So this patch should not be included in 4.2, instead take: #31585 or discard changes of Workflow class but keep tests
Commits
-------
ad0619748e [Workflow] Do not trigger extra guard
* 4.3:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 4.2:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 3.4:
[github] Implement the new security policy.
[Finder] fix wrong method call casing
Make tempfile path unique
minor: fix phpdocs in the ldap component
[Process] Fix infinite waiting for stopped process
Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
fix phpdoc
[DI] fix using bindings with locators of service subscribers
* 4.3: (22 commits)
[Messenger] Fix incorrect error when symfony/serializer is missing
Allow WrappedListener to describe uncallable listeners.
[HttpClient] fix handling exceptions thrown before first mock chunk
[Filesystem] fix wrong method call casing
[HttpClient] fix test
[Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector
Don't reference symfony/security
[HttpClient] display proper error message on TransportException when curl is used
[FrameworkBundle] fix named autowiring aliases for TagAwareCacheInterface
[Cache] improve logged messages
[FrameworkBundle] improve cs
[Mime][HttpFoundation] Added mime type audio/x-hx-aac-adts
bumped Symfony version to 4.3.0
updated VERSION for 4.3.0-BETA2
updated CHANGELOG for 4.3.0-BETA2
[HttpClient] Only use CURLMOPT_MAX_HOST_CONNECTIONS & CURL_VERSION_HTTP2 if defined
[Security] fixed a fatal error when upgrading from 4.2
[HttpClient] Allow arrays as query parameters
Throws UnrecoverableMessageHandlingException when passed invalid entity manager name for Doctrine middlewares
[Messenger] Make redis Connection::get() non blocking by default
...
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix handling exceptions thrown before first mock chunk
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Discovered while fixing a 60s timeout on a test case, which this fixes too.
Commits
-------
812b0172f4 [HttpClient] fix handling exceptions thrown before first mock chunk
This PR was merged into the 4.3 branch.
Discussion
----------
Allow WrappedListener to describe uncallable listeners
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31493
| License | MIT
| Doc PR | N/A
This is a follow-up to #31493. The previous PR did not fix the problem completely. We also need to make sure that a listener that is not callable is not passed to `Closure::fromCallable()`.
Note: It would probably be a good idea to give the developer a hint about uncallable listeners. Currently, such a listener causes an exception at the worst possible point of time: when collecting the profile information. This breaks the toolbar without any helpful feedback, as I've described [here](https://github.com/symfony/symfony/pull/31493#issuecomment-492921480).
This PR allows the `WrappedListener` class to describe a listener for the profiler even if the listener is not callable, which was the behavior in Symfony 4.2.
Commits
-------
bc3f598bfe Allow WrappedListener to describe uncallable listeners.
Every now and then you are confronted with an exception in Symfony's debug mode. Sometimes, you will see this in your browser console or terminal. To make it easier to easily see what's going on, this change adds a HTML comment on 2 locations:
- before the `<html>` tag;
- after the `</html>` tag.
This way, you don't have to scan the very verbose HTML that Symfony generates. You can quickly glance at the end or the beginning.
The temp-file that the test currently creates is `/tmp/log`.
This may exist on many platforms already (including `platform.sh` app containers).
With the proposed patch way the collision will be less likely.
Sponsored-by: Platform.sh
This PR was merged into the 4.3 branch.
Discussion
----------
[FrameworkBundle] fix named autowiring aliases for TagAwareCacheInterface
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Doing a demo today, I realized that named autowiring aliases are missing for `TagAwareCacheInterface`, and that existing ones point to the wrong service. Here is the fix.
Commits
-------
d9082c2ae4 [FrameworkBundle] fix named autowiring aliases for TagAwareCacheInterface
This PR was merged into the 4.3 branch.
Discussion
----------
[Cache] improve logged messages
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This was improved already in #31395, but the patch was incomplete.
This PR fixes this.
Commits
-------
257f3f176e [Cache] improve logged messages
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] Use absolute URL for profiler links
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Generate absolute URL's so you can have a different (sub)domain for the profiler and the controller that uses it.
Also uses the link which the controller generated instead of always generating a new link in Twig. The changes shouldn't inpact normal behavior.
Commits
-------
13ee1fa2b7 Use absolute URL for when the profiler's domain differs from the controller's domain which initialises the profiler.
This PR was squashed before being merged into the 4.4-dev branch (closes#31437).
Discussion
----------
[Cache] Add Redis Sentinel support
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#11545
This change adds support for Redis Sentinel clusters to the Cache component Redis adapter.
The DSN format is syntactically equivalent to cluster support, but adds a new parameter `redis_sentinel` that should be set to the sentinel service name.
This support requires the use of predis as the underlying connection library. The redis extension does not support sentinel at this time.
Commits
-------
80e8b21525 [Cache] Add Redis Sentinel support
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix using bindings with locators of service subscribers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted during the workshop in Sao Paulo, with @tsantos84, @andreia and others :)
Commits
-------
7146b95303 [DI] fix using bindings with locators of service subscribers
This PR was squashed before being merged into the 3.4 branch (closes#31568).
Discussion
----------
[Process] Fix infinite waiting for stopped process
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31548
| License | MIT
### Description
Add a regression test `Symfony\Component\Process\Tests\ProcessTest:testWaitStoppedDeadProcess` to reproduce the related bug #31548 . It consists of one file `ErrorProcessInitiator.php`, which executes as another process because otherwise if `Process::wait()` goes in an infinite loop (which is test checks) it will be impossible to handle it and stop test correctly.
The second commit contains bug fix, which is only `$this->checkTimeout();` call, that prevents infinite loop.
Commits
-------
6b9ee1e1c5 [Process] Fix infinite waiting for stopped process
This PR was merged into the 4.4-dev branch.
Discussion
----------
[DI] deprecate short callables in yaml
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11589
This deprecates defining factories as `foo:method` instead of `['@foo', 'method']` in yaml.
This is confusing syntax and misses the opportunity to raise an error when one does a typo and uses a single colon instead of two.
This basically reverts #19190
Commits
-------
f8a04fdda6 [DI] deprecate short callables in yaml
- CURLMOPT_MAX_HOST_CONNECTIONS is available since PHP 7.0.7 and cURL 7.30.0
- CURL_VERSION_HTTP2 is available since PHP 5.5.24 and 5.6.8 and cURL 7.33.0
This PR was merged into the 4.3 branch.
Discussion
----------
[Ldap] add a test on parsing the rdn
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
One more test on the rdn directly.
- [x] When #31552 has been merged this one needs to be rebased.
Commits
-------
0abe32b085 [Ldap] add a test on parsing the rdn
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger][DoctrineBridge] Throws UnrecoverableMessageHandlingException when passed invalid entity manager name
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | not sure
| Deprecations? | no
| Tests pass? | Waiting for Travis
| Fixed tickets | -
| License | MIT
| Doc PR | -
1. Throws `UnrecoverableMessageHandlingException` and do not retry messages if middlewares missconfigured
2. `getManager()` doesn't return null. Actually [it throws](https://github.com/doctrine/persistence/blob/master/lib/Doctrine/Persistence/AbstractManagerRegistry.php#L144-L160) `\InvalidArgumentException` in requested entity manager not exists.
Not sure, should this changes considered as BC-break.
Also I can extract abstract Doctrine middleware but not sure what branch should I use for it? Master or 4.3?
Commits
-------
c4eca27149 Throws UnrecoverableMessageHandlingException when passed invalid entity manager name for Doctrine middlewares
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Add "non sendable" stamps
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31460
| License | MIT
| Doc PR | not needed
Fixes a bug where Symfony serialization of the AmqpReceivedStamp sometimes caused problems.
It's still a mystery why the `AmqpReceivedStamp` caused a segfault *sometimes* when going through the Symfony serializer or the `VarDumper`. But, that stamp really didn't need to be sent on redelivery anyways.
I don't love making the removal the responsibility of the serializers, but it didn't work well anywhere else.
Cheers!
Commits
-------
34e7781c5c Adding a new NonSendableStampInterface to avoid sending certain stamps
* 4.3: (23 commits)
minor: add some test in the ldap component
[Workflow] Update MethodMarkingStore
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
adding experimental note
[HttpClient] add missing argument check
[Messenger] Fix undefined index on read timeout
[Workflow] use method marking store
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
[EventDispatcher] Removed "callable" type hint from WrappedListener constructor
prevent deprecation when filesize matches error code
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[WebProfilerBundle][Form] The form data collector return serialized object when profiler bundle attends object
[Validator] Add the missing translations for the Danish ("da") locale
[PropertyAccess] Add missing property to PropertyAccessor
[Cache] fix saving unrelated keys in recursive callback calls
[Serializer] Fix denormalization of object with variadic constructor typed argument
...
* 4.2:
minor: add some test in the ldap component
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
prevent deprecation when filesize matches error code
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[Validator] Add the missing translations for the Danish ("da") locale
[PropertyAccess] Add missing property to PropertyAccessor
[Cache] fix saving unrelated keys in recursive callback calls
[Serializer] Fix denormalization of object with variadic constructor typed argument
Allow set 'None' on samesite cookie flag
Making cache rebuild correctly with MessageSubscriberInterface return values
Fix finding parent definition
* 3.4:
minor: add some test in the ldap component
[Bridge\ProxyManager] isProxyCandidate() does not take into account interfaces
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
fixed a phpdoc
[Debug] Wrap call to require_once in a try/catch
[PropertyInfo] Add missing documentation link in Readme
Use the current working dir as default first arg in 'link' binary
Respect parent class contract in ContainerAwareDoctrineEventManager
[Validator] Add the missing translations for the Danish ("da") locale
[Serializer] Fix denormalization of object with variadic constructor typed argument
Allow set 'None' on samesite cookie flag
This PR was merged into the 3.4 branch.
Discussion
----------
[Ldap] add a test to getResources and binding
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
We could add more unit tests, but this is a beginning.
Commits
-------
d08f195502 minor: add some test in the ldap component
This PR was squashed before being merged into the 4.3 branch (closes#31536).
Discussion
----------
[Workflow] Update MethodMarkingStore
| Q | A
| ------------- | ---
| Branch? | 4.3 (related to deprecation of single/multiple marking store)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | .
| License | MIT
| Doc PR | already documented
Minor fix
Commits
-------
c8636523d3 [Workflow] Update MethodMarkingStore
This PR was merged into the 4.3 branch.
Discussion
----------
[Workflow] use method marking store
| Q | A
| ------------- | ---
| Branch? | 4.3 (related to deprecation of single/multiple marking store)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | .
| License | MIT
| Doc PR | already documented
I think the deprecation of old marking store, the single one in the statemachine, was not patched here
Or did i miss something?
Thank you
Cc @lyrixx
Commits
-------
a2191678b7 [Workflow] use method marking store
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] adding experimental disclaimer in readme
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Mailer Component is marked as experimental in code, but not in readme.
got confused while checking the readme files of the new components
Commits
-------
5175f6fffc adding experimental note
When using factories it's common best practice to use interface as class name, especially in cases
where you know impl can differ. Before this fix ProxyManager did not allow these to be lazy.
In our case this has lead several to hard to debug issues on classes we need to mark as lazyi
and often a need to add lazy on decorators if there are any or other workarounds.
As we have had this issue, and still have on both 2.8 and 3.4 this is opened against 2.8.
This PR was merged into the 3.4 branch.
Discussion
----------
[Doctrine] Respect parent class contract in ContainerAwareEventManager
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, failures looks unrelated
| Fixed tickets | #31051
| License | MIT
| Doc PR | -
According to method signature of [original EventManager](https://github.com/doctrine/event-manager/blob/master/lib/Doctrine/Common/EventManager.php#L50) `getListeners` method should return array of initialized objects but now it returns array of strings of listener service names.
Commits
-------
42d62721fd Respect parent class contract in ContainerAwareDoctrineEventManager
This PR was squashed before being merged into the 3.4 branch (closes#31421).
Discussion
----------
[Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
If controller, or one of its methods, contain a unicode character and you run:
```
./bin/console debug:router
```
you get this:
![Zrzut ekranu 2019-05-8 o 14 00 48](https://user-images.githubusercontent.com/35422131/57374545-71863080-719b-11e9-999e-fe0a5051c089.png)
This PR fixes it into this:
![Zrzut ekranu 2019-05-8 o 14 00 59](https://user-images.githubusercontent.com/35422131/57374616-92e71c80-719b-11e9-9d13-5370213c22f7.png)
Commits
-------
7ab52d3c36 [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name
This PR was merged into the 4.3 branch.
Discussion
----------
[EventDispatcher] Removed "callable" type hint from WrappedListener constructor
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
### The problem
```php
public function __construct(callable $listener, ?string $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null)
```
The *callable* type hint will cause the following exception if you register a listener class with a method, which could not be auto-guessed by the Symfony:
`Argument 1 passed to Symfony\Component\EventDispatcher\Debug\WrappedListener::__construct() must be callable, array given`
The debug toolbar will not be displayed in this case.
This is because PHP is checking the array first before making a decision if this is a valid callable or not. So if the second array element does not represent an existing method in object from the first element - PHP will treat this as a common array, not callable. Use `is_callable` method if you need a proof.
### How to reproduce
1. Register some listener with a method, which could not be auto-guessed by Symfony
2. Do not create the `__invoke` method in the listener
3. Skip the `method` attribute in the listener configuration
Example:
```php
class SomeListener
{
public function myListenerMethod(SomeEvent $event)
{
// ...
}
}
```
```yaml
App\EventListener\SomeListener:
tags:
-
name: kernel.event_listener
# Symfony will look for "onSomeEvent" method which does not exists.
event: 'some.event'
#method: 'myListenerMethod' # Skip this.
```
### Solution:
Removing the type hint will cause the \Closure::fromCallable() method to throw a proper exception, for example:
`Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Failed to create closure from callable: class 'App\EventListener\SomeListener' does not have a method 'onSomeEvent'`
Commits
-------
20c587fc23 [EventDispatcher] Removed "callable" type hint from WrappedListener constructor
This PR was merged into the 4.3 branch.
Discussion
----------
[WebProfilerBundle][Form] The form data collector return serialized data
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31476 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | not needed <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
This bug occurs because at some point the FormDataCollector was returning serialized data, this has been changed in the upcoming branches but it seems that the bug occurs when using different version of the form component and the WebProfilerBundle.
This bugfix add a conflict param on the WebProfilerBundle to avoid using version of the form component who still serialize the data.
Commits
-------
70fdafd79f [WebProfilerBundle][Form] The form data collector return serialized object when profiler bundle attends object
If the included file contains an error, it hides the real error. This
makes debugging harder.
How to reproduce:
```
composer create-project symfony/skeleton symfony-3.4 3.4
cd symfony-3.4
composer req monolog
```
Add to `monolog.yaml`:
```yaml
elasticsearch:
type: "elasticsearch"
elasticsearch:
host: 'elasticsearch'
port: '9200'
index: 'ep_php_logs_dev'
level: 'debug'
tags: 'monolog.logger'
channels: ['!event']
```
This will fail because the the \Elastica\Client class does not exist.
But this error will be hidden by the `ClassNotFoundFatalErrorHandler`
because it will try to load the `Symfony\Component\Kernel\Client` and
this class extends `Symfony\Component\BrowserKit\Client`. The last one
is a soft dependency...
---
Before
```
Fatal error: Uncaught Error: Class 'Symfony\Component\BrowserKit\Client' not found in /tmp/symfony-3.4/vendor/symfony/http-kernel/Client.php:31
```
After:
```
Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "Client" from namespace "Elastica".
Did you forget a "use" statement for another namespace? in /tmp/symfony-es/var/cache/dev/ContainerWXN4mS9/srcApp_KernelDevDebugContainer.php:303
```
* origin/4.3:
deprecate calling createChildContext without the format parameter
[EventDispatcher] Fix interface name used in error messages
[FrameworkBundle] Add cache configuration for PropertyInfo
Update dependencies in the main component
Drop useless executable bit
[Doctrine][PropertyInfo] Detect if the ID is writeable
Add transport in subscriber's phpdoc
[Validator] Autovalidation: skip readonly props
[DI] default to service id - *not* FQCN - when building tagged locators
[Cache] Log a more readable error message when saving into cache fails
Update WorkflowEvents.php
[Messenger] On failure retry, make message appear received from original sender
[Messenger] remove send_and_handle option which can be achieved with SyncTransport
Fixing tests - passing pdo is not wrapped for some reason in dbal
Changing how RoutableMessageBus fallback bus works
[Serializer] Fix BC break: DEPTH_KEY_PATTERN must be public
[FrameworkBundle] Fixed issue when a parameter container a '%'
Fix the interface incompatibility of EventDispatchers
[TwigBundle] fixed Mailer integration in Twig
[Form] Add intl/choice_translation_locale option to TimezoneType
This PR was merged into the 4.3 branch.
Discussion
----------
Fix the interface incompatibility of EventDispatchers
The `LegacyEventDispatcherProxy` now implements the full
`EventDispatcherInterface` from the `EventDispatcherBundle`.
Before it just implemented the Interface from the `Contracts` Bundle,
that made it incompatible with the `WrappedListener`.
This fixes#31457.
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31457
| License | MIT
| Doc PR | /
Commits
-------
bdeeae1510 Fix the interface incompatibility of EventDispatchers
This PR was merged into the 4.3 branch.
Discussion
----------
[DI] default to service id - *not* FQCN - when building tagged locators
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
While reviewing #30926 I realized that defaulting to the FQCN is a shortcut that isn't useful enough.
Defaulting to the service id provides the same experience in practice because service ids are FQCN by default.
But when they aren't, the service id is the proper index to default to when building the locator.
Commits
-------
52e827c9cf [DI] default to service id - *not* FQCN - when building tagged locators
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Add `from_transport` in subscriber's phpdoc
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | ø
| BC breaks? | ø
| Deprecations? | ø
| Tests pass? | yes
| Fixed tickets | #30958
| License | MIT
| Doc PR | ø
Add the `from_transport` to the subscriber's phpdoc as it was missed from the original PR.
Commits
-------
6a542cd738 Add transport in subscriber's phpdoc
This PR was merged into the 4.3 branch.
Discussion
----------
[Form] Add intl/choice_translation_locale option to TimezoneType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28836
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11503
final step :)
for now i think any form of grouping is a user concern (i.e. by GMT offset or area name); see #31293 + #31295
having a special built in `group_by' => 'gmt_offset'` util would be nice, and can be done in the future.
includes #31434
Commits
-------
001b930611 [Form] Add intl/choice_translation_locale option to TimezoneType
This PR was squashed before being merged into the 4.3 branch (closes#31452).
Discussion
----------
[FrameworkBundle] Add cache configuration for PropertyInfo
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The PropertyInfoExtractor was not cached by default but the class to do it was surprisingly here, unused.
I've added the configuration to enable it by default when it's not the development environment.
I haven't added the warmup part because there are too much arguments for the methods (class, property, context).
It will be a big boost for the performance! For this code:
```php
$book = $this->serializer->deserialize('{"id":3,"reviews":[{"id": 7, "body": "This book is fantastic!", "rating": 9, "letter": "A", "publicationDate": "2019"}],"isbn":"978-0-5533-9243-2","title":"Fool\'s Assassin","description":"A famous saga","author":"Robin Hobb","publicationDate":"2014"}', Book::class, 'json');
$this->serializer->serialize($book, 'json');
```
We obtain this:
![image](https://user-images.githubusercontent.com/10920253/57487994-2874d000-72b2-11e9-92a2-28b14a038194.png)
The Blackfire comparison is here: https://blackfire.io/profiles/compare/2c746d26-320a-4aab-80ef-7276c2e92b96/graph
Commits
-------
17f6225d0f [FrameworkBundle] Add cache configuration for PropertyInfo
This PR was merged into the 4.3 branch.
Discussion
----------
[Doctrine][PropertyInfo] Detect if the ID is writeable
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Companion of #31481. Allows to detect that ids with a generated value aren't writable (because the DBMS will generate the ID by itself). It could be considered as a bug fix or as a new feature. I prefer to not merge in in 3.4. However, it becomes necessary for autovalidation to work with such entities, so it should be in 4.3:
```php
/**
* @Entity
*/
class Foo
{
/**
* @Id
* @GeneratedValue(strategy="AUTO")
* @Column(type="integer")
*/
public $id;
}
```
Commits
-------
4598235192 [Doctrine][PropertyInfo] Detect if the ID is writeable
This PR was merged into the 4.3 branch.
Discussion
----------
[Validator] Autovalidation: skip readonly props
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Read-only properties (such as an autogenerated ID) must be skipped during the validation (it makes no sense to validate a RO property anyway).
This is an allowed BC break because this feature will be introduced in 4.3.
Commits
-------
e7dc5e1045 [Validator] Autovalidation: skip readonly props
This PR was merged into the 4.3 branch.
Discussion
----------
[FrameworkBundle] Fixed issue when a parameter contains a '%'
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31431
| License | MIT
| Doc PR |
---
On my computer:
```
dump(get_cfg_var('xdebug.file_link_format'));
"subl://%f:%l"
```
When I ran `bin/console debug:config framework` I got this exception:
```
In ParameterBag.php line 100:
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
The parameter "templating.helper.code.file_link_format" has a
dependency on a non-existent parameter "f:".
Exception trace:
() at
/home/gregoire/dev/github.com/lyrixx/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:100
...
```
This issue was introduced [here](https://github.com/symfony/symfony/pull/27684/files#diff-b3847149480405e1de881530b4c75ab5L212) / cc @ro0NL
This PR does not really fix the issue: I'm able to debug the config, The
the `debug:container --env-vars` does not work anymore. How could we fix
both issue? cc @nicolas-grekas
Commits
-------
7bcd714381 [FrameworkBundle] Fixed issue when a parameter container a '%'
This PR was merged into the 4.3 branch.
Discussion
----------
[Cache] Log a more readable message when trying to cache an unsupported type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29710 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Improved the warning risen when trying to save something that has a non-supported type in the Simple cache.
For instance, let's say the following code:
```php
class TestCommand extends Command
{
private $cache;
public function __construct(CacheInterface $cache)
{
parent::__construct();
$this->cache = $cache;
}
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
$n = $this->cache->get('n', function () {
return function () {
return rand(0,10);
};
});
dump($n());
}
}
```
Running this code will give the following:
```
14:32:03 WARNING [cache] Could not save key "n" in cache: the Closure type is not supported.
0
```
Commits
-------
21ba3c07a0 [Cache] Log a more readable error message when saving into cache fails
This PR was squashed before being merged into the 3.4 branch (closes#31438).
Discussion
----------
[Serializer] Fix denormalization of object with variadic constructor typed argument
| Q | A
| ------------- | ---
| Branch? | 3.4 up to 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31436
| License | MIT
This PR adds a test to demonstrate the bug, and a fix to squash it.
Commits
-------
c8c3c56cc8 [Serializer] Fix denormalization of object with variadic constructor typed argument
This PR was merged into the 4.2 branch.
Discussion
----------
[Messenger] Making cache rebuild correctly when message subscribers change
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31409
| License | MIT
| Doc PR | not needed
An edge-case that's identical to `EventSubscriberInterface`: when the return value of `getHandledMessages()` changes, the container needs to be rebuilt.
If you're wondering why these checks aren't in their own resource class, see #25984 - it's something we probably should do, but haven't done yet.
Commits
-------
d88446be07 Making cache rebuild correctly with MessageSubscriberInterface return values
This PR was merged into the 4.2 branch.
Discussion
----------
[Validator] Fix finding translator parent definition in compiler pass
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Method `ChildDefintion::getParent()` returns a string, but here it is expected to return an object of class `Definition` in order to call `getClass` on it in the loop.
Commits
-------
d261bb5dd1 Fix finding parent definition
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] remove send_and_handle which can be achieved with SyncTransport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | yes <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11236
The send_and_handle option is pretty awkward and we don't need it anymore because the same thing can be achieved with the SyncTransport from #30759
So the following example from the doc in https://symfony.com/doc/current/messenger.html#routing
```yaml
framework:
messenger:
routing:
'My\Message\ThatIsGoingToBeSentAndHandledLocally':
senders: [amqp]
send_and_handle: true
```
is the same as
```yaml
framework:
messenger:
routing:
'My\Message\ThatIsGoingToBeSentAndHandledLocally':
senders: [amqp, sync]
```
https://github.com/symfony/symfony/pull/31401#pullrequestreview-235396370
Commits
-------
4552b7f5b2 [Messenger] remove send_and_handle option which can be achieved with SyncTransport
This PR was squashed before being merged into the 4.3 branch (closes#31425).
Discussion
----------
[Messenger] On failure retry, make message appear received from original sender
| Q | A
| ------------- | ---
| Branch? | master (4.3)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31413
| License | MIT
| Doc PR | symfony/symfony-docs#11236
Fixes a bug when using the transport-based handler config from #30958. This also adds a pretty robust integration test that dispatches a complex message with transport-based handler config, failures, failure transport, etc - and verifies the correct behavior.
Cheers!
Commits
-------
80b5df270f [Messenger] On failure retry, make message appear received from original sender
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix routable message bus default bus
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
In #31288, we gave the `RoutableMessageBus` a "default" bus. We did that by using the `MessageBusInterface` service in the locator. But, no such service exists - I think that was just a huge oversight (and maybe @dirk39 named a bus this in the project he was testing on?). The services in the locator are very simply the keys under `framework.messenger.buses` or the default, which is a single `messenger.bus.default` id. There is an alias in the container for `MessageBusInterface`, but this is not added to the locator (and adding it would be a bit awkward, as `MessengerPass` is in the component and the interface alias is entirely a framework thing).
Cheers!
Commits
-------
42e0536d8f Changing how RoutableMessageBus fallback bus works
On my computer:
```
dump(get_cfg_var('xdebug.file_link_format'));
"subl://%f:%l"
```
When I ran `bin/console debug:config framework` I got this exception:
```
In ParameterBag.php line 100:
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
The parameter "templating.helper.code.file_link_format" has a
dependency on a non-existent parameter "f:".
Exception trace:
() at
/home/gregoire/dev/github.com/lyrixx/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:100
...
```
This issue was introduced
[here](https://github.com/symfony/symfony/pull/27684/files#diff-b3847149480405e1de881530b4c75ab5L212)
The `LegacyEventDispatcherProxy` now implements the full
`EventDispatcherInterface` from the `EventDispatcherBundle`.
Before it just implemented the Interface from the `Contracts` Bundle,
that made it incompatible with the `WrappedListener`.
This fixes#31457.
This PR was merged into the 4.3 branch.
Discussion
----------
[TwigBundle] Fix Mailer integration in Twig
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31449
| License | MIT
| Doc PR | n/a
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/roadmap):
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
53b68afec4 [TwigBundle] fixed Mailer integration in Twig
This PR was merged into the 4.3 branch.
Discussion
----------
[DomCrawler] fix HTML5 parser integration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted while reviewing #30892
The current logic is context-dependent: by changing the order of calls, you can get different behaviors.
Commits
-------
ba83bdadb1 [DomCrawler] fix HTML5 parser integration
This PR was merged into the 4.3 branch.
Discussion
----------
[Intl] Revise timezone name generation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (inlcluding intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This is the final polishing needed for #31294 :)
I've realized it's much easier to de-duplicate by processing fallback locales separate, and then only keep the diff compared to a specific locale. More or less the same approach `LocaleDataGenerator` already follows. I was trying to be clever and filter based on inheritance in a single process; bad idea.
Includes https://github.com/ro0NL/symfony/commit/31591d0 (ref #31432)
Commits
-------
bfdb4ed492 [Intl] Revise timezone name generation
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Simplifying SyncTransport and fixing bug with handlers transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
This is still a WIP, because it's not quite working and tests are a TODO. However, the basic idea is there. This makes SyncTransport less "weird". It acts more like a real transport... except that it "receives" and re-dispatches its message immediately.
The bug I'm trying to fix is related to the transport-based handling config that @sroze introduced. It doesn't currently play nice with the sync transport due to the unnatural way that I made it originally.
Cheers!
Commits
-------
8a49eb8660 Simplifying SyncTransport and fixing bug with handlers transport
* 4.3:
[Routing] Fixed unexpected 404 NoConfigurationException
[DI] Removes number of elements information in debug mode
[Contracts] Simplify implementation declarations
Update PR template for 4.3
[Intl] Add FallbackTrait for data generation
[Console] Commands with an alias should not be recognized as ambiguous
clarify the possible class/interface of the cache
* 4.2:
[Routing] Fixed unexpected 404 NoConfigurationException
[DI] Removes number of elements information in debug mode
[Contracts] Simplify implementation declarations
Update PR template for 4.3
[Intl] Add FallbackTrait for data generation
[Console] Commands with an alias should not be recognized as ambiguous
clarify the possible class/interface of the cache
* 3.4:
[DI] Removes number of elements information in debug mode
Update PR template for 4.3
[Intl] Add FallbackTrait for data generation
[Console] Commands with an alias should not be recognized as ambiguous
clarify the possible class/interface of the cache
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] Fixed unexpected 404 NoConfigurationException
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31199
| License | MIT
This is the patch for 4.2+
We need a different patch for 3.4 that is more complex, I think.
Commits
-------
aa71a42a49 [Routing] Fixed unexpected 404 NoConfigurationException
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Commands with an alias should not be recognized as ambiguous when using register
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25355
| License | MIT
| Doc PR |
I think when passing an alias, it should not be treated as a ambiguous command since it's configured to response to it.
I've [pushed a commit](2f5209a687) that reproduce the bug and with this patch it does work.
Commits
-------
ae7ee46465 [Console] Commands with an alias should not be recognized as ambiguous
This PR was squashed before being merged into the 3.4 branch (closes#31371).
Discussion
----------
[DI] Removes number of elements information in debug mode
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31340
| License | MIT
| Doc PR | -
With this services config:
```yaml
my_service:
class: stdClass
arguments: [!tagged my_tag]
my_tagged_service_1:
class: stdClass
tags: [my_tag]
my_tagged_service_2:
class: stdClass
tags: [my_tag]
```
Executing `./bin/console debug:container my_service --show-arguments --env=dev` resulted in
```bash
Information for Service "my_service"
====================================
---------------- -------------------------
Option Value
---------------- -------------------------
Service ID my_service
Class stdClass
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired yes
Autoconfigured yes
Arguments Iterator (0 element(s))
---------------- -------------------------
```
With this fix the output changed to:
```bash
Information for Service "my_service"
====================================
---------------- ------------
Option Value
---------------- ------------
Service ID my_service
Class stdClass
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired yes
Autoconfigured yes
Arguments Tagged Iterator for "my_tag"
---------------- ------------
```
and with `./bin/console debug:container my_service --show-arguments --env=prod`
```bash
Information for Service "my_service_tagged_iterator"
====================================================
---------------- ---------------------------------------------
Option Value
---------------- ---------------------------------------------
Service ID my_service
Class stdClass
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired yes
Autoconfigured yes
Arguments Tagged Iterator for "my_tag" (2 element(s))
---------------- ---------------------------------------------
```
Commits
-------
0da4b83197 [DI] Removes number of elements information in debug mode
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] clarify the possible class/interface of the cache
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When the fallback cache pool is returned (on PHP 5.6, HHVM, or when
Opcache is disabled), the configured service can be any implementation
of the CacheItemPoolInterface.
Commits
-------
40273745ce clarify the possible class/interface of the cache
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Add FallbackTrait for data generation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This is the last architectural change for the Intl data compilation. Promised.
It fixes de-duplicating a locale from its fallback locale. The problem is it uses a while-loop, comparing the locale to each fallback locale.
Given
- `root` (val=A)
- `ur` (val=B)
- `ur_IN` (val=A)
We have an edge case where a locale (ur_IN) override its fallback locale (ur), setting/restoring the value back to the root locale. This happens for the GMT format in the timezone bundle i know of ... in this case the `ur_IN` locale needs to write its own value.
The current approach is a while-loop comparing each fallback locale (ur, root) to the current locale (ur_IN). Eventually comparing `ur_IN <> root`, which causes a wrong diff, as such `ur_IN` falls back to `ur` providing the wrong value (val=B, where val=A is expected).
The new approach uses recursion so we only compare `ur <> ur_IN`, where `ur_IN` on itself is compared to `root`.
4.2) https://github.com/ro0NL/symfony/commit/e24d8e6
4.3) https://github.com/ro0NL/symfony/commit/31591d0
Commits
-------
36ddfd58b9 [Intl] Add FallbackTrait for data generation
This PR was merged into the 4.3-dev branch.
Discussion
----------
Fix compat with older versions of PHP
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
07b9af2eff fixed compat with older versions of PHP
When the fallback cache pool is returned (on PHP 5.6, HHVM, or when
Opcache is disabled), the configured service can be any implementation
of the CacheItemPoolInterface.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Fixing missed tests from #31355
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
Tests I missed from #31355 - sorry about that!
Commits
-------
ab3744961d Fixing missed tests from #31355
This PR was squashed before being merged into the 4.3-dev branch (closes#31249).
Discussion
----------
[Translator] Set sources when extracting strings from php files
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Set metadata about filenames and line numbers when extracting translatable strings from php files. This PR complements #30909 and #31248, as those PRs implement support for dumping the filenames and line numbers to Po and Qt file formats.
Commits
-------
f05d4e41be [Translator] Set sources when extracting strings from php files
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Adding final routing key to delay queue name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31241
| License | MIT
| Doc PR | n/a
Fixes#31241.
When we delay, we create a queue whose `x-message-ttl` matches the delay length and `x-dead-letter-routing-key` matches the original routing key used for the message. However, before this PR, the original routing key was not part of that queue's name. The result is that if two messages were delayed by the same length, but with different routing keys, the second would try to "redeclare" the existing delay queue with a new `x-dead-letter-routing-key`, resulting in an error similar to:
> Server channel error: 406, message: PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-routing-key' for queue 'delay_queue_1000'
Integration test was improved to catch this.
Cheers!
Commits
-------
9940e71ae1 fixing a bug where the delay queue name did not contain the final routing key
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Dotenv] Test do not use putenv
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The related pull request is https://github.com/symfony/symfony/pull/31062.
If the `$usePutenv` flag is set to `false`, `putenv` won't be executed. I just add a small test for this situation.
Commits
-------
6d1a76e998 Test do not use putenv
This PR was squashed before being merged into the 4.3-dev branch (closes#31403).
Discussion
----------
[Intl][4.3] Apply localeDisplayPattern and fix locale generation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Follow up of #31337 & #31402 for 4.3 / master
Commits
-------
ed04f242d2 recompile
504db27860 re-apply api changes for TimezoneDataGenerator
c443e78dde re-apply translator parents.json generation
bf50b61f2a [Intl] Apply localeDisplayPattern and fix locale generation
* 4.2:
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
Translated form, security, validators resources into Belarusian (be)
[WebProfilerBundle] Don't filter submitted IP values
[Intl] Cleanup
bumped Symfony version to 4.2.9
updated VERSION for 4.2.8
updated CHANGELOG for 4.2.8
bumped Symfony version to 3.4.28
updated VERSION for 3.4.27
update CONTRIBUTORS for 3.4.27
updated CHANGELOG for 3.4.27
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Cleanup
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
cleanup of #31365 for 3.4 + some other stuff to keep in sync across branches
Commits
-------
70a941ec0c [Intl] Cleanup
This PR was squashed before being merged into the 4.3-dev branch (closes#31060).
Discussion
----------
[Validator] Make API endpoint for NotCompromisedPasswordValidator configurable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes, but acceptable [1]
| Deprecations? | no [1]
| Tests pass? | yes
| Fixed tickets | #30871, #31054
| License | MIT
| Doc PR | symfony/symfony-docs#... (TODO)
Makes the API endpoint for the `NotCompromisedPasswordValidator` configurable. The endpoint includes the placeholder which will be replaced with the first digits of the password hash for k-anonymity.
The endpoint can either be set via constructor injection of the validator if the component is used standalone, or via the framework configuration of symfony/framework-bundle.
[1] As discussed in #31054, the validator is not in a stable release yet, therefore the BC break is considered acceptable. No deprecation / BC layer is necessary.
Commits
-------
f6a80c214d [Validator] Make API endpoint for NotCompromisedPasswordValidator configurable
* 3.4:
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
Translated form, security, validators resources into Belarusian (be)
[WebProfilerBundle] Don't filter submitted IP values
bumped Symfony version to 3.4.28
updated VERSION for 3.4.27
update CONTRIBUTORS for 3.4.27
updated CHANGELOG for 3.4.27
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Fix Redis Connection::get() after reject()
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
If a message is rejected, another consumer cannot read from the stream because the first subsequent call to `\Redis::xreadgroup()` returns false for some reason.
Reproducer: https://github.com/chalasr/redis-transport-bug
ping @alexander-schranz
Commits
-------
c05273f793 [Messenger] Fix Redis Connection::get() after reject()
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] fix wrong use of generator returns
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
I've seen this problem many times: Mixing `yield` with `return []`.
Unfortunately it cannot be forbidden at the compiler level because it's actually a feature: https://www.php.net/manual/de/generator.getreturn.php
But usually not intended that way.
Also added some other minor cleanups I've found.
Commits
-------
e8a09e9d85 [Messenger] fix wrong use of generator returns
This PR was merged into the 4.3-dev branch.
Discussion
----------
Make the exception messages consistent across the board
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
84c67193bc made the esception messages consistent across the board
This PR was squashed before being merged into the 4.3-dev branch (closes#31354).
Discussion
----------
[Intl][Validator] Handle alias locales/timezones
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #31022
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
both timezones and locales have aliases (either thru deprecation/migration/etc.)
for locales we compile a mapping, for timezones we dont. yet we can benefit partial alias support thru DateTimeZone, which knows about most timezone IDs already.
both the timezone + locale validator already support aliases. Connsequently, we should support aliases in `Timezones::exists()` + `Locales::exists()` as well IMHO.
so far so good; the catch is; with this PR `Locales::getName()` supports aliases, whereas `Timezones::getName()` doesnt. I think it's reasonable for now, until we compile the timezone mapping so we can widen the timezone ID conversion here.
Commits
-------
0a9be0df6e [Intl][Validator] Handle alias locales/timezones
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle] Show injected services for iterator and array arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? |no
| New feature? | yes<!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31340 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | tbd.
When I have the following service configuration:
```yaml
App\Word\Checker\StaticWordChecker:
tags: [app.checker]
App\Word\Checker\BannedWorldListChecker:
tags: [app.checker]
App\Word\WordCheckerTaggedIterator:
arguments: [!tagged app.checker]
App\Word\WordCheckerArray:
arguments:
- App\Word\Checker\StaticWordChecker: ~
App\Word\Checker\BannedWorldListChecker: ~
```
and I run:
`./bin/console debug:container App\Word\WordCheckerArray --show-arguments`
```bash
Information for Service "App\Word\WordCheckerArray"
===================================================
---------------- -------------------------------------------
Option Value
---------------- -------------------------------------------
Service ID App\Word\WordCheckerArray
Class App\Word\WordCheckerArray
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired yes
Autoconfigured yes
Arguments Array (2 element(s))
- App\Word\Checker\StaticWordChecker
- App\Word\Checker\BannedWorldListChecker
---------------- -------------------------------------------
```
or
`./bin/console debug:container App\Word\WordCheckerTaggedIterator --show-arguments`
```bash
Information for Service "App\Word\WordCheckerTaggedIterator"
============================================================
---------------- -------------------------------------------
Option Value
---------------- -------------------------------------------
Service ID App\Word\WordCheckerTaggedIterator
Class App\Word\WordCheckerTaggedIterator
Tags -
Public no
Synthetic no
Lazy no
Shared yes
Abstract no
Autowired yes
Autoconfigured yes
Arguments Iterator (2 element(s))
- App\Word\Checker\BannedWorldListChecker
- App\Word\Checker\StaticWordChecker
---------------- -------------------------------------------
```
I can now see the the objects injected into the iterator and array arguments.
Commits
-------
db5fb200ce [FrameworkBundle] Show injected services for Iterator and Array
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Rename Regions to Countries
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Because that's what the current region data is about; country codes.
This makes things consistent across the board; i.e. CountryType, CountryValidator
This allows a possible other region subset (e.g "continents") to distinct. Thus having `Countries::class` + `Continents::class` both reading from the `region` data. By then data should be compiled under different keys.
Current class is master only, so now or never :)
The alternative approach would be `Regions::getCountryNames [,getContinentNames, etc.]`, which is harder to scale, and should also be decided for 4.3 ideally.
Commits
-------
49aee67f46 [Intl] Rename Regions to Countries
This PR was squashed before being merged into the 3.4 branch (closes#31377).
Discussion
----------
[Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24072
| License | MIT
| Doc PR | -
Previously, a bug existed whereby for multi-select questions, the auto-complete would only work for the first answer supplied by the user. On all subsequent answers, the auto-complete would not appear.
Now it works as expected:
![screenshot](https://user-images.githubusercontent.com/2110222/57158657-8c147e80-6e16-11e9-94f7-a9bc95506545.png)
Commits
-------
59321fe031 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers)
The change allow `simple-phpunit` to be included without
`#!/usr/bin/env php` string outputted.
Also it's the first step to fix#27035 (the second one is to change
phpunit bridge recipe).
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] Don't filter submitted IP values
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31378 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | -
I don't think we need to filter the value submitted by users in this case.
Commits
-------
29bd2ad3f2 [WebProfilerBundle] Don't filter submitted IP values
This PR was merged into the 4.3-dev branch.
Discussion
----------
[PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refacto
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
During the refactoring for #29211 , it seems a little bug was introduced. When using runInSeparateProcess, deprecation message isn't unserialized anymore.
Commits
-------
f522729527 [PhpunitBridge] Fix not unserialized logs after DeprecationErrorHandler refactoring
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle] Remove SendFailedMessageToFailureTransportListener if no failure transport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | n/a
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When there is no failure transport configured and `messenger:consume` hits a failing message:
> Argument 2 passed to Symfony\Component\Messenger\EventListener\SendFailedMessageToFailureTransportListener::__construct() must be of the type string, null given
/cc @weaverryan
Commits
-------
bdf4e913be [FrameworkBundle] Remove SendFailedMessageToFailureTransportListener definition if no failure transport
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] Keep preferred choices order in ChoiceType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5136
| License | MIT
| Doc PR | todo
#EUFOSSA
Commits
-------
340a2fb3f8 Keep preferred_choices order
This PR was merged into the 3.4 branch.
Discussion
----------
Reword VarDumper description
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
It is hard to understand what "Built on top" refers to, and even when
knowing, the sentence looks weird.
![Untitled](https://user-images.githubusercontent.com/657779/57011659-15ebfe00-6c03-11e9-9b85-5c00cfc15026.png)
The description of [the Github repository](https://github.com/symfony/var-dumper) has the same issue and should be changed.
Commits
-------
6024e16ea1 Reword VarDumper description
* 4.2:
Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
[Workflow] Fixed dumping when many transition with same name exist
relax assertions in tests
fix ConsoleFormatter - call to a member function format() on string
Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
[Validator] Translate messages into Japanese
Fix Thai translation in validators.th.xlf
[FramworkBundle] mark any env vars found in the ide setting as used
* 3.4:
Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
[Workflow] Fixed dumping when many transition with same name exist
fix ConsoleFormatter - call to a member function format() on string
This PR was merged into the 3.4 branch.
Discussion
----------
Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This reverts commit 029fb2e7e3, reversing
changes made to 9dad29d61c.
Reverts #30620
Replaces #31215
We don't need to solve this in 3.4
Making the session resettable should be done on master, by implementing `ResetInterface`.
On 3.4 apps, one should write a dedicated `SessionResetter` that would implement the reverted logic.
Commits
-------
4177331915 Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)"
This PR was squashed before being merged into the 4.3-dev branch (closes#31288).
Discussion
----------
[Messenger] RoutableMessageBus route to default bus
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31200
| License | MIT
| Doc PR | Not needed
Hi! I modified the behaviour of RoutableMessageBus to route message without BusNameStamp to default bus instead of raise an exception.
Made with ❤️ by [![Open Source Saturday](https://img.shields.io/badge/%E2%9D%A4%EF%B8%8F-open%20source%20saturday-F64060.svg)](https://www.meetup.com/it-IT/Open-Source-Saturday-Milano/)
Commits
-------
c4e5e83b56 [Messenger] RoutableMessageBus route to default bus
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator] Allow intl timezones
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | ref #28836
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11502
This PR considers the ICU timezones (#28831) as valid, as well as the PHP ones.
Both can be used in `DateTimeZone`, but expired timezones cannot be used with `IntlTimeZone`. The `intlCompatibility` option ensures compatibility between both.
Practically this allows for both `UTC` and `Etc/UTC`, where the latter should be preferred. I.e. currently `Etc/UTC` is considered an invalid timezone ... which it's not.
Commits
-------
7294b59c65 [Validator] Allow intl timezones
This PR was merged into the 4.2 branch.
Discussion
----------
Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When you copy a reference to a class from PHPStorm it always start the FQCN with a backslash.
When you now try to search the container for this class using `bin/console debug:container "\My\Class"` it cannot find it.
This PR always removes the starting backslash before searching the container to avoid this issue.
Commits
-------
0945f27e81 Made `debug:container` and `debug:autowiring` ignore starting backslash in service id
This PR was merged into the 3.4 branch.
Discussion
----------
fix ConsoleFormatter - call to a member function format() on string
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The ConsoleFormatter crashes when there is not a DateTime object in `$record['datetime']`. As this parameter is not documented anywhere (i.e. `FormatterInterface` does not say it must be a DateTime object), I think the proper fix is to check if there is DateTimeInterface object and only call the `format` method then.
We use a custom LogProcessor (https://symfony.com/doc/current/logging/processors.html) to add some extra data and format the DateTime in the `$record['datetime']`. We need to format the DateTime in the processor, because we use `JsonFormatter` in prod environment and it does not support changing the date format. We use `ConsoleFormatter` only in dev environment and as the processor is called before the formatter, we get the crash.
There were no tests whatsoever for `ConsoleFormatter`, so I've added a basic one, that passes before and after, and another one that tests the crash (failed before, passed after).
There is a theoretical BC break, as someone could have sent an object with a `format` method to the formatter and it would have worked, but I'm not sure if it's considered BC break by Symfony, please let me know, if it is.
Commits
-------
648832823f fix ConsoleFormatter - call to a member function format() on string
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] Fixed dumping when many transition with same name exist
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no>
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
With this configuration:
```yaml
framework:
workflows:
foobar:
type: workflow
supports:
- stdClass
initial_place: a
places:
- a
- b
- c
- cancelled
transitions:
- name: a-b
from: a
to: b
- name: b-c
from: b
to: c
- name: cancel
from: a
to: cancelled
- name: cancel
from: b
to: cancelled
- name: cancel
from: c
to: cancelled
```
before:
![workflow-broken](https://user-images.githubusercontent.com/408368/56969037-a0315500-6b64-11e9-917e-4c45820938cc.png)
After:
![workflow-fixed](https://user-images.githubusercontent.com/408368/56969047-a4f60900-6b64-11e9-8f07-30e701a4978f.png)
Commits
-------
312a456e04 [Workflow] Fixed dumping when many transition with same name exist
This PR was squashed before being merged into the 4.3-dev branch (closes#30970).
Discussion
----------
[Messenger] Adding failure transport support
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31231
| License | MIT
| Doc PR | symfony/symfony-docs#11236
This adds "failure" transport support for messenger, so that messages that fail on *all* their retries can be collected in one spot and retried later if wanted:
```yml
framework:
messenger:
failure_transport: failed
transports:
async:
dsn: 'amqp://'
failed:
dsn: 'doctrine://default?queue_name=failed'
routing:
'App\Message\SmsNotification': async
```
In this setup, `SmsNotification` would be retried 3 times on the `async` transport (current behavior) and then finally sent to the `failed` transport. The `failed` transport can be consumed like a normal transport, but should usually be handled & consumed by one of the new commands:
**> bin/console messenger:failed:show**
<img width="861" alt="Screen Shot 2019-04-10 at 3 15 45 PM" src="https://user-images.githubusercontent.com/121003/55917329-ddc54280-5ba3-11e9-878c-af3c653643de.png">
**> bin/console messenger:failed:show 217**
<img width="804" alt="Screen Shot 2019-04-10 at 3 15 55 PM" src="https://user-images.githubusercontent.com/121003/55917360-f33a6c80-5ba3-11e9-9f12-a8c57a9a7a4b.png">
**> bin/console messenger:failed:purge 217**
<img width="835" alt="Screen Shot 2019-04-10 at 3 16 07 PM" src="https://user-images.githubusercontent.com/121003/55917383-ff262e80-5ba3-11e9-9720-e24176b834f7.png">
**> bin/console messenger:failed:retry 217**
<img width="737" alt="Screen Shot 2019-04-10 at 3 16 29 PM" src="https://user-images.githubusercontent.com/121003/55917396-09482d00-5ba4-11e9-8d51-0bbe2b4ffc14.png">
**> bin/console messenger:failed:retry 218 -vv**
<img width="1011" alt="Screen Shot 2019-04-10 at 3 20 39 PM" src="https://user-images.githubusercontent.com/121003/55917503-6512b600-5ba4-11e9-9365-4ac87d858541.png">
**Note** (This screenshot is ugly - need to make the dump of the message and the exception more attractive)
Or you can run `bin/console messenger:failed:retry` without any argument, and it will consume the failed messages one-by-one and ask you if you want to retry/handle each. By passing
Cheers!
Commits
-------
36487e5f44 [Messenger] Adding failure transport support
This PR was squashed before being merged into the 4.3-dev branch (closes#31332).
Discussion
----------
[Intl] Add phpdoc
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/31325#discussion_r279843099
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
22a6f7b1bd [Intl] Add phpdoc
* 3.4:
relax assertions in tests
[Validator] Translate messages into Japanese
Fix Thai translation in validators.th.xlf
[FramworkBundle] mark any env vars found in the ide setting as used
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Extra timezone tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Guarantees timezone data integrity. Ideally to go before #31292 :)
Commits
-------
a3cac2b4c9 [Intl] Extra timezone tests
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Compile localized timezone offset name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes-ish
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes (including intl-data group)
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
A tiny follow up of #31295
Commits
-------
7a40d207b7 [Intl] Compile localized timezone offset name
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Translator] Add sources when dumping qt files
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR implements similar functionality as #30909, but for Qt files. Currently, only the Qt element `location` is supported, so only `sources` metadata is included in the dump.
Commits
-------
ff7577d650 Add sources when dumping qt files
This PR was squashed before being merged into the 4.3-dev branch (closes#31306).
Discussion
----------
[DI] Improve exception message on missing $ of named argument
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | -
| New feature? | -
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31265 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | not related
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
### Description
As described in #31265, missing the prefix `$` in an argument name:
```
App\Word\WordChecker:
arguments:
checkers:
- '@App\Word\Checker\StaticWordChecker'
- '@App\Word\Checker\BannedWorldListChecker'
```
led to the following error:
`Invalid service "App\Word\WordChecker": the value of argument "checkers" of method "__construct()" must be null, an instance of Symfony\Component\DependencyInjection\Reference or an instance of Symfony\Component\DependencyInjection\Definition, array given.`
As this error message is quite confusing I changed it to:
`Invalid service "App\Word\WordChecker": Did you forget to add the "$" prefix to argument checkers`
### Todo
- [x] add a unit test
Commits
-------
d0e44996f9 [DI] Improve exception message on missing $ of named argument
This PR was squashed before being merged into the 4.3-dev branch (closes#31280).
Discussion
----------
[WebServerBundle] Change the default pidfile location to cache directory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29160 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | tbd.
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
2e14b6e891 [WebServerBundle] Change the default pidfile location to cache directory
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] [DX] NotNormalizableValueException should note which attribute failed to denormalize when possible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29230 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
This is the idea of a fix discussed with @stof about the improvment of serializer error message. Now we can try a implementation lis this one. This is linked to EUFOSSA even if this has been done not in the hackathon.
Commits
-------
59942b40d1 [Serializer] [DX] NotNormalizableValueException should note which attribute failed to denormalize when possible
This PR was merged into the 3.4 branch.
Discussion
----------
[FramworkBundle] mark any env vars found in the ide setting as used
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31119
| License | MIT
| Doc PR | -
Commits
-------
e461d36ec4 [FramworkBundle] mark any env vars found in the ide setting as used
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Change the phrasing of the deauthenticated event
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Fixing @fabpot's review.
Commits
-------
fa92272dc1 [Security] Change the phrasing of the deauthenticated event
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Intl] Fix LocaleDataGenerator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Forgotten in #28846
The `getName()` method for scripts/regions/languages is stilled needed during locale generation.
Commits
-------
137ce3f6d2 [Intl] Fix LocaleDataGenerator
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] fix skipping h2push test case
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30975
| License | MIT
| Doc PR | -
Commits
-------
3aaa742d40 [HttpClient] fix skipping h2push test case
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Allows to register handlers on a specific transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30110
| License | MIT
| Doc PR | symfony/symfony-docs#11236
With the #30008 pull-request in, we can now do the following:
```yaml
framework:
messenger:
transports:
events:
dsn: amqp://guest:guest@127.0.0.1/%2f/events
options:
queues:
3rdparty:
binding_keys: [ 3rdparty ]
projection:
binding_keys: [ projection ]
events_3rdparty: amqp://guest:guest@127.0.0.1/%2f/events?queues[3rdparty]
events_projection: amqp://guest:guest@127.0.0.1/%2f/events?queues[projection]
routing:
'App\Message\RegisterBet': events
```
This will bind two queues to the `events` exchange, fantastic:
<img width="325" alt="Screenshot 2019-04-07 at 10 26 27" src="https://user-images.githubusercontent.com/804625/55680861-af373580-591f-11e9-8f1e-2d3b6ddba2fd.png">
---
Now, in this setup, the message will be duplicated within the `3rdparty` & `projection` queues. If you just run the consumer for each transport, it will consume the message and call all the handlers. You can't do different things based on which queue you have consumed the message. **This pull-request adds the following feature:**
```php
class RegisterBetHandler implements MessageSubscriberInterface
{
public function __invoke(RegisterBet $message)
{
// Do something only when the message comes from the `events_projection` transport...
}
/**
* {@inheritdoc}
*/
public static function getHandledMessages(): iterable
{
yield RegisterBet::class => [
'from_transport' => 'events_projection',
];
}
}
```
---
In the debugger, it looks like this:
<img width="649" alt="Screenshot 2019-04-07 at 10 29 55" src="https://user-images.githubusercontent.com/804625/55680892-1d7bf800-5920-11e9-80f7-853f0201c6d8.png">
Commits
-------
f0b2acd67d Allows to register handlers on a specific transport (and get rid of this handler alias)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Ensure that a TransportException is thrown on redis error
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
1857395137 [Messenger] Ensure that a TransportException is thrown on redis error
This PR was squashed before being merged into the 4.3-dev branch (closes#31061).
Discussion
----------
[BridgeDoctrineMessenger] Doctrine ping connection middleware
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
- Check and reconnect if mysql has gone away:
<service id="messenger.middleware.doctrine_ping_connection" class="Symfony\Bridge\Doctrine\Messenger\DoctrinePingConnectionMiddleware" public="false">
<argument type="service" id="doctrine" />
</service>
- Close and save opened connections (not active worker):
<service id="messenger.middleware.doctrine_close_connection" class="Symfony\Bridge\Doctrine\Messenger\DoctrineCloseConnectionMiddleware" public="false">
<argument type="service" id="doctrine" />
</service>
Commits
-------
6fd9f6a859 [BridgeDoctrineMessenger] Doctrine ping connection middleware
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add WorkerStoppedEvent
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
In 4.2, one was able to decorate a transport and hook into `TransportInterface::stop()` to perform some business tasks when the `messenger:consume` process gets killed.
In 4.3 the `stop()` logic has been moved to `Worker` which cannot be decorated when used via `messenger:consume`.
This PR adds a marker event dispatched when the worker is stopped to provide the same capability.
Briefly discussed with @weaverryan.
My use case:
I have a temporary CSV file locally which grows while consuming jobs.
This file is uploaded to AWS S3 and squashed once a while (every 5minutes). It is also uploaded when the `messenger:consume` process gets stopped (to store the remaining lines).
For the former (time-based upload), I can listen on `WorkflowMessageHandledEvent` to make the upload happens in case the 5 minutes delay is elapsed. This solves the latter.
Commits
-------
0e7898b622 [Messenger] Add WorkerStoppedEvent
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Dispatch an event when "logout user on change" steps in
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26902 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11450 <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
This adds a new event when the user has been changed and has been log out from the apps, it allow someone to register to this event and do something with either to token or the refreshedUser.
Commits
-------
40e42183b8 [Security] Dispatch an event when "logout user on change" steps in
* 4.2:
[TwigBridge] Require twig ^1.40|^2.9
[Serializer] Fix tests
Use the apply tag instead of the filter tag
Updated some translation files
[Translator] Preserve default domain when extracting strings from php files
* 3.4:
[TwigBridge] Require twig ^1.40|^2.9
[Serializer] Fix tests
Use the apply tag instead of the filter tag
Updated some translation files
[Translator] Preserve default domain when extracting strings from php files
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Fix tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | n/a
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
#30888 added some tests on master which fail when `property-info <3.4.13` is installed.
This bumps the constraint on 3.4 which will fix the low-deps build once merged up to master.
Commits
-------
d25f650005 [Serializer] Fix tests
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] Use the apply tag instead of the filter tag
The filter has been deprecated in favor of the apply tag since Twig 2.9,
see https://twig.symfony.com/doc/2.x/tags/filter.html (apply does not
seem to have its own documentation page yet).
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
⚠ Note: don't merge until Twig 2.9 and 1.40 are released, or this will block symfony releases ⚠
Commits
-------
9c11b98d0a Use the apply tag instead of the filter tag
This PR was squashed before being merged into the 4.3-dev branch (closes#31242).
Discussion
----------
Update LoggingTranslator to log the change of a locale
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I would like to see inside my logs that the translator changed the locale. I've had a case that I spent significant amount of time trying to debug it.
Commits
-------
20380f9afe Update LoggingTranslator to log the change of a locale
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add a redis stream transport
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Yes
| Fixed tickets | #28681
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11341
As discussed in #28681 this will refractor @soyuka implementation of redis using the redis stream features so we don't need to handle parking the messages ourself and redis is doing it for us.
Some interesting links about streams:
- https://redis.io/topics/streams-intro
- https://brandur.org/redis-streams
```
+-----------R
| GET | -> XREADGROUP
+-----------+
|
| handleMessage
V
+-----------+ No
| failed? |---------------------------+
+-----------+ |
| |
| Yes |
V |
+-----------+ No |
| retry? |---------------------------+
+-----------+ |
| |
| Yes |
V V
+-----------R +-----------R
| REJECT | -> XDEL | ACK | -> XACK
+-----------+ +-----------+
```
**GET**: Will use `XREADGROUP` to read the one message from the stream
**REJECT**: Reject will just remove the message with `XDEL` from the stream as adding it back to the stream is handled by symfony worker itself
**ACK**: Will use the `XACK` Method to ack the message for the specific group
The sender will still be simple by calling the `XADD` redis function.
#EU-FOSSA
Commits
-------
ff0b8554ea Refractor redis transport using redis streams
7162d2ec1d Implement redis transport
This PR was merged into the 4.3-dev branch.
Discussion
----------
Make error message more clear
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When you get the following error message `No transport supports the given DSN "...".`, you might think that this relates to a mailer transport or a messenger transport. Let's make this real clear.
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
cdcb6c9969 made error message more clear
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] fix typo
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
c5819f444d [HttpClient] fix typo
This PR was squashed before being merged into the 4.3-dev branch (closes#30888).
Discussion
----------
[serializer] extract normalizer tests to traits
eufossa
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Relates to #30818
| License | MIT
| Doc PR | -
As discussed with @joelwurtz, extract normalizer functionality tests into traits to ensure consistent behaviour of all normalizers.
* [x] Rebase when #30977, #30950 and #30907 are merged to master **blocker**
* [x] Clean up order of trait inclusion and methods in the tests
* [x] Clean up fixture classes of the traits. I started having one class named the same as the trait, where possible
Stuff that we should do eventually, but can also do in separate pull requests, after this one has been merged:
* [ ] Extract all features that we can (the existing normalizer tests should more or less only have the legacy tests in them, all functionality should be in trait)
* [ ] Run test coverage and increase coverage so that we cover all important features and all relevant error cases.
Commits
-------
2b6ebea73c [serializer] extract normalizer tests to traits
This PR was squashed before being merged into the 3.4 branch (closes#31275).
Discussion
----------
[Translator] Preserve default domain when extracting strings from php files
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Use default domain when extracting translation strings with `null` as domain.
Commits
-------
ca77d9a33e [Translator] Preserve default domain when extracting strings from php files
This PR was merged into the 4.3-dev branch.
Discussion
----------
Make the email validator a hard requirement of mailer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes-ish
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I think it makes sense to have the email address validator as a hard requirement of Mailer... as I don't see how you can send emails without an email address :)
Commits
-------
5ad2cb1b5a made the email validator a hard requirement of mailer
This PR was squashed before being merged into the 4.3-dev branch (closes#31195).
Discussion
----------
[Form] Add intltimezone input to TimezoneType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #22302 (ref #28836)
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11463
cc @rvanlaak
Commits
-------
e169dfb968 [Form] Add intltimezone input to TimezoneType
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Routing] do not encode comma in query and fragment
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #27266
| License | MIT
| Doc PR |
Commits
-------
76f6c97416 [Routing] allow comma and other reserved chars without special meaing to not be encoded in the query and fragment
* 4.2:
Fix url matcher edge cases with trailing slash
[Form] Fix author tag + exception messages
[TwigBridge] Fix deprecation on twig 2.9
Fix left-associative ternary deprecation warnings for PHP 7.4
[Validator] Fixed imprecise translations
[Validator] Add Dutch translations
[Security] Cleanup "Digest nonce has expired." translation
Intercept redirections only for HTML format
[PhpUnitBridge] fix reading phpunit.xml on bootstrap
resolve class name parameters
Fix name and phpdoc of ContainerBuilder::removeBindings
[Intl] Update the ICU data to 64.2
* 3.4:
[Form] Fix author tag + exception messages
[TwigBridge] Fix deprecation on twig 2.9
[Validator] Fixed imprecise translations
[Validator] Add Dutch translations
Intercept redirections only for HTML format
Fix name and phpdoc of ContainerBuilder::removeBindings
[Intl] Update the ICU data to 64.2
This PR was squashed before being merged into the 4.2 branch (closes#31240).
Discussion
----------
Fix url matcher edge cases with trailing slash
| Q | A
| ------------- | ---
| Branch? | master / 4.2 (not sure whether this should've been against 4.2)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (I think... if so, in obscure route configurations like the ones that broke in 4.2.7 ;) )
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30721
| License | MIT
As stated in #30721 the "redirecting" (compiled) UrlMatcher ignored host-requirements when doing a 'matched url except for trailing slash difference'-redirect.
With routes like this, you'd get 404's rather than 200's on the second routes.
```yaml
host1.withTrail:
path: /foo/ # host2/foo would become host2/foo/ due to this partial path-match
host: host1
host2.withoutTrail: # A request for host2/foo should match this route
path: /foo # host2/foo/ does not match this path
host: host2
```
This was caused by too eagerly testing whether a route could've worked with an additional trailing slash.
If it could be, that would result in an attempt to redirect _before_ testing the host.
The original url would get the additional slash and prior to actually redirecting, it'd be retested against the available routes. _That new url_ would actually match no routes, since now the host check for the first routes would actually be executed and fail the match for those routes. The adjusted path in the route does not match the second sets of routes...
This PR moves the trailing-slash check to after the host checks. I've added several tests with variants on these edge cases.
*Note:* This is a bug in 4.2 (and 4.3).
I fixed it against master. It appears 4.2's PhpMatcherTrait was renamed to CompiledUrlMatcherTrait in 4.3. But that made it loose its history.
So I'm not sure how to proceed from here. I can rebase it on 4.2 and do the change in PhpMatcherTrait, but that would probably fail to merge in master? I'm not nearly proficient enough in Symfony PR's to know how to solve all this ;)
@nicolas-grekas also asked for these or similar tests to be added to 3.4 as 'proof' those routes worked in that version as well. I have not (yet) done so.
The tests did work on the non-redirecting UrlMatcher without change (i.e. just running UrlMatcherTest), which implies - to me at least - the routes where properly defined and should not result in 404's simply because a RedirectableUrlMatcherInterface _can_ do redirects.
Actually, since I needed to change UrlMatcher as well, I'm not convinced these bugs where totally absent in 3.4. They didn't occur with the compiled version, since the host check was the very first if-statement in that humongous if-tree it generated.
PS, the branch name is a bit dramatic ;)
Commits
-------
4fcfa9d85c Fix url matcher edge cases with trailing slash
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] Fix deprecation on twig 2.9
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes$
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
should make travis green
Commits
-------
ac8256ba9c [TwigBridge] Fix deprecation on twig 2.9
This PR was merged into the 3.4 branch.
Discussion
----------
Fix name and phpdoc of ContainerBuilder::removeBindings
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29944#discussion_r276718323
| License | MIT
| Doc PR | N/A
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
c93194d1db Fix name and phpdoc of ContainerBuilder::removeBindings
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] ease testing and allow forking the middleware stack
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31179
| License | MIT
| Doc PR | -
A less radical alternative than #31185 that preserves laziness and addresses the linked issue.
Commits
-------
3bdf4b0e0f [Messenger] ease testing and allow forking the middleware stack
This PR was merged into the 4.2 branch.
Discussion
----------
[Form] resolve class name parameters
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31052
| License | MIT
| Doc PR |
Commits
-------
5235be4aa3 resolve class name parameters
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Cache] Add optimized FileSystem & Redis TagAware Adapters
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes _TODO: src/**/CHANGELOG.md_
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28250
| License | MIT
| Doc PR | symfony/symfony-docs#... TODO
Reduces cache lookups by 50% when using TagAware, by changing logic of how tag information is stored to avoid having to look it up on getItem(s) calls.
For Filesystem symlinks are used, for Redis "Set" datatype is used.
Commits
-------
3278cb1c7e [Cache] Add optimized FileSystem & Redis TagAware Adapters
Reduces cache lookups by 50% by changing logic of how tag information is
stored to avoid having to look it up on getItem(s) calls.
For Filesystem symlinks are used, for Redis "Set" datatype is used.
This PR was squashed before being merged into the 4.2 branch (closes#31023).
Discussion
----------
[Routing] Fix route URL generation in CLI context
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30996
| License | MIT
| Doc PR | -
This fixes#30996 and makes URL generation in the CLI context behave the same as it does in the web context where the `LocaleListener` sets the default locale (to the router context).
The Travis CI failure is related to the fact that the constraint for `symfony/routing` should be bumped to `^4.2.6` in the composer.json of the FrameworkBundle (when it gets tagged).
Commits
-------
4a1ad4a5d6 [Routing] Fix route URL generation in CLI context
This PR was squashed before being merged into the 4.3-dev branch (closes#31085).
Discussion
----------
[DoctrineBridge] Unique mapping setting is optional
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
```sh
Executed script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! // Clearing the cache for the dev environment with debug
!! // true
!!
!!
In DoctrineLoader.php line 71:
[ErrorException]
Notice: Undefined index: unique
Exception trace:
() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/doctrine-bridge/Validator/DoctrineLoader.php:71
Symfony\Bridge\Doctrine\Validator\DoctrineLoader->loadClassMetadata() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/validator/Mapping/Loader/LoaderChain.php:54
Symfony\Component\Validator\Mapping\Loader\LoaderChain->loadClassMetadata() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/validator/Mapping/Factory/LazyLoadingMetadataFactory.php:105
Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory->getMetadataFor() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/CacheWarmer/ValidatorCacheWarmer.php:63
Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer->doWarmUp() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/CacheWarmer/AbstractPhpFileCacheWarmer.php:51
Symfony\Bundle\FrameworkBundle\CacheWarmer\AbstractPhpFileCacheWarmer->warmUp() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php:96
Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:194
Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Command/CacheClearCommand.php:129
Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Application.php:930
Symfony\Component\Console\Application->doRunCommand() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Console/Application.php:87
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/framework-bundle/Console/Application.php:73
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/ksaveras/Projects/mokytojas.local/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at /home/ksaveras/Projects/mokytojas.local/bin/console:40
cache:clear [--no-warmup] [--no-optional-warmers] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
./bin/console ca:cl
```
Commits
-------
fde4dc9922 [DoctrineBridge] Unique mapping setting is optional
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Update the ICU data to 64.2
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? |no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, including intl-data group
| Fixed tickets | -
| License | MIT
| Doc PR | -
It didn't take long for the ICU team to release a new version.
From their [changelog](http://site.icu-project.org/download/64#TOC-ICU4C-Download), 64.2 provides bug fixes and:
* Draft Unicode 12.1 data integration
* Updated locale data imported from CLDR 35.1
* Support for the new Japanese era "Reiwa" (令和).
Commits
-------
9aa2349ac6 [Intl] Update the ICU data to 64.2
* 4.2:
[HttpFoundation] fix tests
[Routing] fix trailing slash matching with empty-matching trailing vars
[Routing] fix matching trailing vars with defaults
[Validator] fix LegacyTranslatorProxy
call method with Translator component only
bumped Symfony version to 4.2.8
updated VERSION for 4.2.7
updated CHANGELOG for 4.2.7
bumped Symfony version to 3.4.27
updated VERSION for 3.4.26
updated CHANGELOG for 3.4.26
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] fix trailing slash matching with empty-matching trailing vars
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Reported by @bmack in https://github.com/symfony/symfony/pull/31107#issuecomment-484681404
This highlights a small inconsistency that exists for a long time (checked on 2.7 at least):
`new Route('/en-en/{b}', ['b' => 'bbb'], ['b' => '.*'])` matches `/en-en/`
`new Route('/en-en/{b}', ['b' => 'bbb'], ['b' => '.+'])` doesn't match it
(while both match `/en-en` and `/en-en/foo`)
This PR ensures the former behavior is preserved, while #31167 redirects the later to `/en-en`.
Commits
-------
d6da21ac19 [Routing] fix trailing slash matching with empty-matching trailing vars
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] deprecate BCryptPasswordEncoder in favor of NativePasswordEncoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #31140
Commits
-------
e197398d2f [Security] deprecate BCryptPasswordEncoder in favor of NativePasswordEncoder
An undefined SYMFONY_DEPRECATION_HELPER environment variable translates
to false, and that was previously interpreted as 0, which means strict
mode.
This restores backwards compatibility with the previous behavior, which
got broken in 1c73f9cfed .
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] Add NativePasswordEncoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR adds a new `NativePasswordEncoder` that defaults to the best available hashing algo to `password_hash()`. Best is determined by "us" or "php", the goal being that this will change in the future as new algos are published.
This provides a native encoder that we should recommend using by default.
Commits
-------
28f7961c55 [Security] Add NativePasswordEncoder
* 4.2:
Revert "bug #30423 [Security] Rework firewall's access denied rule (dimabory)"
[FrameworkBundle] minor: remove a typo from changelog
[VarDumper] fix tests with ICU 64.1
[VarDumper][Ldap] relax some locally failing tests
[Validator] #30192 Added the missing translations for the Tagalog ("tl") locale.
Make MimeTypeExtensionGuesser case insensitive
Fix get session when the request stack is empty
[Routing] fix trailing slash redirection with non-greedy trailing vars
[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] fix trailing slash redirection with non-greedy trailing vars
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30863, #31066
| License | MIT
| Doc PR | -
Fixes redirecting `/123/` to `/123` when the route is defined as `/{foo<\d+>}`
Commits
-------
d88833d27a [Routing] fix trailing slash redirection with non-greedy trailing vars
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31092, #31025
| License | MIT
| Doc PR | -
This allows defining a translator that implements only the new interface and use it with ValidatorBuilder.
ping @dvdknaap, @snebes since you were affected.
Commits
-------
a12656eaad [FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
This PR was merged into the 4.2 branch.
Discussion
----------
[HttpKernel] Fix get session when the request stack is empty
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
This bug happen behind an exception on a kernel response event, when one collector (e.g. `RequestDataCollector`) is trying to get the request session and the request stack is currently empty.
**Reproducer**
https://github.com/yceruto/get-session-bug (`GET /`)
See logs on terminal:
```bash
Apr 15 20:29:03 |ERROR| PHP 2019-04-15T20:29:03-04:00 Call to a member function isSecure() on null
Apr 15 20:29:03 |ERROR| PHP PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function isSecure() on null in /home/yceruto/demos/getsession/vendor/symfony/http-kernel/EventListener/SessionListener.php:43
Apr 15 20:29:03 |DEBUG| PHP Stack trace:
Apr 15 20:29:03 |DEBUG| PHP #0 /home/yceruto/demos/getsession/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php(59): Symfony\Component\HttpKernel\EventListener\SessionListener->getSession()
Apr 15 20:29:03 |DEBUG| PHP #1 /home/yceruto/demos/getsession/vendor/symfony/http-foundation/Request.php(707): Symfony\Component\HttpKernel\EventListener\AbstractSessionListener->Symfony\Component\HttpKernel\EventListener\{closure}()
Apr 15 20:29:03 |DEBUG| PHP #2 /home/yceruto/demos/getsession/vendor/symfony/http-kernel/DataCollector/RequestDataCollector.php(65): Symfony\Component\HttpFoundation\Request->getSession()
Apr 15 20:29:03 |DEBUG| PHP #3 /home/yceruto/demos/getsession/vendor/symfony/http-kernel/Profiler/Profiler.php(167): Symfony\Component\HttpKernel\DataCollector\RequestDataCollector->collect(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Respo in /home/yceruto/demos/getsession/vendor/symfony/http-kernel/EventListener/SessionListener.php on line 43
```
Friendly ping @nicolas-grekas as author of the previous PR https://github.com/symfony/symfony/pull/28244
Commits
-------
d62ca37ab6 Fix get session when the request stack is empty
* 3.4:
Revert "bug #30423 [Security] Rework firewall's access denied rule (dimabory)"
[FrameworkBundle] minor: remove a typo from changelog
[VarDumper][Ldap] relax some locally failing tests
[Validator] #30192 Added the missing translations for the Tagalog ("tl") locale.
Make MimeTypeExtensionGuesser case insensitive
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Added the missing translations for the Tagalog ("tl") locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | No
| New feature? | No
| BC breaks? | No
| Deprecations? | No
| Tests pass? | Yes
| Fixed tickets | #30192
| License | MIT
| Doc PR |
[Validator] This pull request will add the missing translations for the Tagalog ("tl") locale.
Commits
-------
6ab574b7c9 [Validator] #30192 Added the missing translations for the Tagalog ("tl") locale.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Make MimeTypeExtensionGuesser case insensitive
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Some mime types have a camelCase word in them.
The Apache HTTPD project list items are all lower case.
So I suggest making the $mimeType string lowercase while checking the array key.
That way, we can keep the list in sync.
Example: xlsm file mime type is `application/vnd.ms-excel.sheet.macroEnabled.12`
The key that matches the xlsm extension in the `$defaultExtensions` array is `application/vnd.ms-excel.sheet.macroenabled.12`
Example xlsm file:
https://github.com/vermeirentony/xlsm-example
Commits
-------
e294ee6b9a Make MimeTypeExtensionGuesser case insensitive
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle][Form] Fix XSS issues in the form theme of the PHP templating engine
Based on #88
Commits
-------
ab4d05358c Fix XSS issues in the form theme of the PHP templating engine
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Add a separator in the remember me cookie hash
Based on #89
Commits
-------
a29ce2817c [Security] Add a separator in the remember me cookie hash
* 4.2:
bumped Symfony version to 4.2.7
updated VERSION for 4.2.6
updated CHANGELOG for 4.2.6
bumped Symfony version to 3.4.26
updated VERSION for 3.4.25
update CONTRIBUTORS for 3.4.25
updated CHANGELOG for 3.4.25
Workaround for \DateInterval::createFromDateString()
[DoctrineBridge] [DX] Update exception text in ManagerRegistry::resetService to avoid confusion.
Missing Lithuanian translations added to validator component.
* 3.4:
bumped Symfony version to 3.4.26
updated VERSION for 3.4.25
update CONTRIBUTORS for 3.4.25
updated CHANGELOG for 3.4.25
Workaround for \DateInterval::createFromDateString()
Missing Lithuanian translations added to validator component.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Remove base64_encode & use addslashes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | already covered by existing issue
In #30814, we base64_encoded messages because some transports (specifically DoctrineTransport + Postgresql & SQS) do not allow binary data.
The downside is that the messages become unreadable, which makes it much less convenient to debug your messages with 3rd party monitoring tools, for example.
This PR replaces base64_encode with addslashes. Another alternative (that I first tried in this PR) was to use a blob type, which Drupal does in its code (https://www.drupal.org/project/drupal/issues/690746). But, it still meant that binary data could cause problems with other transports, like SQS.
I also put all the serializer config under a nice, neat `serializer` key under messenger.
Best seen with `?w=1`.
Cheers!
Commits
-------
70b448d120 Reorganizing messenger serializer config and replacing base64_encode with addslashes
This PR was squashed before being merged into the 4.3-dev branch (closes#31040).
Discussion
----------
[BrowserKit] Fixed BC-break introduced by rename of Client to Browser
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/31039
| License | MIT
| Doc PR |
Since #30541 the inheritance hierarchy of `\Symfony\Component\BrowserKit\Client` has changed. Notably the test.client no longer is an instance of `\Symfony\Component\BrowserKit\Client`.
This PR uses `class_alias` to fix the class hierarchy similarly as has been done in Twig. In this case I copied the approach of `Twig_TokenParser_AutoEscape` and `\Twig\TokenParser\AutoEscapeTokenParser`
Commits
-------
6a94dea5cd [BrowserKit] Fixed BC-break introduced by rename of Client to Browser
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] Use name converter when normalizing constraint violation list
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
When using name converter with serializer and the default ConstraintViolationListNormalizer, returned propertyPaths was not converted to the same format.
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
dd93b707cc Use name converter when normalizing constraint violation list
This PR was squashed before being merged into the 4.3-dev branch (closes#28846).
Discussion
----------
[Intl] Simplify API
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #18368
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/11221
Simplifies the Intl API. It greatly reduces the no. of boilerplate classes in this component. Very over complicated, much wow :)
Solving (IMHO):
```php
class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface
```
Which seems very over complicated just to provide static data.
```php
// before
Intl::getLanguageBundle()->getLanguageName() // string | null
// after
Languages::getName() // string
Languages::exists() // bool
```
I left out Canonicalization on puropose, that's a new topic to me.
- [x] Languages
- [x] Locales
- [x] Currencies
- [x] Regions
- [x] Scripts
- [ ] Timezones (#28831)
- [x] Update constraints
- [x] Update form types
Thoughts?
Commits
-------
d6b67d469a [Intl] Simplify API
* 4.2:
Skip testing the phpunit-bridge on not-master branches when $deps is empty
more tests
[DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
[DI] fix removing non-shared definition while inlining them
* 3.4:
Skip testing the phpunit-bridge on not-master branches when $deps is empty
more tests
[DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
This PR was merged into the 4.2 branch.
Discussion
----------
[DI] fix removing non-shared definition while inlining them
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29628
| License | MIT
| Doc PR | -
I didn't manage to create a specific test case but this still has 100% coverage for the added lines and fixed the reproducer (and makes sense also :) )
Commits
-------
317e820694 [DI] fix removing non-shared definition while inlining them
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Overriding services autowired by name under _defaults bind not working
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28326
| License | MIT
This is an implementation of ideas and suggestions of @nicolas-grekas and @GuilhemN.
Commits
-------
7e805eae2b more tests
35a40ace6f [DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
This PR was merged into the 4.3-dev branch.
Discussion
----------
[PhpUnitBridge] Url encoded deprecations helper config
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #28048
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10701
First stab at implementing a new way of configuring the deprecation error handler. Includes a refactoring to keep things manageable.
Rework of #24867, blocked by #29718
TODO:
- [x] make the code 5.5 compatible 😢
- [x] add more tests
- [x] deprecate modes (using echo :P)
- [x] test this on real life projects and add some screenshots
- [x] docs PR
- [x] handle `strict`
- [x] adapt existing CI config
# Quiet configuration
![quiet](https://user-images.githubusercontent.com/657779/49341318-fa78c900-f64b-11e8-9504-a8a9eac4baf8.png)
# Default configuration
![verbose](https://user-images.githubusercontent.com/657779/49341322-10868980-f64c-11e8-9d90-dc3f6a18c335.png)
Commits
-------
1c73f9cfed [PhpUnitBridge] Url encoded deprecations helper config
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpClient] Document the state object that is passed around by the HttpClient
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
In an attempt to make the code of the new HttpClient component more understandable, I've introduced internal classes that document the `$multi` object that is being passed around between *Client and *Response classes.
My goal is to make the code more accessible to potential contributors and static code analyzers.
Commits
-------
20f4eb3204 Document the state object that is passed around by the HttpClient.
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle] Fix for Controller DEPRECATED when using composer --optimized
| Q | A |
| --- | --- |
| Branch? | 4.2 |
| Bug fix? | Yes |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | --- |
| License | MIT |
Using `composer --optimize-autoload` causes `console cache:clear` (without warmup) to give DEPRECATED error, that stays in profiler.
I moved `@trigger_error` from beggining of the file to Controller __consctruct method.
Commits
-------
2ae2fd800d [FrameworkBundle] Fix Controller deprecated when using composer --optimized
Keep to use the same CS in all the Symfony code base.
Use:
```php
$resolver->setDefaults([
'compound' => false
]);
```
Instead of:
```php
$resolver->setDefaults(
[
'compound' => false,
]
);
```
Keep the double split when the method has two or more arguments.
I miss a PSR with this rule.
* 4.2:
Catch empty deprecation.log silently (fixes#31050)
minor: the meaning of the data breach was not correct
Optimize SVGs
property normalizer should also pass format and context to isAllowedAttribute
* 3.4:
minor: the meaning of the data breach was not correct
Optimize SVGs
property normalizer should also pass format and context to isAllowedAttribute
This PR was merged into the 3.4 branch.
Discussion
----------
Optimize SVGs
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | / <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | / <!-- required for new features -->
Used [svgo](https://github.com/svg/svgo) to optimize the svgs. I kept the `viewBox` attribute to keep the aspects when SVGs are rescaled.
I also added `insert_final_newline = false` to the `.editorconfig` file because the newlines are removed from the SVGs and there's only one line left.
Commits
-------
4614cea9d2 Optimize SVGs
This PR was squashed before being merged into the 4.3-dev branch (closes#31073).
Discussion
----------
#30998 Fix deprecated setCircularReferenceHandler call
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30998
| License | MIT
Instead of calling the `setCircularReferenceHandler()` method, it puts the handler in the default context.
Commits
-------
3a680402ce#30998 Fix deprecated setCircularReferenceHandler call
This PR was merged into the 3.4 branch.
Discussion
----------
property normalizer should also pass format and context to isAllowedAttribute
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | found while working on https://github.com/symfony/symfony/pull/30888
| License | MIT
| Doc PR | -
the context and format are optional parameters to `isAllowedAttribute`, but should be forwarded. due to this omission, the PropertyNormalizer was ignoring the 'attributes' context option (and does in version 4 also ignore the 'ignore_attributes' context option - that one is a property on the normalizer class in version 3 and therefore not ignored here)
Commits
-------
13e2fb735d property normalizer should also pass format and context to isAllowedAttribute
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Dotenv] Improve Dotenv messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | no
| License | MIT
| Doc PR | no
This PR improves a little bit of some messages from https://github.com/symfony/symfony/pull/31062
The first, passive sentences may be more suitable here because the value couldn't change by itself. It is changed by us - human.
The second, if we use **The default value of $usePutenv" argument of "%s\'s constructor**, we have to pass `__CLASS__` as the second parameter of `sprintf` function instead of `__METHOD__`. So, I suggest using **The default value of $usePutenv" argument of "%s"**.
Finally, the deprecation warning of `Dotenv::__construct()` is very long. Let's separate it into 2 pieces for readable reason.
Commits
-------
e871a6a83a Improve Dotenv messages
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Mailer] fixed roundrobin test one dead which should recover
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | WIP <!-- please add some, will be required by reviewers -->
| License | MIT
| Doc PR | n/a
The Test `testSendOneDeadButRecover` is not checking the recovery part of its job. I fixed that by adding more `send` calls and added another test so that both recoveries (within retry period and not within retry period) are covered.
The `RoundRobinTransport` had a bug where the transport is dead but not yet in the `retryPeriod`. In that case the transport would not have been added back to the stack and thus got lost. Fixed that but that required an additional check if all transports are dead to prevent an infinite loop.
Commits
-------
5d4d4e7a71 fixed roundrobin dead transport which should recover
ccbb171312 fixed roundrobin dead transport which should recover
* 4.2:
fixed bad merge
Show more accurate message in profiler when missing stopwatch
CS Fixes: Not double split with one array argument
[Serializer] Add default object class resolver
Remove redundant animation prefixes
Remove redundant `box-sizing` prefixes
[VarExporter] support PHP7.4 __serialize & __unserialize
Rework firewall access denied rule
MetadataAwareNameConverter: Do not assume that property names are strings
[VarExporter] fix exporting classes with private constructors
fixed CS
Fix missing $extraDirs when open_basedir returns
This PR was squashed before being merged into the 4.3-dev branch (closes#31062).
Discussion
----------
[Dotenv] Deprecate useage of "putenv"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
From discussions on https://github.com/symfony/recipes/pull/571, I think it is a good idea to make people opt-in to using `putenv`.
In Symfony 5.0 we will just change the value of the constructor. As an alternative, we could decide we want to remove `putenv` in Symfony 5.0. If so, I would also deprecate `$usePutenv=true`.
Commits
-------
8e45fc043e [Dotenv] Deprecate useage of \"putenv\"
* 3.4:
Show more accurate message in profiler when missing stopwatch
CS Fixes: Not double split with one array argument
Remove redundant animation prefixes
Remove redundant `box-sizing` prefixes
Rework firewall access denied rule
fixed CS
Fix missing $extraDirs when open_basedir returns
This PR was merged into the 3.4 branch.
Discussion
----------
CS Fixes: Not double split with one array argument
| Q | A
| ------------- | ---
| Branch? | 3.4 (master from #31063)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | None
Keep to use the same CS in all the Symfony code base.
Use:
```php
$resolver->setDefaults([
'compound' => false
]);
```
Instead of:
```php
$resolver->setDefaults(
[
'compound' => false,
]
);
```
Keep the double split when the method has two or more arguments.
I miss a PSR with this rule.
Commits
-------
a56bf552ad CS Fixes: Not double split with one array argument
This PR was squashed before being merged into the 3.4 branch (closes#31059).
Discussion
----------
Show more accurate message in profiler when missing stopwatch
| Q | A
| ------------- | ---
| Branch? | 3.4+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31056
| License | MIT
| Doc PR | ~
This adds a message to the profiler if the stopwatch component is not installed, instead of suggesting to check if debug is enabled (even if it is enabled).
I had to add a method in the collector to expose the value collected, which in theory adds a feature. Is there perhaps a way to expose this collected data _without_ a "BC break"? I don't think it breaks anything, though it does make the dependencies on the http-kernel a bit strict. The other solution is to ignore if it's null and only act if it's a boolean (feature detection).
Commits
-------
326aa86d6a Show more accurate message in profiler when missing stopwatch
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security][TokenInterface] Prepare for the new serialization mechanism
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Continuation of https://github.com/symfony/symfony/pull/30965
Commits
-------
e6455ea2d8 [Security][TokenInterface] Prepare for the new serialization mechanism
Keep to use the same CS in all the Symfony code base.
Use:
```php
$resolver->setDefaults([
'compound' => false
]);
```
Instead of:
```php
$resolver->setDefaults(
[
'compound' => false,
]
);
```
Keep the double split when the method has two or more arguments.
I miss a PSR with this rule.
This PR was squashed before being merged into the 4.3-dev branch (closes#31044).
Discussion
----------
[HttpClient] Do not allow setting both json and body
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30769
| License | MIT
| Doc PR | n/a
This will keep developers from using both the options `$options['body']` and `$options['json']`. Using both results in only json being the body of the request, which might lead to unexpected results.
Commits
-------
601adf5de7 [HttpClient] Do not allow setting both json and body
This PR was squashed before being merged into the 4.3-dev branch (closes#31021).
Discussion
----------
[Cache] Added command for list all available cache pools
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/issues/9782
| License | MIT
| Doc PR |
Commits
-------
5c210e6fd5 [Cache] Added command for list all available cache pools
This PR was squashed before being merged into the 4.2 branch (closes#31026).
Discussion
----------
[Serializer] Add default object class resolver
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The commit 1d8b5af3f0 introduce a BC break because before that commit the `extractAttributes` the `$object` can be a string which contain the fully qualified name of an object.
To fix the BC break and preserve the new feature, I suggest to create a default object class resolver if it is not set by the developer.
Commits
-------
dd5b8f16f5 [Serializer] Add default object class resolver
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] MetadataAwareNameConverter: Do not assume that property names are strings
| Q | A
| ------------- | ---
| Branch? | 4.2 (class introduced in v4.2.3)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/api-platform/core/pull/2709
| License | MIT
| Doc PR | n/a
When this class was introduced, there was an assumption made about the type of `propertyNames` and therefore a `: ?string` return type was introduced in the fallbacks/normalization private methods. Because symfony doesn't use strict mode yet (compatibility issues with php IIRC), when using a non-string property name (for example the integer `0` which is a valid property name in an array), it will convert the integer to a string.
This is not good, especially if you have a name converter that returns the given property name (ie no transformation) you'll have it's type changed which isn't correct.
I've discovered this bug while working on adding this name converter in api platform (https://github.com/api-platform/core/pull/2709).
Commits
-------
af1e136ca0 MetadataAwareNameConverter: Do not assume that property names are strings
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Rework firewall's access denied rule
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~~#30099~~, #28229
| License | MIT
| Doc PR |
Follow tickets provided above to reproduce bugs. (there are also some project examples)
~~In addition, I'm looking for someone who knows an answer to [this](https://github.com/symfony/symfony/issues/30099#issuecomment-468693492) regarding rework in this PR.~~
Commits
-------
5790859275 Rework firewall access denied rule
Test coverage added in #30997 did a good job of validating previous
behaviour, but didn't adequately cover the new callback logic. Added
coverage for new methods on the Question object.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Config] Deprecate TreeBuilder::root
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? |
| Fixed tickets | #29876
| License | MIT
| Doc PR | —
Alternative idea to #31015. Or is the `root` method still needed?
It would look like this:
![Screenshot 2019-04-09 01 15 04](https://user-images.githubusercontent.com/330436/55762865-fbd85900-5a64-11e9-9680-0870c85d1c09.png)
Commits
-------
ff6bc79eba Deprecate TreeBuilder::root
This PR was merged into the 4.3-dev branch.
Discussion
----------
fix tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
* use legacy group when using the deprecated `hinclude_default_template`
templating config option
* conflict with DependencyInjection 4.2 in the HttpKernel component to
be able to rely on five values being retrieved from the values of the
`BoundArgument` class
* let the TwigBundle conflict with versions of FrameworkBundle that do
not ship the `url_helper` service
Commits
-------
682855fa7d fix tests
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Console] Add callback support to Console\Question autocompleter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | minor edge case, see below
| Deprecations? | no
| Tests pass? | yes (with expanded coverage)
| Fixed tickets | N/A
| License | MIT
| Doc PR | symfony/symfony-docs#11349
Autocompletion is a useful feature, but it's not always possible to anticipate every input the user could provide in advance. For instance, if we're allowing the user to input a path to a file, it's not practical to populate an array with every file and directory in the filesystem, but we can easily build a callback function that populates its suggestions based on the path already inputted.
This change replaces the autocomplete logic that accepts an array of suggestions with an architecture that uses a callback function to populate suggestions in real time as the user provides input.
The first commit adds a test class covering all methods of the `Question` object, while the second commit modifies the `Question` object to accept and store a callback function. The existing `[gs]etAutocompleterValues()` methods are preserved, but instead of being referenced directly from the `QuestionHelper`, they create and call their own callbacks to emulate the current behaviour.
There is one edge case that is changed, as documented in the test: when a `Traversable` object is passed to `setAutocompleterValues()`, the return value of `getAutocompleterValues()` will be the unpacked (array) form of that object rather than the object itself. The unpacking is done lazily and cached on the callback function.
Commits
-------
caad562c11 [Console] Add callback support to Console\Question autocompleter
In order to enable more dynamic use cases such as word-by-word
autocomplete and path-based autocomplete, update the autocomplete logic
of the Question object and its helper to accept a callback function.
This function is called on each keystroke and should return an array of
possibilities to present to the user.
The original logic only accepted an array, which required
implementations to anticipate in advance all possible input values.
This change is fully backwards-compatible, but reimplements the old
behaviour by initializing a "dumb" callback function that always returns
the same array regardless of input.
* use legacy group when using the deprecated `hinclude_default_template`
templating config option
* conflict with DependencyInjection 4.2 in the HttpKernel component to
be able to rely on five values being retrieved from the values of the
`BoundArgument` class
* let the TwigBundle conflict with versions of FrameworkBundle that do
not ship the `url_helper` service
This PR was squashed before being merged into the 4.3-dev branch (closes#30978).
Discussion
----------
[HttpClient] Allow the HTTP_PROXY environment variable lookup with phpdbg
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
`phpdbg` and `embed` are two other legit PHP SAPI's hence should be allowed.
Commits
-------
fbd439e0bd [HttpClient] Allow the HTTP_PROXY environment variable lookup with phpdbg
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle] for Psr18HttpClient configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
No need for autowiring actually here.
Commits
-------
bf89907dce [FrameworkBundle] for Psr18HttpClient configuration
This PR was merged into the 4.2 branch.
Discussion
----------
[Console] fix buildTableRows when Colspan is use with content too long
| Q | A
| ------------- | ---
| Branch? | 4.2 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes ( new test added TableTest::testWithColspanAndMaxWith)
| Fixed tickets | https://github.com/symfony/symfony/issues/30701
| License | MIT
| Doc PR | no
<!-- fix for keeping ColumnMaxwith when Content is too long
Commits
-------
1cf9659b5f fix buildTableRows when Colspan is use with content too long
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] take setIgnoredAttributes() deprecation into account
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
4134be127a take setIgnoredAttributes() deprecation into account
* 4.2:
[serializer] validate that the specified callbacks and max_depth_handler are actually callable
[Serializer] Respect ignored attributes in cache key of normalizer
fix resetting the COLUMN environment variable
Fix TestRunner compatibility to PhpUnit 8
Fix dark themed componnents
prevent mixup of the object to populate
This PR was squashed before being merged into the 4.3-dev branch (closes#30959).
Discussion
----------
[FrameworkBundle] [TwigBundle] Move the hinclude key away from templating
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30874 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | to do when pr is validated.
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Maybe I shouldn't move directly the config key from templating to the other, but since the templating component has been deprecated we may change this directly without deprecating that key alone, WDYT ?
Commits
-------
4f39339fec [FrameworkBundle] [TwigBundle] Move the hinclude key away from templating
* 3.4:
[Serializer] Respect ignored attributes in cache key of normalizer
fix resetting the COLUMN environment variable
Fix TestRunner compatibility to PhpUnit 8
prevent mixup of the object to populate
This PR was squashed before being merged into the 3.4 branch (closes#30907).
Discussion
----------
[Serializer] Respect ignored attributes in cache key of normalizer
EUFOSSA
| Q | A
| ------------- | ---
| Branch | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Do not share the attributes cache in object normalizer when using a different setting for the ignoredAttributes setting.
In Symfony 4.2, the setter is deprecated in favor of the ignored_attibutes option in the $context. When merging this up, we will however still need to respect the field as well for BC, the cache key does not look at the default context (apart from the deprecated modifiers, the default context is immutable)
There might be performance regression for some use cases, but also could be a performance improvement when using 'attributes' in the context with lists of objects of the same class.
Commits
-------
926d228877 [Serializer] Respect ignored attributes in cache key of normalizer