* ScalarMarkingStore -> SingleStateMarkingStore
* PropertyAccessorMarkingStore -> MultipleStateMarkingStore
And I also made optionnal the `marking_store` config, to let the
componant choose the best marking store depending on the type
(state_machine or workflow).
This PR was squashed before being merged into the 2.7 branch (closes#20275).
Discussion
----------
[HttpFoundation] Avoid implicit null to array conversion in request matcher
| Q | A |
| --- | --- |
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any |
| License | MIT |
| Doc PR | reference to the documentation PR, if any |
`null` is allowed _and_ passed as default value from the constructor. Lets be explicit.
Commits
-------
a2c0a78 [HttpFoundation] Avoid implicit null to array conversion in request matcher
This PR was squashed before being merged into the 3.2-dev branch (closes#20424).
Discussion
----------
[HttpKernel] Removed forgotten setCacheVersionInfo()
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | yes
| New feature? | no
| BC breaks? | no-ish
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
Forgotten in #14351
Commits
-------
8e70193 [HttpKernel] Removed forgotten setCacheVersionInfo()
* 3.1:
fixed CS
Properly format value in UniqueEntityValidator
[Translation][fallback] add missing resources in parent catalogues.
removed a deprecation notice
[Form] Fix show float values as choices values in ChoiceType
Remove double use Statement
Improved the design of the metrics in the profiler
[Yaml] set arguments depending on the PHP version
[Console] Fix infinite loop on missing input
[HttpFoundation][Session] memcached connection should not be closed
* 2.8:
[Translation][fallback] add missing resources in parent catalogues.
removed a deprecation notice
[Form] Fix show float values as choices values in ChoiceType
Remove double use Statement
Improved the design of the metrics in the profiler
[Console] Fix infinite loop on missing input
[HttpFoundation][Session] memcached connection should not be closed
* 2.7:
[Translation][fallback] add missing resources in parent catalogues.
removed a deprecation notice
[Form] Fix show float values as choices values in ChoiceType
[HttpFoundation][Session] memcached connection should not be closed
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fixed show float values as choice value in ChoiceType
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13817
| License | MIT
| Doc PR | -
There is a closed [issue][1] related to this before Symfony 2.7 (when choice value still was the key from the `array`). This issue already happened in 2.7+ but now inside Symfony core.
Information
-----------
[This method][3] checks whether the given choices can be cast to strings without generating duplicates (3ab8189080 in #16705):
```php
private function castableToString(array $choices, array &$cache = array())
{
foreach ($choices as $choice) {
if (is_array($choice)) {
if (!$this->castableToString($choice, $cache)) {
return false;
}
continue;
} elseif (!is_scalar($choice)) {
return false;
} elseif (isset($cache[$choice])) { // <---- red breakpoint
return false;
}
$cache[$choice] = true; // <---- red breakpoint
}
return true;
}
```
So it should to keep [scalar values (integer, float, string or boolean)][2] as choice values always (unless have duplicates values).
The Problem
-----------
But in this situation it doesn't happen:
```php
$form = $this->createFormBuilder()
->add('foo', ChoiceType::class, [
'choices' => [
'Min' => 0.5,
'Mid' => 1.0,
'Max' => 1.5,
]
])
->getForm();
```
**Output:**
```html
<select id="form_foo" name="form[foo]">
<option value="0">Min</option>
<option value="1">Mid</option>
<option value="2">Max</option>
</select>
```
[**Why?**][5]
If the key of the array is a float number, it's interpreted as integer automatically:
```php
// ...
$cache[$choice] = true;
// when $choice = 0.5: $cache = [0 => true]
// when $choice = 1.0: $cache = [0 => true, 1 => true]
```
Then, when `$choice = 1.5` [this sentence][4] `isset($cache[1.5])` returns `true` because really checks `isset($cache[1])` and this key already exists, so `castableToString()` returns `false` (detected as duplicate) and the choices values are generated incrementing integers as values.
The PR's Effect
-------------
**Before:**
```html
<select id="form_foo" name="form[foo]">
<option value="0">Min</option>
<option value="1">Mid</option>
<option value="2">Max</option>
</select>
```
**After:**
```html
<select id="form_foo" name="form[foo]">
<option value="0.5">Min</option>
<option value="1">Mid</option>
<option value="1.5">Max</option>
</select>
```
[1]: https://github.com/symfony/symfony/issues/13817
[2]: http://php.net/manual/en/function.is-scalar.php
[3]: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php#L228
[4]: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php#L239
[5]: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/ChoiceList/ArrayChoiceList.php#L243
Commits
-------
3564228 [Form] Fix show float values as choices values in ChoiceType
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation][Session] Fix memcache session handler
| Q | A
| ------------- | ---
| Branch? | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 3.0, 3.1, master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commit 0216e05605 removed the opening of connection to memcached server on call to `open()`, because it's assumed that connection is already opened. However, `close()` still closes the connection. As a result no more read/write calls can be made if session got closed, as the connection does not get reestablished.
Basically MemcacheSessionHandler should follow same logic as Memcache**d**SessionHandler, which is exactly what this MR acomplishes.
Commits
-------
0423d894 [HttpFoundation][Session] memcached connection should not be closed
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DependencyInjection] fixed ini file values conversion
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no-ish |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | n/a |
| License | MIT |
| Doc PR | n/a |
When using the ini format to load parameters in the Container, the parameter values were converted by PHP directly (`'true'` => `1` for instance). But when using the YAML or XML format, the conversions are much broader and more precise (`'true'` => `true` for instance). This PR fixed fixes this discrepancy by using the same rules as XML (we could use `INI_SCANNER_TYPED` for recent versions of PHP but the rules are not exactly the same, so I prefer consistency here).
One might argue that this is a new feature and that this should be merged into master, which I can accept as well. In master, the `XmlUtils::phpize()` method should be deprecated and replaced by a more generic phpize class.
ping @symfony/deciders
Commits
-------
4ccfce6 [DependencyInjection] fixed ini file values conversion
This PR was merged into the 3.2-dev branch.
Discussion
----------
[HttpKernel] Base DataCollector throws warning on unsupported scheme strings
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | N/A |
| License | MIT |
| Doc PR | N/A |
The issue concerns any collector based on the abstract `Symfony\Component\HttpKernel\DataCollector\DataCollector` class using `cloneVar` on a string containing a unsupported scheme.
The easiest way to reproduce the issue is to add a simple query parameter like `?uri=foo://bar` on any url of your application:
> ContextErrorException in DataCollector.php line 134:
> Warning: file_exists(): Unable to find the wrapper "foo" - did you forget to enable it when you configured PHP?
This PR simply fixes the issue by muting the warning on `file_exists`. But maybe there is a better strategy.
Commits
-------
52faa00 Fix base DataCollector throws warning on unsupported scheme strings
* 3.1:
[PhpUnitBridge] Fix undefined variable
Compatibility with Twig 1.27
Remove extra line in doc-block comment
[VarDumper] Fix dumping Twig source in stack traces
Enhance GAE compat by removing some realpath()
[DependencyInjection] Remove old code in XML loader
bumped Symfony version to 3.1.7
updated VERSION for 3.1.6
updated CHANGELOG for 3.1.6
bumped Symfony version to 2.8.14
updated VERSION for 2.8.13
updated CHANGELOG for 2.8.13
bumped Symfony version to 2.7.21
updated VERSION for 2.7.20
update CONTRIBUTORS for 2.7.20
updated CHANGELOG for 2.7.20
[SecurityBundle] Fix twig-bridge lowest dep
* 2.8:
Compatibility with Twig 1.27
[VarDumper] Fix dumping Twig source in stack traces
Enhance GAE compat by removing some realpath()
bumped Symfony version to 2.8.14
updated VERSION for 2.8.13
updated CHANGELOG for 2.8.13
bumped Symfony version to 2.7.21
updated VERSION for 2.7.20
update CONTRIBUTORS for 2.7.20
updated CHANGELOG for 2.7.20
[SecurityBundle] Fix twig-bridge lowest dep
* 2.7:
Compatibility with Twig 1.27
Enhance GAE compat by removing some realpath()
bumped Symfony version to 2.7.21
updated VERSION for 2.7.20
update CONTRIBUTORS for 2.7.20
updated CHANGELOG for 2.7.20
[SecurityBundle] Fix twig-bridge lowest dep
This PR was merged into the 3.2-dev branch.
Discussion
----------
Added a default ide file link web view
| 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 having no `framework.ide` configured or `framework.ide = symfony` the file link open the source in a web view (eg `_profiler/open?file=/src/AppBundle/Controller/DefaultController.php&line=50#line50`).
![](https://cl.ly/2Z0W2J020p43/feature_ide.png)
Commits
-------
ba6bcca Added a default ide file link web view
This PR was merged into the 3.1 branch.
Discussion
----------
[Yaml] Fix 7.1 compat
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Should make CI green again with PHP 7.1 RC4.
Commits
-------
89b78f2 [Yaml] Fix 7.1 compat
* 3.1:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
A decorated service should not keep the autowiring types
merge tags instead of completely replacing them
* 2.8:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
A decorated service should not keep the autowiring types
merge tags instead of completely replacing them
* 2.7:
Fix edge case with StreamedResponse where headers are sent twice
removed usage of Twig_Compiler::addIndentation
merge tags instead of completely replacing them
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] A decorated service should not keep the autowiring 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/20260#issuecomment-255364862
| License | MIT
| Doc PR | n/a
When decorating a service which is not abstract and has `autowiring_types`, the decorator should be the one used for autowiring methods of autowired services, so we should explicitly empty them on the decorated definition after merged them into the child. See https://github.com/symfony/symfony/pull/20260#issuecomment-255364862 for a use case where we are forced to manually empty the decorated service's `autowiring_types`.
Commits
-------
5951378 A decorated service should not keep the autowiring types
* 3.1:
[TwigBundle] fixed usage of getSource in tests
Trim constant values in XmlFileLoader
move test to the HttpKernel component
[TwigBridge] fixed Twig_Source required argument
[HttpKernel] Fix a regression in the RequestDataCollector
[HttpKernel] Refactor a RequestDataCollector test case to use a data provider
* 2.8:
[TwigBundle] fixed usage of getSource in tests
Trim constant values in XmlFileLoader
move test to the HttpKernel component
[TwigBridge] fixed Twig_Source required argument
* 2.7:
[TwigBundle] fixed usage of getSource in tests
Trim constant values in XmlFileLoader
move test to the HttpKernel component
[TwigBridge] fixed Twig_Source required argument
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle][HttpKernel] move test to the HttpKernel component
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19443#discussion_r83414612
| License | MIT
| Doc PR |
The moved test case does not test the `AddConsoleCommandPass` class, but ensures certain behavior in the `registerCommands()` method of the `Bundle` class from the HttpKernel component.
Commits
-------
c9ca322 move test to the HttpKernel component
This PR was merged into the 3.1 branch.
Discussion
----------
[HttpKernel] Fix a regression in the RequestDataCollector
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19701
| License | MIT
| Doc PR | -
The regression was introduced by refactoring made as part of #17589 (if/else statements where rearranged).
Commits
-------
57008ea [HttpKernel] Fix a regression in the RequestDataCollector
26b90e4 [HttpKernel] Refactor a RequestDataCollector test case to use a data provider
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DependencyInjection] Fix FactoryReturnTypePass position in PassConfig
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19161, #19191
| License | MIT
| Doc PR |
Commits
-------
dfb5cc3 [DependencyInjection] Fix FactoryReturnTypePass position in PassConfig
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Form] Change FormTypeGuesserChain to accept Traversable
| 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 using symfony/form without the rest of the framework and this will make things a bit easier for me.
Commits
-------
5e4f4d4 [Form] Change FormTypeGuesserChain to accept Traversable
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Validator] Allow validating multiple groups in one GroupSequence step
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
To see what I've changed just look at the last commit. The other two are just refactoring without any effect.
GroupSequenceProviderInterface seems to be the recommended solution for conditional validators (like when some properties should be required only if other property has a certain value). And it's a good solution honestly. Except for the fact that it's completely useless when I want to get validation violations for all groups at once and not just violations for the first group that caused any violations.
```php
// If the User validation group causes any violations the Premium group will not be
// validated at all even if the $this->isPremium() is true.
class User implements GroupSequenceProviderInterface {
public function getGroupSequence() {
$groups = array('User');
if ($this->isPremium()) {
$groups[] = 'Premium';
}
return $groups;
}
}
```
To be honest I never found a use case for this step-by-step behavior. When user fills a form I want to show him all errors at once not just some subset.
It's surprisingly easy to fix this. With just one changed line in RecursiveContextualValidator it's perfectly solveable:
```php
// With this PR it is possible to do this and get violations for both groups like this.
class User implements GroupSequenceProviderInterface {
public function getGroupSequence() {
$groups = array('User');
if ($this->isPremium()) {
$groups[] = 'Premium';
}
return [$groups]; // this line has changed
}
}
```
Commits
-------
31b609e [Validator] Allow validating multiple groups in one GroupSequence step
3847bad [Validator] Refactor tests
38b643a [Validator] Fix annotation
* 3.1:
[VarDumper] Fix source links with latests Twig versions
[DomCrawler] Optimize DomCrawler::relativize()
[HttpKernel] Fix source links with latests Twig versions
[DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
* 2.8:
[VarDumper] Fix source links with latests Twig versions
[DomCrawler] Optimize DomCrawler::relativize()
[HttpKernel] Fix source links with latests Twig versions
[DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
* 2.7:
[DomCrawler] Optimize DomCrawler::relativize()
[HttpKernel] Fix source links with latests Twig versions
[DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
This PR was merged into the 2.7 branch.
Discussion
----------
[DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20229
| License | MIT
| Doc PR | -
@klausi could you please validate this patch? Is it an improvement over yours? (sorry I don't have the proper use case to test.)
Commits
-------
17757d8 [DomCrawler] Optimize DomCrawler::relativize()
5b26e33 [DomCrawler] Allow pipe (|) character in link tags when using Xpath expressions
* 3.1:
[TwigBridge] removed deprecations added in Twig 1.27
PHP CS Fixer: use php_unit_dedicate_assert
3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
fixed Filesystem:makePathRelative and added 2 more testcases
no 304 response if method is not cacheable
move tags from decorated to decorating service
* 2.8:
[TwigBridge] removed deprecations added in Twig 1.27
PHP CS Fixer: use php_unit_dedicate_assert
3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
fixed Filesystem:makePathRelative and added 2 more testcases
no 304 response if method is not cacheable
move tags from decorated to decorating service
* 2.7:
[TwigBridge] removed deprecations added in Twig 1.27
PHP CS Fixer: use php_unit_dedicate_assert
fixed Filesystem:makePathRelative and added 2 more testcases
no 304 response if method is not cacheable
move tags from decorated to decorating service
This PR was merged into the 3.2-dev branch.
Discussion
----------
[ExpressionLanguage] Making cache PSR6 compliant
| 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 | [#7064](https://github.com/symfony/symfony-docs/pull/7064)
Adding Cache component compatible ParserCache in ExpressionLanguage component.
I hope you will find it useful :) I would like to make tests also
Commits
-------
a7352ff [ExpressionLanguage] Making cache PSR6 compliant
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Serializer] Support specifying format for DateTimeNormalizer::denormalize
| 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 | symfony/symfony-docs#7063
Commits
-------
ff23924 [Serializer] Support specifying format for DateTimeNormalizer::denormalize
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] no 304 response if method is not cacheable
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Since #19321 OPTIONS and TRACE are considered safe methods. But both methods should not lead to "304 Not modified" responses.
Commits
-------
3d6b450 no 304 response if method is not cacheable
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] move tags from decorated to decorating service
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20150
| License | MIT
| Doc PR |
Commits
-------
7def83c move tags from decorated to decorating service
This PR was squashed before being merged into the 3.2-dev branch (closes#20214).
Discussion
----------
Fix/broken merging of parameter bag env placeholders
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20213
| License | MIT
| Doc PR | reference to the documentation PR, if any
In PR https://github.com/symfony/symfony/pull/20199 I made changes after review that broke the use of env variables, sorry about that - should have checked it a bit more before making the changes.
@nicolas-grekas, I know you're very busy with all that merging, but if you could take a look at this it would be great since you know most about it.
Commits
-------
b53e0de Fix/broken merging of parameter bag env placeholders
- Changed surrogate capability name to symfony
- Changed user agent of the BrowserKit Client to 'Symfony BrowserKit'
- Changed 'symfony2' to 'symfony' in timing templates
- Updated changelog and upgrade files
* 3.1:
[travis] Test on PHP 7.1
simplified code
Remove unused variable
3.0 Upgrade Guide: Added Table of Contents
[HttpFoundation] add missing upgrade entry
[FrameworkBundle] Convert null prefix to an empty string in translation:update command
Improved the deprecation messages for service aliases
[Serializer] minor: Remove an extra space in a YamlFileLoader error
[HttpKernel] Clean ArgumentMetadataFactory::getType()
[PropertyInfo] Fix edge cases in ReflectionExtractor
* 2.8:
[travis] Test on PHP 7.1
simplified code
Remove unused variable
[FrameworkBundle] Convert null prefix to an empty string in translation:update command
[PropertyInfo] Fix edge cases in ReflectionExtractor
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Accept only array in TagAwareAdapter::invalidateTags()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Just to be sure that we won't suffer from some stupid incompatibility if a cache-tags PSR is published one day. See discussion: https://github.com/symfony/symfony/issues/19728#issuecomment-251674712
Commits
-------
a08acc7 [Cache] Accept only array in TagAwareAdapter::invalidateTags()
This PR was merged into the 3.2-dev branch.
Discussion
----------
Use the method map as authoritative list of factories for dumped containers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | only for weird broken cases
| Deprecations? | yes (but only for people doing weird things)
| Tests pass? | yes
| Fixed tickets | #11761, #19690
| License | MIT
| Doc PR | n/a
The initial implementation of the method factory discovery was based on a naming convention for factory methods. However, this naming convention allowed to generate the same name for multiple ids. In the meantime, a method map was introduced to solve this issue (and others).
When accessing a service with a different id than the official one (thanks to ambiguities), this breaks the sharing of the service, as it creates a new instance each time and replaces the existing shared instance. This was also inconsistent between a dumped container (affected by this) and a non-dumped container (reporting a service not found error for the other id).
The method map is now the authoritative way to discover available service factories. When the dumped container was generated with a method map (which is the case when using the dumper shipped in the component), the logic based on defined methods is not executed anymore. This forbids using another id than the real one to access the service (preventing to trigger the broken behavior). So this breaks BC for people being lucky (i.e. they were using the broken id only once and *before* any usage of the official id) and fixes a WTF bug for all others.
When using a dumper which does not fill the method map, the old logic is still applied, but deprecation warnings are triggered on access to dumped services. Currently, this will trigger a deprecation warning for each new service instantiation. I have not found an easy way to trigger it only once (except adding a private property to remember we already triggered it, but is it worth it ?), but only people writing a project container by hand or writing their own dumper would ever see such deprecation anyway (as the core dumper generates the method map).
Additionally, this makes ``getServiceIds`` faster by avoiding doing a regex match for each method in the class.
Commits
-------
03b9108 Use the method map as authoritative list of factories for dumped containers
This PR was merged into the 3.2-dev branch.
Discussion
----------
[HttpKernel] removed implicit dep on Console
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
HttpKernel does not have console as a dependency, so we must ensure that this is not implicitly required (`DebugHandlersListener` already has this check).
Commits
-------
414206d [HttpKernel] removed implicit dep on Console
This PR was squashed before being merged into the 3.1 branch (closes#20180).
Discussion
----------
Improved the deprecation messages for service aliases
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19832
| License | MIT
| Doc PR |
Commits
-------
b1b21bf Improved the deprecation messages for service aliases
This PR was squashed before being merged into the 3.1 branch (closes#20174).
Discussion
----------
[Serializer] minor: Remove an extra space in a YamlFileLoader error
| Q | A
| ------------- | ---
| Branch? | 3.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
Commits
-------
a1bc96b [Serializer] minor: Remove an extra space in a YamlFileLoader error
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] Fix edge cases in ReflectionExtractor
| 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 should make ReflectionExtractor a bit more robust.
ping @dunglas (~~don't miss the changed test case~~).
Commits
-------
bffdfad [PropertyInfo] Fix edge cases in ReflectionExtractor
* 3.1:
Minor fixes & cleanups
[DependencyInjection] Add missing PHPDoc type
Correct a typo in the ReflectionExtractor's description
[HttpFoundation] JSONP callback validation
[Console] Improved the explanation of the hasOption() method
Uniformize exception vars according to our CS
add missing use statement
bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
* 2.8:
[DependencyInjection] Add missing PHPDoc type
Correct a typo in the ReflectionExtractor's description
[HttpFoundation] JSONP callback validation
[Console] Improved the explanation of the hasOption() method
Uniformize exception vars according to our CS
add missing use statement
bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
* 2.7:
[HttpFoundation] JSONP callback validation
[Console] Improved the explanation of the hasOption() method
add missing use statement
bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] $attributes can be anything, but RoleVoter assumes strings
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18042
| License | MIT
| Doc PR | reference to the documentation PR, if any
Commits
-------
ad3ac95 bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Add missing PHPDoc type
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
4cae9c0 [DependencyInjection] Add missing PHPDoc type
The initial implementation of the method factory discovery was based on a
naming convention for factory methods. However, this naming convention allowed
to generate the same name for multiple ids. In the meantime, a method map was
introduced to solve this issue (and others).
When accessing a service with a different id than the official one (thanks to
ambiguities), this breaks the sharing of the service, as it creates a new
instance each time and replaces the existing shared instance. This was also
inconsistent between a dumped container (affected by this) and a non-dumped
container (reporting a service not found error for the other id).
The method map is now the authoritative way to discover available service
factories. When the dumped container was generated with a method map (which
is the case when using the dumper shipped in the component), the logic based
on defined methods is not executed anymore. This forbids using another id than
the real one to access the service (preventing to trigger the broken behavior).
When using a dumper which does not fill the method map, the old logic is still
applied, but deprecation warnings are triggered on access to dumped services.
* 3.1:
Fix event annotation for arguments resolving event
[HttpKernel] Fix nullable types handling
[FrameworkBundle] Alter container class instead of kernel name in cache:clear command
[VarDumper] Fix ReflectionNamedType->getName() detection
[Console] Fix validation of null values using SymfonyStyle::ask()
[Validator] Add Czech and Slovak translations for BIC
[Console] Escape default value and question in SymfonyStyle::ask()
* 2.8:
[FrameworkBundle] Alter container class instead of kernel name in cache:clear command
[VarDumper] Fix ReflectionNamedType->getName() detection
[Console] Fix validation of null values using SymfonyStyle::ask()
[Validator] Add Czech and Slovak translations for BIC
[Console] Escape default value and question in SymfonyStyle::ask()
* 2.7:
[FrameworkBundle] Alter container class instead of kernel name in cache:clear command
[Console] Fix validation of null values using SymfonyStyle::ask()
[Console] Escape default value and question in SymfonyStyle::ask()
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Escape question text and default value in SymfonyStyle::ask()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19493
| License | MIT
| Doc PR | n/a
Commits
-------
eed3cc5 [Console] Escape default value and question in SymfonyStyle::ask()
This PR was merged into the 3.2-dev branch.
Discussion
----------
Hide commands from ApplicationDescriptor, but allow invoking
I would like to hide commands from cluttering the descriptors, but still allow their invocation from code or cron.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
Commits
-------
746dab3 casting setPublic() arg to bool
0a3c290 update docblocks and added test
6d87837 Update ApplicationDescription.php
e969581 update hidden to public
3efa874 Update Command.php
dfc1ac8 Update Command.php
cd77139 Update Command.php
56a8b93 Update Command.php
fb1f30c Update Command.php
1993196 Update Command.php
1add2ad Update Command.php
b73f494 Update ApplicationDescription.php
8d0262f Update Command.php
b423ab4 Add hidden field
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix validation of empty values using SymfonyQuestionHelper::ask()
| Q | A
| ------------- | ---
| Branch? | 2.7
| 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 `QuestionHelper::ask()` it's allowed to return an empty value as answer, e.g:
```php
$helper = new QuestionHelper();
$question = new Question('foo', false);
$question->setValidator(function ($v) { return $v; });
$answer = $helper->ask($input, $output, $question);
```
Just typing `enter` for answering this question works, the value of `$answer` would be `false`.
But doing the same with `SymfonyQuestionHelper::ask()`:
```php
$helper = new SymfonyQuestionHelper();
$question = new Question('foo', false);
$question->setValidator(function ($v) { return $v; });
$answer = $helper->ask($input, $output, $question);
```
> [ERROR] A value is required.
Same for `''` or `null`.
Here I kept the same check but used as default validator, if a validator is set and allows an empty value to be returned then it's ok.
Also I am not sure about if this default validator should be kept, imho we should be consistent with the default question helper, using the `SymfonyQuestionHelper` should only impact the output.
Diff best viewed [like this](https://github.com/symfony/symfony/pull/20141/files?w=1)
ping @kbond
Commits
-------
a8b910b [Console] Fix validation of null values using SymfonyStyle::ask()
This PR was merged into the 3.2-dev branch.
Discussion
----------
Class existence resource
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see #20094
| License | MIT
| Doc PR | n/a
Commits
-------
222b56d [TwigBundle] added support for ClassExistenceResource when relevant
d98eb7b [Config] added ClassExistenceResource
This PR was merged into the 2.8 branch.
Discussion
----------
[Validator] Add Czech and Slovak translations for BIC
| 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
-------
af84d23 [Validator] Add Czech and Slovak translations for BIC
This PR was merged into the 3.2-dev branch.
Discussion
----------
Simplified link-to-source mapping definitions in debug.file_link_format
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19950
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7019
Having to json_encode here (or any other kind of encoding) is really tedious to deal with: it makes it hard to have things working quickly. `%f` and `%l` aren't encoded anyway, so let's use very unlikely chars as separators here also instead.
Commits
-------
27df38e Simplified link-to-source mapping definitions in debug.file_link_format
* 3.1:
[travis] Use hhvm-stable instead of discontinued hhvm-3.12
bumped Symfony version to 3.1.6
updated VERSION for 3.1.5
updated CHANGELOG for 3.1.5
bumped Symfony version to 2.8.13
updated VERSION for 2.8.12
updated CHANGELOG for 2.8.12
bumped Symfony version to 2.7.20
updated VERSION for 2.7.19
update CONTRIBUTORS for 2.7.19
updated CHANGELOG for 2.7.19
[Validator] Url validator not validating hosts ending in a number
This PR was squashed before being merged into the 2.7 branch (closes#20102).
Discussion
----------
[Validator] Url validator not validating hosts ending in a number
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (Should validate slightly more urls)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | None that I could find
| License | MIT
| Doc PR |
We ran into an issue where the URL validator wasn't validating URL that we got from a legitimate (intranet) URL. Afaict from skimming RFCs the URL `http://myhost123/` is valid, however the current regular expression doesn't accept the last part of a hostname (in this case the entire hostname is the last part as there are no periods in the host).
I've fixed this by adding the numbers unicode character property to the regular expression, I'm not sure but symbol characters (`\pS`) might need to be added to the group as well.
Commits
-------
934c434 [Validator] Url validator not validating hosts ending in a number
* 2.8:
Use "more entropy" option for uniqid()
reset constraint options
added checks for public services on compiler passes that use service id and not references
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Reset constraint options
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20106
| License | MIT
| Doc PR | reference to the documentation PR, if any
I think it's good to reset the internal pointer of the options array if we depend on `key($options)`. I've added tests to clarify we intentionally check for the first key.
The current behavior actually differs for hhvm/php7 - https://3v4l.org/e6r6E
Commits
-------
4c6ddd4 reset constraint options
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Config] avoid loaded non-needed class in prod
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
16489d6 [HttpKernel] avoid loading a class that's not-needed when doing HTTP
8371b50 [Config] avoid loaded non-needed class in prod
* 3.1:
[TwigBundle] added missing dependencies for tests
fixed CS
adding missing dep
[TwigBundle] Adjust CacheWarmingTest for TemplateCacheWarmer introduced in 2.8
[TwigBundle] Fix CacheWarmingTest are order dependent
Revert "bug #20080 [Form] compound forms without children should be considered rendered implicitly (backbone87)"
[2.7][VarDumper] Fix PHP 7.1 compat
[2.8][VarDumper] Fix PHP 7.1 compat
silent file operation to avoid open basedir issues
Fix#19943 Make sure to process each interface metadata only once
#17580 compound forms without children should be considered rendered implicitly
* 2.8:
[TwigBundle] added missing dependencies for tests
fixed CS
[TwigBundle] Adjust CacheWarmingTest for TemplateCacheWarmer introduced in 2.8
[TwigBundle] Fix CacheWarmingTest are order dependent
Revert "bug #20080 [Form] compound forms without children should be considered rendered implicitly (backbone87)"
Fix#19943 Make sure to process each interface metadata only once
#17580 compound forms without children should be considered rendered implicitly
This PR was merged into the 2.7 branch.
Discussion
----------
Fix#19943 Make sure to process each interface metadata only once
| Q | A
| ------------- | ---
| Branch? | 2.7+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19943
| License | MIT
| Doc PR | N/A
Here is the fix for #19943, If you have `InterfaceA <- InterfaceB <- Class` with a constraint on a method defined on `InterfaceA`, the constraint and its eventual violations are currently validated and reported twice.
Copy from https://github.com/symfony/symfony/issues/19943#issuecomment-250238529:
As far as I can see, the problem seems to arise in [`LazyLoadingMetadataFactory`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php#L117-L123):
[`ReflectionClass::getInterfaces()`](http://php.net/manual/en/reflectionclass.getinterfaces.php) returns both interfaces implemented directly and through inheritance (either through another interface or through a parent class). In the end, the following process occurs:
1. `PriceInterface` is parsed and its `NotBlank` constraint on `value` is loaded
2. `VariablePriceInterface` is parsed and inherits `PriceInterface`'s constraints (which is OK).
3. `ProductPrice` is parsed and inherits both `PriceInterface` and `VariablePriceInterface`'s constraints, which leads to a duplicated `NotBlank` constraint, one from each Interface.
The Best Way ™️ would be to be able to extract the list of interfaces implemented by a class directly only. However, the process seems a bit intricate... I will start working on it and prepare a PR to that effect. However, if any of you has a better idea, I'm all hears...
TODO:
- [x] Regression tests to make sure the bug doesn't reappear
Commits
-------
2f9b65aFix#19943 Make sure to process each interface metadata only once
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] compound forms without children should be considered rendered implicitly
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | possibly
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17580
| License | MIT
| Doc PR | n/a
Commits
-------
8234f2a#17580 compound forms without children should be considered rendered implicitly
Using file operations on a symlink that points to a file outside the
directories being allowed by the open_basedir setting leads to PHP
warnings being raised.
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Format JSON fixtures
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
Should make merging upstream easier due better diffs.
```php
foreach (glob('src/Symfony/Component/Console/Tests/Fixtures/*.json') as $file) {
file_put_contents($file, str_replace(PHP_EOL, "\n", json_encode(json_decode(trim(file_get_contents($file))), JSON_PRETTY_PRINT))."\n");
}
```
Should be re-applied on 2.8, 3.1 and master.
Commits
-------
2ca7823 format json fixtures
This PR was merged into the 2.7 branch.
Discussion
----------
[Finder] Trim trailing directory slash in ExcludeDirectoryFilterIterator
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19599
| License | MIT
| Doc PR | reference to the documentation PR, if any
In this context `path` equals `path/`
Commits
-------
e0e5f0c apply rtrim
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Handle arbitrary key length when the backend cant using hashing
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Saving some bits from #19521 :) Already awaited by PdoAdapter which defines the property.
Commits
-------
11f448f [Cache] Handle arbitrary key length when the backend cant using hashing
* 3.1:
expectedException expects FQCN
Fixed expectedException annotations
[Cache] Fix password used to make the redis connection.
Security and validators messages translation to Latvian
[Form] FormView->isRendered() remove dead code and simplify the flow
Fixed issue with legacy find() method not working as expected
* 2.8:
expectedException expects FQCN
Fixed expectedException annotations
Security and validators messages translation to Latvian
[Form] FormView->isRendered() remove dead code and simplify the flow
* 2.7:
Fixed expectedException annotations
Security and validators messages translation to Latvian
[Form] FormView->isRendered() remove dead code and simplify the flow
This PR was merged into the 3.1 branch.
Discussion
----------
[Ldap] Fixed issue with legacy find() method not working as expected
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19804
| License | MIT
| Doc PR |
This PR fixes two bugs. The first, with the legacy `LdapClient` class' `find()` method not working as expected, sometimes throwing errors, which is an after-effect of missing Ldap attributes normalisation in the ResultIterator, and the second one being that the `find()` method does not return the expected output, which should be the same as PHP's `ldap_get_entries()` method.
As a reminder, this method should only be used by legacy software, which need to provide compatibility with Symfony 3.0 and Symfony 2.8.
Commits
-------
3bae5ea Fixed issue with legacy find() method not working as expected
This PR was merged into the 2.7 branch.
Discussion
----------
Security and validators messages translation to Latvian
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
ff72f21 Security and validators messages translation to Latvian
This PR was merged into the 3.2-dev branch.
Discussion
----------
[ExpressionLanguage] fixed a BC break
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | fixes a BC break :)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see https://github.com/symfony/symfony/pull/19060#r79791581
| License | MIT
| Doc PR | n/a
Commits
-------
b00930f [ExpressionLanguage] fixed a BC break
* 3.1:
[VarDumper] Fix test
Revert "minor #20011 Use UUID for error codes for Form validator. (Koc)"
Use UUID for error codes for Form validator.
Use UUID for error codes for Form validator.
Fixed regression when exception message swallowed when logging it.
[HttpFoundation] Enable memcached tests with the latest memcached extension
* 2.8:
[VarDumper] Fix test
Revert "minor #20011 Use UUID for error codes for Form validator. (Koc)"
Use UUID for error codes for Form validator.
Use UUID for error codes for Form validator.
Fixed regression when exception message swallowed when logging it.
[HttpFoundation] Enable memcached tests with the latest memcached extension
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Form][EventDispatcher] Fix VarDumper usage related to perf regression
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19978
| License | MIT
| Doc PR | -
Commits
-------
294868e [Form][EventDispatcher] Fix VarDumper usage related to perf regression
This PR was merged into the 2.8 branch.
Discussion
----------
Use UUID for error codes for Form validator.
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | tiny, but it allowed http://symfony.com/doc/current/contributing/code/bc.html#changing-classes
| Deprecations? | no
| Tests pass? | I hope so :)
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
3693e83 Use UUID for error codes for Form validator.
* 2.7:
Revert "minor #20011 Use UUID for error codes for Form validator. (Koc)"
Use UUID for error codes for Form validator.
Fixed regression when exception message swallowed when logging it.
[HttpFoundation] Enable memcached tests with the latest memcached extension
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] Fixed route generation with fragment defined as defaults
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
As stated in https://symfony.com/blog/new-in-symfony-3-2-routing-improvements, it should support `_fragment` option as part of `_defaults` of route definition.
Commits
-------
3c36596 [Routing] Fixed route generation with fragment defined as defaults
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Translation] added Base Exception for the 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 | ~
Commits
-------
0fa4397 [Translation] added Base Exception for the component.
This PR was merged into the 2.7 branch.
Discussion
----------
[DX] Fixed regression when exception message swallowed when logging it.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | maybe, wait for Travis
| Fixed tickets | fixed regression introduced in #13418
| License | MIT
| Doc PR | -
The problem is: after merging referenced PR we cann't understand what error occured and why authentication request failed (see attached screenshot). Previously it displays exception message, but now it only displays class of the exception.
![9003644109](https://cloud.githubusercontent.com/assets/191082/18717550/f0df61c4-8028-11e6-8dbb-684e4928e913.jpg)
Commits
-------
042cb6b Fixed regression when exception message swallowed when logging it.
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] fix reference type argument type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
a8dd628 [Routing] fix reference type argument type
* 3.1:
[TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)
Make redis host configurable in tests
[Console] Fix empty optionnal options with = separator in argv
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DependencyInjection] Automatically detect the definitions class when possible
| 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/19161
| License | MIT
| Doc PR |
> Thanks to the features of php 7.0 we can now guess the class of a service created with a factory:
> ```php
> function myFactory(): MyServiceClass
> {
> }
> ```
>
> So I propose to create a new pass to automatically update the services definition when possible. This is particularly useful for autowiring (this way you don't have to copy-paste the class name of the service, especially when this is from a third party library).
>
> What do you think ?
Commits
-------
63afe3c [DependencyInjection] Automatically detect the definitions class when possible
This PR was squashed before being merged into the 3.1 branch (closes#19974).
Discussion
----------
Make redis host configurable in tests
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Makes running tests on dockerized environments possible, since we can now export the `REDIS_HOST` environment variable:
```
REDIS_HOST=redis ./phpunit src/Symfony/Component/Cache
```
If this gets merged, in master we can later replace the `SYMFONY__REDIS_HOST` usage in the FrameworkBundle with the new `env(REDIS_HOST)`.
Commits
-------
c87de00 Make redis host configurable in tests
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Security] AccessDeniedException: rename object to subject
| 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/19473#r72766336
| License | MIT
| Doc PR |
With this change the name is inline with what we use in the base voter
interface.
Commits
-------
9603ffa AccessDeniedException: rename object to subject
This PR was merged into the 3.2-dev branch.
Discussion
----------
fixed a deprecation warning in tests
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
9e1589e fixed a deprecation warning in tests
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Config] Fix (Yaml|Xml)ReferenceDumper for nested prototypes
| 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 tries to fix the nested prototypes case for the `YamlReferenceDumper` and `XmlReferenceDumper`.
### Before
```yml
cms_pages:
# Prototype
page: []
```
### After
```yml
cms_pages:
# Prototype
page:
# Prototype
locale:
title: ~ # Required
path: ~ # Required
```
~~However, the `YamlReferenceDumperTest::testDumper` is marked as skipped, due to another unsupported prototype usage, but that's another issue (the `connections` key). Thus, the bug fix must be tested manually :/ (I'd recommend to merge #19570 first)~~
Commits
-------
1e80510 [Config] Fix YamlReferenceDumper for nested prototypes
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | updated code exists only on master
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19807
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/6944
Because `parse_str()` turns some characters into underscores in keys (e.g. `.`).
Commits
-------
9b174fb [FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Yaml] Port of #19922 for 3.2
| Q | A
| ------------- | ---
| Branch? | master
| Tests pass? | yes
| License | MIT
The command has been moved in 3.2 so the new path is unmerged.
Commits
-------
017e88b [Yaml] Port of #19922 for 3.2
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DI] Allow injecting ENV parameters at runtime using %env(MY_ENV_VAR)%
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10138, #7555, #16403, #18155
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/6918
This is an alternative approach to #18155 for injecting env vars into container configurations.
With this PR, anywhere parameters are allowed, one can use `%env(ENV_VAR)%` to inject a dynamic env var. Additionally, if one sets a value to such parameters in e.g. the `parameter.yml` file (`env(ENV_VAR): foo`), this value will be used as a default value when the env var is not defined. If no default value is specified, an `EnvVarNotFoundException` will be thrown at runtime.
Unlike previous attempts that also used parameters (#16403), the implementation is compatible with DI extensions: before being dumped, env vars are resolved to uniquely identifiable string placeholders that can get through DI extensions manipulations. When dumped, these unique placeholders are replaced by dynamic calls to a getEnv method..
ping @magnusnordlander @dzuelke @fabpot
Commits
-------
bac2132 [DI] Allow injecting ENV parameters at runtime using %env(MY_ENV_VAR)% syntax
* 3.1:
added a comment about a workaround
[Finder] no PHP warning on empty directory iteration
[HttpKernel] Fixed the nullable support for php 7.1 and below
fixed CS
[Form] Fix typo in doc comment
Fix version constraint
[Config] Handle open_basedir restrictions in FileLocator
Fixed bad merge
[DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string
[bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
Use JSON_UNESCAPED_SLASHES for lint commands output
Fixed collapsed ChoiceType options attributes
[FrameworkBundle] Remove cache clearer default value in config
Consider the umask setting when dumping a file.
Fixed the nullable support for php 7.1 and below
Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
This PR was squashed before being merged into the 3.2-dev branch (closes#19197).
Discussion
----------
[Serializer][FrameworkBundle] Add a CSV encoder
| 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
Usage:
```php
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\Encoder\CsvEncoder;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
$serializer = new Serializer(array(new ObjectNormalizer()), array(new CsvEncoder()));
// or $serializer = $container->get('serializer'); when using the full stack framework
$serializer->encode($something, 'csv');
$serializer->decode(<<<'CSV'
id,name
1,Kévin
CSV
, 'csv');
```
CSV files must contain a header line with property names as keys.
ping @clementtalleu @Simperfit @gorghoa
Commits
-------
e71f5be [Serializer][FrameworkBundle] Add a CSV encoder
This PR was squashed before being merged into the 3.2-dev branch (closes#19257).
Discussion
----------
[Validator][Choice] Make strict the default option for choice validation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #18973
| License | MIT
| Doc PR | -
This is just the WIP as there are two options.
1. Just change default which would only possible to introduce in 4.x or in 3.2 if this BC break is considered as acceptable
2. Add a new option e.g. `strictComparison` which defaults to true in 4.x and deprecate the usage of the strict option for 3.2.
3. Just deprecate strict = false and remove the option but I would be against that as we remove flexibility which might be wanted.
As per discussion I went ahead with option 3. We can then still decide if we want to remove the option entirely or eventually reenable setting strict to false in a later release.
Commits
-------
177c513 [Validator][Choice] Make strict the default option for choice validation
This PR was squashed before being merged into the 3.2-dev branch (closes#19326).
Discussion
----------
[Serializer][FrameworkBundle] Add a YAML encoder
| 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
Add YAML support to the Serializer.
Commits
-------
9366a7d [Serializer][FrameworkBundle] Add a YAML encoder
This PR was merged into the 3.2-dev branch.
Discussion
----------
[PropertyInfo] Extract the logic converting a php doc to a Type
| 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 creates a new trait `PhpDocTypeHelperTrait` extracting some logic of the `PhpDocExtractor`.
I would like to detect the return type of some methods but this is not easily doable as I have to transform the doc types to a ``Type`` instance.
Is this ok for you ?
Commits
-------
d6e93d8 [PropertyInfo] Extract the logic converting a php doc to a Type in PhpDocTypeHelperTrait
This PR was merged into the 3.2-dev branch.
Discussion
----------
[master][console] Allow multiple options to be set.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| License | MIT
This PR add the possibility to set multiple options on a formatted string output.
Example:
```php
$output->writeln('<fg=green;options=bold,underscore>Test</>');
```
Secondly it makes the behavior on invalid values consistent.
```php
// current
$output->writeln('<fg=lime;>Test</>'); // throws exception
$output->writeln('<options=italic;>Test</>'); // silent ignore
// new
$output->writeln('<fg=lime;>Test</>'); // throws exception
$output->writeln('<options=italic;>Test</>'); // throws exception
```
All other changes are about making the code more strict or other SCA/CS fixes.
Commits
-------
1430138 Allow multiple options to be set.
This PR was squashed before being merged into the 3.2-dev branch (closes#19584).
Discussion
----------
[DependencyInjection] Improve ParameterNotFoundException when accessing a nested parameter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | n/a
A common problem under beginners is to think that the dot notation is used to access nested arrays saved in parameters (*common here means someone asks help for this problem at least once a week on IRC*). Adding a little extra detail to the exception message and a working alternative should help pointing these people in the right direction before spending time debugging this.
It's quite late in the night over here, so the wording of the exception message probably isn't great. I'm happy to accept better suggestions 😃
Commits
-------
df70f06 [DependencyInjection] Improve ParameterNotFoundException when accessing a nested parameter
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | -
| Fixed tickets | -
| License | MIT
| Doc PR | -
Following the cache warmer for annotations PR (https://github.com/symfony/symfony/pull/18533), this PR introduces a cache warmer for YAML and XML Validator configuration.
Based on the PhpArrayAdapter, it uses the naming conventions (`Resources/config/validation`) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7.
The benefit of this PR are the same than the ones of the annotations PR:
- validation configuration can be warmed up offline
- on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances)
- on PHP 7 again, we are not sensitive to APCu memory fragmentation
- last but not least, global performance is slightly better (I get 30us per class gain in Blackfire)
This PR also deprecates the framework.validator.cache key in favor of the cache pool introduced in https://github.com/symfony/symfony/pull/18544.
Commits
-------
6bdaf0b [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Following the cache warmer for annotations (#18533) and for the validator (#19485), this PR introduces a cache warmer for the Serializer YAML and XML metadata configuration (mainly groups).
Based on the PhpArrayAdapter, it uses the naming conventions (Resources/config/serialization) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7.
The benefit of this PR are the same than the ones of the previous PR:
- serialization metadata cache can be warmed up offline
- on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances)
- on PHP 7 again, we are not sensitive to APCu memory fragmentation
last but not least, global performance is slightly better (I get 30us per class gain in Blackfire)
As previous work on the Serializer cache system introduced issues (see 96e418a14f), it would be interesting to pay careful attention to the backward compatibility during the review (ping @Ener-Getick).
Commits
-------
810f469 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter
This PR was merged into the 3.2-dev branch.
Discussion
----------
[HttpFoundation] Deprecate extending some methods
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19727
| License | MIT
| Doc PR |
It's really hard to change methods signature because of bc. I'm proposing to deprecate extending some getters/setters of `Response` because of this (and because extending them is not really useful).
If you like this approach it could be used in other places to simplify bc in 4.0.
Edit: This causes issues (warnings always triggered) when mocking `Response` entirely but does it matter as people should only mock needed methods?
Commits
-------
c0a26bc [HttpFoundation] Deprecate extending some methods
This PR was squashed before being merged into the 3.2-dev branch (closes#19795).
Discussion
----------
Replace %count% with a given number out of the box
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
We already have this feature for [transchoice](https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Extension/TranslationExtension.php#L98) Twig filter, but why only for it? It will be consistent to have this for translator in general. We already have a `$number` parameter in `transChoice()` which we could easily use for that.
Before
```php
$this->get('translator')
->transChoice('1 apple|%count% apples', 7, [
'%count%' => 7,
]);
```
After:
```php
$this->get('translator')
->transChoice('1 apple|%count% apples', 7);
```
Commits
-------
4c1a65d Replace %count% with a given number out of the box
This PR was squashed before being merged into the 3.1 branch (closes#19784).
Discussion
----------
[HttpKernel] Fixed the nullable support for php 7.1 and below
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19771
| License | MIT
| Doc PR | ~
This PR gives support for for the new php 7.1 and will only work in beta3 or higher. I've had to backport the support to 3.1 because I consider this a bug that it won't work, even though 3.1 won't be supported for much longer. ~~The deprecation I've added in the `ArgumentMetadata` should not be triggered as all framework cases create it with the argument. Just for developers who for some reason implemented this manually, I've added the deprecation.~~
~~*If needed, I can re-open this against 3.2 and leave 3.1 "broken"*~~
On 7.1 lower than beta3 this will happen but shouldn't affect any higher versions (I hope).
```
There was 1 failure:
1) Symfony\Component\HttpKernel\Tests\ControllerMetadata\ArgumentMetadataFactoryTest::testNullableTypesSignature
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
0 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (...)
1 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (
'name' => 'bar'
- 'type' => 'stdClass'
+ 'type' => 'Symfony\Component\HttpKernel\Tests\Fixtures\Controller\stdClass'
'isVariadic' => false
'hasDefaultValue' => false
'defaultValue' => null
'isNullable' => true
)
2 => Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata Object (...)
)
/home/ivanderberg/projects/symfony/src/Symfony/Component/HttpKernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php:123
```
Commits
-------
4a1ab6d [HttpKernel] Fixed the nullable support for php 7.1 and below
* 2.8:
[Form] Fix typo in doc comment
[Config] Handle open_basedir restrictions in FileLocator
[bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
Use JSON_UNESCAPED_SLASHES for lint commands output
Fixed collapsed ChoiceType options attributes
Fixed the nullable support for php 7.1 and below
* 2.7:
[Form] Fix typo in doc comment
[Config] Handle open_basedir restrictions in FileLocator
[bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
Use JSON_UNESCAPED_SLASHES for lint commands output
Fixed collapsed ChoiceType options attributes
Fixed the nullable support for php 7.1 and below
This PR was merged into the 2.7 branch.
Discussion
----------
[bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
|Q |A |
|--- |--- |
|Branch |2.7 |
|Bug fix? |yes |
|New feature? |no |
|BC breaks? |yes |
|Deprecations?|no |
|Tests pass? |yes |
|Fixed tickets|#19899|
|License |MIT |
|Doc PR |n/a |
Closes#19899.
Commits
-------
4214311 [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| Fixed tickets | #14340
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/6944
`templating.helper.code.file_link_format` is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders.
Let's make it a general parameter that can be injected easily when required.
Commits
-------
1c4ca8c [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
This PR was merged into the 2.7 branch.
Discussion
----------
Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0)
| Q | A
| ------------- | ---
| Branch? | 2.7, 2.8, 3.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19784#issuecomment-243852825
| License | MIT
| Doc PR | ~
Fixes the nullable support for 2.7, 2.8 and 3.0, can probably be partially merged into 3.1 but not 100% sure.
/ping @fabpot
Commits
-------
9c48756 Fixed the nullable support for php 7.1 and below
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DI] Add corresponding service id in some exception messages
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| License | MIT
This already helped me figure out where was my mistake :)
Commits
-------
d739f8d [DI] Add corresponding service id in some exception messages
* 2.8:
Fix version constraint
Fixed bad merge
[DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string
Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
| 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/19677#issuecomment-244671828
| License | MIT
| Doc PR | N/A
Commits
-------
4a041e9 Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Update IpValidatorTest data set with a valid reserved IP
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19885
| License | MIT
| Doc PR | -
The validator uses PHP filter which was recently fixed (see https://bugs.php.net/bug.php?id=72972).
Commits
-------
86a151c [Validator] Update IpValidatorTest data set with a valid reserved IP
* 3.1:
[travis/appveyor] Wire simple-phpunit
[Console] fixed PHP7 Errors are now handled and converted to Exceptions
Fix#19721
Fix translation:update command count
bumped Symfony version to 2.8.12
updated VERSION for 2.8.11
updated CHANGELOG for 2.8.11
bumped Symfony version to 2.7.19
updated VERSION for 2.7.18
update CONTRIBUTORS for 2.7.18
updated CHANGELOG for 2.7.18
[Security] Optimize RoleHierarchy's buildRoleMap method
[FrameworkBundle] Fix Incorrect line break in exception message (500 debug page)
[Security] Added note inside phpdoc.
Minor cleanups and improvements
[form] lazy trans `post_max_size_message`.
[DI] Fix setting synthetic services on ContainerBuilder
[ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1)
* 2.8:
[travis/appveyor] Wire simple-phpunit
[Console] fixed PHP7 Errors are now handled and converted to Exceptions
Fix#19721
Fix translation:update command count
bumped Symfony version to 2.8.12
updated VERSION for 2.8.11
updated CHANGELOG for 2.8.11
bumped Symfony version to 2.7.19
updated VERSION for 2.7.18
update CONTRIBUTORS for 2.7.18
updated CHANGELOG for 2.7.18
[Security] Optimize RoleHierarchy's buildRoleMap method
* 2.7:
[travis/appveyor] Wire simple-phpunit
[Console] fixed PHP7 Errors are now handled and converted to Exceptions
Fix#19721
bumped Symfony version to 2.7.19
updated VERSION for 2.7.18
update CONTRIBUTORS for 2.7.18
updated CHANGELOG for 2.7.18
[Security] Optimize RoleHierarchy's buildRoleMap method
This PR was squashed before being merged into the 2.7 branch (closes#19813).
Discussion
----------
[Console] fixed PHP7 Errors are now handled and converted to Exceptions
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18484
| License | MIT
| Doc PR |
Commits
-------
d3c613b [Console] fixed PHP7 Errors are now handled and converted to Exceptions
This PR was squashed before being merged into the 2.7 branch (closes#19868).
Discussion
----------
[Security] Optimize RoleHierarchy's buildRoleMap method
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
I have an issue with a large role hierarchy(~150 roles). Optimized it a little bit
![image](https://cloud.githubusercontent.com/assets/858989/18271257/df6c4ba0-7439-11e6-8406-e13bdcefe9ca.png)
Commits
-------
c3b68b0 [Security] Optimize RoleHierarchy's buildRoleMap method
* 2.7:
[FrameworkBundle] Fix Incorrect line break in exception message (500 debug page)
Minor cleanups and improvements
[form] lazy trans `post_max_size_message`.
[DI] Fix setting synthetic services on ContainerBuilder
[ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1)
* 3.1:
[FrameworkBundle] Check for class existence before is_subclass_of
Update GroupSequence.php
Code enhancement and cleanup
[Form] Fix transformer tests after the ICU update
[DI] Add anti-regression test
Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
bumped Symfony version to 3.1.5
updated VERSION for 3.1.4
updated CHANGELOG for 3.1.4
bumped Symfony version to 2.8.11
updated VERSION for 2.8.10
updated CHANGELOG for 2.8.10
[BrowserKit] Fix cookie expiration on 32 bit systems
bumped Symfony version to 2.7.18
updated VERSION for 2.7.17
update CONTRIBUTORS for 2.7.17
updated CHANGELOG for 2.7.17
Update misleading comment about RFC4627
* 2.8:
[FrameworkBundle] Check for class existence before is_subclass_of
Update GroupSequence.php
Code enhancement and cleanup
[Form] Fix transformer tests after the ICU update
[DI] Add anti-regression test
Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
bumped Symfony version to 2.8.11
updated VERSION for 2.8.10
updated CHANGELOG for 2.8.10
[BrowserKit] Fix cookie expiration on 32 bit systems
bumped Symfony version to 2.7.18
updated VERSION for 2.7.17
update CONTRIBUTORS for 2.7.17
updated CHANGELOG for 2.7.17
Update misleading comment about RFC4627
* 2.7:
[FrameworkBundle] Check for class existence before is_subclass_of
Update GroupSequence.php
Code enhancement and cleanup
[DI] Add anti-regression test
Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
[BrowserKit] Fix cookie expiration on 32 bit systems
bumped Symfony version to 2.7.18
updated VERSION for 2.7.17
update CONTRIBUTORS for 2.7.17
updated CHANGELOG for 2.7.17
Update misleading comment about RFC4627
This PR was merged into the 2.7 branch.
Discussion
----------
Update misleading comment about RFC4627
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
RFC 4627 does not dictate escaping of HTML special characters
Commits
-------
72b6c9e Update misleading comment about RFC4627
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Make ClassStub handle missing classes or methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes (well, missing feat in previous PR)
| Tests pass? | yes
| License | MIT
So that one can still add ellipses when dumping about non existing classes or methods.
Commits
-------
73b3cf7 [VarDumper] Make ClassStub handle missing classes or methods
This PR was submitted for the 3.0 branch but it was merged into the 2.7 branch instead (closes#19862).
Discussion
----------
Update GroupSequence.php
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | no
Corrected the docblock example
Commits
-------
c8f3741 Update GroupSequence.php
This PR was squashed before being merged into the 2.7 branch (closes#19830).
Discussion
----------
Code enhancement and cleanup
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
325da3c Code enhancement and cleanup
On 32-bit systems the cookie expiration value was not being calculated
correctly as it was being fetched as an integer. When the timestamp exceeded
the PHP_INT_MAX size it would return an invalid value, breaking the cookie
construction.
The BrowserKit cookie has now been updated to get the timestamp as a string
which works around this platform limitation.
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Add LinkStub to create links in HTML dumps
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| License | MIT
This builds on top of #19797 & adds a new `LinkStub` to inform HtmlDumper about values that can be dumped as html links.
![capture du 2016-09-01 16-37-56](https://cloud.githubusercontent.com/assets/243674/18171810/8a786518-7063-11e6-9719-1eca295087e7.png)
Note in the screenshot:
- the "file" item has ellipsis,
- the browser displays the target at the bottom
Commits
-------
2b5d642 [VarDumper] Add LinkStub to create links in HTML dumps
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DI] Dont use Container::get() when fetching private services internally
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19683, #19682, #19680
| License | MIT
As spotted by @wouterj, we forgot to remove the deprecation notice when doing internal calls to get private services.
Yet, we don't need to get through this `get()` method, because we can already resolve many things at compile time for private services. This will provide another small performance optim, and fix the issue.
Commits
-------
a9c79fb [DI] Dont use Container::get() when fetching private services internally
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Make the line clickable to toggle dumps
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| License | MIT
The arrow to toggle dumps is too small. Let's make the text before it clickable.
Commits
-------
2697dd5 [VarDumper] Make the line clickable to toggle dumps
This PR was merged into the 2.7 branch.
Discussion
----------
[Yaml] Remove legacy code
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
It looks like these lines were forgotten during the transition to 2.0 as references are already [managed in `Inline`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Yaml/Inline.php#L542-L559).
Commits
-------
a88dff3 [Yaml] Remove legacy code
* 3.1:
[VarDumper] Various minor fixes & cleanups
Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
[Config] Fix DirectoryResourceTest for symlinks
[HttpKernel] Add missing SsiFragmentRendererTest
[DoctrineBridge] Fix exception message and tests after misresolved merge
Fixes the calendar in constructor to handle null
* 2.8:
[VarDumper] Various minor fixes & cleanups
Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
[HttpKernel] Add missing SsiFragmentRendererTest
[DoctrineBridge] Fix exception message and tests after misresolved merge
Fixes the calendar in constructor to handle null
* 2.7:
[VarDumper] Various minor fixes & cleanups
Revert "bug #18935 [Form] Consider a violation even if the form is not submitted (egeloen)"
[HttpKernel] Add missing SsiFragmentRendererTest
Fixes the calendar in constructor to handle null
This PR was merged into the 2.7 branch.
Discussion
----------
[VarDumper] Various minor fixes & cleanups
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| Tests pass? | yes
| License | MIT
Minor fixes & cleanups found while working on a few VarDumper enhancements.
I'm going to merge this one quickly to unlock the other PRs I'm preparing for master.
Commits
-------
a989491 [VarDumper] Various minor fixes & cleanups
This PR was merged into the 3.1 branch.
Discussion
----------
[Config] Fix DirectoryResourceTest for symlinks
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no (only tests, locally)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Tests were failing locally (on my macbook), because the `DirectoryResource` implementation now uses `realpath`.
Which means the path returned by `->getResource()` may differ from the given one in case it is a symlink:
```diff
There were 2 failures:
1) Symfony\Component\Config\Tests\Resource\DirectoryResourceTest::testGetResource
->getResource() returns the path to the resource
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator
+/private/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator
src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php:56
2) Symfony\Component\Config\Tests\Resource\DirectoryResourceTest::testSerializeUnserialize
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator
+/private/var/folders/j0/grc5nstx5b5f95cgg09_cy_h0000gn/T/symfonyDirectoryIterator
src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php:169
```
Commits
-------
56f74eb [Config] Fix DirectoryResourceTest for symlinks
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Register terminal env variables
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19719
| License | MIT
| Doc PR | -
Solves #19719 by setting `COLUMNS` & `LINES` env vars when running an Application.
Those env vars are then meant to be reused when using the Process component.
~~It creates a new `Terminal::registerEnv()` method allowing to register terminal related informations into environment variables. ~~It allows getting "consistent terminal informations" across processes.~~
Unless the env vars handling is backported from the 3.2 `Terminal` class to older branches in the `Application` class, the mentioned issue can't be solved this way.
Commits
-------
926bc51 [Console] Register terminal env variables
This PR was merged into the 3.1 branch.
Discussion
----------
[Yaml] sync test and actually triggered message
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see failures in #19757
| License | MIT
| Doc PR |
Commits
-------
e8dfd4d [Yaml] sync test and actually triggered message
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Get dump as string with `$dumper->dump(..., true);`
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| License | MIT
ping @lyrixx @wouterj since you expressed interest in boilerplate reduction around this in the past :)
Commits
-------
4be9776 [VarDumper] Get dump as string with `$dumper->dump(..., true);`
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Fix Application::setDefaultCommand() missing return in docblock
| Q | A
| ------------- | ---
| Branch? | master
| License | MIT
Despite the fact IDEs are clever enough to make this useless, I think it's clearly part of the contract of this public method anyway 😄
Commits
-------
0165835 [Console] Fix Application::setDefaultCommand() missing return in docblock
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Add missing SsiFragmentRendererTest
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
One notable difference between ESI/SSI fragments renderers is that [passing options to the strategy doesn't impact the rendered ssi include tag](d666c64eb0 (diff-98eb5db767a1d6600cff43b74800ae46R37)).
Commits
-------
6c89199 [HttpKernel] Add missing SsiFragmentRendererTest
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Yaml] improve changelog and upgrade entries
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Improves the wording as suggested by @javiereguiluz in https://github.com/symfony/symfony/pull/19538#issuecomment-237769389.
Commits
-------
e288256 [Yaml] improve changelog and upgrade entries
* 3.1:
fix typo
add "provides" for psr/cache-implementation
[Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
[FrameworkBundle][Security] Remove useless mocks
Add symfony/inflector to composer.json "replaces"
[DoctrineBridge] Enhance exception message in EntityUserProvider
added friendly exception when constraint validator does not exist or it is not enabled
remove duplicate instruction
[FrameworkBundle] Remove TranslatorBagInterface check
[FrameworkBundle] Remove duplicated code in RouterDebugCommand
[Validator] fixed duplicate constraints with parent class interfaces
SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
* 2.8:
[Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
[FrameworkBundle][Security] Remove useless mocks
[DoctrineBridge] Enhance exception message in EntityUserProvider
added friendly exception when constraint validator does not exist or it is not enabled
remove duplicate instruction
[FrameworkBundle] Remove TranslatorBagInterface check
[FrameworkBundle] Remove duplicated code in RouterDebugCommand
[Validator] fixed duplicate constraints with parent class interfaces
SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
* 2.7:
[Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
[FrameworkBundle][Security] Remove useless mocks
[DoctrineBridge] Enhance exception message in EntityUserProvider
added friendly exception when constraint validator does not exist or it is not enabled
remove duplicate instruction
[FrameworkBundle] Remove TranslatorBagInterface check
[FrameworkBundle] Remove duplicated code in RouterDebugCommand
[Validator] fixed duplicate constraints with parent class interfaces
SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] Add seamless support for unicode requirements
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #3629, #5236, #19562
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/6890
This PR adds unicode support to route matching and generation by automatically adding the `u` modifier to regexps that use either unicode characters or unicode enabled character classes (e.g. `\p...` `\x{...}` `\X`).
As a side note, if one wants to match a single unicode character (vs a single byte), one should use `\PM` or `\X` instead of `.` *or* set the `unicode` parameter to true.
Commits
-------
a829d34 [Routing] Add seamless support for unicode requirements
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Handle "title" attribute on virtual properties
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| License | MIT
As seen with @wouterj , it would be better to *not* display the stack level in front of each stack line.
This PR does just that, and moves the stack level to a title attribute in HtmlDumper.
![capture du 2016-08-23 14-09-43](https://cloud.githubusercontent.com/assets/243674/17891395/cc40b088-693b-11e6-8523-89ff51be929a.png)
Commits
-------
19bcf63 [VarDumper] Handle "title" attribute on virtual properties
This PR was squashed before being merged into the 3.2-dev branch (closes#19638).
Discussion
----------
[DependencyInjection] Factorize listing of setters
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Add a new method to list setters of a class.
Commits
-------
163fbf4 [DependencyInjection] Factorize listing of setters
This PR was merged into the 2.7 branch.
Discussion
----------
[SecurityBundle] BasicAuthenticationListener: simpler getting value from Request
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Unless I'm mistaken, the default `null` should be OK. If it's not, I will create a new PR with a test proving that `false` or other "special" value must be used.
Commits
-------
d67f090 SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
* 3.1:
[ClassLoader] Fix tests
[Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
[DependencyInjection] PhpDumper::isFrozen inconsistency
[DI] Cleanup array_key_exists
include dynamic services in list of alternatives
[Debug] Swap dumper services at bootstrap
* 2.8:
[ClassLoader] Fix tests
[Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
[DependencyInjection] PhpDumper::isFrozen inconsistency
[DI] Cleanup array_key_exists
include dynamic services in list of alternatives
[Debug] Swap dumper services at bootstrap
* 2.7:
[ClassLoader] Fix tests
[Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
[DependencyInjection] PhpDumper::isFrozen inconsistency
[DI] Cleanup array_key_exists
include dynamic services in list of alternatives
[Debug] Swap dumper services at bootstrap
This PR was merged into the 2.7 branch.
Discussion
----------
[ClassLoader] Fix tests
| Q | A
| ------------- | ---
| Branch? | 2.7
| Tests pass? | yes
| License | MIT
As discussed right now on php-internals, this string is ignored and the docs only tells about null.
Commits
-------
0f95708 [ClassLoader] Fix tests
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Swap dumper services at bootstrap
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
This commit fix a bug when using debug function too soon.
For example, if you call dump function during kernel::boot() the
dump output will be sent to stderr, even in a web context.
With this patch, the data collector is used by default, so the
dump output is send to the WDT. In a CLI context, if dump is used
too soon, the datacollector will buffer it, and release it at the
end of the script. So in this case everything will be visible by the
end used.
Commits
-------
d80589c [Debug] Swap dumper services at bootstrap
This PR was merged into the 2.7 branch.
Discussion
----------
[DI][2.7] Include dynamic services in alternatives
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
Commits
-------
428b5cc include dynamic services in list of alternatives
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes (aka "small-bc-breaks")
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| Tests pass? | yes
| License | MIT
On PHP 7.2:
- `is_object()` is going to return `true` for `__PHP_Incomplete_Class` instances
- `gettype($closed_resource);` returns "resource (closed)"
ping @nikic FYI
see https://travis-ci.org/symfony/symfony/jobs/154114269 for fixed tests (except the one on ClassLoader which is a BC break on 7.1 that should be fixed there IMHO).
Commits
-------
feb2cd0 [Debug][HttpKernel][VarDumper] Prepare for committed 7.2 changes
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle][Debug] Fix default config and cleaning of traces
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| Tests pass? | yes
| Fixed tickets | Follow up #19568
| License | MIT
| Doc PR | -
The default value of `framework.php_errors.log` must be `%kernel.debug%` to have deprecations and silenced errors logged in dev as before.
Cleaning the trace was broken because a closure can't be bound to an internal class.
This PR fixes both issues and enhance trace cleaning a bit by removing arguments from traces so that they take less memory when collected as part of the context of log messages.
Commits
-------
f640870 [FrameworkBundle][Debug] Fix default config and cleaning of traces
This PR was squashed before being merged into the 3.2-dev branch (closes#19339).
Discussion
----------
[WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Currently when we use nested forms and an error occurs into one of them, it's not displayed "easily" in the form panel profiler:
![first](https://cloud.githubusercontent.com/assets/2028198/17125622/1fd15142-52c3-11e6-830e-17b3e341ba60.png)
This happen because only the root form is expanded and the children are shown collapsed "by default".
**The main problem is to search where is the form with error**.
The purpose of this PR is to show expanded all forms that contains children with error, reducing a little bit the developer's time when debugging.
PR result when we access to the form panel profiler:
![form-error-result](https://cloud.githubusercontent.com/assets/2028198/17125447/83eb9c0c-52c1-11e6-94bc-a2a7492eea43.png)
In red the full path to the error.
![form-error-result2](https://cloud.githubusercontent.com/assets/2028198/17125459/a04de95e-52c1-11e6-8980-84a5dcd0914a.png)
Commits
-------
d626b28 [WebProfilerBundle][Form][DX] To expand the form nodes that contains children with errors
* 3.1:
[travis] Use 7.0 until 7.1 is fixed
[DIC] Fix service autowiring inheritance
[Serializer] Fix denormalization of arrays
[SecurityBundle] Add missing deprecation notice for form_login.intention
Verify explicitly that the request IP is a valid IPv4 address
[WebProfilerBundle] replaces tabs characters by spaces.
* 2.8:
[travis] Use 7.0 until 7.1 is fixed
[DIC] Fix service autowiring inheritance
[SecurityBundle] Add missing deprecation notice for form_login.intention
Verify explicitly that the request IP is a valid IPv4 address
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Fix service autowiring inheritance
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19615
| License | MIT
| Doc PR | n/a
This makes services inherit the `autowire` attribute from their parent and fix the ability to override it from the child.
Fixed cases:
- Simple inheritance
```yaml
parent:
class: Foo
abstract: true
autowire: true
child:
class: Foo
```
- Set in the child (only)
```yaml
parent:
class: Foo
abstract: true
child:
class: Foo
autowire: true
```
- Set in the parent, changed in the child
```yaml
parent:
class: Foo
abstract: true
autowire: true
child:
class: Foo
autowire: false
```
Commits
-------
fb95bdc [DIC] Fix service autowiring inheritance
This PR was squashed before being merged into the 2.7 branch (closes#19666).
Discussion
----------
Verify explicitly that the request IP is a valid IPv4 address
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Take the following base code (the array is based on [CloudFlare IP Ranges](https://www.cloudflare.com/ips/)):
```php
use Symfony\Component\HttpFoundation\IpUtils;
$ips = [
"103.21.244.0/22",
"103.22.200.0/22",
"103.31.4.0/22",
"104.16.0.0/12",
"108.162.192.0/18",
"131.0.72.0/22",
"141.101.64.0/18",
"162.158.0.0/15",
"172.64.0.0/13",
"173.245.48.0/20",
"188.114.96.0/20",
"190.93.240.0/20",
"197.234.240.0/22",
"198.41.128.0/17",
"199.27.128.0/21",
"2400:cb00::/32",
"2405:8100::/32",
"2405:b500::/32",
"2606:4700::/32",
"2803:f800::/32",
"2c0f:f248::/32",
"2a06:98c0::/29",
];
```
Before this PR, the following code would have returned `true` instead of the expected `false` value:
```php
IpUtils::checkIp('blablabla', $ips);
```
This due to the `ip2long` function returning `false` for an invalid IP address, thus returning `"00000000000000000000000000000000"` with the following code:
```php
sprintf('%032b', ip2long('blablabla'));
```
To fix this I simply check if the `$requestIp` variable contains a valid IP address.
Commits
-------
17e418c Verify explicitly that the request IP is a valid IPv4 address
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Fix too strict test
| Q | A
| ------------- | ---
| Branch? | 2.7
| Tests pass? | yes
| License | MIT
This test is too strict and prevents adding properties to Data objects for no reason.
Commits
-------
2e7301d [HttpKernel] Fix too strict test
* 3.1:
Disable CLI color for Windows 10 greater than 10.0.10586
Exception details break the layout
[HttpKernel] Remove wrong docblock
[HttpKernel] Fix HttpCache validation HTTP method
[FrameworkBundle] Fix default lifetime of cache pools
Move space from the before 'if' to the after 'if'
[TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
* 2.8:
Disable CLI color for Windows 10 greater than 10.0.10586
Exception details break the layout
[HttpKernel] Remove wrong docblock
[HttpKernel] Fix HttpCache validation HTTP method
Move space from the before 'if' to the after 'if'
[TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
* 2.7:
Disable CLI color for Windows 10 greater than 10.0.10586
Exception details break the layout
[HttpKernel] Remove wrong docblock
[HttpKernel] Fix HttpCache validation HTTP method
Move space from the before 'if' to the after 'if'
[TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
This PR was merged into the 2.7 branch.
Discussion
----------
Exception details break the layout
Exception details break the layout
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| License | MIT
By adding `word-wrap: break-word;` the exception details will wrap inside the block.
Commits
-------
00b4ecb Exception details break the layout
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Add line in trace indexes
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Allows seeing the line number when the frames are collapsed, e.g.:
![capture du 2016-08-18 13-48-27](https://cloud.githubusercontent.com/assets/243674/17772691/872c6bd0-654a-11e6-9886-95fe57baca61.png)
Commits
-------
0b13016 [VarDumper] Add line in trace indexes
This commit fix a bug when using debug function too soon.
For example, if you call dump function during kernel::boot() the
dump output will be sent to stderr, even in a web context.
With this patch, the data collector is used by default, so the
dump output is send to the WDT. In a CLI context, if dump is used
too soon, the datacollector will buffer it, and release it at the
end of the script. So in this case everything will be visible by the
end used.
* 3.1:
[Routing] Add missing options in docblock
[VarDumper] Fix dumping continuations
[PropertyInfo] Fix an error in PropertyInfoCacheExtractor
[HttpFoundation] fixed Request::getContent() reusage bug
[Form] Skip CSRF validation on form when POST max size is exceeded
Use try-finally where it possible
[DependencyInjection] ContainerBuilder: Remove obsolete definitions
Enhance the phpDoc return types so IDEs can handle the configuration tree.
fixes
Remove 3.0 from branch suggestions for fixes in PR template
[Process] Strengthen Windows pipe files opening (again...)
[Cache] Handle unserialize() failures gracefully
Fix#19531 [Form] DateType fails parsing when midnight is not a valid time
This PR was merged into the 3.2-dev branch.
Discussion
----------
[HttpFoundation] Add named constructor on JsonResponse
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
To make easier construction with raw json. It is a simple addition but having something like :
```php
return new JsonResponse($content, Response::HTTP_OK, [], true);
```
and
```php
return new JsonResponse($content, Response::HTTP_OK, []);
```
is not very obvious to get the difference without going to read the JsonResponse constructor.
Commits
-------
6d5a65d Add named constructor on JsonResponse
* 2.8:
[Routing] Add missing options in docblock
[VarDumper] Fix dumping continuations
[HttpFoundation] fixed Request::getContent() reusage bug
[Form] Skip CSRF validation on form when POST max size is exceeded
Enhance the phpDoc return types so IDEs can handle the configuration tree.
fixes
Remove 3.0 from branch suggestions for fixes in PR template
[Process] Strengthen Windows pipe files opening (again...)
Fix#19531 [Form] DateType fails parsing when midnight is not a valid time
* 2.7:
[Routing] Add missing options in docblock
[VarDumper] Fix dumping continuations
[HttpFoundation] fixed Request::getContent() reusage bug
[Form] Skip CSRF validation on form when POST max size is exceeded
Enhance the phpDoc return types so IDEs can handle the configuration tree.
fixes
Remove 3.0 from branch suggestions for fixes in PR template
[Process] Strengthen Windows pipe files opening (again...)
Fix#19531 [Form] DateType fails parsing when midnight is not a valid time
This PR was merged into the 3.1 branch.
Discussion
----------
Use try-finally where it possible
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Just a minior refactoring for using PHP 5.5 feature.
Commits
-------
747ddf6 Use try-finally where it possible
This PR was squashed before being merged into the 3.1 branch (closes#19437).
Discussion
----------
[PropertyInfo] Fix an error in PropertyInfoCacheExtractor
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
An argument was forgotten in the ``PropertyInfoCacheExtractor`` class leading to exceptions such as
```
PHP Warning: ucfirst() expects parameter 1 to be string, array given in /home/guilhem/github/ast-test/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php on line 318
```
and making it unusable.
ping @dunglas
Commits
-------
d19b151 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
This PR was squashed before being merged into the 2.7 branch (closes#19549).
Discussion
----------
[HttpFoundation] fixed Request::getContent() reusage bug
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
After calling ```Request::getContent(true)```, subsequent calls to the
same instance method (withouth the ```$asResource``` flag) always returned
```false``` instead of the request body as a plain string.
A unit test already existed to guard against this behaviour (the 'Resource then fetch' case) but it
yielded a false positive because it was comparing ```''``` to ```false``` using
PHPUnit's ```assertEquals``` method instead of ```assertSame```.
For completeness sake I also added the missing usage permutations in
the data provider, which already worked OK.
Commits
-------
c42ac66 [HttpFoundation] fixed Request::getContent() reusage bug
This PR was merged into the 3.1 branch.
Discussion
----------
[DependencyInjection] ContainerBuilder: Remove obsolete definitions
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? |no
| BC breaks? | may be considered
| Deprecations? | may be considered
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
IIUC, [the obsolete definitions thing was tied to scoped & sync services](https://github.com/symfony/symfony/pull/7007).
Thus, this code [is not meant to be used since 3.0 and can be removed](https://github.com/symfony/symfony/pull/13289).
However, it may be considered as a BC break and would require introducing a new deprecation instead, because the current code allows to set a service on a frozen container if it has an obsolete synthetic definition...which is weird, isn't it ? (I doubt this feature was explicitly intended to allow setting a synthetic service more than once, and it wasn't before sync services introduction)
I suggest this as a patch for 3.1, under the pretext of forgotten code tied to a previous deprecation & feature removal, but let me know if it should be considered differently.
Commits
-------
daa7d00 [DependencyInjection] ContainerBuilder: Remove obsolete definitions
This PR was squashed before being merged into the 2.7 branch (closes#19373).
Discussion
----------
[Form] Skip CSRF validation on form when POST max size is exceeded
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19140
| License | MIT
| Doc PR | N/A
In #19140 the CSRF validation listener was not aware that the POST max size had exceeded, and was adding a form error message that wasn't relevant to the actual error.
This introduces the `ServerParams` utility class into the `CsrfValidationListener` and checks that the POST max size has not been exceeded. If it has then it won't bother trying to validate the CSRF token.
My main concern with this change is that it opens up an attack vector around tokens, but I've encapsulated the request size validation in a single method in `ServerParams` now so that the request handlers are using the same logic.
Commits
-------
289531f [Form] Skip CSRF validation on form when POST max size is exceeded
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Drop TaggedCacheItemInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Introducing this interface was a mistake, we should drop it: the CacheItem class is final, and it can be instantiated only through a cache adapter. Which means there is no way to reuse this interface in any meaningful way as far as extensibility/interoperability is concerned.
Commits
-------
624890b [Cache] Drop TaggedCacheItemInterface
This PR was merged into the 2.7 branch.
Discussion
----------
Fix#19531 [Form] DateType fails parsing when midnight is not a valid time
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19531
| License | MIT
| Doc PR |
Commits
-------
c951bb6Fix#19531 [Form] DateType fails parsing when midnight is not a valid time
* 3.1:
[travis] fix after box updates
Console: Fix indentation of Help: section of txt usage help
[Intl] Update ICU data to 57.1
[Config] Improved test
Added class existence check if is_subclass_of() fails in compiler passes
* 2.8:
[travis] fix after box updates
Console: Fix indentation of Help: section of txt usage help
[Intl] Update ICU data to 57.1
[Config] Improved test
Added class existence check if is_subclass_of() fails in compiler passes
* 2.7:
[travis] fix after box updates
Console: Fix indentation of Help: section of txt usage help
[Intl] Update ICU data to 57.1
[Config] Improved test
Added class existence check if is_subclass_of() fails in compiler passes
This PR was squashed before being merged into the 3.2-dev branch (closes#19511).
Discussion
----------
Use a dedicated exception in the file locator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR adds a dedicated `FileLocatorFileNotFoundException` class to the file locator, so it is possible to catch file locator exceptions separately from invalid argument exceptions.
```php
try {
foreach ($container->get('file_locator')->locate('file.php', null, false) as $file) {
include $file;
}
} catch (\InvalidArgumentException $e) {
// this will catch both file locator exceptions as well as
// any invalid argument exception thrown in an included file
}
```
With the dedicated exceptions, we could do this:
```php
try {
foreach ($container->get('file_locator')->locate('file.php', null, false) as $file) {
include $file;
}
} catch (FileLocatorFileNotFoundException $e) {
// this will only ignore file locator exceptions
}
```
Commits
-------
ee4adaa Use a dedicated exception in the file locator
This PR was squashed before being merged into the 3.2-dev branch (closes#19529).
Discussion
----------
Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates
| 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/19526
| License | MIT
| Doc PR |
Commits
-------
cb362f2 Add Yaml::PARSE_EXCEPTION_ON_DUPLICATE to throw exceptions on duplicates
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Security] Expose the required roles in AccessDeniedException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Nowadays it is more and more common to protect some sensitive actions and part of a website using 2FA or some re-authentication mechanism (per example, on Github you have to enter your password again when you add an ssh key). But currently, in Symfony, it is really hard to implement without having to duplicate the logic, provide an explicit list of URLs to protect or hack into the security component.
A good way to achieve that would be to add a special role (like IS_AUTHENTICATED_FULLY) and use it in the access map. But it requires us to be able to have a custom logic in an ExceptionListener depending on the roles behind an AccessDeniedException.
With this patch we could write an ExceptionListener of this kind (a similar logic could also be used in an AccessDeniedHandler):
```php
public function onKernelException(GetResponseForExceptionEvent $event)
{
$exception = $event->getException();
do {
if ($exception instanceof AccessDeniedException) {
foreach ($exception->getAttributes() as $role) {
if ($role === 'IS_AUTHENTICATED_2FA' && !$this->accessDecisionManager->decide($this->tokenStorage->getToken(), $role, $exception->getObject())) {
// Start 2FA
}
}
}
} while (null !== $exception = $exception->getPrevious());
}
```
Replaces #18661
Commits
-------
6618c18 [Security] Expose the required roles in AccessDeniedException
This PR was squashed before being merged into the 2.7 branch (closes#19468).
Discussion
----------
[Intl] Update ICU data to 57.1
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19315
| License | MIT
| Doc PR | -
I think the only thing that makes sense with ICU is to always be on the latest available version.
Commits
-------
a48c00b [Intl] Update ICU data to 57.1
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Improved test
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
456d53a [Config] Improved test
This PR was merged into the 2.7 branch.
Discussion
----------
Added class existence check if is_subclass_of() fails in compiler passes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | no
Backport of #19342 to 2.7 branch
Commits
-------
77adea7 Added class existence check if is_subclass_of() fails in compiler passes
* 3.1:
[Routing] Reorder assert parameters
[Cache] Use SCAN instead of KEYS with Redis >= 2.8
Added missing czech validators translation of not expected charset
Improved deprecation message
Workaround another buggy PHP warning
Add czech translation for Url and Length validator
Add slovak translation for Url and Length validator
This PR was merged into the 3.1 branch.
Discussion
----------
[Cache] Use SCAN instead of KEYS with Redis >= 2.8
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With #19521 coming, clearing cache keys by prefix is going to be used a lot more often.
Time to fix Redis cache clearing.
Commits
-------
aadeb11 [Cache] Use SCAN instead of KEYS with Redis >= 2.8
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Reorder assert parameters
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The expected value must be the first parameter.
Commits
-------
7f88796 [Routing] Reorder assert parameters
This PR was merged into the 3.1 branch.
Discussion
----------
[DX] Improved YAML deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
This eases the upgrade as it shows you which strings you need to update.
Commits
-------
3e16ef8 Improved deprecation message
This PR was merged into the 2.7 branch.
Discussion
----------
Added missing czech validators translation of not expected charset
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Profiler was complaining about using a not translated message so I translated it.
Not sure if bug or feature. The bug label is probably not apropriate, sorry. But I guess it should be merged to all versions.
Commits
-------
7eacae8 Added missing czech validators translation of not expected charset
* 3.1:
Relax 1 test failing with latest PHP versions
bumped Symfony version to 2.8.10
[Cache] Minor cleanup
Remove usage of __CLASS__ outside of a class
[HttpKernel] Fix variable conflicting name
[Process] Fix double-fread() when reading unix pipes
[Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
[Validator] Fix dockblock typehint in XmlFileLoader
bumped Symfony version to 3.1.4
updated VERSION for 3.1.3
updated CHANGELOG for 3.1.3
bumped Symfony version to 2.8.10
updated VERSION for 2.8.9
updated CHANGELOG for 2.8.9
bumped Symfony version to 2.7.17
updated VERSION for 2.7.16
update CONTRIBUTORS for 2.7.16
updated CHANGELOG for 2.7.16
Conflicts:
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 3.1 branch.
Discussion
----------
[Cache] Minor cleanup
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
34d9518 [Cache] Minor cleanup
* 2.8:
Relax 1 test failing with latest PHP versions
bumped Symfony version to 2.8.10
Remove usage of __CLASS__ outside of a class
[HttpKernel] Fix variable conflicting name
[Process] Fix double-fread() when reading unix pipes
[Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
[Validator] Fix dockblock typehint in XmlFileLoader
bumped Symfony version to 2.8.10
updated VERSION for 2.8.9
updated CHANGELOG for 2.8.9
bumped Symfony version to 2.7.17
updated VERSION for 2.7.16
update CONTRIBUTORS for 2.7.16
updated CHANGELOG for 2.7.16
Minor fixes
[Console] Overcomplete argument exception message tweak.
fixed bad auto merge
Console table cleanup
undefined offset fix (#19406)
[EventDispatcher] Removed unused variable
Conflicts:
CHANGELOG-2.7.md
CHANGELOG-3.0.md
src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
src/Symfony/Component/Console/Tests/Helper/TableTest.php
src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/legacy-container9.php
src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.8 branch.
Discussion
----------
[VarDumper] Relax 1 test failing with latest PHP versions
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | o
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | reference to the documentation PR, if any
Related to php bug https://bugs.php.net/72646 which is fixed in 5.6.25RC1, 7.0.10RC1, 7.1.0beta2
Detected in Fedora CI, failed since 7.0.10RC1, see
https://apps.fedoraproject.org/koschei/package/php-symfony
Commits
-------
6703b41 Relax 1 test failing with latest PHP versions
eabbcf0 bumped Symfony version to 2.8.10
* 2.7:
Remove usage of __CLASS__ outside of a class
[HttpKernel] Fix variable conflicting name
[Process] Fix double-fread() when reading unix pipes
[Process] Fix AbstractPipes::write() for a situation seen on HHVM (at least)
[Validator] Fix dockblock typehint in XmlFileLoader
bumped Symfony version to 2.7.17
updated VERSION for 2.7.16
update CONTRIBUTORS for 2.7.16
updated CHANGELOG for 2.7.16
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
Added error-suppression to the `is_executable($path)` call, too, per the bug noted just above.
The cited issue manifests as such without it:
```
ErrorException in ExecutableFinder.php line 63:
is_executable(): open_basedir restriction in effect. File(/usr/share/php) is not within the allowed path(s): (/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/local/zend/var/zray/extensions:/usr/local/zend/share:/usr/local/zend/var/plugins)
```
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Fix variable conflicting name
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Simply fix a conflicting name (`$bundle` is used for the foreach on line 466 and 476). It works for the moment only because there is nothing after the second foreach inside the first.
Commits
-------
9ac9f55 [HttpKernel] Fix variable conflicting name
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix double-fread() when reading unix pipes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While looking at the blackfire profile of a `composer install`, I was able to reduce the number of calls to `fread` from 90k to 60k using this patch (and from 60k to <1k with https://github.com/composer/composer/pull/5569 but that's another story).
In fact, we should continue reading only if there might be something next, which won"t be the case if the buffer has not been filled.
Commits
-------
ac17617 [Process] Fix double-fread() when reading unix pipes
This PR was squashed before being merged into the 3.2-dev branch (closes#18533).
Discussion
----------
[FrameworkBundle] Wire PhpArrayAdapter with a new cache warmer for annotations
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | WIP
| Fixed tickets | -
| License | MIT
| Doc PR | -
Depends on https://github.com/symfony/symfony/pull/18825 and https://github.com/symfony/symfony/pull/18823
This PR implements the usage of the new OpCacheAdapter in the annotations caching system. The idea to use this adapter as much as possible in Symfony (validator, serializer, ...). These other implementations will be the object of different PRs.
Commits
-------
f950a2b [FrameworkBundle] Wire PhpArrayAdapter with a new cache warmer for annotations
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Filesystem] Add a cross-platform readlink method
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`readlink()` and `realpath()` have a completely different behavior under Windows and Unix:
- `realpath()` resolves recursively the children links of a link until a final target is found on Unix and resolves only the next link on Windows ;
- `readlink()` resolves recursively the children links of a link until a final target is found on Windows and resolves only the next link on Unix ;
I propose to solve this by implementing a helper method in the Filesystem component that would behave always the same way under all platforms.
Commits
-------
c36507e [Filesystem] Add a cross-platform readlink/realpath methods for nested links
This PR was squashed before being merged into the 2.7 branch (closes#19446).
Discussion
----------
[Console] Overcomplete argument exception message tweak.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Updates the exception message when to many arguments are passed.
From;
```php
'Too many arguments.'
```
To:
```php
'No argument expected, got "foo".'
// or
'Too many arguments, expected arguments "foo".'
// or
'Too many arguments, expected arguments "foo, bar".'
// ... turtles all the way down
```
Commits
-------
7af59cd [Console] Overcomplete argument exception message tweak.
* 3.1:
[TwigBundle] Removed redundant return statement.
enable property info
[Cache] Fix default lifetime being ignored
[DependencyInjection] Fixed deprecated default message template with XML
Reference the actual location of the documentation
[TwigBridge] Removed extra arguments in 2 places.
[Cache] Fix incorrect timestamps generated by FilesystemAdapter
[Process] Fix write access check for pipes on Windows
[HttpKernel] Use flock() for HttpCache's lock files
Conflicts:
src/Symfony/Component/Cache/Adapter/FilesystemAdapter.php
* 3.0:
[TwigBundle] Removed redundant return statement.
[DependencyInjection] Fixed deprecated default message template with XML
[TwigBridge] Removed extra arguments in 2 places.
[Process] Fix write access check for pipes on Windows
[HttpKernel] Use flock() for HttpCache's lock files
* 2.8:
[TwigBundle] Removed redundant return statement.
[DependencyInjection] Fixed deprecated default message template with XML
[TwigBridge] Removed extra arguments in 2 places.
[Process] Fix write access check for pipes on Windows
[HttpKernel] Use flock() for HttpCache's lock files
* 2.7:
[TwigBundle] Removed redundant return statement.
[TwigBridge] Removed extra arguments in 2 places.
[Process] Fix write access check for pipes on Windows
[HttpKernel] Use flock() for HttpCache's lock files
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Dumping exceptions is now more compact
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Before:
![before](https://cloud.githubusercontent.com/assets/243674/16578686/2c7285b0-429c-11e6-9139-293e0c899d43.png)
Commits
-------
19e9cbe [VarDumper] Dumping exceptions is now more compact
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Use flock() for HttpCache's lock files
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #16777, #15813 and #16312 are also related
| License | MIT
| Doc PR |
When a PHP process crashes or terminates (maybe the OOM killer kicks in or other bad things ™️ happen) while the `HttpCache` holds a `.lck` file, that lock file may not get `unlink()`ed.
The result is that other requests trying to access this cache entry will see a few seconds delay while waiting for the lock; they will eventually continue but send 503 status codes along with the response. The sudden buildup of PHP processes caused by the additional delay may cause further problems (sudden load increase).
As `LockHandler` is using `flock()`-based locking, locks should be released by the OS when the PHP process terminates.
I wrote this as bugfix against 2.7 because every once in a while I encounter situations (not always reproducible) where `.lock` files are left over and keep the cache locked.
Commits
-------
2668edd [HttpKernel] Use flock() for HttpCache's lock files
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix write access check for pipes on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19336, #19416
| License | MIT
| Doc PR | -
Commits
-------
66e694e [Process] Fix write access check for pipes on Windows
* 3.1:
[Console] Application update PHPDoc of add and register methods
[Config] Extra tests for Config component
Fixed bugs in names of classes and methods.
[DoctrineBridge] Fixed php doc
[FrameworkBundle] Fixed parameters number mismatch declaration
[BrowserKit] Added test for followRedirect method (POST method)
Fix the money form type render with Bootstrap3
[BrowserKit] Uppercase the "GET" method in redirects
[DomCrawler] Inherit the namespace cache in subcrawlers
[WebProfilerBundle] Fixed JSDoc parameter definition
[HttpFoundation] HttpCache refresh stale responses containing an ETag
Conflicts:
src/Symfony/Component/Console/Application.php
* 3.0:
[Console] Application update PHPDoc of add and register methods
[Config] Extra tests for Config component
Fixed bugs in names of classes and methods.
[DoctrineBridge] Fixed php doc
[FrameworkBundle] Fixed parameters number mismatch declaration
[BrowserKit] Added test for followRedirect method (POST method)
Fix the money form type render with Bootstrap3
[BrowserKit] Uppercase the "GET" method in redirects
[DomCrawler] Inherit the namespace cache in subcrawlers
[WebProfilerBundle] Fixed JSDoc parameter definition
[HttpFoundation] HttpCache refresh stale responses containing an ETag
* 2.8:
[Console] Application update PHPDoc of add and register methods
[Config] Extra tests for Config component
Fixed bugs in names of classes and methods.
[DoctrineBridge] Fixed php doc
[FrameworkBundle] Fixed parameters number mismatch declaration
[BrowserKit] Added test for followRedirect method (POST method)
Fix the money form type render with Bootstrap3
[BrowserKit] Uppercase the "GET" method in redirects
[DomCrawler] Inherit the namespace cache in subcrawlers
[WebProfilerBundle] Fixed JSDoc parameter definition
[HttpFoundation] HttpCache refresh stale responses containing an ETag
Conflicts:
src/Symfony/Component/Finder/Tests/Shell/CommandTest.php
* 2.7:
[Console] Application update PHPDoc of add and register methods
[Config] Extra tests for Config component
Fixed bugs in names of classes and methods.
[DoctrineBridge] Fixed php doc
[FrameworkBundle] Fixed parameters number mismatch declaration
[BrowserKit] Added test for followRedirect method (POST method)
Fix the money form type render with Bootstrap3
[BrowserKit] Uppercase the "GET" method in redirects
[WebProfilerBundle] Fixed JSDoc parameter definition
[HttpFoundation] HttpCache refresh stale responses containing an ETag
Conflicts:
src/Symfony/Component/BrowserKit/Tests/ClientTest.php
src/Symfony/Component/Security/Acl/Resources/bin/generateSql.php
This PR was squashed before being merged into the 2.7 branch (closes#19389).
Discussion
----------
[Console] Application update PHPDoc of add and register methods
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The [PHPDoc](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Console/Application.php#L354) states the method will always return a command, but it doesn't. Since [Application::register](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Console/Application.php#L328) returns the result of `add` directly is also doesn't always return the command (as its PHPDoc states).
Commits
-------
6f0474f [Console] Application update PHPDoc of add and register methods
This PR was squashed before being merged into the 2.7 branch (closes#19399).
Discussion
----------
[Config] Extra tests for Config component
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
d0f4434 [Config] Extra tests for Config component
This PR was squashed before being merged into the 2.7 branch (closes#19392).
Discussion
----------
[BrowserKit] Added test for followRedirect method (POST method)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Test covers 'else' branches in these conditions:
```php
if (in_array($this->internalResponse->getStatus(), array(302, 303))) {
$method = 'get';
$files = array();
$content = null;
} else {
$method = $request->getMethod();
$files = $request->getFiles();
$content = $request->getContent();
}
if ('get' === strtolower($method)) {
// Don't forward parameters for GET request as it should reach the redirection URI
$parameters = array();
} else {
$parameters = $request->getParameters();
}
```
Commits
-------
2ace5d8 [BrowserKit] Added test for followRedirect method (POST method)
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] [HttpFoundation] HttpCache refresh stale responses containing an ETag
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? |no
| BC breaks? |no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #19390, #6746
| License | MIT
| Doc PR |
This PR is the replacement of #19391, which points at the wrong branch.
Commits
-------
96df6b9 [HttpFoundation] HttpCache refresh stale responses containing an ETag
This PR was merged into the 2.8 branch.
Discussion
----------
[DomCrawler] Inherit the namespace cache in subcrawlers
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12298
| License | MIT
| Doc PR | n/a
This inherits any already discovered/registered namespace with subcrawlers, improving performance when using namespaces.
I submitted to 2.8 rather than 2.7, because the namespace mapping feature was actually buggy in 2.x, because of the fact that nodes could belong to different documents in the same Crawler while the namespace map was shared. The fact that the map was not inherited in subcrawler mitigated this issue (by reducing changes to have multiple documents in the same subcrawler). 2.8 deprecated this possibility to have multiple documents, so I'm fine with applying this here.
Note that the subcrawler inherits the namespace cache at the time it is created, but the cache is not shared between instance (so if a subcrawler discovers an additional namespace of the document, it will not be available for the parent crawler of other subcrawlers of the parent). Sharing the cache would be totally possible (as they share the same document anyway) and would make the experience even better (removing the need to ensure that the root crawler discovers namespace before filtering). But it would require moving from an array to an object. I'm not sure we want to do this in a patch release. What do you think @symfony/deciders ?
Commits
-------
e89c758 [DomCrawler] Inherit the namespace cache in subcrawlers
* 3.1:
fixed bad merge
Fix PHP 7.1 related failures
[VarDumper] Fix for 7.1
fixed CS
Added class existence check if is_subclass_of() fails in compiler passes
Fix the DBAL session handler version check for Postgresql
* 3.0:
Fix PHP 7.1 related failures
[VarDumper] Fix for 7.1
fixed CS
Added class existence check if is_subclass_of() fails in compiler passes
Fix the DBAL session handler version check for Postgresql
* 2.8:
Fix PHP 7.1 related failures
[VarDumper] Fix for 7.1
fixed CS
Added class existence check if is_subclass_of() fails in compiler passes
Fix the DBAL session handler version check for Postgresql
This PR was squashed before being merged into the 3.2-dev branch (closes#19276).
Discussion
----------
[ClassLoader] Add ClassCollectionLoader::inline() to generate inlined-classes files
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Unfortunately, can't be tested because the method relies too much on side effects.
Coupled with https://github.com/sensiolabs/SensioDistributionBundle/pull/272, allows inlining `ClassCollectionLoader` itself into the `bootstrap.php.cache` file.
Commits
-------
88fdcea [ClassLoader] Add ClassCollectionLoader::inline() to generate inlined-classes files
This PR was merged into the 2.8 branch.
Discussion
----------
Added class existence check if is_subclass_of() fails in compiler passes
| Q | A
| ------------- | ---
| Branch? | 2.8-3.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If you create an event subscriber and make typo in file name it will cause next error:
```
[InvalidArgumentException]
Service "event.notification_subscriber" must implement interface "Symfony\Component\EventDispatcher\EventSubscriberInterface".
```
That's because of `is_subclass_of()` fails on class absentee. I made error message more clear.
Commits
-------
72db6e7 Added class existence check if is_subclass_of() fails in compiler passes
* 3.1:
[VarDumper] Fix dumping jsons casted as arrays
PassConfig::getMergePass is not an array
Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)"
[Serializer] Include the format in the cache key
Fix the retrieval of the last username when using forwarding
[Yaml] Fix PHPDoc of the Yaml class
[HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
Update getAbsoluteUri() for query string uris
Conflicts:
src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
* 3.0:
[VarDumper] Fix dumping jsons casted as arrays
PassConfig::getMergePass is not an array
Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)"
Fix the retrieval of the last username when using forwarding
[Yaml] Fix PHPDoc of the Yaml class
[HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
Update getAbsoluteUri() for query string uris
Conflicts:
src/Symfony/Component/Yaml/Yaml.php
* 2.8:
[VarDumper] Fix dumping jsons casted as arrays
PassConfig::getMergePass is not an array
Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)"
Fix the retrieval of the last username when using forwarding
[Yaml] Fix PHPDoc of the Yaml class
[HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
Update getAbsoluteUri() for query string uris
* 2.7:
[VarDumper] Fix dumping jsons casted as arrays
PassConfig::getMergePass is not an array
Revert "bug #19114 [HttpKernel] Dont close the reponse stream in debug (nicolas-grekas)"
Fix the retrieval of the last username when using forwarding
[Yaml] Fix PHPDoc of the Yaml class
[HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
Update getAbsoluteUri() for query string uris
This PR was squashed before being merged into the 2.7 branch (closes#19343).
Discussion
----------
PassConfig::getMergePass is not an array
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Just a minor glitch my IDE noticed :-)
Commits
-------
edbefac PassConfig::getMergePass is not an array
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Serializer] Argument objects
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | TODO
| Fixed tickets | none
| License | MIT
| Doc PR | TODO
Assuming with have the two following entities:
```php
namespace AppBundle\Entity;
class Dummy
{
public function __construct(int $id, string $name, string $email, AnotherDummy $anotherDummy)
{
$this->id = $id;
$this->name = $name;
$this->email = $email;
$this->anotherDummy = $anotherDummy;
}
}
class AnotherDummy
{
public function __construct(int $id, string $uuid, bool $isEnabled)
{
$this->id = $id;
$this->uuid = $uuid;
$this->isEnabled = $isEnabled;
}
}
```
Doing the following will fail:
```php
$serializer->denormalize(
[
'id' => $i,
'name' => 'dummy',
'email' => 'du@ex.com',
'another_dummy' => [
'id' => 1000 + $i,
'uuid' => 'azerty',
'is_enabled' => true,
],
],
\AppBundle\Entity\Dummy::class
);
```
with a type error, because the 4th argument passed to `Dummy::__construct()` will be an array. The following patch checks if the type of the argument is an object, and if it is tries to denormalize that object as well.
I'm not sure if it's me missing something or this is a use case that has been omitted (willingly or not), but if it's a valuable patch I would be happy to work on finishing it.
Commits
-------
988eba1 fix tests
98bcb91 Merge pull request #1 from dunglas/theofidry-feature/param-object
7b5d55d Prevent BC in instantiateObject
e437e04 fix reflection type
3fe9802 revert CS
5556fa5 fix
d4cdb00 fix CS
93608dc Add deprecation message
f46a176 Apply patch
f361e52 fix tests
4884a2e f1
e64e999 Address comments
e99a90b Add tests
7bd4ac5 Test
This PR was squashed before being merged into the 2.7 branch (closes#19321).
Discussion
----------
[HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
According to [RFC 7231](https://tools.ietf.org/html/rfc7231#section-8.1.3) `OPTIONS` and `TRACE` are safe methods.
Commits
-------
1404607 [HttpFoundation] Add OPTIONS and TRACE to the list of safe methods
This PR was merged into the 2.7 branch.
Discussion
----------
[BrowserKit] Update Client::getAbsoluteUri() for query string only URIs
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19303
| License | MIT
| Doc PR | -
This PR allows BrowserKit to treat a value containing only query string parameters the same way anchor/hash values are treated when passed as a URI argument to the getAbsoluteUri() method. Helps when encountering sites that force a redirect with a location header value containing only a query string.
Commits
-------
965408f Update getAbsoluteUri() for query string uris
This PR was squashed before being merged into the 3.2-dev branch (closes#19322).
Discussion
----------
[HttpFoundation] Add Request::isMethodIdempotent method
| 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 | n/a
Addd a new method in the spirit of `isMethodSafe` to know if the current method is idempotent according to RFCs.
Commits
-------
44df6a4 [HttpFoundation] Add Request::isMethodIdempotent method
* 3.1:
[HttpKernel] fixed internal subrequests having an if-modified-since-header
[Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener
[Validator] Added additional MasterCard range to the CardSchemeValidator
Make the exception message more clear.
[Form] fixed bug - name in ButtonBuilder
[DoctrineBridge] added missing error code for constraint.
[ClassLoader] Fix declared classes being computed when not needed
[varDumper] Fix missing usage of ExceptionCaster::$traceArgs
* 3.0:
[HttpKernel] fixed internal subrequests having an if-modified-since-header
[Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener
[Validator] Added additional MasterCard range to the CardSchemeValidator
Make the exception message more clear.
[Form] fixed bug - name in ButtonBuilder
[DoctrineBridge] added missing error code for constraint.
[ClassLoader] Fix declared classes being computed when not needed
[varDumper] Fix missing usage of ExceptionCaster::$traceArgs
* 2.8:
[HttpKernel] fixed internal subrequests having an if-modified-since-header
[Security] Fix deprecated usage of DigestAuthenticationEntryPoint::getKey() in DigestAuthenticationListener
[Validator] Added additional MasterCard range to the CardSchemeValidator
Make the exception message more clear.
[Form] fixed bug - name in ButtonBuilder
[DoctrineBridge] added missing error code for constraint.
[ClassLoader] Fix declared classes being computed when not needed
[varDumper] Fix missing usage of ExceptionCaster::$traceArgs
Conflicts:
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
src/Symfony/Component/ClassLoader/ClassCollectionLoader.php
* 2.7:
[HttpKernel] fixed internal subrequests having an if-modified-since-header
[Validator] Added additional MasterCard range to the CardSchemeValidator
Make the exception message more clear.
[Form] fixed bug - name in ButtonBuilder
[ClassLoader] Fix declared classes being computed when not needed
This PR was merged into the 2.7 branch.
Discussion
----------
[ClassLoader] Fix declared classes being computed when not needed
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d513eae [ClassLoader] Fix declared classes being computed when not needed
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Added additional MasterCard range to the CardSchemeValidator
From October 2016 MasterCard will introduce a new card range, 222100 through 272099.
See: https://www.mctestcards.com/ (click the help in top right)
This implements the additional regex for validation to succeed, and some additional unit tests for this new range.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
4d68f56 [Validator] Added additional MasterCard range to the CardSchemeValidator
This PR was squashed before being merged into the 2.7 branch (closes#19290).
Discussion
----------
[HttpKernel] fixed internal subrequests having an if-modified-since-header
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As the InlineFragmentRenderer has no access to a cached copy of a subrequest's target and hence couldn't handle a response with a HTTP status code of 304 (not modified), it makes no sense to send an if-not-modified-since header.
Commits
-------
e90038c [HttpKernel] fixed internal subrequests having an if-modified-since-header
From October 2016 MasterCard will introduce a new card range,
222100 through 272099.
See: https://www.mctestcards.com/ (click the help in top right)
Implements unit tests and validation for this new card range.
* 3.1:
[VarDumper] Fix indentation trimming in ExceptionCaster
[HttpKernel] Clarify deprecation of non-scalar values in surrogate renderer
removed @since
[Security] fixed DebugAccessDecisionManager::setVoters()
Remove and change unrelevant comments in Validator and Security components.
[Validator] add missing interface use statement for phpdoc block return type.
[Validator] UuidValidator must accept a Uuid constraint.
[Validator] make UuidValidator class formatting consistent.
Conflicts:
src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
* 3.0:
[VarDumper] Fix indentation trimming in ExceptionCaster
removed @since
Remove and change unrelevant comments in Validator and Security components.
[Validator] add missing interface use statement for phpdoc block return type.
[Validator] UuidValidator must accept a Uuid constraint.
[Validator] make UuidValidator class formatting consistent.
* 2.7:
removed @since
Remove and change unrelevant comments in Validator and Security components.
[Validator] UuidValidator must accept a Uuid constraint.
[Validator] make UuidValidator class formatting consistent.
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] [Security] Remove unrelevant comments in Security and Validator components
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
2cec4a6 Remove and change unrelevant comments in Validator and Security components.
* 3.1: (22 commits)
[travis] Fix deps=low/high builds
[Form] Fix depreciation triggers
fixed CS
skip test with current phpunit bridge
Fix for #19183 to add support for new PHP MongoDB extension in sessions.
[Console] Fix for block() padding formatting after #19189
[Security][Guard] check if session exist before using it
bumped Symfony version to 3.1.3
updated VERSION for 3.1.2
updated CHANGELOG for 3.1.2
bumped Symfony version to 3.0.9
updated VERSION for 3.0.8
updated CHANGELOG for 3.0.8
bumped Symfony version to 2.8.9
updated VERSION for 2.8.8
updated CHANGELOG for 2.8.8
bumped Symfony version to 2.7.16
updated VERSION for 2.7.15
update CONTRIBUTORS for 2.7.15
updated CHANGELOG for 2.7.15
...
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 3.0:
[travis] Fix deps=low/high builds
fixed CS
skip test with current phpunit bridge
Fix for #19183 to add support for new PHP MongoDB extension in sessions.
[Console] Fix for block() padding formatting after #19189
[Security][Guard] check if session exist before using it
bumped Symfony version to 3.0.9
updated VERSION for 3.0.8
updated CHANGELOG for 3.0.8
bumped Symfony version to 2.8.9
updated VERSION for 2.8.8
updated CHANGELOG for 2.8.8
bumped Symfony version to 2.7.16
updated VERSION for 2.7.15
update CONTRIBUTORS for 2.7.15
updated CHANGELOG for 2.7.15
Fix some lowest deps
Fixed typos in the expectedException annotations
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Security/Guard/Authenticator/AbstractFormLoginAuthenticator.php
* 2.8:
[travis] Fix deps=low/high builds
fixed CS
skip test with current phpunit bridge
Fix for #19183 to add support for new PHP MongoDB extension in sessions.
[Console] Fix for block() padding formatting after #19189
[Security][Guard] check if session exist before using it
bumped Symfony version to 2.8.9
updated VERSION for 2.8.8
updated CHANGELOG for 2.8.8
bumped Symfony version to 2.7.16
updated VERSION for 2.7.15
update CONTRIBUTORS for 2.7.15
updated CHANGELOG for 2.7.15
Fix some lowest deps
Fixed typos in the expectedException annotations
Conflicts:
CHANGELOG-2.7.md
CHANGELOG-3.0.md
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/HttpKernel/composer.json
src/Symfony/Component/Yaml/Tests/ParserTest.php
* 2.7:
[travis] Fix deps=low/high builds
fixed CS
Fix for #19183 to add support for new PHP MongoDB extension in sessions.
bumped Symfony version to 2.7.16
updated VERSION for 2.7.15
update CONTRIBUTORS for 2.7.15
updated CHANGELOG for 2.7.15
Fixed typos in the expectedException annotations
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DependencyInjection] Autowiring: add setter injection support
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | todo
Add support for setter injection in the Dependency Injection Component.
Setter injection should be avoided when possible. However, there is some legitimate use cases for it. This PR follows a proposal of @weaverryan to ease using [DunglasActionBundle](https://github.com/dunglas/DunglasActionBundle) with #16863. The basic idea is to include a setter for the required service in the trait and let the DependencyInjection Component autowire the dependency using the setter.
This way, a newcomer can use the trait without having to create or modify the constructor of the action.
/cc @derrabus
Commits
-------
a0d7cbe [DependencyInjection] Autowiring: add setter injection support
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] rename boolean and integer to bool and int
| 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/11394#issuecomment-228075328
| License | MIT
| Doc PR |
This addresses @Tobion's comment in https://github.com/symfony/symfony/pull/11394#issuecomment-228075328.
@symfony/deciders What do you think? Should we change the element names to how we use the types in PHP code or should we stick with XML element names that rather match the types as defined by the XML schema?
Commits
-------
808dcc8 rename boolean and integer to bool and int
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix block() padding formatting after #19189
| 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/19189#issuecomment-229735157
| License | MIT
| Doc PR | reference to the documentation PR, if any
This fixes the unformatted padding of `block()` output after #19189.
Commits
-------
dc130be [Console] Fix for block() padding formatting after #19189
This PR was squashed before being merged into the 2.8 branch (closes#19218).
Discussion
----------
[Security][Guard] check if session exist before using it
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18958
| License | MIT
| Doc PR | -
As stated by @Shekhovtsovy when the Guard component is used without the Symfony full stack (for instance in Laravel), $request->getSession() may be null.
An additionnal PR will be needed for 3.1 but it may be better to check this one before.
Commits
-------
a3f7510 [Security][Guard] check if session exist before using it
This PR was squashed before being merged into the 2.7 branch (closes#19243).
Discussion
----------
Fixed typos in the expectedException annotations
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
PHPUnit ignores any imports when resolving these. You must always reference the FQCN.
Commits
-------
b36de36 Fixed typos in the expectedException annotations
* 3.1:
Fixed BC Layer in DoctrineChoiceLoader
[HttpKernel] Add listener that checks when request has both Forwarded and X-Forwarded-For
[HttpKernel] Move conflicting origin IPs handling to catch block
[travis] Fix deps=low/high patching
Fixed some issues of the AccessDecisionManager profiler
[DoctrineBridge] fixed default parameter value in UniqueEntityValidator
* 3.0:
[HttpKernel] Add listener that checks when request has both Forwarded and X-Forwarded-For
[HttpKernel] Move conflicting origin IPs handling to catch block
[travis] Fix deps=low/high patching
* 2.8:
[HttpKernel] Add listener that checks when request has both Forwarded and X-Forwarded-For
[HttpKernel] Move conflicting origin IPs handling to catch block
[travis] Fix deps=low/high patching
* 2.7:
[HttpKernel] Add listener that checks when request has both Forwarded and X-Forwarded-For
[HttpKernel] Move conflicting origin IPs handling to catch block
[travis] Fix deps=low/high patching
This PR was squashed before being merged into the 3.2-dev branch (closes#19169).
Discussion
----------
Add test for Definition with exeption InvalidArgument
Add test for Definition with exeption InvalidArgument
| Q | A
| ------------- | ---
| Branch? | "master" for new features / 2.7, 2.8, 3.0 or 3.1 for fixes
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
91072e6 Add test for Definition with exeption InvalidArgument
This PR was squashed before being merged into the 3.1 branch (closes#18934).
Discussion
----------
Fixed some issues of the AccessDecisionManager profiler
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19022https://github.com/symfony/symfony-standard/issues/968https://github.com/schmittjoh/JMSSecurityExtraBundle/issues/207
| License | MIT
| Doc PR | -
Commits
-------
082f1b5 Fixed some issues of the AccessDecisionManager profiler
This PR was squashed before being merged into the 2.7 branch (closes#18688).
Discussion
----------
[HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#6526
Emit a warning when a request has both a trusted Forwarded header and a trusted X-Forwarded-For header, as this is most likely a misconfiguration which causes security issues.
Commits
-------
ee8842f [HttpFoundation] Warning when request has both Forwarded and X-Forwarded-For
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Serializer] Allow to use easily static constructors
| 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/19027#issuecomment-225527475
| License | MIT
| Doc PR | -
This PR allows to simply use static constructors to instantiate objects with the serializer by extending the default normalizers.
Commits
-------
9be6484 [Serializer] Allow to use easily static constructors
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Yaml] Avoid using both Input/Output and SymfonyStyle in LintCommand
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Fixed some inconsistencies/mistakes from the original YamLintCommand.
Commits
-------
dd84b7f [Yaml] Avoid using both Input/Output and SymfonyStyle in LintCommand
This PR was squashed before being merged into the 3.2-dev branch (closes#19190).
Discussion
----------
[DependencyInjection] Add support for short services configurators syntax
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR adds support for short services configurators syntax in YAML files:
```yaml
services:
app.some_service:
class: ...
# Common syntax
configurator: [ '@app.configurator', 'configure' ]
# Short syntax
configurator: 'app.configurator:configure'
Commits
-------
da2757f [DependencyInjection] Add support for short services configurators syntax
This PR was squashed before being merged into the 2.7 branch (closes#19173).
Discussion
----------
[Console] Decouple SymfonyStyle from TableCell
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Alternative approach, ie BC, for #19136 (i prefer that one though, as it also _fixes_ #19123 )
Commits
-------
51f59d6 [Console] Decouple SymfonyStyle from TableCell
* 3.1:
fixed CS
fixed CS
fixed CS
fixed form tests
[Console] Fix formatting of SymfonyStyle::comment()
[Form] fix post max size translation type extension for >= 2.8
[Security] Allow LDAP loadUser override
removed dots at the end of @param and @return
fixed typo
* 3.0:
fixed CS
fixed CS
fixed form tests
[Console] Fix formatting of SymfonyStyle::comment()
[Form] fix post max size translation type extension for >= 2.8
removed dots at the end of @param and @return
fixed typo
* 2.8:
fixed CS
fixed form tests
[Console] Fix formatting of SymfonyStyle::comment()
[Form] fix post max size translation type extension for >= 2.8
removed dots at the end of @param and @return
fixed typo
This PR was merged into the 2.8 branch.
Discussion
----------
fixed form tests
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
d0130d9 fixed form tests
This PR was merged into the 2.7 branch.
Discussion
----------
removed dots at the end of @param and @return
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
For phpdocs, we only add dots for sentences like description, but not for @param and @return for instance. This PR fixes this issue.
This should probably be added to PHP-CS-Fixer as well (/cc @phansys @keradus).
Commits
-------
554303e removed dots at the end of @param and @return
This PR was merged into the 3.1 branch.
Discussion
----------
[Security] Allow LDAP loadUser override
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Back to 3.0, one could extend `Symfony\Component\Security\Core\User\LdapUserProvider` and override how User objects are created.
Among several improvements, #17560 changed `loadUser` signature but also visibility to `private` which disallow any overriding.
Even if the signature BC break is legitimate, we should still be able to override this method IMHO, which is not possible with a private visibility.
This PRs introduces a `protected` visibility to allow again overriding.
Commits
-------
ae99aa8 [Security] Allow LDAP loadUser override
This PR was squashed before being merged into the 3.2-dev branch (closes#19187).
Discussion
----------
[Workflow] CS tweaks
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Just a few minor tweaks/fixes after playing around with it. Some phpdoc should still be added imo, like missing `@throws`, right?
Commits
-------
5428a92 [Workflow] CS tweaks
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix formatting of SymfonyStyle::comment()
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19172
| License | MIT
| Doc PR | n/a
This:
```php
$io->comment('Lorem ipsum dolor sit amet, consectetur adipisicing elit, <comment>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat </comment>cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.');
```
Before outputs:
![](http://image.prntscr.com/image/1d2ea9de42024b53a77120c482be51d4.png)
After:
![](http://image.prntscr.com/image/36de23ec14b64804b0cbae7a431185be.png)
This moves the lines-cutting logic from `block()` into a specific `createBlock`, used from both `comment()` and `block()`, sort as `comment()` can take messages containing nested tags and outputs a correctly formatted block without escaping tags.
Commits
-------
0a53e1d [Console] Fix formatting of SymfonyStyle::comment()
Remove decoration from frameworkbundle test (avoid testing the Console behaviour)
Set background to default
Test output
Adapt test for FrameworkBundle
Use Helper::strlenWithoutDecoration rather than Helper::strlen(strip_tags(..))
Improve logic for align all lines to the first in block()
Tests more block() possible outputs
Avoid calling Helper::strlenWithoutDecoration in loop for prefix, assign it instead
* 3.1:
[CS] Respect PSR2 4.2
[Form] fix `empty_data` option in expanded `ChoiceType`
[Console] removed unneeded private methods
updated Http-Kernel dependency
[Security] [Guard] Improve comment with working example
sync min email validator version
[TwigBridge] Fix inconsistency in LintCommand help
explicitly forbid e-mail validator 2.0 or higher
Fixed SymfonyQuestionHelper multi-choice with defaults
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
Differentiate between the first time a progress bar is displayed and subsequent times
finished previous commit
No more exception for malformed input name
fix post_max_size_message translation
[Process] Fix pipes cleaning on Windows
Avoid phpunit 5.4 warnings on getMock
[Form] Add exception to FormRenderer about non-unique block names
[FrameworkBundle] templating can be fully disabled
[Form] Consider a violation even if the form is not submitted
* 3.0:
[CS] Respect PSR2 4.2
[Form] fix `empty_data` option in expanded `ChoiceType`
[Console] removed unneeded private methods
[Security] [Guard] Improve comment with working example
sync min email validator version
[TwigBridge] Fix inconsistency in LintCommand help
explicitly forbid e-mail validator 2.0 or higher
Fixed SymfonyQuestionHelper multi-choice with defaults
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
Differentiate between the first time a progress bar is displayed and subsequent times
finished previous commit
No more exception for malformed input name
fix post_max_size_message translation
[Process] Fix pipes cleaning on Windows
Avoid phpunit 5.4 warnings on getMock
[Form] Add exception to FormRenderer about non-unique block names
[Form] Consider a violation even if the form is not submitted
* 2.8:
[CS] Respect PSR2 4.2
[Form] fix `empty_data` option in expanded `ChoiceType`
[Console] removed unneeded private methods
[Security] [Guard] Improve comment with working example
sync min email validator version
[TwigBridge] Fix inconsistency in LintCommand help
explicitly forbid e-mail validator 2.0 or higher
Fixed SymfonyQuestionHelper multi-choice with defaults
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
Differentiate between the first time a progress bar is displayed and subsequent times
finished previous commit
No more exception for malformed input name
fix post_max_size_message translation
[Process] Fix pipes cleaning on Windows
Avoid phpunit 5.4 warnings on getMock
[Form] Add exception to FormRenderer about non-unique block names
[Form] Consider a violation even if the form is not submitted
* 2.7:
[CS] Respect PSR2 4.2
[Form] fix `empty_data` option in expanded `ChoiceType`
[Console] removed unneeded private methods
sync min email validator version
[TwigBridge] Fix inconsistency in LintCommand help
explicitly forbid e-mail validator 2.0 or higher
Fixed SymfonyQuestionHelper multi-choice with defaults
[DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure
Differentiate between the first time a progress bar is displayed and subsequent times
finished previous commit
No more exception for malformed input name
fix post_max_size_message translation
[Process] Fix pipes cleaning on Windows
Avoid phpunit 5.4 warnings on getMock
[Form] Add exception to FormRenderer about non-unique block names
[Form] Consider a violation even if the form is not submitted
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | WIP
| Fixed tickets | -
| License | MIT
| Doc PR | -
Depends on https://github.com/symfony/symfony/pull/18825
This PR aims to implement a Symfony Cache adapter able to build files optimized for OPCache memory storage. Any kind of static data that can be warmed up is a candidate for OPcache storage.
This PR is limited to the implementation of the Adapter. It's usage in the annotations caching system is implemented in the PR https://github.com/symfony/symfony/pull/18533. The aim is also to use this adapter in other contexts (validator, serializer, ...).
Commits
-------
28a40d2 [Cache] Add PhpArrayAdapter to use shared memory on PHP 7.0+
This PR was merged into the 2.7 branch.
Discussion
----------
[WIP] [2.7] [Form] fix `empty_data` option in expanded `ChoiceType`
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17791
| License | MIT
| Doc PR | -
It might happen because in `Form::submit()` the handling of `empty_data` [line 597](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L597) comes after each child of a compound field has been submitted [line 549](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L549).
So when `ChoiceType` is `expanded`, `compound` option is defaulted to `true` and it passes its empty submitted data to its children before handling its own `empty_data` option.
This PR uses the listener already added in `ChoiceType` only when `expanded` is true to handle `empty_data` at `PRE_SUBMIT` [line 539](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Form.php#L539).
- [ ] Fix FQCN in tests for 2.8
- [ ] Remove `choices_as_values` in tests for 3.0
Commits
-------
d479adf [Form] fix `empty_data` option in expanded `ChoiceType`
Remove input/output from method arguments, use SymfonyStyle instead
Avoid 'error in filename' if no filename as argument
Add missing array typehint to files argument of display*() methods
Store format option as member rather than pass it in method calls
CS fixes
This PR was merged into the 3.2-dev branch.
Discussion
----------
Undefined variable $name
| Q | A
| ------------- | ---
| Branch? | "master" for new features / 2.7, 2.8, 3.0 or 3.1 for fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
8304bcc Undefined variable $name
This PR was squashed before being merged into the 3.2-dev branch (closes#19104).
Discussion
----------
Adds support for the SameSite attribute in cookies.
| 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 | N/A
$sameSite can be set to false, "lax", or "strict".
You can read about what the different modes do here: http://www.sjoerdlangkemper.nl/2016/04/14/preventing-csrf-with-samesite-cookie-attribute/
Commits
-------
428d0f7 Adds support for the SameSite attribute in cookies.
This PR was merged into the 2.7 branch.
Discussion
----------
Distinguish between first and subsequent progress bar displays
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19133
| License | MIT
| Doc PR | reference to the documentation PR, if any
Fixes https://github.com/symfony/symfony/issues/19133
When a progress bar is first displayed, if it is multi-line, previously output lines are erased, depending upon the number of lines in the progress bar.
This patch fixes that be distinguishing between the first display (no erasing of previous output) and subsequent displays of the progress bar.
Commits
-------
3871e1a Differentiate between the first time a progress bar is displayed and subsequent times
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] support for array values in route defaults
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As pointed out in symfony/symfony-docs#4017, the ``XmlFileLoader`` was not capable of defining array default values.
- [x] array values
- [x] integer values
- [x] float values
- [x] boolean
Commits
-------
120b35c [Routing] data type support for defaults
As pointed out in symfony/symfony-docs#4017, the XmlFileLoader was not
capable of defining array default values. Additionally, this commit
adds support for handling associative arrays, boolean, integer, float
and string data types.
This PR was merged into the 3.2-dev branch.
Discussion
----------
[VarDumper] Add support for XmlReader objects
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18989
| License | MIT
| Doc PR | -
Commits
-------
3779ee4 [VarDumper] Add support for XmlReader objects
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Add Lockable trait
| 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 for the moment :)
Hi there,
Since the 2.6 the `LockHandler` class was added to ease concurrency problems. There was a nice post about [using it in your commands](http://symfony.com/blog/new-in-symfony-2-6-lockhandler).
From my humble experience, I find it a bit unpleasant/time consuming to always copy/paste the same code. So here is my proposal:
Before:
```php
class UpdateContentsCommand extends Command
{
protected function configure()
{
// ...
}
protected function execute(InputInterface $input, OutputInterface $output)
{
// create the lock
$lock = new LockHandler('update:contents');
if (!$lock->lock()) {
$output->writeln('The command is already running in another process.');
return 0;
}
// Your code
$lock->release();
}
}
```
After:
```php
class MyCommand extends Command
{
use LockableTrait;
protected function execute(InputInterface $input, OutputInterface $output)
{
if (!$this->lock()) {
// Here you can handle locking errors
}
// Your code
// The lock release is still optionnal
$this->release();
}
}
```
In addition, you can optionally pass two arguments:
- a string argument to change the lock name
- a boolean argument to indicate if you want to wait until the requested lock is released
Commits
-------
b57a83f [Console] Add Lockable trait
Add tests
Fix tests & YamlLintCommand help formatting
fabbot fixes
Use Generator to iterate over the filesystem
Move STDIN related code in a method
Use RecursiveIteratorIterator::LEAVES_ONLY rather than SELF_FIRST
Stop using the Finder component when available (Make findFiles() private)
Re-add FrameworkBundle YamlLintCommandTest
Use CommandTester::getStatusCode() rather than assign execute()
Re-add feature for bundle directories, Test it
This PR was merged into the 3.2-dev branch.
Discussion
----------
Response headers fix
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes/no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16171, #16307
| License | MIT
| Doc PR | n/a
To fix the inconsistency mentioned in #16171, I think the "best" solution would be to add `private` when cache-control is not set, which was the intention but was forgotten.
I propose to make the fix in 3.2 only as it might be a BC break.
Commits
-------
66afa01 [HttpFoundation] added private by default when setting Cache-Control to no-cache
This PR was merged into the 2.7 branch.
Discussion
----------
[DomCrawler] No more exception on field name with strange format
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18569, #18570
| License | MIT
| Doc PR | n/a
Commits
-------
e204913 finished previous commit
953a383 No more exception for malformed input name
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Consider a violation even if the form is not submitted
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (only for the behavior)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11493
| License | MIT
| Doc PR |
Hey!
I'm currently implementing an API using the form component in order to validate the payload sent (in conjonction with the FOSRestBundle). Unfortunatelly, we dig into an issue about the PATCH request which don't map some of our validation rules to the form. Basically, the violations are lost in the middle of the process.
### Use case
We have an entity with the following fields "type", "image" & "video". The field "type"can be either "default", "image" or "video" and then accordingly we use the appropriate field (none for the "default" type, video for the "video" type and image for the "image" type. Then, in our form, we change the validation groups according to our entity type in order to make the "image" field mandatory if the type is "image" and the same for the video field if the type is "video".
### Current behavior
The current behavior (since 2.5) seems to not propages a violation to a form if this form is not submitted but in our use case, changing the field "type" via a PATCH request triggers some new validation which should be reported to end user (inform that a field (video or image) is missing in the PATCH request).
### Expected behavior
The current behavior was introduced in #10567 but IMO, this update is a bug as suggested by @webmozart in https://github.com/symfony/symfony/issues/11493#issuecomment-59549054 Instead, the form component should still map validation errors to the form even if the field was not submitted. If the initial data is not valid, then your initial data was buggy from the beginning but the form should not accept it and instead of silently ignoring the errors, end users should be informed and fix it.
WDYT?
Commits
-------
c483a0f [Form] Consider a violation even if the form is not submitted
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Fix pipes cleaning on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19089
| License | MIT
| Doc PR | -
Commits
-------
d54cd02 [Process] Fix pipes cleaning on Windows
* 3.1:
fixed CS
fixed CS
fixed CS
fixed CS
tweaked default CS fixer config
[HttpKernel] Dont close the output stream in debug
move HttpKernel component to require section
Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
[Session] fix PDO transaction aborted under PostgreSQL
[Console] Use InputInterface inherited doc as possible
Mention generating absolute urls in UPGRADE files and CHANGELOG
parse embedded mappings only if value is a string
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
FormBuilderInterface: fix getForm() return type.
[YAML] Fixed parsing problem with nested DateTime lists
Fixed typo in PHPDoc
* 3.0:
fixed CS
fixed CS
fixed CS
tweaked default CS fixer config
[HttpKernel] Dont close the output stream in debug
move HttpKernel component to require section
Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
[Session] fix PDO transaction aborted under PostgreSQL
[Console] Use InputInterface inherited doc as possible
Mention generating absolute urls in UPGRADE files and CHANGELOG
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
FormBuilderInterface: fix getForm() return type.
Fixed typo in PHPDoc
* 2.8:
fixed CS
fixed CS
tweaked default CS fixer config
[HttpKernel] Dont close the output stream in debug
move HttpKernel component to require section
Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
[Session] fix PDO transaction aborted under PostgreSQL
[Console] Use InputInterface inherited doc as possible
Mention generating absolute urls in UPGRADE files and CHANGELOG
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
FormBuilderInterface: fix getForm() return type.
Fixed typo in PHPDoc
* 2.7:
fixed CS
tweaked default CS fixer config
[HttpKernel] Dont close the output stream in debug
move HttpKernel component to require section
Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
[Session] fix PDO transaction aborted under PostgreSQL
[Console] Use InputInterface inherited doc as possible
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
FormBuilderInterface: fix getForm() return type.
Fixed typo in PHPDoc
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Debug] fix resource type test on HHVM
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19079
| License | MIT
| Doc PR |
Commits
-------
2d03ee8 [Debug] fix resource type test on HHVM
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Dont close the reponse stream in debug
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19078
| License | MIT
| Doc PR | -
Because it's `terminate`'s job to clean the state, not the `Response`'s,
and because the current behavior prevents getting any output on trailing errors on FPM especially.
Commits
-------
2fbc200 [HttpKernel] Dont close the output stream in debug
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Add ConsoleLogger::hasErrored()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
So that it's easy to `exit(1)` whenever any messages have been logged at error levels.
Commits
-------
cfc578a [Console] Add ConsoleLogger::hasErrored()
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Test SymfonyStyle::ask() output
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Now that we can test an interactive command that uses SymfonyStyle (after #18999), we should test their output.
Commits
-------
e870758 [Console] Test SymfonyStyle::ask() output
This PR was merged into the 2.7 branch.
Discussion
----------
[Session] fix PDO transaction aborted under PostgreSQL
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14641
| License | MIT
| Doc PR |
Fixes the transactional concurrency error handling for PostgreSQL which does not allow to execute further queries in a transaction with an error.
Because of the loop, look at the diff with whitespace ignored to see the difference: https://github.com/symfony/symfony/pull/19101/files?w=1
Commits
-------
f8eefa0 [Session] fix PDO transaction aborted under PostgreSQL
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] changed MERGE queries
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17284
| License | MIT
| Doc PR | N/A
Changed the MERGE queries for Oracle and SQL Server to use question mark parameter markers so they work with emulation disabled or enabled - fixes#17284
Commits
-------
ebf3a2f Fixed oci and sqlsrv merge queries when emulation is disabled - fixes#17284
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Use InputInterface inherited doc as possible
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
In classes implementing `InputInterface`, the methods doc blocks are duplicated from the interface.
Sometimes descriptions are different from the interface's ones and, sometimes, the class doc is clearer. So I tried to keep always the most adapted one.
Commits
-------
b604be7 [Console] Use InputInterface inherited doc as possible
This PR was merged into the 2.7 branch.
Discussion
----------
FormBuilderInterface: fix getForm() return type.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
FormBuilderInterface->getForm() should depend on abstractions and
not implementations as a return type.
Commits
-------
3fa081c FormBuilderInterface: fix getForm() return type.
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] progress bar fix
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13019
| License | MIT
| Doc PR | -
This is #16490 where I've simplified the code as much as possible and added a test for the bug we're trying to fix.
The main change is the renaming of the `TerminalDimensionsProvider` to just `Terminal`. The new class can probably be useful to add more about the terminal.
Commits
-------
2f81247 switched to use COLUMNS and LINES env vars to change terminal dimensions
bf7a5c5 fixed logic
a589635 deprecated some Console Application methods
8f206c8 fixed CS, simplified code
b030c24 [Console] ProgressBar - adjust to the window width (static)
This PR was merged into the 2.7 branch.
Discussion
----------
add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
| Q | A
| ------------- | ---
| Branch | 2.7
| Bug fix | no
| New feature | no
| BC breaks | no
| Deprecations | no
| Tests pass | yes
| License | MIT
In additional to #16965 PhpStorm supports `IteratorAggregate::getIterator` now. see https://blog.jetbrains.com/phpstorm/2016/06/phpstorm-2016-2-eap-162-844/
example
```
$collection = new \Symfony\Component\Routing\RouteCollection();
foreach ($collection as $route) {
$route->getHost();
}
```
Commits
-------
ede3556 add docblock type elements to support newly added IteratorAggregate::getIterator PhpStorm support
This PR was squashed before being merged into the 3.2-dev branch (closes#19029).
Discussion
----------
[YAML] Fixed parsing problem with nested DateTime lists
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
___
Without this fix, DateTime-aware parsing of a YAML source containing nested lists of dates result in an error. Consider this:
```php
$data = ['date' => ['annivesary' => new \DateTime('now')]];
$yaml = Yaml::dump($data);
var_dump($yaml);
$parsed = Yaml::parse($yaml, Yaml::PARSE_DATETIME);
print_r($parsed);
```
Everything is fine, result is:
```
string(48) "date:
annivesary: 2016-06-11T11:26:30+02:00
"
Array
(
[date] => Array
(
[annivesary] => DateTime Object
(
[date] => 2016-06-11 11:26:30.000000
[timezone_type] => 1
[timezone] => +02:00
)
)
)
```
But making the `anniversary` a list of dates
```php
$data = ['date' => ['annivesary' => [new \DateTime('now')]]];
$yaml = Yaml::dump($data);
var_dump($yaml);
$parsed = Yaml::parse($yaml, Yaml::PARSE_DATETIME);
print_r($parsed);
```
will result in:
```
string(50) "date:
annivesary: [2016-06-11T12:00:05+02:00]
"
PHP Warning: strpos() expects parameter 1 to be string, object given in [...]\vendor\symfony\yaml\Inline.php on line 382
PHP Catchable fatal error: Object of class DateTime could not be converted to string in [...]\vendor\symfony\yaml\Inline.php on line 386
```
(I didn't capture the error messages with the most recent master branch, so line numbers differ somewhat)
Commits
-------
52384cf [YAML] Fixed parsing problem with nested DateTime lists
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Router] added appending of new optional document fragment
added a new optional parameter to the generate method for the document fragment. when specified this is appended to generated urls.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Commits
-------
6d79a56 [Routing] adds _fragment special option to url generation for document fragment
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Simplify simulation of user inputs in CommandTester
| 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/6623
After @javiereguiluz pointed it in #17470, I open this PR to simplify the simulation of user inputs for testing a Command.
It would be done by calling `CommandTester::setUserInputs()` with an array of inputs as argument, and so make the CommandTester creating an input stream from the inputs set by the developer, then call `QuestionHelper::setInputStream` and assign it to the helperSet of the command, sort as all is done automatically in one call.
Depends on #18999
Commits
-------
c7ba38a [Console] Set user inputs from CommandTester
* 3.1:
Tweak merge
update tests to use the new error assertion helper
[ci] Upgrade to symfony/phpunit-bridge >=3.2@dev
update tests to use the new error assertion helper
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
This PR was merged into the 3.1 branch.
Discussion
----------
[3.1] update tests to use the new error assertion helper
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
9c7512b update tests to use the new error assertion helper
* 2.8:
update tests to use the new error assertion helper
[ci] Upgrade to symfony/phpunit-bridge >=3.2@dev
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
src/Symfony/Component/Yaml/Tests/ParserTest.php
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8] update tests to use the new error assertion helper
| 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
-------
e5cf4d4 update tests to use the new error assertion helper
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Centralize input stream in base Input class
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #10844
| License | MIT
| Doc PR | not yet
Actually we have two classes that have an `inputStream` property with its getter+setter:
the QuestionHelper ('question' helper) and the SymfonyQuestionHelper (used via SymfonyStyle, that inherits the inputStream from the QuestionHelper class).
This situation makes command testing really hard.
ATM we can't test a command that uses `SymfonyStyle::ask` without ugly hacks, and we can't find a generic way to set the inputs passed to a command from the CommandTester, as it need to be done on a specific helper that may not be the one used by the command (SymfonyStyle case).
What I propose here is to add a `stream` property (and its getter+setter) to the abstract `Symfony\Component\Console\Input\Input` class.
For now I just made the two helpers setting their `inputStream` from `Input::getStream`, as both QuestionHelper and SymfonyQuestionHelper classes have an `ask` method that takes the command Input as argument.
In a next time (4.0), we could remove the `getInputStream` and `setInputStream` methods from the QuestionHelper class (this only deprecates them in favor of Input `setStream` and `getStream`).
This would close PR #18902 (trying to make interactive command testing with SymfonyStyle easier).
This would also make PR #18710 widely better by setting the input stream in a generic way (working for both helpers without caring about if they are used and which one is used).
Please give me your opinions.
Commits
-------
54d3d63 Centralize input stream in base Input class
* 3.1:
[TwigBridge] Add missing type hint to TwigRenderer
[HttpFoundation] Fix UPSERT for PgSql >= 9.5
[Form] fixed DateTime transformers
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
bumped Symfony version to 3.1.2
updated VERSION for 3.1.1
updated CHANGELOG for 3.1.1
[Form] fixed EntityType test with query_builder option
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/PropertyAccess/PropertyAccessor.php
* 3.0:
[TwigBridge] Add missing type hint to TwigRenderer
[HttpFoundation] Fix UPSERT for PgSql >= 9.5
[Form] fixed DateTime transformers
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
[Form] fixed EntityType test with query_builder option
Conflicts:
src/Symfony/Component/HttpFoundation/Cookie.php
* 2.8:
[HttpFoundation] Fix UPSERT for PgSql >= 9.5
[Form] fixed DateTime transformers
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
[Form] fixed EntityType test with query_builder option
Conflicts:
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php
* 2.7:
[HttpFoundation] Fix UPSERT for PgSql >= 9.5
[Form] fixed DateTime transformers
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
This PR was merged into the 3.2-dev branch.
Discussion
----------
[ExpressionLanguage] Add a way to hook on each node when dumping the AST
| Q | A
| ------------- | ---
| Branch? | "master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19013
| License | MIT
| Doc PR | -
This is an iteration over #19013 to allow writing dumpers that can decorate dumps (e.g. add HTML tags based on each node type to do syntax highlighting).
Commits
-------
66d23db [ExpressionLanguage] Add a way to hook on each node when dumping the AST
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Console] Better support for one command app
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9564
| License | MIT
Hello;
I write many CLI application, and "single command" in cli application is not so easy to write.
This is why I propose this patch. IMHO, this PR could replaces #9609.
See it in application:
```php
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
(new Application('echo', '1.0.0'))
->register('echo')
->addArgument('foo', InputArgument::OPTIONAL, 'The directory', 'foo')
->addOption('bar', null, InputOption::VALUE_REQUIRED, 'Foobar', 'bar')
->setCode(function(InputInterface $input, OutputInterface $output) {
$output->writeln('start');
$output->writeln($input->getArgument('foo'));
$output->writeln($input->getOption('bar'));
})
->getApplication()
->setSingleCommand('echo')
->run();
```
Some usage:
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php
start
foo
bar
```
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php "first argument"
start
first argument
bar
```
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php "first argument" --bar="first option"
start
first argument
first option
```
```
>(3)[{..}eg/dev/github.com/symfony/symfony](console-one-app) php test.php "first argument" --bar="first option" --help
Usage:
echo [options] [--] [<foo>]
Arguments:
foo The directory [default: "foo"]
Options:
--bar=BAR Foobar [default: "bar"]
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```
Commits
-------
4a9bb1d [Console] Better support for one command app
This PR was merged into the 3.2-dev branch.
Discussion
----------
Move Constraint validator test case to Test namespace
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | kinda
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The Validator component has a very usefull test utility to test constraint validators. It's only hidden deep in the Tests namespace. Just as was done with the TypeTestCase of the Form component some years ago, I think it's usefull to move the constraint test case to the Test namespace as well.
*Btw, my last PR of the year and the first deprecation of 3.1* 🎆
Commits
-------
e938361 Move Constraint validator test case to Test namespace
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Process] Allow inheriting env vars instead of replacing them
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18796
| License | MIT
| Doc PR | -
Commits
-------
524508c [Process] Allow merging env vars instead of replacing them
This PR was merged into the 3.2-dev branch.
Discussion
----------
[HttpKernel] Move duplicated logic from Esi/Ssi to an AbstractSurrogate
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations?| no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
c5dc50d Move duplicated logic from Esi/Ssi to an AbstractSurrogate
Add StreamableInputInterface
Removed commented code
Prevent BC by looking for QuestionHelper::
Logic fixes
Check for that implements StreamableInputInterface
Rollback E_USER_DEPRECATED notice in getInputStream
Remove legacy tests to avoid KO because of deprecations
Add missing use
Keep old tests marked as legacy
Undeprecate getInputStream, CS Fixes
Move legacy tests in separated class
Revert separated legacy test class
Keep legacy createInputInterfaceMock()
Depreciate QuestionHelper::getInputStream()
This PR was squashed before being merged into the 2.7 branch (closes#18732).
Discussion
----------
[PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18694
| License | MIT
| Doc PR |
When you try do define a manyToMany association but you don't give an array or \Traversable, the raised exception say that some methods are missing while they don't. This PR check if the adder and setter methods exists and if so, give a exception that pointing on the real problem.
Commits
-------
c46519b [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DependencyInjection] fix the sorting by priority
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18482
| License | MIT
| Doc PR |
Commits
-------
6f72657 [DependencyInjection] fix the sorting by priority
* 3.1: (30 commits)
Fix merge
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
[Console] fixed PHPDoc
[Cache] Fix double fetch in ProxyAdapter
[travis] HHVM 3.12 LTS
Fix feature detection for IE
[Form] Fixed collapsed choice attributes
[Console] added explanation of messages usage in a progress bar
force enabling the external XML entity loaders
[Yaml] properly count skipped comment lines
[WebProfilerBundle] Fix invalid CSS style
Added progressive jpeg to mime types guesser
[Yaml] Fix wrong line number when comments are inserted in the middle of a block.
Fixed singular of committee
Fixed singular of committee
Do not inject web debug toolbar on attachments
Fixed issue with legacy client initialization
[FrameworkBundle] Remove unused variable
bumped Symfony version to 3.0.8
updated VERSION for 3.0.7
...
* 3.0: (25 commits)
Fix merge
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
[Console] fixed PHPDoc
[travis] HHVM 3.12 LTS
Fix feature detection for IE
[Form] Fixed collapsed choice attributes
[Console] added explanation of messages usage in a progress bar
force enabling the external XML entity loaders
[Yaml] properly count skipped comment lines
[WebProfilerBundle] Fix invalid CSS style
Added progressive jpeg to mime types guesser
[Yaml] Fix wrong line number when comments are inserted in the middle of a block.
Fixed singular of committee
Do not inject web debug toolbar on attachments
bumped Symfony version to 3.0.8
updated VERSION for 3.0.7
updated CHANGELOG for 3.0.7
bumped Symfony version to 2.8.8
updated VERSION for 2.8.7
updated CHANGELOG for 2.8.7
...
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/PropertyAccess/StringUtil.php
src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php
src/Symfony/Component/Yaml/Parser.php
src/Symfony/Component/Yaml/Tests/ParserTest.php
* 2.8: (22 commits)
Fix merge
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
[Console] fixed PHPDoc
[travis] HHVM 3.12 LTS
Fix feature detection for IE
[Form] Fixed collapsed choice attributes
[Console] added explanation of messages usage in a progress bar
force enabling the external XML entity loaders
[Yaml] properly count skipped comment lines
[WebProfilerBundle] Fix invalid CSS style
Added progressive jpeg to mime types guesser
[Yaml] Fix wrong line number when comments are inserted in the middle of a block.
Fixed singular of committee
Do not inject web debug toolbar on attachments
bumped Symfony version to 2.8.8
updated VERSION for 2.8.7
updated CHANGELOG for 2.8.7
bumped Symfony version to 2.7.15
updated VERSION for 2.7.14
update CONTRIBUTORS for 2.7.14
...
Conflicts:
CHANGELOG-2.7.md
CHANGELOG-3.0.md
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.7:
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
[Console] fixed PHPDoc
[travis] HHVM 3.12 LTS
Fix feature detection for IE
[Form] Fixed collapsed choice attributes
[Console] added explanation of messages usage in a progress bar
force enabling the external XML entity loaders
[Yaml] properly count skipped comment lines
Conflicts:
src/Symfony/Component/Translation/Loader/XliffFileLoader.php
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
9569c74 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5
This PR was squashed before being merged into the 3.2-dev branch (closes#18322).
Discussion
----------
[DomCrawler] Attach label to form fields
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
While building a software to extract information from a webpage, I need to fill a form with hints on the fields labels.
Example:
```html
<form>
...
<label for="my_field">Input the result of 3 + 4:</label>
<input type="text" id="my_field" name="my_field" />
...
</form>
```
I thought it would be handy to have the field labels attached to each field.
So given the previous form you could now do:
```php
$form->get('my_field')->getLabel()->textContent;
```
Commits
-------
82ef55b [DomCrawler] Attach label to form fields
This PR was squashed before being merged into the 3.2-dev branch (closes#18482).
Discussion
----------
Created a trait to sort tagged services
| 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 writing the `ControllerArgumentValueResolverPass`, I needed a sorting on `priority`. I ended up copying a method from another class. I noticed this was done more often and 99% of the code was the same. I've moved the most common notation into the trait and "used" the trait in the priority aware passes. This increases horizontal re-use and means people can also use this in their bundles.
The cases that were slightly different, are still working completely. I had to fix some tests because they returned an invalid value from the mocked find method.
Commits
-------
778a70b Created a trait to sort tagged services
This PR was merged into the 3.2-dev branch.
Discussion
----------
[ExpressionLanguage] Added a way to dump the AST
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Because it's convenient and it makes easier to inline results of sub/smaller part of the main expression.
Commits
-------
87af6e5 [ExpressionLanguage] Added a way to dump AST
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] added explanation of messages usage in a progress bar
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19031
| License | MIT
| Doc PR | symfony/symfony-docs#6544
The intent of progress bar messages is currently wrongly documented. This PR updates the phpdoc to hopefully better describe the usage of such messages.
So, basically, messages are a way to add dynamic information in the progress bar; information that cannot be computed by the progress bar (like for all other placeholders).
Commits
-------
d92f3ea [Console] added explanation of messages usage in a progress bar
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] force enabling the external XML entity loaders
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18876, #18908
| License | MIT
| Doc PR |
Commits
-------
12b5509 force enabling the external XML entity loaders
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Routing] Throw exception when PHP start tag is missing
| Q | A
| ------------- | ---
| Branch? | master (?)
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/issues/6116 (and many more)
| License | MIT
| Doc PR | -
The Problem
---
In the documentation, we never use the PHP start tag. However, in the first tutorials, people simply copy/past the code examples, save the file and expect things to work. They seem to often forget to add the PHP start tag.
Without start tag, the annotation file loader simply skips the file without providing any reason why. As a big framework is quite overwhelming, simple things like this are completely forgotten.
The Fix
---
If a `*.php` file only consists of `T_INLINE_HTML`, it means there is no `<?php` start tag. In this case, instead of skipping the file, an exception is throwed with a possible fix.
BC Break?
---
As the file loader is only executed for `*.php` files, I think the BC break is minimal, but it is possible that people have applications with `*.php` files *without* a start tag. If this file lives in a routing loaded directory (e.g. when doing `@AppBundle/Controller`), it would now result in an exception.
I think this BC break is minimal and can be ignored. If you don't agree, we can add a little str match to check if `class ... {` exists. If that's the case, I think it's safe to say that it was meant to be a PHP file.
Bug or Feature?
---
I don't know if this is considered a bug or a feature, so I submitted it as a feature.
Commits
-------
1e765c8 Throw exception when PHP start tag is missing
This PR was squashed before being merged into the 3.2-dev branch (closes#18781).
Discussion
----------
[Console] Display errors in quiet mode
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18767
| License | MIT
| Doc PR |
- map VERBOSITY_QUIET normally, rather than suppressing all output
without override
- ensure that we do write to the output if we've determined (via
verbosityLevelMap) that we should
About the second point, it seems ConsoleLogger has the same issue (https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Console/Logger/ConsoleLogger.php#L92), but since we're not using that, I haven't checked it.
Commits
-------
278c26f [Console] Display errors in quiet mode
This PR was merged into the 3.2-dev branch.
Discussion
----------
[HttpKernel] Add convenient method ArgumentResolver:: getDefaultArgumentValueResolvers
| 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 | N/A
I realized while implementing my own `ArgumentValueResolver` that registering a new one is not easy, you have to give the whole list of resolver instead of pushing your one in the stack.
Commits
-------
6fdfc92 [HttpKernel] Add convenient method ArgumentResolver::addArgumentValueResolver
This PR was squashed before being merged into the 3.2-dev branch (closes#18977).
Discussion
----------
[PropertyAccess] Add missing arguments to PropertyAccess::createPropertyAccessor()
| 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/6640
Actually, the recommended way to use the PropertyAccessor is to use `PropertyAccess::createPropertyAccessor`.
The problem is that using this way, we can't specify that invalid indexes should throw an exception, and so when calling `PropertyAccessor::isReadable([], '[foo]')` it returns always true.
It should be possible to make the exception thrown, plus the `PropertyAccessor::$throwExceptionOnInvalidIndex` already exists but is not used in `PropertyAccess::createPropertyAccessor`.
Commits
-------
5ded804 [PropertyAccess] Add missing arguments to PropertyAccess::createPropertyAccessor()
* 2.7:
Added progressive jpeg to mime types guesser
[Yaml] Fix wrong line number when comments are inserted in the middle of a block.
Fixed singular of committee
Do not inject web debug toolbar on attachments
bumped Symfony version to 2.7.15
updated VERSION for 2.7.14
update CONTRIBUTORS for 2.7.14
updated CHANGELOG for 2.7.14
[Console] [SymfonyStyle] Replace long word wrapping test to directly test output
This PR was squashed before being merged into the 3.2-dev branch (closes#18790).
Discussion
----------
[Console] Show aliases in command description instead of in different lines in application description
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18351
| License | MIT
| Doc PR |
This PR is a suggestion about the bug referenced in ticket 18351. The problem is that aliases create new lines with identical descriptions in the application description, it is suggested to show the aliases in the command description.
I had to modify one application fixture to meet this new behaviour and make the tests pass, but I don't think that a new application fixture is needed to test this having the application fixture 2.
Comments are welcome, this is my first PR in Symfony so if I need to meet any more requirements to make it correct to merge just tell me please.
Commits
-------
548ab0a [Console] Show aliases in command description instead of in different lines in application description
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] [SymfonyStyle] Replace long word wrapping test to directly test output
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/18879#discussion_r64783524
| License | MIT
| Doc PR | -
This [line](https://github.com/symfony/symfony/pull/18879/files#diff-d3625f2548a3b329058ca5a0f5aa57feR60) should not have been changed in order to the test to pass. I assume the test was flawed at first, so I suggest to simply test the output as we did for other ones.
Ping @chalasr
Commits
-------
b78fff4 [Console] [SymfonyStyle] Replace long word wrapping test to directly test output
This PR was squashed before being merged into the 3.1 branch (closes#18909).
Discussion
----------
Fixed singular of committee
| Q | A
| ------------- | ---
| Branch? | 3.1?
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18872, #18748
| License | MIT
| Doc PR | -
As in SF 3.1 the StringUtil has been moved to a new Component, I am proposing this for 3.1.
I can easily provide the same in an additional PR against the 2.3? branch.
Commits
-------
b5e1f24 Fixed singular of committee
This PR was squashed before being merged into the 3.2-dev branch (closes#18992).
Discussion
----------
[Cache] AbstractAdapter: avoid an extra call to ApcuAdapter::isSupported
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
8f2ea52 [Cache] AbstractAdapter: avoid an extra call to ApcuAdapter::isSupported
This PR was squashed before being merged into the 3.2-dev branch (closes#18337).
Discussion
----------
[PropertyInfo] Support singular adder and remover
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18166
| License | MIT
| Doc PR | n/a
Fix#18166 with only a soft dependency to the PropertyAccess component. If #18260 is accepted, this PR can be reworked to use this new component, in the meantime it fixes the problem with a soft dependency.
I don't now if it should be considered as a bug fix (and then merged in 2.8) or as a new feature. It's technically a bug fix but I'm not sure that introducing a new soft dependency is acceptable if older branches. What do you think @symfony/deciders?
Commits
-------
4cbb60c [PropertyInfo] Support singular adder and remover
* 3.1:
[BrowserKit] Bump dom-crawler minimum version requirement
Make one call to "OutputInterface::write" method per table row
[HttpKernel] Fix context dependent test
[Debug] Fix context dependent test
* 3.0:
[BrowserKit] Bump dom-crawler minimum version requirement
Make one call to "OutputInterface::write" method per table row
[HttpKernel] Fix context dependent test
[Debug] Fix context dependent test
* 2.8:
[BrowserKit] Bump dom-crawler minimum version requirement
Make one call to "OutputInterface::write" method per table row
[HttpKernel] Fix context dependent test
[Debug] Fix context dependent test
* 2.7:
[BrowserKit] Bump dom-crawler minimum version requirement
Make one call to "OutputInterface::write" method per table row
[HttpKernel] Fix context dependent test
[Debug] Fix context dependent test
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Fix context dependent test
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Class `Foo` exists when the ClassLoader component is tested alongside with HttpKernel
Commits
-------
065dee8 [HttpKernel] Fix context dependent test
* 3.1:
`@throws` annotations should go after `@return`
Fix merge
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
* 3.0:
`@throws` annotations should go after `@return`
Fix merge
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
Conflicts:
src/Symfony/Component/Yaml/Tests/InlineTest.php
* 2.8:
`@throws` annotations should go after `@return`
Fix merge
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
Conflicts:
CHANGELOG-2.3.md
src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php
src/Symfony/Bundle/TwigBundle/Extension/AssetsExtension.php
src/Symfony/Component/Config/Loader/FileLoader.php
src/Symfony/Component/DependencyInjection/Container.php
src/Symfony/Component/DependencyInjection/ContainerBuilder.php
src/Symfony/Component/Finder/Expression/Expression.php
src/Symfony/Component/Finder/Finder.php
src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php
src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
* 2.7:
`@throws` annotations should go after `@return`
Fix merge
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
src/Symfony/Component/Finder/Finder.php
src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
src/Symfony/Component/Security/Acl/Domain/ObjectIdentity.php
src/Symfony/Component/Security/Acl/Model/AclInterface.php
src/Symfony/Component/Security/Acl/Model/MutableAclProviderInterface.php
src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php
src/Symfony/Component/Translation/Loader/XliffFileLoader.php
src/Symfony/Component/Yaml/Tests/InlineTest.php
* 2.3:
updated VERSION for 2.3.42
update CONTRIBUTORS for 2.3.42
updated CHANGELOG for 2.3.42
Revert "bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)"
Partial revert of previous PR
[DependencyInjection] Skip deep reference check for 'service_container'
Catch \Throwable
[Serializer] Add missing @throws annotations
Fix for #18843
force enabling the external XML entity loaders
Removed UTC specification with timestamp
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Added PhpFilesAdapter
| 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 is taking over #18832.
With a warm cache I get these numbers consistently (PhpArrayAdapter being the implem in #18823 ):
```
Fetching randomly 5000 items 10000 times:
Symfony\Component\Cache\Adapter\FilesystemAdapter: 0.1367, 2 megabytes
Symfony\Component\Cache\Adapter\PhpArrayAdapter: 0.0071, 2 megabytes
Symfony\Component\Cache\Adapter\PhpFilesAdapter: 0.0389, 2 megabytes
Symfony\Component\Cache\Adapter\ApcuAdapter: 0.0361, 2 megabytes
```
This means that the PhpArrayAdapter should be used first, then ApcuAdapter preferred over PhpFilesAdapter, then FilesystemAdapter. This is what AbstractAdapter does here.
Also note that to get the cache working, one should stay within the limits defined by the following ini settings:
- memory_limit
- apc.shm_size
- opcache.memory_consumption
- opcache.interned_strings_buffer
- opcache.max_accelerated_files
Commits
-------
8983e83 [Cache] Optimize & wire PhpFilesAdapter
14bcd79 [Cache] Added PhpFilesAdapter
* 3.1:
[travis] Don't use parallel on HHVM
[HttpKernel] Fix RequestDataCollector starting the session
[appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows
[FrameworkBundle] Skip redis cache pools test on failed connection
Fixed forwarded request data in templates
[Security] Fix DebugAccessDecisionManager when object is not a scalar
Skip some tests on HHVM due to a PHPunit bug
Use the Trusty Travis infrastructure for HHVM builds
LdapUserProvider: add missing argument type doc
Fixed issue with missing argument in the abstract service definition for the ldap user provider
Add 3.1 to PR template branch row, remove 2.3
Improve memory efficiency
[Console] Fix BC break introduced by #18101
document method name changes in Voter class
add missing hint for vote() argument type
[#18838] add a test to avoid regressions
bumped Symfony version to 3.1.1
updated VERSION for 3.1.0
updated CHANGELOG for 3.1.0
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
* 3.0:
[travis] Don't use parallel on HHVM
[appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows
Skip some tests on HHVM due to a PHPunit bug
Use the Trusty Travis infrastructure for HHVM builds
Add 3.1 to PR template branch row, remove 2.3
Improve memory efficiency
document method name changes in Voter class
Conflicts:
.travis.yml
* 2.8:
[travis] Don't use parallel on HHVM
[appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows
Skip some tests on HHVM due to a PHPunit bug
Use the Trusty Travis infrastructure for HHVM builds
Add 3.1 to PR template branch row, remove 2.3
Improve memory efficiency
document method name changes in Voter class
Conflicts:
.travis.yml
UPGRADE-3.0.md
src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php
* 2.7:
[travis] Don't use parallel on HHVM
[appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows
Skip some tests on HHVM due to a PHPunit bug
Use the Trusty Travis infrastructure for HHVM builds
Add 3.1 to PR template branch row, remove 2.3
Improve memory efficiency
This PR was merged into the 2.7 branch.
Discussion
----------
Improve memory efficiency
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This avoids concatenating `$message` and `PHP_EOL` (if necessary) as a new value, greatly improving memory efficiency for large `$message`s.
Commits
-------
c1df9f2 Improve memory efficiency
This PR was merged into the 3.1 branch.
Discussion
----------
[3.1][HttpKernel] Fix RequestDataCollector starting the session
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18951
| License | MIT
The RequestDataCollector starts a non-started session on kernel response. This produces bug #18951
I'm not sure if this is the right fix, let's discuss it.
Commits
-------
ab62dcf [HttpKernel] Fix RequestDataCollector starting the session
This PR was merged into the 2.7 branch.
Discussion
----------
Run an uptodate version of HHVM on Travis
| Q | A
| ------------- | ---
| Branch? |2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
Using the Trusty infrastructure allows running an uptodate version of HHVM rather than running the latest version supporting Precise, which is very old.
It relies on an undocumented feature of the Travis config file, namely the fact that ``matrix.include`` actually allows to overwrite everything from the config file (it is merged with the main config), even though the Travis linter complains about it. I think it is fine to use this and to replace it with an official approach once there is one.
Refs #18922
Commits
-------
e6956c9 Skip some tests on HHVM due to a PHPunit bug
e041da0 Use the Trusty Travis infrastructure for HHVM builds
This PR was merged into the 3.1 branch.
Discussion
----------
[#18838] add a test to avoid regressions
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18838
| License | MIT
| Doc PR |
Commits
-------
240cf0a [#18838] add a test to avoid regressions
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] force enabling the external XML entity loaders
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18876
| License | MIT
| Doc PR |
Commits
-------
142b1a4 force enabling the external XML entity loaders
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Skip deep reference check for 'service_container'
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The "hasReference" check when dumping the container fails in the case where a service has a method call which includes a reference to a private/inlined service when either that service, or a dependency of it, references the service_container. This because service_container isn't defined while it still tries to check the references of it. So the service_container must be skipped in this case, this shouldn't break anything as the service_container doesn't reference any services, and thus can't reference the service which it is checking for.
Commits
-------
6f36733 [DependencyInjection] Skip deep reference check for 'service_container'
Deep checks on whether a service references another service need to
exclude the 'service_container' service as it doesn't exist. Without this
dumping the container will fail if a service definition references an
inlined service which has a direct or indirect dependency to the
service_container.
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3][Form] Removed UTC specification with timestamp
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The function `date_parse()` indicates a warning if a timezone is used with the timestamp: `Double timezone specification`. I removed the UTC specification and this time it's more faster!
Commits
-------
0d14aac Removed UTC specification with timestamp
This PR was squashed before being merged into the 2.3 branch (closes#18861).
Discussion
----------
Fix for #18843
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18843
| License | MIT
| Doc PR | -
Commits
-------
7d78196 Fix for #18843
* 3.1:
[Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 3.0:
[Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 2.8:
[Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 2.7:
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 2.3:
[Routing] Finish annotation loader taking a class constant as a beginning of a class name
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Fix the annotation loader taking a class constant as a beginning of a class name
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18633
| License | MIT
| Doc PR | -
Code copy/pasted from ClassMapGenerator.php
Commits
-------
8d4f35d [Routing] Finish annotation loader taking a class constant as a beginning of a class name
43c7f9b [Routing] Fix the annotation loader taking a class constant as a beginning of a class name
* 3.1:
[PropertyAccess] Fix for PHP 7.0.7
[Yaml] search for colons in strings only
bumped Symfony version to 3.1.0
updated VERSION for 3.1.0-RC1
updated CHANGELOG for 3.1.0-RC1
fixed PHP 5.3 compat in tests
Since the parser is able to return `\DateTime` instances when the
`Yaml::PARSE_DATETIME` flag is passed, we need to ensure that the parsed
value actually is a string before passing the parsed value to string
functions.
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Cache] Create NullAdapter to disable cache if needed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | WIP
| Fixed tickets | -
| License | MIT
| Doc PR | -
Tthis PR aims to implement a Symfony Cache Null adapter able to disable cache if needed (very useful in tests or in the case of the fallback of the OpCacheAdapter for instance).
This PR is required by https://github.com/symfony/symfony/pull/18823 and https://github.com/symfony/symfony/pull/18533
Commits
-------
0519d22 [Cache] Create NullAdapter to disable cache if needed
* 3.1:
[Console] SymfonyStyle: Align multi-line/very-long-line blocks
[Console][DX] Fixed ambiguous error message when using a duplicate option shortcut
Fix js comment in profiler
[Ldap] Fixed issue with Entry password attribute containing array of values and made password attribute configurable
[Serializer][#18837] adding a test
[Cache] Drop counting hit/miss in ProxyAdapter
[Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called
[Serializer] ObjectNormalizer: add missing parameters
This PR was merged into the 3.1 branch.
Discussion
----------
[Serializer][#18837] adding a test
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18837
| License | MIT
| Doc PR |
Commits
-------
37cacc4 [Serializer][#18837] adding a test
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Debug] More compact HTML
| 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 patch makes the HTML output for exception stack traces slightly more compact. This makes the stack trace a bit more readable when inspecting the HTML source, e.g. when using cURL.
1. Vendor-specific prefixes for border-radius are removed. They are not relevant [in any modern browser](http://caniuse.com/border-radius).
2. The ondblclick is now added only once and relies on event bubbling rather than being added to every `<li>` in the stack trace.
3. Single quotes are not escaped. Escaping single quotes is only required for values enclosed in single quoted HTML attributes - all our attributes are double-quoted.
Commits
-------
9613b75 [Debug] More compact HTML
* 3.1: (24 commits)
[Yaml] fix exception contexts
Added people - person inflection
People - person singularization
[Yaml] properly handle unindented collections
[Serializer] Add test for ignored attributes during denormalization
chomp newlines only at the end of YAML documents
Fixed server status command when port has been omitted
Update UPGRADE FROM 2.x to 3.0
[Config] Allow schemed path in FileResource
fix removed commands wording in upgrade file
Catch \Throwable
Catch \Throwable
[DependencyInjection] Avoid generating call_user_func in more cases
[Validator] Support for DateTimeImmutable
[YAML] fixed "dump" signature in upgrade file
[Cache] Rename nonce to version
[FrameworkBundle] update upgrade instructions
Use levenshtein level for better Bundle matching
[WebProfilerBundle] Fix CORS ajax security issues
remove methods that were needed for PHP 5.3
...
* 3.0:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
[Serializer] Add test for ignored attributes during denormalization
chomp newlines only at the end of YAML documents
Fixed server status command when port has been omitted
Update UPGRADE FROM 2.x to 3.0
fix removed commands wording in upgrade file
Catch \Throwable
Catch \Throwable
[DependencyInjection] Avoid generating call_user_func in more cases
[Validator] Support for DateTimeImmutable
[FrameworkBundle] update upgrade instructions
Use levenshtein level for better Bundle matching
[WebProfilerBundle] Fix CORS ajax security issues
remove methods that were needed for PHP 5.3
[DX][DI] Make Autowiring exceptions more future friendly
* 2.8:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
[Serializer] Add test for ignored attributes during denormalization
chomp newlines only at the end of YAML documents
Fixed server status command when port has been omitted
Update UPGRADE FROM 2.x to 3.0
fix removed commands wording in upgrade file
Catch \Throwable
Catch \Throwable
Use levenshtein level for better Bundle matching
[WebProfilerBundle] Fix CORS ajax security issues
[DX][DI] Make Autowiring exceptions more future friendly
* 2.7:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
[Serializer] Add test for ignored attributes during denormalization
chomp newlines only at the end of YAML documents
Fixed server status command when port has been omitted
Update UPGRADE FROM 2.x to 3.0
Catch \Throwable
Use levenshtein level for better Bundle matching
[WebProfilerBundle] Fix CORS ajax security issues
* 2.3:
[Yaml] fix exception contexts
People - person singularization
[Yaml] properly handle unindented collections
chomp newlines only at the end of YAML documents
This PR was merged into the 2.8 branch.
Discussion
----------
Catch \Throwable
| Q | A
| ------------- | ---
| Branch? | 2.8, 3.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | Mostly!
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The first commit is based on symfony/symfony#15949
Depends on symfony/symfony#18813, symfony/symfony#18812
----
I'm new to symfony, so I'm not sure where are all the places where it makes sense to actually catch the throwable and where not. I added most places that seemed logical and when I wasn't sure, I added it anyway. I'm hoping you guys (and girls?) can point out the places where the catch should not be added, I'll fix it and then I can create several PR's for the older branches. A lot of this IMHO should go also to 3.0.
Commits
-------
de671f4 Catch \Throwable
This PR was squashed before being merged into the 3.0 branch (closes#18759).
Discussion
----------
[Validator] Support for DateTimeImmutable
| Q | A
| ------------- | ---
| Branch? | 3.0
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18752
| License | MIT
| Doc PR |
When validating with DateTime constraint UnexpectedTypeException is thrown for DateTimeImmutable instances.
Why PR?
- DateTimeImmutable behaves like a DateTime. Both implements the same interface DateTimeInterface.
- DateTimeInterface cannot be implemented by the client.
Commits
-------
f49659f [Validator] Support for DateTimeImmutable
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Yaml] Allow using _ in some numeric notations
| Q | A
| ------------- | ---
| Branch | master
| Bug fix? | no ?
| New feature? | yes ?
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18094
| License | MIT
| Doc PR | ~
Allows to use the `_` to group "big" ints, as suggested in the yaml integer type specification. As discussed in #18094, we should check if it is still part of the 1.2 specification, but I don't really see why not ? I can't see anywhere anything saying it is not valid anymore... as there are links to these types in some other specs.
This is #18096, but targetted on master as this is considered as a new feature. I also support the dump of such values as only strings. I think I should change how it is dumped thoug, and use the escape filter instead though (as I was misusing the data provider and it provided strange results at the time)
Commits
-------
e6da11c [Yaml] Allow using _ in some numeric notations
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Ldap] Added the possibility to configure all available Ldap options for connection
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18448
| License | MIT
| Doc PR |
This PR lets a user configure [all documented Ldap options](http://php.net/manual/fr/function.ldap-get-option.php), as well as a few undocumented ones (back-ported from the [OpenLdap C library](http://linux.die.net/man/3/ldap_set_option), as well as the [Ldap client specification](https://www.ietf.org/proceedings/50/I-D/ldapext-ldap-c-api-05.txt)).
Commits
-------
a8bae31 Added the possibility to configure all Ldap options for connection
* 3.0:
Fix computation of PR diffs for component matrix lines
[console][table] adjust width of colspanned cell.
[BUG] Delete class 'control-group' in bootstrap 3
[2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
added missing constant in Response
Update HTTP statuses list
[Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
added StaticVerionStrategyTest
Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
Updated the link to the list of currency codes
Fixed DateTimeInterface comparaison
[console][table] adjust width of colspanned cell.
* 2.8:
Fix computation of PR diffs for component matrix lines
[console][table] adjust width of colspanned cell.
[BUG] Delete class 'control-group' in bootstrap 3
[2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
added missing constant in Response
Update HTTP statuses list
[Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
added StaticVerionStrategyTest
Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
Updated the link to the list of currency codes
[console][table] adjust width of colspanned cell.
* 2.7:
Fix computation of PR diffs for component matrix lines
[BUG] Delete class 'control-group' in bootstrap 3
[2.8] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
This PR was merged into the 3.1-dev branch.
Discussion
----------
Make failed autowiring error messages more explicit
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no (better DX integration)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18658
| License | MIT
| Doc PR | N/A
@nicolas-grekas This is a port from #18691 (which was for **2.8**).
It looks like the original PR has been already mostly implemented in **master** by @weaverryan (in #17877).
IMO, this PR is still improving two use cases:
* In case a class cannot be autowired because no service can be found AND a service cannot be registered automatically, the error message now mentions both conditions (instead of simply saying no service has been found)
* In case a class with no service attached to it can be automatically instantiated but cannot be autowired because of further problems, an exception mentioning this is now thrown instead of the lower level exception, making the situation easier to debug. (The lower level exception is still available through `getPrevious()`)
Hence, I still think this PR provides useful additional DX features and is worth to be merged.
Commits
-------
6894e03 Make failed autowiring error messages more explicit
This PR was merged into the 3.1-dev branch.
Discussion
----------
[FrameworkBundle] Default to Apcu+Filesystem cache chain
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes (perf)
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In #16838, @dunglas benched that the filesystem cache is not the fastest one (not a surprise).
Yet, it is the default for now. I propose to replace this default by a dynamically created one that uses APCu when available (of course, we cannot do the check at container-build time), chained with the filesystem.
The benefit is double: APCu is automatically used when available without any configuration, and cache warming up is seeded by the filesystem cache so that the apcu cache can benefit from it.
Commits
-------
b9b57f9 [FrameworkBundle] Default to Apcu+Filesystem cache chain
This PR was merged into the 3.1-dev branch.
Discussion
----------
[DomCrawler] Expose getter for uri
| Q | A
| ------------- | ---
| Branch |
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Same as #18143
Commits
-------
baebdb4 [DomCrawler] Exposed getter for uri
* 2.7:
added missing constant in Response
Update HTTP statuses list
[Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
added StaticVerionStrategyTest
Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
Updated the link to the list of currency codes
[console][table] adjust width of colspanned cell.
* 2.3:
Update HTTP statuses list
[Console][#18619] Prevent fatal error when calling Command#getHelper() without helperSet
Add SplFileInfo array doc on Finder iterator methods so that IDE will know what it returns
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
Updated the link to the list of currency codes
This PR was merged into the 3.1-dev branch.
Discussion
----------
[HttpKernel] Add request method to logger messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
While debugging some functional tests I was looking at the test.log. It would have been quite useful to know if the request was a POST or GET. This adds the request method to the log details.
Commits
-------
d751d59 Add request method to logger messages
This PR was merged into the 3.0 branch.
Discussion
----------
[3.0] Fixed DateTimeInterface comparison
| Q | A
| ------------- | ---
| Branch? | 3.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
DateTime class implements the DateTimeInterface.
It is useless to compare is a value is an instance of DateTime or DateTimeInterface.
Commits
-------
9a0bc99 Fixed DateTimeInterface comparaison
This PR was squashed before being merged into the 2.3 branch (closes#18761).
Discussion
----------
[2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
For https://github.com/symfony/symfony/pull/18747
Commits
-------
7101cab [2.3] [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper
This PR was merged into the 2.3 branch.
Discussion
----------
Updated the link to the list of currency codes
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18758
| License | MIT
| Doc PR | -
Commits
-------
09b70a1 Updated the link to the list of currency codes
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Clean RedisAdapter pipelining + FilesystemAdapter
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This PR refactorize Redis pipelining so that the case for handling RedisArray is abstracted, thus less bug prone.
Commits
-------
acf0075 [Cache] Clean RedisAdapter pipelining + FilesystemAdapter
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Add nonce based cache invalidation to ApcuAdapter
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
APCu cache invalidation is tedious because it can't be done from the cli.
This PR adds and wires a nonce based cache invalidation strategy to work around this limitation.
Commits
-------
a7899fe [Cache] Add nonce based cache invalidation to ApcuAdapter
This PR was squashed before being merged into the 3.1-dev branch (closes#18762).
Discussion
----------
[Translation] XLIFF Add `id` to meta data.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe/no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I would like to get the `id` attribute value from parsed XLIFF v1.2 files in the meta data (of the catalogue).
Commits
-------
ad4adca [Translation] XLIFF Add uid=501(fabien) gid=20(staff) groups=20(staff),401(com.apple.sharepoint.group.1),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh) to meta data.
* 3.0: (31 commits)
Drop hirak/prestissimo
[MonologBridge] Uninstallable together with symfony/http-kernel in 3.0.6
bumped Symfony version to 3.0.7
updated VERSION for 3.0.6
updated CHANGELOG for 3.0.6
bumped Symfony version to 2.8.7
updated VERSION for 2.8.6
updated CHANGELOG for 2.8.6
bumped Symfony version to 2.7.14
updated VERSION for 2.7.13
updated CHANGELOG for 2.7.13
bumped Symfony version to 2.3.42
[Debug] Fix fatal error handlers on PHP 7
updated VERSION for 2.3.41
update CONTRIBUTORS for 2.3.41
updated CHANGELOG for 2.3.41
fixed bad merge
Fixed issue with blank password with Ldap
limited the maximum length of a submitted username
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
...
Conflicts:
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
src/Symfony/Component/HttpKernel/Kernel.php
* 2.8:
Drop hirak/prestissimo
bumped Symfony version to 2.8.7
updated VERSION for 2.8.6
updated CHANGELOG for 2.8.6
bumped Symfony version to 2.7.14
updated VERSION for 2.7.13
updated CHANGELOG for 2.7.13
bumped Symfony version to 2.3.42
[Debug] Fix fatal error handlers on PHP 7
updated VERSION for 2.3.41
update CONTRIBUTORS for 2.3.41
updated CHANGELOG for 2.3.41
Conflicts:
CHANGELOG-2.3.md
CHANGELOG-2.7.md
CHANGELOG-3.0.md
appveyor.yml
src/Symfony/Component/HttpKernel/Kernel.php
* 2.7:
Drop hirak/prestissimo
bumped Symfony version to 2.7.14
updated VERSION for 2.7.13
updated CHANGELOG for 2.7.13
bumped Symfony version to 2.3.42
[Debug] Fix fatal error handlers on PHP 7
updated VERSION for 2.3.41
update CONTRIBUTORS for 2.3.41
updated CHANGELOG for 2.3.41
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.8 branch.
Discussion
----------
Fixed issue with blank password with Ldap
| Q | A
| ------------- | ---
| Branch? | 1.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
Commits
-------
c7d9c62 Fixed issue with blank password with Ldap
The bind operation of LDAP, as described in RFC 4513, provides a method
which allows for authentication of users. For the Simple Authentication
Method a user may use the anonymous authentication mechanism, the
unauthenticated authentication mechanism, or the name/password
authentication mechanism. The unauthenticated authentication mechanism
is used when a client who desires to establish an anonymous
authorization state passes a non-zero length distinguished name and a
zero length password. Most LDAP servers either can be configured to
allow this mechanism or allow it by default.
_Web-based applications which perform the simple bind operation with the
client's credentials are at risk when an anonymous authorization state is
established. This can occur when the web-based application passes a
distinguished name and a zero length password to the LDAP server._
Thus, misconfiguring a server with simple bind can trick Symfony into
thinking the username/password tuple as valid, potentially leading to
unauthorized access.
* 2.8:
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
prevent calling get() for service_container service
call get() after the container was compiled
Fixed readme of OptionsResolver
top-level anonymous services must be public
[DependencyInjection] Suggest ExpressionLanguage in composer.json
added a conflict between Monolog bridge 2.8 and HTTP Kernel 3.0+
* 2.7:
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
prevent calling get() for service_container service
call get() after the container was compiled
Fixed readme of OptionsResolver
[DependencyInjection] Suggest ExpressionLanguage in composer.json
* 2.3:
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
call get() after the container was compiled
Fixed readme of OptionsResolver
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Suggest ExpressionLanguage in composer.json
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As the DependencyInjection component has lots of classes containing uses of the ExpressionLanguage component, I propose to add it to the composer.json suggests.
Commits
-------
d6c9073 [DependencyInjection] Suggest ExpressionLanguage in composer.json
This PR was squashed before being merged into the 2.3 branch (closes#18727).
Discussion
----------
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes, phpdoc one
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Updated phpdoc of AnonymousToken $user param from string to string|object since an object is allowed to in the parent AbstractToken: https://github.com/symfony/symfony/blob/2.3/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php#L91
Commits
-------
b1c60b4 [2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
The `getListenerPriority()` method was added to the event dispatcher
interface in Symfony 3.0. Thus, it no longer makes sense to have a test
that expects the method not to exist (the corresponding code in the
`TraceableEventDispatcher` was already removed in 576a55c.
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Add support for Predis, RedisArray and RedisCluster
| Q | A
| ------------- | ---
| Branch? | 3.1 ideally
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
b004243 [Cache] Add support for Predis, RedisArray and RedisCluster
* 2.8:
[EventDispatcher] check for method to exist
[DependencyInjection] Fixed the priority of service decoration on service with parent
Make failed autowiring error messages more explicit
This PR was merged into the 2.8 branch.
Discussion
----------
[EventDispatcher] check for method to exist
| 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/16301#issuecomment-193150055
| License | MIT
| Doc PR |
This change must be reverted after being merged into the `3.0` branch (the `getListenerPriority()` method was added to the interface in Symfony 3.0).
Commits
-------
78ae2ad [EventDispatcher] check for method to exist
This PR was merged into the 2.8 branch.
Discussion
----------
[DX][DI] Make failed autowiring error messages more explicit
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no (better DX integration)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18658
| License | MIT
| Doc PR | N/A
This is the PR improving the auto wiring error messages.
Two errors messages have augmented:
If a type-hint does not match any existing type and a service for this type cannot be automatically created, the error message now says so, instead of simply saying the type cannot be autowired.
If a type-hint matches multiple services and none of them provides an autowiringType for it, the error message now says so and list the candidate services, instead of simply saying the type cannot be autowired.
Commits
-------
2ac81f9 Make failed autowiring error messages more explicit
This PR was merged into the 2.8 branch.
Discussion
----------
[DependencyInjection] Use the priority of service decoration on service with parent
| 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 |
Commits
-------
d1ad43c [DependencyInjection] Fixed the priority of service decoration on service with parent
* 3.0: (24 commits)
add @Event annotation for AuthenticationEvents
bumped Symfony version to 3.0.6
updated VERSION for 3.0.5
updated CHANGELOG for 3.0.5
bumped Symfony version to 2.8.6
[PropertyInfo] PHPDoc correction
add @Event annotation for KernelEvents
Fixed typo
updated VERSION for 2.8.5
updated CHANGELOG for 2.8.5
bumped Symfony version to 2.7.13
updated VERSION for 2.7.12
update CONTRIBUTORS for 2.7.12
updated CHANGELOG for 2.7.12
bumped Symfony version to 2.3.41
updated VERSION for 2.3.40
update CONTRIBUTORS for 2.3.40
updated CHANGELOG for 2.3.40
Revert "minor #18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)"
Revert "fixed CS"
...
* 2.8:
add @Event annotation for AuthenticationEvents
bumped Symfony version to 2.8.6
[PropertyInfo] PHPDoc correction
add @Event annotation for KernelEvents
updated VERSION for 2.8.5
updated CHANGELOG for 2.8.5
bumped Symfony version to 2.7.13
updated VERSION for 2.7.12
update CONTRIBUTORS for 2.7.12
updated CHANGELOG for 2.7.12
bumped Symfony version to 2.3.41
updated VERSION for 2.3.40
update CONTRIBUTORS for 2.3.40
updated CHANGELOG for 2.3.40
Revert "minor #18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)"
Revert "fixed CS"
fixed deprecation notices in tests
[Security] Normalize "symfony/security-acl" dependency versions across all composer.json files
[FrameworkBundle] Remove misleading comment
bug #17460 [DI] fix ambiguous services schema
* 2.7:
add @Event annotation for AuthenticationEvents
add @Event annotation for KernelEvents
bumped Symfony version to 2.7.13
updated VERSION for 2.7.12
update CONTRIBUTORS for 2.7.12
updated CHANGELOG for 2.7.12
bumped Symfony version to 2.3.41
updated VERSION for 2.3.40
update CONTRIBUTORS for 2.3.40
updated CHANGELOG for 2.3.40
Revert "minor #18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)"
Revert "fixed CS"
[FrameworkBundle] Remove misleading comment
bug #17460 [DI] fix ambiguous services schema
* 2.3:
add @Event annotation for AuthenticationEvents
bumped Symfony version to 2.3.41
updated VERSION for 2.3.40
update CONTRIBUTORS for 2.3.40
updated CHANGELOG for 2.3.40
bug #17460 [DI] fix ambiguous services schema
This PR was merged into the 3.1-dev branch.
Discussion
----------
add @Event annotation for AuthenticationEvents
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18684
| License | MIT
split of #18684 for targeting 2.3 branch
Commits
-------
e2c1270 add @Event annotation for AuthenticationEvents
While debugging some functional tests I was looking at the test.log. It would have been quite useful to know if the request was a POST or GET. This adds to the log details.
This PR was merged into the 3.1-dev branch.
Discussion
----------
Updating the error message of an AuthenticationEntryPointInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | not necessary
During a training, we forgot to fill in the `start()` method for an entry point and got a *horrible* error message. Now, if you mess up `start()`, you get:
![screen shot 2016-04-27 at 12 49 50 pm](https://cloud.githubusercontent.com/assets/121003/14860378/92578e68-0c76-11e6-9fe5-45141fe2ce43.png)
Thanks!
Commits
-------
7b6c56c Updating the error message of an AuthenticationEntryPointInterface returns a non-Response object
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Dont use Redis connection when not required
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
1165459 [Cache] Dont use Redis connection when not required
This PR was merged into the 2.8 branch.
Discussion
----------
[Security] Normalize "symfony/security-acl" dependency versions across all composer.json files
| 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 |
There are some inconsistencies in the Symfony 2.8 `symfony/security-acl` dependency versions that would help downstream if we could just package `symfony/security-acl` 3.0.0 instead of having to package both versions 2.8.0 (for Symfony 2.8) and 3.0.0 (for Symfony 3.0).
```
$ git clone https://github.com/symfony/symfony.git
Cloning into 'symfony'...
cd remote: Counting objects: 319438, done.
nyReceiving objects: 4% (12778/319438), 2.06 MiB | 4.12 MiB/s
4Receiving objects: 41% (130970/319438), 40.80 MiB | 7.86 MiB/s
remote: Total 319438 (delta 0), reused 0 (delta 0), pack-reused 319437
Receiving objects: 100% (319438/319438), 68.46 MiB | 8.21 MiB/s, done.
Resolving deltas: 100% (204691/204691), done.
Checking connectivity... done.
$ cd symfony
$ git checkout v2.8.4
Previous HEAD position was 4e17cb2... Merge branch '2.8' into 3.0
HEAD is now at 9e14f9f... Merge branch '2.7' into 2.8
$ find . -name 'composer.json' | xargs grep 'symfony/security-acl'
./src/Symfony/Bundle/SecurityBundle/composer.json: "symfony/security-acl": "~2.7|~3.0.0",
./src/Symfony/Bridge/Twig/composer.json: "symfony/security-acl": "~2.6|~3.0.0",
./src/Symfony/Component/Security/composer.json: "symfony/security-acl": "~2.7",
./composer.json: "symfony/security-acl": "~2.7",
```
Commits
-------
e249bc3 [Security] Normalize "symfony/security-acl" dependency versions across all composer.json files
This PR was merged into the 3.1-dev branch.
Discussion
----------
Fixed a redundant check in DefaultValueResolver
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
In #18308 I have introduced a `DefaultValueResolver`. When writing documentation, I was planning on adding the code as an example and I noticed it did a check in the request attributes. A default value value should always be injected, whether the request has it or not. In case the request _does_ have the value, it would've already been added and thus never reach the default resolver.
Thus as this is never called in the default and configured flows and should not change the default value behavior, I'm removing this.
Commits
-------
e54c1a6 Fixed a redundant check in DefaultValueResolver
This PR was merged into the 3.1-dev branch.
Discussion
----------
[LDAP] Check whether an entry attribute exists
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Currently a method exists for getting the value of an attribute. It would make the Entry class more complete to be able to simply test if an attribute exists in the entry.
Commits
-------
56ef8a0 [LDAP] Check whether an entry attribute exists
This PR was merged into the 3.1-dev branch.
Discussion
----------
[HttpKernel] tweaked redirection profiling in RequestDataCollector
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
- c8ba3b2 removes duplicated code forgotten in #17589
- a47d2e8 fixes the collecting of redirect data in first sub request instead of redirected master request.
Commits
-------
df19c14 use a request attribute flag for redirection profile
b26cb6d [HttpKernel] added RequestDataCollector::onKernelResponse()
c8ba3b2 [HttpKernel] remove legacy duplicated code
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] fixed BC break with pre selection of choices with `ChoiceType` and its children
| Q | A
| ------------- | ---
| Branch | 2.7+
| Bugfix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18173, #14712, #17789
| License | MIT
| Doc PR | -
- f7eea72 reverts BC break introduced in #17760
- 58e8ed0 fixes pre selection of choice with model values such as `false`, `null` or empty string without BC break.
`ChoiceType` now always use `ChoiceToValueTransformer` or `ChoicesToValuesTransformer` depending on `multiple` option.
Hence `CheckboxListMapper` and `RadioListMapper` don't handle the transformation anymore.
Commits
-------
ea5375c [Form] refactor CheckboxListMapper and RadioListMapper
71841c7 Revert "[Form] refactor `RadioListMapper::mapDataToForm()`"
This PR was merged into the 2.8 branch.
Discussion
----------
[Console] Fix wrong exceptions being thrown
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
28fca7c [Console] Fix wrong exceptions being thrown
This PR was merged into the 3.1-dev branch.
Discussion
----------
[FrameworkBundle][Serializer] Fix a deprecation triggered by the ClassMetadataFactory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
Without apparent reasons, [FOSRestBundle's tests fail](https://travis-ci.org/FriendsOfSymfony/FOSRestBundle/jobs/124384888) since https://github.com/symfony/symfony/pull/18561.
```
Passing a Doctrine Cache instance as 2nd parameter of the "Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory" constructor is deprecated. This parameter will be removed in Symfony 4.0. Use the "Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory" class instead: 6x
1x in ErrorWithTemplatingFormatTest::testSerializeExceptionHtml from FOS\RestBundle\Tests\Functional
1x in SerializerErrorTest::testSerializeExceptionJson from FOS\RestBundle\Tests\Functional
1x in SerializerErrorTest::testSerializeExceptionJsonWithoutDebug from FOS\RestBundle\Tests\Functional
1x in SerializerErrorTest::testSerializeExceptionXml from FOS\RestBundle\Tests\Functional
1x in SerializerErrorTest::testSerializeInvalidFormJson from FOS\RestBundle\Tests\Functional
1x in SerializerErrorTest::testSerializeInvalidFormXml from FOS\RestBundle\Tests\Functional
```
We don't use cache in our tests but some of them are not in ``debug`` mode (will change soon) so the cache is automatically used.
This PR fixes this deprecation by detecting if the cache used by the serializer is psr6 compliant or not (if it is, then it replaces the default metadata factory by an instance of the new class ``CacheClassMetadataFactory``, otherwise the second parameter of the ``ClassMetadataFactory`` is used).
Commits
-------
15579d5 [FrameworkBundle] Deprecate framework.serializer.cache
eccbffb [Serializer] Improve a deprecation message
96e418a Revert "[FrameworkBundle] Fallback to default cache system in production for serializer"
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Minor cleanup
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
5786f3d [Cache] Minor cleanup
* 3.0:
use stable 1.0.x Composer versions
Fix typo in VarDumper README
[DI] Fix AutowirePass fatal error with classes that have non-existing parents
[DependencyInjection] Tests for AutowirePass with missing parent class
[WebProfilerBunde] Give an absolute url in case the request occured from another domain
Conflicts:
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
* 2.8:
use stable 1.0.x Composer versions
Fix typo in VarDumper README
[DI] Fix AutowirePass fatal error with classes that have non-existing parents
[DependencyInjection] Tests for AutowirePass with missing parent class
[WebProfilerBunde] Give an absolute url in case the request occured from another domain
* 2.7:
use stable 1.0.x Composer versions
Fix typo in VarDumper README
[WebProfilerBunde] Give an absolute url in case the request occured from another domain
This PR was merged into the 2.8 branch.
Discussion
----------
[DI] Fix AutowirePass fatal error with classes that have non-existing parents
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18188
| License | MIT
| Doc PR | -
Commits
-------
202cc77 [DI] Fix AutowirePass fatal error with classes that have non-existing parents
1735b85 [DependencyInjection] Tests for AutowirePass with missing parent class
* 3.0:
[PropertyAccess] ->getValue() should be read-only
[VarDumper] Fix dumping type hints for non-existing parent classes
[Config] Fix XmlUtilsTest namespace
[Console] [TableHelper] make it work with SymfonyStyle.
Remove dead code
[FrameworkBundle] Better output for user in ContainerDebugCommand
[Routing] add query param if value is different from default
* 2.8:
[PropertyAccess] ->getValue() should be read-only
[VarDumper] Fix dumping type hints for non-existing parent classes
[Config] Fix XmlUtilsTest namespace
[Console] [TableHelper] make it work with SymfonyStyle.
Remove dead code
[Routing] add query param if value is different from default
Conflicts:
src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
* 2.7:
[PropertyAccess] ->getValue() should be read-only
[VarDumper] Fix dumping type hints for non-existing parent classes
[Config] Fix XmlUtilsTest namespace
[Console] [TableHelper] make it work with SymfonyStyle.
Remove dead code
[Routing] add query param if value is different from default
Conflicts:
src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
* 2.3:
[PropertyAccess] ->getValue() should be read-only
[Config] Fix XmlUtilsTest namespace
[Routing] add query param if value is different from default
Conflicts:
src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
* 3.0:
[DI] Fix internal caching in AutowirePass
[PropertyInfo] Remove useless return statement
[Console] use ANSI escape sequences in ProgressBar overwrite method
[HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()
Replace iconv_*() uses by mb_*(), add mbstring polyfill when required
[DependencyInjection] Remove YAML check in CrossCheckTest
[Process] Consistently use getProcess() in tests
[LDAP] Free the search result after a search to free memory
[DependencyInjection] fix phpDoc
Conflicts:
src/Symfony/Component/Ldap/LdapClient.php
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] [TableHelper] make it work with SymfonyStyle.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #18573
| License | MIT
| Doc PR | ~
Commits
-------
43cc93c [Console] [TableHelper] make it work with SymfonyStyle.
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Serializer] fix parent class of AbstractNormalizer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/17545#discussion_r58012336
| License | MIT
| Doc PR |
We must maintain the parent class to not break BC.
Commits
-------
45b9ed9 fix parent class of AbstractNormalizer
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Serializer] Integrate the PropertyInfo Component (recursive denormalization and hardening)
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16143, #17193, #14844
| License | MIT
| Doc PR | todo
Integrates the PropertyInfo Component in order to:
* denormalize a graph of objects recursively (see tests)
* harden the hydratation logic
The hardening part is interesting. Considering the following example:
```php
class Foo
{
public function setDate(\DateTimeInterface $date)
{
}
}
// initialize $normalizer
$normalizer->denormalize(['date' => 1234], Foo::class);
```
Previously, a PHP error was thrown because the type passed to the setter (an int) doesn't match the one checked with the typehint. With the PropertyInfo integration, an `UnexpectedValueExcption` is throw instead.
It's especially interesting for web APIs dealing with JSON documents. For instance in API Platform, previously a 500 error was thrown, but thanks to this fix a 400 HTTP code with a descriptive error message will be returned. (/cc @csarrazi @mRoca @blazarecki, it's an alternative to https://github.com/dunglas/php-to-json-schema for protecting an API).
/cc @mihai-stancu
Commits
-------
5194482 [Serializer] Integrate the PropertyInfo Component
6b464b0 Recursive denormalize using PropertyInfo
This PR was merged into the 3.1-dev branch.
Discussion
----------
DX: better error message if factory class is empty
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets | -
| License | MIT
| Doc PR | -
i was trying to debug this service configuration:
```xml
<service id="repository.user" class="Doctrine\ORM\EntityRepository">
<argument>%user_entity_class%</argument>
<factory id="doctrine.orm.default_entity_manager" method="getRepository"/>
</service>
```
Turns out i should have used `<factory service=...` instead of `<factory id=...` but the error message does not even tell which service is wrong. The same happens when only specifying the `method=` attribute. The current exception message tells:
Cannot dump definition because of invalid class name ('')
With this change, the message at least tells the context, hopefully helping the developer debug the issue:
Empty class for factory of service repository.user and no factory service specified
Commits
-------
0999326 better error message if factory class is empty
This PR was merged into the 3.1-dev branch.
Discussion
----------
fix#17993 - Deprecated callable strings
| Q | A
| ------------- | ---
| Branch | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | #17993
| License | MIT
| Doc PR |
Is this ok ?
- [x] Rebase when #18057 is merged
Commits
-------
191b495fix#17993 - Deprecated callable strings
This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] add query param if value is different from default
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | yes
| BC breaks? | most likely not
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #10940, #18111, #18035
| License | MIT
| Doc PR | -
Commits
-------
1ef2edf [Routing] add query param if value is different from default
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache
| 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 would allow cache pool configuration as usual (see #17290) before injecting the resulting doctrine cache provider anywhere such an interface is required.
Commits
-------
5d256dd [Cache] Add DoctrineProvider, for using PSR-6 pools in Doctrine Cache
This PR was merged into the 2.8 branch.
Discussion
----------
Replace iconv_*() uses by mb_*(), add mbstring polyfill when required
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18539
| License | MIT
| Doc PR | -
Looks like `iconv_*()` functions can be really slow (see #18539).
Commits
-------
27f5f81 Replace iconv_*() uses by mb_*(), add mbstring polyfill when required
* 2.8:
[Console] use ANSI escape sequences in ProgressBar overwrite method
[HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()
[DependencyInjection] Remove YAML check in CrossCheckTest
[Process] Consistently use getProcess() in tests
[LDAP] Free the search result after a search to free memory
[DependencyInjection] fix phpDoc
* 2.7:
[Console] use ANSI escape sequences in ProgressBar overwrite method
[HttpKernel] Fix wrong number of arguments in call of ExceptionListener::logException()
[DependencyInjection] Remove YAML check in CrossCheckTest
[Process] Consistently use getProcess() in tests
[DependencyInjection] fix phpDoc
This PR was squashed before being merged into the 2.7 branch (closes#18496).
Discussion
----------
[Console] use ANSI escape sequences in ProgressBar overwrite method
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16957
| License | MIT
| Doc PR |
Rewritten `overwrite` method in ProgressBar class to use ANSI escape sequences to erase lines.
This removes the need to store the last message length as it is not needed to fill the buffer with spaces anymore. As a plus it correctly resets the cursor position while clearing the output
If the output is not decorated the behavior has not been changed.
Could possibly cause a BC break if testing against the decorated emitted output as binary string
Commits
-------
b6cca4c [Console] use ANSI escape sequences in ProgressBar overwrite method
This PR was merged into the 2.8 branch.
Discussion
----------
[LDAP] Free the search result after a search to free memory
| 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 |
Commits
-------
7da4453 [LDAP] Free the search result after a search to free memory
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Consistently use getProcess() in tests
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
ce13fe7 [Process] Consistently use getProcess() in tests
* 3.0: (24 commits)
[Filesystem] Better error handling in remove()
[DependencyInjection] Add coverage for invalid Expression in exportParameters
[DependencyInjection] Add coverage for all invalid arguments in exportParameters
anonymous services are always private
[Form] FormValidator removed code related to removed option
[Console] Correct time formatting.
[WebProfilerBundle] Fixed error from unset twig variable
Force profiler toolbar svg display
[DependencyInjection] Resolve aliases before removing abstract services + add tests
Fix Dom Crawler select option with empty value
Remove unnecessary option assignment
fix tests (use non-deprecated options)
remove unused variable
mock the proper method
[PropertyAccess] Fix regression
[HttpFoundation] Improve phpdoc
[Logging] Add support for firefox in ChromePhpHandler
Windows 10 version check in just one line
Detect CLI color support for Windows 10 build 10586
[Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
...
* 2.8: (23 commits)
[Filesystem] Better error handling in remove()
[DependencyInjection] Add coverage for invalid Expression in exportParameters
[DependencyInjection] Add coverage for all invalid arguments in exportParameters
anonymous services are always private
[Console] Correct time formatting.
[WebProfilerBundle] Fixed error from unset twig variable
Force profiler toolbar svg display
[DependencyInjection] Resolve aliases before removing abstract services + add tests
Fix Dom Crawler select option with empty value
Remove unnecessary option assignment
fix tests (use non-deprecated options)
remove unused variable
mock the proper method
[PropertyAccess] Fix regression
[HttpFoundation] Improve phpdoc
[Logging] Add support for firefox in ChromePhpHandler
Windows 10 version check in just one line
Detect CLI color support for Windows 10 build 10586
[Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
[EventDispatcher] Try first if the event is Stopped
...
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Add coverage for invalid Expression in exportParameters
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
1931b14 [DependencyInjection] Add coverage for invalid Expression in exportParameters
This PR was merged into the 2.3 branch.
Discussion
----------
[DependencyInjection] Add coverage for all invalid arguments in exportParameters
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
87c4f23 [DependencyInjection] Add coverage for all invalid arguments in exportParameters
fixes#14712 and #17789.
`ChoiceType` now always use `ChoiceToValueTransformer` or
`ChoicesToValuesTransformer` depending on `multiple` option.
Hence `CheckboxListMapper` and `RadioListMapper` don’t handle
the transformation anymore.
Fixes pre selection of choice with model values such as `null`,
`false` or empty string.
This PR was merged into the 3.1-dev branch.
Discussion
----------
[FrameworkBundle] integrate the Cache component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17537
| License | MIT
| Doc PR | -
Last commit is the diff with #17868.
Commits
-------
4152634 [FrameworkBundle] Add default pool & system adapter
714b916 [FrameworkBundle] Add & use Psr6CacheClearer
4740c5c [FrameworkBundle] use abstract cache.pool decoration and aliases
92b1a20 [FrameworkBundle] Fix and add tests for cache pool wiring
e44bfdc [FrameworkBundle] Add cache-pool tag and wiring
281eafa [FrameworkBundle] Integrate the Cache component
bc51fde [Cache] Normalize constructor arguments order
This PR was merged into the 3.1-dev branch.
Discussion
----------
Add the kernel.controller_arguments event
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18362
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/6434
I'm not sure this can be integrated in 3.1 due to the feature freeze, but it would be great if it is, as it is a must-have to be able to make the ``@Security`` annotation compatible with the new argument resolver system (as we need to be able to run the security assertion after the resolving).
I made the arguments mutable here for consistency with ``kernel.controller`` (and @fabpot replied LGTM in the RFC when I suggested it).
Commits
-------
af02e2a Add the kernel.controller_arguments event
This PR was squashed before being merged into the 2.7 branch (closes#18429).
Discussion
----------
[Console] Correct time formatting.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18420
| License | MIT
| Doc PR |
The previous behavior caused dramatic jumps in the reported time instead of smoothly transitioning between time ranges.
Added tests around the new behavior and the transitions between seconds, minutes, and days.
Commits
-------
b264b66 [Console] Correct time formatting.
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Fix select option with empty value
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no?
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
While using the Laravel's testing suite which makes use of the Symfony DOM Crawler (v3.0.2). I have been populating a form with a select which has a value which can be an empty value.
For example, with this select you can choose your gender or leave it empty if you don't want to specify:
```html
<select name="gender">
<option selected></option>
<option>Female</option>
<option>Male</option>
</select>
```
When the `DomCrawler\Field::getValue()` is called I was expect to get the value `''` however I was actually getting `'on'`. This is caused by the [DomCrawler\Field::buildOptionValue()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DomCrawler/Field/ChoiceFormField.php#L262-L271) sets the default value to 'on' when there is no value which makes sense for ratios and checkboxes but not for select.
I have tracked this bug back to v2.3 but it is still present in v3, however, the default value was changed from '1' to 'on' in v2.5 which means that this patch will conflict when merging up the maintained versions.
Commits
-------
58276a2 Fix Dom Crawler select option with empty value
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Remove unnecessary option assignment
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Option assignment is not required because the prototype inherits this option from the parent form via standard inheritance mechanism.
Related pull requests: #16959, #18317
Commits
-------
da8a197 Remove unnecessary option assignment
* reference form type by its FQCN instead of its string name
* use the `entry_type` and `entry_options` options instead of the
deprecated `type` and `options` options
* 2.7:
[HttpFoundation] Improve phpdoc
[Logging] Add support for firefox in ChromePhpHandler
Windows 10 version check in just one line
Detect CLI color support for Windows 10 build 10586
[Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
[EventDispatcher] Try first if the event is Stopped
[FrameworkBundle] fixes grammar in container:debug command manual.
[Form] fix "prototype" not required when parent form is not required
* 2.3:
[HttpFoundation] Improve phpdoc
[Logging] Add support for firefox in ChromePhpHandler
[Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
[Form] fix "prototype" not required when parent form is not required
This PR was merged into the 2.3 branch.
Discussion
----------
[Security] Fixed SwitchUserListener when exiting an impersonation with AnonymousToken
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If you configure a firewall with switch user with `role: IS_AUTHENTICATED_ANONYMOUSLY` it's impossible to exit the
impersonation because the next line `$this->provider->refreshUser($original->getUser())` will fail. It fails because `RefreshUser`
expects an instance of `UserInterface` and here it's a string.
Therefore, it does not make sense to refresh an Anonymous Token, right ?
Commits
-------
59fea72 [Security] Fixed SwitchUserListener when exiting an impersonication with AnonymousToken
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] fix "prototype" not required when parent form is not required
| Q | A
| ------------- | ---
| Branch? | 2.3+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18311
| License | MIT
| Doc PR | ~
Commits
-------
7df9ca2 [Form] fix "prototype" not required when parent form is not required
Improve the phpdoc for the `$default` parameter of the `get()` method. It wasn't clear when the default value would be used (whether the key would not exist or the value was `null` or nullish).
The comment is now in sync with `Symfony\Component\HttpFoundation\ParameterBag::get()`.
* 2.3:
Detect CLI color support for Windows 10 build 10586
[EventDispatcher] Try first if the event is Stopped
[FrameworkBundle] fixes grammar in container:debug command manual.
Conflicts:
src/Symfony/Component/EventDispatcher/EventDispatcher.php
src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
If you configure a firewall with switch user with `role: IS_AUTHENTICATED_ANONYMOUSLY` it's impossible to exit the
impersonation because the next line `$this->provider->refreshUser($original->getUser())` will fail. It fails because `RefreshUser`
expects an instance of `UserInterface` and here it's a string.
Therefore, it does not make sense to refresh an Anonymous Token, right ?
This PR was merged into the 3.1-dev branch.
Discussion
----------
Added an ArgumentResolver with clean extension point
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #17933 (pre-work), #1547, #10710
| License | MIT
| Doc PR | symfony/symfony-docs#6422
**This PR is a follow up for and blocked by: #18187**, relates to #11457 by @WouterJ. When reviewing, please take the last commit: [Added an ArgumentResolver with clean extension point](4c092b31f9)
This PR provides:
- The ability to tag your own `ArgumentValueResolverInterface`. This means that you can effectively expand on the argument resolving in the `HttpKernel` without having to implement your own `ArgumentResolver`.
- The possibility to cache away argument metadata via a new `ArgumentMetadataFactory` which simply fetches the data from the cache, effectively omitting 1 reflection call per request. *Not implemented in this PR, but possible once this is merged.*
- The possibility to add a PSR-7 adapter to resolve the correct request, avoids the paramconverters
- The possibility to add a value resolver to fetch stuff from $request->query
- Drupal could simplify [their argument resolving](https://github.com/drupal/drupal/blob/8.1.x/core/lib/Drupal/Core/Controller/ControllerResolver.php) by a lot
- etc.
The aim for this PR is to provide a 100% BC variant to add argument resolving in a clean way, this is shown by the 2 tests: `LegacyArgumentResolverTest` and `ArgumentResolverTest`.
/cc @dawehner @larowlan if you have time, can you check the impact for Drupal? I think this should be a very simple change which should make it more maintainable.
Commits
-------
1bf80c9 Improved DX for the ArgumentResolver
f29bf4c Refactor ArgumentResolverTest
cee5106 cs fixes
cfcf764 Added an ArgumentResolver with clean extension point
360fc5f Extracting arg resolving from ControllerResolver
This PR was merged into the 3.1-dev branch.
Discussion
----------
[Process] Implement IteratorAggregate to stream output
| 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#6424
Sibling to #18386 for iterating of the output streams.
Commits
-------
5947f5d [Process] Implement IteratorAggregate to stream output
This PR was squashed before being merged into the 3.1-dev branch (closes#18144).
Discussion
----------
[DI] Only rebuild autowiring cache when actually needed
| 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 | n/a
With autowiring, the container is currently rebuilt when an autowired class is modified in any way. That makes it unusable for large systems. However, this doesn't need to be true: we only need to rebuild the cache if a construct argument changes. This adds that change, and it's quite simple
This idea can/should also be adapted easily to the `@Route` cache (I don't believe it has something "smart" like this).
Thanks!
Commits
-------
3e97626 [DI] Only rebuild autowiring cache when actually needed
* 3.0:
[travis] Disable hirak/prestissimo for deps=low/high tests
Fixed the "hover" state of the profiler sidebar menu
[HttpFoundation] fix phpdoc of UploadedFile
Lower complexity of Form:isValid()
skipped dns-sensitive tests when DnsMock is not found
fixed typo
[FrameworkBundle] Return the invokable service if its name is the class name
[ci] Skip dns-sensitive tests when DnsMock is not found
Exclude Bridge\PhpUnit from composer.json by default
fixed CS
Optimize ReplaceAliasByActualDefinitionPass
[Process] use __METHOD__ where applicable
[Routing] Don't needlessly execute strtr's as they are fairly expensive
Conflicts:
.travis.yml
* 2.8:
[travis] Disable hirak/prestissimo for deps=low/high tests
Fixed the "hover" state of the profiler sidebar menu
[HttpFoundation] fix phpdoc of UploadedFile
Lower complexity of Form:isValid()
skipped dns-sensitive tests when DnsMock is not found
[FrameworkBundle] Return the invokable service if its name is the class name
[ci] Skip dns-sensitive tests when DnsMock is not found
Exclude Bridge\PhpUnit from composer.json by default
fixed CS
Optimize ReplaceAliasByActualDefinitionPass
[Process] use __METHOD__ where applicable
[Routing] Don't needlessly execute strtr's as they are fairly expensive
Conflicts:
.travis.yml
src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
* 2.7:
[travis] Disable hirak/prestissimo for deps=low/high tests
[HttpFoundation] fix phpdoc of UploadedFile
Lower complexity of Form:isValid()
skipped dns-sensitive tests when DnsMock is not found
[FrameworkBundle] Return the invokable service if its name is the class name
[ci] Skip dns-sensitive tests when DnsMock is not found
Exclude Bridge\PhpUnit from composer.json by default
fixed CS
Optimize ReplaceAliasByActualDefinitionPass
[Process] use __METHOD__ where applicable
[Routing] Don't needlessly execute strtr's as they are fairly expensive
* 2.3:
[travis] Disable hirak/prestissimo for deps=low/high tests
[HttpFoundation] fix phpdoc of UploadedFile
[ci] Skip dns-sensitive tests when DnsMock is not found
Optimize ReplaceAliasByActualDefinitionPass
[Process] use __METHOD__ where applicable
Conflicts:
.travis.yml
src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
src/Symfony/Component/Process/Process.php
src/Symfony/Component/Process/ProcessBuilder.php
This PR was merged into the 3.0 branch.
Discussion
----------
fixed typo
| Q | A
| ------------- | ---
| Branch? | 3.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As of Symfony 3.0, we only get the _format from the request attributes. Before, we also looked at the request query string, ... This PR fixes the phpdoc for Symfony 3.x.
Commits
-------
78830a1 fixed typo