This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] optimize normalization of headers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I was experimenting with using maps to bypass calls to normalization functions, but that didn't lead to any significant perf improvement.
I still found this, the new call is twice as fast :)
Commits
-------
9c676d37a0 [HttpFoundation] optimize normalization of headers
* 4.3:
[FrameworkBundle] Fix framework bundle lock configuration not working as expected
[Validator] Add the missing translations for the Azerbaijani locale
[HttpClient] workaround bad Content-Length sent by old libcurl
[Cache] dont override native Memcached options
Fix CS
Fix exceptions (PDOException) error code type
Fix return type of Process::restart().
[Cache] fail gracefully when locking is not supported
[HttpClient] fix race condition when reading response with informational status
Names for buttons should start with lowercase
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix race condition when reading response with informational status
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Spotted by some transiently failing jobs on Travis.
Commits
-------
450c3c4998 [HttpClient] fix race condition when reading response with informational status
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] workaround bad Content-Length sent by old libcurl
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Issue described in https://curl.haxx.se/mail/lib-2014-01/0106.html, happens with curl 7.29 at least.
Commits
-------
b8d2496979 [HttpClient] workaround bad Content-Length sent by old libcurl
* 3.4:
[FrameworkBundle] Fix framework bundle lock configuration not working as expected
[Validator] Add the missing translations for the Azerbaijani locale
[Cache] dont override native Memcached options
Fix return type of Process::restart().
This PR was merged into the 4.3 branch.
Discussion
----------
[Cache] fail gracefully when locking is not supported
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#33392
| License | MIT
| Doc PR | -
Commits
-------
93485190f9 [Cache] fail gracefully when locking is not supported
This PR was merged into the 4.3 branch.
Discussion
----------
[Form] Names for buttons should start with lowercase
| 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
This fix changes the messages related to the changes in https://github.com/symfony/symfony/pull/28969 - the message used to state that names should start with a letter, a digit ... - so I got a confusing message:
```
Using names for buttons that do not start with a letter, a digit, or an underscore is deprecated since Symfony 4.3 and will throw an exception in 5.0 ("Search" given).'
```
Which made me find the message, look at the regex that was used, and work out that actually it should start with a lowercase letter, and hence this PR - where I assume there is a reason that the name must start with lowercase letters.
Commits
-------
f65524e4e0 Names for buttons should start with lowercase
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] scope singly-implemented interfaces detection by file
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
[DependencyInjection] fixed handling singly implemented interfaces when importing multiple resources
for example:
```yaml
App\Adapter\:
resource: '../src/Adapter/*'
App\Port\:
resource: '../src/Port/*'
```
this configuration wont create service for interface (in other words singly implemented interface wont be autowired) and this chage fixes it
**Also** this will prevent false positives - for example if I had one implementation in \App\Port namespace and another in \App\Adapter then interface service would still be registered
but that could potentially break exisitng code not aware of this bug
Commits
-------
c1f39709ff [DI] add FileLoader::registerAliasesForSinglyImplementedInterfaces()
bec38900d8 [DI] scope singly-implemented interfaces detection by file
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Show fallback error page when default error controller is disabled
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
This would avoid a blank page on errors when we've disabled the default error controller. e.g:
```yaml
framework:
error_controller: null
```
So, we will show you the default HTML error page.
Commits
-------
8eea11cc26 Show fallback error page when framework.error_controller is null
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] don't throw deprecations for return-types by default
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix#33235
| License | MIT
| Doc PR | -
As discussed a few times already, in 4.4, `DebugClassLoader` shouldn't trigger deprecations when return types are missing. We'll enable them back in 5.1.
Commits
-------
2cb419edf4 [ErrorHandler] don't throw deprecations for return-types by default
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] compress files generated by the profiler
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | #33006
| License | MIT
| Doc PR | -
I've recently seen several reports of fastly growing profiler storages. Let's compress them when possible.
Locally for the skeleton homepage, a single profile goes from 150k to 15k. Level 3 is producing significant compression ratio while being measurably faster than level 6 (the default), that's why I'm using it.
Commits
-------
08f9470556 [HttpKernel] compress files generated by the profiler
This PR was squashed before being merged into the 4.4 branch (closes#33317).
Discussion
----------
[Messenger] Added support for `from_transport` attribute on `messenger.message_handler` tag
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33306
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/12231
Right now, it's only possible to have dynamic `from_transport` when using `MessageSubscriberInterface`. Things like `priority` and `bus` can already be added as attributes on the messenger.message_handler` tag.
With this PR it now also supports `from_transport`.
Commits
-------
c965e4e844 [Messenger] Added support for `from_transport` attribute on `messenger.message_handler` tag
This PR was merged into the 4.3 branch.
Discussion
----------
Add missing row_attr option to FormType
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix: #33682 - related issue #33573
| License | MIT
The #33573 modified Symfony's form themes. But the [FormType](https://github.com/symfony/form/blob/master/Extension/Core/Type/FormType.php) don't allow the option `row_attr` so the OptionResolver throw an exception that the option is unknown.
This PR basically add the option and give it to the form view (like `label_attr` do)
Commits
-------
d711ea2b54 Add missing row_attr option to FormType
This PR was merged into the 4.3 branch.
Discussion
----------
[Security] use LegacyEventDispatcherProxy
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
I ran into an issue on one of my apps that has its own event dispatcher class using the old dispatch method signature
```php
public function dispatch($eventName, Event $event = null)
```
This leads to
```
TypeError: Argument 2 passed to X\Tests\Base\TestEventDispatcher::dispatch() must be an instance of Symfony\Component\EventDispatcher\Event or null, string given, called in /var/www/x/symfony/vendor/symfony/security/Http/Firewall/ContextListener.php on line 230
/var/www/x/symfony/tests/Base/TestEventDispatcher.php:20
/var/www/x/symfony/vendor/symfony/security/Http/Firewall/ContextListener.php:230
/var/www/x/symfony/vendor/symfony/security/Http/Firewall/ContextListener.php:111
```
since the event here is dispatched using the new signature:
https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Security/Http/Firewall/ContextListener.php#L259
Commits
-------
7067e48165 [Security] use LegacyEventDispatcherProxy
* 4.3:
[Security/Http] fix typo in deprecation message
Various tweaks 3.4
Various tweaks 4.3
[PhpUnit] Fix usleep mock return value
[Lock] use Predis\ClientInterface instead of Predis\Client
Fix version typo in deprecation notice
Make legacy "wrong" RFC2047 encoding apply only to one header
This PR was merged into the 4.3 branch.
Discussion
----------
[Security/Http] fix typo in deprecation message
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
spotted by @stof in #33676
Commits
-------
e70057aed4 [Security/Http] fix typo in deprecation message
This PR was squashed before being merged into the 4.4 branch (closes#33584).
Discussion
----------
[Security] Deprecate isGranted()/decide() on more than one attribute
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | tbd
While I expect it not be used much, it is currently possible to call `isGranted()` on more than one attribute:
```php
if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) {
// ...
}
```
Supporting this includes a couple of problems/questions:
- It is not clear whether this is `OR` or `AND`;
- In fact, this is left over to the voter to decide upon. So it can vary for each voter and writers of new voters need to consider this (otherwise, you get issues like https://github.com/LeaseWeb/LswSecureControllerBundle/issues/4 );
- It promotes to vote over roles instead of actions.
I think we can do better. In the past, we've created all tooling for this to be self-explaining and easier:
```php
// ExpressionLanguage component (also includes other functions, like `is_granted('EDIT')`)
if ($this->authorizationChecker->isGranted("has_role('ROLE_USER') or has_role('ROLE_ADMIN')")) {
// ...
}
// calling it multiple times in PHP (may reduce performance)
if ($this->authorizationChecker->isGranted('ROLE_USER')
|| $this->authorizationChecker->isGranted('ROLE_ADMIN')
) {
// ...
}
// or by using Role Hierarchy, if a user really wants to vote on roles
```
This PR deprecates passing more than one attribute to `isGranted()` and `decide()` to remove this confusing bit in Security usage.
Backwards compatiblity help
---
I need some help in how to approach changing the `VoterInterface::vote(TokenInterface $token, $subject, array $attributes)` method in a backwards compatible way. Removing `array` breaks all Voters, so does changing it to `string` and removed the parameter all together.
Commits
-------
c64b0beffb [Security] Deprecate isGranted()/decide() on more than one attribute
This PR was merged into the 4.4 branch.
Discussion
----------
[Security] Make stateful firewalls turn responses private only when needed
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26769 *et al.*
| License | MIT
| Doc PR | -
Replaces #28089
By taking over session usage tracking and replacing it with token usage tracking, we can prevent responses that don't actually use the token from turning responses private without changing anything to the lifecycle of security listeners. This makes the behavior much more seamless, allowing to still log the user with the monolog processor, and display it in the profiler toolbar.
This works by using two separate token storage services:
- `security.token_storage` now tracks access to the token and increments the session usage tracker when needed. This is the service that is injected in userland.
- `security.untracked_token_storage` is a raw token storage that just stores the token and is disconnected from the session. This service is injected in places where reading the session doesn't impact the generated output in any way (as e.g. in Monolog processors, etc.)
Commits
-------
20df3a125c [Security] Make stateful firewalls turn responses private only when needed
This PR was merged into the 4.4 branch.
Discussion
----------
[Form][SubmitType] Add "validate" option
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | https://github.com/symfony/symfony/issues/8763
| License | MIT
| Doc PR | TODO
The second part of the ticket requires more work but is kind of unrelated.
Commits
-------
a2bc06d811 [Form][SubmitType] Add "validate" option
This PR was merged into the 4.3 branch.
Discussion
----------
Make legacy "wrong" RFC2047 encoding apply only to one header
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
It says in a comment in the code that "We have to go against RFC 2183/2231 in some areas for interoperability". But I would like that to be the exception and not the rule. As the code was, all parameterized headers except from "Content-Disposition" was not encoded according to RFC 2231.
This change is to make it so that the exception (to not follow the RFC) is for the header "Content-Type" only, and all other parameterized headers will follow the rule of RFC 2231.
The code kind of worked before, because in emails we generally only have two parameterized headers; "Content-Disposition" and "Content-Type". But I think it is a good thing that if another parameterized header would happen to be added, by default it should follow the rule of the RFC and not by default be an exception.
Commits
-------
3817a8b036 Make legacy "wrong" RFC2047 encoding apply only to one header
This PR was merged into the 4.4 branch.
Discussion
----------
[Yaml] hint to the --parse-tags when parsing tags fails
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix https://github.com/symfony/symfony/issues/28465#issuecomment-533182079
| License | MIT
| Doc PR |
Commits
-------
012111524b hint to the --parse-tags when parsing tags fails
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Spotted while discussing the client with @Seldaek
The current behavior is transient: depending on the speed of the network/server, the exception can be thrown, or not.
This forces one do deal with 3/4/5xx when the first chunk is yielded.
Commits
-------
3c93764f10 [HttpClient] fix throwing HTTP exceptions when the 1st chunk is emitted
* 3.4:
Re-enable previously failing PHP 7.4 test cases
Revert "bug #33618 fix tests depending on other components' tests (xabbuh)"
install from source to include components tests
This PR was squashed before being merged into the 4.4 branch (closes#33632).
Discussion
----------
[ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#33631
| License | MIT
This fixes exception thrown when trying to render ErrorException as an array
Commits
-------
063dc78b49 [ErrorRenderer] fix Cannot use object of type ErrorException as array exception #33631
* 4.3:
ensure compatibility with type resolver 0.5
Call AssertEquals with proper parameters
[Twig] Fix Twig config extra keys
fix tests depending on other components' tests
* 3.4:
ensure compatibility with type resolver 0.5
Call AssertEquals with proper parameters
[Twig] Fix Twig config extra keys
fix tests depending on other components' tests
This PR was merged into the 3.4 branch.
Discussion
----------
fix tests depending on other components' tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
cd2f3a6056 fix tests depending on other components' tests
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyInfo] ensure compatibility with type resolver 0.5
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
same as #33588 but for the `3.4` branch
Commits
-------
2d708b3e60 ensure compatibility with type resolver 0.5
This PR was merged into the 4.4 branch.
Discussion
----------
Fix lint commands frozen on empty stdin
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Running e.g. `lint:yaml -` with no piped content makes the command hangs currently, this makes it fail instead. Also fixes the command help which we forgot to update
Commits
-------
b60e0c1454 Fix lint commands frozen on empty stdin
Since `$response->getContent()` returns string and our first parameter is already string as well, in some cases (with different precisions) it may "compare strings" as "strings" and this is not what the test wants.
By changing the first parameter to actual number we force `AssertEquals` to compare them numerically rather than literally by string content.
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Fix tests
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
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):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
abe11a3024 [Console] Fix tests
This PR was merged into the 4.4 branch.
Discussion
----------
New tweaks to the Welcome Page
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Sorry for the noise! This is hopefully the last pull request related to the Welcome Page design tweaks. This one tweaks some margins, makes it look better on ultra-wide screens and prevents some unwanted horizontal/vertical scrollbars on some browsers.
Commits
-------
2737a00233 New tweaks to the Welcome Page
* 4.3:
[Twig] Remove dead code
Add gitignore file for Symfony 4.3
Add gitignore file for Symfony 3.4
[Inflector] Add .gitignore file
[Messenger] Fix exception message of failed message is dropped on retry
Add default value for Accept header
[HttpClient] Add .gitignore file
[Finder] Adjust regex to correctly match comments in gitignore contents
[Security] Removed unused argument in Test
[Console] Get dimensions from stty on windows if possible
[Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee'
* 3.4:
[Twig] Remove dead code
Add gitignore file for Symfony 3.4
[Inflector] Add .gitignore file
[Security] Removed unused argument in Test
[Console] Get dimensions from stty on windows if possible
[Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee'
This PR was squashed before being merged into the 4.3 branch (closes#33611).
Discussion
----------
Add gitignore file for Symfony 4.3
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
856b9a8a6e Add gitignore file for Symfony 4.3
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix exception message of failed message is dropped on retry
| Q | A
| ------------- | ---
| Branch? | 4.3 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | Fix#32719
| License | MIT
| Doc PR | NA <!-- 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):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
8f9f44eb21 [Messenger] Fix exception message of failed message is dropped on retry
This PR was squashed before being merged into the 4.3 branch (closes#33340).
Discussion
----------
[Finder] Adjust regex to correctly match comments in gitignore contents
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32985
| License | MIT
Description from issue:
When using `ignoreVCSIgnored` as argument with the Symfony Finder, it will construct a regex equivalent of the gitignore pattern. However it seems that when a comment line (prefixed with `#`) is present in the `.gitignore`, the regex used to remove comment lines matches every line and thus returns `$gitignoreFileContent` as empty.
Commits
-------
e56fc7cb58 [Finder] Adjust regex to correctly match comments in gitignore contents
This PR was merged into the 4.4 branch.
Discussion
----------
Adding .gitattributes to remove Tests directory from "dist"
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no?
| Tickets |
| License | MIT
| Doc PR |
This is a controversial topic that have been mentioned before. We recently had some discussions on Slack about it and the community not in an agreement. This was asked back in 2014 already.
Im making this PR again, because I think this will help more people than it hurts to keep the tests in the "dist" version.
### Reasons for keeping the tests with the source
* You can look at the tests to understand how the code works
* It is convenient
In the past there were an argument of people might depend on Symfony's classes in Tests. That is no longer the case since we moved reusable classes from Tests to Test.
### Reasons for removing them (merging this PR)
* There should be difference between `composer update --prefer-source` and `composer update --prefer-dist`
* Smaller packages when deploying with Docker or on Serverless.
* Static analysis tools will not complain on PHP syntax errors in our tests ([example](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/DependencyInjection/Tests/Fixtures/xml/xml_with_wrong_ext.php))
## How to decide?
Merging this PR or not is tricky because no side has a solid technical argument. It is basically just personal preference. Please give this PR a 👍 or 👎 if you want to give your opinion.
## Other PRs and issues related to this:
Add .gitattributes file (https://github.com/symfony/symfony/pull/29277)
Added .gitattributes files to root and all components (https://github.com/symfony/symfony/pull/26472)
Exclude non-essential files from Composer package (https://github.com/symfony/symfony/issues/25414)
[HttpFoundation] optimize files for distribution (https://github.com/symfony/symfony/pull/24427)
Add .gitattributes files (https://github.com/symfony/symfony/pull/23926)
[Suggestion] Adding .gitattributes to ignore unnecessary folders and files for production env (https://github.com/symfony/symfony/issues/20057)
Add lightweight and root only .gitattributes (https://github.com/symfony/symfony/pull/18004)
Add .gitattributes to exclude tests from ZIPs (https://github.com/symfony/symfony/pull/17995)
[RFC] Move tests out of the source and source out of the tests (https://github.com/symfony/symfony/issues/17749)
Removal of development & testing files using .gitattributes (https://github.com/symfony/symfony/issues/16174)
Please add .gitattributes files and fix line endings (https://github.com/symfony/symfony/issues/13521)
making use of .gitattributes (https://github.com/symfony/symfony/issues/11810)
## Workarounds
There are workarounds for both sides. Example:
### Workaround if merged
* `composer update --prefer-source`
### Workaround if closed
* `find vendor/symfony -name "Tests" -type d -exec rm -r "{}" \;`
* https://github.com/editorconfig/editorconfig/issues/228
* https://github.com/dg/composer-cleaner
Commits
-------
ac7dc24bcb Adding .gitattributes to remove Tests directory from "dist"
After #32998 there was a minor left over, the `testHandleAuthenticationClearsToken`
`$tokenClass` argument is no longer used and can be safely removed.
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Fix SmtpEnvelope renaming to Envelope
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
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):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
5796c780ba [Mailer] Fix SmtpEnvelope renaming to Envelope
* 4.3:
fixed "link" to Contracts packages
[WebProfilerBundle] Fix time panel legend buttons
Fixed cache pools affecting each other due to an overwritten seed variable
properly catch legacy tag syntax usages
This PR was merged into the 4.4 branch.
Discussion
----------
Minor tweaks to the welcome page
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/33189#issuecomment-529177310
| License | MIT
| Doc PR | -
/cc @fabpot
Commits
-------
acd50615e7 Some styling tweaks
ddffc972a8 minor tweaks to the welcome page
This PR was merged into the 3.4 branch.
Discussion
----------
[Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee'
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | - <!-- prefix each issue number with "Fix #", 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):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
I don't know if this is considered a bug or a new feature ? Tell me if I need to change target branch
This PR improves the singularization of words such as "trees", "employees" or "fees"
Commits
-------
45b4edc2dc [Inflector] add support 'see' to 'ee' for singularize 'fees' to 'fee'
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] don't change state in case of exception
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
dcd47335a8 don't change state in case of exception
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] rename SmtpEnvelope to Envelope
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Drop the Smtp prefix so that arbitrary transports do not have to depend
on SMTP specific concepts.
Commits
-------
5e2c6da349 rename SmtpEnvelope to Envelope
* 4.3:
Re-enable push support for HttpClient
[DependencyInjection] Accept existing interfaces as valid named args
Fixed incompatibility between ServiceSubscriberTrait and classes with protected $container property
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] use dirname() when possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
On second look, I think this works :)
Commits
-------
2eae300537 [DI] use dirname() when possible
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] don't dump a scalar tag value on its own line
| 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 |
This commit fine tunes the bugfix made in #33377 with the feedback provided in https://github.com/symfony/symfony/issues/33464#issuecomment-528290985.
Commits
-------
a549069a49 don't dump a scalar tag value on its own line
This PR was merged into the 4.4 branch.
Discussion
----------
Require exact match when reading from stdin with a dash
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I think reading from stdin should happen only when the argument is exactly a dash, with no other files on the command line.
The alternative is to allow a dash at any position in the list of files, but I'm not sure that'd make sense.
Commits
-------
3d14b79dad Require exact match when reading from stdin with a dash
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Allow enabling buffering conditionally with a Closure
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31883
| License | MIT
| Doc PR | symfony/symfony-docs#12043
With this PR, responses can be buffered automatically from a closure passed to the `buffer` option.
```php
$resp = $client->request('GET', $url, [
'buffer' => function (array $headers): bool { return true/false; },
]);
```
When no option is provided, buffering is now enabled only for json, xml and text/* content types.
Commits
-------
f705ac9dc4 [HttpClient] Allow enabling buffering conditionally with a Closure
* 4.3:
SCA: minor code tweaks
[HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available
fixed typo
[HttpKernel] Fix Apache mod_expires Session Cache-Control issue
Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Add types to private/final/internal methods and constructors
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179, #33228
| License | MIT
| Doc PR | N/A
Commits
-------
1978d88f1b [HttpFoundation] Add types to private/final/internal methods and constructors.
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33462
| License | MIT
| Doc PR | -
Commits
-------
0aae1d7c0a [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] generate preload.php file for PHP 7.4 in cache folder
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29105
| License | MIT
| Doc PR | -
This PR makes the PhpDumper generate a preloading file suited for PHP 7.4.
On a skeleton app, the generated file is `var/cache/dev/srcApp_KernelDevDebugContainer.preload.php` (of course, this varies by env name + kernel class)
One missing thing is listing some classes that are always needed but are not related to services.
Typically: `Request` and `Response`. We might need a new mechanism to make this list extensible.
I did not measure the benefit of this on PHP 7.4. I would really appreciate if someone could give it a try on PHP 7.4 with preloading enabled.
Commits
-------
c4dad0de5d [DI] generate preload.php file for PHP 7.4 in cache folder
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
| Q | A
| ------------- | ---
| Branch? | >= 3.4 <!-- see below -->
| 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 | #32444 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
I had this problem and I noticed that an issue had already been registered.
So I registered the pull request.
Commits
-------
9ed5f03b98 Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
This PR was merged into the 4.4 branch.
Discussion
----------
New welcome page on startup for 4.4 LTS & 5.0
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A new LTS version of Symfony is coming and a new major version too. That deserves a little more ❤️ than usual.
This picture simulate two components of the live: the Ocean and the sky/Universe, with the aim of inspiring calm at the same time desire to build good & great things:
![welcome-page](https://user-images.githubusercontent.com/2028198/63116799-77dd3300-bf68-11e9-8bb5-8c03b301c9e2.gif)
The HUE value changes randomly each time you enter to the homepage. That's just an idea to make it dynamic. I invite you to try it and send your ideas too. I'd like this experience to be extremely exciting for newcomers.
About all text & message this would be a good time to say what people want to hear :) Symfony's amazing \o/. Some communication skills are required here.
I'm not a designer, so I'd want some expert on this topic destroying the proposal making it even better :)
HTML+CSS only: I tried to use some moderm features that were compatible with most of browser, but I might be forgetting something.
The icons were taken from https://material.io/resources/icons/ (free), but I don't know how to deal with this license:
> Our icons are free for everyone to use. Please don’t try to sell them.
> Available under [Apache license version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).
Should we copy it somewhere? should it be visible to the user?
**Before:**
![old-welcome-page](https://user-images.githubusercontent.com/2028198/63117275-6cd6d280-bf69-11e9-9ffc-cce6000e3518.png)
A good first feeling is really really important, is it worth it? Thoughts!
ping to my friend @javiereguiluz this is for sure something you would like to check.
Cheers!
Commits
-------
328b97ec71 New welcome page
This PR was merged into the 4.4 branch.
Discussion
----------
[OptionsResolver] Display full nested option hierarchy in exceptions
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
It kind of improve the DX, especially when you define a lot of nested form options since the file and line cannot be displayed.
```php
$resolver->setDefaults([
'array' => function (OptionsResolver $arrayResolver): void {
$arrayResolver->setRequired('foo');
},
]);
```
Before:
`The required option "foo" is missing.`
After:
`The required option "array[foo]" is missing.`
That can go to 4.3 I guess.
Commits
-------
a981fc3b50 [OptionsResolver] Display full nested options hierarchy in exceptions
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] Display fully qualified title
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
We can see the objects with namespace that help us to navigate to the file easily.
Before: These are diffrent Collection class
<img width="203" alt="Screen Shot 2019-09-06 at 1 02 37 PM" src="https://user-images.githubusercontent.com/13897936/64410319-663f0500-d0a8-11e9-98d5-743e2ccf2737.png">
Now: we can see the diffrent
<img width="376" alt="Screen Shot 2019-09-06 at 1 02 20 PM" src="https://user-images.githubusercontent.com/13897936/64410304-60e1ba80-d0a8-11e9-9cb1-f88c0f8c3de9.png">
Commits
-------
a8252a23ff [VarDumper] display ellipsed FQCN for nested classes
84682eaa03 [VarDumper] Display fully qualified title
This PR was merged into the 4.4 branch.
Discussion
----------
Deprecated not passing dash symbol (-) to STDIN commands
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/33446#issuecomment-528276646
| License | MIT
| Doc PR | -
Follow-up https://github.com/symfony/symfony/pull/33446
> There's a conflict here: when no argument was provided, the command also reads from STDIN.
So now, it reads from STDIN, and if there is nothing there, reads from the default template.
This has been caught in php/php-src#4672
> This creates an ambiguous situation - maybe one did pipe nothing but doesn't expect the default template dir to be linted.
> I'd suggest resolving the ambiguity by reading from STDIN only when explicitly asked for. Passing - as argument could the way. And we could trigger a deprecation for now.
For consistency, the other 2 lint commands (`lint:yaml` and `lint:xliff`) have been touched as well.
The plan for 5.0 is read from the STDIN only when `-` is given.
/cc @nicolas-grekas
Commits
-------
586f299ebd deprecated not passing dash symbol (-) to STDIN commands
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Added support for definition list and horizontal table
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I need that in a projet where I want to display some data horizontally.
Usage:
```php
<?php
use Symfony\Component\Console\Helper\TableSeparator;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Style\SymfonyStyle;
require __DIR__.'/vendor/autoload.php';
$io = new SymfonyStyle(new ArrayInput([]), new ConsoleOutput());
$io->table(['a', 'b', 'c'], [[1, 2, 3], [4, 5, 6]]);
$io->table(['a', 'b', 'c'], [[1, 2, 3], [4, 5, 6]], true);
$io->definitionList(
['foo' => 'bar'],
new TableSeparator(),
'this is a title',
new TableSeparator(),
['foo2' => 'bar2']
);
```
![image](https://user-images.githubusercontent.com/408368/63788677-2df43580-c8f6-11e9-9ce6-b7abcecf7f24.png)
Commits
-------
66028fe19f [Console] Added support for definition list
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Change DSN syntax
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| 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 | -
The current syntax for failover and roundrobin is confusing. `&&` and `||` do not really convey the right meaning. I realized that while working on a new transport that will send on more than one transport in parallel. `&&` would be a natural fit, but that's already taken.
So, this pull request changes the syntax to be more explicit.
Commits
-------
39dd213960 [Mailer] Change the syntax for DSNs using failover or roundrobin
This PR was merged into the 4.4 branch.
Discussion
----------
fix tests mocking final events
| Q | A
| ------------- | ---
| Branch? | 4.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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Fix tests in 4.4 extracted from #33297
Commits
-------
637461fd51 fix tests mocking final events
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Check email validity before opening an SMTP connection
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes-ish
| New feature? | yes
| BC breaks? | no-ish
| 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
When using an SMTP server to send emails, the connection to the SMTP server happens before being sure that the email to sent is valid. That does not happen with HTTP transports.
This pull request implements a new method to be sure that we don't connect to the SMTP server if the email is not valid.
Commits
-------
dc376f52a5 [Mailer] Check email validity before opening an SMTP connection
This PR was merged into the 4.4 branch.
Discussion
----------
[Debug] disable new DebugClassLoader when testing the legacy one
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
25a683bbeb [Debug] disable new DebugClassLoader when testing the legacy one
* 4.3:
Fix more bad tests
Fix test fixtures with deprecated method signatures.
Fix 4.3 tests forward compat
[Messenger] fix empty amqp body returned as false
Fix routing cache broken when using generator_class
This PR was merged into the 4.3 branch.
Discussion
----------
[Router] routing cache crash when using generator_class
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31807
| License | MIT
Since #28865 the Router use, by default, new generator, matcher, and dumpers.
This leads to crash when the Router use a custom generator, or matcher based on the old ones.
Commits
-------
a5b46e5390 Fix routing cache broken when using generator_class
This PR was merged into the 4.3 branch.
Discussion
----------
Fix test fixtures with deprecated method signatures
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33483 (partly)
| License | MIT
| Doc PR | N/A
This PR upgrades two fixtures that implemented deprecated method signatures. As far as I can tell, they are used in tests that do not specifically test legacy behavior, so the fixtures should be up to date. Currently, these fixtures cause failing tests on the 4.4 branch.
Commits
-------
cc3e3d54ea Fix more bad tests
592aacff6f Fix test fixtures with deprecated method signatures.
This PR was merged into the 4.4 branch.
Discussion
----------
Added new ErrorController + Preview and enabling there the error renderer mechanism
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes (deps=high failure is normal)
| Fixed tickets | -
| License | MIT
| Doc PR | TODO
After deprecating the `ExceptionController` in TwigBundle (refs https://github.com/symfony/symfony/pull/31398) the `twig.exception_controller` config key becomes useless as feature provided by TwigBundle, while the preview controller is taking more relevance for the error renderer mechanish.
**Proposal**
* Deprecate the `twig.exception_controller` config key in favor of `framework.error_controller` with default `ErrorController` that activates the error renderer mechanism through the current `ExceptionListener`, meaning also that `DebugHandlersListener::onKernelException` method becomes useless too.
* Deprecate the `PreviewErrorController` from TwigBundle in favor of similar in FrameworkBundle.
So you no longer need to install TwigBundle to create a custom error controller or check the preview output of an error renderer (included `TwigHtmlErrorRenderer`).
Btw this would fix https://github.com/symfony/symfony/pull/31398#issuecomment-490081769, removing here workaround in SecurityBundle.
TODO:
- [x] Update CHANGELOG & UPGRADE files
- [x] Add tests
WDYT?
Commits
-------
b79532ab0e Add ErrorController to preview and render errors
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Fix an error message
| Q | A
| ------------- | ---
| Branch? | 4.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 | n/a
| License | MIT
| Doc PR | n/a
Now that the host is not the name anymore, the error message when not having a host is wrong.
Commits
-------
60bb1c0ddc [Mailer] Fix an error message
This PR was merged into the 4.3 branch.
Discussion
----------
Fix gmail relay
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32148
| License | MIT
This tiny PR fixes#32148 by removing the emission of a notice which prevented a `TransportException` to be thrown when something wrong occured.
Commits
-------
6c90e08368Fix#32148 TransportException was not thrown
* 4.3:
[HttpClient] Fix a bug preventing Server Pushes to be handled properly
[HttpClient] fix support for 103 Early Hints and other informational status codes
[DI] fix failure
[Validator] Add ConstraintValidator::formatValue() tests
[HttpClient] improve handling of HTTP/2 PUSH
Fix#33427
[Validator] Only handle numeric values in DivisibleBy
[Validator] Sync string to date behavior and throw a better exception
Check phpunit configuration for listeners
[DI] fix support for "!tagged_locator foo"
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix support for 103 Early Hints and other informational status codes
| 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 | -
I learned quite recently how 1xx status codes work in HTTP 1.1 when I discovered the [103 Early Hint](https://evertpot.com/http/103-early-hints) status code from [RFC8297](https://tools.ietf.org/html/rfc8297)
This PR fixes support for them by adding a new `getInformationalStatus()` method on `ChunkInterface`. This means that you can now know about 1xx status code by using the `$client->stream()` method:
```php
$response = $client->request('GET', '...');
foreach ($client->stream($response) as $chunk) {
[$code, $headers] = $chunk->getInformationalStatus();
if (103 === $code) {
// $headers['link'] contains the early hints defined in RFC8297
}
// ...
}
```
Commits
-------
34275bba1c [HttpClient] fix support for 103 Early Hints and other informational status codes
* 3.4:
[Validator] Add ConstraintValidator::formatValue() tests
[Validator] Sync string to date behavior and throw a better exception
Check phpunit configuration for listeners
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] improve handling of HTTP/2 PUSH, disable it by default
| 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 follows discussions with @dunglas
For the test cases, https://http2-push.io is down, let's use Akamai instead
This PR now considers the proxy settings before accepting a pushed response.
It also splits the responsibility of dealing with accepting pushed responses in method `acceptPushForRequest`.
The logic in this method could also be delegated to a userland callback passed as an option. Let's wait for someone with an actual use case before adding the option.
This PR also disables HTTP/2 PUSH by default because it is not stable: locally, with the latest curl version, enabling this on a server that pushes things fails with `Failure when receiving data from the peer`. This is not ready for prime time in either ext-curl or the underlying libcurl. You can still enable it explicitly by passing some positive number to the constructor.
Commits
-------
019bce7230 [HttpClient] improve handling of HTTP/2 PUSH
This PR was squashed before being merged into the 3.4 branch (closes#33434).
Discussion
----------
[Validator] Add ConstraintValidator::formatValue() tests
| 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 | -
So https://github.com/symfony/symfony/pull/33401 tests can be built on top of this.
Commits
-------
b688aa31ec [Validator] Add ConstraintValidator::formatValue() tests
This PR was merged into the 4.3 branch.
Discussion
----------
[Validator] Only handle numeric values in DivisibleBy
| 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 | -
Currently it probably breaks because `abs` throws a notice on objects.
Commits
-------
f974add66a [Validator] Only handle numeric values in DivisibleBy
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Registering basic exception handler for late failures
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow-up https://github.com/symfony/symfony/pull/33260 but when all handlers fail.
It'll becomes common since 4.4 where the user has control over the error rendering mechanism. If they make a mistake, we have a support page to show it, currently a blank page is displayed.
Commits
-------
ffab734615 registering basic exception handler for late failures
This PR was merged into the 4.3 branch.
Discussion
----------
Fix#33427
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33427
| License | MIT
| Doc PR | none
Fix#33427 by checking if the message returned by the intl-icu catalog is empty. If yes then the translator returns an empty string instead of running `formatIntl()` which uses the constructor of `MessageFormatter` which throws an exception with empty strings.
Commits
-------
414dcebfc4Fix#33427
This PR was merged into the 4.4 branch.
Discussion
----------
[Translator] Nullable message id?
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
610a4e978f/src/Symfony/Component/Translation/DataCollectorTranslator.php (L144)
The message id shouldn't be `null`, but it's breaking the current code now. Shouldn't we first deprecate of passing `null` even if it's well documented?
Out there can be a lot of `->trans($var)` and `var|trans()` (like the current ones fixed here) that will break without previous warning.
WDTY?
Commits
-------
55eac63 Nullable message id?
This PR was merged into the 4.3 branch.
Discussion
----------
[DI] fix support for "!tagged_locator foo"
| 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 | -
Spotted during the workshop at WebSummerCamp
Commits
-------
a9f75692c9 [DI] fix support for "!tagged_locator foo"
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add a more precise exception
| Q | A
| ------------- | ---
| Branch? | 4.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 | n/a
| 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
561f9b7345 [Mailer] Add a more precise exception
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Fix Mailgun support when a response is not JSON as expected
| 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 | #32043
| License | MIT
| Doc PR | n/a
Sometimes, like when getting a 401, the Mailgun API does not respond with JSON :(
Commits
-------
3b2db425f6 [Mailer] fixed Mailgun support when a response is not JSON as expected
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add support for multiple mailers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | closes#32535
| License | MIT
| Doc PR | -
This adds the possibility to define several email transports.
If you only have one email transport, nothing changes:
```yaml
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
```
But if you need more than one, use the `transports` entry instead:
```yaml
framework:
mailer:
transports:
main: '%env(MAILER_DSN)%'
important: '%env(MAILER_DSN_IMPORTANT)%'
```
Then, when sending an email via the `Mailer`, pass the mailer name explicitly (by default, the first one is used):
```php
// use the first "main" transport
$mailer->send($email);
// or use the "important" one (`null` is the envelope)
$mailer->send($email, null, 'important');
```
The web profiler now displays the name and the shorten DSN.
Commits
-------
de5fae4dd8 [Mailer] Add support for multiple mailers
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Remove the default dispatcher in AbstractTransport
| 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 | n/a
| License | MIT
| Doc PR | n:a
Creating a default event dispatcher does not make sense as nobody can listen on it.
Commits
-------
55d6a65df9 [Mailer] Remove the default dispatcher in AbstractTransport
This PR was squashed before being merged into the 3.4 branch (closes#33289).
Discussion
----------
[DomCrawler] Fix FileFormField PHPDoc
| 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 | n/a
| License | MIT
| Doc PR | n/a
`null` is a valid value, it is used in case of errors. Then the parent class must allow `null` values too. I think it's important regarding the ongoing process of adding typehints everywhere.
Commits
-------
162bfc3cad [DomCrawler] Fix FileFormField PHPDoc
* 4.3:
[Routing] fix static route reordering when a previous dynamic route conflicts
Return null as Expire header if it was set to null
bug #33370 Fix import statement typo in NullCache (adrienbrault)
[ProxyManager] remove ProxiedMethodReturnExpression polyfill
fix dumping not inlined scalar tag values
* 3.4:
Return null as Expire header if it was set to null
[ProxyManager] remove ProxiedMethodReturnExpression polyfill
fix dumping not inlined scalar tag values
This PR was merged into the 4.3 branch.
Discussion
----------
[Routing] fix static route reordering when a previous dynamic route conflicts
| 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 | -
Spotted while playing with the code.
I confirm the test case is green on 3.4 too (but route reordering didn't exist then.)
Commits
-------
cba3b6245a [Routing] fix static route reordering when a previous dynamic route conflicts
This PR was squashed before being merged into the 3.4 branch (closes#33353).
Discussion
----------
Return null as Expire header if it was set to null
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| 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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This PR fixes a regression introduces in #33332. If you set the `Expires` header to null when creating a `Response`, the `getExpires` function returned a date instead of null.
```php
$response = new Response(null, 200, ['Expires' => null]);
$response->getExpires(); // Returns a date currently, but should return null
```
See also [the comment](https://github.com/symfony/symfony/pull/33332#discussion_r317934607) in the PR introducing this regression.
Commits
-------
5e3c7ea452 Return null as Expire header if it was set to null
* 4.3:
bumped Symfony version to 4.3.5
Sort components on CI
fix parameter type declaration and make fabbot happy
Upgraded CI Composer
updated VERSION for 4.3.4
updated CHANGELOG for 4.3.4
bumped Symfony version to 3.4.32
updated VERSION for 3.4.31
update CONTRIBUTORS for 3.4.31
updated CHANGELOG for 3.4.31
* 3.4:
Sort components on CI
fix parameter type declaration and make fabbot happy
Upgraded CI Composer
bumped Symfony version to 3.4.32
updated VERSION for 3.4.31
update CONTRIBUTORS for 3.4.31
updated CHANGELOG for 3.4.31
This PR was squashed before being merged into the 3.4 branch (closes#33335).
Discussion
----------
[DependencyInjection] Fixed the `getServiceIds` implementation to always return aliases
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33307
| License | MIT
| Doc PR | -
Changed the getServiceIds implementation in the Container base class to include aliases. Modified existing tests. Added test which uses the PhpDumper.
Fixes https://github.com/symfony/symfony/issues/33307
Without this patch the implementations of the container are inconsistent in whether or not they return aliases (see issue). Fixing this could be considered a BC break for the affected Container class.
As an alternative to keep the behaviour in Container unchanged, the dumped container could be patched instead. And then only apply this version of the patch to master. This however keeps the inconsistency between Container and ContainerBuilder.
Commits
-------
834d5cbce2 [DependencyInjection] Fixed the `getServiceIds` implementation to always return aliases
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Stop worker when it should stop
| Q | A
| ------------- | ---
| Branch? | 4.3 <!-- see below -->
| 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 | NA <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | NA <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
There are 2 things about this PR:
* This PR fix the bug when using `limit`, `memory-limit`, `time-limit` options with command `messenger:consume`, these options does not work if the receiver return multiple messages
* This PR is the continue work of https://github.com/symfony/symfony/pull/32783
Commits
-------
5c1f3a2414 [Messenger] Stop worker when it should stop
This PR was merged into the 4.4 branch.
Discussion
----------
Add return-types with help from DebugClassLoader in the CI
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33228
| License | MIT
| Doc PR | -
I've spent a great deal of time on this PR, experimenting with adding return types to the codebase.
TL;DR: my conclusion is that we cannot make it for 5.0.
There are two reasons for this:
1. The burden this will put on the community is immense, especially when considering that third party libs must also be updated for any apps to work at all on a return-typed 5.0. Symfony must add them last, not first.
2. We need return type covariance, yet this won't be available before PHP 7.4, while 5.0 supports 7.2.
What's attached?
- ~a draft patching logic in `DebugClassLoader` to add return-type where it discovers this should be done~
- return types added automatically thanks to #33283
- ~manual fixes for situations not handled (yet, if possible at all) by that logic in `DebugClassLoader`~ #33332
What's achieved? Tests are green \o/
At this stage, I think we have to acknowledge we won't add return-types in 5.0 but prepare a serious plan to add them in 6.0.
This plan could be:
- [x] make DebugClassLoader able to automate adding return types.
- [x] in 4.4: add all possible return types that don't break BC, e.g. in `Tests` and in generated code
- [x] spot and fix places where annotations aren't accurate, add more annotations where possible.
- [x] ensure `DebugClassLoader` triggers the best possible deprecations that encourage ppl to add return-types in their libs/apps. This means we could decide to disable the current ones (see #33235) and to re-enable them in 5.1. This will also give us the time to fine-tune the tooling (item 1. on this list)
Ideally, we could reach a point where we could test branch 4.4 *with* return-types: we'd use the tooling to add them automatically in the CI job, then we'd run tests and they should be green. Let's do this?
Help Wanted, here is how:
*With PHP 7.4*, run `php .github/patch-types.php`. This will add return types everywhere possible.
Then run tests, e.g. `./phpunit src/Symfony/Component/HttpFoundation --exclude-group legacy,issue-32995`
Here are the components that fail with return types added, please help me check them all with a PR on [my fork](https://github.com/nicolas-grekas/symfony/tree/eh-return-types):
- [x] src/Symfony/Bridge/Doctrine
- [x] src/Symfony/Bridge/Monolog
- [x] src/Symfony/Bridge/PhpUnit
- [x] src/Symfony/Bridge/ProxyManager
- [x] src/Symfony/Bridge/Twig
- [x] src/Symfony/Bundle/DebugBundle
- [x] src/Symfony/Bundle/FrameworkBundle
- [x] src/Symfony/Bundle/SecurityBundle
- [x] src/Symfony/Bundle/TwigBundle
- [x] src/Symfony/Bundle/WebProfilerBundle
- [x] src/Symfony/Bundle/WebServerBundle
- [x] src/Symfony/Component/Asset
- [x] src/Symfony/Component/BrowserKit
- [x] src/Symfony/Component/Cache
- [x] https://github.com/nicolas-grekas/symfony/pull/28 src/Symfony/Component/Config
- [x] src/Symfony/Component/Console
- [x] src/Symfony/Component/CssSelector
- [x] src/Symfony/Component/Debug
- [x] https://github.com/nicolas-grekas/symfony/pull/28 src/Symfony/Component/DependencyInjection
- [x] src/Symfony/Component/DomCrawler
- [x] src/Symfony/Component/Dotenv
- [x] src/Symfony/Component/ErrorHandler
- [x] src/Symfony/Component/ErrorRenderer
- [x] https://github.com/nicolas-grekas/symfony/pull/24 src/Symfony/Component/EventDispatcher
- [x] src/Symfony/Component/ExpressionLanguage
- [x] src/Symfony/Component/Filesystem
- [x] src/Symfony/Component/Finder
- [x] src/Symfony/Component/Form
- [x] src/Symfony/Component/HttpClient
- [x] src/Symfony/Component/HttpFoundation
- [x] src/Symfony/Component/HttpKernel
- [x] src/Symfony/Component/Inflector
- [x] src/Symfony/Component/Intl
- [x] src/Symfony/Component/Ldap
- [x] src/Symfony/Component/Lock
- [x] src/Symfony/Component/Mailer
- [x] src/Symfony/Component/Messenger
- [x] src/Symfony/Component/Mime
- [x] src/Symfony/Component/OptionsResolver
- [x] src/Symfony/Component/Process
- [x] src/Symfony/Component/PropertyAccess
- [x] src/Symfony/Component/PropertyInfo
- [x] https://github.com/nicolas-grekas/symfony/pull/25 src/Symfony/Component/Routing
- [x] https://github.com/nicolas-grekas/symfony/pull/26 src/Symfony/Component/Security
- [x] src/Symfony/Component/Security/Core
- [x] src/Symfony/Component/Security/Guard
- [x] src/Symfony/Component/Security/Http
- [x] https://github.com/nicolas-grekas/symfony/pull/29 src/Symfony/Component/Serializer
- [x] src/Symfony/Component/Security/Csrf
- [x] src/Symfony/Component/Stopwatch
- [x] src/Symfony/Component/Templating
- [x] https://github.com/nicolas-grekas/symfony/pull/27 src/Symfony/Component/Translation
- [x] src/Symfony/Component/Validator
- [x] src/Symfony/Component/VarDumper
- [x] src/Symfony/Component/VarExporter
- [x] src/Symfony/Component/WebLink
- [x] src/Symfony/Component/Workflow
- [x] src/Symfony/Component/Yaml
- [x] src/Symfony/Contracts
Commits
-------
11149a1fbb Add return-types with help from DebugClassLoader in the CI
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] do not mock removed getPublicDir() method
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
54cb471 do not mock removed getPublicDir() method
This PR was merged into the 4.4 branch.
Discussion
----------
[SecurityGuard] Deprecate returning non-boolean values from checkCredentials()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | prepares #33228
| License | MIT
| Doc PR | TODO
This PR suggests to deprecate implementations of `Symfony\Component\Security\Guard\AuthenticatorInterface::checkCredentials()` that return non-boolean values. This will allow us to add `bool` as return type declaration in the future.
https://github.com/nicolas-grekas/symfony/pull/26#discussion_r317084918
/cc @nicolas-grekas @weaverryan
Commits
-------
a0ca3afeca Deprecate returning non-boolean values from checkCredentials().
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing return annotations on magic methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
My script had a bug, spotted by reviewing #33267
These annotations express our intention to add real return types in a future major release (likely v6)
Commits
-------
10983fcb17 Add missing return annotations on magic methods
* 4.3:
Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
[Form][PropertyPathMapper] Avoid extra call to get config
[HttpKernel] remove unused fixtures
* 3.4:
Revert "bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"
[Form][PropertyPathMapper] Avoid extra call to get config
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpKernel] remove unused fixtures
| 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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
those are remnants of bundle inheritance that has been removed in sf 4
Commits
-------
5ffec16396 [HttpKernel] remove unused fixtures
This PR was merged into the 3.4 branch.
Discussion
----------
[Form][PropertyPathMapper] Avoid extra call to get config
| 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 | -
Commits
-------
3e2aada2d8 [Form][PropertyPathMapper] Avoid extra call to get config
This PR was merged into the 4.4 branch.
Discussion
----------
Add return types to internal & magic methods when possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33236#33228
| License | MIT
| Doc PR | -
Commits
-------
962dcfeed0 Add return types to internal & magic methods when possible
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Add Address::fromString
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33086
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/12128
This will allow to create a Address from a string such as 'Name <name@example.com>'
Example:
```php
$address = Address::fromString("Name <name@example.com>");
```
Commits
-------
75ea8d0d67 Add Address::fromString
This PR was merged into the 4.4 branch.
Discussion
----------
Mark all dispatched event classes as final
| Q | A
| ------------- | ---
| Branch? | 4.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 |
| License | MIT
| Doc PR |
I think we should mark all our Event classes as final. There is no point in people extending them as the libraries that use the event, will only dispatch this event. So extending events in user-land achieves nothing as the subclasses won't be dispatched.
I'm not talking about the base events that are meant to be extended like KernelEvent, but the leaf events like ExceptionEvent, ResponseEvent etc.
Then we can also make them real final in 5.0 as the events are value objects that should not be mocked.
Commits
-------
4bb38eec89 Mark all dispatched event classes as final
This PR was merged into the 4.4 branch.
Discussion
----------
fix deprecated call to setLocale with null
| Q | A
| ------------- | ---
| Branch? | 4.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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Fix a potentially invalid call since #33272
Commits
-------
26f9afe8d1 fix deprecated call to setLocale with null
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] deprecate global dir to load resources from
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31915 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Replaces #31958
Here two example deprecations by adding files in the deprecated locations:
```
Overwriting the resource "@AcmeBundle/Resources/config/routing.yaml" with "/vagrant/src/Resources/AcmeBundle/config/routing.yaml" is deprecated since Symfony 4.4 and will be removed in 5.0.
Loading the file "foobar.yaml" from the global resource directory "/vagrant/src" is deprecated since Symfony 4.4 and will be removed in 5.0.
```
Commits
-------
aa82566f76 [HttpKernel] deprecate global dir to load resources from
* 4.3:
Do not extend the new SF 4.3 ControllerEvent so we can make it final
Backported return type violation bugfixes.
[FrameworkBundle] Fix BrowserKit assertions to make them compatible with Panther
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpKernel] Do not extend the new SF 4.3 ControllerEvent so we can make it final
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | unlikely
| 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 |
See https://github.com/symfony/symfony/pull/33152#discussion_r313846346
Remember the ControllerEvent is new in SF 4.3 so we just go back to what it was before 4.3
Commits
-------
00140b6a7c Do not extend the new SF 4.3 ControllerEvent so we can make it final
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] make polyfill classes abstract, fix edge case
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While working on return types, I keep stumbling on those classes that are `@internal`, but for which we must not add return types, because they're polyfills and are extended by stubs found in the `Resources` folder of the component.
Making the polyfills abstract fixes the linting issue.
This made me discover we have a glitch in the `getPattern()` implementation, that makes our version diverge from intl's. Fixed here too.
On 4.4 because let's not disrupt 3.4.
Commits
-------
c757b95aed [Intl] make polyfill classes abstract, fix edge case
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] deprecate support for null locales
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
e6b6a9d33a deprecate support for null locales
This PR was squashed before being merged into the 4.3 branch (closes#33216).
Discussion
----------
[Mime] Trim and remove line breaks from NamedAddress name arg
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | YES
| New feature? | NO
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This patch trims the name argument of named address in order to avoid some cases where the name is a non-empty input consisting of whitespace and line breaks which would lead to forming of addresses such as `" " <mail@example.org>` <sup>1</sup>
---
In a large Symfony codebase that deals with sending large volumes of email we encountered an issue after the Mailer was changed from PHPMailer to the Symfony Mailer component.
The issue: Some emails would not render correctly as either plaintext or html but instead the original email source with headers and quoted-printable content would render in clients such as MS Outlook 2003, later versions of Outlook and other clients do not seem affected.
After some investigation we found that the error came from a line that looked like this: `$message->addTo(new NamedAddress($contact->getEmailCanonical(), $contact->getFullName()))`.
The `getFullName` method simply concated the first/last name with a space in between. For contacts without either, this resulted in representation 1. This causes MS Outlook 2003 (potentially Outlook 2000 as well but this was not tested) to malfunction and completely fail to render the email.
This patch aims to fix the aforementioned issue.
Commits
-------
e491e3a594 [Mime] Trim and remove line breaks from NamedAddress name arg
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] remove patch release BC layer of durable and expiring delay
| Q | A
| ------------- | ---
| Branch? | 4.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 |
| License | MIT
| Doc PR |
Removes the small BC layer of #33127 from 4.3 in 4.4
Commits
-------
d5aaf44529 [Messenger] remove patch release BC layer of durable and expiring delay
This PR was merged into the 4.4 branch.
Discussion
----------
[4.4] Add return types on internal|final|private methods (bis)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Found while working on #33259
`: self` is used for final methods only. I'd have preferred using `: object` but that's not possible on PHP 7.1
Commits
-------
23faee406f [4.4] Add return types on internal|final|private methods (bis)
This PR was merged into the 4.4 branch.
Discussion
----------
Add types to routing and DI configuration traits.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | I don't think so.
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179, #33228
| License | MIT
| Doc PR | N/A
This PR backports the type declarations added to the configurator traits of the Routing and DI components. These traits expose only final methods, so it should be pretty safe to add return types to them.
The only scenario I could make up where this change will break something is if a trait is used to override a method: https://3v4l.org/EAsk8 But I doubt that those traits are used that way.
On master, we've used the `object` return type for the fluent methods. That type is not available on 4.4 where we have to support php 7.1. I'm using `self` instead. Since the methods are final and thus cannot be overridden, I believe that we shouldn't run into covariance issues here, so `self` should be safe.
Commits
-------
1ca30c97e6 Add types to roting and DI configuration traits.
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Registering basic exception handler to handle early failures
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This behavior was previously handled by the removed `ExceptionHandler` class in https://github.com/symfony/symfony/pull/32637.
As this method is mainly called during Kernel boot, where nothing is yet available, the Response content is always HTML. Otherwise, If all goes well on booting, this exception handler will be replaced in `DebugHandlersListener` class:
8073b8abfb/src/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php (L139)
where the advanced exception handler mechanism is activated.
Commits
-------
a2077a2369 Registers basic exception handler to handle early failures
This PR was merged into the 4.3 branch.
Discussion
----------
Revert "bug #33092 [DependencyInjection] Improve an exception message"
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As reminded by @ro0NL in https://github.com/symfony/symfony/pull/33092#issuecomment-520138148, it looks like we forgot that `CheckDefinitionValidityPass` already checks and suggests for leading slashes.
Why didn't you get the exception from `CheckDefinitionValidityPass` @fabpot?
Commits
-------
ed590ca16b Revert "bug #33092 [DependencyInjection] Improve an exception message (fabpot)"
This PR was squashed before being merged into the 4.3 branch (closes#33124).
Discussion
----------
[Config] Add handling for ignored keys in ArrayNode::mergeValues.
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33101
| License | MIT
| Doc PR | N/A
Fix case where normalized data accepting and keeping ignored keys is rejected during merge.
Commits
-------
311e1c4e9e [Config] Add handling for ignored keys in ArrayNode::mergeValues.
This PR was merged into the 3.4 branch.
Discussion
----------
[Router] Fix TraceableUrlMatcher behaviour with trailing slash
| 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 | #32149
| License | MIT
| Doc PR | ¤
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This pull requests fixes the bug #32149. This issue was about TraceableUrlMatcher having a wrong behaviour regarding trailing slashes (according to UrlMatcher and documentation).
With this pull requests, the test class TraceableUrlMatcherTest now extends UrlMatcherTest, to prevent such behaviour digression.
Thanks @nicolas-grekas for his feedback on the issue #32149
Commits
-------
fd1cb443fd [Router] Fix TraceableUrlMatcher behaviour with trailing slash
This PR was merged into the 3.4 branch.
Discussion
----------
[Security/Core] UserInterface::getPassword() can return null
| 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 | -
Our very own `User` class can return null already.
Commits
-------
00d7f8cde7 [Security/Core] UserInterface::getPassword() can return null
This PR was merged into the 3.4 branch.
Discussion
----------
Fix inconsistent return points
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17201 in preparation for #33228
| License | MIT
| Doc PR | N/A
Inconsistent return points in methods prevent adding return types. I thought, I'll give it a try and fix them. After this PR, PhpStorm's inspection still finds 39 issues, but as far as I can tell, they're either false positives or fixture code.
Commits
-------
f5b6ee9de1 Fix inconsistent return points.
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] add return-types to generated containers
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A chunk of #33236 ready for 4.4
Commits
-------
917091955c [DI] add return-types to generated containers
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Make LdapUser implement EquatableInterface
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Bugfix because it is required for password migrations https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Ldap/Security/LdapUserProvider.php#L128
Commits
-------
ae255095ea [Ldap] Make LdapUser implement EquatableInterface
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Remove the auth mode DSN option and support in the eSMTP transport
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | n/a
| License | MIT
| Doc PR | -
The authentication mode can be automatically negotiated between the Mailer and the SMTP server. There is an option to force it to a given auth mode, but I don't see any valid use case. So, let's remove that feature.
Commits
-------
34cbda53c4 [Mailer] removed the auth mode DSN option and support in the eSMTP transport
* 4.3:
[Routing] Add a param annotation for $annot.
[DI] fix docblock
[Console] fix docblock
Add missing translations for Armenian locale
[Process] Added missing return type.
[Process] Doc block backport.
Added doc block for Registry::supports().
[Cache] Fix predis test
Don't duplicate addresses in Sendgrid Transport
Remove unnecessary statement
Fix some docblocks.
[Messenger] make delay exchange and queues durable like the normal ones by default
Cancel delayed message if handler fails
Added tests for #32370
* 3.4:
[Routing] Add a param annotation for $annot.
[DI] fix docblock
Add missing translations for Armenian locale
[Process] Doc block backport.
Fix some docblocks.
This PR was squashed before being merged into the 4.4 branch (closes#33212).
Discussion
----------
[VarDumper] Add test dump image
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- 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? | <!-- please add some, will be required by reviewers -->
| Fixed tickets | #33107. <!-- #-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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
8393a9b5c1 [VarDumper] Add test dump image
This PR was merged into the 4.4 branch.
Discussion
----------
Add types to private and final methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32179
| License | MIT
| Doc PR | N/A
Backports from #33154.
Commits
-------
1b880677d4 Add types to private and final methods.
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] DispatchAfterCurrentBusMiddleware does not cancel messages from delayed handlers
| Q | A
| ------------- | ---
| Branch? | 4.3 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes (thanks @Nyholm)
| Fixed tickets | #32370
| License | MIT
| Doc PR | -
This is a fix for #32370. There is no need for anything sophisticated. There is no recursion or fancy stuff going on, just a queue of message handled sequentially. A simple variable is enough to keep track of the queue state.
Thanks @Nyholm for the test, it would clearly have been the hardest part of the job.
Commits
-------
1f5c8a6790 Cancel delayed message if handler fails
35c76a385d Added tests for #32370
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] InMemoryTransport handle acknowledged and rejected messages
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs/pull/12045 <!-- required for new features -->
This PR do 2 things:
* Limit receiving messages from InMemoryTransport to 1 (reverted, another PR will fix the bug: worker does not stop when receiver return more messages than the number specify by the `--limit` option)
* Handle acknowledged and rejected messages in InMemoryTransport. Currently, it does not care about acknowledged and rejected messages. So it always return all messages that have been sent. So if we run console command `messenger:consume`, it will never stop, even though we set the `--limit` option.
For more information, please check the [reproduction](https://github.com/tienvx/symfony-messenger-in-memory-reproduction) project for the expected behavior.
See also my [messenger-memory-transport](https://github.com/tienvx/messenger-memory-transport) project
Commits
-------
71e7bdff22 [Messenger] InMemoryTransport handle acknowledged and rejected messages
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] make delay exchange and queues durable like the normal ones by default
| 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 | #32891
| License | MIT
| Doc PR |
This also imrproves BC of #32631 by only adding the new expiry argument in case the delay queue name was not overwritten using the options. I will remove the checks in 4.4 again. Please merge this PR before releasing the new 4.3 version so that 32631 and this PR are part of one release.
Commits
-------
e5ecda6de1 [Messenger] make delay exchange and queues durable like the normal ones by default
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Full alpha3 language support
| Q | A
| ------------- | ---
| Branch? | 4.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 | #33136
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
I'll validate some more cases with tests.
Commits
-------
29aee2ddf2 [Intl] Full alpha3 language support
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] Added call() method utility to turns any PHP error into \ErrorException
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32936
| License | MIT
| Doc PR | symfony/symfony-docs#...
**Issue**
There is no easy way to catch PHP warnings, though some progress has been made in this area for PHP 8.0 (https://wiki.php.net/rfc/consistent_type_errors).
**Before**
```php
$file = file_get_contents('unknown.txt');
// PHP Warning: file_get_contents(unknown.txt): failed to open stream: No such file or directory
// workaround:
$file = @file_get_contents('unknown.txt');
if (false === $file) {
$e = error_get_last();
throw new \ErrorException($e['message'], 0, $e['type'], $e['file'], $e['line']);
}
```
**After**
```php
$file = ErrorHandler::call('file_get_contents', 'unknown.txt');
// or
$file = ErrorHandler::call(static function () {
return file_get_contents('unknown.txt');
});
// or (PHP 7.4)
$file = ErrorHandler::call(fn () => file_get_contents('unknown.txt'));
```
All credits to @nicolas-grekas https://github.com/symfony/symfony/issues/32936#issuecomment-518152681 and @vudaltsov for the idea.
Commits
-------
0faa855b5e Added ErrorHandler::call() method utility to turns any PHP warnings into `\ErrorException`
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Validate country preferred alpha code mapping
| Q | A
| ------------- | ---
| Branch? | 4.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 -->
Use the same approach for the preferred alpha2-to-alpha3 code mapping, like Languages does. It provides us some more support in terms of maintenance.
The added `CD => COD` was previously implied based on ordering upstream.
Commits
-------
345305904b [Intl] Validate region preferred alpha code mapping
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Don't duplicate addresses in Sendgrid Transport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33135
| License | MIT
| Doc PR | N/A
Sendgrid requires the `to`, `cc` and `bcc` fields to be unique
Commits
-------
2706a9763f Don't duplicate addresses in Sendgrid Transport
The casting of `$id` to string inside the second foreach loop in `\Symfony\Component\DependencyInjection\Dumper\PhpDumper::addMethodMap` is redundant, as the variable is not used after the casting inside nor outside the loop (while still in the loop, it gets overriden upon next iteration).
Fixes#33206
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] fixed a PHP notice when there is no function in the stack trace of an Exception
| 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 | n/a
| License | MIT
| Doc PR | n/a
Under certain circumstances, the `function` is not present in the stack trace. That's the case for instance when an error occurs on a line like this one `return require "somefile";`.
Commits
-------
ddb47358ae [Console] fixed a PHP notice when there is no function
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorHandler] trigger deprecation in DebugClassLoader when child class misses a return type
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30123
| License | MIT
| Doc PR | TODO
I wanted to push something to show the advancement and get feedback.
I pushed two versions : one with dedicated functions for code clarity (DebugClassLoader.php) and one withtout (DebugClassLoader___.php). It would be nice if some people with Blackfire could compare the performances.
So let's be clear, we are never gonna be able to cover all cases! We can however cover the vast majority.
Current non covered cases and problems :
- We assume that if there is more than 2 returned types, we cannot do anything. Even if it could technically be possible.
- We assume that any returned type that doesn't fit our "returnable" types list is a class. We don't check at all if this class actualy exists.
- We don't handle spaces in types. The types stop at the first space.
- That means we don't handle (yet) the callable type with spaces (cf https://github.com/symfony/symfony/issues/29969)
- Vendor code extending other vendor core triggers the deprecations 😕
Commits
-------
aa338c8b42 Import return annotations from vendors
10fc13e4a7 [ErrorHandler] Handle return types in DebugClassLoader
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Explicit check
| 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 avoids a little conflict with #33140
data is not impacted (today), but i like to make our data selection as explicit as possible and avoid ever pulling in `deprecated` or e.g. `legacy` languages.
Commits
-------
fbd4ce4c5c [Intl] Explicit check
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix docblocks in Container*
| 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 | -
Backport from master.
Internally, services can be of any kind, but only `object|null` is allowed for public services.
Commits
-------
8e4d08fe95 [DI] fix docblocks in Container*
This PR was merged into the 3.4 branch.
Discussion
----------
Fix getMaxFilesize() returning zero
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32790
| License | MIT
With #32790 a BC break got introduced. Previously an empty `upload_max_filesize` returned `PHP_INT_MAX` but after the changes from #32790 it returns `0`.
Setting `upload_max_filesize` or `post_max_size` to `0` or `''` disables the limit so for both cases `PHP_INT_MAX` should be returned.
Commits
-------
f4c2ea5b73 Fix getMaxFilesize() returning zero
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] deprecate support for non-object services
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32411
| License | MIT
| Doc PR | -
Follows #32432 /cc @derrabus
Prepares for adding the `?object` return-type on master.
Commits
-------
7c01c4c80c [DI] deprecate support for non-object services
This PR was squashed before being merged into the 4.4 branch (closes#32845).
Discussion
----------
[HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32453
| License | MIT
| Doc PR | TODO
We already know that bundles must be compatible with many Symfony's versions, so it is very likely that current bundles won't be able to use this feature soon, unless they create symbolic links to support both structures.
The point is that this is already happening, so in the future when our bundles stop to support <=4.3 then you'll be sure to change the current directory structure.
We have recently added the `getPublicDir()` method in https://github.com/symfony/symfony/pull/31975, here I'm removing it in favor of hardcoding a new convention.
I've added some functional tests in which I've changed everything to this structure:
```
-- ModernBundle
|-- config/
|-- public/
|-- src/
|-- ModernBundle.php
|-- templates/
|-- translations/
```
WDYT?
Commits
-------
6996e1cbe2 [HttpKernel][FrameworkBundle] Add alternative convention for bundle directories
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] XliffLintCommand: allow .xliff file extension
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| License | MIT
I ran into a problem with XLIFF files having an *.xliff extension and a "target-language" attribute.
The command always outputted: There is a mismatch between the language included in the file name and the value used used in the "target-language" attribute of the file.
The "target-language" attribute was set to "en" and the filename was also "menu.en.xliff".
After reading the source code, I realized that this regex does not respect other valied file extensions such as "xliff" for these files and therefore throws this (rather confusing) error.
Commits
-------
dba6a21eac [Translation] XliffLintCommand: allow .xliff file extension
This PR was merged into the 4.4 branch.
Discussion
----------
[Serializer] Encode empty objects as objects, not arrays
Allows Normalizers to return a representation of an empty object that the encoder recognizes as such.
Often PHP code is relaxed about the difference betweens arrays and objects, and particularly empty arrays are ambiguous. This preserves objects that would otherwise have turned into arrays as objects in the encoding.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | No
| Deprecations? | No
| Tests pass? | yes
| Fixed tickets | #23019
| License | MIT
| Doc PR | I'll do it if/when this might be merged
Commits
-------
f28e826627 [Serializer] Encode empty objects as objects, not arrays
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] Add type declarations to private DefaultChoiceListFactory methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
These are the type declarations that can be safely added to private methods of the `DefaultChoiceListFactory` without breaking BC.
Commits
-------
9fc6ba66b3 Add type declarations to private DefaultChoiceListFactory methods
* 4.3:
cs fix
Fix return statements
[TwigBridge] add missing dep
Add false type to ChoiceListFactoryInterface::createView $label argument
Update UPGRADE guide of 4.3 for EventDispatcher
[SecurityBundle] display the correct class name on the deprecated notice
This PR was merged into the 3.4 branch.
Discussion
----------
Fix return statements
| 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 | -
Discovered while working on #30323
This will sync the code from 3.4 up to master, where adding return types will require these.
Commits
-------
2bc05c83b4 Fix return statements
* 4.3:
cleanups
Disable PHPUnit result cache on the CI
[Security] Cleanup "Digest nonce has expired." translation
[Translation] Highlight invalid translation status
Added translations in validator for Serbian Cyrillic
Added translations in validator for Serbian Latin
[EventDispatcher] wrong Request class
[DependencyInjection] improved exception message
This PR was merged into the 3.4 branch.
Discussion
----------
Disable PHPUnit result cache on the CI
| 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 | -
We don't need it and disabling it works around the segfault on 4.3
Commits
-------
912d7db7dd Disable PHPUnit result cache on the CI
This PR was squashed before being merged into the 3.4 branch (closes#33096).
Discussion
----------
Added translations in validator for Serbian Cyrillic
Resolves#30188
Should be able for merges in branches >3.4, not sure how to do that tho :(
Commits
-------
23d4a23b46 Added translations in validator for Serbian Cyrillic
This PR was merged into the 4.4 branch.
Discussion
----------
[Intl] Support ISO 3166-1 Alpha-3 country codes
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20313
| Doc PR | symfony/symfony-docs#12105
| License | MIT
This is a pre-requiste for fixing #20313 and only handles the changes to the INTL component.
Commits
-------
848f60e905 Support ISO 3166-1 Alpha-3 country codes
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Allow objects implementing __toString() to be used as violation messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | I didn't see a doc on violations to update, but I'm happy to do documentation if somone can suggest the best place to do it.
Currently in the Drupal project we use Translatable Markup object to hold most strings and currently pass them in as Constraint Violation messages. In Symfony 3 this works but with the added typehinting in Symfony 4, these markup objects are rendered into strings at the time of the violation creation. This causes any html in the message string to be considered unsafe by twig later in our rendering process. This pr explicitly allows objects implementing a __toString() method to be used as violation messages, and the violation will save and return the original stringable object.
See https://www.drupal.org/project/drupal/issues/3029540 For our Drupal issue on the subject.
Commits
-------
79f4dcd2dc [Validator] Allow objects implementing __toString() to be used as violation messages
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Fix negative DateInterval
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33052
| License | MIT
| Doc PR | NA
This PR adds support for negative and signed DateInterval
Commits
-------
abb8a676ba Fix negative DateInterval
This PR was merged into the 4.3 branch.
Discussion
----------
[VarDumper] Fix test patern to handle callstack with/without return typehint
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
The TestCase::tearDownAfterClass methods does not always have the same signature which change the output of the reflection. This use another methods for testing
Commits
-------
feaadd1c0b Fix tst patern to handle callstack with/without return typehint
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] deprecate HeaderBag::get() returning an array and add all($key) instead
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | maybe <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31317 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
the $first param has been deprecated in the get methid
and we are adding a $key parameter to all to get all values from a key as arrays
Do we deprecated the get method ? if so this will be a little bigger in terms of changes.
Commits
-------
2c5a8f1bdf [HttpFoundation] deprecate using $first in get and added key in all
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix s-maxage=3 transient test
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
sometime the http server returns a `s-maxage=3` header (https://travis-ci.org/symfony/symfony/jobs/569326531)
This PR fixes tests to allow both 2 and 3
Commits
-------
f019b5214d Fix s-maxage=3 transient test
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] fix data loss when streaming as a PHP resource
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've just experienced failures like:
> StreamWrapper::stream_read - read 822 bytes more data than requested (9014 read, 8192 max) - excess data will be lost
This fixes it.
Commits
-------
99884e63b5 [HttpClient] fix data loss when streaming as a PHP resource
This PR was squashed before being merged into the 3.4 branch (closes#32800).
Discussion
----------
Improve some URLs
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- 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 <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
fab17a4487 Improve some URLs
This PR was merged into the 4.3 branch.
Discussion
----------
Fix deprecations on 4.3
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
Fix deprecations in branch 4.3
note: remaining deprecation `assertStringContainsString` will be fixed in #32977
* [ ] fix tests in branch 3.4 in #32981
Commits
-------
8fd16a6bee Fix deprecation on 4.3
This PR was merged into the 4.3 branch.
Discussion
----------
Disable typehint patch on PHPUnit
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR removes the `SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT` patch and adds a `: void` typehint on `setup` and `tearDown` methods in order to be compatible with PHPUnit 8
Commits
-------
a5af6c4cd7 Disable phpunit typehint patch on 4.3 branch
* 3.4:
consistently throw NotSupportException
[HttpKernel] Clarify error handler restoring process again
[Intl] fix nullable phpdocs and useless method visibility of internal class
Resilience against file_get_contents() race conditions.
This PR was merged into the 4.4 branch.
Discussion
----------
remove some more useless phpdocs
| Q | A
| ------------- | ---
| Branch? | 4.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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Fix some leftovers from #32974 and #32786
Commits
-------
9be4d171e0 remove some more useless phpdocs
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] fix nullable phpdocs and useless method visibility of internal class
| 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 |
| License | MIT
| Doc PR |
Fix stuff found in #32525
Commits
-------
63b71b5ade [Intl] fix nullable phpdocs and useless method visibility of internal class
This PR was merged into the 4.4 branch.
Discussion
----------
Turned return type annotations of private methods into php return types
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
As discussed with @nicolas-grekas in https://github.com/symfony/symfony/pull/30323#issuecomment-518638124, this PR attempts to turn `@return` annotations on private methods into return type declarations.
Commits
-------
f54ca001fe Turned return type annotations of private methods into php return types.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Clarify error handler restoring process again
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |https://github.com/symfony/symfony/issues/33024
| License | MIT
| Doc PR | -
Commits
-------
4ee54f0e84 [HttpKernel] Clarify error handler restoring process again
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle][Config] Ignore exceptions thrown during reflection classes autoload
| 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/32499 with PHP 7.3+
| License | MIT
| Doc PR | -
The behavior when an exception is thrown in a class loader changed in PHP 7.3 (cf https://3v4l.org/OQPk9). That means that the `throwOnRequiredClass` trick that is done in the parent class of these cache warmers (`AbstractPhpFileCacheWarmer`) does not work anymore with PHP7.3+.
Commits
-------
dbd9b75d86 [FrameworkBundle][Config] Ignore exeptions thrown during reflection classes autoload
This PR was merged into the 3.4 branch.
Discussion
----------
Fix some return type annotations
| 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
This PR fixed some incorrect return type declarations I discovered while working on #32993.
Commits
-------
0a78dc0f6f Fix some return type annotations.
* 4.3:
Fix inconsistent return points.
pass translation parameters to the trans filter
[Mime] fixed wrong mimetype
[ProxyManagerBridge] Polyfill for unmaintained version
[HttpClient] Declare `$active` first to prevent weird issue
Remove deprecated assertContains
[HttpClient] fix tests
SCA: dropped unused mocks, duplicate import and a function alias usage
Added correct plural for box -> boxes
[Config] fix test
Fix remaining tests
Improve fa (persian) translation
This PR was squashed before being merged into the 4.3 branch (closes#32986).
Discussion
----------
[Mime] fixed wrong mimetype
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32816
| License | MIT
When creating a datapart from an odt file (and some other extensions), the explode function for the picked mimetype gives a wrong result since there's no `application/` prefix for the first mimetype of this extension.
In this PR, all mimetypes without a prefix are removed.
Commits
-------
e1722c529a [Mime] fixed wrong mimetype
* 3.4:
[ProxyManagerBridge] Polyfill for unmaintained version
SCA: dropped unused mocks, duplicate import and a function alias usage
[Config] fix test
Improve fa (persian) translation
This PR was squashed before being merged into the 4.3 branch (closes#32989).
Discussion
----------
[HttpClient] Declare `$active` first to prevent weird issue
| 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? | - <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32833 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | no
In some undefined cases we can have the following error while using the WebTestCase/CurlHttpClient in PHPUnit:
![Sélection_999(101)](https://user-images.githubusercontent.com/2103975/62543336-0ad9e700-b85e-11e9-8b7f-d5b49e1d2d0d.png)
This is really weird because `$active` is a reference and so it does not need to be declared before, but doing that fixes the issue. (https://github.com/symfony/symfony/issues/32833#issuecomment-518658222)
I can't add tests because we were not able to reproduce the issue...
Commits
-------
ba030f0022 [HttpClient] Declare `$active` first to prevent weird issue
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] fix getName() when transport is null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ee4192ebc7 fix getName() when transport is null
This PR was squashed before being merged into the 4.4 branch (closes#32964).
Discussion
----------
add yceruto as code owner of the ErrorRenderer component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
df6e73dd2d add yceruto as code owner of the ErrorRenderer component
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Improve fa (persian) translation
| Q | A
| ------------- | ---
| Branch? | >= 3.4 <!-- 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 <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
4afdfd765d Improve fa (persian) translation
This PR was squashed before being merged into the 4.4 branch (closes#31546).
Discussion
----------
[Dotenv] Use default value when referenced variable is not set
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11956 <!-- required for new features -->
In bash you have the option to define a default variable like this:
```bash
FOO=${VARIABLE:-default}
```
When VARIABLE is not set
```bash
FOO=${VARIABLE:-default} #FOO=default
```
When VARIABLE is set:
```bash
VARIABLE=test
FOO=${VARIABLE:-default} #FOO=test
```
If others find this also a good idea, I will write documentation and add the Doc PR. But first I would like some feedback to check if anyone agrees with this feature.
Commits
-------
790dbad149 [Dotenv] Use default value when referenced variable is not set
* 4.3:
bump phpunit-bridge cache-id
Use assertStringContainsString when needed
Use assert assertContainsEquals when needed
Use assertEqualsWithDelta when required
* 3.4:
bump phpunit-bridge cache-id
Use assertStringContainsString when needed
Use assert assertContainsEquals when needed
Use assertEqualsWithDelta when required
This PR was merged into the 3.4 branch.
Discussion
----------
Use assertEqualsWithDelta when needed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replaces deprecated paramèter `$delta` of methods `assertEquals` by the dedicated method `assertEqualsWithDelta`
Commits
-------
3a0a901fdb Use assertEqualsWithDelta when required
This PR was merged into the 3.4 branch.
Discussion
----------
Use assertContainsEquals when needed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replaces deprecated paramèter `$checkForObjectIdentity` of methods `assertContains` by the dedicated method `assertContainsEquals`
Commits
-------
f842e59685 Use assert assertContainsEquals when needed
This PR was merged into the 3.4 branch.
Discussion
----------
Use assertStringContainsString when needed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR replaces deprecated assertContains to comparre string by the dedicated method `assertStringContainsString`
Commits
-------
058ef39bae Use assertStringContainsString when needed
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add support for the profiler
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | closes#31592
| License | MIT
| Doc PR | n/a
Web profiler for the Mailer.
Commits
-------
f152314e28 [Mailer] added support for the profiler
This PR was merged into the 3.4 branch.
Discussion
----------
Use PHPUnit short class name in tests comments
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Commits
-------
92bd9ec4b7 Use Phpunit FQDN in tests comments
This PR was squashed before being merged into the 3.4 branch (closes#32935).
Discussion
----------
[Form] Fix inconsistencies
| 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
- ~~Use `@inheritdoc` in `Button` and `ButtonBuilder` where the method does satisfy the contract.~~
- ~~Add `This method should not be invoked` in all unsupported methods in `Button` and `ButtonBuilder` for consistency.~~
- ~~Fix the misused `idempotent` term in implementations of the `getFormConfig` method. It is wrong in the sense that the method does not always return the same result. You can `setAttribute` for instance and `getFormConfig` will return a different config object.~~
- ~~Add `if ($this->locked)` checks in the supported mutators.~~
- ~~Fix the arguments contract in the `ChoiceListFactoryInterface` — now it supports `PropertyPathInterface` explicitly. The downside of it — breaking LSP in the `DefaultChoiceListFactory`.~~
- Fix the `$label` phpdoc of the `ChoiceView` (arised in https://github.com/symfony/symfony/pull/32237).
- Use `PropertyPathInterface` instead of `PropertyPath` in `PropertyAccessDecorator` of the choice factory.
- Fix `ArrayChoiceList::flatten` type hints.
These changes are debatable, so feel free to correct me if I am wrong at some point.
Ping @xabbuh , @HeahDude , @yceruto , @nicolas-grekas
Commits
-------
360711ce4e [Form] Fix inconsistencies
* 4.3:
Minor fixes
[HttpClient] Minor fixes
Use namespaced Phpunit classes
[Messenger] Fixed ConsumeMessagesCommand configuration
[Form] remove leftover int child phpdoc
Support DateTimeInterface in IntlDateFormatter::format
[PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
fixed phpdocs
Use PHPunit assertion
[Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
* 3.4:
Minor fixes
Use namespaced Phpunit classes
[Form] remove leftover int child phpdoc
Support DateTimeInterface in IntlDateFormatter::format
[PhpUnitBridge] fixed PHPUnit 8.3 compatibility: method handleError was renamed to __invoke
Use PHPunit assertion
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Support DateTimeInterface in IntlDateFormatter::format
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32898
| License | MIT
| Doc PR | N/A
Add support for `DateTimeInterface` to `IntlDateFormatter::format` which is supported since PHP 7.1.5.
Since this component supports PHP from 7.1.3, should version checks be added, to only support DateTimeInterface if PHP is >= 7.1.5 or should the minimum required PHP version bumped to 7.1.5?
Commits
-------
b1e160c41e Support DateTimeInterface in IntlDateFormatter::format
This PR was squashed before being merged into the 3.4 branch (closes#32941).
Discussion
----------
Use namespaced Phpunit classes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | need #32940
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR simplify tests by using PhpUnit namespace introduced in #32940
It also makes compatible with PHPUnit 8 (removed class PHPUnit_Framework_MockObject_MockObject)
Commits
-------
797ea2e4e2 Use namespaced Phpunit classes
This PR was merged into the 4.4 branch.
Discussion
----------
[Security] add support for opportunistic password migrations
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31139
| License | MIT
| Doc PR | -
| Maker PR | symfony/maker-bundle#389
With this last piece, we'll provide opportunistic password migrations out of the box.
This finishes the story drafted in #31153, see there for more info.
Commits
-------
2cfc5c7dd6 [Security] add support for opportunistic password migrations
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] Legacy test should implement legacy interface
| Q | A
| ------------- | ---
| Branch? | 4.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 | no <!-- #-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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This was updated wrongly when working on the removing the interface usage.
Commits
-------
920db2fc18 [Lock] Legacy test should implement legacy interface
This PR was merged into the 4.3 branch.
Discussion
----------
[Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
| 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 | https://github.com/symfony/symfony/pull/32676#pullrequestreview-270269786
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
includes #32918
Commits
-------
867e3de92f [Intl] Order alpha2 to alpha3 mapping + phpdoc fixes
This PR was merged into the 3.4 branch.
Discussion
----------
[cs-fixer] Use PhpUnit native assertions in filsystem checks
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
This PR change the minimal value of PhpUnit introduced in #32885 in branche 3.4.
Note: `5.6` is the highest value at the time.
Commits
-------
226bdd18fb Use PHPunit assertion
* 4.3:
[FrameworkBundle] Detect indirect env vars in routing
Remove calls to deprecated function assertAttributeX
[Intl] Order alpha2 to alpha3 mapping
[Routing] added a warning about the getRouteCollection() method
Allow sutFqcnResolver to return array
[HttpFoundation] Revert getClientIp @return docblock
* 3.4:
[FrameworkBundle] Detect indirect env vars in routing
Remove calls to deprecated function assertAttributeX
[Intl] Order alpha2 to alpha3 mapping
[Routing] added a warning about the getRouteCollection() method
Allow sutFqcnResolver to return array
[HttpFoundation] Revert getClientIp @return docblock
* 4.3:
[Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
[HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
Create mailBody with only attachments part present
[Messenger] Fix incompatibility with FrameworkBundle <4.3.1
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I feel like this might be easier to understand.
This is also the word I used in the doc.
Commits
-------
d2c4bf0da8 [HttpClient] use "idle" instead of "inactivity" when telling about the timeout option
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix incompatibility with FrameworkBundle <4.3.1
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32738
| License | MIT
| Doc PR | -
Aims to fix an edge case where you install (or upgrade to) symfony/messenger >=4.3.1 while having symfony/framework-bundle <4.3.1 installed.
Commits
-------
5d739704f2 [Messenger] Fix incompatibility with FrameworkBundle <4.3.1
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add security LdapUser and provider
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Moves `LdapUserProvider` from `Security\Core` to the Ldap component, the provider now deals with a new `LdapUser` aware of its ldap `Entry` (should help in #31843).
Commits
-------
6736cdfec3 [Ldap] Add security LdapUser and provider
This PR was squashed before being merged into the 4.3 branch (closes#32836).
Discussion
----------
[Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32585
| License | MIT
| Doc PR |
I edited the Doctrine Transport Connection class to use `?` placeholders in the query builder instead of named repositories as this resulted in a compatibility issue with SQL Server.
Commits
-------
fc0e4baf2f [Messenger] Removed named parameters and replaced with `?` placeholders for sqlsrv compatibility
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] type cannot be a FormTypeInterface anymore
| Q | A
| ------------- | ---
| Branch? | 4.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 |
| License | MIT
| Doc PR |
Found in #32237. This style of adding FormTypes has been removed in sf 3. Could also be merged in 3.4 if preferred. But there was an outdated, broken test. So 4.4 seems enough as well.
Commits
-------
6ee0d53c31 [Form] type cannot be a FormTypeInterface anymore
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorRenderer] Add alias to FlattenException to avoid BC break
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32473
| License | MIT
| Doc PR | -
Commits
-------
44b0e7d58c Created alias to FlattenException to avoid BC break
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Order alpha2 to alpha3 mapping
| 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 | https://github.com/symfony/symfony/pull/32676#discussion_r310201575
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
to move forward with #32676
Commits
-------
724f1f524f [Intl] Order alpha2 to alpha3 mapping
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Remove calls to deprecated function assertAttributeX
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR remove unecessary call to assertAttribute and replace assertAttributeX by Reflection when no alternative is available.
Commits
-------
d098c11539 Remove calls to deprecated function assertAttributeX
This PR was squashed before being merged into the 4.3 branch (closes#32814).
Discussion
----------
Create mailBody with only attachments part present
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32811
| License | MIT
Commits
-------
b500f92921 Create mailBody with only attachments part present
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Add a warning about the getRouteCollection() method
| 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 | n/a
| License | MIT
| Doc PR | n/a
In #19274, we tried to deprecate `RouterInterface::getRouteCollection()`, but failed at doing so. I propose to add a warning about why one should never use it at runtime as a first step.
Commits
-------
8863f0675d [Routing] added a warning about the getRouteCollection() method
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Add a name to the transports
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | n/a
| License | MIT
| Doc PR | n/a
Having a name for Transports helps identify them (useful for instance in the profiler when one uses several mailers).
Commits
-------
2412dfe71f [Mailer] added a name to the transport
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] Add AbstractPart::asDebugString()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | n/a
| License | MIT
| Doc PR | n/a
That helps debugging issues and will be displayed in the web profiler Mailer panel.
Commits
-------
f36c8c9881 [Mime] added AbstractPart::asDebugString()
This PR was merged into the 4.4 branch.
Discussion
----------
[Yaml] Add flag to dump NULL as ~
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/12071
This PR adds the ability to dump `null` as `~` by a new Flag `Yaml::DUMP_NULL_AS_TILDE`:
```diff
- foo: null
+ foo: ~
```
Todos:
- [x] Fix/add tests
Commits
-------
749c11d94c [Yaml] Add flag to dump NULL as ~
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Revert getClientIp @return docblock
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This PR reverts https://github.com/symfony/symfony/pull/22418, see the comment https://github.com/symfony/symfony/pull/22418#issuecomment-513256687
Commits
-------
7568d3452d [HttpFoundation] Revert getClientIp @return docblock
* 4.3:
Fix tests on console
cs fix
Fix path to phpunit binary
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
* 3.4:
Fix tests on console
cs fix
Fix path to phpunit binary
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Fix tests not executed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Commits
-------
bfd5d4e362 Fix tests on console
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
[Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| License | MIT
In additional for PR: https://github.com/symfony/symfony/pull/32862
Commits
-------
faef73888e [Yaml] PHP-8: Uncaught TypeError: abs() expects parameter 1 to be int or float, string given
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Remove use of ForwardCompatTrait
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
With #32882 the ForwardCompatibilityTrait is injected in TestCase which now act as a true polyfill
Commits
-------
ac6242f36b Remove use of ForwardCompatTrait
This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes#32870).
Discussion
----------
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Tests pass? | yes
| Fixed tickets | #32853
| License | MIT
Commits
-------
7cf9ed613b#32853 Check if $this->parameters is array.
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] added debug info to TransportExceptionInterface
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | n/a
| License | MIT
| Doc PR | ~
In 4.4, you can get the debug information for the SMTP/HTTP data via `$message->getDebug()` (see #32583). But the data are probably even more important when there is an exception. That's what I implemented in this PR.
Commits
-------
39ebb84602 [Mailer] added debug info to TransportExceptionInterface
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Fix error not being thrown properly
| 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 | n/a
| License | MIT
| Doc PR | n/a
When the SMTP server returns a fatal error, the error is not thrown properly as catched and another error (empty) is thrown. That makes debugging very difficult and what we would expect anyway.
Commits
-------
15dbe4b948 [Mailer] fixed error that is masked by another error
This PR was squashed before being merged into the 4.4 branch (closes#32504).
Discussion
----------
[ErrorRenderer] Add DebugCommand for easy debugging and testing
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
![debug-error-renderer](https://user-images.githubusercontent.com/2028198/61086533-170a8a00-a401-11e9-89a6-3b8195ba80c1.gif)
This command helps you test built-in renderers and others provided by third-party packages (thinking API-Platform, FOSRestBundle, etc.) without requiring the TwigBundle preview mechanism.
<del>This also fixes a bug in `ErrorRendererPass` related to the order of priorities.</del>
Commits
-------
97c89686b1 [ErrorRenderer] Add DebugCommand for easy debugging and testing
This PR was merged into the 4.3 branch.
Discussion
----------
Sync "not implementing the method" deprecations messages
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Suggested in https://github.com/symfony/symfony/pull/32747#discussion_r309307289
Useful for consistency and for future reference for similar messages.
Commits
-------
f6fae1c361 Sync "not implementing the method" deprecations messages
This PR was merged into the 4.4 branch.
Discussion
----------
[PhpUnitBridge] Fix deprecation assertInternalType - 4.4
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR fixes PhpUnit deprecation :
> assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead
follow #32846 for 4.4 branch
Commits
-------
51ba6651aa Fix assertInternalType deprecation in phpunit 9
* 4.3:
Fix assertInternalType deprecation in phpunit 9
Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
This PR was merged into the 4.3 branch.
Discussion
----------
[PhpUnitBridge] Fix deprecation assertInternalType - 4.3
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32844
| License | MIT
| Doc PR | NA
This PR fixes PhpUnit deprecation :
> assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead
follow #32846 for 4.3 branch
Commits
-------
aa58789542 Fix assertInternalType deprecation in phpunit 9
This PR was squashed before being merged into the 4.3 branch (closes#32854).
Discussion
----------
Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | https://github.com/symfony/symfony/issues/32844
| License | MIT
| Doc PR | n/a
Please bear with me as this is my first pr to symfony. Branched off 4.3 as requested here: https://github.com/symfony/symfony/issues/32844
Tests currently do not pass due to:
```
PHP Fatal error: Declaration of Symfony\Bridge\Monolog\Logger::reset() must be compatible with Monolog\Logger::reset(): void in /home/luis/Projects/symfony/src/Symfony/Bridge/Monolog/Logger.php on line 23
```
Commits
-------
97bcb5da50 Ensure signatures for setUp|tearDown|setUpAfterClass|tearDownAfterClass methods in tests are compatible with phpunit 8.2
This PR was merged into the 4.4 branch.
Discussion
----------
add parameter type declarations to private methods
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
1b2aaa4a06 add parameter type declarations to private methods
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] Allow dumping the container in one file instead of many files
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Replaces #32119
As spotted by @lyrixx, putting all service factories in one big container can be easier to manage with workers. It could also play well with PHP7.4's preloading.
This PR adds a `container.dumper.inline_factories` parameter to enable this behavior.
When it is set to true, a single big container file is created.
Commits
-------
c893986815 [DI] Allow dumping the container in one file instead of many files
This PR was squashed before being merged into the 4.4 branch (closes#32665).
Discussion
----------
[ErrorHandler] Relax transition to the new Debug class
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Alternative of https://github.com/symfony/recipes/pull/630
This would solve the bug in `bin/console.php` and `public/index.php` for existing projects migrating to 4.4 without requiring symfony/debug.
/cc @nicolas-grekas
Commits
-------
3216caf430 [ErrorHandler] Relax transition to the new Debug class
This PR was squashed before being merged into the 4.4 branch (closes#32812).
Discussion
----------
[ErrorHandler] Added type declarations where possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've added type declarations where possible (method parameters & return types). DocBlocks were replaced too if the type declarations made them redundant.
Void returns were replaced whenever necessary.
Also on one occasion the setting of the exceptionHandler was replaced by a function call, which did practically the same thing.
Commits
-------
ab6aae1a29 [ErrorHandler] Added type declarations where possible
This PR was squashed before being merged into the 4.4 branch (closes#32831).
Discussion
----------
[Security] Revise UserPasswordEncoderInterface::needsRehash()
| Q | A
| ------------- | ---
| Branch? | 4.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 reuses the encoded password from the user for the `UserPasswordEncoderInterface`, similar we dont pass the encoded string to `isPasswordValid()`.
This differs from the non-user aware `PasswordEncoderInterface`
cc @nicolas-grekas did i miss something?
Commits
-------
c5a283d417 [Security] Revise UserPasswordEncoderInterface::needsRehash()
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Preserve the case of headers when sending them
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32819
| License | MIT
| Doc PR | -
Some hosts are case sensitive, let's present headers in the submitted form.
Commits
-------
9ac85d5d8b [HttpClient] Preserve the case of headers when sending them
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] update type of form $name arguments
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32821
| License | MIT
| Doc PR | -
An alternative to #32821: where a string is expected, passing an int is fine, per PHP casting rules.
Commits
-------
6d4dcadd66 [Form] update type of form $name arguments
* 4.3:
Fix travis script
minor fix for wrong case
[HttpFoundation] Fix `getMaxFilesize`
[Cache] fix warning on PHP 7.4
[Console] fix warning on PHP 7.4
Don't add value of (default/static) objects to the signature
fix(yml): fix comment in milti line value
Make sure trace_level is always defined
Fix bindings and tagged_locator
Recompile container when translations directory changes
* 3.4:
Fix travis script
minor fix for wrong case
[HttpFoundation] Fix `getMaxFilesize`
[Cache] fix warning on PHP 7.4
[Console] fix warning on PHP 7.4
Don't add value of (default/static) objects to the signature
fix(yml): fix comment in milti line value
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] minor fix for wrong method name case
| 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 | -
Minor replacement of wrong case for function name, needs to be fixed in 3.4 as hinten [here](https://github.com/symfony/symfony/pull/32812#discussion_r308815666).
Commits
-------
8b2d67b minor fix for wrong case
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] fix comment in multi line value
| Q | A
| ------------- | ---
| Branch? | 4.3 and lower <!-- see below -->
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32667 <!-- #-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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Comments after blank lines are read as value in yaml.
```
`$yaml = <<<YAML
parameters:
abc
# Comment
YAML;
var_dump(Symfony\Component\Yaml\Yaml::parse($yaml));`
```
**Result before fix:**
```
array(1) {
["parameters"]=>
string(13) "abc
# Comment"
}
```
**Result after fix:**
```
array(1) {
["parameters"]=>
string(3) "abc"
}
```
Commits
-------
dd945e375c fix(yml): fix comment in milti line value
This PR was squashed before being merged into the 3.4 branch (closes#32790).
Discussion
----------
[HttpFoundation] Fix `getMaxFilesize`
When checking for the maximum size of an uploaded file you can't just rely on `upload_max_filesize` since the request might also exceed `post_max_size`. Also discussed in contao/contao#498
| 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 | -
Commits
-------
54107bac33 [HttpFoundation] Fix `getMaxFilesize`
This PR was merged into the 4.4 branch.
Discussion
----------
Ensure $request->hasSession() is always checked before calling getSession()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
7b2c326719 Ensure $request->hasSession() is always checked before calling getSession()
This PR was merged into the 4.3 branch.
Discussion
----------
[DependencyInjection] Fix bindings and tagged_locator
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| 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 |
Working `tagged_locator`
```yaml
App\XXX:
arguments:
$taggedLocator: !tagged_locator { tag: 'my_tag', index_by: 'my_key' }
```
Not working `tagged_locator`
```yaml
App\XXX:
bind:
$taggedLocator: !tagged_locator { tag: 'my_tag', index_by: 'my_key' }
```
Currently `ResolveBindingsPass` is executed after `ServiceLocatorTagPass`, which produces empty service locators when using `bind`.
I'm proposing to change the optimization passes order, so that this issue is solved.
I'm not confident with the impact, so let's discuss about it.
Commits
-------
bf4c713ad7 Fix bindings and tagged_locator
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix dumping Doctrine-like service graphs (bis)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30091, #29637
| License | MIT
| Doc PR | -
Dumping the container while accounting for circular references is hard :)
Commits
-------
a37f3e0807 [DI] Fix dumping Doctrine-like service graphs (bis)
ee491444f4 Failing test case for complex near-circular situation + lazy
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] do not stopwatch sections when profiler is disabled
| 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 |
| License | MIT
| Doc PR |
the toolbar and profiler panel disable to profiler which then does not set the X-Debug-Token. so when the header does not exist, do not call the stopwatch methods with `null` which violates the contract and does not make sense. found with #32242
Commits
-------
8718cd1b15 [HttpKernel] do not stopwatch sections when profiler is disabled
This PR was merged into the 4.4 branch.
Discussion
----------
[Form][DX] derive default timezone from reference_date option when possible
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Currently, when `reference_date` and `model_timezone` are provided but are not the same, we get a validation exception:
9216cb75ac/src/Symfony/Component/Form/Extension/Core/Type/TimeType.php (L48-L50)
But that happen even if the `model_timezone` is `null` !
I propose to relax this behavior by passing the time zone of the configured `reference_date` to this `model_timezone` (by default), thus avoiding annoyances.
Commits
-------
a62feea4ad [DX] derive default timezone from reference_date option when possible
the toolbar and profiler panel disable to profiler which then does not set the X-Debug-Token. so when the header does not exist, do not call the stopwatch methods with null which violates the contract and does not make sense
This PR was squashed before being merged into the 4.3 branch (closes#32641).
Discussion
----------
[Messenger] Retrieve table default options from the SchemaManager
| 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 | #32321 <!-- #-prefixed issue number(s), if any -->
| License | MIT
This PR modify the Connection of the Doctrine Transport. It is now possible to specify a `SchemaConfig` that will be used when generating tables.
If Doctrine is configured as the following :
```yml
# config/packages/doctrine.yaml
doctrine:
dbal:
default_table_options:
charset: 'utf8mb4'
collate: 'utf8mb4_unicode_ci'
```
Then those options are used to create the table.
ping @weaverryan 😉
Commits
-------
93d0dc825e [Messenger] Retrieve table default options from the SchemaManager
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix redis last error not cleared between calls
| 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 | -
Not clearing it gives misleading errors coming from previous calls which makes debugging hard.
@alexander-schranz FYI
Commits
-------
9c263ffca8 [Messenger] Fix redis last error not cleared between calls
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][Profiler] Attempt to give more useful source info when using HandleTrait
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
### Before
<img width="1052" alt="Capture d’écran 2019-07-25 à 15 02 03" src="https://user-images.githubusercontent.com/2211145/61883193-3e318300-aefa-11e9-9179-a40c7c5aac93.png">
### After
<img width="1054" alt="Capture d’écran 2019-07-25 à 14 59 27" src="https://user-images.githubusercontent.com/2211145/61883192-3d98ec80-aefa-11e9-8f29-df9c417e8025.png">
which works for both examples using the trait in https://symfony.com/doc/current/messenger/handler_results.html
Commits
-------
9ac7e4223c [Messenger][Profiler] Attempt to give more useful source info when using HandleTrait
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][Profiler] Collect the stamps at the end of dispatch
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Currently, only the stamps added before dispatching the message are shown in the profiler.
This PR adds a section to show stamps after dispatch (`HandledStamp`, `SentStamp`, ...).
![Capture d’écran 2019-07-23 à 15 44 04](https://user-images.githubusercontent.com/2211145/61717102-bb28f500-ad60-11e9-93ec-bb2875d176ce.png)
Commits
-------
ee68b1dfa7 [Messenger][Profiler] Collect the stamps at the end of dispatch
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] added support for Imagine/Image
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
![image](https://user-images.githubusercontent.com/408368/61811135-19c5a000-ae41-11e9-88f1-9f5823e9ca80.png)
Commits
-------
c8d420ddff [VarDumper] added support for Imagine/Image
This PR was merged into the 4.3 branch.
Discussion
----------
[Inflector] Fix pluralizing words ending with "son"
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32713
| License | MIT
| Doc PR | -
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
bf608aaf3c Fix pluralizing "season"
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer] Make transport factory test case public
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, failures looks like irrelevant
| Fixed tickets | -
| License | MIT
| Doc PR | -
`TransportFactoryTestCase` could be useful when you adding custom transport and need cover their transport factory with tests.
Commits
-------
5d64009ae0 [Mailer] Make transport factory test case public
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] use a reference date to handle times during DST
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #18366
| License | MIT
| Doc PR |
Commits
-------
39c98b9a08 use a reference date to handle times during DST
This PR was squashed before being merged into the 4.4 branch (closes#32637).
Discussion
----------
[ErrorHandler] Decouple from ErrorRenderer component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | part of https://github.com/symfony/symfony/issues/32605
| License | MIT
| Doc PR | -
built on top of https://github.com/symfony/symfony/pull/32636 (See 2nd commit only)
Commits
-------
8f13fc013d [ErrorHandler] Decouple from ErrorRenderer component
* 4.3:
[Security/Core] align defaults for sodium with PHP 7.4
fix inline handling when dumping tagged values
[HttpClient] fix canceling responses in a streaming loop
[Messenger] Flatten collection of stamps collected by the traceable middleware
[PropertyAccess] Fix PropertyAccessorCollectionTest
[HttpClient] rewind stream when using Psr18Client
Typo in web profiler
[4.3] Remove dead test fixtures
[Routing] Fix CHANGELOG
relax some date parser patterns
Avoid getting right to left style
* 4.2:
fix inline handling when dumping tagged values
[Messenger] Flatten collection of stamps collected by the traceable middleware
[PropertyAccess] Fix PropertyAccessorCollectionTest
Typo in web profiler
relax some date parser patterns
Avoid getting right to left style
* 3.4:
fix inline handling when dumping tagged values
[PropertyAccess] Fix PropertyAccessorCollectionTest
Typo in web profiler
relax some date parser patterns
Avoid getting right to left style
This PR was squashed before being merged into the 4.4 branch (closes#32587).
Discussion
----------
[Form][Validator] Generate accept attribute with file constraint and mime types option
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes
| Fixed tickets | #29327
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Generate the html `accept` attribute based on the file constraint and mime types option.
Is it necessary to add this feature in the documentation ?
Made with @Timherlaud
_Sorry I have recreated this pull request because I missed my rebase_
Commits
-------
5a7b737ea3 [Form][Validator] Generate accept attribute with file constraint and mime types option
This PR was merged into the 4.4 branch.
Discussion
----------
[Form] repeat preferred choices in list of all choices
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10271
| License | MIT
| Doc PR |
Commits
-------
475c7a469a adapt tests
b946b11d5a [Form] Repeat preferred choices in the main list
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger][Profiler] Remove cutting caster to dump full objects
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Obviously, not the ideal solution, but might open the discussion. Not being able to inspect more than 1 level deep in the profiler when dealing with DTOs and VOs in your messages is a pain 😕. You can't either access the `HandledStamp` `result` for instance.
This caster truncating collectors data was originally added in #23465 to mitigate performances issues, especially with the Form profiler. But actually a lot of useful information are now hidden to the developper.
Opting-out per collector might be a start. Either allowing to do it through config, or directly in code where sensible.
Commits
-------
e4fc5c07ab [Messenger][Profiler] Remove cutting caster to dump full objects
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] rewind streams created from strings
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #32689 for 4.4
Commits
-------
33ed4e43c4 [HttpClient] rewind streams created from strings
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] rewind stream when using Psr18Client
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/issues/11996
| License | MIT
| Doc PR | -
This is not a bug fix technically but just how PSR-7 works.
I'm glad we did not make it a first-class thing in Symfony.
This makes it a bit more practicable if it can be...
Commits
-------
7f4362bd46 [HttpClient] rewind stream when using Psr18Client
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyAccess] Fix PropertyAccessorCollectionTest
| 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 | -
In https://github.com/symfony/symfony/pull/32627, I (a script actually) removed 2 fixtures classes from this test class. They are actually used but by tests that don't fail without them 😁 (because they were mocked and it's possible to mock non existing classes).
This PR restores those 2 classes and remove the unneeded mocks so the tests use the real classes and are actually useful.
Commits
-------
a310bac624 [PropertyAccess] Fix PropertyAccessorCollectionTest
* 4.3:
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
ignore not existing translator service
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
revert private properties handling
[HttpFoundation] Fix URLs
[VarDumper] finish PHP 7.4 support and add tests
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
Ignore missing translation dependency in FrameworkBundle
[Security/Http] Don't mark AbstractAuthenticationListener as internal
Remove dead tests fixtures
Remove more dead tests fixtures
[Mime] Add missing changelog entry for BC-break
[Messenger] fix transport_name option not passing validation
Remove dead tests fixtures
[Debug][ExceptionHandler] Add tests for custom handlers
* 4.2:
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
ignore not existing translator service
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
revert private properties handling
[HttpFoundation] Fix URLs
[VarDumper] finish PHP 7.4 support and add tests
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
Ignore missing translation dependency in FrameworkBundle
Remove dead tests fixtures
Remove more dead tests fixtures
Remove dead tests fixtures
[Debug][ExceptionHandler] Add tests for custom handlers
* 3.4:
[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
revert private properties handling
[HttpFoundation] Fix URLs
[VarDumper] finish PHP 7.4 support and add tests
[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
Ignore missing translation dependency in FrameworkBundle
[Debug][ExceptionHandler] Add tests for custom handlers
This PR was merged into the 4.4 branch.
Discussion
----------
[Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/30926#discussion_r281170917
| License | MIT
| Doc PR | -
This PR aims at deprecating some things to have a more consistent code.
### ServiceRouterLoader
1. This class actually fetches an object from a container. In https://github.com/symfony/symfony/pull/30926#discussion_r281170917, it was suggested that it should be renamed to `ContainerRouteLoader`. Actually I think it's better to rename it to `ContainerLoader` since all others route loaders does not have "Route" in their name. Let's be consistent!
2. This class is in a `DependencyInjection` sub directory for historical reasons. Let's remove that! It accepts any PSR-11 container.
### ObjectRouteLoader
1. This class has "Route" in its name too. Let's rename it!
2. This class is supposed to be an abstract implementation for "object" loaders to reuse, but in its code it has a lot of references to "services". Let's remove those references! That means renaming some methods, altering messages, etc.. That also means removing the `supports` method from it to let extending classes implement it.
3. IMHO, this abstract implementation is useless. We sould just deprecate the whole class and move the implemention in the `ContainerLoader` class.
Commits
-------
154810119d [Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][ExceptionHandler] Add tests for custom handlers
| 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 | -
In https://github.com/symfony/symfony/pull/31694 I mixed many things but the whole PR was closed. I wrote some tests for custom handlers + the handle tests don't use mock anymore
I think they are useful even if the `ExceptionHandler` will disappear in the new component because it will still exists in 4.4 for the next 3 years.
Commits
-------
c53e25332a [Debug][ExceptionHandler] Add tests for custom handlers
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] Add missing changelog entry for Factory deprecation
| Q | A
| ------------- | ---
| Branch? | 4.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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | None <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Add missing changelog entry for the deprecation of the Factory into LockFactory
Commits
-------
c6daa617b0 [Lock] Add missing changelog entry for Factory deprecation
This PR was squashed before being merged into the 3.4 branch (closes#32632).
Discussion
----------
[HttpFoundation] Fix URLs
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- 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 <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
be53c593dc [HttpFoundation] Fix URLs
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorRenderer] Fixed the priority order of the error renderers registration
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted in https://github.com/symfony/symfony/pull/31398 and https://github.com/symfony/symfony/pull/32504
Commits
-------
710b51dcb1 Fixed the priority order of the error renderers registration
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorRenderer] Making debug = false by default and cleanup
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Consistent with other places where the default value is `false`.
Commits
-------
b28986f119 Making debug = false by default and cleanup
This PR was merged into the 4.4 branch.
Discussion
----------
[Mailer][DX] Improve exception message for unsupported scheme
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | waiting for Travis
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR improves exception message for unsupported schemes by providing list of available. Throw something like: ` 'The "foo" scheme is not supported for mailer "mailgun". Supported schemes are: "api", "http", "smtp".'`
Commits
-------
8c24a537c7 [Mailer][DX] Improve exception message for unsupported scheme
the doctrine transport connection validates the options and complains about this option, so we remove it before. the purpose is for custom transport factories anyway
This PR was merged into the 3.4 branch.
Discussion
----------
Remove dead tests fixtures
| 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 | -
Once this is merged up to 4.2, I will check 4.2.
Commits
-------
f7e24c2c80 Remove dead tests fixtures
* 4.3:
fix tests
[Validator] Added support for validation of giga values
Fix Debug component tests
[Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes#32325)
[Messenger] pass transport name to factory
This PR was squashed before being merged into the 3.4 branch (closes#32485).
Discussion
----------
[Validator] Added support for validation of giga values
As described in issue #32479
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | just tested on my presta and it works. if further tests are necessary, it would be great if someone could help!
| Fixed tickets | #32479
| License | MIT
| Doc PR |
The validation(function normalizeBinaryFormat) in symfony/src/Symfony/Component/Validator/Constraints/File.php doesn't work with gigabyte values in php.ini.
In the PHP documentation it says "PHP allows shortcuts for byte values, including K (kilo), M (mega) and G (giga). " so in my opinion these values should work.
Thanks to @kijamve for the fix.
Commits
-------
969f2c4a81 [Validator] Added support for validation of giga values
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix UnrecoverableExceptionInterface handling
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32325
| License | MIT
| Doc PR | no
Fixed the handling of UnrecoverableExceptionInterface-Exceptions like suggested in [the issue thread](https://github.com/symfony/symfony/issues/32325#issuecomment-509351321).
Commits
-------
49bb7435f1 [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes#32325)
* 4.3:
Properly handle optional tag attributes for !tagged_iterator
[Mime] rename Headers::getAll() to all()
[Mailer] Fix phpdoc for variadic methods
[HttpClient] fix debug output added to stderr at shutdown
This PR was merged into the 4.3 branch.
Discussion
----------
Properly handle optional tag attributes for !tagged_iterator
| 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 | #32603
| License | MIT
| Doc PR | —
Properly handles all optional array keys when using `!tagged_iterator` in YAML service definitions.
This fixes a regression and adds a test case preventing it from coming up again
Commits
-------
d1c6580192 Properly handle optional tag attributes for !tagged_iterator
This PR was merged into the 4.3 branch.
Discussion
----------
[Mime] rename Headers::getAll() to all()
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
For consistency with HttpFoundation.
On 4.3 to cut spreading the previous name asap.
Allowed because the component is experimental.
Commits
-------
9252e75923 [Mime] rename Headers::getAll() to all()
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] Move non removing compiler passes to after removing passes
| Q | A
| ------------- | ---
| Branch? | Not sure - feels like something that should only change in a major version but /shrug
| Bug fix? | no
| New feature? | no
| BC breaks? | Is where each pass runs in PassConfig considered an API - not sure.
| Deprecations? | no
| Tests pass? | yes - no tests added because this is a sort of config change
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
At the moment PassConfig adds CheckExceptionOnInvalidReferenceBehaviorPass and ResolveHotPathPass as TYPE_REMOVE. But they don't remove services. This means that if you add a removing pass you need to run before all the other removing passes. You can use priority to do this but I think adding these passes here is logically a bit odd when TYPE_AFTER_REMOVING exists and could be leveraged.
I made this change against the master branch because maybe this is something you'd only want to change in a major version - not sure.
Commits
-------
88196ef4af [DI] Move non removing compiler passes to after removing passes
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Deprecate Process::inheritEnvironmentVariables()
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
IIUC, this method was kept as a BC layer from 3.4 to 4.0 to switch to the "inherit env vars" behavior, inciting developers to opt-in in 3.4. Since 4.0, env vars are always inherited, and this method doesn't allow to opt-out. So, time to remove it?
---
refs:
- https://github.com/symfony/symfony/pull/21470
- https://github.com/symfony/symfony/pull/22836
Commits
-------
af9bad31c6 [Process] Deprecate Process::inheritEnvironmentVariables()
This PR was squashed before being merged into the 4.4 branch (closes#32492).
Discussion
----------
[Lock] feature: lock split interface fix post-merge review
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yesish <!-- 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 | none <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
see https://github.com/symfony/symfony/pull/32198#pullrequestreview-259854210
Commits
-------
8173c475f3 [Lock] feature: lock split interface fix post-merge review
This PR was squashed before being merged into the 4.4 branch (closes#32583).
Discussion
----------
[Mailer] Logger vs debug mailer
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| 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 | n/a
| License | MIT
| Doc PR | n/a
Currently, there is no way to get the network data for the HTTP calls done by the HTTP transports (which makes debugging harder). For SMTP, we do have the network data, but as logs (each SMTP command/response is its own log line which means that the logs are "polluted" and the data is not tied with the sent message).
This pull request adds a `getDebug()` method on `SentMessage`. That allows to get the debug data conveniently in a standardized way (for both SMTP and HTTP transports). I have moved the SMTP logs to this new mechanism and added support for HTTP transports.
Commits
-------
fded3cd68c [Mailer] added support ffor debug info when using SMTP
d2f33d2cfe [Mailer] added debug info for HTTP mailers
* 4.3: (25 commits)
fix merge
[HttpClient] fix debug output added to stderr at shutdown
fix cs
Use mocks before replacing the error handler
[Config] Do not use absolute path when computing the vendor freshness
Bump minimum version of symfony/phpunit-bridge
Container*::getServiceIds() should return an array of string
[Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
[Validator] Add missing Russian and Ukrainian translations
[Translation] Use HTTPS and fix a url
[Config] Fix for signatures of typed properties
[Validator] Add missing Hungarian translations
[Validator] Add Lithuanian translation for Range validator
Add HTTPS to a URL
sync translation files
PHPDoc fixes
Add notInRange translation
Add danish translation for Range validator
Add german translation for Range validator
Update validators.es.xlf
...
* 4.2: (23 commits)
fix cs
Use mocks before replacing the error handler
[Config] Do not use absolute path when computing the vendor freshness
Bump minimum version of symfony/phpunit-bridge
Container*::getServiceIds() should return an array of string
[Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
[Validator] Add missing Russian and Ukrainian translations
[Translation] Use HTTPS and fix a url
[Config] Fix for signatures of typed properties
[Validator] Add missing Hungarian translations
[Validator] Add Lithuanian translation for Range validator
Add HTTPS to a URL
sync translation files
PHPDoc fixes
Add notInRange translation
Add danish translation for Range validator
Add german translation for Range validator
Update validators.es.xlf
[Validator] Add missing en and fr translation ids from 4.4
[Debug][DebugClassLoader] Don't check class if the included file don't exist
...
* 3.4: (23 commits)
fix cs
Use mocks before replacing the error handler
[Config] Do not use absolute path when computing the vendor freshness
Bump minimum version of symfony/phpunit-bridge
Container*::getServiceIds() should return an array of string
[Config][ReflectionClassResource] Use ternary instead of null coaelscing operator
[Validator] Add missing Russian and Ukrainian translations
[Translation] Use HTTPS and fix a url
[Config] Fix for signatures of typed properties
[Validator] Add missing Hungarian translations
[Validator] Add Lithuanian translation for Range validator
Add HTTPS to a URL
sync translation files
PHPDoc fixes
Add notInRange translation
Add danish translation for Range validator
Add german translation for Range validator
Update validators.es.xlf
[Validator] Add missing en and fr translation ids from 4.4
[Debug][DebugClassLoader] Don't check class if the included file don't exist
...
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Path resolution for FCGI configuration
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This tiny improvement allows to speedup location of PHP executable if script is runned via FCGI.
PHP configured to be runned via Apache module mod_fcgid(usually on Windows), PHP_SAPI contains 'cgi-fcgi' and PHP_BINARY refer to correct PHP binary executable, same as in case of running via CLI.
Commits
-------
22150bc771 [Process] Path resolution for FCGI configuration
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] XmlEncoder: don't cast padded strings
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| 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 | https://github.com/symfony/symfony/pull/23122#discussion_r121886667 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This was a suggestion of @nicolas-grekas in #23122. Which seems to have been forgotten.
But shouldn't we also avoid casting something like `.18`, `+18`, `-18`?
Commits
-------
c1bfaa1de4 [Serializer] XmlEncoder: don't cast padded strings
This PR was squashed before being merged into the 4.4 branch (closes#32471).
Discussion
----------
Add a new ErrorHandler component (mirror of the Debug component)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
On top of https://github.com/symfony/symfony/pull/32470
Commits
-------
b1b6e80a3d Add a new ErrorHandler component (mirror of the Debug component)
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Do not use absolute path when computing the vendor freshness
| 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 one uses Docker with a different mounting point between CLI & FPM,
the cache keeps regenerating because the ComposerResource class see a
different path for each SAPI. For example `/home/app/app/vendor` vs
`/var/www/app/vendor`.
So if you hit FPM, then the CLI, then FPM, each time a new cache is
generated. So the application is quite slow in dev env. And for people
on MacOSX (with docker) is a big pain! And obvisouly, this never
stabilizes !
This occurs a lot when you have a worker, that crash and reboot in the
background, and you browse the web interface. Or when you have something
that hit your API every X secondes, and you are working on a worker.
Commits
-------
2d2e2742c8 [Config] Do not use absolute path when computing the vendor freshness
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] Allow to configure VarDumperTestTrait casters & flags
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | TODO: showcase using `setUpVarDumper` in `setUp` or in specific test cases accordingly to the use-case. `tearDownVarDumper` is automatically called after each test case.
The VarDumper component is a great tool in tests to assert objects states.
The ability to register custom casters on need is a nice way to control only the fields you're expecting, or a way to write concise test cases.
Hence this feature allowing to configure casters specifically per test class/case.
Commits
-------
613dbb267d [VarDumper] Allow to configure VarDumperTestTrait casters & flags
When one uses Docker with a different mounting point between CLI & FPM,
the cache keeps regenerating because the ComposerResource class see a
different path for each SAPI. For example `/home/app/app/vendor` vs
`/var/www/app/vendor`.
So if you hit FPM, then the CLI, then FPM, each time a new cache is
generated. So the application is quite slow in dev env. And for people
on MacOSX (with docker) is a big pain! And obvisouly, this never
stabilizes !
This occurs a lot when you have a worker, that crash and reboot in the
background, and you browse the web interface. Or when you have something
that hit your API every X secondes, and you are working on a worker.
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] remove usage of the StoreInterface
| Q | A
| ------------- | ---
| Branch? |4.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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Followup PR according to the review of @nicolas-grekas in https://github.com/symfony/symfony/pull/32555#discussion_r303749752.
Commits
-------
9988844eb4 [Lock] remove uusage of the StoreInterface
This PR was merged into the 3.4 branch.
Discussion
----------
Container*::getServiceIds() should return strings
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | o
| Tests pass? | yes
| Fixed tickets | #32549
| License | MIT
Cast services ids to string in `Container*::getServiceIds()`
Commits
-------
9c88caad31 Container*::getServiceIds() should return an array of string
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Update Spanish translation for Range validator
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Part of #31503
| License | MIT
| Doc PR | -
Commits
-------
b5a96409b7 Update validators.es.xlf
* 4.3:
added missing test
[Mailer] Allow register mailer configuration in xml format
fixed CS
[FrameworkBundle] Fix descriptor of routes described as callable array
[Debug][DebugClassLoader] Include found files instead of requiring them
[HttpKernel] fix tests
Adding missing event_dispatcher wiring for messenger.middleware.send_message
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][DebugClassLoader] Don't check class if the included file doesn't 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 | -
Follow up to https://github.com/symfony/symfony/pull/32500.
If the included file doesn't exist, we need to return or the execution continues (if warnings are not thrown as exceptions) and then an invalid exception is thrown when the class is checked.
For example : "The autoloader expected class "App\Foo\Bar" to be defined in file "/var/www/html/vendor/composer/../../src/Foo/Bar.php". The file was found but the class was not in it, the class name or namespace probably has a typo".
Commits
-------
0185527297 [Debug][DebugClassLoader] Don't check class if the included file don't exist
This PR was squashed before being merged into the 3.4 branch (closes#32536).
Discussion
----------
[Translation] Use HTTPS and fix a url
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- 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 <!-- please add some, will be required by reviewers -->
| License | MIT
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
e346ee6888 [Translation] Use HTTPS and fix a url
This PR was squashed before being merged into the 3.4 branch (closes#32539).
Discussion
----------
[Validator] Add missing Hungarian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| 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 | - <!-- #-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 branch 4.4.
- Legacy code removals go to the master branch.
-->
It has 2 messages translated to Hungarian introduced in https://github.com/symfony/symfony/pull/27738 and https://github.com/symfony/symfony/pull/32435. AFAIK it should be based on 3.4, but tell me if I should rebase any of the commits.
Commits
-------
2fee9124ba [Validator] Add missing Hungarian translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add Lithuanian translation for Range validator
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- 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 <!-- please add some, will be required by reviewers -->
| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
Translation for #32435.
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
20ef151eb3 [Validator] Add Lithuanian translation for Range validator
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Name related PHPDoc fixes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | relates to #32179
| License | MIT
| Doc PR | n/a
As I started working on #32179 in #32237, I noticed some PHPDoc inconsistencies around the form's name. I have researched the issue thoroughly and here's my proposal:
1. All "factory" methods (`FormFactory::create*`, `ResolvedFormType::createBuilder`, `FormBuilder::create|add`, `Form::add`) currently accept string and integer names. This should not be deprecated, because it's very convenient and natural to pass ints when adding children to types like `ChoiceType` or `CollectionType`.
1. None of the "factory" methods explicitly accepts `null` as a name, although passing `null` works the same as passing `''`. I consider passing `null` in this case to be ugly, so I corrected the builder's constructors mentioning `null` as a possible argument. One should pass an empty string `''` when creating such a form. We could also deprecate passing `null` in a PR targeting 4.4.
1. Currently the name becomes a string in the builder's (or config builder's) constructor. Which means that `FormConfigInterface::getName` always returns a string and thus the form's `$name` property is always a string. All related checks and PHPDocs should be corrected.
1. The "children accessors" (`Form::has|get|remove`, `FormBuilder::has|get|remove`) should accept both strings and ints because they are array-accessible by design (so it does not really matter, if the key is a string or an int). If it's valid to have `$collectionForm->add(1, ItemType::class)`, then it should be valid to do `$collectionForm->get(1)`. And it works in code, but is not mentioned in the PHPDoc.
ping @nicolas-grekas , @xabbuh , @HeahDude
Commits
-------
eae95c4e49 PHPDoc fixes
This PR was merged into the 4.4 branch.
Discussion
----------
Add missing message parameter
| Q | A
| ------------- | ---
| Branch? | 4.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 | https://github.com/symfony/symfony/pull/32231#discussion_r301943379
| License | MIT
| Doc PR | —
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Add the missing parameter in the `sprintf()` call.
Found in https://github.com/symfony/symfony/pull/32231#discussion_r301943379
Commits
-------
a060642637 Replace missing message parameter
This PR was squashed before being merged into the 4.4 branch (closes#32435).
Discussion
----------
[Validator] Add a new constraint message when there is both min and max
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Part of #31503
| License | MIT
| Doc PR | to do
Currently, the failed validation messages in the `Range` constraint doesn't carry a notion of range. This can be confusing and error-prone if we report these messages to the user as-is.
This PR introduces a new message to the `Range` constraint (`This value should be between {{ min }} and {{ max }}.`) that will be displayed if both `min` and `max` are not `null`.
Commits
-------
c5488bcec1 [Validator] Add a new constraint message when there is both min and max
This PR was merged into the 4.4 branch.
Discussion
----------
[LDAP] add new option implemented in php 7.1
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- 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 | #18448 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Add new options to the LDAP connection class.
Commits
-------
d1a0ca6b9a [LDAP] add new option implemented in php 7.1
This PR was squashed before being merged into the 4.4 branch (closes#32452).
Discussion
----------
[Bundles] Rename getPublicPath() as getPublicDir()
| Q | A
| ------------- | ---
| Branch? | 4.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 | -
| License | MIT
| Doc PR | I'll add this if approved
While documenting #31975 (see https://github.com/symfony/symfony-docs/pull/11930) I realized that the `getPublicPath()` method name is not consistent with the rest of Symfony.
In Symfony, "path" is usually associated to routes and we use "dir" for things similar to this:
* `getCacheDir()` and `getLogdir()` to override Symfony structure (https://symfony.com/doc/current/configuration/override_dir_structure.html)
* `binDir`, `configDir`, `srcDir`, `varDir`, `publicDir` in Symfony Flex recipes (https://github.com/symfony/recipes) to override the dir structure
So, this PR proposes to rename `getPublicPath()` as `getPublicDir()`
Commits
-------
4ab2f9955b [Bundles] Rename getPublicPath() as getPublicDir()
This PR was merged into the 4.4 branch.
Discussion
----------
Remove experimental notice from components
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
@fabpot:
> Nothing can be marked as experimental in 4.4.
>
> https://github.com/symfony/symfony/pull/32277
Commits
-------
390c9a67bf Remove experimental notice from components
This PR was squashed before being merged into the 4.4 branch (closes#32470).
Discussion
----------
Rename ErrorCatcher to ErrorRenderer (rendering part only)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up https://github.com/symfony/symfony/pull/32377
Commits
-------
fb5b0429b2 Rename ErrorCatcher to ErrorRenderer (rendering part only)
* 4.3: (26 commits)
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Spell "triggering" properly
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[SecurityBundle] Fix profiler dump for non-invokable security listeners
fixed CS
[Messenger] Doctrine Transport: Support setting auto_setup from DSN
[Translator] Load plurals from po files properly
[Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
Add missing test for workflow dump description
[Intl] Remove --dev from intl compile autoloader
[Messenger] fix publishing headers set on AmqpStamp
Remove call to deprecated method
[Intl] Init compile tmp volume
...
* 4.2:
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[Translator] Load plurals from po files properly
[Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
[Intl] Remove --dev from intl compile autoloader
Remove call to deprecated method
[Intl] Init compile tmp volume
PHP 5 compat
Add test case
Update Request.php
Don't assume port 0 for X-Forwarded-Port
Load plurals from mo files properly
* 3.4:
Fix Twig 1.x compatibility
[Translator] Improve farsi(persian) translations for Form
Improve fa translations
Added tests to cover the possibility of having scalars as services.
fixed tests on old PHP versions
[FrameworkBundle] Inform the user when save_path will be ignored
fixed CS
[Translator] Load plurals from po files properly
[EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
[Console] Update to inherit and add licence
[Intl] Remove --dev from intl compile autoloader
[Intl] Init compile tmp volume
PHP 5 compat
Add test case
Update Request.php
Don't assume port 0 for X-Forwarded-Port
Load plurals from mo files properly
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] rename and deprecate Factory into LockFactory
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes<!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
As highlighted in https://github.com/symfony/symfony/pull/32198#pullrequestreview-255808664 we need to rename the factory to LockFactory for consistency and readability.
Commits
-------
fc75eb9bef [Lock] rename and deprecate Factory into LockFactory
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] Added tests to cover the possibility of having scalars as services
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32411
| License | MIT
| Doc PR | N/A
Commits
-------
60939d988d Added tests to cover the possibility of having scalars as services.
This PR was squashed before being merged into the 4.4 branch (closes#31975).
Discussion
----------
Dynamic bundle assets
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (new method in interface as annotation)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29213
| License | MIT
| Doc PR | none (yet)
Everything is explained in linked issue
Commits
-------
c16fcc93e2 Dynamic bundle assets
This PR was squashed before being merged into the 4.4 branch (closes#32377).
Discussion
----------
[Debug] Restoring back the state of the Debug component (1st step)
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32371
| License | MIT
After a good discussion with @nicolas-grekas, we made the decision to split the current `ErrorCatcher` component into several:
* `ErrorHandler` it would be the Debug component before these changes https://github.com/symfony/symfony/pull/31065, with everything related to ErrorHandler, Debug, DebugClassLoader classes and change its name.
* `ErrorDumper` it would be the current ErrorCatcher but with FlattenException + the new error renderer system only.
This is the first step, then we can deprecate everything for the Debug component in favor of the ErrorHandler and ErrorDumper components, **BUT without moving any code !!**, that would give us more freedom to do it correctly in the new components.
NOTE: For this PR I've copy the `Debug` component directory from the revision prior to merged commit https://github.com/symfony/symfony/pull/31065 in 4.4 branch.
Commits
-------
eda49e295e [Debug] Restoring back the state of the Debug component (1st step)
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] Let browsers trigger their own search on double CMD/CTRL + F
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | #29748 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Simple way to enhance DX & mitigate #29748
Commits
-------
d2430584cd [VarDumper] Let browsers trigger their own search on double CMD/CTRL + F hit
This PR was squashed before being merged into the 4.4 branch (closes#32198).
Discussion
----------
[Lock] Split "StoreInterface" into multiple interfaces with less responsability
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | Contribute to #28694 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | TODO <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
We are removing the StoreInterface in order to split into multiple interface, it will help reduce de responsability of the StoreInterface.
Firstly, since not all stores needs to have all the methods of the StoreInterface, we can split this like this in order to limit the methods that are needed for each store.
Secondly, we add supportsX methods in order to avoid throwing exception when a store does not supports a feature it's easier an instance of the special interface or not, and it can return true/false on the support method.
**Really big thanks to** @jderusse for working with me on this, 1-2 hours of talking together, and another 1-2 hours of pre-review :). now giving it to the whole community !
*some time has been sponsored by* @izisolutions
Commits
-------
91fcbea977 [Lock] Split \"StoreInterface\" into multiple interfaces with less responsability
This PR was squashed before being merged into the 4.4 branch (closes#31511).
Discussion
----------
[Validator] Allow to use property paths to get limits in range constraint
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Part of #31503
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11793
Similar as #22576, but for the `Range` constraint.
Commits
-------
2b509904c8 [Validator] Allow to use property paths to get limits in range constraint
This PR was merged into the 3.4 branch.
Discussion
----------
Don't assume port 0 for X-Forwarded-Port
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | none added
| Fixed tickets |
| License | MIT
| Doc PR | -
If you use X-Forwarded-Host but don't provide X-Forwarded-Port, it will default to `0.0.0.0:` which then assumes port `0` instead of following its default assumption based on the scheme.
Commits
-------
adcdd938a4 PHP 5 compat
6c49a0c758 Add test case
c266d6c737 Update Request.php
23db9be884 Don't assume port 0 for X-Forwarded-Port
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] don't redraw progress bar more than every 100ms by default
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no (behavior change)
| BC breaks? | no (behavior change)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of https://github.com/symfony/symfony/pull/26339
Looks like something we can and should do on 4.4 to me.
Commits
-------
df551e945c [Console] don't redraw progress bar more than every 100ms by default
This PR was merged into the 4.4 branch.
Discussion
----------
[SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462
| Q | A
| ------------- | ---
| Branch? | 4.4
| -- | --
| Bug fix? | yes
| New feature? | no
| BC breaks? | no I think
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ...
| License | MIT
Rebase of #28462. Origin description:
> ```
> [2018-09-13 20:43:38] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException(code: 0): An exception occurred while executing
> ...
> Doctrine\\DBAL\\Driver\\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.phone' in 'field list' at
> ```
>
> Definitely I think this is NOT info, but error.
> And since it's info, it's not logged in production because of `fingers_crossed` with `action_level: error` - so to actually see the real error behind `Authentication request could not be processed due to a system problem.` I had to debug on production. Very bad practice IMHO.
Commits
-------
867eb78cfe [SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Add argument $prefix to AdapterInterface::clear()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR allows clearing `AdapterInterface` implementations by prefix of keys. The goal is to fix an edge case situation in `ProxyAdapter`: right now, when one calls `->clear()` on a proxy adapter that is configured to add a prefix to all the keys passed to the decorated pool, we clear it all; while only the subset that starts with the prefix should be.
Since `AdapterInterface` is an "internal" interface (ie its purpose is to create compatible implementations - *NOT* to be type-hinted for), this is not really a user-facing change.
/cc @Nyholm, this came out after we talked about proxified chain pools
Commits
-------
ad6f6cf900 [Cache] Add argument $prefix to AdapterInterface::clear()
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | TBA
The way ProgressBar redraw frequency works currently requires to know speed of progress beforehand, which is impossible to know in some situations, e.g. when showing progress of download, or I/O speed. Setting frequency too low relative to progress speed throttles I/O speed and makes progress bar flicker too much, setting it too high makes progress bar unresponsive. Current behaviour IMHO undermines usefulness of ProgressBar.
This is an attempt to replace this with more consistent experience, not requiring to know speed of progress.)
Commits
-------
83edac321e [Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods
This PR was merged into the 3.4 branch.
Discussion
----------
[Translator] Load plurals from mo files properly
| 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/10152#issuecomment-55522675
| License | MIT
| Doc PR |
Plurals were not handled correctly when loading mo files.
```
msgid "foo"
msgid_plural "foos"
msgstr[0] "bar"
msgstr[1] "bars"
```
Before, the mo entry above was treated as two entries, which doesn't make sense:
```
'foo' => 'bar'
'foos' => '{0} bar|{1} bars'
```
With this PR, it is treated as one entry:
```
'foo|foos' => 'bar|bars'
```
This PR does the same as #31266, just for mo files instead of po files. Note, however, that the old behavior differed between po and mo files: `'foos' => 'bar|bars'` for po files and `'foos' => '{0} bar|{1} bars'` for mo files.
Commits
-------
97d28b5e4e Load plurals from mo files properly
This PR was squashed before being merged into the 3.4 branch (closes#31266).
Discussion
----------
[Translator] Load plurals from po files properly
| 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/10152#issuecomment-55522675
| License | MIT
| Doc PR |
Plurals were not handled correctly when loading po files.
```
msgid "foo"
msgid_plural "foos"
msgstr[0] "bar"
msgstr[1] "bars"
```
Before, the po entry above was treated as two entries, which doesn't make sense:
```
'foo' => 'bar'
'foos' => 'bar|bars'
```
With this PR, it is treated as one entry:
```
'foo|foos' => 'bar|bars'
```
Commits
-------
6b69a99230 [Translator] Load plurals from po files properly
This PR was merged into the 4.4 branch.
Discussion
----------
[Console] allow answer to be trimmed by adding a flag
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- 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/11603 <!-- 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.
-->
According to https://github.com/symfony/symfony/issues/23210#issuecomment-495998087 we add a new flag in the `Question` class to be able to not trim the answer.
Commits
-------
8f182d811e [Console] allow answer to be trimmed by adding a flag
This PR was merged into the 4.2 branch.
Discussion
----------
[Serializer] AbstractObjectNormalizer ignores the property types of discriminated classes
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27607
| License | MIT
| Doc PR |
As discusses in ticket #27607, when using a discriminator map and the symfony serializer, things go wrong when having two classes in the discriminator map having the same property name. When the function ```validateAndDenormalize``` is called, the function ```getTypes``` would be called with the wrong class name.
If you take a look at the ```getTypes``` function below, I'm not even sure if we still need the part of the discriminator at this place because we already passed the class name of the discriminated class.
```
/**
* @return Type[]|null
*/
private function getTypes(string $currentClass, string $attribute)
{
if (null === $this->propertyTypeExtractor) {
return null;
}
if (null !== $types = $this->propertyTypeExtractor->getTypes($currentClass, $attribute)) {
return $types;
}
if (null !== $this->classDiscriminatorResolver && null !== $discriminatorMapping = $this->classDiscriminatorResolver->getMappingForClass($currentClass)) {
if ($discriminatorMapping->getTypeProperty() === $attribute) {
return [
new Type(Type::BUILTIN_TYPE_STRING),
];
}
foreach ($discriminatorMapping->getTypesMapping() as $mappedClass) {
if (null !== $types = $this->propertyTypeExtractor->getTypes($mappedClass, $attribute)) {
return $types;
}
}
}
return null;
}
```
Commits
-------
9fc56c7e28 [Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
This PR was merged into the 4.4 branch.
Discussion
----------
[Stopwatch] Deprecate passing null in Section::get() method.
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179<!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This PR is related to https://github.com/symfony/symfony/pull/32242
Commits
-------
ea4817677b [Stopwatch] Deprecate passing null in Section::get() method.
This PR was merged into the 4.4 branch.
Discussion
----------
[Translation] deprecate passing a null locale
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- 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 | 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
According to the discussion in https://github.com/symfony/symfony/pull/32386#discussion_r300590343 it seems that allowing null here was not the right thing to do, so we are deprecating this behaviour.
Commits
-------
088615ddaf [Translation] deprecate passing a null locale
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Remove --dev from intl compile autoloader
| 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 -->
Remove implicit composer default (`jakzal/php-intl` uses latest composer during compile)
Commits
-------
8ffc61692d [Intl] Remove --dev from intl compile autoloader
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Add $response->toStream() to cast responses to regular PHP streams
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR adds `$response->toStream()` to cast responses to regular PHP streams, and uses the method in `Psr18Client` and `HttplugClient`.
This means `Psr18Client` and `HttplugClient` will now be lazy past response headers. I'm not sure any other PSR-18 implementation has this behavior. :)
This also adds `StreamWrapper::createResource()` to turn any `ResponseInterface` implementation into a PHP stream.
/cc @Nyholm FYI since we discussed about this recently.
Commits
-------
a59e0af24a [HttpClient] Add $response->toStream() to cast responses to regular PHP streams
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] fix publishing headers set on AmqpStamp
| 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 |
| License | MIT
| Doc PR |
Dispatching a message using an AmqpStamp and setting extra headers with it didn't work. We need to merge the `$attribute['headers']`, not the attributes itself as that will ignore the stamp headers because it's not recursive.
I also made the AmqpStamp a NonSendableStampInterface because it's pointless to serialize the stamp because the stamp already set's the attributes for publishing.
Commits
-------
50b3ec4dc5 [Messenger] fix publishing headers set on AmqpStamp
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] Init compile tmp volume
| 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 -->
Fixes
```
Symfony\Component\Filesystem\Exception\IOException: Failed to create "/tmp/icu-data": mkdir(): Permission denied.
```
if the initial volume does not exists docker creates it as root, but the container runs for the current user.
Commits
-------
5e26d96a6b [Intl] Init compile tmp volume
This PR was merged into the 4.4 branch.
Discussion
----------
[Mime] add check for openssl when using SMime
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Should also make tests green for the component on Windows.
Commits
-------
f33c67bfc1 [Mime] add check for openssl when using SMime
This PR was squashed before being merged into the 4.4 branch (closes#32402).
Discussion
----------
[Intl] Exclude root language
| Q | A
| ------------- | ---
| Branch? | 4.4
| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Spotted in #32388
Commits
-------
089cc06c3a [Intl] Exclude root language
This PR was merged into the 4.2 branch.
Discussion
----------
[Messenger] Removes deprecated call to ReflectionType::__toString() on MessengerPass
Closes#32397
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32397
| License | MIT
| Doc PR | -
Removes deprecated call to ReflectionType::__toString() for 7.4 support
Commits
-------
0c52a531e2 Remove call to deprecated method
This PR was merged into the 4.4 branch.
Discussion
----------
Fix phpdocs
| 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 | n/a
| License | MIT
| Doc PR | n/a
Backported from #32286
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
4acddef91b fixed phpdocs
This PR was merged into the 4.4 branch.
Discussion
----------
[FrameworkBundle] Allow creating chained cache pools by providing several adapters
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Replaces #30984, follows https://github.com/symfony/symfony-docs/pull/11813
This PR allows defining several adapters for one pool. When doing so, this defines a chain pool.
The benefit is that all chained pools get automatic namespace and lifetime, so things are transparent:
```yaml
pools:
my_chained_pool:
default_lifetime: 12
adapters:
- cache.adapter.array
- cache.adapter.filesystem
- {name: cache.adapter.redis, provider: 'redis://foo'}
```
(see fixtures for example of PHP/XML config)
/cc @Nyholm @pborreli FYI
Commits
-------
29ba091898 [FrameworkBundle] Allow creating chained cache pools by providing several adapters
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorCatcher] Fixed some escaping in error renderers
| Q | A
| ------------- | ---
| Branch? | 4.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 | -
| License | MIT
| Doc PR | not needed
Fixes this: https://github.com/symfony/symfony/pull/32364/files#r300394620
Commits
-------
1413bdc [ErrorCatcher] Fixed some escaping in XML errors
This PR was merged into the 4.4 branch.
Discussion
----------
[ErrorCatcher] Pretty print JSON formatted errors
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | not needed
A long string with JSON contents is not very useful to quickly parse the error contents, so I propose to "pretty print" the JSON errors.
Commits
-------
ab926d2 [ErrorCatcher] Pretty print JSON formatted errors
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
| 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 in and needed by #32294
Commits
-------
b06d0003a3 [DI] fix processing of regular parameter bags by MergeExtensionConfigurationPass
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] Use ConnectionRegistry instead of RegistryInterface
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This PR changes the constructor type-hint on `DoctrineTransportFactory` from `Symfony\Bridge\Doctrine\RegistryInterface` to the smaller `Doctrine\Common\Persistence\ConnectionRegistry`. Since we only call the `getConnection()` method, this interface is sufficient.
This change allows to use the factory without the Doctrine bridge and makes it easier to use it stand-alone.
Commits
-------
ce6a5ad235 Use ConnectionRegistry instead of RegistryInterface.
This PR was squashed before being merged into the 4.4 branch (closes#32348).
Discussion
----------
[HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
| Q | A
| ------------- | ---
| Branch? | 4.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 | n/a
| License | MIT
| Doc PR | n/a
Follow up PR to #32344: if both `Accept` and `Content-Type` are defined, `Accept` must take the lead because it explicitly tells what format the client expect as a response.
Before:
```
$ curl -H 'Accept: application/json' -H 'Content-Type: text/xml' -i 'https://127.0.0.1:8000/userinfo'
[snip]
content-type: text/xml
```
After:
```
$ curl -H 'Accept: application/json' -H 'Content-Type: text/xml' -i 'https://127.0.0.1:8000/userinfo'
[snip]
content-type: application/json
```
Actually, I'm not sure that inferring the content type of the response using the `Content-Type` provided for the request body is a good idea. The HTTP RFC explicitly states that `Accept` must be used to hint a preferred response format (`Content-Type` on the request indicates the type of associated its the body). I would be in favor of being more conservative: use `Accept` if provided (a best practice anyway), and fallback to the default value (HTML by default) otherwise. WDYT?
Commits
-------
60d997df75 [HttpFoundation] Accept must take the lead for Request::getPreferredFormat()
* 4.3:
Fixes windows error
[Messenger] Added more test for MessageBus
fixed typo
[Filesystem] added missing deprecations to UPGRADE-4.3.md
Fix authentication for redis transport
only decorate when an event dispatcher was passed
[FrmaeworkBundle] More simplifications in the DI configuration
Fixing validation for messenger transports retry_strategy service key
Removed unused field.
Remove @internal annotations for the serilize methods
[Lock] Stores must implement `putOffExpiration`
Annotated correct return type for getInEdges()/getOutEdges().
deprecate the framework.templating option
* 4.2:
Fixes windows error
Removed unused field.
[Lock] Stores must implement `putOffExpiration`
Annotated correct return type for getInEdges()/getOutEdges().
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation][HttpKernel] Improving the request/response format autodetection
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Mainly for API-based apps, currently the response header `Content-Type` (if no provided) is guessed based on the request format (`_format` attribute), falling back to `html` by default.
Especially for the new error renderer system, where any kind of error can occur and it becomes an http response, this PR improves this guesser mechanism by taking into account also the `Content-type` of the request.
Example:
```bash
$ curl -X POST -H 'Content-Type: application/json' -i 'https://127.0.0.1:8000/login'
```
**before:**
```bash
HTTP/2 500
cache-control: no-cache, private
content-type: text/html; charset=UTF-8 # <- inaccurate
...
{"title":"Internal Server Error","status":500,"detail":"Invalid credentials!"}
```
Most of the 3rd-party bundles that I know (`api-platform/core`, `FOSRestBundle`) need a dedicated listener to achieve it right.
**after:**
```bash
HTTP/2 500
cache-control: no-cache, private
content-type: application/json
...
{"title":"Internal Server Error","status":500,"detail":"Invalid credentials!"}
```
Of course, this applies to all kind of responses, as long as the `Content-Type` is not explicitly provided. So, as a last chance, the `Accept` heading of the request is also taken into account to detect the preferred format:
```bash
$ curl -H 'Accept: application/json' -i 'https://127.0.0.1:8000/userinfo'
HTTP/2 404
cache-control: no-cache, private
content-type: application/json
...
{"title":"Not Found","status":404,"detail":"No route found for \"GET \/userinfo\""}
```
They could be other places in the code where this new method could also be useful, please advise :)
WDYT?
Commits
-------
1952928471 Improving the request/response format autodetection
This PR was merged into the 4.2 branch.
Discussion
----------
[Lock] Stores must implement `putOffExpiration`
| 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 | /
Following https://github.com/symfony/symfony/pull/32198#pullrequestreview-256165051 every stores MUST implement the method `putOffExpiration` either by ignoring the arguments (by design they lock forever) or using a mechanism to define the expiration.
It was a mistake to add the dockblock `@throws NotSupportedException` tell me if it's a BC break, I'll create a dedicated PR for it.
Commits
-------
c986c86d1c [Lock] Stores must implement `putOffExpiration`
This PR was merged into the 4.3 branch.
Discussion
----------
[Mime] Remove @internal annotations for the serialize methods
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes (it's not really a bug)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Currently, when we extend the `Symfony\Component\Mime\Message` and `Symfony\Component\Mime\MessageRaw` classes of the Mime component, we get 2 deprecation messages:
```
The "Symfony\Component\Mime\Message::__serialize()" method is considered internal. It may change without further notice. You should not extend it from "Vendor\FooMessage".
```
and
```
The "Symfony\Component\Mime\Message::__unserialize()" method is considered internal. It may change without further notice. You should not extend it from "Vendor\FooMessage".
```
However, we need to add properties to the new class, and so, we need to extend `__serialize()` and `__unserialize()` methods in the same way as `Symfony\Bridge\Twig\Mime\TemplatedEmail`, to know, retrieve the serialization of the parent class:
```php
public function __serialize(): array
{
return [$this->foo, $this->bar, $this->baz, parent::__serialize()];
}
public function __unserialize(array $data): void
{
[$this->foo, $this->bar, $this->baz, $parentData] = $data;
parent::__unserialize($parentData);
}
```
But given that the third-party components use another namespace, we get the 2 deprecation messages, while the 2 methods must be inevitably used and extended. Of course, the methods `serialize()` and `unserialize()` are always marked by the `@internal` annotation and the `final` keyword.
This PR so deletes the 2 deprecation messages that should not be displayed.
Commits
-------
8544a35e52 Remove @internal annotations for the serilize methods
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Added more test for MessageBus
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
[This code](bed50fd542/src/Symfony/Component/Messenger/MessageBus.php (L33-L49)) is quite hard to understand. So It must be covered by tests.
More over, it will help people to understand how it works
Commits
-------
5f4ab23991 [Messenger] Added more test for MessageBus
This PR was merged into the 4.4 branch.
Discussion
----------
[Messager] Simplified MessageBus::__construct()
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The third path deals with generator (or other king of iterator that are
not an IteratorAggregate). It means, very few cases in practice
The previous code saved one object on the first call of `self::dispatch()`
by replacing it at runtime. More over, this object (anon. class) is very
light in memory.
The performance optimization (even if fun) is not useful here. Let's
make the code readable to everyone.
Commits
-------
6b5671f5ae [Messager] Simplified MessageBus::__construct()
The third path deals with generator (or other king of iterator that are
not an IteratorAggregate). It means, very few cases in practice
The previous code saved one object on the first call of `self::dispatch()`
by replacing it at runtime. More over, this object (anon. class) is very
light in memory.
The performance optimization (even if fun) is not useful here. Let's
make the code readable to everyone.
This PR was merged into the 4.4 branch.
Discussion
----------
[PropertyInfo] add static cache to ContextFactory
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no (performance...)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32073, https://github.com/api-platform/api-platform/issues/1159
| License | MIT
| Doc PR | no
The issue is very very well described here #32073, and was also discussed a few weeks ago with @dunglas here https://github.com/api-platform/api-platform/issues/1159.
`ContextFactory::createFromReflector` is heavy, and it's called redundanlty
by `Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor` for each property
and methods. Avoid that by parsing it only once and then use static cache
This is a quite big performance problem.
![Deepin Capture-écran_zone de sélection _20190626142041](https://user-images.githubusercontent.com/84887/60179692-8471c480-981e-11e9-9e3c-3f9c0b83b01b.png)
Commits
-------
063e880861 [PropertyInfo] add static cache to ContextFactory
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] Add support for NTLM authentication
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Someone mentioned NTLM auth on Twitter, so here we are, this adds support for it.
Requires curl.
Commits
-------
548f4fd0ea [HttpClient] Add support for NTLM authentication
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Fix authentication for redis transport
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32304
| License | MIT
| Doc PR | symfony/symfony-docs#... TODO
This will implement support for password in redis stream transport.
Commits
-------
bedae5dde9 Fix authentication for redis transport
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] Annotated correct return type for getInEdges()/getOutEdges()
| 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
This changed annotation was quite helpful when analyzing `PhpDumper` for #32266.
Commits
-------
28882f52cb Annotated correct return type for getInEdges()/getOutEdges().
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Add a Length::$allowEmptyString option to reject empty strings
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | Todo (change the warning on top of https://symfony.com/doc/current/reference/constraints/Length.html)
which defaults to `true` in 4.4 but will trigger a deprecation if not set explicitly
in order to make the default `false` in 5.0.
While it could be solved now thanks to #29641 by using both `@Length(min=1)` & `@NotBlank(allowNull=true)` constraints,
as expressed in https://github.com/symfony/symfony/issues/27876#issuecomment-403307783 and following comments, the `@Length(min=1)` behavior doesn't match our expectations when reading it: it feels logical to invalidate empty strings, but it actually doesn't.
Hence the proposal of making the behavior of rejecting empty strings the default in 5.0.
In my opinion, the flag could even be removed later.
Commits
-------
e113e7f812 [Validator] Add a Length::$allowEmptyString option to reject empty strings
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel][DX] Improve the error message when not defining the controller as a service but using construct parameters
| Q | A
| ------------- | ---
| Branch? | 4.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 | 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
I'm working with newcomers to the symfony framework ATM and one of them has got stuck in this errors trying to understand why the constructor argument declared as a a service would not work and didn't check if the controller was declared as a service itself.
I feel like this could be improve to be really specific since "such" is not that specific ;).
Commits
-------
c670d5120e [HttpKernel][DX] Improve the error message when not defining the controller as a service but using contruct parameters
This PR was merged into the 4.4 branch.
Discussion
----------
[Filesystem] deprecate calling isAbsolutePath with a null
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This PR is a result of #32247 and deprecates calling `Filesystem::isAbsolutePath()` with a `null` value.
Commits
-------
93190182f6 [Filesystem] depreacte calling isAbsolutePath with a null
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Document the new exceptions thrown by the code
| Q | A
| ------------- | ---
| Branch? | 4.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 | -
| License | MIT
| Doc PR | not needed
While deciding if we should document #31547 I saw that the new exceptions weren't documented in the code. I don't know if this is the place where this should be added.
Commits
-------
0d27af93ea [Ldap] Document the new exceptions thrown by the code
This PR was merged into the 4.2 branch.
Discussion
----------
[DependencyInjection] Removed unused field
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
A minor issue I discovered while analyzing the DI component for #32238: `AnalyzeServiceReferencesPass` defines a private field `$expressionLanguage` that is not used.
Commits
-------
58651409b4 Removed unused field.
This PR was squashed before being merged into the 4.4 branch (closes#32317).
Discussion
----------
[Mime] Updated some PHPDoc contents
| Q | A
| ------------- | ---
| Branch? | 4.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 | -
| License | MIT
| Doc PR | not needed
While documenting #30981 I found some PHPDoc info not clear enough. This "improves" it, but if you don't like it, it's OK to close this. Thanks.
Commits
-------
9432f1f970 [Mime] Updated some PHPDoc contents
This PR was squashed before being merged into the 4.4 branch (closes#32269).
Discussion
----------
[PropertyAccess] Adds entries to CHANGELOG and UPGRADE
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
In PR #32241 I missed to add entries to the CHANGELOG and UPGRADE file.
Commits
-------
c4afbf376f [PropertyAccess] Adds entries to CHANGELOG and UPGRADE
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpFoundation] Drop support for ApacheRequest
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
`ApacheUrlMatcher` has been [deprecated in 2.7](https://github.com/symfony/symfony/pull/12728) and removed in 3.0
I think we forgot to remove this class too.
This class in never used in symfony, and there are no more reference in
the documentation.
Commits
-------
f82e28c533 [HttpFoundation] Deprecated ApacheRequest
This PR was squashed before being merged into the 4.4 branch (closes#31825).
Discussion
----------
[Messenger] Added support for auto trimming of redis streams
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | will submit if concept is okay
Right now the Redis stream will just grow indefinitely. However, there are means to have it delete old entries from time to time.
Note: I could not use the `XADD mystream MAXLEN ~ 1000 *` notation because the PHP redis extension does not support the `MAXLEN` option afaics so I went for the extra `XTRIM` command.
I explicitly enabled the approximate flag because it makes absolutely no sense to hardcode the limit for us although we could even have this configurable too (but I don't think we should).
The whole idea of this PR is to enable occasional trimming of the stream so it doesn't grow forever, so when you configure something like `20000` it may well happen that trimming only happens at `25000` depending on your settings.
Ping @soyuka @alexander-schranz @chalasr :)
Commits
-------
7fe06bc5f6 [Messenger] Added support for auto trimming of redis streams
This PR was merged into the 4.4 branch.
Discussion
----------
[Lock] add an InvalidTTLException to be more accurate
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- 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 | 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This adds a new exception to be more precise when using wrong ttl.
Commits
-------
37509192d8 [Lock] add an InvalidTTLException to be more accurate
This PR was squashed before being merged into the 4.4 branch (closes#32241).
Discussion
----------
[PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A<!-- required for new features -->
This PR is related to https://github.com/symfony/symfony/pull/32234#discussion_r298415012
Commits
-------
9aac42698a [PropertyAccess] Deprecate null as allowed value for defaultLifetime argument in createCache method
* 4.3:
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test case
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
[Cache] work aroung PHP memory leak
[Finder] docblock fixes
pass error code as a string
Catch JsonException and rethrow in JsonEncode
* 4.2:
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
[Cache] work aroung PHP memory leak
[Finder] docblock fixes
pass error code as a string
Catch JsonException and rethrow in JsonEncode
This PR was merged into the 4.3 branch.
Discussion
----------
[Validator] remove invalid test case
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.
Commits
-------
9000c1eab4 remove invalid test case
* 3.4:
[HttpFoundation] Throw exception when the \"session\" extension is not loaded
remove invalid test cases
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
[Finder] docblock fixes
pass error code as a string
Catch JsonException and rethrow in JsonEncode
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] work aroung PHP memory leak
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32220
| License | MIT
| Doc PR | -
Works around https://bugs.php.net/76982, as identified by @goetas in the linked issue.
Commits
-------
5d55b91fae [Cache] work aroung PHP memory leak
This PR was squashed before being merged into the 3.4 branch (closes#32215).
Discussion
----------
[HttpFoundation] Throw exception when the "session" extension is not loaded
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31305
| License | MIT
Should I target `3.4` or `master` instead? This change does not alter behavior, but makes the failure more clear.
Commits
-------
b0c663071b [HttpFoundation] Throw exception when the \"session\" extension is not loaded
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] remove invalid test cases
| 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 |
Spotted while working on #32179 for the Validator component. Using property paths for comparison when validating arrays simply does not work.
Commits
-------
d1261e78a4 remove invalid test cases
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] pass error code as a string
| 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 |
Commits
-------
901fe0d7c5 pass error code as a string
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Fixed PHP of DenormalizableInterface::denormalize
It can return an array of objects
| 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 |
Commits
-------
379bbee370 [Serializer] Fixed PHP of DenormalizableInterface::denormalize
ContextFactory::createFromReflector is heavy, and it's called redundanlty
by Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor for each property
and methods. Avoid that by parsing it only once and then use static cache
* 4.3:
fix Debug component dependencies
[travis] not all components have a master branch
[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
This PR was merged into the 3.4 branch.
Discussion
----------
Catch JsonException and rethrow in JsonEncode
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | adjustment to implementation of previous PRs for issue #31447
| License | MIT
| Doc PR | not applicable
PR #31860 provided handling of PHP 7.3 `JSON_THROW_ON_ERROR` behavior in the various `JsonEncode` and related classes/methods.
PR #31869 adjusted that. In particular, it adjusted ` src/Symfony/Component/Serializer/Encoder/JsonDecode.php` so that it catches any `JsonException` and re-throws it as `NotEncodableValueException`. That preserves the previous behavior of `JsonDecode:decode` - it always throws `NotEncodableValueException` when something goes wrong.
IMO `JsonEncode:encode` needs the same logic. At the moment, if a caller specifies `JSON_THROW_ON_ERROR` then the method can throw `JsonException`, but actually the "standard" for `JsonEncode:encode` is that it throws `NotEncodableValueException`
Adjust `JsonEncode:encode` to catch `JsonException` and rethrow it as `NotEncodableValueException`
Commits
-------
9c76790ee8 Catch JsonException and rethrow in JsonEncode
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
| 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 | N/A
| License | MIT
| Doc PR | N/A
As the deprecated `Symfony\Component\HttpKernel\Client` does not extend `Symfony\Component\HttpKernel\HttpKernelBrowser`, it has not retained the correct PHPDoc from before.
The order of inheritance was changed in https://github.com/symfony/symfony/pull/31881, but the PHPDoc was never restored.
Commits
-------
332135186a [HttpKernel] Add @method PHPDoc for getRequest and getResponse back to Client
* 4.3:
[Mailer] fixed tests on Windows
[PhpUnitBridge] fix tests
[Mailer] fixed error message when connecting to a stream raises an error before connect()
[Mailer] fixed timeout type hint
improve error messages in the event dispatcher
[Security/Core] work around sodium_compat issue
bumped Symfony version to 4.3.3
updated VERSION for 4.3.2
updated CHANGELOG for 4.3.2
bumped Symfony version to 4.2.11
updated VERSION for 4.2.10
updated CHANGELOG for 4.2.10
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
Fixed type annotation.
This PR was merged into the 4.4 branch.
Discussion
----------
Add ErrorHandler component
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | #25905, #26448
| License | MIT
| Doc PR | TODO
Mainly for API-based apps that don't require TwigBundle to get the correct exception response according to the request format (aka `_format` attribute).
![exception_response](https://user-images.githubusercontent.com/2028198/55509651-713dc700-562a-11e9-8b98-bef3b0229397.gif)
✔️ [RFC7807](https://tools.ietf.org/html/rfc7807) compliant for JSON and XML formats.
---
This introduce a new `ErrorRenderer` service that render a `FlattenException` into a given format:
```php
use Symfony\Component\ErrorHandler\ErrorRenderer\ErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;
use Symfony\Component\ErrorHandler\ErrorRenderer\JsonErrorRenderer;
$renderers = [
new HtmlErrorRenderer(),
new JsonErrorRenderer(),
// ...
];
$errorRenderer = new ErrorRenderer($renderers);
return new Response(
$errorRenderer->render($exception, $request->getRequestFormat()),
$exception->getStatusCode(),
$exception->getHeaders()
);
```
The built-in error renderers are:
| Format | Class |
| --- | --- |
| html | HtmlErrorRenderer |
| json | JsonErrorRenderer |
| xml, atom | XmlErrorRenderer |
| txt | TxtErrorRenderer |
And you can add your own error renderer by implementing the `ErrorRendererInterface` and tagging it with `error_handler.renderer` in your service definition.
Creating your own error renderer for a built-in format will end up replacing the related built-in error renderer.
Demo: https://github.com/yceruto/error-handler-app ([add custom error renderer](06fc647841))
Commits
-------
7057244890 Added ErrorHandler component
* 4.2:
[Security/Core] work around sodium_compat issue
bumped Symfony version to 4.2.11
updated VERSION for 4.2.10
updated CHANGELOG for 4.2.10
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
* 3.4:
[Security/Core] work around sodium_compat issue
bumped Symfony version to 3.4.30
updated VERSION for 3.4.29
update CONTRIBUTORS for 3.4.29
updated CHANGELOG for 3.4.29
* 4.3: (34 commits)
[PhpunitBridge] Read environment variable from superglobals
[Bridge/PhpUnit] Fix PHP5.5 compat
[PhpUnitBridge] More accurate grouping
fixed CS
Extract unrecoverable exception to interface
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] require libsodium >= 1.0.14
[Workflow] re-add workflow.definition tag to workflow services
[Security/Core] Don't use ParagonIE_Sodium_Compat
revert #30525 due to performance penalty
collect called listeners information only once
[Lock] fix missing inherit docs in RedisStore
[Messenger] fix retrying handlers using DoctrineTransactionMiddleware
[Mailgun Mailer] fixed issue when using html body
[HttpClient] fix timing measurements with NativeHttpClient
[HttpClient] fix dealing with 1xx informational responses
add test to avoid regressions
fix mirroring directory into parent directory
fix typos
...
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailgun Mailer] fixed issue when using html body
| 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 |
I tested the `symfony/mailgun-mailer` and get an issue when using the `api` scheme with a templated email cause we try to manipulate a stream whereas the `Symfony\Component\Mime\Email::getHtmlBody()` could return also a string (in my case it is one).
The issue :
```
stream_get_meta_data() expects parameter 1 to be resource, string given
```
Commits
-------
afbefe131b [Mailgun Mailer] fixed issue when using html body
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Doctrine Connection find and findAll now correctly decode headers
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31916
| License | MIT
| Doc PR | N/A
The Doctrine transport `Connection` class methods `find` and `findAll` did not JSON-decode the headers of the envelope after retrieving it from Doctrine. The `get` method, however, did this correctly.
I added two tests to verify the results of `find` and `findAll` and then added the JSON-decoding to the `Connection` class. I moved the JSON-decoding to a separate method to avoid duplicate code.
Commits
-------
3aec2acce5 [Messenger] Doctrine Connection find and findAll now correctly decode headers
This PR was merged into the 4.4 branch.
Discussion
----------
[Process] Allow writing portable "prepared" command lines
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes <!-- 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 | #23778 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11802 <!-- required for new features -->
Hey here, it's me, again !
I've talked with @nicolas-grekas and he gave me a new way of writing this feature that will not be a problem for people using things like {{ toto }} since we are using the linux style of using envvar, the replaced arguments is only replaced when using windows.
This should not break anything and work as expected!
see https://github.com/symfony/symfony/pull/24763
This makes `"$FOO"` work seamlessly on Linux and on Windows to reference an env var (that can be provided when calling e.g. the "run" method)
Commits
-------
3f8354f58f [Process] Allow writing portable "prepared" command lines
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix dealing with 1xx informational responses
| 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 | -
I never had a look at 1xx status codes until today.
This PR fixes reading them when using curl.
If one wonders:
- `NativeHttpClient` uses `fopen()`, which skips informational parts as allowed by the HTTP spec and doesn't give any way to access their response headers.
- `CurlHttpClient` allows reading informational responses using the progress callback or via the getInfo() method. That's the way if you need to implement e.g. HTTP 103 early hints.
Commits
-------
412411d795 [HttpClient] fix dealing with 1xx informational responses
This PR was merged into the 4.4 branch.
Discussion
----------
use proper return types in ErrorHandler and ArgumentResolver
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | tiny
| 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 |
| License | MIT
| Doc PR |
Found those things while reviewing #31996 which missed some return types due to using `return` instead of `return null`.
It's part of fixing #17201 (due to #10717). See also #30869 that somebody was stumbling over.
Commits
-------
2f9121b74d use proper return types in ErrorHandler and ArgumentResolver
This PR was merged into the 4.2 branch.
Discussion
----------
[Lock] fix missing inherit docs in RedisStore
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This is a missing inheritdoc in the RedisStore for the waitAndSave method.
Commits
-------
71eb8cfe99 [Lock] fix missing inherit docs in RedisStore
* 4.2:
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] Don't use ParagonIE_Sodium_Compat
collect called listeners information only once
add test to avoid regressions
fix typos
Turkish translation added to Form Component
* 3.4:
[FrameworkBundle] Fix calling Client::getProfile() before sending a request
Fix type error
[Security/Core] Don't use ParagonIE_Sodium_Compat
collect called listeners information only once
add test to avoid regressions
fix typos
Turkish translation added to Form Component
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] collect called listeners information only once
| 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 |
Commits
-------
2ad32df6e0 collect called listeners information only once
This PR was merged into the 4.4 branch.
Discussion
----------
[Messenger] make all stamps final and mark stamp not meant to be sent
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| 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 |
| License | MIT
| Doc PR |
Some newer stamps were already final. This makes all of them final. Also marks all stamps that are not meant to be sent using the new `NonSendableStampInterface`. This makes it easier to see which stamps are actually important and required to persist in a queue for certain functionality, like the `BusNameStamp` for the `RoutableMessageBus`
Commits
-------
013904b081 [Messenger] make all stamps final and mark stamp not meant to be sent
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] No need for retry to require SentStamp
| 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 |
| License | MIT
| Doc PR |
Fixes 2) in #32049
@weaverryan the SentStamp in the worker seems totally irrelevant. You always want to send messages back to the transport where they came from for retry. The only relevance I can potentially see is for the SyncTransport. Messages received async from worker might be routed to the SyncTransport. Using the SentStamp would redeliver the messages into the SyncTransport instead of the async. But that doesn't seem to have any use-case. I'm running the worker which handles the messages immediately. So basically there is no difference if they go to the Sync or Async transport from within the worker.
Commits
-------
0034dee641 [Messenger] make retry logic work without SentStamp
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Catch missing scheme in DSN
| 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
The `Symfony\Component\Mailer\Transport::createTransport()` method parses and validates a passed DSN. I noticed that we never check if the DSN contains a valid scheme, but we always assume that the scheme is present in then parse result. If someone passes a DSN without a scheme to that method, they would almost certainly run into a PHP notice.
This PR makes sure that a scheme is present in the URL and throws a proper exception otherwise.
Commits
-------
3eba36c088 [Mailer] Catch missing scheme in DSN.
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fixing passing debug info to progress callback
| 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 | -
NativeHttpClient already has it.
Commits
-------
dc55cf826a [HttpClient] fixing passing debug info to progress callback
This PR was merged into the 3.4 branch.
Discussion
----------
[Filesystem] add test to avoid regressions
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
0d7d1f81bc add test to avoid regressions
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32009
| License | MIT
| Doc PR |
This will fix#32009.
Thank you @brpauwels for the report.
I consider it safe to remove the `DispatchAfterCurrentBusStamp` because its meaning disappear after we handled the "current bus".
T0: We add the stamp
T1: We put the envelope on an internal queue in `DispatchAfterCurrentBusMiddleware`
T2: We handle the current bus.
T3: We start processing our internal queue.
At T3 there we are "after current bus", that is why we dont need the stamp any more.
Commits
-------
91f1680b3f [Messenger] Remove DispatchAfterCurrentBusStamp when message is put on internal queue
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add users extraFields in ldap component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28873, #19329 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo when validated, before merge <!-- required for new features -->
As I'm using ldap too in some personal project, It seems that this feature is a really good nice to have IMHO.
Adding the wanted field in the `user_metadata` array transform them as field -> value in the `metadata` field of the user.
Commits
-------
bcfff04797 [Ldap] Add users extra_fields in ldap component
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Add exception for mapping ldap errors
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- 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 | #28677 <!-- #-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.
-->
Maybe we could add more exception code since the list has a lot of errors, maybe we could add a class that maps the error to the right exeptions. see https://www.php.net/manual/en/function.ldap-errno.php
Commits
-------
1b29cb1a5f [Ldap] Add exception for mapping ldap errors
* 4.3:
fix translation domain
tag the FileType service as a form type
don't validate IP addresses from env var placeholders
[Validator] Fix GroupSequenceProvider annotation
[Messenger] fix delay exchange recreation after disconnect
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
* 4.2:
fix translation domain
tag the FileType service as a form type
[Validator] Fix GroupSequenceProvider annotation
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
* 3.4:
fix translation domain
tag the FileType service as a form type
[Validator] Fix GroupSequenceProvider annotation
Update ajax security cheat sheet link
Fix AuthenticationException::getToken typehint
This PR was squashed before being merged into the 3.4 branch (closes#32044).
Discussion
----------
[Validator] Fix GroupSequenceProvider annotation
| 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 |
The possibility was added in https://github.com/symfony/symfony/pull/19982, just forgot to fix this annotation back then.
Commits
-------
bf6d2532de [Validator] Fix GroupSequenceProvider annotation
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Fix AuthenticationException::getToken typehint
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- 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 <!-- 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 -->
The token may be not set when throwing AuthenticationException.
<!--
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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
a9705a0143 Fix AuthenticationException::getToken typehint
This PR was merged into the 4.4 branch.
Discussion
----------
Add BC layer for updated constructor types
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Reverts some CS changes done in #32066 + replaces its BC breaks by a BC layer.
Our CI is too good, it bites us hard when we break our own rules :)
Commits
-------
c34fcd91d1 Add BC layer for updated constructor types
This PR was merged into the 4.3 branch.
Discussion
----------
[Lock] Fix expired lock not cleaned in ZooKeeper
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | ,p
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31426
| License | MIT
| Doc PR | NA
Following #32071 for 4.3 branch
context:
When a lock is acquired BUT not as fast as expected, a LockExpiredException is thrown.
Issue is, that the lock is not removed which avoid other process to acquire that lock.
This PR clean state of store when a LockExpiredException is triggered in PDO and ZooKeepeer.
Commits
-------
4f808ef4f4 Fix Expiring lock in PDO and ZooKeeper
* 4.3:
[Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
[Cache] fix versioning with SimpleCacheAdapter
[Messenger] fix AMQP delay queue to be per exchange
Fix expired lock not cleaned
[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
[HttpFoundation] Fix SA/phpdoc JsonResponse
[DI] Show the right class autowired when providing a non-existing class in constructor
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
[Messenger] improve logs
[Messenger] fix delay delivery for non-fanout exchanges
Parameterize Mailgun's region
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
Add statement to fileLink to ignore href code when no fileLink.
[Routing] fix absolute url generation when scheme is not known
* 4.2:
[Cache] replace getNsSeparator by NS_SEPARATOR on AbstractTrait
[Cache] fix versioning with SimpleCacheAdapter
Fix expired lock not cleaned
[HttpFoundation] Fix SA/phpdoc JsonResponse
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[Routing] fix absolute url generation when scheme is not known
* 3.4:
Fix expired lock not cleaned
[HttpFoundation] Fix SA/phpdoc JsonResponse
SimpleCacheAdapter fails to cache any item if a namespace is used
validate composite constraints in all groups
[Serializer] Handle true and false appropriately in CSV encoder
Fix binary operation `+`, `-` or `*` on string
[VarDumper] fix dumping objects that implement __debugInfo()
[Routing] fix absolute url generation when scheme is not known
This PR was squashed before being merged into the 4.3 branch (closes#32052).
Discussion
----------
[Messenger] fix AMQP delay queue to be per exchange
| 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 | #32050
| License | MIT
| Doc PR |
this makes the delay/retry work when having several exchanges or renaming your exchange.
also the delay setup did not declare the target exchange. so if you only do delayed messages for a connection, auto-setup forgot to actually create the target exchange.
Commits
-------
5bc3364167 [Messenger] fix AMQP delay queue to be per exchange
This PR was merged into the 4.4 branch.
Discussion
----------
Fine tune constructor types
| Q | A
| ------------- | ---
| Branch? | 4.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 |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Fine tunes some constructor types that have been added in #24722
Form names as integer was only a workaround as forms names are used as array keys which get transformed to int. So it was added as a workaround in https://github.com/symfony/symfony/pull/6355#discussion_r2422205
With typehints added in #24722 those were mostly auto-cast anyway, e.g. in FormBuilder. There are only a few integer form names remaining documented, in the main entry points of the Form component (`\Symfony\Component\Form\FormInterface::add`). Internally it's always a string now. So I could remove some int docs which also fixes#30032 what @xabbuh tried to do.
Some of these changes we're just not done before because of broken tests. It's mainly a missing explicit mock for `TranslationInterface::trans` which returned null. If we had return types hints in interfaces, this wouldn't happen.
Commits
-------
507794a575 Fine tune constructor types
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31913
| License | MIT
| Doc PR | -
As spotted in the linked issue, we are missing this type of exception. It's a bug at the contracts level.
Commits
-------
3f167417fb [HttpClient] throw DecodingExceptionInterface when toArray() fails because of content-type error
This PR was merged into the 4.4 branch.
Discussion
----------
Prepare for PHP 7.4 preload
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
PHP 7.4 preloading is not compatible with declaring the same class twice in if/else blocks.
Let's split the ones we have in several files.
Commits
-------
7cf3fb4a21 Prepare for PHP 7.4 preload
This PR was merged into the 4.3 branch.
Discussion
----------
[DI] Show the right class autowired when providing a non-existing class
| 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 | #31997 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |none <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This gets the last current id before the error and pass it to the callback in order to get the right error message.
Commits
-------
fbda90af6e [DI] Show the right class autowired when providing a non-existing class in constructor
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] fix delay delivery for non-fanout exchanges
| 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 |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Fixes two bugs and outdated phpdoc:
1. When your exchange is not of type fanout, but direct for example, then delivery of delayed (retrying) messages does not work. This is because the delay logics adds a routing key to message. It was fixed if you have a custom routing key in #31355. But if you have no routing key, it still changed the routing key which means the message will not be delivery from your direct exchange to your queue anymore after being in the delay exchange. For fanout, which is the default, it does not matter because the routing key is ignored.
2. also fix dsn parsing of plain `amqp://` which is a valid URI that parse_url cannot handle when you want to pass all parameters as options
Commits
-------
0f15306d61 [Messenger] fix delay delivery for non-fanout exchanges
This PR was squashed before being merged into the 3.4 branch (closes#32025).
Discussion
----------
SimpleCacheAdapter fails to cache any item if a namespace is used
| Q | A
| ------------- | ---
| Branch? |3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This is a backport of #32019
The SimpleCacheAdapter extends AdapterTestCase.
When adding a namespace, the AdapterTestCase adds ":" after the namespace:
https://github.com/symfony/symfony/blob/v4.3.1/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php#L37
The namespace is prepended to the cache key.
But in PSR-16, the ":" is a forbidden character.
As a result, the cache key is invalid and cache is not persisted. If you use Psr16Adapter + a namespace, the cache simply does not work.
As per @nicolas-grekas advices, a NS_SEPARATOR const is added to change the namespace separator for the `SimpleCacheAdapter` to "_" (that is compatible with PSR-16).
The first commit of this PR starts with an additional test and no fix (to showcase the problem).
Commits
-------
ffd3469ddf SimpleCacheAdapter fails to cache any item if a namespace is used
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
| 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 | -
On Windows, curl has no cabundle configured by default.
Commits
-------
a2960a3318 [HttpClient] Don't use CurlHttpClient on Windows when curl.cainfo is not set
This PR was squashed before being merged into the 4.4 branch (closes#31287).
Discussion
----------
[Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
| Q | A
| ------------- | ---
| Branch? | 4.4
| 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 | #27534 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | tbd.
### Description
This PR introduces a new `find(string $nodePath)`method in the `ArrayNodeDefinition` class, which helps you finding the right node to prepend configuration to ease configuration tree manipulation.
### How to use it
```php
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
...
$rootNode
->children()
->arrayNode('social_media_channels')
->children()
->booleanNode('enable')->end()
->arrayNode('twitter')->end()
->arrayNode('facebook')->end()
->arrayNode('instagram')->end()
->end()
->end()
->end()
;
$this->changeSocialMediaChannelConfiguration($rootNode->find('social_media_channels.enable'));
$this->addTwitterConfiguration($rootNode->find('social_media_channels.twitter'));
$this->addFacebookConfiguration($rootNode->find('social_media_channels.facebook'));
$this->addInstagramConfiguration($rootNode->find('social_media_channels.instagram'));
return $treeBuilder;
}
private function changeSocialMediaChannelConfiguration(NodeDefinition $node)
{
$node
->defaultTrue()
;
}
private function addTwitterConfiguration(NodeDefinition $node)
{
$node
->children()
->integerNode('client_id')->end()
->scalarNode('client_secret')->end()
->end()
;
}
private function addFacebookConfiguration(NodeDefinition $node)
{
$node
->children()
->integerNode('client_id')->end()
->scalarNode('client_secret')->end()
->end()
;
}
private function addInstagramConfiguration(NodeDefinition $node)
{
$node
->children()
->integerNode('client_id')->end()
->scalarNode('client_secret')->end()
->end()
;
}
}
```
Commits
-------
e3b248aee0 [Config] Introduce find method in ArrayNodeDefinition to ease configuration tree manipulation
This PR was squashed before being merged into the 3.4 branch (closes#32007).
Discussion
----------
[Serializer] Handle true and false appropriately in CSV encoder
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27642
| License | MIT
| Doc PR | -
Previously, if `true` was passed in as a value to the CSV encoder then `fputcsv()` would correctly treat it as 1. However, if `false` was passed in, it would be treated as a blank value. `null` would also be treated as a blank value.
This fix makes it consistent so that true and false will map to 1 and 0, while null maps to an empty string.
Commits
-------
89cba00c68 [Serializer] Handle true and false appropriately in CSV encoder
This PR was squashed before being merged into the 4.4 branch (closes#31959).
Discussion
----------
[DomCrawler][Feature][DX] Add Form::getName() method
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | symfony/symfony-docs#11705
The PR adds `Symfony\Component\DomCrawler\Form::getName` method.
The method is actually a syntax sugar but can improve DX when dealing with tests. For example, in the snippet
```php
$client = static::createClient();
$crawler = $client->request('GET', '/post/hello-world');
$form = $crawler->selectButton('submit')->form();
$form['my_form[name]'] = 'Fabien';
$form['my_form[subject]'] = 'Symfony rocks!';
```
the prefix in field name (`my_form`) is form name, which is generated by Symfony automatically. The method, added in the PR helps to get that name in a most obvious way.
Commits
-------
ff53cb462a [DomCrawler][Feature][DX] Add Form::getName() method
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] improve logs
| 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 |
| License | MIT
| Doc PR |
The logs are currently very confusing and duplicated:
- When handled sync the uncaught error it logged and displayed by the console / http error handler anyway. Currently it the warning is duplicated and useless:
```
14:26:11 WARNING [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
14:26:11 ERROR [console] Error thrown while running command "{class}". Message: "OUCH, THAT HURTS! GO TO MOM!"
In HandleMessageMiddleware.php line 82:
[Symfony\Component\Messenger\Exception\HandlerFailedException]
OUCH, THAT HURTS! GO TO MOM!
```
- When handling async is was even confusing because the actual error was logged as warning and the retry (which is a good thing) was the error.
```
13:48:15 WARNING [messenger] An exception occurred while handling message "{class}": OUCH, THAT HURTS! GO TO MOM!
13:48:15 ERROR [messenger] Retrying {class} - retry #1.
```
Now it's must clearer and adds even context like the delay:
```
16:20:11 ERROR [messenger] Error thrown while handling message {class}. Dispatching for retry #3 using 4000 ms delay. Error: "OUCH, THAT HURTS! GO TO MOM!"
...
16:20:15 CRITICAL [messenger] Error thrown while handling message {class}. Removing from transport after 3 retries. Error: "OUCH, THAT HURTS! GO TO MOM!"
```
Commits
-------
2ac7027b71 [Messenger] improve logs
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] fix absolute url generation when scheme is not known
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| 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 | #25491
| License | MIT
| Doc PR |
This fixes two edge cases in the url generator:
1. when the context scheme is not known (empty) generating an absolute url would return an invalid url starting with `://host/path`. #25491 handled the case when the host is unknown which makes sense. but the way it was done, created this new problem.
2. non-http(s) urls do not require a host. e.g. typical `file:///path` urls. url generator is fixed to be in line with rfc3986
Commits
-------
8e04222976 [Routing] fix absolute url generation when scheme is not known
This PR was merged into the 4.4 branch.
Discussion
----------
[VarDumper] caster for HttpClient's response dumps all info
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
No need to dump the internal structure for responses IMHO, here is a caster that dumps the info instead:
![image](https://user-images.githubusercontent.com/243674/59434490-efb5a280-8deb-11e9-8714-5f1ccbc208b1.png)
Commits
-------
2b268379f5 [VarDumper] caster for HttpClient's response dumps all info
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] fix dumping objects that implement __debugInfo()
| 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 | -
Right now it fails if the return value is not an array + it doesn't dump the original details from the object's internals.
Commits
-------
a9d0038ec0 [VarDumper] fix dumping objects that implement __debugInfo()
* 4.3:
fixed CS
fixed CS
fixed CS
Do not log or call the proxy function when the locale is the same
Added missing required dependencies on psr/cache and psr/container in symfony/cache-contracts and symfony/service-contracts respectively.
[HttpClient] fix closing debug stream prematurely
[Mailer] made code more robust
Restore compatibility with php 5.5
fixed sender/recipients in SMTP Envelope
collect called listeners information only once
[HttpKernel] Remove TestEventDispatcher.
This PR was squashed before being merged into the 4.3 branch (closes#32014).
Discussion
----------
Do not log or call the proxy function when the locale is the same
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I was the one creating the PR for logging the change of the locale but ATM I am filled with logs of translator about switching the locale from "en" to "en".. Not sure why.
Commits
-------
31bdfb372c Do not log or call the proxy function when the locale is the same
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] fix closing debug stream prematurely
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31985
| License | MIT
| Doc PR | -
@ElGecko76 can you please confirm this fixes the issue for you?
I'm not able to reproduce so I can't myself. Thanks.
Commits
-------
21857a1edb [HttpClient] fix closing debug stream prematurely
This PR was merged into the 4.3 branch.
Discussion
----------
Fix sender/recipients in SMTP Envelope
| 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 | #31986
| 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
7a2f9bf134 fixed sender/recipients in SMTP Envelope
* 4.3:
add back possibility to use form themes without translations
[HttpClient] fix Psr18Client handling of non-200 response codes
[WebProfilerBundle] fix FC with HttpFoundation v5
[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
fix handling nested embeddables
Added FormInterface to @return Form::getClickedButton docblock
* 4.2:
[WebProfilerBundle] fix FC with HttpFoundation v5
[OptionsResolver] fix adding $triggerDeprecation to Options::offsetGet()
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
Added FormInterface to @return Form::getClickedButton docblock
* 3.4:
[WebProfilerBundle] fix FC with HttpFoundation v5
[Form] test case is not legacy
Fix reporting unsilenced deprecations from insulated tests
Added FormInterface to @return Form::getClickedButton docblock
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] make Psr18Client implement relevant PSR-17 factories
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This should help use the component with libs that consume only PSR-18.
Commits
-------
1c0baf689d [HttpClient] make Psr18Client implement relevant PSR-17 factories
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] test case is not legacy
| 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 | -
At least it's green.
/cc @xabbuh @HeahDude
Commits
-------
9ad324ba29 [Form] test case is not legacy
This PR was squashed before being merged into the 4.4 branch (closes#31321).
Discussion
----------
[DI] deprecates tag !tagged in favor of !tagged_iterator
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #31289
| License | MIT
| Doc PR | tbd.
### Todo
- [x] fix tests
Commits
-------
ab8fb1868f [DI] deprecates tag !tagged in favor of !tagged_iterator
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Add Button type back to Form::getClickedButton docblock
| 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 |
In commit 56429a6f08 the `Button` type was removed from the return doc block.
I suspect this was an oversight because, AFAIK, the [recommended way](https://symfony.com/doc/current/form/multiple_buttons.html) to check the name of a clicked button would require a return type of `Button` or `SubmitButton`.
The effect is that our static analysis checks are failing.
```
Call to an undefined method
Symfony\Component\Form\ClickableInterface::getName().
```
Commits
-------
b71d589071 Added FormInterface to @return Form::getClickedButton docblock
* 4.3:
[Serializer] Fix DataUriNormalizer deprecation (MIME type guesser is optional)
[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
avoid service id conflicts with Swiftmailer
[Form] fix usage of legacy TranslatorInterface
[Serializer] Fix DataUriNormalizer docblock & composer suggest section
This PR was merged into the 4.2 branch.
Discussion
----------
[DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 | none <!-- 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
This should be fixed in 4.2 because the deprecation has been introduced in 4.2 as said by @stof in https://github.com/symfony/symfony/pull/31932/files#r291600094
Commits
-------
caabd92f89 [DependencyInjection] fix the ValidateEnvPlaceHolderPassTest that was using a deprecated path for TreeBuilder
* 4.3:
[Validator] fix deprecation layer of ValidatorBuilder
[HttpKernel] Fix missing use for request and response classes
bumped Symfony version to 4.3.2
updated VERSION for 4.3.1
updated CHANGELOG for 4.3.1
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fix wrong DateTime on outdated ICU library
| Q | A |
| --- | --- |
| Branch? | 3.4 |
| Bug fix? | Yes |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | --- |
| License | MIT |
There is a problem, when server uses outdated version of ICU (php-intl).
It throws no exeption or debug message on unexisting Timezone. So sometimes you can get wrong DateTime in Forms, because Intl uses 'Etc/Unknown' (UTC+0) instead correct Timezone. And it happens very unobvious.
I added `\IntlExeption` for that cases.
Commits
-------
a6025ab5ee Change IntlTimeZone to DateTimeZone
* 4.3:
[HttpKernel] fix link to source generation
[Doctrine Bridge] Check field type before adding Length constraint
[FrameworkBundle] fix BC-breaking property in WebTestAssertionsTrait
[Cache] Pass arg to get callback everywhere
Fix DoctrineBridge upgrade 5.0
[FramworkBundle][HttpKernel] fix KernelBrowser BC layer
Add a missing quote in getValue() DocBlock
[Messenger] Add runtime check for ext redis version
[HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
minor: ChoiceType callable deprecation after/before seems wrong
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] Pass arg to get callback everywhere
| 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 | -
Some adapters does not pass an useless "save" bool arg. However, that makes a `CallbackInterface` callable unusable with them since the arg is required in the interface.
Commits
-------
d03eb033bb [Cache] Pass arg to get callback everywhere
* 4.3:
[Cache] Fixed undefined variable in ArrayTrait
[HttpClient] revert bad logic around JSON_THROW_ON_ERROR
[HttpKernel] Fix handling non-catchable fatal errors
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[HttpClient] add $response->cancel()
[Security] added support for updated \"distinguished name\" format in x509 authentication
This PR was squashed before being merged into the 4.3 branch (closes#31864).
Discussion
----------
[Cache] Fixed undefined variable in ArrayTrait
| 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 |
So once again (see https://github.com/symfony/symfony/pull/29591) my test suite managed to find an error in ArrayTrait in cache. This time it was this PR: https://github.com/symfony/symfony/pull/31395 later improved by https://github.com/symfony/symfony/pull/31590 that introduced `$id` to logging, which I guess should be `$key`? So this PR changes it to `$key`, ~but my tests **still fail** as there is no `$this->namespace` in `ArrayAdapter` (is this the only class that uses this ArrayTrait?). But I don't know what to do about it. Maybe @nicolas-grekas has some answers?~
Commits
-------
8568923491 [Cache] Fixed undefined variable in ArrayTrait
* 4.2:
[HttpKernel] Fix handling non-catchable fatal errors
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[Security] added support for updated \"distinguished name\" format in x509 authentication
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor
…r in RedirectResponse constructor.
| 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 | #31862 <!-- #-prefixed issue number(s), if any -->
| License | MIT
Perform a case-insensitive check on `$headers` in \Symfony\Component\HttpFoundation\RedirectResponse::__construct()
Commits
-------
b5e6c99a3b [HttpFoundation] Fixed case-sensitive handling of cache-control header in RedirectResponse constructor.
* 3.4:
Fix json-encoding when JSON_THROW_ON_ERROR is used
[HttpFoundation] work around PHP 7.3 bug related to json_encode()
[Security] added support for updated \"distinguished name\" format in x509 authentication
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] add $response->cancel()
| 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 | https://github.com/symfony/symfony-docs/pull/11668
An alternative to #31845 and #31842.
Same as #31831 but considered as a bug fix (at the Contracts level), thus for 4.3.
I think we're early enough since 4.3/1.1 to do it.
That will save us some headaches in the short term.
Commits
-------
c402418723 [HttpClient] add $response->cancel()
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] revert bad logic around JSON_THROW_ON_ERROR
| 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 | -
Same as #31869, reverts #31861
Commits
-------
846116edab [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
we still need to implement Serializable as long as we support PHP < 7.4. otherwise serialized data in php 7.2 would not work anymore when people upgrade to php 7.4
* 4.3:
[Console] Add check for Konsole/Yakuake to disable hyperlinks
[HttpClient] work around PHP 7.3 bug related to json_encode()
[VarDumper] fix dumping the cloner itself
Rename the Symfony Mailer service config to avoid conflict with SwitMailer
Set default crypto method - Fix#31105
[Form] add missing symfony/service-contracts dependency
[HttpClient] Don't throw InvalidArgumentException on bad Location header
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Don't throw InvalidArgumentException on bad Location header
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31776
| License | MIT
| Doc PR | -
Instead, just stop following redirections and throw a `RedirectionExceptionInterface` as usual when throwing is not disabled.
Commits
-------
4acca42330 [HttpClient] Don't throw InvalidArgumentException on bad Location header
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Set default crypto method
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31105
| License | MIT
| Doc PR | -
This PR fixes#31105 by providing `STREAM_CRYPTO_METHOD_TLS_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT` as default crypto method when none is defined in user options and TLS is enabled.
Commits
-------
4f0ad25fab Set default crypto method - Fix#31105
This PR was squashed before being merged into the 4.3 branch (closes#31849).
Discussion
----------
[Console] Add check for Konsole/Yakuake to disable hyperlinks
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31809
| License | MIT
| Doc PR |
Added check for environment variable set by Konsole and other relateds terminal emulators.
A ticket has been opened to Konsole team to support this feature someday: https://bugs.kde.org/show_bug.cgi?id=408288
Commits
-------
14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks
This PR was merged into the 4.3 branch.
Discussion
----------
[VarDumper] fix dumping the cloner itself
| 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 | -
Having PHP references inside the cloner badly breaks it when it finds itself in the dumped graph.
Let's remove this optimization, and skip dumping cloners by default as a bonus.
Commits
-------
3cd56cb018 [VarDumper] fix dumping the cloner itself
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] work around PHP 7.3 bug related to json_encode()
| 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 is the remaining of ##31860 for upper branches.
Commits
-------
42904e34e6 [HttpClient] work around PHP 7.3 bug related to json_encode()
This PR was squashed before being merged into the 4.4 branch (closes#31658).
Discussion
----------
[HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31323 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
Passing argument to `Request::isMethodSafe()` should have been deprecated in 4.1. As mentionned there: https://github.com/symfony/http-foundation/blob/master/Request.php#L1435-L1452
We also remove Exceptions throwed when you call `Request::isMethodSafe()` or `Request::isMethodSafe(true)`
Commits
-------
59fa1bd127 [HTTP Foundation] Deprecate passing argument to method Request::isMethodSafe()
This PR was merged into the 4.3 branch.
Discussion
----------
[Form] add missing symfony/service-contracts dependency
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31844
| License | MIT
| Doc PR | -
`ResetInterface` is needed by `CachingFactoryDecorator`, which is used in `CoreExtension`, so this is a mandatory dep.
Commits
-------
8639bcca3d [Form] add missing symfony/service-contracts dependency
* 4.3:
Fix inconsistency in json format regarding DST value
changed type hints
do not process private properties from parent class
[HttpClient] fix unregistering the debug buffer when using curl
don't add embedded properties to wrapping class metadata
[Messenger] set amqp content_type based on serialization format
[Mailer] fixed the possibility to set a From header from MessageListener
The `$expected` template seems not to be consistent.
It will change when the DST value is 0 (it'll not have `dst_savings` for
example)
This patch takes care of the issue, by adding proper condition.
Sponsored-by: Platform.sh
This PR was merged into the 4.3 branch.
Discussion
----------
[Messenger] set amqp content_type based on serialization format
| 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 | #31736
| License | MIT
| Doc PR |
Commits
-------
dee077016d [Messenger] set amqp content_type based on serialization format
This PR was merged into the 4.4 branch.
Discussion
----------
[Security] add MigratingPasswordEncoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Split from #31153: the proposed `MigratingPasswordEncoder` is able to validate password using a chain of encoders, and encodes new them using the best-provided algorithm.
This chained encoder is used when the "auto" algorithm is configured. This is seamless for 4.3 app.
Commits
-------
765f14c80e [Security] add MigratingPasswordEncoder
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Improve TypeValidator to handle array of types
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31330
| License | MIT
| Doc PR | tbd.
The `@Type` constraint is now able to handle multiple types:
```php
/**
* @var string|array
* @Assert\Type(type={"string", "array"})
*/
private $name;
```
and will pass when `$name` is either of type `string` or `array`.
Commits
-------
c8100f34f8 [Validator] Improve TypeValidator to handle array of types
This PR was merged into the 4.4 branch.
Discussion
----------
[Validator] Add compared value path to violation parameters
| Q | A
| ------------- | ---
| Branch? | 4.4 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
While it's not really useful to use as a placeholder in the violation message template (compared to hard-coding it into the message. Nor it is really user-friendly),
it becomes handy in conjunction with #29130 for any mapping logic on client-side.
Commits
-------
2da226a57f [Validator] Add compared value path to violation parameters
This PR was merged into the 4.3 branch.
Discussion
----------
[Mailer] Fix the possibility to set a From header from MessageListener
| 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 | #31733
| 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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
f4254e6f5e [Mailer] fixed the possibility to set a From header from MessageListener
This PR was squashed before being merged into the 4.4 branch (closes#31661).
Discussion
----------
[Translation] refactor ArrayLoader::flatten
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
5b0544691e [Translation] refactor ArrayLoader::flatten
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] add $response->cancel()
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
(BC break allowed by the `@experimental` annotation)
Canceling a response is already possible but requires registering a progress function and throwing an exception from it. This new method aims at making this much simpler.
/cc @jderusse as we discussed this on Slack.
Commits
-------
549930e820 [HttpClient] add $response->cancel()
This PR was merged into the 4.4 branch.
Discussion
----------
[Form][DX] Improved error message on create a form builder with invalid options
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
**before**
> The required option "class" is missing.
**after**
> An error has occurred resolving the options of the form "App\Form\MyEntityType": The required option "class" is missing.
Commits
-------
37c7a2bf09 Improved error message on create a form builder with invalid options
* 4.3:
[Translation] Fixed case sensitivity of lint:xliff command
fix type hint for salt in PasswordEncoderInterface
Simplify code - catch \Throwable capture all exceptions
Collect locale details earlier in the process in TranslationDataCollector
fix typo in PR #31802
update italian validator translation
Add missing translations
[TwigBridge] suggest Translation Component when TranslationExtension is used
* 4.2:
[Translation] Fixed case sensitivity of lint:xliff command
fix type hint for salt in PasswordEncoderInterface
Simplify code - catch \Throwable capture all exceptions
fix typo in PR #31802
update italian validator translation
Add missing translations
This PR was squashed before being merged into the 4.2 branch (closes#31786).
Discussion
----------
[Translation] Fixed case sensitivity of lint:xliff command
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 | -
| License | MIT
| Doc PR | (not needed)
I was checking some errors of `lint:xliff` (https://travis-ci.org/EasyCorp/EasyAdminBundle/jobs/540053551#L657) and saw this:
```
ERROR in src/Resources/translations/EasyAdminBundle.sr_RS.xlf
* There is a mismatch between the language included in the file name ("EasyAdminBundle.sr_RS.xlf") and the "sr-rs" value used in the "target-language" attribute of the file.
ERROR in src/Resources/translations/EasyAdminBundle.zh_CN.xlf
* There is a mismatch between the language included in the file name ("EasyAdminBundle.zh_CN.xlf") and the "zh-cn" value used in the "target-language" attribute of the file.
```
This was suspicious, so I checked the XLIFF standard and it says (http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language):
```
target-language:
Unlike the other XLIFF attributes, the values are not case-sensitive.
```
So, it's valid that `zh-cn` is the target language and `zh-CN` is the file extension. This PR fixes that.
Commits
-------
ec690b2145 [Translation] Fixed case sensitivity of lint:xliff command
This PR was merged into the 4.3 branch.
Discussion
----------
[Translator] Collect locale details earlier in the process
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31600
| License | MIT
| Doc PR | N/A
The [LocaleAwareListener](https://github.com/symfony/symfony/blob/4.3/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php) class reverts the locale back to the default locale when the request has finished. But the `TranslationDataCollector` only collects the locale in `lateCollect`, which only happens when the kernel terminates. This means the locale is reverted back to the default by the time the collector runs.
The PR moves the `locale` and `fallback_locales` from `lateCollect` to `collect`, so that the information can be captured earlier, before the `LocaleAwareListener` is run.
Commits
-------
5c394eeb79 Collect locale details earlier in the process in TranslationDataCollector
* 4.3:
[Security\Core] Make SodiumPasswordEncoder validate BCrypt-ed passwords
[Validator] Fix TimezoneValidator default option
[Messenger] Inject RoutableMessageBus instead of bus locator
[DomCrawler] Fix type error with null Form::$currentUri
[Contracts] Fixed typos
do not enable validator auto mapping by default
[HttpClient] remove unused argument
This PR was squashed before being merged into the 4.3 branch (closes#31744).
Discussion
----------
[Validator] Fix TimezoneValidator default option
| 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 | #... <!-- #-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 branch 4.4.
- Legacy code removals go to the master branch.
-->
Commits
-------
ee71cdbae4 [Validator] Fix TimezoneValidator default option
* 4.3:
Add missed use class for Symfony\Bundle\FrameworkBundle\Test\WebTestCase::$client
[HttpClient] Minor fix in an error message
Fix parameter documentation for Inflector::pluralize() method
Use a more appropriate group when deprecating mode
bumped Symfony version to 4.3.1
updated VERSION for 4.3.0
updated CHANGELOG for 4.3.0
[FrameworkBundle] fix test fixture using deprecated controller and add missing deprecation
[FrameworkBundle] Add a validation on the messenger section
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] Make DebugHandlersListener internal
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Required to remove the legacy `Event` argument type declaration from its `configure()` method in 5.0.
Unlocks #31689
Commits
-------
1a8db293c6 [HttpKernel] Make DebugHandlersListener internal
This PR was merged into the 4.3 branch.
Discussion
----------
[HttpClient] Minor fix in an error message
| 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 | -
| License | MIT
| Doc PR | -
Fixes this:
![image](https://user-images.githubusercontent.com/73419/58624608-e9de9e00-82d0-11e9-9558-3f52388f1531.png)
Commits
-------
2da9e3f717 [HttpClient] Minor fix in an error message
* 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 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
* 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
----------
[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.
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
----------
[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 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] 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
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
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 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
----------
[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
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
----------
[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 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
----------
[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
----------
[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)
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 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
* 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 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 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 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 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 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
----------
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