This PR was merged into the 4.3-dev branch.
Discussion
----------
[Routing] Make important parameters required when matching
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/29763
| License | MIT
| Doc PR | n/a
1. This PR improves "important" route parameters implementation. Instead of considering `!slug` to be a variable name (which is not correct from my POV and leads to a lot of `'!' === $varName[0]` and `substr($varName, 1)` snippets), I took advantage of the `$token` array and used offset `[5]` for keeping boolean importance flag. This approach improved and simplified code.
1. This PR makes important parameters required when matching according to https://github.com/symfony/symfony/issues/29763
Commits
-------
2c3ab22080 Made important parameters required when matching
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] MemcachedSessionHandler::close() must close connection
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License | MIT
Intoduced here https://github.com/symfony/symfony/pull/3333
Commits
-------
38a9d8b6a3 [Bugfix] MemcachedSessionHandler::close() must close connection
This PR was merged into the 4.2 branch.
Discussion
----------
Always pass $key to NullAdapter->createCacheItem
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes (build failure seems unrelated)
| Fixed tickets |
| License | MIT
| Doc PR |
Previously, if this were called, it would throw an ArgumentCountError.
I'm assuming existing code always checks hasItem, so this bug hasn't impacted many people.
This was noticed via static analysis.
The get() method was added to NullAdapter in symfony 4.2
Commits
-------
1976d29e01 Always pass $key to NullAdapter->createCacheItem
This PR was squashed before being merged into the 3.4 branch (closes#29844).
Discussion
----------
[Console] Fixed#29835: ConfirmationQuestion with default true for answer '0'
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Almost all, one failure on appveyor?
| Fixed tickets | #29835
| 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.
-->
When using the ConfirmationQuestion class to ask a yes / no question,
if the default is true, and the answer regex is '/^y/i', then any
value not starting with [yY] is considered false.
This must include "0", which previously would return true, producing results such as:
```
$ php bin/console do:stuff
$ Do you want to continue? 0 <enter>
$ Ok, continuing!
```
Commits
-------
a0a7400d6f [Console] Fixed#29835: ConfirmationQuestion with default true for answer '0'
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][ErrorHandler] Preserve our error handler when a logger sets another one
| 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 logging errors handled by the `ErrorHandler::handleError()` method, the logger can temporarily set its own custom error handler. This is for example the case of `Monolog` in the `StreamHandler` class (cf ebb804e432/src/Monolog/Handler/StreamHandler.php (L101)).
However, when the previous error handler is restored by the logger, it "skips" the real previous handler (the `ErrorHandler::handleError()` one) in the pile and goes back directly to the one before. I guess this is because the `restore_error_handler()` call is technically done in the error handler itself, so it logically restore it to the one before and not to itself.
Here is an easy small example that shows the PHP behavior : https://3v4l.org/4OZNZ
The only solution I have found to fix it is to set our error handler everytime an error is logged.
Here are the things I discovered while trying to find a cleaner fix :
- Setting the same error handler in the error handler itself doesn't actually add it to the pile. This is why adding a check is useless.
- Checking if the logger modified the error handler is impossible anyway : to get the current error handler, you need to set a new one temporarirly and then revert it. However, when you revert it by calling `restore_error_handler()` you end up having the same problem you are trying to fix...
- Also trying to get the current error handler in the error handler itself will return NULL if it is itself.
Commits
-------
b979fff6b8 [Debug][ErrorHandler] Preserve our error handler when a logger set another one
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] PDO-based cache pool table autocreation does not work
look at https://github.com/symfony/symfony/issues/29898
I believe that it is not good fix... But pgsq table not foutd throwed right there, in execute(). Dont know about another DB drivers, and i dont know will execute() again work or not, please if some one know more about PDO than me, check it!
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29898
| License | MIT
Commits
-------
81d3716b0d [Cache] PDO-based cache pool table autocreation does not work
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Changed UrlType input type to text when default_protocol is not null
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29690
| License | MIT
| Doc PR |
replaces #29691
Commits
-------
2791edf1fb [Form] Changed UrlType input type to text when default_protocol is not null
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DI] Added support for deprecating aliases
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #24507
| License | MIT
| Doc PR | TBD
This PR is a continuity of #24707
Commits
-------
6c571adda7 Added support for deprecating aliases (runtime+dumper)
0eb071b9f8 Added support for deprecating an alias
This PR was squashed before being merged into the 3.4 branch (closes#29889).
Discussion
----------
[Serializer] Docblock about throwing exceptions on serializer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Most of the serializers can throw a `\Symfony\Component\Serializer\ExceptionInterface`. This makes the docblock in line with that.
Similar to this https://github.com/symfony/symfony/pull/29832
Commits
-------
0b44ad79c6 [Serializer] Docblock about throwing exceptions on serializer
This PR was merged into the 3.4 branch.
Discussion
----------
Enable PHP 7.3 on Travis
| 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 | -
The bits of #29624 that apply to 3.4.
Commits
-------
335036cf09 Enable PHP 7.3 on Travis
* 4.2:
Bump phpunit bridge cache id
[appveyor] fix create-project phpunit
Fix HttpKernel Debug requirement
Fix heredoc
use final annotation to allow mocking the class
synchronise the form builder docblock
Grammar fix in exception message
fix tests
forward the parse error to the calling code
Avoid dots in generated class names.
[Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
ensure compatibility with older PHPUnit mocks
[Security] Do not mix usage of password_*() functions and sodium_*() ones
* 4.1:
Bump phpunit bridge cache id
[appveyor] fix create-project phpunit
Fix HttpKernel Debug requirement
Fix heredoc
use final annotation to allow mocking the class
synchronise the form builder docblock
Grammar fix in exception message
fix tests
forward the parse error to the calling code
[Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
ensure compatibility with older PHPUnit mocks
[Security] Do not mix usage of password_*() functions and sodium_*() ones
* 3.4:
Bump phpunit bridge cache id
[appveyor] fix create-project phpunit
Fix HttpKernel Debug requirement
Fix heredoc
use final annotation to allow mocking the class
synchronise the form builder docblock
Grammar fix in exception message
fix tests
forward the parse error to the calling code
[Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
ensure compatibility with older PHPUnit mocks
[Security] Do not mix usage of password_*() functions and sodium_*() ones
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
| 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 | -
Currently, when there is no comment for a tag and another tag after, the detection does not work. Example :
```php
/**
* @final
*
* @author John
*/
class A {
}
```
AFAIK, those tags must not be in a specific order. That's why we should try to support more cases because we might miss things to report.
Also I do not understand why the regex is not the same for the classes and methods detection. I fixed that too.
I added a lot of cases in the "extends from final class" test and an easy way to add more when needed. Adding them everywhere might be overkill and useless. WDYT ?
I'm considering this as bug fix.
Commits
-------
c3b670a908 [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends
This PR was squashed before being merged into the 4.3-dev branch (closes#29850).
Discussion
----------
[FrameworkBundle] xliff-version option to translation update command
| 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? | no <!-- please add some, will be required by reviewers -->
| License | MIT
New 'version' option added to xliff translation update command. Currently xliff version is hardcoded to 1.2.
Commits
-------
4ec28bd45d [FrameworkBundle] xliff-version option to translation update command
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix HttpKernel Debug requirement
| 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 `LoggerDataCollector` is using the `SilencedErrorContext` class that doesn't exists before Symfony 3.2
Commits
-------
69feb49c0d Fix HttpKernel Debug requirement
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] synchronise the form builder 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 |
Commits
-------
419d3db86c synchronise the form builder docblock
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] use final annotation to allow mocking the class
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29946
| License | MIT
| Doc PR |
When the class was initially marked as `final`, it did only contain constants. Since #24337 the `Security` class also contains useful shortcut methods so allowing developers to mock the class in tests looks reasonable to me.
Commits
-------
1da00db247 use final annotation to allow mocking the class
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] forward the parse error to the calling code
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29891
| License | MIT
| Doc PR |
This change does not fully solve the linked issue, but improves the exception a bit by providing a bit more context.
The error page will no start like this:
![bildschirmfoto 2019-01-18 um 12 28 14](https://user-images.githubusercontent.com/1957048/51384558-f7af3600-1b1c-11e9-9744-a40c41c821ce.png)
Commits
-------
c5c2d31fef forward the parse error to the calling code
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Do not mix password_*() API with libsodium one
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | n/a
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Argon2IPasswordEncoder uses native `password_hash()` and `password_verify()` functions if the current PHP installation embeds Argon2 support (>=7.2, compiled `--with-password-argon2`).
Otherwise, it fallbacks to the libsodium extension.
This was fine at time the encoder was introduced, but meanwhile libsodium changed the algorithm used by `sodium_crypto_pwhash_str()` which is now argon2id, that goes outside of the scope of the encoder which was designed to deal with `argon2i` only.
Nothing we can do as databases may already contain passwords hashed with argon2id, the encoder must keep validating those.
However, the PHP installation may change as time goes by, and could suddenly embed the Argon2 core integration. In this case, the encoder would use the `password_verify()` function which would fail in case the password was not hashed using argon2i.
This PR prevents it by detecting that argon2id was used, avoiding usage of `password_verify()`.
See https://github.com/jedisct1/libsodium-php/issues/194 and https://github.com/symfony/symfony/issues/28093 for references.
Patch cannot be tested as it is platform dependent.
Side note: I'm currently working on a new implementation for 4.3 that will properly supports argon2id (which has been added to the PHP core sodium integration in 7.3) and argon2i, distinctively.
Commits
-------
d6cfde94b4 [Security] Do not mix usage of password_*() functions and sodium_*() ones
* 3.4:
fixed CS
fixed short array CS in comments
fixed CS in ExpressionLanguage fixtures
fixed CS in generated files
fixed CS on generated container files
fixed CS on Form PHP templates
fixed CS on YAML fixtures
fixed fixtures
switched array() to []
This PR was squashed before being merged into the 4.3-dev branch (closes#29862).
Discussion
----------
Add block prefix to csrf token field
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #...
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10867
Currently I use the following code snippet to overwrite the token rendering:
```twig
{%- block hidden_widget -%}
{%- if form.vars.name == '_token' -%}
{{ block('app__token_widget') }}
{%- else -%}
{{ block('hidden_widget', 'form_div_layout.html.twig') }}
{%- endif -%}
{%- endblock hidden_widget -%}
{%- block app__token_widget %}
{{ render_esi(controller('SuluFormBundle:FormWebsite:token', { 'form': form.parent.vars.name })) }}
{%- endblock app__token_widget -%}
```
With the change of https://symfony.com/blog/new-in-symfony-4-3-simpler-form-theming this workaround can now be removed and the following can be used:
```twig
{%- block token_widget %}
{{ render_esi(controller('SuluFormBundle:FormWebsite:token', { 'form': form.parent.vars.name })) }}
{%- endblock token_widget -%}
```
Commits
-------
02bd6893a5 Add block prefix to csrf token field
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] remove unreachable code
| 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 |
Since our version constraint is `^1.37.1|^2.6.2` any Twig version that
is below 2.4.5 must be a Twig 1.x release.
Commits
-------
16f97b9769 remove unreachable code
In #29853 the bugfix made in #29597 was reverted as it did not work as
expected. This fixture file has been modified after the 3.4 branch was
merged up to account for the changes made in #2957 and must now be
reverted to the former state too.
This PR was merged into the 3.4 branch.
Discussion
----------
Update MimeType extensions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | 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
-------
5183049b73 updated MimeType extensions
This PR was merged into the 4.3-dev branch.
Discussion
----------
Update MimeType extensions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | 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
-------
5183049b73 updated MimeType extensions
This PR was squashed before being merged into the 4.3-dev branch (closes#29813).
Discussion
----------
[FrameworkBundle] Remove ControllerTrait::isFormValid()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24576#issuecomment-452220557
| License | MIT
| Doc PR |
**edit**: During the first draft I made, I did not use the request stack. I finally used it to mimic other shortcut! It was a bad idea. Now there is less code, it's simpler. Love it more
Commits
-------
2be1987ad1 [FrameworkBundle] Remove ControllerTrait::isFormValid()
This PR was squashed before being merged into the 3.4 branch (closes#29864).
Discussion
----------
[Form] SA fix
| 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 -->
<!--
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
-------
1c85707946 [Form] SA fix
This PR was squashed before being merged into the 4.1 branch (closes#29745).
Discussion
----------
SCA: minor code tweaks
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Eliminated a few excessive calls, tweaked query parameters sorting
Commits
-------
8887f76b64 SCA: minor code tweaks
This PR was merged into the 3.4 branch.
Discussion
----------
Fix SwiftMailerHandler to support Monolog's latest reset functionality
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Monolog 1.24 added the ResettableInterface which is meant to support resetting handlers. Reset should also flush as if the request was ending, and it can be used for long running workers for example in between each job that is processed. Due to SwiftMailer's spool however the emails in case of errors are right now only sent at the very end of the worker's lifetime.
For older Monolog versions, this will be ignored, and is thus harmless.
Commits
-------
ada2d83b67 Fix SwiftMailerHandler to support Monolog's latest reset functionality
This PR was squashed before being merged into the 4.3-dev branch (closes#29797).
Discussion
----------
[Dotenv] improved code coverage and removed unreachable code
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
34dac7c8fd [Dotenv] improved code coverage and removed unreachable code
This PR was squashed before being merged into the 4.3-dev branch (closes#29148).
Discussion
----------
Load original file metadata when loading Xliff 1.2 files
| 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
At PrestaShop, we maintain our translations catalog automatically using an internal tool based on our [TranslationToolsBundle](https://github.com/PrestaShop/TranslationToolsBundle), which is capable of reverse building a MessageCatalogue by parsing the source code, and then saving it to Xliff files.
Currently, this tool is only capable of building catalogs from scratch. We are currently moving to an incremental catalog where we only add new wordings, and keep old ones even if they are no longer present in the code (because of B/C). To do that, instead of starting from a clean MessageCatalogue, we load our current catalog using XliffLoader, and use that MessageCatalogue as a base. Easy peasy. But then we found a problem...
The Xliff 1.2 standard defines a list of `<trans-unit>` elements within a collection of `<file>` elements. The `<file>` element has a required attribute named `original`, which is supposed to contain the name of the file where the wordings are used in (at least in our case it does). **This attribute is currently ignored by XliffFileLoader**.
This means that it's currently impossible to read a Xliff 1.2 file using XliffFileloader, and save it back to Xliff without losing data.
This Pull Request adds a new `file` element to the messages' metadata (alongside `notes`, `target-attributes` and `id`). Right now, it only contains `original`, but it could be extended to contain all the other attributes from the `<file>` element if needed.
This required a small change in the loader where we loop through `<file>` elements before fetching their `<trans-unit>` children, instead of fetching all `<trans-unit>` elements at once.
Commits
-------
4073319d0f Load original file metadata when loading Xliff 1.2 files
This PR was merged into the 3.4 branch.
Discussion
----------
Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused"
This reverts commit 44e9a91f30, reversing
changes made to 91b28ff081.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29836
| License | MIT
| Doc PR |
4.2.2 release changed the way tagged service are injected
As asked by @nicolas-grekas https://github.com/symfony/symfony/issues/29836#issuecomment-453464500
Commits
-------
b3e17d2101 Revert "bug #29597 [DI] fix reporting bindings on overriden services as unused (nicolas-grekas)"
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle] pass project dir into the assets install command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29708#discussion_r244287106
| License | MIT
| Doc PR |
Commits
-------
b373d4206b pass project dir into the assets install command
* 4.2:
Fix docs
enabled short array notation in CS
[fabbot] enable short arrays
bumped Symfony version to 4.2.3
updated VERSION for 4.2.2
updated CHANGELOG for 4.2.2
bumped Symfony version to 4.1.11
updated VERSION for 4.1.10
updated CHANGELOG for 4.1.10
bumped Symfony version to 3.4.22
updated VERSION for 3.4.21
update CONTRIBUTORS for 3.4.21
updated CHANGELOG for 3.4.21
* 4.1:
Fix docs
enabled short array notation in CS
[fabbot] enable short arrays
bumped Symfony version to 4.1.11
updated VERSION for 4.1.10
updated CHANGELOG for 4.1.10
bumped Symfony version to 3.4.22
updated VERSION for 3.4.21
update CONTRIBUTORS for 3.4.21
updated CHANGELOG for 3.4.21
* 3.4:
Fix docs
enabled short array notation in CS
[fabbot] enable short arrays
bumped Symfony version to 3.4.22
updated VERSION for 3.4.21
update CONTRIBUTORS for 3.4.21
updated CHANGELOG for 3.4.21
symfony documentation tells people to pass null, and it is the default, but the method docs don't allow it so static analyzers complain about it (spotted by phan)
This PR was squashed before being merged into the 4.3-dev branch (closes#29762).
Discussion
----------
Improved performance of LoggerDataCollector
| 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 | - <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | -
My feeling is that Symfony's "dev" environment is more and more slow lately. After profiling the Symfony Demo app with Blackfire, I found that `getContainerCompilerLogs()` is one of the slowest methods.
Given that you rarely need or look at these "compiler logs", in this PR I propose to get them only when/if you really need them.
[The before/after profile comparison](https://blackfire.io/profiles/compare/4959d918-8e00-4cd7-9b0b-41919e73ae62/graph) confirms a nice performance improvement and thousands of functions no longer called.
Commits
-------
3b8d6d19ec Improved performance of LoggerDataCollector
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DI] Add trim env processor
| 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 | #26708 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | Todo
Which is especially useful in combination with the `file` env processor.
Commits
-------
e226492db7 [DI] Add trim env processor
* 4.2:
properly fix tests on PHP 5
fix tests on PHP 5
remove doubled dot from exception message
bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
[Intl] make type-hinted arguments nullable
[DI] Fixed wrong factory method in exception
Changed gender choice types to color
Fix unnecessary use
remove no longer needed PHP version checks
remove no longer needed PHP version checks
Fixed groupBy argument value in DefaultChoiceListFactoryTest
[HttpKernel] Correctly Render Signed URIs Containing Fragments
[HttpFoundation] Fix request uri when it starts with double slashes
* 4.1:
properly fix tests on PHP 5
fix tests on PHP 5
remove doubled dot from exception message
bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
[Intl] make type-hinted arguments nullable
[DI] Fixed wrong factory method in exception
Changed gender choice types to color
remove no longer needed PHP version checks
remove no longer needed PHP version checks
Fixed groupBy argument value in DefaultChoiceListFactoryTest
[HttpKernel] Correctly Render Signed URIs Containing Fragments
[HttpFoundation] Fix request uri when it starts with double slashes
* 3.4:
properly fix tests on PHP 5
fix tests on PHP 5
bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
Changed gender choice types to color
remove no longer needed PHP version checks
Fixed groupBy argument value in DefaultChoiceListFactoryTest
[HttpKernel] Correctly Render Signed URIs Containing Fragments
[HttpFoundation] Fix request uri when it starts with double slashes
Previously, if this were called, it would throw an ArgumentCountError.
I'm assuming existing code always checks hasItem, so this bug hasn't impacted many people.
This was noticed via static analysis.
The get() method was added to NullAdapter in symfony 4.2
This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes#29697).
Discussion
----------
[DI] Fixed wrong factory method in exception
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29678 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a <!-- required for new features -->
When a service definition with a factory defines invalid arguments, the [resulting exception message ](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php#L70)incorrectly specifies the factory constructor instead of the factory method as not having the specified named arguments.
<!--
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
-------
922885c892 [DI] Fixed wrong factory method in exception
This PR was squashed before being merged into the 4.3-dev branch (closes#28902).
Discussion
----------
[Debug] Detect virtual methods using @method
| 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 | https://github.com/symfony/symfony/pull/28897#issuecomment-430542792
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/10504
My first Debug PR, so im still on it. But early feedback welcome.
In #28901 we'll introduce a new virtual interface method using `@method` annotation. IIUC the idea is to trigger whenever such a method is overridden.
Commits
-------
38877c32ac [Debug] Detect virtual methods using @method
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fix request uri when it starts with double slashes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29478
| License | MIT
| Doc PR | ~
When the `REQUEST_URI` starts with a slash no need to `parse_url()`. However to keep the same behaviour regarding the fragment we need to add a logic to remove it. While `parse_url()` handle all cases itself.
Commits
-------
cf850c1a15 [HttpFoundation] Fix request uri when it starts with double slashes
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator] Add tests in regex validator for objects with __toString method
This PR adds tests to cover objects implementing the `__toString` method for the `Regex` validator.
| Q | A
| ------------- | ---
| Branch? | 3.4 (careful when merging)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
11e0df4f55 [Validator] Add tests in regex validator for objects with __toString method
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Correctly Render Signed URIs Containing Fragments
| 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
- Rebuild the URL with the computed hash instead of appending it onto the end of the fragment.
- Update unit tests, and add new unit test to cover URIs that include fragments.
Commits
-------
b9ece6bde7 [HttpKernel] Correctly Render Signed URIs Containing Fragments
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fix FormDefaultChoiceListFactory test
| 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/pull/29731#pullrequestreview-189023682
| License | MIT
| Doc PR | n/a
`$groupBy` is either `null` or `callable`. Passing `array()` is wrong.
Commits
-------
b8f6390ef9 Fixed groupBy argument value in DefaultChoiceListFactoryTest
This PR was merged into the 3.4 branch.
Discussion
----------
remove no longer needed PHP version checks
| 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
-------
99448c6e78 remove no longer needed PHP version checks
This PR was merged into the 4.1 branch.
Discussion
----------
remove no longer needed PHP version checks
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
7a132fe156 remove no longer needed PHP version checks
* 4.2:
Ensure final input of CommandTester works with default
Do not risk waiting 100 seconds
[Intl] handle null date and time types
Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
Do not ignore the choice groups for caching
If the final element of `CommandTester::setInputs()` is an empty string (to send the default value), the internal stream the tester uses hits EOF and triggers the `Aborted` exception. This appends an additional EOL to the stream after the `implode` to simulate one final return key, allowing the final input to use the default value when used in the tester's documented style.
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Do not ignore the choice groups for caching
| 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
While working on a different issue I suddenly came over a strange behaviour.
```php
$builder
->add('choice1', ChoiceType::class, [
'choices' => [
'a' => 'a',
'b' => 'b',
'c' => 'c',
],
'multiple' => true,
])
->add('choice2', ChoiceType::class, [
'choices' => [
'ab' => [
'a' => 'a',
'b' => 'b',
],
'c' => 'c',
],
'multiple' => true,
]);
```
The code above will result in two identical selects:
![image](https://user-images.githubusercontent.com/2552865/50459865-b3e36980-0980-11e9-8f3d-17f9cfa9a7f8.png)
The reason for this is hash generation in `Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator::createListFromChoices()` — it does not take array structure into account. See [the comment and the code below it](7f46dfb1c4/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php (L116)).
The comment says that the same choice list should be returned for the same collection of choices no matter the structure. This is wrong, because `ChoiceListInterface` has a method `getStructuredValues()` and thus a list instance cannot identified by a hash which does not take structure into account.
I propose a simple change that fixes this and allows for similar choice fields with different groupings.
ping @HeahDude
Commits
-------
9007911a85 Do not ignore the choice groups for caching
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] Add new block_prefix option for an easy form theming
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29651
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10835
Commits
-------
bd50ac44fc Add block_prefix option for an easy form theming
This PR was merged into the 4.2 branch.
Discussion
----------
Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Intl is an hard dependency for Form, these checks cannot be reached.
Commits
-------
3ac98a6a17 Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
This PR was squashed before being merged into the 4.3-dev branch (closes#29755).
Discussion
----------
Improved BIC + IBAN validator for some special cases
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| 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 | -
| License | MIT
| Doc PR | -
While blogging about [Improved Financial Constraints in Symfony 4.3](https://symfony.com/blog/new-in-symfony-4-3-improved-financial-constraints) I found this resource that mentions some exceptions when validating BIC + IBAN: https://wiki.xmldation.com/index.php?title=Support/EPC/IBAN_%26_BIC_relation
I don't know if that resource is fully reliable ... but I checked it in the official "European Banking Resources" website (https://www.ecbs.org/iban/) and most of it matches, so I think we can safely make this change.
Commits
-------
88a1696a64 Improved BIC + IBAN validator for some special cases
This PR was merged into the 3.4 branch.
Discussion
----------
[Intl] handle null date and time types
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29705
| License | MIT
| Doc PR |
Commits
-------
6ded31a3b9 [Intl] handle null date and time types
* 4.2:
update years in license files
Fix: Adjust DocBlock
\"ParserTest->getParserTestData()\" -> only some more tests
access the container getting it from the kernel
Replace slave and master by replica and primary
Fix erasing cookies issue
[Lock] Pedantic improvements for lock
[EventDispatcher] Fixed phpdoc on interface
update year in license files
[VarExporter] fix exporting array indexes
[SecurityBundle] Fix traceable voters
[Console] Fix help text for single command applications
Fix random test failure on lock
improve error message when using test client without the BrowserKit component
Fixed minor typos in an error message
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Fixed minor typos
Fix: Method can also return null
[Stopwatch] Fixed phpdoc for category name
* 4.1:
Fix: Adjust DocBlock
\"ParserTest->getParserTestData()\" -> only some more tests
access the container getting it from the kernel
[Lock] Pedantic improvements for lock
[EventDispatcher] Fixed phpdoc on interface
update year in license files
[Console] Fix help text for single command applications
Fix random test failure on lock
improve error message when using test client without the BrowserKit component
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Fixed minor typos
Fix: Method can also return null
[Stopwatch] Fixed phpdoc for category name
* 3.4:
Fix: Adjust DocBlock
\"ParserTest->getParserTestData()\" -> only some more tests
[Lock] Pedantic improvements for lock
[EventDispatcher] Fixed phpdoc on interface
update year in license files
[Console] Fix help text for single command applications
Fix random test failure on lock
improve error message when using test client without the BrowserKit component
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Fixed minor typos
Fix: Method can also return null
[Stopwatch] Fixed phpdoc for category name
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpKernel] Set the default locale early
| 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 |
Similar to #29186, the default locale isn't set till after the router so isn't available when trying to handle errors there (well, only the _default_ default locale is).
Commits
-------
02c9f352d9 Set the default locale early
This PR was merged into the 4.3-dev branch.
Discussion
----------
[HttpKernel] Increase priority of AddRequestFormatsListener
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19469
| License | MIT
| Doc PR |
Currently `AddRequestFormatsListener` has a low priority, so it won't fire before others like `RouterListener` which can create problems (eg when listening for a HTTP exception thrown by the router you don't have access for any custom types).
IMO this map should be in the application rather than set on every request, but the same can be achieved by giving it a high priority. (Can't think of a reason for it to not be first...)
Commits
-------
9bf313660d Increase priority of AddRequestFormatsListener
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator] Choices constraint improvement
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Hi,
here is a little improvement for the choice constraint: expose a new `choices` wildcard for the messages, in order to provide a way to display easily the valid choices to the user.
thanks.
Commits
-------
71dfa35a21 add new `choices` wildcard in message
This PR was squashed before being merged into the 4.3-dev branch (closes#29283).
Discussion
----------
[Serializer] CsvEncoder no header option (encode / decode)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27447
| License | MIT
| Doc PR | -
This PR wants to introduce a new context option for the CsvEncoder, `CsvEncoder::NO_HEADERS_KEY` (boolean), that allows CSV encoding/decoding when you don't have/need a header.
By default this is assumed to be false, so the headers are included in the CSV output or assumed to be present in the CSV input.
When the option is set to true, the following behaviour occurs.
Encoding
===
The following PHP input
```php
array(array('a','b'), array('c', 'd'))
```
will generate this CSV output
```csv
a,b
c,d
```
Decoding
===
Considering the CSV input to be
```csv
a,b
c,d
```
the following PHP array will be returned
```php
array (
0 => array (
0 => 'a',
1 => 'b',
),
1 => array (
0 => 'c',
1 => 'd',
),
)
```
Commits
-------
0e63c61190 [Serializer] CsvEncoder no header option (encode / decode)
This PR was squashed before being merged into the 4.3-dev branch (closes#29718).
Discussion
----------
[PHPUnit bridge] Bump php version of PHPUnit-bridge
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (?)
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Related to https://github.com/symfony/symfony/pull/29623#issuecomment-450400625
I checked the BC page I think I couldn't find any related to BC changes... anyway...
As far as I understood from the comment above I must target `master` branch.
Commits
-------
59313095d3 [PHPUnit bridge] Bump php version of PHPUnit-bridge
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] Fixed phpdoc on interface
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
94bd28ebb0 [EventDispatcher] Fixed phpdoc on interface
This PR was merged into the 3.4 branch.
Discussion
----------
update year in license files
| 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 |
Happy new year to each and everyone from the Symfony community. 🎉
Commits
-------
6c895b9757 update year in license files
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] improve errors in tests missing the BrowserKit component
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29696
| License | MIT
| Doc PR |
Commits
-------
7961a29a57 improve error message when using test client without the BrowserKit component
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Fix lock test random failure
| 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 | NA
The expiration of some store (PDO and Memcached) have a precision of 1 second.
The current test suite of the component tries to putof the expiration to time + 1 second then tries to check the value of the lock. This could generate test failure (see https://travis-ci.org/symfony/symfony/jobs/473530213#L3389)
Commits
-------
8cff565947 Fix random test failure on lock
This PR was squashed before being merged into the 3.4 branch (closes#29727).
Discussion
----------
[Lock] Pedantic improvements for lock
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Yes, this PR is just about comments, I hope it's ok, I just stumbled into this issues while trying to figure out the bug fixed by #29726
Commits
-------
dc568c0ba1 [Lock] Pedantic improvements for lock
This PR was merged into the 3.4 branch.
Discussion
----------
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset() callStack to null
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29703 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset. Basically https://github.com/symfony/symfony/pull/29411 introduced an issue where calling dispatch after a reset would throw an error because now reset set callStack to array but dispatch expected either SplObjectStorage or null. Now reset sets null. Also added a test to verify dispatch works following a call to reset.
Commits
-------
51bcdb8dc3 [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
Rebuild the URL with the computed hash instead of appending it onto the end of the URI, preventing incorrect formatting when dealing with URIs containing fragments.
* 4.2:
[Twig] Remove spaces to fix whitespace in tags
[Twig] Replace for-loops with blocks for attributes
fixed CS
[Tests] Change to willThrowException
[Console] fix PHPDoc in Command
Update FileLoaderLoadException.php
Fix wrong calls to clearstatcache
Add Vietnamese translation for validators
Allow running PHPUnit with "xdebug.scream" ON
[VarDumper] Add descriptors tests
[Cache] fix bad optim
[Yaml] detect circular references
[DI] fix reporting bindings on overriden services as unused
[Routing] minor fix or previous PR
This PR was squashed before being merged into the 4.2 branch (closes#29636).
Discussion
----------
[Twig] Remove spaces to fix whitespace in tags
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| License | MIT
`form_help` tags in forms have double spaces between its `id` als `class` attributes.
Fixed this by removing unnecessary spaces.
This issue was introduced in `4.2`.
Commits
-------
82acc89840 [Twig] Remove spaces to fix whitespace in tags
This PR was squashed before being merged into the 4.3-dev branch (closes#29599).
Discussion
----------
[Routing] Allow force-generation of trailing parameters using eg "/exports/news.{!_format}"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29593
| License | MIT
When a route is defined as path: `/exports/news.{!_format}`, we should force `_format` be defined in `defaults` and the generator should generate URLs with that default when none is provided (should work with any parameter of course).
Commits
-------
9fab3d62ec [Routing] Allow force-generation of trailing parameters using eg \"/exports/news.{!_format}\"
This PR was squashed before being merged into the 3.4 branch (closes#29654).
Discussion
----------
[Twig] Replace for-loops with blocks for attributes
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? |
| Fixed tickets |
| License | MIT
| Doc PR |
As mentioned in #29636, replaced for-loops with blocks for attributes to make use of its features.
Commits
-------
0cd8088a6d [Twig] Replace for-loops with blocks for attributes
This PR was merged into the 4.1 branch.
Discussion
----------
[VarDumper] Add descriptors tests
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Just adding some tests for these classes & fixing a small issue with the optional `project_dir` entry from `source` context provider.
If merged before #29613, I'll update tests in it (796ca6b4c6b6f758383ec37ebec952d0fe0ccfe0) (otherwise could be picked on merge).
Commits
-------
8570b8af2a [VarDumper] Add descriptors tests
This PR was merged into the 4.3-dev branch.
Discussion
----------
[VarDumper] Use hyperlinks in CliDescriptor
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | Part of #29585 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Leverages #29168 to add the hyperlink directly on the source text instead of printing below:
#### Before (or with `symfony/console < 4.3`)
![capture d ecran 2018-12-14 a 16 37 18](https://user-images.githubusercontent.com/2211145/50012891-1e2efe00-ffc0-11e8-9e07-b5358cb057bd.png)
#### After
![capture d ecran 2018-12-14 a 16 12 13](https://user-images.githubusercontent.com/2211145/50012921-25560c00-ffc0-11e8-92cd-d6efd43419f9.png)
Commits
-------
e54e21933a [VarDumper] Use hyperlinks in CliDescriptor
Since https://github.com/symfony/symfony/pull/25733 the Kernel attempts to unlink the legacy container while being built.
This throws an error if the file did not exist, for example on a clean install, on the build, which is then silenced.
That's fine on production systems, but on our build we have enabled "xdebug.scream" in order to visualise every errors, which basically un-silences the errors. I believe there should not be a need to silence anything on a usual, clean usage of the system.
Making this `unlink` conditional fixes it.
Could you please approve and merge this PR?
Thanks
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DomCrawler] return empty string on `Crawler::text()` and `Crawler::html()` instead of an exception
…stead of an exception
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28313
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This changes the behavior when using text and html methods from the Crawler by returning null instead of throwing an exception.
Commits
-------
6a4ce386fe [DomCrawler] Added ability to return a default value in `text()` and `html()` instead of throwing an exception when node is empty.
* 4.2:
[FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock
Fix env fallback to an unresolved variable
[DI] map snake-case ids of service subscribers to camel-case autowiring aliases
This PR was merged into the 4.2 branch.
Discussion
----------
[DI] map snake-case ids of service subscribers to camel-case autowiring aliases
| 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 | -
Discovered during the workshop at SymfonyCon Lisbon.
Commits
-------
af17da9f82 [DI] map snake-case ids of service subscribers to camel-case autowiring aliases
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Console] Test href case conservation
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | no <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Expecting this test to fail until https://github.com/symfony/symfony/pull/29619 is merged up.
Commits
-------
2b55d1504e [Console] Test href case conservation
* 4.2:
[Routing] fix trailing slash redirections involving a trailing var
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
Fix undefined variable in cache ArrayTrait
fixed public directory of web server and assets install when configured in composer.json
* 4.1:
[Routing] fix trailing slash redirections involving a trailing var
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
fixed public directory of web server and assets install when configured in composer.json
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] fix trailing slash redirections involving a trailing var
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29553
| License | MIT
| Doc PR | -
The code in `PhpMatcherDumper` is terrible, but the good news is that 4.2 is much better already.
The change in `UrlMatcher` is much more readable and implements the same fixed logic.
The new test case is in `UrlMatcherTest`.
Commits
-------
6433f8a3e9 [Routing] fix trailing slash redirections involving a trailing var
* 3.4:
[EventDispatcher] Revers event tracing order
[Security] Prefer clone over unserialize(serialize()) for user refreshment
[Console] OutputFormatter: move strtolower to createStyleFromString
Adjust tests to work in the armhf architecture. Fixes#29281.
Vietnamese translations improvement
[Form] Fixed FormErrorIterator class phpdoc
Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
Don't use he in docs when its not needed
EventSubscriberInterface isn't a man
fixed public directory of web server and assets install when configured in composer.json
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] Revers event tracing order
| 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 -->
Split from #29312 for 3.4
This traces events in dispatch order.
Before:
![image](https://user-images.githubusercontent.com/1047696/49330956-5f71e780-f596-11e8-8701-80458e715213.png)
After:
![image](https://user-images.githubusercontent.com/1047696/49330963-79abc580-f596-11e8-8666-5535afd59b31.png)
Here we see it also collects "terminate" events (both kernel & console for not-called listeners). In case of exception page the fix is even better: https://github.com/symfony/symfony/pull/29312#pullrequestreview-178076750
Which now correctly shows the kernel.exception event of the main request is dispatched _before_ the kernel.request event of the sub-request.
Moreover, it de-duplicates events. So we actually see the sub-request events 🎉
_Havent looked at tests yet._
Commits
-------
2570d6f877 [EventDispatcher] Revers event tracing order
This PR was merged into the 3.4 branch.
Discussion
----------
Fixed public directory when configured in composer.json
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
As documented you should be able to change the public-dir by composer.json so the server:run and assets:install should also use that configuration when available:
https://symfony.com/doc/3.4/configuration/override_dir_structure.html#override-the-web-directoryhttps://symfony.com/doc/current/configuration/override_dir_structure.html#override-the-public-directory
#SymfonyConHackDay2018
Commits
-------
c45062b71a fixed public directory of web server and assets install when configured in composer.json
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] OutputFormatter: move strtolower to createStyleFromString
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | not really
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
While playing with the href feature that'll be available in 4.3,
I spotted href value [is lowercased](https://github.com/symfony/symfony/pull/29620). Which I guess could be an issue on case-sensitive filesystems.
This changes nothing for the current branch, but will allow when merging
to upper branches to fix the behavior described above, hence keep original case.
Commits
-------
8e2bd35dca [Console] OutputFormatter: move strtolower to createStyleFromString
While playing with the href feature that'll be available in 4.3,
I spotted href value is lowercased. Which I guess could be an issue
on case-sensitive filesystems.
This changes nothing for the current branch, but will allow when merging
to upper branches to fix the behavior described above, hence keep original case.
This PR was squashed before being merged into the 3.4 branch (closes#29606).
Discussion
----------
[Form] Fixed FormErrorIterator class phpdoc
| 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
Fixed an outdated paragraph in `FormErrorIterator` (since https://github.com/symfony/symfony/pull/10418).
Commits
-------
732b86317d [Form] Fixed FormErrorIterator class phpdoc
This PR was merged into the 4.2 branch.
Discussion
----------
[Cache] Fix undefined variable in ArrayTrait
| 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 |
After upgrading my project to 4.2 my tests failed with a message that `$key` variable is missing here: e81285249b/src/Symfony/Component/Cache/Traits/ArrayTrait.php (L131) which seems to be introduced with PR https://github.com/symfony/symfony/pull/27563.
So I added that variable to the trait and method calls (are there any other?). This is internal class so I guess noone is using it anywhere.
Anyway, my tests pass with this fix.
Commits
-------
b0b5937d1d Fix undefined variable in cache ArrayTrait
* 4.2: (27 commits)
[VarExporter] dont call userland code with uninitialized objects
Fix typos in doc blocks
[Debug] ignore underscore vs backslash namespaces in DebugClassLoader
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
[FrameworkBundle] fix describing routes with no controllers
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Update ValidationListener.php
[Yaml] ensures that the mb_internal_encoding is reset to its initial value
[Messenger] Restore message handlers laziness
[WebLink] Fixed documentation link
[Security] getTargetPath of TargetPathTrait must return string or null
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
Optimize perf by replacing call_user_func with dynamic vars
[Cache] Fix dsn parsing
[Routing] fix dumping same-path routes with placeholders
[WebProfilerBundle][TwigBundle] CSS fixes
Add a docblock for FormFactoryInterface
[Security] defer log message in guard authenticator
[Validator] Added IBAN format for Vatican City State
merge conflicts
...
* 4.1:
Fix typos in doc blocks
[Debug] ignore underscore vs backslash namespaces in DebugClassLoader
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
[FrameworkBundle] fix describing routes with no controllers
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Update ValidationListener.php
[Yaml] ensures that the mb_internal_encoding is reset to its initial value
[WebLink] Fixed documentation link
[Security] getTargetPath of TargetPathTrait must return string or null
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
Optimize perf by replacing call_user_func with dynamic vars
[Routing] fix dumping same-path routes with placeholders
[Security] defer log message in guard authenticator
[Validator] Added IBAN format for Vatican City State
merge conflicts
filter out invalid Intl values
filter out invalid language values
[Validator] Fixed grouped composite constraints
[Form] Filter arrays out of scalar form types
Fix HeaderBag::get phpdoc
* 3.4:
[Debug] ignore underscore vs backslash namespaces in DebugClassLoader
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
[FrameworkBundle] fix describing routes with no controllers
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
Update ValidationListener.php
[Yaml] ensures that the mb_internal_encoding is reset to its initial value
[WebLink] Fixed documentation link
[Security] getTargetPath of TargetPathTrait must return string or null
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
[Security] defer log message in guard authenticator
merge conflicts
Fix HeaderBag::get phpdoc
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DI] compute autowiring error messages lazily
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29019
| License | MIT
| Doc PR | -
As suggested in the linked issue:
> the error message may ultimately be "hidden" because the definition in question is removed... and so we're doing work unnecessarily.
Commits
-------
3b3a1bd3cc [DI] compute autowiring error messages lazily
This PR was merged into the 4.3-dev branch.
Discussion
----------
[VarDumper] add support for links in CliDumper
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Same as #29168 for VarDumper:
![capture d ecran de 2018-11-15 20-10-08](https://user-images.githubusercontent.com/243674/48576196-24c04c00-e914-11e8-8a61-c1304c876243.png)
Thanks @ostrolucky for this nice discovery!
Commits
-------
e7cd44f5b2 [VarDumper] add support for links in CliDumper
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] fix describing routes with no controllers
| 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 by @jpauli during a training.
Commits
-------
a1c612aedf [FrameworkBundle] fix describing routes with no controllers
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29550
| License | MIT
| Doc PR | n/a
From https://github.com/symfony/symfony/issues/29550#issuecomment-446351365: The fact that `RegisterServiceSubscribersPass` runs after `DecoratorServicePass` makes it impossible to decorate a service implementing `ServiceSubscriberInterface` if the decorator does not implement it.
Commits
-------
c3271d9385 [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge][Form] Prevent multiple rendering of form collection prototypes
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29489 <!-- #-prefixed issue number(s), if any -->
| License | MIT
prevents attemt to render of prototype in CollectionType when it has been rendered already.
(see [Deprecated calling FormRenderer::searchAndRenderBlock for fields which were already rendered.](https://github.com/symfony/symfony/blob/master/UPGRADE-4.2.md#form))
Commits
-------
ffd272243b [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
This comment was misleading.
It's true that no groups (ie.: `Default`) are setted into validation process but it's not clear from the comment.
I suppose that is better to be more explicit about this process.
BTW I'm still not sure if `FormValidator` reference is necessary as we can change it and we should remember to update this comment and this does not seems to fit.
WDYT, is better to leave `FormValidator` out of this comment?
For reference: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L46-L92
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle] Stop calling Kernel::boot() twice in cli
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29505
| License | MIT
| Doc PR | n/a
Allows custom `Kernel::boot()` implementations to not be aware of the protected `Kernel::$booted` prop.
Commits
-------
97e15fe1b5 [FrameworkBundle] Stop calling Kernel::boot() twice in cli
This PR was merged into the 4.3-dev branch.
Discussion
----------
[EventDispatcher][VarDumper] optimize perf by leveraging Closure::fromCallable()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Callables are notably slower than closures. Let's turn then to closures thanks to `Closure::fromCallable()`.
This doesn't affect performance for run-once listeners.
And improves performance for events that are dispatched several times.
Same for VarDumper's casters.
Commits
-------
d6a594bf42 [EventDispatcher][VarDumper] optimize perf by leveraging Closure::fromCallable()
This PR was squashed before being merged into the 4.3-dev branch (closes#28931).
Discussion
----------
[PhpUnitBridge] Added ClassExistsMock
| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/10528
I've thought about this before, and bumped into it again when trying to test #28898
This PR allows to mock `class|interface|trait_exists` to enable specific code path testing
Commits
-------
62caec1a79 [PhpUnitBridge] Added ClassExistsMock
This PR was merged into the 4.1 branch.
Discussion
----------
Optimize perf by replacing call_user_func with dynamic variables
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This provides similar boost as in https://github.com/symfony/symfony/pull/29245, but on more places and without complexity increase. Check eg. https://github.com/fab2s/call_user_func for proof
Fabpot failure unrelated
Commits
-------
0c6ef01713 Optimize perf by replacing call_user_func with dynamic vars
This PR was squashed before being merged into the 3.4 branch (closes#29408).
Discussion
----------
[Security] getTargetPath of TargetPathTrait must return string or null
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes (possible bug)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Since the return type is string the default return value must be also string.
Commits
-------
8d4b787dd9 [Security] getTargetPath of TargetPathTrait must return string or null
This PR was squashed before being merged into the 4.3-dev branch (closes#29504).
Discussion
----------
[Validator] Add support for UATP card validation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
[UATP](https://en.wikipedia.org/wiki/Universal_Air_Travel_Plan) (Universal Air Travel Plan) is the airline owned payment network accepted by thousands of merchants for rail, air, hotel and travel agency payments. This PR adds support for UATP cards so they can be validated using the Symfony Validator component.
According to https://en.wikipedia.org/wiki/Payment_card_number, all UATP cards start with `1`, have a length of 15 digits and follow the [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm). Test card numbers can be generated from https://www.myfakeinfo.com/creditcard/uatp-debit-card.php
Commits
-------
2446a1763d [Validator] Add support for UATP card validation
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fix HeaderBag::get phpdoc
| 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 setting `$first` to `false`, the default value is wrapped into an array meaning you need to pass a string as the default value instead of an array of strings.
Commits
-------
5196dac7a8 Fix HeaderBag::get phpdoc
This PR was squashed before being merged into the 4.3-dev branch (closes#29168).
Discussion
----------
[Console] Add hyperlinks support
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21207
| License | MIT
| Doc PR |
For details about this see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
Here's one idea/use case which could utilize this feature (not implemented in this PR as it requires more work)
![stack trace with anchors](https://user-images.githubusercontent.com/496233/48305600-00d4c300-e52e-11e8-94e6-33713ff09d50.png)
I checked this in cmd.exe as well and no sideffects there
Commits
-------
db750ed8ae [Console] Add hyperlinks support
This PR was merged into the 4.3-dev branch.
Discussion
----------
[PhpUnitBridge] install PHPUnit 7 on PHP 7.1 and fix requir. for PHPUnit 6
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Added support of PHPUnit 7.4 if PHP version is 7.1+ (release link: https://packagist.org/packages/phpunit/phpunit#7.4.5).
Also I found that PHPUnit 6.5 required PHP 7.0, not 7.2 (proof: https://packagist.org/packages/phpunit/phpunit#6.5.13)
Commits
-------
30609bfa70 [PhpUnitBridge] install PHPUnit 7 on PHP 7.1 and fix require for PHPUnit 6
This PR was merged into the 3.4 branch.
Discussion
----------
Feature/add missing space
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Adding a much needed space in the serviceLocator createNotFoundException error message.
from
`Service "foo" not found: even though it exists in the app's container, the container inside "foo" is a smaller service locator that is empty...Try using dependency injection instead.
`
to
`Service "foo" not found: even though it exists in the app's container, the container inside "foo" is a smaller service locator that is empty... Try using dependency injection instead.
`
#SymfonyConHackday2018
Commits
-------
ceb7a68efa merge conflicts
This PR was squashed before being merged into the 3.4 branch (closes#29513).
Discussion
----------
[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
| Q | A
| ------------- | ---
| Branch? | 3.4 and up to 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28825
| License | MIT
This is a fix of #28825 big thanks @dunglas and @xabbuh
Commits
-------
8741d00d6e [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
This PR was merged into the 4.2 branch.
Discussion
----------
[WebProfilerBundle][TwigBundle] CSS fixes
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 -->
<!--
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
-------
5e59d7fe54 [WebProfilerBundle][TwigBundle] CSS fixes
* 3.4:
[Validator] Added IBAN format for Vatican City State
filter out invalid Intl values
[Validator] Fixed grouped composite constraints
[Form] Filter arrays out of scalar form types
This PR was squashed before being merged into the 3.4 branch (closes#29531).
Discussion
----------
[Validator] Added IBAN format for Vatican City State
IBAN for Vatican City State was added to [IBAN registry](https://www.swift.com/sites/default/files/resources/iban_registry.pdf) recently. This PR adds support for this new format in the `Iban` validator.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
5f0261429a [Validator] Added IBAN format for Vatican City State
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle][Controller] Use interface from Contracts to remove deprecation arnings
| Q | A
| ------------- | ---
| Branch? | 4.2?
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | I don't think so <!-- see https://symfony.com/bc -->
| Deprecations? | no - removing some :) <!-- 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
When we installed 4.2, we hit issues in our qa tools with [vimeo/psalm](https://github.com/vimeo/psalm) reporting that all of our controllers were implementing a deprecated interface (by extending the AbstractController).
This pr simply updates the AbstractController to use the interface provided in `symfony/contracts`
I'm not sure if there was any other reason for not including this in the 4.2 release (bc?), so apologies if I've overstepped this.
Commits
-------
f10227df3d [FrameworkBundle][Controller] Use interface from Contracts to remove deprecation warnings
This PR was merged into the 4.1 branch.
Discussion
----------
[Form] filter out invalid language values
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23679
| License | MIT
| Doc PR |
Commits
-------
ed97568b8a filter out invalid language values
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Filter arrays out of scalar form types
| 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/4102
| License | MIT
| Doc PR | -
Replaces fix https://github.com/symfony/symfony/pull/20935
Commits
-------
000e4aab5e [Form] Filter arrays out of scalar form types
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Fixed grouped composite constraints
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17675, #25888, #23480
| License | MIT
| Doc PR | ~
From Lisbon :). Thanks @stof, @xabbuh for your help to finally fix this old issue.
Commits
-------
b53d9112ca [Validator] Fixed grouped composite constraints
* 4.2:
change timezone to fix tests on Windows
bumped Symfony version to 4.2.2
updated VERSION for 4.2.1
updated CHANGELOG for 4.2.1
bumped Symfony version to 4.1.10
updated VERSION for 4.1.9
updated CHANGELOG for 4.1.9
bumped Symfony version to 3.4.21
updated VERSION for 3.4.20
update CONTRIBUTORS for 3.4.20
updated CHANGELOG for 3.4.20
* 4.1:
change timezone to fix tests on Windows
bumped Symfony version to 4.1.10
updated VERSION for 4.1.9
updated CHANGELOG for 4.1.9
bumped Symfony version to 3.4.21
updated VERSION for 3.4.20
update CONTRIBUTORS for 3.4.20
updated CHANGELOG for 3.4.20
* 3.4:
change timezone to fix tests on Windows
bumped Symfony version to 3.4.21
updated VERSION for 3.4.20
update CONTRIBUTORS for 3.4.20
updated CHANGELOG for 3.4.20
As I understand the failing tests timezones have changed in Russia in
2016, but this is not reflected in the timezone database used on
AppVeyor. Since the tests do not depend on a particular timezone (it's
only important for it to be different from UTC) we should safely be able
to switch to another timezone.
* 4.2:
[Security\Http] detect bad redirect targets using backslashes
[Form] Filter file uploads out of regular form types
Fix CI
minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
[travis] fix composer.lock invalidation for PRs patching several components
[travis] fix composer.lock invalidation for deps=low
minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
[travis] ignore ordering when validating composer.lock files for deps=low
minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
fix ci
[travis] fix requiring mongodb/mongodb before composer up
minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
[2.7] Make CI green
updated VERSION for 2.7.49
updated CHANGELOG for 2.7.49
[HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
[HttpFoundation] Remove support for legacy and risky HTTP headers
updated VERSION for 2.7.48
update CONTRIBUTORS for 2.7.48
updated CHANGELOG for 2.7.48
* 4.1:
[Security\Http] detect bad redirect targets using backslashes
[Form] Filter file uploads out of regular form types
Fix CI
minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
[travis] fix composer.lock invalidation for PRs patching several components
[travis] fix composer.lock invalidation for deps=low
minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
[travis] ignore ordering when validating composer.lock files for deps=low
minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
fix ci
[travis] fix requiring mongodb/mongodb before composer up
minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
[2.7] Make CI green
updated VERSION for 2.7.49
updated CHANGELOG for 2.7.49
[HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
[HttpFoundation] Remove support for legacy and risky HTTP headers
updated VERSION for 2.7.48
update CONTRIBUTORS for 2.7.48
updated CHANGELOG for 2.7.48
* 3.4:
[Security\Http] detect bad redirect targets using backslashes
[Form] Filter file uploads out of regular form types
Fix CI
minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
[travis] fix composer.lock invalidation for PRs patching several components
[travis] fix composer.lock invalidation for deps=low
minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
[travis] ignore ordering when validating composer.lock files for deps=low
minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
fix ci
[travis] fix requiring mongodb/mongodb before composer up
minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
[2.7] Make CI green
updated VERSION for 2.7.49
updated CHANGELOG for 2.7.49
[HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
[HttpFoundation] Remove support for legacy and risky HTTP headers
updated VERSION for 2.7.48
update CONTRIBUTORS for 2.7.48
updated CHANGELOG for 2.7.48
* 2.8:
[Security\Http] detect bad redirect targets using backslashes
[Form] Filter file uploads out of regular form types
Fix CI
minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
[travis] fix composer.lock invalidation for PRs patching several components
[travis] fix composer.lock invalidation for deps=low
minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
[travis] ignore ordering when validating composer.lock files for deps=low
minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
fix ci
[travis] fix requiring mongodb/mongodb before composer up
minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
[2.7] Make CI green
updated VERSION for 2.7.49
updated CHANGELOG for 2.7.49
[HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
[HttpFoundation] Remove support for legacy and risky HTTP headers
updated VERSION for 2.7.48
update CONTRIBUTORS for 2.7.48
updated CHANGELOG for 2.7.48
* 2.7:
[Security\Http] detect bad redirect targets using backslashes
[Form] Filter file uploads out of regular form types
Fix CI
minor #28258 [travis] fix composer.lock invalidation for deps=low (nicolas-grekas)
[travis] fix composer.lock invalidation for PRs patching several components
[travis] fix composer.lock invalidation for deps=low
minor #28199 [travis][appveyor] use symfony/flex to accelerate builds (nicolas-grekas)
[travis] ignore ordering when validating composer.lock files for deps=low
minor #28146 [travis] cache composer.lock files for deps=low (nicolas-grekas)
fix ci
[travis] fix requiring mongodb/mongodb before composer up
minor #28114 [travis] merge "same Symfony version" jobs in one (nicolas-grekas)
[2.7] Make CI green
updated VERSION for 2.7.49
updated CHANGELOG for 2.7.49
[HttpKernel] fix trusted headers management in HttpCache and InlineFragmentRenderer
[HttpFoundation] Remove support for legacy and risky HTTP headers
updated VERSION for 2.7.48
update CONTRIBUTORS for 2.7.48
updated CHANGELOG for 2.7.48
* 4.2:
[TwigBridge] Deprecating legacy Twig paths in DebugCommand and simplifications
[Cache] Fixed Memcached adapter doClear()to call flush()
Fixes sprintf(): Too few arguments in Translator
fix TransChoiceTokenParser deprecation message
[DoctrineBridge] Conflict with Messenger <4.2
[Contracts] extract LocaleAwareInterface out of TranslatorInterface
This PR was merged into the 4.2 branch.
Discussion
----------
[DoctrineBridge] Conflict with Messenger <4.2
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| 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 | #29463 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Commits
-------
8624cde5b0 [DoctrineBridge] Conflict with Messenger <4.2
This PR was merged into the 4.2 branch.
Discussion
----------
Fix TransChoiceTokenParser deprecation message
| 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
While debugging a `cache:clear`, I found the following errors on stderr:
```
PHP Warning: sprintf(): Too few arguments in .../vendor/symfony/twig-bridge/TokenParser/TransChoiceTokenParser.php on line 43
```
This was caused by using unescaped `%` in the `sprintf` format string.
This fix the `sprintf` format string so the deprecation message will now works.
Commits
-------
3d3b3ced48 fix TransChoiceTokenParser deprecation message
* 4.2:
[VarExporter] fix dumping private properties from abstract classes
Fix empty output for debug:autowiring when reflection-docblock is not available
[Workflow] Fixed BC break for Workflow metadata
[Routing] ignore trailing slash for non-GET requests
When setting $first to false, the default value is wrapped into an array
meaning you need to pass a string as the default value instead of an
array of strings.
* 4.2:
[Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
[Routing] fix taking verb into account when redirecting
[TwigBundle] Sync tab navigation css
[WebProfilerBundle] Fix log filter in dark mode
[WebProfilerBundle][4.2] Deny messenger <4.2
[DI] Fix dumping expressions accessing single-use private services
[VarExporter] fix dumping protected property from abstract classes
[WebProfilerBundle] Split form field heading
Minor tweak for c3ad8a5
* 4.1:
[Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
[Routing] fix taking verb into account when redirecting
[DI] Fix dumping expressions accessing single-use private services
[WebProfilerBundle] Split form field heading
* 3.4:
[Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
[Routing] fix taking verb into account when redirecting
[WebProfilerBundle] Split form field heading
This PR was squashed before being merged into the 3.4 branch (closes#29413).
Discussion
----------
[Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
| Q | A
| ------------- | ---
| Branch? | 3.4 up to 4.2 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #
| License | MIT
| Doc PR | none
fixed `DateTimeNormalizer::normalizer()` when `$object` is mutated internally to change timezone we lost microseconds of origina `$object`
Commits
-------
2bf8a1cae6 [Serializer] fixed DateTimeNormalizer to maintain microseconds when a different timezone required
This PR was squashed before being merged into the 4.3-dev branch (closes#29401).
Discussion
----------
[DI] Fix deps=low
| 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 -->
cc @nicolas-grekas
Commits
-------
e0d95029c3 [DI] Fix deps=low
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Debug] Mark ErrorHandler and ExceptionHandler classes as final
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | not yet
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The goal of marking this method final is to be able to change the argument signature to `\Throwable` in Symfony 5.0
We will then be able to convert the incoming `\Throwable` to `\ErrorException` thanks to the `FatalThrowableError` class.
The use case is when you use the `ExceptionHandler::register()` method of the `Debug` component with a custom `set_error_handler()` that don't handle this conversion. This is for example the case of the `Drupal` one.
Commits
-------
2a4e2e614b [Debug] Mark the ErrorHandler and ExceptionHandler classes as final
This PR was merged into the 4.3-dev branch.
Discussion
----------
Add upgrade from 4.2 to 4.3
| 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 #28858 i guess. cc @nicolas-grekas
Commits
-------
ce6ecaf862 Add upgrade from 4.2 to 4.3
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Validator] Checking a BIC along with an IBAN
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28166
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10349
A BIC comes usually with an IBAN so it's better to check that they are associated. This PR provides an `iban` option to `Symfony\Component\Validator\Constraints\Bic` to check the BIC against an IBAN.
It also provides an `ibanPropertyPath` to retrieves the IBAN using the property accessor like with comparison constraints.
Commits
-------
bb6be1534a [Validator] Checking a BIC along with an IBAN Fix#28166
This PR was squashed before being merged into the 4.3-dev branch (closes#28858).
Discussion
----------
[DI] Deprecated using env vars with cannotBeEmpty()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes-ish
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28827
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Continuation of #28838 for 4.2
Using environment variables for nodes marked `cannotBeEmpty()` is semantically not possible, we'll never know the value is empty yes/no during compile time. Neither we should assume one or another.
Commits
-------
397c19ee5f [DI] Deprecated using env vars with cannotBeEmpty()
This PR was squashed before being merged into the 4.3-dev branch (closes#28976).
Discussion
----------
[DI] Add a "default" EnvProcessor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | TODO
This PR add a new fallback env processor in order to return a default value when the primary processor is not able to fetch a value (env variable, file or key does not exists)
```
#
default_host: localhost
host: '%env(default:default_host:OPTIONAL_ENV_VARIABLE)%"
default_secret: this secret is not secret
secret: '%env(default:default_secret:file:THIS_FILE_ONLY_EXIST_IN_PRODUCTION)%"
default_charset: utf8
charset: '%env(default:default_charset:key:charset:json:DATABASE_CONFIG)%"
```
Commits
-------
aee4e33cdb [DI] Add a \"default\" EnvProcessor
This PR was squashed before being merged into the 4.3-dev branch (closes#29127).
Discussion
----------
[DomCrawler] Added return of element name in `extract()` method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| License | MIT
| Doc PR | symfony/symfony-docs#10646
Situation: you need to get an array of keys and values.
The current package code does not allow this to be done easily.
The changes made to the code will allow you to return the required data set.
```php
use Symfony\Component\DomCrawler\Crawler;
$crawler = new Crawler($content);
$crawler
->filter('ItemsList > Item')
->each(function (Crawler $element) {
$data = $element
->children()
->extract(['_name', '_text']);
var_dump($data);
});
// Result:
array:2 [
0 => array:2 [
0 => "id",
1 => "1"
],
1 => array:2 [
0 => "title",
1 => "Foo Bar"
]
]
```
Commits
-------
79162c1eb5 [DomCrawler] Added return of element name in `extract()` method
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Workflow] Trigger `entered` event for subject entering in the Workflow for the first time
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28319
| License | MIT
| Doc PR |
Commits
-------
388840fd99 [Workflow] Trigger `entered` event for subject entering in the Workflow for the first time
* 4.2:
fix cs
[FrameworkBundle] define doctrine as default_pdo_provider only if the package is installed
[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
Added upgrade to HandlersLocator
fix type for $value in DocBlock
[WebProfilerBundle] Fix title case
[Config] fix path exclusion during glob discovery
[FrameworkBundle][Messenger] Restore check for messenger serializer default id
Fix wrapped loop of event listener
[DI] fix edge case in InlineServiceDefinitionsPass
undeprecate the single-colon notation for controllers
Update HttpKernel.php
* 4.1:
fix cs
[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
fix type for $value in DocBlock
[WebProfilerBundle] Fix title case
Fix wrapped loop of event listener
[DI] fix edge case in InlineServiceDefinitionsPass
undeprecate the single-colon notation for controllers
Update HttpKernel.php
* 3.4:
fix cs
[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
fix type for $value in DocBlock
Fix wrapped loop of event listener
Update HttpKernel.php
This PR was merged into the 3.4 branch.
Discussion
----------
Update HttpKernel.php
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This update adds a docblock to varToString method in HttpKernel Class
Commits
-------
3324e2a2a6 Update HttpKernel.php
This PR was squashed before being merged into the 3.4 branch (closes#29375).
Discussion
----------
[Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
|Q |A |
|--- |---|
|Branch |2.8|
|Bug fix? |yes|
|New feature? |no |
|BC breaks? |no |
|Deprecations?|no |
|Tests pass? |yes|
|Fixed tickets|n/a|
|License |MIT|
|Doc PR |n/a|
Allow to expose `0` or `"0"` validation codes.
Commits
-------
7bb0fb5cc3 [Validator] Allow `ConstraintViolation::__toString()` to expose codes that are not null or emtpy strings
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] Fix eventListener wrapper loop in TraceableEventDispatcher
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | na
The `TracableEventDispatcher` wrap decorate (in the method `preProcess`) each listeners in a `WrappedListener` before delegating the dispatch to the real dispatcher, then remove the wrapper (in the method `postProcess`.
But, if a listener triggers an exception, the `postProcess` method is not called, and the wrapper in not removed.
If the same event is triggered a second time, the listeners will be decorated twice, etc, etc..
This is an issue with php-pm where the same event is triggered hundred of times within the same process.
This PR moves the `postProcess` in a finally block in order to be called even if an exception in thrown.
Commits
-------
3830a9e376 Fix wrapped loop of event listener
This PR was merged into the 4.1 branch.
Discussion
----------
undeprecate the single-colon notation for controllers
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 is the same as https://github.com/symfony/symfony/pull/29218 but for `Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader`.
Commits
-------
09371ad6f1 undeprecate the single-colon notation for controllers
This PR was merged into the 4.1 branch.
Discussion
----------
[DI] fix edge case in InlineServiceDefinitionsPass
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Looks like this can happen - dunno how
https://stackoverflow.com/questions/53558247/autowire-services-test-yaml-there-is-no-node-with-id-service-a
Commits
-------
8bd2bbfb1c [DI] fix edge case in InlineServiceDefinitionsPass
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle][Messenger] Restore check for messenger serializer default id
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://symfony-devs.slack.com/archives/C9PQ75TV3/p1543590611003500 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
From Slack:
> @adamquaile [4:10 PM]
> So, I just updated to 4.2 today, and got this message:
> > The default Messenger serializer cannot be enabled as the Serializer support is not available. Try enabling it or running "composer require symfony/serializer-pack"
>
> In the docs it's stated:
> > In order to use Symfony's built-in AMQP transport, you will need the Serializer Component. Ensure that it is installed with:
>
>But I haven't yet configured AMQP - I'm using my own transport. Should I be getting this exception?
---
This check was removed in https://github.com/symfony/symfony/pull/28405, but is actually still necessary to not fail as soon as you can install the Messenger component without the Serializer one installed.
Commits
-------
1cf17c08e9 [FrameworkBundle][Messenger] Restore check for messenger serializer default id
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Handle all case variants of "nan" when parsing a number
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29321
| License | MIT
| Doc PR | n/a
NumberToLocalizedStringTransformer::reverseTransform now special cases all case variants of "NaN", not just "NaN" specifically to insulate itself from changing behaviour in ICU.
Commits
-------
85af682834 add a test case
d903dcbac5 [Form] Handle all case variants of "nan" when parsing a number
This PR was merged into the 3.4 branch.
Discussion
----------
typo
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | <!-- #-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.
-->
Commits
-------
977a007e3a typo
* 4.2:
[Routing] fix trailing slash redirection
calculate cache keys for property setters depending on the value
updated VERSION for 2.8.48
update CONTRIBUTORS for 2.8.48
updated CHANGELOG for 2.8.48
* 4.1:
[Routing] fix trailing slash redirection
calculate cache keys for property setters depending on the value
updated VERSION for 2.8.48
update CONTRIBUTORS for 2.8.48
updated CHANGELOG for 2.8.48
* 3.4:
calculate cache keys for property setters depending on the value
updated VERSION for 2.8.48
update CONTRIBUTORS for 2.8.48
updated CHANGELOG for 2.8.48
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyAccess] calculate cache keys for property setters depending on the value
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29340
| License | MIT
| Doc PR |
Commits
-------
fa234378ff calculate cache keys for property setters depending on the value
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix combinatorial explosion when analyzing the service graph
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29336
| License | MIT
| Doc PR | -
and a few minor things found meanwhile.
Commits
-------
0d0be12e07 [DI] fix combinatorial explosion when analyzing the service graph
* 4.2:
Update PR template
Fixes sprintf(): Too few arguments in Translator
[Cache] fix deps
updated CHANGELOG for 4.2.0-RC1
bumped Symfony version to 4.1.9
updated VERSION for 4.1.8
updated CHANGELOG for 4.1.8
bumped Symfony version to 3.4.20
updated VERSION for 3.4.19
updated CHANGELOG for 3.4.19
[Console] Move back root exception to stack trace in verbose mode
* 4.1:
Update PR template
bumped Symfony version to 4.1.9
updated VERSION for 4.1.8
updated CHANGELOG for 4.1.8
bumped Symfony version to 3.4.20
updated VERSION for 3.4.19
updated CHANGELOG for 3.4.19
[Console] Move back root exception to stack trace in verbose mode
Fixes the log produced when the method is called :
Before : "sprintf(): Too few arguments"
After : "The "Symfony\Component\Translation\Translator::transChoice()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%count%" parameter."
Reference : http://php.net/manual/function.sprintf.php
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Move back root exception to stack trace in verbose mode
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29232
| License | MIT
| Doc PR | n/a
Commits
-------
63cd219a5c [Console] Move back root exception to stack trace in verbose mode
* 4.1: (23 commits)
[Routing] fix trailing slash redirection when using RedirectableUrlMatcher
[PropertyAccessor] fix encoding of cache keys
[WebProfiler] Detect empty file paths in file viewer
fixed CS
Changes for upcoming Travis' infra migration
Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
[MonologBridge] Return empty list for unknonwn requests
[DomCrawler] exclude fields inside "template" tags
Use XLIFF source rather than resname when there's no target
[DoctrineBridge] catch errors while converting to db values in data collector
[DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
[EventDispatcher] Unwrap wrapped listeners internally
[Routing] fix trailing slash redirection when using RedirectableUrlMatcher
Removed the return type phpdoc
fix authorization checker variable name
[Routing] Remove duplicate schemes and methods for invokable controllers
Indentation error
[HttpFoundation] Fix trailing space for mime-type with parameters
[HttpFoundation] Fixed absolute Request URI with default port
[Bridge/PhpUnit] fix the fix
...
* 3.4:
[Routing] fix trailing slash redirection when using RedirectableUrlMatcher
[PropertyAccessor] fix encoding of cache keys
[WebProfiler] Detect empty file paths in file viewer
fixed CS
Changes for upcoming Travis' infra migration
Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
[DomCrawler] exclude fields inside "template" tags
Use XLIFF source rather than resname when there's no target
[DoctrineBridge] catch errors while converting to db values in data collector
[DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
[EventDispatcher] Unwrap wrapped listeners internally
Indentation error
[HttpFoundation] Fix trailing space for mime-type with parameters
[HttpFoundation] Fixed absolute Request URI with default port
properly parse backslashes in unquoted env vars
Use intersection type when referring to ParentNodeDefinitionInterface
[BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] fix trailing slash redirection when using RedirectableUrlMatcher
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29297
| License | MIT
| Doc PR | -
This is #29297 for 4.1
Commits
-------
6968000a3c [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] fix trailing slash redirection when using RedirectableUrlMatcher
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29287
| License | MIT
| Doc PR | -
This fixes#29287 by considering that the behavior of the dumped matcher is the correct one: lower priority routes never impact previous ones. I think it's what makes the most sense because that's what requires the most local knowledge to understand what's going on (ie that's the less surprising behavior).
Commits
-------
dc4c3f6927 [Routing] fix trailing slash redirection when using RedirectableUrlMatcher
* 2.8:
fixed CS
Changes for upcoming Travis' infra migration
Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
[DomCrawler] exclude fields inside "template" tags
Use XLIFF source rather than resname when there's no target
[DoctrineBridge] catch errors while converting to db values in data collector
[DoctrineBridge] fix case sensitivity issue in RememberMe\DoctrineTokenProvider
Indentation error
[HttpFoundation] Fix trailing space for mime-type with parameters
Use intersection type when referring to ParentNodeDefinitionInterface
[BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel] handle anonymous classes when generating the dumped container class name
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29322
| License | MIT
| Doc PR | -
Commits
-------
ac84cb2fbe [HttpKernel] handle anonymous classes when generating the dumped container class name
This PR was merged into the 2.8 branch.
Discussion
----------
[Config] Use intersection type when referring to ParentNodeDefinitionInterface
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Allows PHPStan to understand it correctly (refs https://github.com/libero/content-api-bundle/pull/2#discussion_r226237763).
PHPStorm 2018.3 will add support for it too, but to help older versions I've reversed the order (so `NodeDefinition` is recognised).
Commits
-------
e9cdabe570 Use intersection type when referring to ParentNodeDefinitionInterface
This PR was merged into the 2.8 branch.
Discussion
----------
[DoctrineBridge] catch errors while converting to db values in data collector
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When the profiler is enabled and collecting doctrine queries data, if a query fails because of `ConversionException` or another error thrown while resolving parameters, the data collector is also throwing the same error.
This should fix this case. The tests for this case cannot be executed in 5.4 because Doctrine 2.5 fails with a fatal error in `DateType`.
Commits
-------
61c4531292 [DoctrineBridge] catch errors while converting to db values in data collector
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Contracts][Cache] allow retrieving metadata of cached items
| 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 | -
We added `ItemInterface::getMetadata()` because getting them in userland is useful to propagate to higher level caches (eg sending tags + remaining ttl to Varnish).
But we forgot to add a way to retrieve them when using the new `CacheInterface::get()`.
This PR fixes it by adding a 4th `&$metadata` to the method.
Commits
-------
302b8446a7 [Contracts][Cache] allow retrieving metadata of cached items
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] fix copying expression providers when analyzing the service graph
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29304
| License | MIT
| Doc PR | -
Courtesy of @mishal, thanks for providing all the details.
Commits
-------
246164f748 [DI] fix copying expression providers when analyzing the service graph
This PR was merged into the 2.8 branch.
Discussion
----------
[Translation] Use XLIFF source rather than resname when there's no target
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Relates to https://github.com/symfony/symfony/issues/20076#issuecomment-251552328. If there's no `<target>` in an XLIFF but there is a `@resname` then that's used rather than the `<source>`.
If I'm using translation keys and my source locale is `en`, then it's a bit redundant to duplicate the `<source>` in the `<target>` in the `en` file (since there is no translation).
This isn't changing the behaviour when `<target>` is present but empty.
(Caveat: I'm definitely not an expert on XLIFF.)
Commits
-------
8633ebbca0 Use XLIFF source rather than resname when there's no target
This PR was merged into the 2.8 branch.
Discussion
----------
[BrowserKit] fixed BC Break for HTTP_HOST header
| Q | A
| ------------- | ---
| Branch? | 2.7, 2.8, 3.x, 4.x
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | #22933
| License | MIT
| Doc PR | n/a
The situation well described in the original issue. I will add only:
- #10549 - makes server parameters to take precedence over URI.
- #16265 - partially revererts #10549. Makes server parameters do not affect URI. But this is only true for `Client::request()`. It is still possible to set host for URI by `Client::setServerParameters()` when URI is realative (see examples below).
I propose a compromise solution: add to HTTP_HOST header power to override URI when it is relative.
Proposed solution:
- if the request URI is relative, then use the HTTP_HOST header passed to Client::request() to generate an absolute URI
- if the request URI is absolute, then ignore the HTTP_HOST header (as it now works)
- do the same with HTTPS server parameter
Profit:
- fix BC Break
- the documentation will be correct
- http://symfony.com/doc/2.8/routing/hostname_pattern.html#testing-your-controllers
- https://symfony.com/doc/2.8/testing.html#testing-configuration
Before:
```
$client->setServerParameters(['HTTP_HOST' => 'example.com']);
$client->request('GET', '/');
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());
$client->request('GET', '/', [], [], ['HTTP_HOST' => 'example.com']);
$this->assertEquals('http://localhost/', $client->getRequest()->getUri());
```
Fixed (see last line):
```
$client->setServerParameters(['HTTP_HOST' => 'example.com']);
$client->request('GET', '/');
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());
$client->request('GET', '/', [], [], ['HTTP_HOST' => 'example.com']);
$this->assertEquals('http://example.com/', $client->getRequest()->getUri());
```
Commits
-------
8c4a59467f [BrowserKit] fixed BC Break for HTTP_HOST header; implemented same behaviour for HTTPS server parameter
This PR was merged into the 2.8 branch.
Discussion
----------
[DomCrawler] exclude fields inside "template" tags
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27285
| License | MIT
| Doc PR |
Exclude fields values/files if fields are inside template tag. I think better to exclude values only instead of excluding fields at all (described in ticket #27285)
Commits
-------
19e3e154d7 [DomCrawler] exclude fields inside "template" tags
The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3.
The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.".
This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fixed absolute Request URI with default port
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29234
| License | MIT
| Doc PR |
This PR fixes the #29234 issue, the request URI with default port was not properly generated.
Example :
```php
$request = Request::create('http://test.com:80/foo');
$request->server->set('REQUEST_URI', 'http://test.com:80/foo');
```
Before this fix, the `$request->getUri()` method returned `http://test.com/:80/foo` :
```diff
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://test.com/foo'
+'http://test.com/:80/foo'
```
Commits
-------
cddce2af61 [HttpFoundation] Fixed absolute Request URI with default port
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Remove duplicate schemes and methods for invokable controllers
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29225
| License | MIT
This PR backport for 3.4 branch the same issue than the PR #29225.
I add a test to check the fix when annotation are on the class and rename another one when the route annotation is on the invoke method.
Commits
-------
640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Fix trailing space for mime-type with parameters
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
This PR fixes a minor issue that we've discovered by exposing our API towards mobile applications which where sending the header as following `content-type: application/json ;charset=UTF-8`. Request is unable to determine the `getContentType -> getFormat` as **json** due to the whitespace at the end.
```php
$request = Request::createFromGlobals();
$request->headers->set('CONTENT_TYPE', 'application/json ;charset=UTF-8'); // Forcing header for test
if ($request->getContentType() !== 'json') {
// Return 415 (Unsupported Media Type) status code..
}
```
When checking https://tools.ietf.org/html/rfc7231#section-3.1.1.1 it seems that a space is part of the RFC spec. (Where OWS is abbreviated for Optional WhiteSpace)
```
media-type = type "/" subtype *( OWS ";" OWS parameter )
```
Current the following cases are supported:
* application/json; charset=UTF-8
* application/json;charset=UTF-8
The following are failing:
* application/json ; charset=UTF-8
* application/json ;charset=UTF-8
Commits
-------
f4866bc371 [HttpFoundation] Fix trailing space for mime-type with parameters
* 4.1:
fix cs
fix cs
fix cs
SCA: consolidate non empty array checks across codebase
[cs] correct invalid @param types
[Bridge/PhpUnit] Use composer to download phpunit
[DI] fix taking lazy services into account when dumping the container
[Form] Fixed empty data for compound date interval
[Cache] fix optimizing Psr6Cache for AdapterInterface pools
deal with explicitly enabled workflow nodes
* 3.4:
fix cs
SCA: consolidate non empty array checks across codebase
[cs] correct invalid @param types
[Bridge/PhpUnit] Use composer to download phpunit
[DI] fix taking lazy services into account when dumping the container
[Form] Fixed empty data for compound date interval
[Cache] fix optimizing Psr6Cache for AdapterInterface pools
deal with explicitly enabled workflow nodes
This PR was squashed before being merged into the 3.4 branch (closes#29231).
Discussion
----------
SCA: consolidate non empty array checks across codebase
| Q | A
| ------------- | ---
| Branch? | 3.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 replaces `is_array(...) && count(...) > 0` with `... && is_array(...)` construct used in the codebase.
Commits
-------
2f1fd54dda SCA: consolidate non empty array checks across codebase
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] fix optimizing Psr6Cache for AdapterInterface pools
| 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 | -.
As described by @Tobion in https://github.com/symfony/symfony/pull/29236/files#r234324045:
> The problem I have experienced is that in dev mode the cache is decorated with a TraceableCache. This means it loses this optimization and introduces https://github.com/symfony/symfony/issues/28918#issuecomment-432399481 again
Commits
-------
b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix taking lazy services into account when dumping the container
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29246
| License | MIT
| Doc PR | -
This PR fixes issues found while working on #29246.
It *does* fix the infinite loop, ~but replaces it by an exception (reopening #29078)~:
> ~It's a requirement to specify a Metadata Driver and pass it to Doctrine\ORM\Configuration::setMetadataDriverImpl()~
The full fix is not immediately accessible as it needs some core changes to the dumping logic. Requiring `symfony/proxy-manager-bridge` works around the issue properly.
See #29251 for 4.2
Commits
-------
67d7623e72 [DI] fix taking lazy services into account when dumping the container
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fixed empty data for compound date interval
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #4715 (continuation)
| License | MIT
| Doc PR | ~
Following #29182, since this type has been introduced in Symfony 3 but with the same limitation explained in #4715.
So for consistency this needs to be fixed here as well.
Commits
-------
38a2abc790 [Form] Fixed empty data for compound date interval
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Improved message when handler class does not exist
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
**Problem:**
When defining a non existing messenger handler class in the `services.yml` config file, we encounter this confusing error message:
```
services:
App\Handler\NonExistentHandler:
tags: [messenger.message_handler]
```
```
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Symfony\Component\Messenger\DependencyInjection\MessengerPass::guessHandledClasses() must be an instance of ReflectionClass, null given, called in /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php on line 93 in /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php:189
Stack trace:
#0 /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php(93): Symfony\Component\Messenger\DependencyInjection\MessengerPass->guessHandledClasses(NULL, 'App\\Application...')
#1 /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php(74): Symfony\Component\Messenger\DependencyInjection\MessengerPass->registerHandlers(Object(Symfony\Component\DependencyInjection\ContainerBuilder), Array)
#2 /app/vendor/symfony/dependency-injection/Compiler/Compiler.php(95): Symfony\Component\Messenger\DependencyInjection\MessengerPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#3 / in /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php on line 189
```
**Proposal:**
We can throw a more relevant exception (RuntimeException) in this case to help the developer to have a better understanding of the issue.
```Invalid service "App\Handler\NonExistentHandler": class "App\Handler\NonExistentHandler" does not exist.```
Commits
-------
6ab9274638 Improve error message when defining messenger handler class that does not exists
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] Added the missing constraints instance checks
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR adds the constraints instance checks missing to limit the validators use.
This behavior is already implemented in all built-in validators, but it was missed in two validators.
Commits
-------
0ecaead015 [Validator] Added the missing constraints instance checks
* 4.1:
Undeprecate the single-colon notation for controllers
Command::addOption should allow int in $default
Update symfony links to https
[Form] Fixed keeping hash of equal \DateTimeInterface on submit
[PhpUnitBridge] Fix typo
[Routing] generate(null) should throw an exception
[Form] Minor fixes in docs and cs
[Workflow] Made code simpler
[Config] Unset key during normalization
[Form] Fixed empty data for compound date types
invalidate forms on transformation failures
[FrameworkBundle] fixed guard event names for transitions
method buildTransitionBlockerList returns TransitionBlockerList of expected transition
[FrameworkBundle] fixed guard event names for transitions
[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
* 3.4:
Command::addOption should allow int in $default
[Form] Fixed keeping hash of equal \DateTimeInterface on submit
[PhpUnitBridge] Fix typo
[Form] Minor fixes in docs and cs
[Config] Unset key during normalization
[Form] Fixed empty data for compound date types
invalidate forms on transformation failures
[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28961
| License | MIT
Please take a look at the tests I added - they describe the issue. It has to do with the priorities: `findAdderAndRemover('User', 'email')` is called earlier than `$this->isMethodAccessible('User', 'setEmail', 1)`
Commits
-------
8238f167ad [PropertyAccessor] Fix unable to write to singular property using setter while plural adder/remover exist
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Fixed empty data for compound date types
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #4715
| License | MIT
| Doc PR | ~
Commits
-------
9bab1e8aba [Form] Fixed empty data for compound date types
This PR was merged into the 4.2-dev branch.
Discussion
----------
[SecurityBundle] Fix remember-me cookie framework inheritance when session is disabled
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29217
| License | MIT
| Doc PR | N/A
When `framework.session` configuration key is not an array, we ignore it.
Commits
-------
af81008cb6 [SecurityBundle] Fix remember-me cookie framework inheritance when session is disabled
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Translation] make intl+icu format seamless by handling it in MessageCatalogue
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29136
| License | MIT
| Doc PR | -
Commits
-------
c71dfb9673 [Translation] make intl+icu format seamless by handling it in MessageCatalogue
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add handled & sent stamps
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs/issues/10661
Based on #29159
This new feature marks sent and handled messages, so middleware can act upon these and use the handler(s) result(s).
This is also the base of a next PR (#29167), introducing a query bus built on top of the message bus.
I'm not sure yet about the best way to determine the handlers and senders names/descriptions to store in the stamps:
- Handlers are callable. I've just reused the [console text descriptor](1c1818b876/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php (L457-L491)) format for now.
- ~~Sender are `SenderInterface` instances. `\get_class` is used for now, but a single message can be sent by multiple senders, including of the same class.~~ => Updated. Yielding the sender name if provided, the FQCN otherwise.
~~Instead, what about allowing to yield names from locators, and fallback on the above strategies otherwise? So we'll use transport names from the config for senders, and pre-computed compile-time handlers descriptions?~~
=> Done. For handlers, computing it at compile time might not be straightforward. Let's compute it lazily from `HandledStamp::fromCallable()`
---
### From previous conversations:
> What about not adding HandledStamp on `null` returned from handler
IMHO, `null` still is a result. The stamps allows to identify a message as being handled regardless of the returned value, so makes sense on its own and keeping would require one less check for those wanting to consume it.
> What about adding SentStamp?
Makes sense to me and I think it was requested by @Nyholm before on Slack.
So, included in this PR.
> Should it target 4.2 or 4.3?
Targeting 4.2, because of the removal of the handler result forwarding by middleware. A userland middleware could have used this result, typically a cache middleware. Which would now require extra boring code in userland. This will simplify it and allow users to create their query bus instance until 4.3.
Commits
-------
2f5acf790a [Messenger] Add handled & sent stamps
This notation is the only way to support controllers as services in the 3.4
LTS version.
This deprecation has only a very small benefit for the Symfony codebase (the
amount of code involved is very small), but has a huge cost for the community
which cannot avoid this deprecation without dropping support for the LTS or
making crazy logic to switch routing files (as they cannot switch things
inline in YAML or XML files).
This deprecation will be delayed until a future 5.x version, when the current
LTS will be 4.4 (which supports the new notation).
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Fix collecting messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no-ish
| 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 -->
In 4.2 there's always one dispatched message because we provide the template with a generator. Calling `{{ gen|length }}` always returns `1`
Before
![image](https://user-images.githubusercontent.com/1047696/48368788-f0028980-e6b4-11e8-91b0-54f755b9fb93.png)
After
![image](https://user-images.githubusercontent.com/1047696/48368817-0ad4fe00-e6b5-11e8-8215-54bfdb307c47.png)
Commits
-------
bfc7d94169 [Messenger] Fix collecting messages
This PR was merged into the 4.2-dev branch.
Discussion
----------
[WebProfilerBundle] Remove unused data attr
| 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 -->
Actually spotted in #29192 when searching in master :)
The attribute is not used.
Commits
-------
7c593753ef [WebProfilerBundle] Remove unused data attr
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options
This reverts commit 9f60ff8a4d.
This reverts commit 31b5615b51.
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28984
| License | MIT
| Doc PR | -
Working on recipes with @weaverryan, we figured out that this deprecation is just making our life more difficult. Let's revert it.
Same as #29126, reverts #28745 and #28653
Commits
-------
443f8ad374 [FrameworkBundle][WebServerBundle] Revert deprecation of --env and --no-debug console options
This PR was merged into the 2.8 branch.
Discussion
----------
Command::addOption should allow int in $default
| Q | A
| ------------- | ---
| Branch? | all
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| 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.
-->
In #28714 the documentation for `$default` on `Command::addOption` was changed to specify more specifically than `mixed`. However, there is an inconsistency as `InputOption::__construct` allows int in its `$default`, but not `Command::addOption`. This PR makes fixes that inconsistency.
Commits
-------
5f8bd89 Command::addOption should allow int in $default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Fix typos
| Q | A
| ------------- | ---
| Branch? | 4.2 <!-- see below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Just small typos extracted from #29166 in case it doesn't make it to 4.2.
Commits
-------
7e763f96c1 [Messenger] Fix typos
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Minor fixes in docs and cs
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
de40f5d07b [Form] Minor fixes in docs and cs
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] generate(null) should throw an exception
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28634
| License | MIT
| Doc PR | -
Commits
-------
710aafbc91 [Routing] generate(null) should throw an exception
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] conflict with Dotenv <4.2 to simplify recipes
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In the recipe for fwb 4.2, we already assume that if dotenv is installed, it will be at v4.2 or higher.
Let's enforce this.
Commits
-------
0e80cc175f [FrameworkBundle] conflict with Dotenv <4.2 to simplify recipes
This PR was merged into the 4.2-dev branch.
Discussion
----------
Revert "bug #29154 [FrameworkBundle] Define APP_ENV/APP_DEBUG from argv via Application::bootstrapEnv()
This reverts commit 9253199de1, reversing
changes made to 664a032940.
| 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 | -
Replaced by https://github.com/symfony/recipes/pull/491, see description there.
Commits
-------
f3c5fda379 Revert "bug #29154 [FrameworkBundle] Define APP_ENV/APP_DEBUG from argv via Application::bootstrapEnv() (chalasr)"
* 2.8:
[Form] Fixed keeping hash of equal \DateTimeInterface on submit
[PhpUnitBridge] Fix typo
[Config] Unset key during normalization
invalidate forms on transformation failures
This PR was squashed before being merged into the 4.2-dev branch (closes#29183).
Discussion
----------
[HttpKernel] Fix collecting uploaded files
| 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 | #29178
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
a439681bd4 [HttpKernel] Fix collecting uploaded files
This PR was merged into the 4.1 branch.
Discussion
----------
[Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28429#28432#28493
| 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.
-->
Commits
-------
732f343572 [Workflow] Made code simpler
db69ccc185 method buildTransitionBlockerList returns TransitionBlockerList of expected transition
The constructor for InputOption allows int on the $default parameter, but not Command::addOption $default parameter
fixup: apply coding standards patch
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow][FrameworkBundle] fixed guard event names for transitions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28018https://github.com/symfony/symfony/pull/28007#issuecomment-40652420
| License | MIT
| Doc PR |
There is a bug when many transitions are defined with the same name.
I finished destillat's work and rebase against 3.4 as it's a bug fix.
There another point of failure, but it could not be fixed on 3.4. I will
be a need feature. The issue is related to `Workflow::can($subject, $transitionName)`.
Since the transitionName could be not unique, we will need to support
passing an instance of Transition. A new PR is incomming
Commits
-------
83dc473dd6 [FrameworkBundle] fixed guard event names for transitions
fb88bfc79a [FrameworkBundle] fixed guard event names for transitions
This PR was squashed before being merged into the 4.2-dev branch (closes#29184).
Discussion
----------
[WebProfilerBundle] Fix theme settings
| 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 | #28932#28935
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
8fbe85c50f [WebProfilerBundle] Fix theme settings
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] collect all stamps added on Envelope as collections
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29156
| License | MIT
| Doc PR | -
Late small BC break for Messenger:
* `Envelope::all()` takes a new optional `$stampFqcn` argument and returns the stamps for the specified FQCN, or all stamps by their class name
* `Envelope::get()` has been renamed `Envelope::last()`
This fixes the current behavior where we replace any previous stamp with the same type, which is unexpected to me as it silently loses data and more importantly blocks interesting use cases we're going to need in the near future.
Basically, that's the same as HTTP headers being allowed to exist several times: most of them make no sense as collections, but some are really useful as collections.
Commits
-------
2e9885922a [Messenger] collect all stamps added on Envelope as collections
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Dotenv] load .env.dist when it exists and .env is not found
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29170
| License | MIT
| Doc PR | -
As illustrated in #29170, it can be useful to opt out from the `.env` convention and fall back to defining env vars in `.env.dist` instead. This PR allows that by loading `.env.dist` when it exists and `.env` is not found.
Needs https://github.com/symfony/flex/pull/434 to work seamlessly when using Flex.
Commits
-------
841185bb9f [Dotenv] load .env.dist when it exists and .env is not found
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] invalidate forms on transformation failures
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20916, #21242, #28584
| License | MIT
| Doc PR |
Commits
-------
385d9df29c invalidate forms on transformation failures
This PR was squashed before being merged into the 2.8 branch (closes#29152).
Discussion
----------
[Config] Unset key during normalization
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes-ish
| 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 | #29142
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
2.8 vs. 4.x :) let me know.
Commits
-------
e1402d495e [Config] Unset key during normalization
* 4.1:
[Form] Hardened test suite for empty data
Bump phpunit XSD version to 5.2
[Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables
Add required key attribute
* 3.4:
[Form] Hardened test suite for empty data
Bump phpunit XSD version to 5.2
[Fwb][EventDispatcher][HttpKernel] Fix getClosureScopeClass usage to describe callables
Add required key attribute
This PR was merged into the 2.8 branch.
Discussion
----------
Bump phpunit XSD version to 5.2
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Some attributes being used in the phpunit configuration files, namely
`failOnRisky` and `failOnWarning` were introduced in phpunit 5.2.0. The
Composer configuration shows that tests should run with old versions of
phpunit, but phpunit only validates the configuration against the XSD
since phpunit 7.2.0
These changes can be tested as follows:
```
wget http://schema.phpunit.de/5.2/phpunit.xsd
xargs xmllint --schema phpunit.xsd 1>/dev/null
find src -name phpunit.xml.dist| xargs xmllint --schema phpunit.xsd 1>/dev/null
```
See 7e06a82806
See 46e3745a03/composer.json (L98)
Commits
-------
4dce4b7c30 Bump phpunit XSD version to 5.2
Some attributes being used in the phpunit configuration files, namely
failOnRisky and failOnWarning were introduced in phpunit 5.2.0. The
Composer configuration shows that tests should run with old versions of
phpunit, but phpunit only validates the configuration against the XSD
since phpunit 7.2.0.
These changes can be tested as follows:
wget http://schema.phpunit.de/5.2/phpunit.xsd
xargs xmllint --schema phpunit.xsd 1>/dev/null
find src -name phpunit.xml.dist| xargs xmllint --schema phpunit.xsd 1>/dev/null
See 7e06a82806
See 46e3745a03/composer.json (L98)
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Dotenv] add loadEnv(), a smoother alternative to loadForEnv()
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (4.2-only)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR replaces the `loadForEnv()` method introduced in #28533 by a new `loadEnv()` method.
- It accepts only one mandatory argument: `$path`, which is the path to the `.env` file.
- The 2nd argument is optional and defines the name of the environment variable that defines the Symfony env. This plays better with the current practice of defining the env in `.env` (`loadForEnv()` requires knowing the env before being called, leading to a chicken-n-egg situation that `loadEnv()` avoids.)
- the possibility to load several files at once is removed. We don't have a use case for it and those who do can call `loadEnv()` in a loop anyway.
In addition to $path (.env), the following files are loaded, the latter taking precedence in this order:
.env < env.local < .env.$env < .env.$env.local
Note that `loadForEnv()` used to give higher precedence to .env.local vs .env.$env.
The new behavior is aligned with [the order used by create-react-app](https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/adding-custom-environment-variables.md#what-other-env-files-can-be-used). It also allows overriding the env in .env.local, which should be convenient for DX.
Last but not least, the "test" env has this special behaviors:
- `.env.local` file is skipped for the "test" env (same as before and as in create-react-app)
- ~vars defined in .env files **override** real env vars (similar to what Rails' dotenv does: you don't want your tests to randomly fail because of some real env vars)~.
Commits
-------
0cf9acb70f [Dotenv] add loadEnv(), a smoother alternative to loadForEnv()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Routing] fix dumping conditions that use the request
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29106
| License | MIT
| Doc PR | -
Commits
-------
09d5be8dac [Routing] fix dumping conditions that use the request
* 4.1:
Change button_widget class to btn-primary
[Serializer] Allow null values when denormalizing with constructor missing data
[Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS
[HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean
[HttpFoundation] replace any preexisting Content-Type headers
* 3.4:
Change button_widget class to btn-primary
[Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS
[HttpFoundation] Fixed PHP doc of ParameterBag::getBoolean
[HttpFoundation] replace any preexisting Content-Type headers
This PR was merged into the 3.4 branch.
Discussion
----------
[Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS
| 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 | -
Since using it is not thread safe, let's not rely on it (already done in other places.)
Commits
-------
21a909a189 [Dotenv] dont use getenv() to read SYMFONY_DOTENV_VARS
This PR was squashed before being merged into the 4.1 branch (closes#29076).
Discussion
----------
[Serializer] Allow null values when denormalizing with constructor missing data
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When using `default_constructor_arguments` to denormalize objects, `null` values for a parameter weren't processed, so instantiating was failing.
Commits
-------
5fd0f3f453 [Serializer] Allow null values when denormalizing with constructor missing data
* 4.1:
[VarDumper] fix dump of closures created from callables
[DI] fix dumping inlined services
Add framework asset changes to upgrade 3.0 guide
[Travis] Bump ext-mongodb to 1.5.2 on Travis
[DI] dont track classes/interfaces used to compute autowiring error messages
[DI] fix GraphvizDumper ignoring inline definitions
bumped Symfony version to 4.1.8
updated VERSION for 4.1.7
updated CHANGELOG for 4.1.7
bumped Symfony version to 3.4.19
updated VERSION for 3.4.18
updated CHANGELOG for 3.4.18
bumped Symfony version to 2.8.48
updated VERSION for 2.8.47
update CONTRIBUTORS for 2.8.47
updated CHANGELOG for 2.8.47
Fix ini_get() for boolean values
* 3.4:
[VarDumper] fix dump of closures created from callables
[DI] fix dumping inlined services
Add framework asset changes to upgrade 3.0 guide
[Travis] Bump ext-mongodb to 1.5.2 on Travis
[DI] dont track classes/interfaces used to compute autowiring error messages
[DI] fix GraphvizDumper ignoring inline definitions
bumped Symfony version to 3.4.19
updated VERSION for 3.4.18
updated CHANGELOG for 3.4.18
bumped Symfony version to 2.8.48
updated VERSION for 2.8.47
update CONTRIBUTORS for 2.8.47
updated CHANGELOG for 2.8.47
Fix ini_get() for boolean values
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix dumping inlined services
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28824#29078
| License | MIT
| Doc PR | -
Same as #29103 but for 3.4.
This PR dump inline services using the call-stack to sort the code for instantiating them.
This makes easier to follow and matches the behavior one would expect (and has when using `ContainerBuiler` directly to create services.)
Commits
-------
a97606d58a [DI] fix dumping inlined services
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] fix dump of closures created from callables
| 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 | -
We are missing displaying full information about closures created using `ReflectionMethod::getClosure()` or `Closure::fromCallable()`.
This PR fixes it. For VarDumper but also other places where we have logic to display them.
Commits
-------
1c1818b876 [VarDumper] fix dump of closures created from callables
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix GraphvizDumper ignoring inline definitions
| 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 | -
Since SF3, inline definitions are first class citizen. I noticed that the GraphvizDumper does not inspect them. Here is the fix.
Commits
-------
ebe6265504 [DI] fix GraphvizDumper ignoring inline definitions
This PR was merged into the 4.2-dev branch.
Discussion
----------
LoggingTranslator should implement Symfony\Contracts\Translation\TranslatorInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29089
| License | MIT
While autowiring Translator using `Symfony\Contracts\Translation\TranslatorInterface` symfony complains that wrong service was injected, because LoggingTranslator does not implement new interface.
Commits
-------
65f321f6c9 LoggingTranslator should implement Symfony\Contracts\Translation\TranslatorInterface
This PR was squashed before being merged into the 4.2-dev branch (closes#29100).
Discussion
----------
[Messenger] Cleaning after new changes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
See topic per commit
Commits
-------
3d31772949 [Messenger] Cleaning after new changes
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle][4.2] fix deps
| 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 -->
The bundle requires the `MetadataAwareNameConverter` added in 4.2
1fc577f2c7/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml (L122-L124)
This PR fixes
```
Attempted to load interface "AdvancedNameConverterInterface" from namespace "Symfony\Component\Serializer\NameConverter".
Did you forget a "use" statement for another namespace?
```
Commits
-------
71fe97a7ab [FrameworkBundle][4.2] fix deps
This PR was squashed before being merged into the 4.2-dev branch (closes#29062).
Discussion
----------
Fix GlobResource serialization
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | no <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28200 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
Since @gonzalovilaseca improvement in PR #28200, I noticed that the container is being compiled systematically. This is caused by the two added properties (`forExclusion`, `excludedPrefixes`) not being serialized, and lead to wrong hash computing. I updated the `serialize` and `unserialize` methods in this PR.
ping @nicolas-grekas
Commits
-------
6ce7f07439 Fix GlobResource serialization
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] make senders/handlers locator accept envelopes
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As suggested by @Tobion in https://github.com/symfony/symfony/pull/29045#issuecomment-434906250 - works for me also.
Commits
-------
9cd88b0dc5 [Messenger] make senders/handlers locator accept envelopes
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] extract stamp header prefix into private const
| Q | A
| ------------- | ---
| Branch? | master f
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Commits
-------
564cf3d156 [Messenger] extract stamp header prefix into private const
This PR was merged into the 4.2-dev branch.
Discussion
----------
Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request"
This reverts commit 8a127ea34a.
| 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 | #26486
| License | MIT
| Doc PR |
As I said in https://github.com/symfony/symfony/pull/26486#discussion_r228697658 and people wonder in https://symfony.com/blog/new-in-symfony-4-2-acceptable-request-formats#comment-22747, I don't think this method clear and generic enough to be added to the core.
I can't see where I would possibly use this method. What would be useful is a similar method that accepts formats as argument and would return the ones that are acceptable according to the accept header. This would then allow to make use of `*/*` and this is what people usually need in REST APIs etc.
But for now, we should revert it before it gets released like this.
Commits
-------
397ed83c3c Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request"
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] Fix tags on multiple decorated service
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28682
| License | MIT
| Doc PR |
After the first run in the loop with the same decorated service it goes only in the hasAlias condition. The tags will be not set here, so the `ResolveTaggedIteratorArgumentPass` will handle only the first decoration.
Commits
-------
90f8df2830 [DependencyInjection] Fix tags on multiple decorated service
This PR was merged into the 4.1 branch.
Discussion
----------
SCA: simplify some ifs in favour of null coalescing operator
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Some of ifs were replaced with null coalescing operator in order to simplify control flow.
Commits
-------
636a872389 SCA: reverted code style changes
c926b1abd3 SCA: reverted code style changes
300b31fa75 SCA: applied requested code style changes
0180cb936f SCA: simplify some ifs in favour of null coalescing operator
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] allow to skip saving the computed value when using CacheInterface::get()
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While trying to play with using Messenger and Cache together, I spotted a few issues related to the new `CacheInterface::get()` method:
- there must be a way to skip saving the computed value in the pool. This is needed in my (still local WIP) use case - and is also needed for `LockRegistry`: processes that wait for the lock to be released should not write the value back when the lock is over. This is addressed by adding a 2nd `bool &$save` argument to the computing callback. When the callback sets this reference to true, the returned value should not be written to the pool.
- in order to better document the signature of this callback, a new `CallbackInterface` is added in the `Contracts\Cache` namespace. This will help autocompletion and implementations.
- `ContractsTrait` was writing twice the value to the pool - now fixed
- `LockRegistry` did not retry locking when a waiting process wasn't able to fetch the fresh value - now fixed.
Commits
-------
321d7f4be0 [Cache] allow to skip saving the computed value when using CacheInterface::get()
This PR was merged into the 2.8 branch.
Discussion
----------
Fix ini_get() for boolean values
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Currently setting `false` or `off`, ... value to configure some PHP ini directives will make this evaluated to `true` as this is equal to a non empty string.
Commits
-------
a1538696c3 Fix ini_get() for boolean values
* 4.1:
SCA: removed unused variables
Remove duplicate condition
fix useless space in docblock
remove unneeded tearDown method
[Intl] Update the ICU data to 63.1
[FrameworkBundle] Fix broken exception message
[Messenger] send using the routing_key for AMQP transport
also clean away the NO_AUTO_CACHE_CONTROL_HEADER if we have no session
[TwigBundle] Fix usage of TwigBundle without FrameworkBundle
Revert "fixed CS"
[Serializer] Reduce class discriminator overhead
Skip empty proxy code
[Security] Fix "exclude-from-classmap"
[Security] Removed unsed trait import
[Config] Fix @method annotation
add missing double-quotes to extra_fields output message
[DI] Default undefined env to empty string during compile
Convert InsufficientAuthenticationException to HttpException
This PR was merged into the 2.8 branch.
Discussion
----------
Revert "fixed CS"
This reverts commit d48a3776fe.
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This PR reverts #28814 , that was caused as a bug of PHP CS Fixer fixed in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4027
After fix on PHP CS Fixer side, the rule is passing now at Symfony's codebase.
This PR only reverts wrong chances done by PHP CS Fixer,
it does not apply new rule requested in #28817 ( https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4045 )
Commits
-------
6f83d9f9a3 Revert "fixed CS"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now, `TraceableMiddleware` works as a middleware decorator for the "handle" method. It means that *each middleware* frame in the call stack is wrapped between two noisy extra frames.
This is something we can remove by decorating the StackInterface instead: let's just stop/start events when the next middleware is fetched.
Thanks to this, only one frame *per bus* is added to measure middleware timings.
Commits
-------
73c8c23c79 [Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames
This PR was merged into the 2.8 branch.
Discussion
----------
[HTTP Foundtation] Fix useless space in docblock
I Just removed a useless space in PHP Doc, I don't know if target the 2.8 branch is enough to others SF versions
Commits
-------
6ba75734d6 fix useless space in docblock
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] Cleanup unused var
| 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 -->
<!--
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
-------
d254004c26 [VarExporter] Cleanup unused var
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] make debug:autowiring list useful services and their description
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27207
| License | MIT
| Doc PR | -
This PR closes#27207: we don't need "semantics" anymore. 4.2 has everything already to allow us to separate useful services from the other ones: any autowireable *alias* **is** a useful service!
Add autowiring by type + parameter name (#28234) and the story is done: we can easily hint people about which features their bundles provide, without being polluted by for-wiring-only services.
Here is a screenshot running this command(before I excluded the aliases for $cacheApp and $cacheSystem):
![image 3](https://user-images.githubusercontent.com/243674/47437006-f41f4380-d7a7-11e8-9f76-7f23e9193ce8.png)
ping @weaverryan as we drafted that together.
Fixes a few issues found meanwhile.
That should definitely go in 4.2.
Commits
-------
56aab09b01 [FrameworkBundle] make debug:autowiring list useful services and their description
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Translation] allow using the ICU message format using domains with the "+intl-icu" suffix
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (unless merged after 4.2)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR replaces the `FallbackFormatter` logic by explicit opt-in.
This allows triggering accurate exceptions when one wants to use the ICU message format but the extension (or the polyfill) is missing.
The way to opt-in is to put messages in a domain with the `+intl-icu` suffix *at loading/declaration time*.
E.g. translations in `messages+intl-icu.en.yaml` will be read as part of the `messages` domain , but will be parsed by intl's `MessageFormatter` instead of the default Symfony one.
To make it seamless to adopt the ICU format, `%`s are trimmed from parameter keys (idea borrowed from https://github.com/webfactory/WebfactoryIcuTranslationBundle)
This is for 4.2 as it changes a feature that is not released yet.
ping @Nyholm - we drafted this together.
Commits
-------
d95cc4d4c6 [Translation] allow using the ICU message format using domains with the "+intl-icu" suffix
This PR was merged into the 4.2-dev branch.
Discussion
----------
[BrowserKit] Remove undefined variable $str
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | no <!-- required for new features -->
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
4b3fdd60d1 [BrowserKit] Remove undefined variable
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Move MiddlewareTestCase in Test ns
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes (AppVeyor failure unrelated) <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Just a quick suggestion after #28943 being merged. Wouldn't it make sense to move this in `Test` namespace to be used by anyone wanting to unit test their middleware?
Commits
-------
215c895a55 [Messenger] Move MiddlewareTestCase in Test ns
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Deprecate support for legacy directories in Translation comands
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
Commits
-------
a7a8aad46f [FrameworkBundle] Deprecate support for legacy translations and views directories
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] Scroll into view when searching
| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This jumps to the found element when using the javascript widget for searching HTML dumps. Inspired by Ctrl+F in Chrome :)
It's super convenient with long dumps, however i wasnt able to position the search input on the right in a fixed manner... because CSS 😓 i was hoping @ogizanagi could add a patch for it.
Also see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
Commits
-------
647a937abc [VarDumper] Scroll into view when searching
This PR was merged into the 4.2-dev branch.
Discussion
----------
Remove reference to http digest authentication
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | <!-- #-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.
-->
Seeing as HTTP Digest has been deprecated / removed, the README shouldn't be advertising it as a feature.
This is especially important seeing as sites such as packagist display the README to advertise the features/usage of a package. See https://packagist.org/packages/symfony/security
Commits
-------
9702a212e2 Remove reference to http digest authentication
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DotEnv] Add a new loadForEnv() method mimicking Ruby's dotenv behavior
| 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 | helps for symfony/recipes#465, symfony/recipes#408
| License | MIT
| Doc PR | todo
This PR adds a new `loadForEnv()` method that mimics the behavior of [Create React App](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#what-other-env-files-can-be-used), [Rails' DotEnv](https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use) and probably some other libs:
`DotEnv::loadForEnv()` will load the following files, starting from the bottom. The first value set (or those already defined in the environment) take precedence:
- `.env` - The Original®
- `.env.dev`, `.env.test`, `.env.prod`... - Environment-specific settings.
- `.env.local` - Local overrides. This file is loaded for all environments _except_ `test`.
- `.env.dev.local`, `.env.test.local`, `.env.prod.local`... - Local overrides of environment-specific settings.
The plan is to use this method in the default SF installation (symfony/recipes#466).
Commits
-------
774a78c8de [DotEnv] Add a new loadForEnv() method mimicking Ruby's dotenv behavior
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add `StackInterface`, allowing to unstack the call stack
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
At the moment, debugging an exception coming from a middleware is not as friendly as it could: each middleware is preceded by a noisy frame added by the `$next` callable indirection.
This PR allows removing this frame by using `$next()->handle($envelope, $next);` instead of `$next($envelope);` in a middleware. Note that this is optional so that the later continues to work. But if one wants to opt-in for the former, then the stack trace of exceptions will be freed from `$next`.
All core middleware should do this, so here they are, updated.
Commits
-------
2bc7d11ad3 [Messenger] Add `StackInterface`, allowing to unstack the call stack
This PR was merged into the 4.2-dev branch.
Discussion
----------
[TwigBridge] Remove $rootDir argument in CodeExtension
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony-docs/pull/10547#issuecomment-432608538
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Forgotten in #28890
cc @javiereguiluz
Commits
-------
f8947242a9 [TwigBridge] Remove $rootDir argument in CodeExtension
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] If `framework.messenger.buses.X.middleware` is empty, it will be `null`
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28945
| License | MIT
| Doc PR | ø
Otherwise, it would fail with the following configuration:
```yaml
framework:
messenger:
buses:
events_bus:
middleware:
# - 'some_commented_middleware'
```
Commits
-------
91a70fcd6f If `framework.messenger.buses.X.middleware` is empty, it will be `null`
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Form] Deprecate TimezoneType regions option
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28848
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
I know i've added this option myself in 4.1, but given my recent development for #28624 i realized it's an opinionated feaure, which can/should be solved on user-side (`choice_filter/choice_loader` and/or `group_by`).
- blocks translations as we dont have them (see #28831)
- blocks possibility of switching to Intl zones which doesnt really have this filter feature (see #28836)
~While at it, i solved a few issues with `OptionsResolver` that is able to deprecate options as of 4.2 also.~ Fixed in #28878
- when resolved trigger the deprecation
- allow to opt-out from triggering the deprecation
- dont trigger deprecation for default values (only given ones)
Commits
-------
5cb532d2de [Form] Deprecate TimezoneType regions option
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] remove classifying sub-namespaces in favor of semantic ones
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While working on the component, I found it hard to discover the meaning of the `Asynchronous` and `Enhancers` sub-namespaces. Now that I know the component better, I understand they're only classifying namespaces with no specific technical semantics.
I'd like to remove them to make the component easier to discover.
This PR introduces a few new semantic sub-namespaces instead.
From the changelog:
* Classes in the `Middleware\Enhancers` sub-namespace have been moved to the `Middleware` one
* Classes in the `Asynchronous\Routing` sub-namespace have been moved to the `Transport\Sender\Locator` sub-namespace
* The `Asynchronous/Middleware/SendMessageMiddleware` class has been moved to the `Middleware` namespace
* `SenderInterface` and `ChainSender` classes have been moved to the `Transport\Sender` sub-namespace
* `ReceiverInterface` and its implementations have been moved to the `Transport\Receiver` sub-namespace
Commits
-------
16afb5e2b4 [Messenger] remove classifying sub-namespaces in favor of semantic ones
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Process] pass all output to the wait-until callback
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? |
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Introduced yesterday, my bad.
Should make appveyor green hopefully.
Commits
-------
a320133b1d [Process] pass all output to the wait-until callback
This PR was squashed before being merged into the 4.2-dev branch (closes#28875).
Discussion
----------
[FWBundle] Add a new method AbstractController::addLink()
| 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 | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo
This provides a convenient method to add `Link` headers to the current `Response` directly from the `Request` object.
It improves the developer experience and the discoverability of [the WebLink component](https://github.com/symfony/symfony-docs/pull/10309).
Usage:
```php
namespace App\Controller;
use Fig\Link\Link;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class MyAction extends AbstractController
{
public function __invoke(Request $request): Response
{
$this->addLink($request, new Link('mercure', 'https://demo.mercure.rocks'));
return $this->json(['foo' => 'bar']);
}
}
```
Commits
-------
4d20c39f70 [FWBundle] Add a new method AbstractController::addLink()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[OptionsResolver] Trigger deprecation only if the option is used
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28848
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10496
It's true that showing a deprecation message when the option is not used is a bit annoying and it would be heavy to get rid of it.
Now, a deprecated option is triggered only when it's provided by the user or each time is being called from a lazy evaluation (except for deprecations based on the value, they're triggered only when provided by the user).
Commits
-------
1af23c9a74 [OptionsResolver] Trigger deprecation only if the option is used