* 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
This PR was squashed before being merged into the 4.2-dev branch (closes#28940).
Discussion
----------
[Process] Adds usleep(1000) to ease CPU usage.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs
Commits
-------
9d1416ad82 [Process] Adds usleep(1000) to ease CPU usage.
This PR was squashed before being merged into the 4.2-dev branch (closes#28737).
Discussion
----------
[DependencyInjection] Optimize exporting variables
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28292
| License | MIT
Store previously resolved variables so that the relatively expensive function [resolveEnvPlaceholders](3e7b029524/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php (L1776)) is not called unnecessarily.
The effect on running ```bin/console``` with an empty cache in a big application (200+ env variables) in seconds:
| Before | After |
|------------|------------|
| 24.1 | 15.8 |
| 24.5 | 16.0 |
| 24.7 | 16.3 |
| 24.2 | 16.0 |
| Avg: 24.4 | Avg:16.0 |
Commits
-------
768de2f7d9 [DependencyInjection] Optimize exporting variables
This PR was squashed before being merged into the 4.2-dev branch (closes#28200).
Discussion
----------
[Config] Fix slow service discovery for large excluded directories
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #26736
| License | MIT
| Doc PR |
Not sure if this is a bug fix or not, is more an improvement.
Please for all detail follow the conversation here:
https://github.com/symfony/symfony/issues/26736
Commits
-------
fa731e53e9 [Config] Fix slow service discovery for large excluded directories
This PR was squashed before being merged into the 4.2-dev branch (closes#28709).
Discussion
----------
[Serializer] Refactor and uniformize the config by introducing a default context
| 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? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo <!-- required for new features -->
This PR uniformizes how the Serializer's configuration is handled:
* As currently, configuration options can be set using the context (options that weren't configurable using the context have been refactored to leverage it)
* Normalizers and encoders' constructors now accept a "default context"
* All existing global configuration flags (constructor parameters) have been deprecated in favor of this new default context
* the stateless context is always tried first, then is the default context
Some examples:
```php
// Configuring groups globally
// Before: not possible
// After
$normalizer = new ObjectNormalizer(/* deps */, ['groups' => 'the_default_group']);
// Escaping Excel-like formulas in CSV files
// Before
$encoder = new CsvEncoder(',', '"', '\\', '.', true);
// After
$encoder = new CsvEncoder(['csv_escape_formulas' => true]);
$encoder->normalize($data, 'csv', ['csv_escape_formulas' => false]); // Override for this call only
```
Benefits:
* The DX is dramatically improved, configuration is always handled in similar way
* The serializer can be used in fully stateless way
* Every options can be configured globally
* Classes that had constructors with a lot of parameters (like `CsvEncoder`) are now much easier to use
* We'll be able to improve the documentation by adding a dictionary of all available context options for the whole component
* Everything can be configured the same way
TODO in subsequent PRs:
* Add a new option in framework bundle to configure the context globally
* Uniformize the constants name (sometimes the name if `FOO`, sometimes `FOO_KEY`)
* Fix the "bug" regarding the format configuration in `DateTimeNormalizer::denormalize()` (see comments)
* Maybe: move `$defaultContext` as the first parameter (before required services?)
* Make `XmlEncoder` stateless
Commits
-------
52b186a210 [Serializer] Refactor and uniformize the config by introducing a default context
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpFoundation] Merging arrays in a loop is slow and causes high CPU usage
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
As described here, https://github.com/kalessil/phpinspectionsea/blob/master/docs/performance.md#slow-array-function-used-in-loop, merging arrays in a loop is slow and causes high CPU usage (benchmarks are also on the link), this pull request solves this problem
Commits
-------
3db84789f2 Merging arrays in a loop is slow and causes high CPU usage
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] internal cleanups
| 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 | -
From the updated changelog:
* `MessengerDataCollector::getMessages()` returns an iterable, not just an array anymore
* `AbstractHandlerLocator` is now internal
* `HandlerLocatorInterface::resolve()` has been replaced by `getHandler(Envelope $envelope)`
* `SenderLocatorInterface::getSenderForMessage()` has been replaced by `getSender(Envelope $envelope)`
* `SenderInterface::send()` returns `void`
+ some internal simplifications
Commits
-------
4a3edd0b37 [Messenger] internal cleanups
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] made dispatch() and handle() return void
| 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 | -
Middlewares and dispatchers should not return any value. Forwarding back the results from handlers breaks the scope of the component. The canonical example of some bad design this can lead to is `ChainHandler`: how can the caller know that there is one in the chain and that it should expect an array as a return value? More generally, how can a caller know what to expect back from a call to dispatch()? I think we should not allow such broken designs.
Instead, we should favor east-oriented design: if one needs a command bus, one would have to dispatch a proper command object - and if a result is expected back, it should be done via a setter on the dispatched command - or better, a callback set on the command object. This way we play *by the rules* of the type-system, not against.
Commits
-------
f942ffcb1b [Messenger] made dispatch() and handle() return void
This PR was merged into the 4.2-dev branch.
Discussion
----------
Fix debug:container which crash when the service class has no doc comment
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The console command container:debug have now the ability to display service description, based on phpdoc comments of the service class. But the command currently crash when selecting a service with a class without phpdoc description.
This PR fixes this issue.
Commits
-------
aed0a5a38a [FrameworkBundle] Fix debug:container which crash when the service class has no doc comment
This PR was merged into the 4.2-dev branch.
Discussion
----------
[TwigBundle] Deprecating support for legacy templates directories
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10500
go ahead with https://github.com/symfony/symfony/pull/28810#issuecomment-430245394
- [x] Fix tests
Commits
-------
8b390f346f Deprecating support for legacy templates directories
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] fix MetadataAwareNameConverter break denormalization
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
During denormalization of an object, the `normalize` function of the `MetadataAwareNormalizer` is called to find the serialized name of constructor arguments. This do not work if the constructor argument is not in the serialized representation of the object (for example given with a `default_constructor_arguments` option ).
**Checklist**
- [x] Add test to cover the bug
Commits
-------
faf8b009dc [Serializer] fix MetadataAwareNameConverter break denormalization
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] rename "envelope items" and move them in the "Stamp" namespace
| 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, envelope items are scattered in different sub namespaces and use the "Configuration" suffix.
This makes them hard to discover.
This PR creates a new `Stamp` namespace and moves all "envelope items" there, renaming them to use the "stamp" terminology.
From the changelog:
* `Envelope`'s constructor and `with` method now accept `StampInterface` objects as variadic parameters
* Renamed `EnvelopeItemInterface` to `StampInterface`
* Renamed and moved `ReceivedMessage`, `ValidationConfiguration` and `SerializerConfiguration` in the `Stamp` namespace
* Removed the `WrapIntoReceivedMessage` (it's untested and unused)
Commits
-------
0ad2cb906d [Messenger] rename "envelope items" and move them in the "Stamp" namespace
The "/Tests/" directory doesn't exist in the Security Component, tests are located within the Security components folders and none of the tests were being excluded in an --classmap-authoritative dump of the autoload.
This PR was squashed before being merged into the 4.2-dev branch (closes#28916).
Discussion
----------
[Form] Fix @method annotation
| 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 -->
Same as #28915 for 4.2 (these are the only occurrences for interfaces)
Actually provides a use case for https://github.com/symfony/symfony/pull/28902#issuecomment-430904459🎉
Commits
-------
13f0db718e [Form] Fix @method annotation
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] Fix outdated CHANGELOG line
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Unless it was kept on purpose, for `Symfony\Contracts\Cache\CacheInterface` discoverability? In which case I'd add the FQCN.
Commits
-------
4e89a4bc03 [Cache] Fix outdated CHANGELOG line
This PR was merged into the 2.8 branch.
Discussion
----------
Convert InsufficientAuthenticationException to HttpException with 401 status code
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed ticket | #8467
| License | MIT
I was trying to implement the `json_login` authentication and test it with an API Platform project. When I call a secured endpoint without authentication, an InsufficientAuthenticationException is thrown with a 500 status code instead of a 401.
After some researches with @dunglas, there is no default `entrypoint` on the security firewall. As one already exists for `form_login` in the FormLoginFactory, this component might need a default one to convert this 500 exception to a correct 401 HTTP error.
This fixes https://github.com/symfony/symfony/issues/25806#issuecomment-368461952.
Commits
-------
4503ac8e9f Convert InsufficientAuthenticationException to HttpException
This PR was squashed before being merged into the 2.8 branch (closes#28840).
Discussion
----------
add missing double-quotes to extra_fields output message
| 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
When using the extra_fields_message option on FormTypes to include the extra_fields items in the message, the output included some superfluous (or, perhaps, missing?) quotes. This resulted in some strange output: `This form should not contain extra fields: notes1\", \"notes2\", \"notes3`.
This PR removes the quotes and instead implodes the extra_fields array using merely ', ' as the glue, resulting in the output: `This form should not contain extra fields: notes1, notes2, notes3`.
Commits
-------
9e7414159c add missing double-quotes to extra_fields output message
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel] Introduce KernelInterface::getProjectDir()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | not yet
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/28897#issuecomment-430523336
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Removes the last call to getParameter('kernel.project_dir') during runtime in core. Yay :)
cc @fabpot @nicolas-grekas
Commits
-------
b046f414e7 [HttpKernel] Introduce KernelInterface::getProjectDir()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Form][TwigBridge] Add help_attr
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Add help_attr to the form_help method.
Commits
-------
42d54b73c3 Add help_attr
This PR was squashed before being merged into the 4.1 branch (closes#28838).
Discussion
----------
[DI] Default undefined env to empty string during compile
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 | #28827
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Instead of using `null` for undefined envs, use `""` instead. We already default the type to string, so actually providing a string value makes sense. During runtime it will always be string also.
Commits
-------
38a8ab92fa [DI] Default undefined env to empty string during compile
* 4.1:
[FWBundle] Uniformize errors when a component is missing
Fixes 28816 Translation commands should not talk about the old app/ directory since 3.4
* 3.4:
[FWBundle] Uniformize errors when a component is missing
Fixes 28816 Translation commands should not talk about the old app/ directory since 3.4
This PR was merged into the 3.4 branch.
Discussion
----------
Translation commands should not tell about the old app/ directory
Fixes#28816 Translation commands should not talk about the old "app/" directory since 3.4
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28816
| License | MIT
| Doc PR | n/a
Commits
-------
5fcc0b4d8d Fixes 28816 Translation commands should not talk about the old app/ directory since 3.4
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel] Deprecate the Kernel name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26904
| 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
-------
98ff750ee1 [HttpKernel] deprecated the Kernel name
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpFoundation] Make ResponseHeaderBag::makeDisposition static
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes-ish
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes
| Fixed tickets | #27851
| 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
-------
d29b410262 [HttpFoundation] made ResponseHeaderBag::makeDisposition static
This PR was merged into the 3.4 branch.
Discussion
----------
[FWBundle] Uniformize errors when a component is missing
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
fa3da4e72c [FWBundle] Uniformize errors when a component is missing
* 4.1:
Remove Process::escapeArgument argument type hint
[Console] fix test using deprecated code
[travis] build libsodium only if it's not already enabled
Add a test case for stringifying of Process arguments
Add a missing English translation
[Console] Fixes multiselect choice question in interactive mode with default values
[Validator] Add a missing Polish translation
Allow integers as default console option value
Setting missing default paths under BC layer
Changed "epost-adress" to "e-postadress"
Fix for race condition in console output stream write
reverse transform RFC 3339 formatted dates
* 3.4:
[Console] fix test using deprecated code
[travis] build libsodium only if it's not already enabled
Add a test case for stringifying of Process arguments
Add a missing English translation
[Console] Fixes multiselect choice question in interactive mode with default values
[Validator] Add a missing Polish translation
Allow integers as default console option value
Setting missing default paths under BC layer
Changed "epost-adress" to "e-postadress"
Fix for race condition in console output stream write
reverse transform RFC 3339 formatted dates
This PR was merged into the 3.4 branch.
Discussion
----------
[Process] A test case for stringifying of Process arguments
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | for https://github.com/symfony/symfony/pull/28863
| License | MIT
| Doc PR |
Checks that non-string arguments passed to Process constructor are typecasted to string
Commits
-------
0d543428ad Add a test case for stringifying of Process arguments
* 2.8:
Add a missing English translation
[Console] Fixes multiselect choice question in interactive mode with default values
[Validator] Add a missing Polish translation
Allow integers as default console option value
Changed "epost-adress" to "e-postadress"
Fix for race condition in console output stream write
reverse transform RFC 3339 formatted dates
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] reverse transform RFC 3339 formatted dates
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28699
| License | MIT
| Doc PR |
Technically, dates formatted according to the HTML specifications do not
contain any timezone information. But since our DateTimeType used to
contain this information in the passed, users had configure their JS
libraries to accept (and create) dates in that format.
To not break BC we should accept these dates and silently ignore the
additional timezone information.
Commits
-------
503239f75e reverse transform RFC 3339 formatted dates
This PR was merged into the 2.8 branch.
Discussion
----------
Fix for race condition in console output stream write
| 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 |
In high throughput environments writing `message` and `PHP_EOL` separately causes race condition issues, where messages might be written in order
- message
- message
- EOL
- EOL
instead of
- message
- EOL
- message
- EOL
An example below is a laravel application log tail of queue workers (multiple app instances writing to the same log file) handled by supervisor.
Before:
![ezgif-1-77388f9210cf](https://user-images.githubusercontent.com/2752769/46792349-bec13180-cd75-11e8-8f91-92f05762f964.gif)
After:
![ezgif-1-0b839d642644](https://user-images.githubusercontent.com/2752769/46792420-e617fe80-cd75-11e8-9414-4bfc85d9c569.gif)
Commits
-------
428dea6fb1 Fix for race condition in console output stream write
This PR was merged into the 4.2-dev branch.
Discussion
----------
Revert "feature #27801 [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors"
This reverts commit f27c3a8584, reversing
changes made to 9da045469e.
| 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 | -
A bridge shouldn't provide interfaces to me so I submitted https://github.com/Seldaek/monolog/pull/1204 instead.
This PR reverts the possibility to autoconfigure processors for now, so that it could be moved to the MonologBundle instead.
To have TokenProcessor and WebProcessor classes implement the new ProcessorInterface, we could bump the minimum version of monolog. This cannot be done until a new version of it is tagged, so we need to resolve this before tagging 4.2 ourselves.
Commits
-------
cfc3f254e7 Revert "feature #27801 [MonologBridge] Add ProcessorInterface, enabling autoconfiguration of monolog processors (nicolas-grekas)"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Validator] Deprecate checkMX and checkHost on Email validator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | fixes#27559fixes#28665
| 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
-------
c6009a0144 [Validator] deprecate checkMX and checkHost on Email validator
This PR was merged into the 4.2-dev branch.
Discussion
----------
[SecurityBundle] Improve error when argon2i is not available
| Q | A
| ------------- | ---
| Branch? | master?
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | ?
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
eb6436ac82 [SecurityBundle] Improve error when argon2i is not available
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel] Add a note about env name restrictions
| 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 | #26884
| 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
-------
b0f863d77e [HttpKernel] added a note about env name restrictions
This PR was merged into the 2.8 branch.
Discussion
----------
Sync English translations
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | https://github.com/symfony/symfony/pull/28828#issuecomment-429362737
| 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
-------
bb573524cb Add a missing English translation
This PR was merged into the 4.2-dev branch.
Discussion
----------
[LDAP] Revamp LDAP options with nested options definition
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Next move after https://github.com/symfony/symfony/pull/27291 :)
This will work exactly that before, nothing change regarding behavior, BUT now we've *less code* and *intuitive definition of nested options*.
Commits
-------
a26c284d2d Revamp LDAP options with nested definition
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Intl] Blacklist invalid languages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes?
| New feature? | yes?
| BC breaks? | no?
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
see https://en.wikipedia.org/wiki/ISO_639-3#Special_codes
Commits
-------
4f5404bdcb [Intl] Blacklist invalid languages
This PR was merged into the 4.2-dev branch.
Discussion
----------
'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder'
A little fix of my [previous PR](https://github.com/symfony/symfony/pull/28815)
This PR changes the constant visibility of the `yml` format as private.
Because as @stof [mentionned](https://github.com/symfony/symfony/pull/28815#issuecomment-428941972) `yml` isn't a format, so the constant shoudn't be public.
Otherwise, this will be confusing while using autocomplete, you see two formats. The user can ask himself if there is a difference between `yaml` / `yml`.
No need of that :)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | -
| License | MIT
| Doc PR |
Commits
-------
674b359610 'yml' is not a format and shouldn't be visible as constant from 'YamlEncoder' class
This PR was merged into the 4.2-dev branch.
Discussion
----------
YamlEncoder handle yml format
| Q | A
| ------------- | ---
| Branch? | ?
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28768
| License | MIT
`Symfony\Component\Serializer\Encoder\YamlEncoder` now handle the `yml` format too
```
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\Encoder\YamlEncoder;
$serializer = new Serializer([], [new YamlEncoder()]);
$content = file_get_contents(__DIR__ . '/test.yml');
$data = $serializer->decode($content, YamlEncoder::ALTERNATIVE_FORMAT);
```
Let me know if something is wrong for you
Commits
-------
d8640f965b YamlEncoder handle yml extension
This PR was squashed before being merged into the 4.2-dev branch (closes#27742).
Discussion
----------
[Process] Add feature "wait until callback" to process class
I often see code like the following:
```php
$process->start();
// wait for the process to be ready
sleep(3);
```
Many times in tests, sometimes in other places. There is a problem with this kind of code because if for any reason the process starts slower than the usual... Your code may fail after that. Also if it's faster, you're losing time for waiting.
So here is my proposal:
```php
$process->start();
$process->waitUntil(function($type, $output) {
// check the output and return true to stop waiting when you got what you wait
});
```
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | Waiting for feedbacks
Commits
-------
27eaf83b63 [Process] Add feature \"wait until callback\" to process class
This PR was merged into the 4.2-dev branch.
Discussion
----------
Remove usage of sf2 when possible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I've not removed all `sf2` occurrences as I've kept the ones that would introduce a BC break.
Commits
-------
8406ee86a9 removed usage of sf2 when possible
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] added support for connecting to Redis clusters via DSN
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Replaces #28300 and #28175
This PR allows configuring a cluster of Redis servers using all available options of either the phpredis extension or the Predis package:
- the `redis_cluster=0/1` boolean option configures whether the client should use the Redis cluster protocol;
- several hosts can be provided using a syntax very similar to #28598, enabling consistent hashing distribution of keys;
- `failover=error/distribute/slaves` can be set to direct reads at slave servers;
- extra options are passed as is to the driver (e.g. `profile=2.8`)
- Predis per-server settings are also possible, using e.g. `host[localhost][alias]=foo` in the query string, or `host[localhost]=alias%3Dfoo` (ie PHP query arrays or urlencoded key/value pairs)
Commits
-------
a42e8774d6 [Cache] added support for connecting to Redis clusters via DSN
* 4.1: (27 commits)
Added the Code of Conduct file
do not override custom access decision configs
[Security] Do not deauthenticate user when the first refreshed user has changed
fix a return type hint
invalidate stale commits for PRs too
add missing cache prefix seed attribute to XSD
fix command description
Fix class documentation
[Validator] Add a missing translation
[FrameworkBundle] Fix 3.4 tests
[DI] fix dumping inline services again
Rename consumer to receiver
Register messenger before the profiler
Fix phpdocs
[EventDispatcher] Remove template method in test case
Added LB translation for #27993 (UUID validator message translation)
Replace deprecated validateValue with validate
[FWBundle] Automatically enable PropertyInfo when using Flex
[Process] fix locking of pipe files on Windows
Correct PHPDoc type for float ttl
...
* 3.4: (21 commits)
Added the Code of Conduct file
do not override custom access decision configs
[Security] Do not deauthenticate user when the first refreshed user has changed
invalidate stale commits for PRs too
add missing cache prefix seed attribute to XSD
fix command description
Fix class documentation
[Validator] Add a missing translation
[FrameworkBundle] Fix 3.4 tests
[DI] fix dumping inline services again
Fix phpdocs
[EventDispatcher] Remove template method in test case
Added LB translation for #27993 (UUID validator message translation)
Replace deprecated validateValue with validate
[FWBundle] Automatically enable PropertyInfo when using Flex
[Process] fix locking of pipe files on Windows
Correct PHPDoc type for float ttl
bumped Symfony version to 3.4.18
updated VERSION for 3.4.17
updated CHANGELOG for 3.4.17
...
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix dumping inline services again
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28720#28710
| License | MIT
| Doc PR | -
The main fix is in `PhpDumper::addInlineService()`
Fixes a few other glitches found meanwhile.
Commits
-------
a854b0a01c [DI] fix dumping inline services again
This PR was merged into the 4.2-dev branch.
Discussion
----------
Revert "feature #27549 [Cache] Unconditionally use PhpFilesAdapter for system pools"
This reverts commit d4f5d46b13, reversing
changes made to 7e3b7b0b50.
| 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 | -
Reading #28800, I've just realized that #27549 breaks using system caches with read-only filesystem.
Using ApcuAdapter makes system caches compatible with read-only filesystems.
Note that this affects only non-warmed up pools, as the warmed-up ones use a faster `PhpArrayAdapter` in front.
Commits
-------
dbc1230735 Revert "feature #27549 [Cache] Unconditionally use PhpFilesAdapter for system pools (nicolas-grekas)"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Routing] simplify PhpMatcherDumper by splitting code logic from route data
| 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 PR splits all logic that is currently dumped into the matcher in a dedicated trait.
This makes the code easier to maintain and prepares for the next step (making the dumper compile routes as a set of PHP arrays instead of code.)
This diff is huge because affected fixtures are also huge, but it's negative, removing 1200 lines!
Commits
-------
22186c7045 [Routing] simplify PhpMatcherDumper by splitting code logic from route data
This PR was squashed before being merged into the 4.2-dev branch (closes#26261).
Discussion
----------
[Validator] Improvement: provide file basename for constr. violation messages in FileValidator.
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | N/A
`\Symfony\Component\Validator\Constraints\FileValidator` provides absolute path to file on server when user, per example, uploads empty file, too large file, of wrong mime type, etc...
Absolute path to file on server does not have value to the end user, on top of that, exposing it can be a security issue - end user should not be aware of server filesystem.
Basename of file, however, has value (per example: MyAwesomeSheet.xlsx, MyCV.doc, etc..) - if something is wrong with file upload (size, mime, etc...).
If basename is exposed, we can construct messages like: "Your file 'MyCV.doc' is not allowed for upload due to....whatever"...
This PR provides basename of file so end user of `\Symfony\Component\Validator\Constraints\FileValidator` can construct error messages of higher value for end user.
Commits
-------
a77abadf06 [Validator] Improvement: provide file basename for constr. violation messages in FileValidator.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Form] allow additional http methods in form configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26287
| License | MIT
| Doc PR | TBD
In order to allow HTTP methods other than GET, PUT, POST, DELETE and PATCH, the `allowed_methods` option under `framework.form` configuration has been added.
This configuration option adds the specified methods to the `FormConfigBuilder` whitelist, allowing that methods be used in form configuration via `setMethod` or the `method` option.
The use-case, that has been discussed in #26287, required the usage of custom HTTP method for describing a resource in an API application.
Commits
-------
27d228c3ee [Form] remove restriction on allowed http methods
This PR was merged into the 4.2-dev branch.
Discussion
----------
[OptionsResolver] Added support for nesting options definition
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #4833
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9995
I'd like to propose an alternative to #27251 and #18134 with a different approach.
It would allow you to create a nested options system with required options, validation (type, value),
normalization and more.
<details>
<summary><strong>Short documentation</strong></summary>
**To define a nested option, you can pass a closure as the default value of the option with an `OptionsResolver` argument:**
```php
$resolver
->defaults([
'connection' => 'default',
'database' => function (OptionsResolver $resolver) {
$resolver
->setRequired(['dbname', 'host', ...])
->setDefaults([
'driver' => 'pdo_sqlite',
'port' => function (Options $options) {
return 'pdo_mysql' === $options['driver'] ? 3306 : null,
},
'logging' => true,
])
->setAllowedValues('driver', ['pdo_sqlite', 'pdo_mysql'])
->setAllowedTypes('port', 'int')
->setAllowedTypes('logging', 'bool')
// ...
},
]);
$resolver->resolve(array(
'database' => array(
'dbname' => 'demo',
'host' => 'localhost',
'driver' => 'pdo_mysql',
),
));
// returns: array(
// 'connection' => 'default',
// 'database' => array(
// 'dbname' => 'demo',
// 'host' => 'localhost',
// 'driver' => 'pdo_mysql',
// 'port' => 3306,
// 'logging' => true,
// ),
//)
```
Based on this instance, you can define the options under ``database`` and its desired default
value.
**If the default value of a child option depend on another option defined in parent level,
adds a second ``Options`` argument to the closure:**
```php
$resolver
->defaults([
'profiling' => false,
'database' => function (OptionsResolver $resolver, Options $parent) {
$resolver
->setDefault('logging', $parent['profiling'])
->setAllowedTypes('logging', 'bool');
},
])
;
```
**Access to nested options from lazy or normalize functions in parent level:**
```php
$resolver
->defaults([
'version' => function (Options $options) {
return $options['database']['server_version'];
},
'database' => function (OptionsResolver $resolver) {
$resolver
->setDefault('server_version', 3.15)
->setAllowedTypes('server_version', 'numeric')
// ...
},
])
;
```
As condition, for nested options you must to pass an array of values to resolve it on runtime, otherwise an exception will be thrown:
```php
$resolver->resolve(); // OK
$resolver->resolve(['database' => []]); // OK
$resolver->resolve(['database' => null); // KO (Exception!)
```
</details>
---
Demo app https://github.com/yceruto/nested-optionsresolver-demo
Commits
-------
d04e40be5a Added support for nested options definition
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] Allow to use a light theme out of the box
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Wouldn't it be nice to provide this light theme out of the box? (the one we use in the profiler)
![capture d ecran 2018-05-14 a 16 50 55](https://user-images.githubusercontent.com/2211145/40004942-23b4138c-5797-11e8-8c57-0b38744ffdc2.png)
Commits
-------
c705b82563 [VarDumper] Allow to use a light theme out of the box
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Finder] Added a way to inverse a previous sorting
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
Sometimes, it's useful to inverse the previous sorting.
For exemple when you want to display the most recent uploaded files
Commits
-------
3cd0dcaaee [Finder] Added a way to inverse a previous sorting
This PR was squashed before being merged into the 4.2-dev branch (closes#28061).
Discussion
----------
[Security] add port in access_control
| Q | A
| ------------- | ---
| Branch? | master for features
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26071
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10359
Add port in access_control
__Please Squash this P.R.__
Commits
-------
6413dcbe75 [Security] add port in access_control
This PR was merged into the 4.2-dev branch.
Discussion
----------
Added different protocols to be allowed as asset base_url
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | fixes#28238
| License | MIT
| Doc PR | symfony/symfony-docs#10347
In some cases you want to use the `file://` as base_url when you are for example generating pdf and want to avoid network requests to improve the pdf generation performance:
```yaml
framework:
assets:
packages:
pdf:
base_url: "file://%kernel.project_dir%/public"
```
usage:
```twig
{{ asset('image.jpg', 'pdf' }}
```
Commits
-------
2e21834b71 added different protocols to be allowed as asset base_urls
This PR was merged into the 2.8 branch.
Discussion
----------
[Process] fix locking of pipe files on Windows
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28655
| License | MIT
| Doc PR | -
Commits
-------
d64bd3b181 [Process] fix locking of pipe files on Windows
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Moving Cache-related CompilerPass to Cache component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Hi, first PR here 🎉
This is related to #27479 and a first work to move Cache-related CompilerPass out of `FrameworkBundle`, it allows to decouple part of the FrameworkBundle configuration classes.
Since we didn't choosed a fixed directory organization to manage theses, I actually did same as in Bundles and used DependencyInjection folder. If we do choose to follow my [last comment directory organization proposal](https://github.com/symfony/symfony/issues/27479#issuecomment-401307685), I'll move theses CompilerPass to `Framework/DependencyInjection/Compiler` directory (nothing hard here).
Thanks to @DanieleGBX that helped me checking this PR and gave me some good advices !
Here is a list of all CompilerPass I moved, with related component (I also moved related tests when they were present):
- **Cache** - CacheCollectorPass
- **Cache** - CachePoolClearerPass
- **Cache** - CachePoolPass
- **Cache** - CachePoolPrunerPass
Commits
-------
53e7040829 moving Cache-related compiler pass from FrameworkBundle to Cache component
* 2.8:
Fix class documentation
[Validator] Add a missing translation
Fix phpdocs
[EventDispatcher] Remove template method in test case
Added LB translation for #27993 (UUID validator message translation)
Replace deprecated validateValue with validate
This PR was squashed before being merged into the 4.2-dev branch (closes#28738).
Discussion
----------
[OptionsResolver] Passing Options argument to deprecation closure
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28721#discussion_r222686221
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10439
As spotted here https://github.com/symfony/symfony/pull/28721, we sometimes need more advanced cases, where the deprecation of the value depends on another option:
```php
$resolver->setDeprecated('date_format', function (Options $options, $dateFormat) {
if (null !== $options['date_format'] && 'single_text' === $options['widget']) {
return sprintf('Using the "date_format" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2.', self::class);
}
return '';
});
```
There is still a decision to make:
> We're in time to change the arguments position (Options $options, $value) to be consistent with other closure signatures.
WDYT?
Commits
-------
29360510db [OptionsResolver] Passing Options argument to deprecation closure
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] add CacheInterface::delete() + improve CacheTrait
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've been hesitating a lot on this topic, but I think we should add a `delete()` method to `CacheInterface`.
Deleting is a very common invalidation strategy and invalidating by passing `$beta=INF` to `get()` has the drawback of requiring a fetch+unserialize+save-with-past-expiration. That's complexity that a delete removes.
This PR fixes an issue found meanwhile on `get()`: passing an `ItemInterface` to its callback makes it harder than required to implement on top of PSR-6. Let's pass a `CacheItemInterface`.
Lastly, the early expiration logic can be moved from the component to the trait shipped on contracts.
Here we are for all these steps.
Commits
-------
c6cf690b2f [Cache] add CacheInterface::delete() + improve CacheTrait
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Form] simplify the form type extension registration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22833, #27906
| License | MIT
| Doc PR |
Commits
-------
6a1d4c5db4 simplify the form type extension registration
This PR was merged into the 2.8 branch.
Discussion
----------
[EventDispatcher] Remove template method in test case
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- 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 | 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
-------
545a8eef05 [EventDispatcher] Remove template method in test case
This PR was merged into the 4.2-dev branch.
Discussion
----------
[WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ? (no tests for server commands)
| Fixed tickets | #28585
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Tries to get the local hostname into an ip (if available) using the PHP gethostname* methods.
Commits
-------
dfd2e8b4e6 [WebServerBundle] Added ability to display the current hostname address if available when binding to 0.0.0.0
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] minor optim for dumped container
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted while reviewing a real-world dumped container.
Commits
-------
c1863e3a7a [DI] minor optim for dumped container
This PR was squashed before being merged into the 3.4 branch (closes#28072).
Discussion
----------
[Security] Do not deauthenticate user when the first refreshed user has changed
| 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 the token is deauthenticated when the first refreshed user has changed. In theory, a second user provider could find a user that is the same than the user stored in the token.
Also, the deauthentication is currently affected by the order of the user providers in the security.yaml and IMHO it does not make sense.
Commits
-------
95dce67 [Security] Do not deauthenticate user when the first refreshed user has changed
This PR was merged into the 2.8 branch.
Discussion
----------
Fix class documentation
| 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 |
The phpdoc references the PHP flush function, neither a method of this class nor its parent.
Commits
-------
5a51bb24dc Fix class documentation
This PR was merged into the 3.4 branch.
Discussion
----------
[FWBundle] Automatically enable PropertyInfo when using Flex
| 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
Automatically enabling PropertyInfo when using Flex and when the component is installed has been forgotten when releasing 3.4.
It makes it very hard to debug why some features of the serializer are sometimes not working properly.
Commits
-------
0683f0ac82 [FWBundle] Automatically enable PropertyInfo when using Flex
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Fix middleware docblocks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| 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
-------
f06c0c464a [Messenger] Fix middleware docblocks
This PR was merged into the 4.2-dev branch.
Discussion
----------
clarify the cache.pools.provider option
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | -
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10390
improve the documentation in Configuration.php with things we found out in https://github.com/symfony/symfony-docs/pull/10390
Commits
-------
ad4aaf151a clarify the cache.pools.provider option
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Translator] Deprecated transChoice and moved it away from contracts
| 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 | Issue: https://github.com/symfony/symfony-docs/issues/10264
This will address comment made here: https://github.com/symfony/symfony/pull/27399#pullrequestreview-151929117
This PR moves the `transChoice()` method away from Contracts and back to the component. I also reverted changes in the `IdentityTranslator`. I will still use the deprecated `MessageSelector` but this is not fine since `transChoice()` is also deprecated.
Commits
-------
dc5f3bfff7 Make trans + %count% parameter resolve plurals
d870a850bd [Translator] Deprecated transChoice and moved it away from contracts
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator][minor] Fixed method in phpDoc
| 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 |
`ValidatorInterface` doesn't have a `validateValue` method, `validate` should be used.
Commits
-------
b0253e58ea Replace deprecated validateValue with validate
This PR was merged into the 4.2-dev branch.
Discussion
----------
[WebServerBundle] Deprecate relying on --env in server:start and server:run
| 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 | n/a
Commits
-------
31b5615b51 [WebServerBundle] Deprecate relying on --env in server:start and server:run
Technically, dates formatted according to the HTML specifications do not
contain any timezone information. But since our DateTimeType used to
contain this information in the passed, users had configure their JS
libraries to accept (and create) dates in that format.
To not break BC we should accept these dates and silently ignore the
additional timezone information.
This PR was squashed before being merged into the 4.2-dev branch (closes#28669).
Discussion
----------
[Serializer] Object class resolver
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When normalizing an object, it could be useful to use a custom method to resolve the class name of it instead of using `get_class`.
For instance, Doctrine is using proxy classes for lazy-loading and we usually want the real class and not the proxied one.
That's why we are using this trait in API Platform: https://github.com/api-platform/core/blob/master/src/Util/ClassInfoTrait.php
With this feature, we could solve an issue in API Platform with the JSON-LD normalizer when the eager fetching is disabled.
Commits
-------
18d21439e0 [Serializer] Object class resolver
This PR was squashed before being merged into the 3.4 branch (closes#28604).
Discussion
----------
[Finder] fixed root directory access for ftp/sftp wrapper
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27423
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
This fixes a flaw introduced in 3.4.7 by #26763
In order to access the root folder with ftp wrapper, there MUST BE a slash present.
- Currently: from 3.4.7 on it just ```rtrim``` all seperators (```/```, ```\```) from directories
- Now: IF the directory is a (s)ftp:// wrapper (```#^s?ftp://#```) this fix just adds a slash (```/```) again
Commits
-------
9630a38d67 [Finder] fixed root directory access for ftp/sftp wrapper
This PR was merged into the 3.4 branch.
Discussion
----------
[FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
| 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
-------
41fd0a881e [FWBundle] Throw if PropertyInfo is enabled, but the component isn't installed
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Security] Deprecate simple_preauth and simple_form in favor of Guard
| 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 | n/a
Commits
-------
5093b9fb47 [Security] Deprecate simple_preauth and simple_form in favor of Guard
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] drop "handler." prefix from ContainerHandlerLocator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28621
| License | MIT
| Doc PR | -
I fail to understand what this prefix is for. Looks like boilerplate to me, let's drop it, isn't it?
An alternative to #28621
Commits
-------
6c56e82080 [Messenger] drop "handler." prefix from ContainerHandlerLocator
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Translation] marked getFallbackLocales() as internal
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #28579
| License | MIT
| Doc PR |
Added the deprication trigger error function to getFallbackLocales in the Translation component.
(Its my first PR, please tell me if i need to change something)
Commits
-------
9d67a68816 [Translation] marked getFallbackLocales() as internal
This PR was merged into the 2.8 branch.
Discussion
----------
Remove redundant path check
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | maybe?
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commit 0ec852d79f introduced this new method. As you can see, the code I'm removing always evaluates to `true` thanks to the first `if` statement in this method:
![image](https://user-images.githubusercontent.com/202034/46349212-70968a80-c61f-11e8-8360-7d6abc4d7414.png)
(I'm not sure if redundant code technically counts as a "bug", so I've assumed "yes it does" and targeted 2.8.)
Commits
-------
10795cf096 Remove redundant path check
This PR was squashed before being merged into the 4.2-dev branch (closes#28571).
Discussion
----------
[DependencyInjection] Improve ServiceLocatorTagPass service matching
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26892
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10397
Allows omitting of keys for service locator arguments (it will automatically take over the original definition alias).
Commits
-------
1c1210a3e8 [DependencyInjection] Improve ServiceLocatorTagPass service matching
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Validator] Pre-check constraint validator dependencies
| 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 | #25865
| 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
-------
0544985934 [Validator] Pre-check constraint validator dependencies
This PR was squashed before being merged into the 4.2-dev branch (closes#28661).
Discussion
----------
[Serializer] Add an option to skip null values
| 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
Adds a new option to not serialize `null` values:
```php
$dummy = new class {
public $foo;
public $bar = 'notNull';
};
$normalizer = new ObjectNormalizer();
$result = $normalizer->normalize($dummy, 'json', ['skip_null_values' => true]);
// ['bar' => 'notNull']
```
This feature is the only missing part to add [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) support in [API Platform](https://api-platform.com).
It will also help supporting this RFC in all other projects using the Symfony Serializer.
Commits
-------
d3c5055f7b [Serializer] Add an option to skip null values
* 4.1: (21 commits)
[php_cs] disable fopen_flags
[DI] fix error in dumped container
[CS] Remove unused variables passed to closures
[DI] fix dumping setters before their inlined instances
[CS] Remove empty comment
[CS] Enforces null type hint on last position in phpDocs
[CS] Use combined assignment operators when possible
Fix a typo in error messages
Don't return early as this bypasses the auto exit feature
[Console] Add missing null to input values allowed types
[PHPUnitBridge] Fix microtime() format
bumped Symfony version to 4.1.6
updated VERSION for 4.1.5
updated CHANGELOG for 4.1.5
bumped Symfony version to 3.4.17
updated VERSION for 3.4.16
updated CHANGELOG for 3.4.16
bumped Symfony version to 2.8.47
update CONTRIBUTORS for 2.8.46
updated VERSION for 2.8.46
...
* 3.4:
[php_cs] disable fopen_flags
[DI] fix error in dumped container
[CS] Remove unused variables passed to closures
[DI] fix dumping setters before their inlined instances
[CS] Remove empty comment
[CS] Enforces null type hint on last position in phpDocs
[CS] Use combined assignment operators when possible
Fix a typo in error messages
Don't return early as this bypasses the auto exit feature
[Console] Add missing null to input values allowed types
[PHPUnitBridge] Fix microtime() format
bumped Symfony version to 3.4.17
updated VERSION for 3.4.16
updated CHANGELOG for 3.4.16
bumped Symfony version to 2.8.47
update CONTRIBUTORS for 2.8.46
updated VERSION for 2.8.46
updated CHANGELOG for 2.8.46
* 2.8:
[php_cs] disable fopen_flags
[CS] Remove unused variables passed to closures
[CS] Remove empty comment
[CS] Enforces null type hint on last position in phpDocs
[CS] Use combined assignment operators when possible
Fix a typo in error messages
[Console] Add missing null to input values allowed types
[PHPUnitBridge] Fix microtime() format
bumped Symfony version to 2.8.47
update CONTRIBUTORS for 2.8.46
updated VERSION for 2.8.46
updated CHANGELOG for 2.8.46
This PR was merged into the 2.8 branch.
Discussion
----------
[PHPUnitBridge] Fix ClockMock microtime() format
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- 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? | yes/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 | <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!-- required for new features -->
This is a follow-up PR to #27890 to fix the `microtime` precision, it should be 8 decimals instead of the current 6 (see https://3v4l.org/GYacF)
The problem now is that due to the new tests the whole testsuite will fail if run from the main directory, as hhvm and 5.4 targets are doing, due to phpunit using the wrong `ClockMock` class. Tests for 7.1 and 7.2 pass because they `cd` into the component directory.
Commits
-------
e3732b63c6 [PHPUnitBridge] Fix microtime() format
This PR was merged into the 2.8 branch.
Discussion
----------
[CS] Enforces null type hint on last position in phpDocs
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | - <!-- required for new features -->
As a majority in our codebase, the `null` typehint usually comes in the last position in phpDocs.
Commits
-------
efbba25577 [CS] Enforces null type hint on last position in phpDocs
This PR was merged into the 2.8 branch.
Discussion
----------
[CS] Use combined assignment operators when possible
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | - <!-- required for new features -->
Less opcodes for us 😄
Commits
-------
c561e99394 [CS] Use combined assignment operators when possible
This PR was merged into the 2.8 branch.
Discussion
----------
[CS] Remove empty comment
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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 | - <!-- required for new features -->
Commits
-------
3bfd877e16 [CS] Remove empty comment
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] fix error in dumped container
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28658
| License | MIT
| Doc PR | -
(test case on its way)
Commits
-------
2d0aba6ff8 [DI] fix error in dumped container
This PR was squashed before being merged into the 4.1 branch (closes#28636).
Discussion
----------
[HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #28627
| License | MIT
| Doc PR |
The `X-Accel-Mapping` header does not use the standard HTTP key=value syntax, so using `HeaderUtils::combine()` breaks paths with upper-case letters.
There is no good reason to use `HeaderUtils::combine()` in this case, so simply skip it.
Commits
-------
09343c27d7 [HttpFoundation] X-Accel-Mapping does not use HTTP key=value syntax
* 4.1:
[Console] simplified code
removed useless phpdoc
improve docblocks around group sequences
[Cache] prevent getting older entries when the version key is evicted
[WebProfilerBundle] added a note in the README
[Yaml] Skip parser test with root user
[Filesystem] Skip tests on readable file when run with root user
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
[HttpFoundation][Security] forward locale and format to subrequests
[Console] Send the right exit code to console.terminate listeners
[HttpFoundation] fix hidding warnings from session handlers
Caching missed templates on cache warmup
* 3.4:
[Console] simplified code
removed useless phpdoc
improve docblocks around group sequences
[Cache] prevent getting older entries when the version key is evicted
[WebProfilerBundle] added a note in the README
[Yaml] Skip parser test with root user
[Filesystem] Skip tests on readable file when run with root user
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
[HttpFoundation][Security] forward locale and format to subrequests
[Console] Send the right exit code to console.terminate listeners
[HttpFoundation] fix hidding warnings from session handlers
Caching missed templates on cache warmup
* 2.8:
improve docblocks around group sequences
[WebProfilerBundle] added a note in the README
[Filesystem] Skip tests on readable file when run with root user
[FWBundle] Fix an error in WebTestCase::createClient's PHPDoc
[HttpFoundation][Security] forward locale and format to subrequests
[Console] Send the right exit code to console.terminate listeners
Caching missed templates on cache warmup
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] improve docblocks around group sequences
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26889
| License | MIT
| Doc PR |
Commits
-------
179a081ee3 improve docblocks around group sequences
This PR was merged into the 4.2-dev branch.
Discussion
----------
[BrowserKit] throw exception when request() wasn't called
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | https://github.com/symfony/symfony/pull/27807#issuecomment-420985940
Commits
-------
41cfde19f6 throw exception when request() wasn't called
This PR was merged into the 2.8 branch.
Discussion
----------
[TwigBundle] Fixed caching of templates in src/Resources/<BundleName>/views on cache warmup
| 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 | -
Same as https://github.com/symfony/symfony/pull/27764, but in this case the convention is wrong.
Corrected according to:
992a174470/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php (L165)
Commits
-------
83a75f4313 Caching missed templates on cache warmup
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27730
| License | MIT
| Doc PR | -
Preparing my talk at SymfonyLive London, see you all there :)
This allows wrapping the callback passed to `->get($item, $callback, $beta)` in a callable that should at least return `$callback($item)`, but can do something around the call.
The default wrapper is locking the key to provide lock-based stampede protection.
That was already the case before this PR, but in a much dirtier way at the design level.
Fixes a few issues found meanwhile.
Commits
-------
8cf3625b11 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] support configuring multiple Memcached servers in one DSN
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27855
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/10402
Useful to reconfigure dynamically an array of memcached servers (eg removing a dead one or adding a new one).
DSN format is e.g. `memcached://localhost?host[foo.bar]=3`.
To ease generating the DSN programmatically, it works also with `memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3`.
The key of the "host" parameter is a "host:port" pair, the value is the weight of the "host:port" pair.
Sockets need to be specified with the trailing `:` (as shown in the last example).
Commits
-------
8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation][Security] forward locale and format to subrequests
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28368, #21546
| License | MIT
| Doc PR | -
See discussion in linked issue.
Commits
-------
41eb1914f6 [HttpFoundation][Security] forward locale and format to subrequests
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #26731
| License | MIT
| Doc PR | -
By creating Cookie instances using `null` for the `$secure` argument, this PR allows making cookies inherit their "secure" attribute from the request.
This PR also adds a forward to make $secure=null and samesite=lax the defaults in Symfony 5.0:
- either define all constructor's arguments explicitly
- or use the new `Cookie::create()` factory
Commits
-------
9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
This PR was merged into the 4.2-dev branch.
Discussion
----------
[SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28338
| License | MIT
| Doc PR | -
Let's make it easier to have a good default security level, now for the remember-me cookie.
Commits
-------
6ec223bf6f [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
A blend of features also provided by https://github.com/doctrine/instantiator and https://github.com/Ocramius/GeneratedHydrator in one simple method. Because it's just a few more lines on top of the existing code infrastructure in the component :)
For example, from the docblock:
```php
// creates an empty instance of Foo
Instantiator::instantiate(Foo::class);
// creates a Foo instance and sets one of its public, protected or private properties
Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]);
// creates a Foo instance and sets a private property defined on its parent Bar class
Instantiator::instantiate(Foo::class, [], [
Bar::class => ['privateBarProperty' => $propertyValue],
]);
```
Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
by using the special `"\0"` property name to define their internal value:
```php
// creates an SplObjectHash where $info1 is attached to $obj1, etc.
Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);
// creates an ArrayObject populated with $inputArray
Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray, $optionalFlag]]);
```
Misses some tests for now, but reuses the existing code infrastructure used to "unserialize" objects.
Commits
-------
d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] prevent getting older entries when the version key is evicted
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28445
| License | MIT
| Doc PR | -
As described in linked issue, using a strategy described in
https://github.com/memcached/memcached/wiki/ProgrammingTricks#deleting-by-namespace
Commits
-------
00855895a8 [Cache] prevent getting older entries when the version key is evicted
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] deprecated normalizers and encoders who dont implement the base interfaces
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None
| License | MIT
| Doc PR | None
Currently the `Serializer` can be constructed with any object regardless of whether or not it implements `NormalizerInterface` or `DenormalizerInterface`. This object will then be ignored when getting a normalizer/denormalizer, so in effect silently ignored for serializer operations.
This change throws an exception on construct if a given normalizer object does not implement one of these interfaces - are there use cases where this would not be true?
Commits
-------
cbc2be8ba8 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces
This PR was merged into the 2.8 branch.
Discussion
----------
[WebProfilerBundle] added a note in the README
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
<!--
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
-------
310870a497 [WebProfilerBundle] added a note in the README
This PR was merged into the 4.2-dev branch.
Discussion
----------
Make it clear that the profiler is for dev only
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | kinda yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes (permanent one)
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | symfony/symfony-docs#10386
Commits
-------
54fda55fd9 made it clear that the profiler is for dev only
This PR was squashed before being merged into the 3.4 branch (closes#28529).
Discussion
----------
[Yaml] Skip parser test with root user
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28478
| License | MIT
| Doc PR | -
This PR fix a test failure in YAML Component when running from a php docker container.
By defaut, root user is used to run phpunit. It means permission checking will fail (Root user is always allowed to read files)
Commits
-------
34429797b3 [Yaml] Skip parser test with root user
This PR was merged into the 2.8 branch.
Discussion
----------
[Filesystem] Skip tests on readable file when run with root user
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- 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 | #28478 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
This PR fix tests failures in Filesystem Component when running from a php docker container.
By defaut, root user is used to run phpunit. It means permission checking will fail (Root user is always allowed to read files)
Linked to #28529
Commits
-------
ad500e74ec [Filesystem] Skip tests on readable file when run with root user
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DependencyInjection] improved message when alias service is not found
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28413
| License | MIT
| Doc PR |
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:
```yaml
foo: '@App\Foo'
foo:
alias: 'App\Foo'
```
This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:
```yaml
foo:
alias: '@App\Foo'
```
Commits
-------
280ecbc2be improved message when alias service is not found
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Console] Add support for error ouput in the CommandTester
Move initialization of the streams to the trait so the `capture_stderr_separately` also works in the CommandTester.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27422
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Make it possible to test seperate stderr output.
```$tester = new CommandTester($command);
$tester->execute(
array('foo' => 'bar'),
array('capture_stderr_separately' => true)
);
$this->assertEquals('foo', $tester->getErrorOutput());
````
Commits
-------
cec5317 [Console] Add support for error ouput in the CommandTester
This PR was squashed before being merged into the 2.8 branch (closes#28545).
Discussion
----------
[Console] Send the right exit code to console.terminate listeners
| 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 |
When a Console command throws an exception without a status code, `Application::run()` takes care of setting the exit code to `1` when the exception does not provide a code itself.
This happens slightly too late, as `console.terminate` event listeners that are called from within `Application::doRunCommand()` are given the plain exeception code, before this conversion.
The result is that `console.*` event listeners that you might be using to log exit code e. g. for cron jobs will see a `0` code instead of the real value used to terminate the script.
***Todo:***
- [x] Make sure we've got tests covering this, i. e. do not mock out `doRunCommand()`.
Commits
-------
b90a3f1 [Console] Send the right exit code to console.terminate listeners
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:
```yaml
foo: '@App\Foo'
foo:
alias: 'App\Foo'
```
This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:
```yaml
foo:
alias: '@App\Foo'
```
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes (fixing and unreleased issue)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28549
| License | MIT
| Doc PR | -
Introduced in #28411
Just a failing test for now.
Commits
-------
46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Debug] Trigger a deprecation for new parameters not defined in sub classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28316
| License | MIT
| Doc PR | -
I'm not sure the way https://github.com/symfony/symfony/pull/28316 is implemented is the best so here is an alternative.
Instead of counting on a call from the child method, it uses the `DebugClassLoader` and `@param` annotations. If a `@param` annotation is used on a parent but is then not actually implemented in the child class, a deprecation will be thrown.
Example:
```php
class ClassWithAnnotatedParameters
{
/**
* @param string $foo This is a foo parameter.
*/
public function fooMethod(string $foo)
{
}
/**
* @param string $bar parameter not implemented yet
*/
public function barMethod(/** string $bar = null */)
{
}
/**
* @param Quz $quz parameter not implemented yet
*/
public function quzMethod(/** Quz $quz = null */)
{
}
}
```
```php
class SubClassWithAnnotatedParameters extends ClassWithAnnotatedParameters {
public function fooMethod(string $foo) { }
public function barMethod($bar = null) { }
public function quzMethod() { }
}
```
A deprecation will be triggered because ``SubClassWithAnnotatedParameters::quzMethod()`` which doesn't definee `$quz`.
Commits
-------
1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes
* 4.1:
Fix CS
Allow reuse of Session between requests
[MonologBridge] Re-add option option to ignore empty context and extra data
[Lock] remove useless code
[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
Provide debug_backtrace with proper args
[DI] fix infinite loop involving self-references in decorated services
forward false label option to nested types
[DI] fix dumping lazy services
forward the invalid_message option in date types
* 3.4:
Fix CS
Allow reuse of Session between requests
[MonologBridge] Re-add option option to ignore empty context and extra data
[Lock] remove useless code
[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
Provide debug_backtrace with proper args
[DI] fix infinite loop involving self-references in decorated services
forward false label option to nested types
forward the invalid_message option in date types
* 2.8:
Fix CS
Allow reuse of Session between requests
Provide debug_backtrace with proper args
forward false label option to nested types
forward the invalid_message option in date types
This PR was merged into the 4.2-dev branch.
Discussion
----------
Add Zookeeper data store for Lock Component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Not applicable
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10043
This change adds a new feature to the Lock Component to give the capability to store locks in Zookeeper Data Store. The corresponding documentation PR should describe how this works.
The change here also adds a functional test to make sure all the basic functionality of the lock using this data store works.
Requirements for this to work are having a PHP-Zookeeper extension available to use this.
Commits
-------
c72c297dc3 Add new Zookeeper Data Store. Add functional test for Zookeeper Data Store. Modify Store Factory to support initialization of Zookeeper Data Store.
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Allow reuse of Session between requests if ID did not change
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13450
| License | MIT
| Doc PR | -
I stumbled upon the issue from https://github.com/symfony/symfony/issues/13450 in a more simple case than what was exposed in the issue. From my understanding, the problem arises when the session is used between an access to the session and a functional test request: because the session was accessed (usually using the container directly), the session has started and the following request fails.
This PR checks whether the ID was actually regenerated before throwing (if a setId is called with the same ID, it is the same request context, it shouldn't throw IMO).
Not sure I understood everything correctly though, feel free to fix it for me if needed.
Commits
-------
fd30f4a21d Allow reuse of Session between requests
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] Allow dd() to be called without arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
**Description**
A while back the `dd()` helper was [added to the VarDumper component](https://github.com/symfony/symfony/pull/26970) which was (i think) inspired by Laravel's `dd()` helper. Laravel has [removed their version of the helper](https://github.com/laravel/framework/pull/25087) in favor of the helper in Symfony.
However, as opposed to the Laravel helper, the Symfony helper requires at least one argument. Calling the Laravel helper with no arguments simply killed the program (and usually showed a white screen), calling the Symfony helper with no arguments throws a `TypeError: Too few arguments to function dd()` exception (which gets rendered by the error handler and fills the whole screen with useless information).
Being able to call the `dd()` helper with no arguments is useful because it is a quick way to tell you if your code reaches a certain point. If it does, you can fill in the `dd()` with variables to keep debugging.
This PR allows the dd helper to be called without arguments.
This PR also makes the helper call `die` instead of `exit` to better reflect the function name 😄
Commits
-------
a73dfadc18 [VarDumper] Allow dd() to be called without arguments
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Ldap] Add verbose ext-ldap error if present for easier debugging
| Q | A
| ------------- | ---
| Branch? | master (be careful when merging)
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? |
| Fixed tickets | #28149
| License | MIT
| Doc PR |
Added an optional message suffix if ldap_errno is not equals to 0
Commits
-------
761415fc1b Add verbose ext-ldap error if present for easier debugging
This PR was squashed before being merged into the 4.2-dev branch (closes#28521).
Discussion
----------
[Yaml] Added support for multiple files or directories in LintCommand
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28498
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10367
Commits
-------
d0f7950860 [Yaml] Added support for multiple files or directories in LintCommand
This PR was squashed before being merged into the 4.2-dev branch (closes#28522).
Discussion
----------
[Translation] Added support for multiple files or directories in XliffLintCommand
| 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/10368
Same approach of https://github.com/symfony/symfony/pull/28521
Commits
-------
88ec37bed7 [Translation] Added support for multiple files or directories in XliffLintCommand
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Register an identity translator as fallback
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27589
| License | MIT
| Doc PR | -
The same approach as https://github.com/symfony/symfony/pull/24358, suggested by @xabbuh here https://github.com/symfony/symfony/issues/27589#issuecomment-421542776
**Templating Engine Context**
The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
`FrameworkBundle` you need to have the `translator` helper to be available.
This change ensure that there will always be a `translator` helper which
as a fallback will just return the message key if no translator is present.
Commits
-------
5330f2d017 [FrameworkBundle] Register an identity translator as fallback
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Contracts] fine tune composer.json declarations for suggest/provide
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
8a11e76c14 [Contracts] fine tune composer.json declarations for suggest/provide
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] forward false label option to nested types
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28469#discussion_r217880630
| License | MIT
| Doc PR |
This change does not fix any built-in Symfony form themes, but takes
into account the changes made in #28469 to allow third-party form themes
work properly.
Commits
-------
3247cdeea9 forward false label option to nested types
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Validator] Check the BIC country with symfony/intl
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28167
| License | MIT
| Doc PR | N/A
Check the BIC country code against the list from Intl component instead of a simple check alphabetical test.
This PR uses the Intl component which is not part of the required dependencies of the Validator component (https://github.com/symfony/validator/blob/master/composer.json): `symfony/intl` is only required for dev. So I'm making a PR against master because it may break existing code.
But `CountryValidator` does the same so it may not be an issue after all.
Commits
-------
27bd3a8192 [Validator] Check the BIC country with symfony/intl Fix#28167
This PR was squashed before being merged into the 3.4 branch (closes#28471).
Discussion
----------
[MonologBridge] Re-add option option to ignore empty context and extra data
| 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 |
In #11496, an option was added to `ConsoleFormatter` to ignore empty context and extra data. This setting was even turned on by default.
The `ConsoleHandler` was then overhauled in #21705. During this change, the option got lost.
Commits
-------
d1e7438605 [MonologBridge] Re-add option option to ignore empty context and extra data
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] forward the invalid_message option in date types
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5880
| License | MIT
| Doc PR |
Commits
-------
5318e2eb15 forward the invalid_message option in date types
The Form component can be used without the Translation component.
However, to be able to use the default form themes provided by the
FrameworkBundle you need to have the `translator` helper to be
available.
This change ensure that there will always be a `translator` helper which
as a fallback will just return the message key if no translator is
present.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Validator] Allow Validator without the translator component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28210
| License | MIT
| Doc PR | ø
Validator should be available without the Translator service. #28210 introduced a regression, it was not the case anymore:
```
You have requested a non-existent service "translator".
```
This fixes it.
Commits
-------
2dc92d7a4b Allow validator without the translator
This would fail if we were using strict mode with php 7, because true is
only a valid argument for php < 5.3.6.
This was changed from PHP_VERSION_ID >= 50400 ?
DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT : true in
#18272, but I do not understand why it was simplified, nor why
DEBUG_BACKTRACE_IGNORE_ARGS was there at that time.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Ignore backslashes in service ids when using debug:container and debug:autowiring
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28143
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
0aba355d8e [FrameworkBundle] Ignore backslashes in service ids when using `debug:container` and `debug:autowiring`
This change does not fix any built-in Symfony form themes, but takes
into account the changes made in #28469 to allow third-party form themes
work properly.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[PhpUnitBridge] enable DebugClassLoader by default
| 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/issues/10360
With this PR, the phpunit-bridge will enable `DebugClassLoader` by default, making it do its job: throw deprecation notices at autoloading time. On top of #28329, this made me spot some glitches in the code base, fixed here also.
This can be disabled by configuring the listener in `phpunit.xml.dist` files, adding `<element key="debug-class-loader"><integer>0</integer></element>` next to `<element key="time-sensitive">...`.
Commits
-------
2fb11fce28 [PhpUnitBridge] enable DebugClassLoader by default
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] bind "ContainerInterface $parameterBag" arguments to the "parameter_bag" service
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
2c428d130d [FrameworkBundle] bind "ContainerInterface $parameterBag" arguments to the "parameter_bag" service
This PR was squashed before being merged into the 4.2-dev branch (closes#28441).
Discussion
----------
[Messenger] simple refactoring to have a more readable code
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
A simple refactoring to have a more readable code
-->
Commits
-------
5f61a27db5 [Messenger] simple refactoring to have a more readable code
* 4.1:
[TwigBridge] fix lowest version of symfony/form
Think positive
KernelInterface can return null container
[DI] Detect circular references with ChildDefinition parent
[VarDumper] Fix global dump function return value for PHP7
[Ldap] Use shut up operator on connection errors at ldap_start_tls
Implement startTest rather than startTestSuite
[OptionsResolver] remove dead code and useless else
[HttpFoundation] don't override StreamedResponse::setNotModified()
Added relevent links for parsing to the phpdoc
Add stricter checking for valid date time string
Fix symfony/console (optional) dependency for MonologBridge
fix not displaying labels when value is false
[Form] Fix DateTimeType html5 input format
This PR was merged into the 4.1 branch.
Discussion
----------
[Form][TwigBridge] fix not displaying labels when value is false
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28198
| License | MIT
| Doc PR |
Commits
-------
c4a6c9fa00 fix not displaying labels when value is false
* 3.4:
Think positive
KernelInterface can return null container
[DI] Detect circular references with ChildDefinition parent
[VarDumper] Fix global dump function return value for PHP7
[Ldap] Use shut up operator on connection errors at ldap_start_tls
Implement startTest rather than startTestSuite
[OptionsResolver] remove dead code and useless else
[HttpFoundation] don't override StreamedResponse::setNotModified()
Added relevent links for parsing to the phpdoc
Add stricter checking for valid date time string
Fix symfony/console (optional) dependency for MonologBridge
[Form] Fix DateTimeType html5 input format
* 2.8:
KernelInterface can return null container
[Ldap] Use shut up operator on connection errors at ldap_start_tls
[HttpFoundation] don't override StreamedResponse::setNotModified()
Added relevent links for parsing to the phpdoc
Add stricter checking for valid date time string
[Form] Fix DateTimeType html5 input format
This PR was merged into the 3.4 branch.
Discussion
----------
Fix symfony/console (optional) dependency for MonologBridge
| 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 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`.
In order to make this work, the change 749fba54f9 is required which was first released in 2.8.0.
When using MonologBridge ^3.3 with a lower version of symfony/console than 2.8, an `InvalidArgumentException` with the message `Unknown output type given` will be thrown.
Not sure how to add a test for this... 🤷♂️
Commits
-------
d6f5d6bccd Fix symfony/console (optional) dependency for MonologBridge
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Implement startTest rather than startTestSuite
Passing a TestSuite instance to CoverageListenerTrait::testStart() will
have no effect.
| 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 | n/a
| License | MIT
| Doc PR | n/a
Closes#28481
Commits
-------
63671d1633 Implement startTest rather than startTestSuite
This PR was squashed before being merged into the 3.4 branch (closes#28497).
Discussion
----------
[VarDumper] Fix global dump function return value for PHP7
Retarget of PR #28491. Reposting description below, with relevant updates.
| 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 |
In 3.4, the global `dump()` helper function in the VarDumper component was updated to return the arguments passed in to it. However, due to reusing the argument variable in the function, this introduces a bug in PHP7 in the return value of the function.
The variable used in the `foreach` loop overwrites the value passed in by the first argument. In PHP5, this is okay. In PHP7, even though the argument is passed by value, the value returned by `func_get_args()` is affected by changes to the arguments inside the function. This is a change from PHP5.
From the documentation for [`func_get_args()`](http://php.net/manual/en/function.func-get-args.php):
> If the arguments are passed by reference, any changes to the arguments will be reflected in the values returned by this function. As of PHP 7 the current values will also be returned if the arguments are passed by value.
This PR simply changes the name of the variable used in the `foreach` loop. It also adds a test file to test the return value of the global `dump()` function.
This is my first contribution to Symfony, so please let me know if the issue should be resolved in a different manner, or if the test should be modified in any way.
Thanks,
Patrick
Commits
-------
0def211b9b [VarDumper] Fix global dump function return value for PHP7
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] don't override StreamedResponse::setNotModified()
| 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 | -
Alternative implementation to #27937, because `Response::setNotModified()` has been made final in 4.0 so we shouldn't override it.
Commits
-------
9ef7f7038d [HttpFoundation] don't override StreamedResponse::setNotModified()
This PR was merged into the 4.2-dev branch.
Discussion
----------
Trigger deprecation notices when inherited class calls parent method but misses adding new arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This Pull Request concern severals components, the purpose here is to notify in dev mode that in a case of inherit class, a function will have a new or severals arguments in Symfony 5.0, therefore not implement it is deprecated since Symfony 4.2
The function is made by these conditions :
1- ```(func_num_args() < $x)``` where [x] is the number of arguments we will have in Symfony 5.0
this check allow to verify that the arguments are missing
2- ```(__CLASS__ !== \get_class($this))```
this check allow to verify that the name of the class is different than the base class, therefore that we are in the child class
3- ```(__CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName())```
this check allow to verify that the class of the current function is different than the base class, therefore the function has been rewrote into the child class
Code exemple :
```
public function method(/* void $myNewArgument = null */)
{
if ((func_num_args() < 1) && (__CLASS__ !== \get_class($this)) && (__CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName())){
@trigger_error(sprintf('The "%s()" method will have one `void $myNewArgument = null` argument in version 5.0 and higher.Not defining it is deprecated since Symfony 4.2.', __METHOD__ ), E_USER_DEPRECATED);
}
// do something
}
```
The unit test are made by creating a child Class using for the tested function ```return parent::function()``` and by calling this child class and catching the expected depreciation message
Commits
-------
f75fffa997 Trigger deprecation notices when inherited class calls parent method but misses adding new arguments
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] Fix DateTimeType html5 input format
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27233, #27254
| License | MIT
| Doc PR | N/A
Fix DateTimeType' HTML input format according to HTML specs. Currently `DateTimeType` produces html with format `yyyy-MM-dd'T'HH:mm:ssZ` but the HTML5 spec expects `yyyy-MM-dd'T'HH:mm:ss` (i.e. no `Z`). Chrome presents an empty date picker meaning edits or having a default date are broken.
Also the reverseTransform was expect to have a timezone attached, which it does not - and incorrectly marks it as being a UTC time in this case, instead of using the Transformers output TZ.
This is same as @franzwilding https://github.com/symfony/symfony/pull/27254 but with change to just straight use of `DateTime::format` and handling TZ in reverseTransform
Commits
-------
e21a1a4df1 Added relevent links for parsing to the phpdoc
4f06f1524d Add stricter checking for valid date time string
253d0a683b [Form] Fix DateTimeType html5 input format
This PR was squashed before being merged into the 4.2-dev branch (closes#28456).
Discussion
----------
[Cache][Contracts] We must save the item or the trait does not have any effect
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR |
Using the trait must result in that items gets saved.
We could use `saveDeferred` instead, it might be a performance improvement but you also may have side-effects. Say you are using two cache pool objects for the same storage.
Example use of the trait:
```php
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\GetForCacheItemPoolTrait;
class AcmeCache implements CacheInterface
{
use GetForCacheItemPoolTrait;
private $cache;
public function __construct(CacheItemPoolInterface $cache)
{
$this->cache = $cache;
}
public function getItem(string $key): CacheItemInterface
{
return $this->cache->getItem($key);
}
public function save(CacheItemInterface $item): bool
{
return $this->cache->save($item);
}
}
```
Commits
-------
06cd8dca8f [Cache][Contracts] We must save the item or the trait does not have any effect
* 4.1:
[Console] Fix typo in tests
[Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
[Console] fixed corrupt error output for unknown multibyte short option
[Console] fixed PHPDoc for setArgument/setOption in InputInterface
Register the messenger data collector only when the profiler is enabled
[Intl] Blacklist Eurozone and United Nations in Region Data Generator
* 3.4:
[Console] Fix typo in tests
[Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
[Console] fixed corrupt error output for unknown multibyte short option
[Console] fixed PHPDoc for setArgument/setOption in InputInterface
[Intl] Blacklist Eurozone and United Nations in Region Data Generator
* 2.8:
[Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
[Console] fixed corrupt error output for unknown multibyte short option
[Console] fixed PHPDoc for setArgument/setOption in InputInterface
[Intl] Blacklist Eurozone and United Nations in Region Data Generator
Since 278c26f589, `ConsoleHandler` tries to pass a verbosity level into `Output::write()`.
In order to make this work, the change 749fba54f9 is required which was first released in 2.8.0.
When using MonologBridge ^3.3 with a lower version of symfony/console than 2.8, an `InvalidArgumentException` with the message `Unknown output type given` will be thrown.
Not sure how to add a test for this... 🤷♂️ :
This PR was squashed before being merged into the 4.2-dev branch (closes#28373).
Discussion
----------
[Console] Support max column width in Table
| 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 | #22156, #27832
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/10300
Continuation of #22225 to better preserve spaces (which preserves background colors), using `wordwrap` it caused some issues.
Also the wrapping was plain wrong by not taking the current line length into account.
While at it, it comes with `Table` integration :)
Given
```php
$table = new Table($output);
$table->setColumnMaxWidth(0, 2);
$table->setRow(0, ['pre <error>foo bar baz</error> post']);
$table->render();
$table = new Table($output);
$table->setColumnMaxWidth(0, 3);
$table->setRow(0, ['pre <error>foo bar baz</error> post']);
$table->render();
$table = new Table($output);
$table->setColumnMaxWidth(0, 4);
$table->setRow(0, ['pre <error>foo bar baz</error> post']);
$table->render();
```
![image](https://user-images.githubusercontent.com/1047696/45101516-f19b5880-b12b-11e8-825f-6a1d84f68f47.png)
Commits
-------
175f68f [Console] Support max column width in Table
This PR was merged into the 4.2-dev branch.
Discussion
----------
Remove all usages of call_user_func_array()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Because it's cleaner :) (and it saves creating one extra dummy array)
Commits
-------
b2718d7666 Remove all usages of call_user_func_array()
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Document what is validated before and after Command::initialize()
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26611
| License | MIT
| Doc PR | n/a
Commits
-------
b1aff99 [Console] Correct Command::initialize() and InputInterface::bind() phpdoc regarding thrown exceptions
This PR was merged into the 2.8 branch.
Discussion
----------
[Intl] Blacklist Eurozone and United Nations in Region Data Generator
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28260
| License | MIT
| Doc PR | -
Commits
-------
e2e4049721 [Intl] Blacklist Eurozone and United Nations in Region Data Generator
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] throw component-specific exceptions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This makes "serializing/unserializing" with the component diverge a bit from native serialize/unserialize (wich can throw plain "Exception" instances), but I think we should still do it.
Commits
-------
2c444927bc [VarExporter] throw component-specific exceptions
This PR was squashed before being merged into the 2.8 branch (closes#28393).
Discussion
----------
[Console] fixed corrupt error output for unknown multibyte short option
| Q | A
| ------------- | ---
| Branch? | 2.8 <!-- 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 | #28320 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
[Console] Fixed#28320 by using mb_substr instead of index access
<!--
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
-------
0f86156 [Console] fixed corrupt error output for unknown multibyte short option
This PR was squashed before being merged into the 2.8 branch (closes#28374).
Discussion
----------
[Console] fixed PHPDoc for setArgument/setOption in InputInterface
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28354
| License | MIT
| Doc PR |
Methods now accept a value of any type except objects not implementing __toString().
**Example use case:** when using array arguments/options I can't set them programmatically without getting errors about type mismatch (from the IDE). With this patch it now works as expected.
Commits
-------
61529f3cd7 [Console] fixed PHPDoc for setArgument/setOption in InputInterface
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Change AmqpExt classes constructor signature
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| 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
This pull requests does 2 things:
* It makes `Connection` a first argument of AmqpExt classes. I think it makes sense as this is the most important argument for those classes.
* As the `Serializer` is now a second argument, I propose to make it optional and use the default serializer that we've added recently if `null` (`Serializer::create()`)
It makes the component even more user friendly when not using Symfony full stack (and provide good defaults).
Commits
-------
2d55ae5212 [Messenger] changed AmqpExt classes constructor signature
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Uses a messenger serializer, not an individual encoder/decoder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | Will come
Makes the component-based even simpler.
**Before**
```php
$encoderDecoder = Serializer::create();
$middleware = [new SendMessageMiddleware(new SenderLocator([
Message::class => new AmqpTransport($encoderDecoder, $encoderDecoder, $connection),
]))];
```
**After**
```php
$middleware = [new SendMessageMiddleware(new SenderLocator([
Message::class => new AmqpTransport(Serializer::create(), $connection),
]))];
```
Commits
-------
5b93f5f45e Uses a messenger serializer, not an individual encoder/decoder
This PR was merged into the 4.2-dev branch.
Discussion
----------
[WebServerBundle] Add support for Xdebug's Profiler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
> Xdebug's Profiler is a powerful tool that gives you the ability to analyze your PHP code and determine bottlenecks or generally see which parts of your code are slow and could use a speed boost.
https://xdebug.org/docs/profiler
When we run/start the web server, it would be useful to enable the trigger for the Xdebug's Profiler. That means we could easily trigger the creation of a Xdebug profile and analysing it [thanks to PhpStorm](https://www.jetbrains.com/help/phpstorm/analyzing-xdebug-profiling-data.html) which provides an **Execution Statistics** panel (examine the summary information about execution metrics of every called function) and a **Call Tree** panel (explore the execution paths of all called functions). You can see these two panels in action [here](https://youtu.be/_ua_O01IICg?t=1m22s) for a better understanding.
Commits
-------
0f4c0a6eaf Add support for Xdebug Profiler
This PR was merged into the 3.4 branch.
Discussion
----------
[Controller][ServiceValueResolver] Making method access case insensitive
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28254
| License | MIT
| Doc PR | -
Fix#28254 by making the method access insensitive in `ServiceValueResolver`.
Commits
-------
cc6f82769b [Controller][ServiceValueResolver] Making method access case insensitive
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26885
| License | MIT
| Doc PR | n/a
There is an inconsistency between `SymfonyStyle::askQuestion(new ChoiceQuestion(...))` and `SymfonyStyle::choice(...)`, the former does not support to have a choice value as default instead of a choice key while the latter handles both.
This is causing an `undefined index` notice breaking interactive command testing, fixed here.
Commits
-------
c51dda0 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
* 4.1:
[DI] configure inlined services before injecting them when dumping the container
Consistently throw exceptions on a single line
fix fopen calls
Update .editorconfig
* 3.4:
[DI] configure inlined services before injecting them when dumping the container
Consistently throw exceptions on a single line
fix fopen calls
Update .editorconfig
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add a SenderLocator decoupled from ContainerInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | upcoming
For handler locators, we have a generic `HandlerLocator` class that takes a simple mapping instead of a service locator. The same did not exist for sender locators. So, this PR adds this possibility as well. That allows for something like this:
```php
new MessageBus([
new SendMessageMiddleware(new SenderLocator([
Message::class => new AmqpTransport($encoderDecoder, $encoderDecoder, $connection),
])),
new HandleMessageMiddleware(new HandlerLocator([
Message::class => new MessageHandler(),
])),
]);
```
Commits
-------
e658e155aa [Messenger] added a SenderLocator decoupled from ContainerInterface
This PR was merged into the 4.2-dev branch.
Discussion
----------
[TwigBundle] Using Twig template name syntax in form_theme example
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Minor tweak to remove the `symfony/templating` syntax.
Commits
-------
ce653f274b Using Twig template name syntax in form_theme example
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger][Profiler] Trace middleware execution
| 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 #27262 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This is a start for #27262 with:
- traceable Messenger middlewares
- ~~a dedicated category for http kernel controller args resolvers~~ => See #28387
<img width="1071" alt="screenshot 2018-05-20 a 12 23 55" src="https://user-images.githubusercontent.com/2211145/40278071-98c04924-5c2a-11e8-9770-d78ac62d2c16.PNG">
Messenger middleware are traced, with bus info (if not shared accros buses):
<img width="1069" alt="screenshot 2018-05-20 a 12 28 15" src="https://user-images.githubusercontent.com/2211145/40278073-9e6979f4-5c2a-11e8-9657-ee3aa057a5be.PNG">
Another possibility is to use the middleware id instead of the class (with or without extra bus info?):
<img width="1074" alt="screenshot 2018-05-20 a 12 32 24" src="https://user-images.githubusercontent.com/2211145/40278074-9e85f43a-5c2a-11e8-9f13-ad41de342079.PNG">
(_of course, collected times are faked here using `usleep` in the traceable middleware_)
Commits
-------
e974f67b1f [Messenger][Profiler] Trace middleware execution
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Change exceptions to use component's one
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Commits
-------
4e0e5e5fdb [Messenger] changed exceptions to use component's one
This PR was merged into the 4.2-dev branch.
Discussion
----------
[HttpKernel][Profiler] Add arg value resolver category in performances panel
| 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 #27262 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Extracted from https://github.com/symfony/symfony/pull/27321
<img width="1071" alt="screenshot 2018-05-20 a 12 23 55" src="https://user-images.githubusercontent.com/2211145/40278071-98c04924-5c2a-11e8-9770-d78ac62d2c16.PNG">
Commits
-------
b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel
* 4.1:
[appveyor] fix
[DI] Fix dumping some complex service graphs
Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
Fixed caching of templates in default path on cache warmup
added missing LICENSE file
remove cache warmers when Twig cache is disabled
[Workflow] Make sure we do not run the next transition on an updated state
change baseUrl to basePath to fix wrong profiler url
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
chore: rename Appveyor filename
Fixed the interface description of the url generator interface
Format file size in validation message according to binaryFormat option
* 3.4:
[appveyor] fix
Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
Fixed caching of templates in default path on cache warmup
remove cache warmers when Twig cache is disabled
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
chore: rename Appveyor filename
Fixed the interface description of the url generator interface
Format file size in validation message according to binaryFormat option
* 2.8:
[appveyor] fix
Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
remove cache warmers when Twig cache is disabled
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
chore: rename Appveyor filename
Fixed the interface description of the url generator interface
Format file size in validation message according to binaryFormat option
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Forward Container::reset() to services implementing ResetInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | not really
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Should help the garbage collector during tests.
Commits
-------
5d26ba1fd6 [DI] Forward Container::reset() to services implementing ResetInterface
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Dotenv] use array instead of variadic in Dotenv::doLoad()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
According to comments done after merge in #26859.
Commits
-------
f3af2421f4 [Dotenv] use array instead of variadic in Dotenv::doLoad()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] leverage Contracts\Service
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Embedding #28206 for now.
This deprecates some generic interfaces from the DI component in favor of the similar ones proposed for `Contracts\Service`.
Commits
-------
87392ab30d [DI] leverage Contracts\Service
This PR was squashed before being merged into the 4.2-dev branch (closes#22225).
Discussion
----------
[Console] Support formatted text cutting
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
allows cutting a formatted text to a certain width. Actually needed if we want to support max. column widths in tables (see #22156)
```php
$text = 'pre <error>foo bar baz</error> post';
dump('BEFORE');
$output->writeln(wordwrap($output->getFormatter()->format($text), 3, "\n", true), OutputInterface::OUTPUT_RAW);
dump('AFTER');
$output->writeln($output->getFormatter()->format($text, 3), OutputInterface::OUTPUT_RAW);
```
![image](https://cloud.githubusercontent.com/assets/1047696/24519346/19c9b0ca-1585-11e7-8437-0bcfb6fab63e.png)
Commits
-------
09f8ad9 [Console] Support formatted text cutting
This PR was merged into the 2.8 branch.
Discussion
----------
[FileValidator] Format file size in validation message according to binaryFormat option
| Q | A
| ------------- | ---
| Branch? | 2.8 up to master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27682
| License | MIT
| Doc PR |
The binaryFormat option of the constraint is not taken into account if the maxsize limit is defined by the php configuration files.
This patch correct this inconsistent behavior.
If the binaryOption is not set, the unit of measurement used remains in binary because it’s the unit used in php configuration files.
Commits
-------
0edbbd3fea Format file size in validation message according to binaryFormat option
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Contracts] Add traits+interfaces from the DI component
| 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 `Service\ServiceSubscriberInterface` to declare the dependencies of a class that consumes a service locator
* added `Service\ServiceSubscriberTrait` to implement `Service\ServiceSubscriberInterface` using methods' return types
* added `Service\ServiceLocatorTrait` to help implement PSR-11 service locators
Commits
-------
675abdcfee [Contracts] Add traits+interfaces from the DI component
This PR was merged into the 4.2-dev branch.
Discussion
----------
Mark ExceptionInterfaces throwable #2
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This has been reverted in beta of 4.1 because of lack of support in prophecy, which has been fixed since then (incl. release). Can be merged again.
References:
https://github.com/symfony/symfony/pull/26702https://github.com/symfony/symfony/pull/27420https://github.com/symfony/symfony/issues/27419https://github.com/phpspec/prophecy/pull/412
ping @dunglas @ciaranmcnulty @dkarlovi @Wirone @teohhanhui @stof @nicolas-grekas @ondrejmirtes
Commits
-------
17c3675226 Mark ExceptionInterfaces throwable
This PR was merged into the 4.2-dev branch.
Discussion
----------
[LOCK] Add a PdoStore
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25400
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9875
This is an alternative to #25578
Commits
-------
46fe1b0712 Add a PdoStore in lock
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Dotenv] add a flag to allow env vars override
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26846
| License | MIT
| Doc PR | symfony/symfony-docs#9568
I choose to use a new parameter in the constructor instead of `populate()` to not add boilerplate code to them who want allow overriding in their current setup. It's just a parameter to add in `Dotenv` creation instead of change or customize the loading of different .env files.
I targeted 4.1 despite the feature freeze because it's a small change but if you don't agree I can change to 4.2.
~~If you accept this PR I will do the doc PR then.~~
doc ready
Commits
-------
228b220495 [Dotenv] add Dotenv::overload() to allow env vars override
This PR was squashed before being merged into the 4.2-dev branch (closes#26997).
Discussion
----------
[PropertyInfo] Add an extractor to guess if a property is initializable
| 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 | n/a <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo
When dealing with value objects, being able to detect if a property can be initialized using the constructor is a very valuable information. It's mandatory to add a proper value object support in API Platform and in the Serializer component.
See api-platform/core#1749 and api-platform/core#1843 for the related discussions, extended use cases and proof of concepts.
This PR adds a new interface to guess if a property can be initialized through the constructor, and an implementation using the reflection (in `ReflectionExtractor`).
Commits
-------
9d2ab9e348 [PropertyInfo] Add an extractor to guess if a property is initializable
This PR was merged into the 4.1 branch.
Discussion
----------
Add missing LICENSE file
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 | #28353
| 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
-------
6484ef8258 added missing LICENSE file
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Allow user to specify folder for flock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| License | MIT
| Doc PR |
In case multiple applications running on same server allow user to specify folder for flock
example:
```
framework:
lock:` 'flock://var/flock' # var/flock will be provided as path to flock constructor
lock: 'flock:///var/flock' # /var/flock will be provided as path to flock constructor
lock: flock # works as usual, null is provided to constructor and system temp folder is used
```
Commits
-------
244d762400 added ability to specify folder for flock
This PR was squashed before being merged into the 4.2-dev branch (closes#25125).
Discussion
----------
[VarDumper] New env var to select the dump format
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
This PR introduces a new environment variable that can be used to force `dump()` to generate HTML even in CLI, or CLI even in a web context.
It allows to dump large objects when debugging a command, to open the resulting HTML in a browser, and to benefit of the nice JS UI (folded by default, search engine...).
Example usage:
VAR_DUMPER_FORMAT=html vendor/bin/behat > tmp.html; open -a firefox tmp.html
VAR_DUMPER_FORMAT=cli vendor/bin/behat > tmp.txt
Commits
-------
536125ac3c [VarDumper] New env var to select the dump format
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] add class description to debug:container command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Our developer finds it useful when the `console debug:container <service>` command print out the class description.
![bildschirmfoto vom 2018-08-02 14-22-17](https://user-images.githubusercontent.com/200904/43583449-d4bf74e4-965f-11e8-8e88-0db8017c5a90.png)
* [x] json
* [x] txt
* [x] xml
* [x] md
Commits
-------
5fc6155225 [FrameworkBundle] add class description to debug:container command
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Uses Symfony Serializer by default for envelope items
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28164
| License | MIT
| Doc PR | ø
The original approach was to use `serialize`/`unserialize` for envelope items. It turns out it has limitations (see #28247) and reduces the compatibility with 3rd party systems (see #28164). This pull-request changes the existing mechanism by using Symfony Serializer by default.
It keeps the `serialize`/`unserialize` mechanism to allow users of the experimental component to keep using it in 4.2 and allow to have a non-disruptive upgrade to 4.2.
Commits
-------
9b575ab263 Uses Symfony Serializer by default for envelope items
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] [Command] TranslationUpdate change default output to xlf
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | Not applicable
| License | MIT
| Doc PR | Not applicable
Simple modification on the default output for the translation: update command to XLIFF (xlf)
It's to be in agreement with the documentation
![image](https://user-images.githubusercontent.com/2004449/42637935-a91dcabc-85ec-11e8-86db-9c8bea5e710b.png)
Link to the documentation :
https://symfony.com/doc/master/translation.html#translation-resource-file-names-and-locations
Commits
-------
137593ec80 [FrameworkBundle] Cmd TranslationUpdate change default output to xlf
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Process] Add relative path support for PHP_BINARY env var of PhpExecutableFinder
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
At the moment, only the absolute path for PHP_BINARY env var works, for instance :
```
$ PHP_BINARY=/usr/bin/php7.2 php bin/console server:run
[OK] Server listening on http://127.0.0.1:8000
$ PHP_BINARY=php7.2 php bin/console server:run
[ERROR] Unable to find the PHP binary.
```
This PR makes possible the second command.
Commits
-------
52ed9889af Add relative path support for PHP_BINARY env var of PhpExecutableFinder
This PR was squashed before being merged into the 4.1 branch (closes#28322).
Discussion
----------
[Workflow] Make sure we do not run the next transition on an updated state
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR |
When you have a workflow like this, where all transitions are named the same.
![php](https://user-images.githubusercontent.com/1275206/44908106-87914680-ad1a-11e8-9c6f-e58de4b255e8.png)
The current behavior on `$stateMachine->apply($object, 'next')` is that it will go to "done".
It will do this because it checks the current "froms" at each iteration in the loop in `apply()`. It should check the valid transition before it actually apply them.
Commits
-------
d9dda76d8a [Workflow] Make sure we do not run the next transition on an updated state
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28125
| License | MIT
| Doc PR | -
Commits
-------
255455430a [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Let's separate the useful interfaces of the Cache component in Contracts.
This does not include `PruneableInterface`, `MarshallerInterface` nor `*AdapterInterface` because they are too specific to the component.
But `CacheInterface`, `TawAwareCacheInterface` and `ItemInterface` form a nice consistent set of features on top of PSR-6.
Updating the Cache component to use these interfaces will be done in a separate PR so that we can focus on the contract itself here.
Commits
-------
ca6478bbbb [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Translation] Added intl message formatter.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | replaces #20007
| License | MIT
| Doc PR |
This PR will replace #20007 and continue the work from the original author.
I've have tried to address all comments made in the original PR.
Commits
-------
2a90931e52 cs
fb30c77659 Be more specific with what exception we catch
b1aa0047fd Only use the default translator if intl extension is loaded
f88153fa22 Updates according to feedback
597a15d7f7 Use FallbackFormatter instead of support for multiple formatters
2aa7181e15 Fixes according to feedback
a325a443ed Allow config for different domain specific formatters
b43fe21997 Add support for multiple formatters
c2b3dc0a90 [Translation] Added intl message formatter.
19e8e69979 use error
940d440e87 Make it a warning
This PR was squashed before being merged into the 4.2-dev branch (closes#28315).
Discussion
----------
[DI] Trigger exception when using '@id' name in parent option
Same exception [already triggered](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php#L505) on the `decorates` option.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Note sure if I should submit this change for master or previous branches...
Commits
-------
1f67db626e [DI] Trigger exception when using '@id' name in parent option
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] optimize dumped code in time and space
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Let's squeeze some more µs when running exported code.
On a simple case run 100k times with a few objects, I go from 1.8s to 1.5s.
The generated exports are also a bit smaller if it matters.
This works by:
- using local variables instead of manually dealing with a stack
- creating more optimized object hydrators for internal classes
This PR also fixes handling of hard references that are bound to external variables.
Commits
-------
07e90d71d8 [VarExporter] optimize dumped code in time and space
This PR was merged into the 4.1 branch.
Discussion
----------
Fix usage of setUp in tests (4.1)
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 -->
| License | MIT
<!--
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
-------
d8ba2cd703 fixed usage of setUp in tests
This PR was merged into the 3.4 branch.
Discussion
----------
Fix usage of setUp in tests (3.4)
| 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 -->
| License | MIT
<!--
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
-------
298782841c fixed usage of setUp in tests
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Don't populate fallback cache on warmup
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Since we populate the front PhpArrayCache, there is no need to also populate its fallback pool, since it will never be hit for the warmed up values.
This saves creating a myriad of small cache files and some MB.
Commits
-------
c857ba5ded [FrameworkBundle] Don't populate fallback cache on warmup
* 4.1:
Use the real image URL for the filesystem tests
[Finder] Update PHPdoc append()
[DI] Fix phpdoc
Fix code examples in PHPDoc
[HttpKernel] Fix inheritdocs
bumped Symfony version to 3.4.16
updated VERSION for 3.4.15
updated CHANGELOG for 3.4.15
* 3.4:
Use the real image URL for the filesystem tests
[Finder] Update PHPdoc append()
[DI] Fix phpdoc
Fix code examples in PHPDoc
[HttpKernel] Fix inheritdocs
bumped Symfony version to 3.4.16
updated VERSION for 3.4.15
updated CHANGELOG for 3.4.15
* 2.8:
Use the real image URL for the filesystem tests
[Finder] Update PHPdoc append()
[DI] Fix phpdoc
Fix code examples in PHPDoc
[HttpKernel] Fix inheritdocs
* 4.1:
Move commands-specifics to a compiler pass in FWB
bumped Symfony version to 4.1.5
updated VERSION for 4.1.4
updated CHANGELOG for 4.1.4
[travis] disable symfony/flex during phpunit install
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarDumper] make RedisCaster handle RedisCluster and dump all options on all drivers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
e.g.
<img src="https://user-images.githubusercontent.com/243674/44622234-0e769700-a8b5-11e8-8235-f42dadcd2092.png" width="300"/>
Commits
-------
466d1ab328 [VarDumper] make RedisCaster handle RedisCluster and dump all options on all drivers
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] improve perf when using RedisCluster by reducing roundtrips to the servers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Improves perf when using RedisCluster by:
- disabling versioning and replacing by per-master clear/flush
- grouping multiple "get" in one "mget"
- enabling pipelining in PredisCluster mode
~Might need adjustment depending on the answer to https://github.com/nrk/predis/issues/520~
Commits
-------
5155f48029 [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Add support for ignoring comments while XML encoding
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
In addition to https://github.com/symfony/symfony/pull/27926 which allowed to ignore XML processing instructions, this PR allows to ignore the XML comments while encoding.
Commits
-------
8f8230ac3a Add support for ignoring comments while XML encoding
This PR was merged into the 2.8 branch.
Discussion
----------
Fix code examples in PHPDoc
| 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 properly indents the code examples in PHPDoc for a clean render.
Commits
-------
1afb043dc5 Fix code examples in PHPDoc
This PR was squashed before being merged into the 2.8 branch (closes#28310).
Discussion
----------
[Finder] Update PHPdoc append()
| Q | A
| ------------- | ---
| Branch? | 2.8
| 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
-------
111d9bc6f5 [Finder] Update PHPdoc append()
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Remove the "obscure" message subscriber configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
As described in #28275, all of the configuration can be done using yield and that we could remove the support for other ways (especially the obscure return `[['method', -10]]` syntax) as I believe this would clarify the configuration a lot.
Commits
-------
cf2ad861f5 Remove the "obscure" message subscriber configuration
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Allow interfaces to be type-hinted as well
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27076
| License | MIT
| Doc PR | ø
Interfaces can be type-hinted as well for the message handlers.
Commits
-------
2dbbfbda4e Allow interfaces to be type-hinted as well
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Add a --bus option to the messenger:consume-messages command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
Making it compatible with the multi-bus feature.
Commits
-------
e3f1eecbc1 Bus argument is a required option when multiple buses are defined
539cb62ffe [Messenger] Add a --bus option to the messenger:consume-messages command
Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Only subscribe to a given bus from the MessageSubscriber
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | ø
#27275 introduced the ability to listen to only a few buses from the handler tag. This adds that ability directly from the message subscriber.
It has also highlighted to me that most of the configuration can be done using `yield` (like the example I've added in this PR's tests) and that we could remove the support for other ways (especially the obscure `return [['method', -10]]` syntax) but I believe this should be done **in another pull-request** (that I'm happy to do after this one).
Commits
-------
f60e409011 Only subscribe to a given bus from the MessageSubscriber
This PR was squashed before being merged into the 4.2-dev branch (closes#28070).
Discussion
----------
[Translator] Use ICU parent locales as fallback locales
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12319
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10122
Currently the `Translator` fall backs based on the locale separator (eg `es_AR` to `es`), but the ICU data contains parent locales (eg `es_AR` is a child of `es_419`, as is `es_BO`, `es_EC` etc).
This makes use of the ICU data to add add in these fallbacks. This means the specific locales can be used, but the translations can stored in these groupings (eg `es_419` for Latin American Spanish), as well as adding other sensible fallbacks (eg Cape Verdean Portuguese to `pt_PT`).
Commits
-------
e0f402fc29 [Translator] Use ICU parent locales as fallback locales
* 4.1:
bumped Symfony version to 2.8.46
updated VERSION for 2.8.45
update CONTRIBUTORS for 2.8.45
updated CHANGELOG for 2.8.45
[PhpUnitBridge] keep compat with composer 1.0
Instantiate $offset and $maxlen at definition
[Cache] minor code update to leverage PHP 7.1
* 3.4:
bumped Symfony version to 2.8.46
updated VERSION for 2.8.45
update CONTRIBUTORS for 2.8.45
updated CHANGELOG for 2.8.45
[PhpUnitBridge] keep compat with composer 1.0
Instantiate $offset and $maxlen at definition
* 2.8:
bumped Symfony version to 2.8.46
updated VERSION for 2.8.45
update CONTRIBUTORS for 2.8.45
updated CHANGELOG for 2.8.45
Instantiate $offset and $maxlen at definition
This PR was merged into the 4.2-dev branch.
Discussion
----------
[VarExporter] a new component to serialize values to plain PHP code
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR proposes moving what is currently the `PhpMarshaller` class in the Cache component to a separate component.
This component would provide only one public static method:
`VarExporter::export($value, bool &$isStaticValue = null): string`.
This method returns `$value` serialized as plain PHP code. Running this code creates the same exact data structure that `$value` contained. This is exactly like `serialize()` and `unserialize()`, from which all semantics are preserved (`__sleep`, `__wakeup` and `Serializable`).
The reason to use this method *vs* `serialize()` or even igbinary is performance: thanks to OPcache, the resulting code is significantly faster and more memory efficient than using `unserialize()` or `igbinary_unserialize()`.
Unlike `var_export()`, this works on any serializable PHP value.
It also provides a few improvements over `var_export()`/`serialize()`:
- the output is PSR-2 compatible
- the output can be re-indented without messing up with any `\r` or `\n` in the data
- missing classes throw a `ReflectionException` instead of being unserialized to a `PHP_Incomplete_Class` object
- references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` instances are preserved
- `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes throw an exception when being serialized (their unserialized version is broken anyway, see https://bugs.php.net/76737.)
Commits
-------
7831ad75e5 [VarExporter] a new component to serialize values to plain PHP code
This PR was merged into the 4.2-dev branch.
Discussion
----------
[FrameworkBundle] Added new "auto" mode for `framework.session.cookie_secure` to turn it on when https is used
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I'm pretty sure we're many forgetting to make session cookies "secure".
Here is an "auto" mode that makes them secure automatically when the session is started on requests with the "https" scheme.
Commits
-------
4f7b41a83d [FrameworkBundle] Added new "auto" mode for `framework.session.cookie_secure` to turn it on when https is used
This PR was merged into the 2.8 branch.
Discussion
----------
[HttpFoundation] Fix unprepared BinaryFileResponse sends empty file
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes, with the exception of preexisting, unrelated failures
| Fixed tickets | #28237
| License | MIT
| Doc PR |
When you call `BinaryFileResponse#sendContent()` without first calling `prepare()` the response is sent but the contents are empty. `prepare()` properly initializes the `$maxlen` and `$offset` properties. However, `sendContent()` doesn't do any sanity checking, and so, uses the uninitialized properties. This causes `stream_copy_to_stream()` to copy empty contents and the file that is sent, to contain nothing.
This change initializes the properties at definition instead of in `prepare()`.
> Additionally:
> - Bug fixes must be submitted against the lowest branch where they apply
~I'm not sure how early this bug exists, or how far back to go. I'll check to see if 2.7 and 2.8 are affected and report back.~
Commits
-------
dba8687a5d Instantiate $offset and $maxlen at definition
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Update changelog about the new $encoderIgnoredNodeTypes arg in XmlEncoder contrustor
| 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/27926
| License | MIT
| Doc PR | /
Commits
-------
49f3bfc823 Update changelog
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Messenger] Don't make EnvelopeItemInterface extend Serializable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | yes (on experimental API)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`Serializable` is a broken interface, see e.g. https://externals.io/message/98834
I don't think we should force ppl to implement it anywhere.
Actually, it isn't required to be able to serialize an object, and it doesn't enforce making a class serializable (as the `serialize()` method can throw).
What was the purpose of the removed logic? ping @sroze @ogizanagi
Commits
-------
2beda894f2 [Messenger] Don't make EnvelopeItemInterface extend Serializable
This PR was merged into the 4.2-dev branch.
Discussion
----------
Mock date() in ClockMock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (In case `date()` is mocked in some other way execution would fail because of redeclaration. Could be avoided with an extra `function_exists()` check. WDYT?)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As to the [PHP documentation](https://secure.php.net/manual/en/function.date.php) `date()` uses the value of `time()` as timestamp if none is given. `date()` has to be mocked in ClockMock as well for this still being true, otherwise `\time()` is used as default.
BTW: The msec part of `microtime()` has 8 fractional digits on my system, ClockMock returns only 6...
Commits
-------
e8ba79adb9 [Bridge/PhpUnit] Mock date() in ClockMock
* 4.1:
[DoctrineBridge] support __toString as documented for UniqueEntityValidator
[travis] enable Redis cluster
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
fix data mapper return type in docblock
fix type error handling when writing values
* 3.4:
[DoctrineBridge] support __toString as documented for UniqueEntityValidator
[travis] enable Redis cluster
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
fix data mapper return type in docblock
fix type error handling when writing values
This PR was squashed before being merged into the 4.2-dev branch (closes#28221).
Discussion
----------
[DomCrawler] Add a way to filter direct children
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28171
| License | MIT
| Doc PR | -
The Dom-Crawler component only has a `filter()` method (to filter the node and all its children) and a `children()` method to return direct children.
**There is currently no way to easily filter (thanks to a selector) the direct children of a node, like jQuery allows so (with a selector passed to the `.children([selector])` method).**
**This PR adds a way to optionally filter direct children thanks to a CSS selector**. Here is an example of the usage:
```php
$html = <<<'HTML'
<html>
<body>
<div id="foo">
<p class="lorem" id="p1"></p>
<p class="lorem" id="p2"></p>
<div id="nested">
<p class="lorem" id="p3"></p>
</div>
</div>
</body>
</html>
HTML;
$crawler = new Crawler($html);
$foo = $crawler->filter('#foo');
$foo->children() // will select `#p1`, `#p2` and `#nested`
$foo->children('p') // will select `#p1` and `p2`
$foo->children('.lorem') // will select `#p1` and `p2`
```
This PR adds only an optional parameter and adds no BC break.
Commits
-------
f634afdb6f [DomCrawler] Add a way to filter direct children
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Allow autowiring by type + parameter name
| 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/issues/10206
In #27165, we introduced the possibility to bind by type+name:
```yaml
bind:
Psr\Log\LoggerInterface $myLogger: @monolog.logger.my_logger
```
But we forgot about aliases. For consistency, they could and should allow doing the same. More importantly, this will open up interesting use cases where bundles could provide default values for typed+named arguments (using the new `ContainerBuilder::registerAliasForArgument()` method). E.g:
```yaml
services:
Psr\Cache\CacheItemPoolInterface $appCacheForecast: @app.cache.forecast
```
Works also for controller actions and service subscribers (using the real service id as the key).
Commits
-------
c0b8f53bcb [DI] Allow autowiring by type + parameter name
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28248
| License | MIT
| Doc PR | -
As described in https://github.com/php-memcached-dev/php-memcached/issues/24 and because we enable the binary protocol by default.
Commits
-------
8b59d177db [Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
This PR was squashed before being merged into the 3.4 branch (closes#28252).
Discussion
----------
[DoctrineBridge] support __toString as documented for UniqueEntityValidator
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28245
| License | MIT
| Doc PR | -
This fixes https://github.com/symfony/symfony/issues/28245.
It brings back handling `__toString` as documented for invalid values.
Commits
-------
2ac883a99b [DoctrineBridge] support __toString as documented for UniqueEntityValidator
This PR was merged into the 2.8 branch.
Discussion
----------
[Form] fix data mapper return type in docblock
| 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
-------
5bdc755d73 fix data mapper return type in docblock
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Cache] make PhpMarshaller handle hard references
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR makes the interface and behavior of `PhpMarshaller` cleaner and bullet-proof.
While a bug fix at this stage, I'd like to propose splitting it to a new `VarExporter` component all goes well.
Commits
-------
bc5d208584 [Cache] make PhpMarshaller handle hard references
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Serializer] Fix the XML comments encoding
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
When we decode a XML comment, we get `['#comment' => ' foo ']`. But when we encode this same content, the result is not the expected one.
```php
$encoder->encode(['#comment' => ' foo '], 'xml');
```
```
Expected:
<response>
<!-- foo -->
</response>
Actual:
<response>
<item key="#comment"> foo </item>
</response>
```
Commits
-------
d94a37f395 Allow to encode xml comments
This PR was merged into the 4.2-dev branch.
Discussion
----------
[WebProfilerBundle] Remove useless macro arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I was digging into the Stopwatch Component and the part of displaying timeline in WebProfilerBundle and found some useless arguments in macro. The code was changed but arguments were abandoned.
Where the problem appeared: bfcc5e7392 (diff-3651d31bd302da5c7c1ef927e8641c78L294)
Commits
-------
70498dbeae [WebProfilerBundle] remove useless macro arguments
This PR was merged into the 4.1 branch.
Discussion
----------
[FrameworkBundle] `message_bus` alias public
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28215
| License | MIT
| Doc PR | ø
Because it is used in the `ControllerTrait` with `get('message_bus')`... same than for `security.csrf.token_manager` and cie, it should be public.
Commits
-------
51b6e9eb96 Make the `message_bus` alias public
* 4.1:
fix merge
[travis][appveyor] use symfony/flex to accelerate builds
Add missing stderr redirection
clean up unused code
Remove the HTML5 validation from the profiler URL search form
[Filesystem] Add test to prevent regression when using array|resource with dumpFile
Add help texts for checkboxes in horizontal bootstrap 4 forms
[Security] Call AccessListener after LogoutListener
* 3.4:
[travis][appveyor] use symfony/flex to accelerate builds
Add missing stderr redirection
clean up unused code
[Filesystem] Add test to prevent regression when using array|resource with dumpFile
[Security] Call AccessListener after LogoutListener
This PR was squashed before being merged into the 4.2-dev branch (closes#28069).
Discussion
----------
[Validator] New `DivisibleBy` constraint for testing divisibility
This introduces a new ~`MultipleOf`~ `DivisibleBy` constraint which checks whether one number is a multiple of (aka "divisible by") some other number. Useful for enforcing specific increments on a number.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10121
See https://github.com/symfony/symfony-docs/pull/10121 for examples of this constraint in action.
Commits
-------
efcfb8b22d [Validator] New `DivisibleBy` constraint for testing divisibility
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Add missing stderr redirection
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This seems to have been overlooked in
6c0e6af47a, and results in the test suite
being polluted on machines where phpdbg is not installed.
I updated the code to mimic other occurences of exec in this file.
Commits
-------
d67b86b9e7 Add missing stderr redirection
This PR was merged into the 4.1 branch.
Discussion
----------
[Form] Add help texts for checkboxes in horizontal bootstrap 4 forms
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 | —
| License | MIT
| Doc PR | —
Bootstrap 4 horizontal forms override the `{% block checkbox_form %}` but didn't include the help text. Regular (vertical) Bootstrap 4 are not affected, as they use the default `form_row`, which includes the `form_help()` call.
### Before
![before](https://user-images.githubusercontent.com/1032411/43576420-9a1051ee-9649-11e8-8c1e-89502e5a79bd.png)
### After
![after](https://user-images.githubusercontent.com/1032411/43576423-9dfe5620-9649-11e8-8bce-74ec82d83729.png)
Commits
-------
1483c87aab Add help texts for checkboxes in horizontal bootstrap 4 forms
This PR was squashed before being merged into the 4.2-dev branch (closes#28176).
Discussion
----------
[DI] [FrameworkBundle] Add LoggerAwareInterface to auto configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Add the method call `setLogger` for every service implementing `Psr\Log\LoggerAwareInterface`
Commits
-------
afda3c8844 [DI] [FrameworkBundle] Add LoggerAwareInterface to auto configuration
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] clean up unused 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 |
The removed lines were added in #17159 to be able to detect comment lines without running into parse errors. Part of that was reverted in #25241 when the logic was overhauled leading to now useless initialisation of variables that are never evaluated.
Commits
-------
a7672bd187 clean up unused code
This seems to have been overlooked in
6c0e6af47a, and results in the test suite
being polluted on machines where phpdbg is not installed.
I updated the code to mimic other occurences of exec in this file.
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Routing] Add fallback to cultureless locale for internationalized routes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/27938
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10108
Please check the related issue for the context.
TODO :
- [x] Update CHANGELOG
- [x] Update documentation
Commits
-------
fd2e3c36fb [Routing] Add fallback to cultureless locale for internationalized routes
This PR was merged into the 2.8 branch.
Discussion
----------
[Filesystem] Add test to prevent regression when using array|resource with dumpFile
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
Commits
-------
db1c21c8ae [Filesystem] Add test to prevent regression when using array|resource with dumpFile
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Config] show proposals when unsupported option is provided
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28075
| License | MIT
| Doc PR | none
In case of proposals match with the provided option, all proposals are displayed.
In case of no pertinent proposal is available, all options are displayed in alpha order.
Commits
-------
15f69a3e81 [Config] show proposals when unsupported option is provided
This PR was merged into the 4.1 branch.
Discussion
----------
[DI] Fix autowire inner service
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25631
| License | MIT
| Doc PR | -
This PR fix multiple levels of decoration. Unfortunately, this [good question](https://github.com/symfony/symfony/pull/25631#issuecomment-364610914) in origin PR has not been heard 🎧😄. @dunglas @chalasr
Commits
-------
b79d097c2a [DI] Fix autowire inner service
This PR was merged into the 4.2-dev branch.
Discussion
----------
[DI] Allow autoconfiguring bindings
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I've come up with a case where we will need to inject a different service based on which interfaces a consumer service implements: injecting a different token storage for monolog processor than for everything else. Required in #27801.
Commits
-------
7c29977037 [DI] Allow autoconfiguring bindings
* 4.1:
[HttpFoundation] fix false-positive ConflictingHeadersException
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
* 3.4:
[HttpFoundation] fix false-positive ConflictingHeadersException
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28010, #27865
| License | MIT
| Doc PR | -
When circular loops involve references in properties, method calls or configurators, it is possible to properly instantiate the related services.
The current logic is broken: `ContainerBuilder` considers some of these loops as self-referencing circular references, leading to a runtime exception, and in similar situations, `PhpDumper` generates code that turns to infinite loops at runtime 💥. These badly handled situations happen with inlined definitions.
This PR fixes both classes by making them track which references are really part of the constructors' chain, including inline definitions.
It also fixes dumping infinite loops when dumping circular loops involving lazy services while proxy-manager-bridge is not installed.
Commits
-------
e843bb86c8 [DI] Fix false-positive circular ref leading to wrong exceptions or infinite loops at runtime
This PR was merged into the 4.1 branch.
Discussion
----------
[Translation] fix perf of lint:xliff command
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27564
| License | MIT
| Doc PR | -
#27653 has been merged on master as an improvement, but the perf issue is a killer.
Our CI spends 1 minutes on just a few translation test cases.
Only 4.1 has this behavior. That's a bug.
Commits
-------
02c69b1658 [Translation] fix perf of lint:xliff command
This PR was merged into the 4.1 branch.
Discussion
----------
[Form] Remove extra .form-group wrapper around file widget in bootstrap 4
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This is a follow-up to https://github.com/symfony/symfony/pull/27958 and https://github.com/symfony/symfony/pull/27919 by @apfelbox .
It fixes an extra space between the help text of a FileType widget and the widget itself. The extra space was caused by a `.form-group` wrapper in the `file_widget` block.
Commits
-------
01e7fe4fb0 [Form] Remove extra .form-group wrapper around file widget in bootstrap 4
This PR was merged into the 4.1 branch.
Discussion
----------
[Routing] Fixed scheme redirecting for root path
| 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 |
I and my friend found a bug with routing / matching and redirecting from http to https by forcing routes (https://symfony.com/doc/current/routing/scheme.html). It works good for all routes except the homepage (root path /). The problem is probably here (6912cfebc0/Matcher/Dumper/PhpMatcherDumper.php (L196-L199)). Symfony tries to display the welcome page instead of redirecting to https.
Commits
-------
2d7fdff021 [Routing] Fixed scheme redirecting for root path
This PR was merged into the 2.8 branch.
Discussion
----------
Update validators.nl.xlf
| 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 |
The original translation does not match intended communication.
`Deze waarde is geen geldige UUID waarde.` reads as `This value is not a valid UUID value`.
Commits
-------
7f895abbdd Update validators.nl.xlf
This PR was merged into the 2.8 branch.
Discussion
----------
[travis] merge "same Symfony version" jobs in one
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? |
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Allowing to consume fewer jobs and save the 1 to 2 minutes bootstrap time of workers.
Commits
-------
9857ca07aa [travis] merge "same Symfony version" jobs in one
* 4.1:
[travis] fix CI for sigchild+Process
fix merge
[travis] merge "same Symfony version" jobs in one
fix merge
🐛 Fix typo
Remove the Expires header when calling Response::expire()
Allow multidimensional collection in property info
Allow multidimensional collection in property info
* 3.4:
[travis] fix CI for sigchild+Process
fix merge
[travis] merge "same Symfony version" jobs in one
fix merge
Remove the Expires header when calling Response::expire()
Allow multidimensional collection in property info
Allow multidimensional collection in property info
This PR was squashed before being merged into the 4.2-dev branch (closes#21002).
Discussion
----------
[Form] Added options for separate date/time labels in DateTimeType.
If your render date and time separately you need options for each label.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Let's say you have the following form field:
```
$builder
->add('start', DateTimeType::class, [
'date_widget' => 'single_text',
...
])
...
```
Then you can render the date and time widgets/rows/etc. separately:
```
<div>{{ form_row(form.start.date) }}</div>
<div>{{ form_row(form.start.time) }}</div>
```
But you can't provide labels for each, so what is displayed is just the uppercased field name ("Date" and "Time").
This PR adds 'date_label' and 'time_label' options, so you can do:
```
$builder
->add('start', DateTimeType::class, [
'date_widget' => 'single_text',
'date_label' => 'The Start Date',
'time_label' => 'The Start Time',
...
])
...
```
Commits
-------
df191552b4 [Form] Added options for separate date/time labels in DateTimeType.
This PR was squashed before being merged into the 4.2-dev branch (closes#27763).
Discussion
----------
[WebProfilerBundle] Append new ajax request to the end of the list
Append new ajax request to the end of the list instead of adding it to the beginning
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes/no
| BC breaks? | no/yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Didn't find why this behavior was changed with web profiler design.
In current version it is hard to click to the latest ajax request.
Commits
-------
45d4559ab2 [WebProfilerBundle] Append new ajax request to the end of the list
This PR was squashed before being merged into the 4.2-dev branch (closes#28035).
Discussion
----------
[DomCrawler] Allow using non-absolute base URIs
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12318
| License | MIT
| Doc PR | -
@xabbuh @stof I implemented in this PR your comments from https://github.com/symfony/symfony/issues/12318
Commits
-------
130119ff6a [DomCrawler] Allow using non-absolute base URIs
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyInfo] Allow nested collections
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
When a multidimentional collection is defined (in a docblock) the extractor does not resolve the className deeply
```
#input
class Foo {
/**
* @var Baz[][]
*/
public $bar;
}
```
```
# current result
builtinType: array
collectionValueType:
builtinType: object
class: Baz[]
```
```
# FIX
builtinType: array
collectionValueType:
builtinType: array
collectionValueType:
builtinType: object
class: Baz
```
The 2.8 version has also that bug, but the methods have been moved to another class. Should I create an other PR for 2.8?
Commits
-------
ce49036790 Allow multidimensional collection in property info
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] Allow nested collections
| 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 |
Duplicate of #28012 for the 2.8 branche (as both code and test have been refactored between 2.8 and 3.x
Commits
-------
6331687f65 Allow multidimensional collection in property info
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Yaml] save preg_match() calls when possible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | possibly #27960
| License | MIT
| Doc PR |
Commits
-------
e6bea97b6d save preg_match() calls when possible
This PR was merged into the 2.8 branch.
Discussion
----------
Remove the Expires header when calling Response::expire()
| 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 | #13341 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | -
Commits
-------
ac0cd15402 Remove the Expires header when calling Response::expire()