This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Add getter injection
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20657
| License | MIT
| Doc PR | symfony/symfony-docs#7300
Getter overriding by the container will allow a new kind of dependency injection which enables easier laziness and more immutable classes, by not requiring any corresponding setter. See linked issue for more.
This is WIP:
- [x] wire the concept
- [x] dump anonymous classes with PhpDumper
- [x] generate at runtime in ContainerBuilder::createService
- [x] tests
- [x] make it work on PHP 5
Commits
-------
cb498580d1 [DI] Add getter injection
This PR was merged into the 3.3-dev branch.
Discussion
----------
[HttpFoundation] Mark more methods as `@final`
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #19734 (ping @GuilhemN)
Commits
-------
84a664f929 [HttpFoundation] Mark more methods as `@final`
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] Revert AbstractDescriptorTest output trimming
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no, but fixes an annoying/unhelping test output and fixes false positives
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21129/files#diff-0e52187cbf1067a310538287da74ddb5R178
| License | MIT
| Doc PR | N/A
#### Before output when having a failing test, for instance, in a `TextDescriptor` fixture:
```diff
There was 1 failure:
1) Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\TextDescriptorTest::testDescribeContainerDefinitionWhichIsAnAlias with data set #1 (Symfony\Component\DependencyInjection\Alias Object (...), ' // This serv...------', Symfony\Component\DependencyInjection\ContainerBuilder Object (...), array('alias_2'))
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-' // This service is an alias for the service service_2 Information for Service "service_2" =================================== ------------------ --------------------------------- Option Value ------------------ --------------------------------- Class Full\Qualified\Class2 Tags tag1 (attr1: val1, attr2: val2) tag1 (attr3: val3) tag2 Calls setMailer Public no Synthetic yes Lazy no Shared yes Abstract no Autowired no Autowiring Types - Required File /path/to/file Factory Service factory.service Factory Method get ------------------ ---------------------------------'
+' // This service is an alias for the service service_2 Information for Service "service_2" =================================== ------------------ --------------------------------- Option Value ------------------ --------------------------------- Service ID service_2 Class Full\Qualified\Class2 Tags tag1 (attr1: val1, attr2: val2) tag1 (attr3: val3) tag2 Calls setMailer Public no Synthetic yes Lazy no Shared yes Abstract no Autowired no Autowiring Types - Required File /path/to/file Factory Service factory.service Factory Method get ------------------ ---------------------------------'
```
#### After:
```diff
There was 1 failure:
1) Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\TextDescriptorTest::testDescribeContainerDefinitionWhichIsAnAlias with data set #1 (Symfony\Component\DependencyInjection\Alias Object (...), ' // This serv...------', Symfony\Component\DependencyInjection\ContainerBuilder Object (...), array('alias_2'))
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
------------------ ---------------------------------
+ Service ID service_2
Class Full\Qualified\Class2
Tags tag1 (attr1: val1, attr2: val2)
tag1 (attr3: val3)
tag2
Calls setMailer
Public no
Synthetic yes
Lazy no
Shared yes
Abstract no
Autowired no
Autowiring Types -
Required File /path/to/file
Factory Service factory.service
Factory Method get
------------------ ---------------------------------'
```
Commits
-------
efd00bac20 [FrameworkBundle] Revert AbstractDescriptorTest output trimming
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Enhance logging in compiler passes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
We should log more in compiler passes - and this should be better integrated in usual log reports.
For logging more, let's drop LoggingFormatter and add a simple "log" method on ContainerBuilder.
For better integration, let's throw silenced notices - they can be caught by our Debug handler.
Commits
-------
fb200a0d2f [DI] Enhance logging in compiler passes
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI][DX] Do not map id to class for global classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yesish
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21380
| License | MIT
| Doc PR | N/A
Using a global classname as service id without specifying the definition class attribute won't work anymore after this, in the benefit of properly throwing an exception at compilation time for a misconfigured service. Service ids could previously be wrongly interpreted as a class name.
So:
```yml
services:
app_bar:
arguments: ['foo']
```
will now properly result into:
> Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: The definition for "app_bar" has no class.
at compilation time.
Commits
-------
bb870304f0 [DI][DX] Do not map id to class for global classes
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Security] make LdapBindAuthenticationProvider capable of searching for the DN
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16823, #20905
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7420
I guess due to the separation between the user and auth provider something like the following isn't ok (note: the following works just fine for me but if course in the end the username is the DN and not the user provided shorter username):
```diff
diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
index 5ebb09a..18d7825 100644
--- a/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
+++ b/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
@@ -70,7 +70,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
*/
protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token)
{
- $username = $token->getUsername();
+ $username = $user->getUsername();
$password = $token->getCredentials();
if ('' === $password) {
@@ -78,10 +78,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
}
try {
- $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_DN);
- $dn = str_replace('{username}', $username, $this->dnString);
-
- $this->ldap->bind($dn, $password);
+ $this->ldap->bind($username, $password);
} catch (ConnectionException $e) {
throw new BadCredentialsException('The presented password is invalid.');
}
diff --git a/src/Symfony/Component/Security/Core/User/LdapUserProvider.php b/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
index fc42419..8194c4c 100644
--- a/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
+++ b/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
@@ -115,7 +115,7 @@ class LdapUserProvider implements UserProviderInterface
{
$password = $this->getPassword($entry);
- return new User($username, $password, $this->defaultRoles);
+ return new User($entry->getDn(), $password, $this->defaultRoles);
}
/**
```
Therefore I created an entire new auth provider.
Commits
-------
8ddd5333a3 Merge pull request #1 from nietonfir/http_basic_ldap
a783e5c9c5 Update HttpBasicLdapFactory
a30191f30a make LdapBindAuthenticationProvider capable of searching for the DN
* 3.2:
fixed typo
fixed composer.json
[HttpKernel] Fix Bundle name regression
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[DI] Fix defaults overriding empty strings in AutowirePass
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
* 3.1:
fixed typo
fixed composer.json
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[DI] Fix defaults overriding empty strings in AutowirePass
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
* 2.8:
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[DI] Fix defaults overriding empty strings in AutowirePass
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
* 2.7:
always check for all fields to be mapped
clarify exception when no args are configured
[PropertyAccess] Handle interfaces in the invalid argument exception
[Debug] Workaround "null" $context
[Debug] Remove $context arg from handleError(), preparing for PHP 7.2
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
Fix tests with ICU 57.1
Fix the condition checking the minimum ICU version
This PR was merged into the 2.7 branch.
Discussion
----------
[DoctrineBridge] always check for all fields to be mapped
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16791
| License | MIT
| Doc PR |
Commits
-------
1e3421d6f0 always check for all fields to be mapped
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Generalize constructor autowiring to partial method calls
| 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 autowiring is enabled:
currently, the constructor can be partially wired, and autowiring will complete the remaining missing arguments.
But there is no reason this should only apply to the constructor.
This PR fixes this inconsistency by looking at all method calls, and wire missing arguments in the same way.
Commits
-------
29c2fd5f74 [DI] Generalize constructor autowiring to partial method calls
This PR was squashed before being merged into the 2.7 branch (closes#21360).
Discussion
----------
[PropertyAccess] Handle interfaces in the invalid argument exception
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Before :
`Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given`
After :
`Expected argument of type "Doctrine\Common\Collections\Collection", "array" given`
Commits
-------
be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | 77289b9023 (commitcomment-20572462)
| License | MIT
| Doc PR | n/a
This fixes a BC break introduced in #21333. Instead of removing the automatic request attributes creation, we keep it but only for attributes that are mandatory (i.e. present in the route path).
Thanks to @iltar for the idea.
Commits
-------
1d298f0417 [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
This PR was squashed before being merged into the 2.7 branch (closes#21320).
Discussion
----------
Fix ICU dependant 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 | -
#20551 changed the condition checking if the ICU version matches the stubbed data. The change intended to enable tests on more ICU versions, but it actually has limited them. I'm still not convinced it should've been done but let's at least fix the condition. Ideal solution would be to have the latest ICU data available on travis (still not there https://github.com/travis-ci/travis-ci/issues/3616).
I also needed to fix several tests.
Currently skipped tests in components depending on ICU data:
| | 4.8.1.1 | 54.1 | 55.1 | 57.1 |
|---|---|--|--|--|
| Intl | 488 | 488 | 7 | 6 |
| Locale | 0 | 0 | 0 | 0 |
| Translation| 0 | 0 | 0 | 0 |
| Validator | 69 | 69 | 69 | 0 |
| Form | 75 | 75 | 75 | 1 |
Commits
-------
d3b5d8efdf Fix tests with ICU 57.1
677d820874 Fix the condition checking the minimum ICU version
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Debug] Deprecate ContextErrorException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Since the `$context` argument is going to be deprecated in PHP 7.2 (see https://wiki.php.net/rfc/deprecations_php_7_2#errcontext_argument_of_error_handler), let's deprecate ContextErrorException altogether.
Commits
-------
c3797074ff [Debug] Deprecate ContextErrorException
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21339
| License | MIT
| Doc PR | -
This PR basically reverts #20601 and wires "annotations.cached_reader" later, so that any compiler passes needing "annotation_reader" at compile time don't get any cache - anyway, it's useless at compile time.
Commits
-------
e59f0e0fd7 [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
This PR was squashed before being merged into the 3.3-dev branch (closes#21348).
Discussion
----------
[DependencyInjection] Yaml: check if $tags is an array before using it
| 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
Commits
-------
1c9b5c9 [DependencyInjection] Yaml: check if is an array before using it
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Fix return of YamlFileLoader::parseDefaults
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no (or very unlikely)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I've messed up the return value of parseDefaults under certain conditions in #21342. Here is the fix... Sorry about that.
Commits
-------
5cf76f7 [DependencyInjection] Fix return of YamlFileLoader::parseDefaults
A ternary operator is considered safe by the Twig auto-escaping only when
both branches are safe. But this ternary was safe only in the ELSE branch,
causing it to be unsafe. This triggered a double-escaping of the value
(escaping the output of the dump). The fix is to use a {% if %} and 2 separate
output statements, allowing them to be auto-escaped separately.
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Use current class as default class for factory declarations
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20888
| License | MIT
| Doc PR | Should update the notice about the "class" attribute on http://symfony.com/doc/current/service_container/factories.html#20888 makes sense to me, considering the following sample extracted from the documentation:
```xml
<service id="app.newsletter_manager" class="AppBundle\Email\NewsletterManager">
<factory class="AppBundle\Email\NewsletterManager" method="create" />
</service>
```
The class is used as a factory to create itself, thus it can be simplified to:
```xml
<service id="app.newsletter_manager" class="AppBundle\Email\NewsletterManager">
<factory method="create" />
</service>
```
However, it's not possible to provide the same feature for the YAML format, because it doesn't allow to distinct a function from a method call if the class is not provided explicitly under the `factory` key, whereas the xml format use a dedicated `function` attribute.
Would this inconsistency between those two formats be a no-go for this feature?
The doc notices:
> When using a factory to create services, the value chosen for the class option has no effect on the resulting service. The actual class name only depends on the object that is returned by the factory. However, the configured class name may be used by compiler passes and therefore should be set to a sensible value.
If this is merged, it should be updated wisely in order to not confuse everyone with this feature when using the xml format.
UPDATE: The yaml format is now supported when the class is not provided in the factory array:
```yml
services:
my_factory:
class: Bar\Baz
factory: [~, 'create']
```
Commits
-------
e6d85700d5 [DependencyInjection] Use current class as default class for factory declarations
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Remove an unused docblock
| 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
The removal of this doc block was forgotten in #21327.
Commits
-------
9e33434548 [DependencyInjection] Remove an unused docblock
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console][FrameworkBundle] Log console exceptions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10895
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7373
Continues #19382, fixing some issues including:
- ability to display the input string for any `InputInterface` implementation (cast to string if possible, use the command name otherwise)
- if the input can be casted as string, cleanup the result (from `command "'command:name' --foo=bar" ` to `command "command:name --foo=bar"`)
- made `ExceptionLister::$logger` private instead of protected
- changed methods name from `onKernel*` to `onConsole*` (e.g. `onConsoleException`) and removed unnecessary doc blocks
- Added more tests
Log for an exception:
> [2016-12-22 00:34:42] app.ERROR: Exception thrown while running command: "cache:clear -vvv". Message: "An error occured!" {"exception":"[object] (RuntimeException(code: 0): An error occured! at /Volumes/HD/Sites/tests/sf-demo-3.2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:61)","command":"cache:clear -vvv","message":"An error occured!"} []
Commits
-------
919041c1ad Add Console ExceptionListener
9896547a4d Add basic support for automatic console exception logging
Handle non string-castable inputs
Cleanup input for display
Naming changes
InputInterface doesnt have a toString()
Logger must be private
Remove useless doc blocks
Tweak tests
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Add Yaml syntax for short services definition
| 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
In my experience, most (at least, a lot) of the service definitions in an end-application only require the class and constructor arguments.
#21133 allows to get rid of the `class` attribute by using the service id.
Which means only arguments remain for most use-cases. Hence, we could support this syntax:
#### Before:
```yml
services:
App\Foo\Bar:
arguments: ['@baz', 'foo', '%qux%']
```
#### After:
```yml
services:
App\Foo\Bar: ['@baz', 'foo', '%qux%']
```
It works especially well along with services `_defaults` introduced in #21071 :
```yml
services:
_defaults:
public: false
autowire: ['set*']
tags: ['serializer.normalizer']
App\Serializer\FooNormalizer: ['@baz', 'foo', '%qux%']
```
Commits
-------
83b599c6ad [DI] Add Yaml syntax for short services definition
This PR was squashed before being merged into the 3.3-dev branch (closes#20694).
Discussion
----------
[Cache] Implement PSR-16 SimpleCache v1.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not yet
| Fixed tickets | -
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/7409
Second iteration on the topic after #20636 raised some issues.
Please don't squash while merging.
Commits
-------
6219dd6b62 [Cache] Create PSR-16 variants of all PSR-6 adapters
99ae9d6a35 [Cache] Move adapter implementations to traits
848a33ed3e [Cache] Implement PSR-16 SimpleCache v1.0
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Factorize compiler passes around new AbstractRecursivePass
| 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 introduces an AbstractRecursivePass that is able to visit the definition tree recursively everywhere a Definition or a Reference can be nested.
All existing compiler passes that need recursivity are updated to leverage this new class.
This remove a bunch of boilerplate that was previously repeated all over.
It also fixes compiler passes that eg missed looking at configurators for no reason (this "fix" is a new feature really).
It then applies recursivity to AutowirePass, that does not handle it today, but should.
I'm happy that the net result is a loss of 153 lines :)
Commits
-------
6acb80f48f [DI] Factorize compiler passes around new AbstractRecursivePass
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Improved error message for missing upload_tmp_dir
| 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
I ran into a problem in which the value for upload_tmp_dir was set in php.ini, but PHP was unable to write to the specified location. PHP returns an UPLOAD_ERR_NO_TMP_DIR in $_FILES when it can't find or use the tmp dir, and my application displayed the error for $uploadNoTmpDirErrorMessage, from which I drew the conclusion that the ini setting was missing or emtpy.
This conclusion was based on the wording in the error message, which explicitly states that 'no temporary folder was configured', which is not actually correct. According to the [PHP documentation](http://php.net/manual/en/features.file-upload.errors.php):
> UPLOAD_ERR_NO_TMP_DIR
> Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.
'Missing' might be interpreted as 'the value for the ini setting is missing', but also as 'the configured folder is missing'.
I thought it might save someone some time if the error message from the Symfony Validator makes this explicit, which is what this PR aims to do.
I also updated the Dutch and Polish translations, because those, in addition to English, are the languages spoken in my team.
Commits
-------
afbf22746a [Validator] Improved error message for missing upload_tmp_dir
* 3.2: (40 commits)
fixed CS
fixed CS
fixed CS fixer config
fixed typo
Revert "fixed typo"
fixed typo
fixed CS
Avoid setting request attributes from signature arguments in AnnotationClassLoader
[DependencyInjection] Add some missing typehints in YamlFileLoader
[DependencyInjection] minor: Fix a DocBlock
[HttpKernel] Give higher priority to adding request formats
[Cache] Fix tags expiration
[PhpUnit] Blacklist DeprecationErrorHandler in stack traces
[PropertyInfo] Don't try to access a property thru a static method
[PropertyInfo] Exclude static methods form properties guessing
[Workflow] Added new validator to make sure each place has unique translation names
[Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key)
[FrameworkBundle] Fix third level headers for MarkdownDescriptor
[Ldap] Using Ldap stored username instead of form submitted one
[Ldap] load users with the good username case
...
* 3.1: (31 commits)
fixed CS
fixed CS
fixed CS fixer config
fixed typo
Revert "fixed typo"
fixed typo
fixed CS
Avoid setting request attributes from signature arguments in AnnotationClassLoader
[DependencyInjection] Add some missing typehints in YamlFileLoader
[DependencyInjection] minor: Fix a DocBlock
[HttpKernel] Give higher priority to adding request formats
[PropertyInfo] Don't try to access a property thru a static method
[PropertyInfo] Exclude static methods form properties guessing
[FrameworkBundle] Fix third level headers for MarkdownDescriptor
[Ldap] Using Ldap stored username instead of form submitted one
[Ldap] load users with the good username case
[DoctrineBridge] Fixed invalid unique value as composite key
[Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
[TwigBundle] do not lose already set method calls
#20411 fix Yaml parsing for very long quoted strings
...
* 2.8: (26 commits)
fixed CS
fixed CS
fixed CS fixer config
fixed typo
Revert "fixed typo"
fixed typo
fixed CS
Avoid setting request attributes from signature arguments in AnnotationClassLoader
[DependencyInjection] Add some missing typehints in YamlFileLoader
[DependencyInjection] minor: Fix a DocBlock
[HttpKernel] Give higher priority to adding request formats
[PropertyInfo] Don't try to access a property thru a static method
[PropertyInfo] Exclude static methods form properties guessing
[FrameworkBundle] Fix third level headers for MarkdownDescriptor
[TwigBundle] do not lose already set method calls
#20411 fix Yaml parsing for very long quoted strings
CS: apply is_null
DX: remove invalid inheritdoc
bumped Symfony version to 2.8.17
updated VERSION for 2.8.16
...
* 2.7:
fixed typo
Revert "fixed typo"
fixed typo
fixed CS
Avoid setting request attributes from signature arguments in AnnotationClassLoader
[DependencyInjection] Add some missing typehints in YamlFileLoader
[DependencyInjection] minor: Fix a DocBlock
[HttpKernel] Give higher priority to adding request formats
[FrameworkBundle] Fix third level headers for MarkdownDescriptor
[TwigBundle] do not lose already set method calls
#20411 fix Yaml parsing for very long quoted strings
CS: apply is_null
DX: remove invalid inheritdoc
bumped Symfony version to 2.7.24
updated VERSION for 2.7.23
update CONTRIBUTORS for 2.7.23
updated CHANGELOG for 2.7.23
[FrameworkBundle] Skip test if xdebug.file_link_format is defined.
This PR was merged into the 3.3-dev branch.
Discussion
----------
[ClassLoader] Deprecated the component
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #20668
Commits
-------
8a37722adb [ClassLoader] Deprecated the component
This PR was merged into the 2.7 branch.
Discussion
----------
[DependencyInjection] Add some missing typehints in YamlFileLoader
| 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
Commits
-------
34330e5136 [DependencyInjection] Add some missing typehints in YamlFileLoader
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] Don't try to access a property thru a static method
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
See also #21331.
Commits
-------
3b4858fe88 [PropertyInfo] Don't try to access a property thru a static method
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Workflow] Introduce concept of SupportStrategyInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #20751
| License | MIT
| Doc PR | -
Commits
-------
134a58b4c4 [Workflow] Fixed code and tests
184301206f [Workflow] Introduce concept of SupprtStrategyInterface to allow other support checks than class instance
This PR was squashed before being merged into the 3.3-dev branch (closes#21065).
Discussion
----------
Added cache data collector and profiler page
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19297
| License | MIT
| Doc PR | n/a
Adding a first version of cache profiler page. Most things are taken from PHP-cache.
FYI: @aequasi
### What is included?
A collector, recording adapter and a profiler page.
![screen shot 2016-12-27 at 16 07 35](https://cloud.githubusercontent.com/assets/1275206/21502325/4bee2ed4-cc4f-11e6-89fc-37ed16aca864.png)
![screen shot 2016-12-27 at 16 07 45](https://cloud.githubusercontent.com/assets/1275206/21502326/4bee9450-cc4f-11e6-904d-527b7b0ce85b.png)
### What is not included?
* A good logo
* Nice design on the profiler page
This PR aims to pass as the minimum requirement for a cache page. Im happy to do fancy extra features but those should be a different PR.
Commits
-------
7497f1c6b6 Added cache data collector and profiler page
This PR was merged into the 3.2 branch.
Discussion
----------
[Workflow] Fixed support of multiple transitions with the same name.
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
---
The previous behavior was underterministic because it took the first
transition during the `can` and the `apply` method. But the "first"
does not mean anything. Now the workflown apply all possible transitions
with the same name.
Commits
-------
edd5431e6e [Workflow] Fixed support of multiple transition with the same name.
This PR was merged into the 3.1 branch.
Discussion
----------
[Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
| Q | A
| ------------- | ---
| Branch? | master / 3.1
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes (fail on php 7.1 unrelated?)
| Fixed tickets | https://github.com/symfony/symfony/issues/21274
| License | MIT
| Doc PR | -
This PR fixes an issue with the UniqueEntityValidator in case the entity being validated uses a composite primary key via relations to other entities whose classes do not have a `__toString` method.
Commits
-------
b3ced8608b [DoctrineBridge] Fixed invalid unique value as composite key
5aadce3989 [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Debug] Trigger deprecation on `@final` annotation in DebugClassLoader - prepare making some classes final
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | follows https://github.com/symfony/symfony/pull/19734
| License | MIT
| Doc PR | |
BC promises become quickly huge but making classes `final` can limit these promises.
At the same time, many classes of the symfony codebase are not meant to be extended and could be `final`; that's the goal of this PR: prepare making them final in 4.0 by triggering deprecations in their constructor:
```php
public function __construct()
{
if (__CLASS__ !== get_class($this)) {
@trigger_error(sprintf('Extending %s is deprecated since 3.3 and won\'t be supported in 4.0 as it will be final.', __CLASS__), E_USER_DEPRECATED);
}
}
```
I updated two classes for now but we can do much more if you like it.
Commits
-------
c2ff111986 [Debug] Trigger deprecation on `@final` annotation in DebugClassLoader
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Remove synthetic services from methodMap + generated methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
For synthetic services, the generated methods are just dead code to fill opcache ;)
And having them in "methodMap" prevents using the property for checking if a service comes from a (non-synthetic) definition or not.
This prepares some changes that we'd like to do in 4.0, see #19668.
Commits
-------
c1e1e999f3 [DI] Remove synthetic services from methodMap + generated methods
This PR was merged into the 3.3-dev branch.
Discussion
----------
[VarDumper] Add search keyboard shortcuts
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21174
| License | MIT
| Doc PR | Worth to mention?
So, this PR simply adds the following shortcuts to navigate between matches, based on main browsers conventions:
- <kbd>CTRL/CMD</kbd> + (<kbd>shift</kbd>* +) <kbd>G</kbd>
- (<kbd>shift</kbd>* +) <kbd>ENTER</kbd>
- (<kbd>shift</kbd>* +) <kbd>F3</kbd>
_* <kbd>shift</kbd> allows to go backwards_
At first, I wanted to add a help box somewhere, but:
- I don't know where to place it. As the var dumper is now used everywhere in the profiler, it should not be importune and should work in narrowed places.
- We use those shortcuts in order to replicate the main softwares/browsers behavior. So we may not need it at all.
This PR also fixes a minor issue where pressing a key not changing the input would have restarted the search query.
Commits
-------
58fe4315ae [VarDumper] Add search keyboard shortcuts
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Mark generated containers as final
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
So that we don't have to care anymore about BC for protected methods in generated containers.
Will leverage deprecations triggered in #20493
Commits
-------
ce0ee1e484 [DI] Mark generated containers as final
This PR was merged into the 3.3-dev branch.
Discussion
----------
[VarDumper] Fixed typo in new search input
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
I guess both work out.. but using `of` notation is way more common.
Btw chrome search doesnt show `0 of 0` (at least not initially).. maybe worth it?
/cc @ogizanagi
Commits
-------
f8d63a6 [VarDumper] Fixed typo in new search input
This PR was merged into the 3.1 branch.
Discussion
----------
[DX][Cache] Set right cacheItem type hint on AdapterInterface getters
| 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 |
Fixes missing cache item type hint on pool getters so methods on Symfony CacheItem
is correctly suggested when using IDE's or api documentation.
As proposed here: https://github.com/symfony/symfony/issues/19728#issuecomment-269615921
_Note: Specifically sets array of CacheItems as return type of getItems as phpdoc and IDEs supports
this by now, and since this is specifically what is being returned. If Sami does not still support this we can adjust to what was originally suggested._
Commits
-------
5f7baa5 [DX][Cache] Set right type hint for cacheItem on AdapterInterface getters
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Cache] Relax binary-constraint on Memcached connections
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
If it's green then it's PSR-6 compliant.
Commits
-------
284d363 [Cache] Relax binary-constraint on Memcached connections
The previous behavior was underterministic because it took the first
transition during the `can` and the `apply` method. But the "first"
does not mean anything. Now the workflow apply all possible
transitions with the same name.
| 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 |
Fixes missing type hint for cache item on pool getters so methods on Symfony CacheItem
is correclty suggested when using IDE's or api documentation.
As proposed here: https://github.com/symfony/symfony/issues/19728#issuecomment-269615921
Note: Specifically sets array of items as return type of getItems as phpdoc and IDEs supports
this by now, and since this is specifically what is being returned.
* 3.2:
[Cache] Using strpbrk() instead of strcspn() is faster
bumped Symfony version to 3.2.3
updated VERSION for 3.2.2
updated CHANGELOG for 3.2.2
bumped Symfony version to 3.1.10
updated VERSION for 3.1.9
updated CHANGELOG for 3.1.9
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Profiler] Fix inline dump rendering
| 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
I introduced a minor rendering issue in #21109 when adding a clearfix behavior to the `pre.sf-dump` element:
|Before|After|
|-------|-----|
|
<img width="890" alt="screenshot 2017-01-12 a 19 57 34" src="https://cloud.githubusercontent.com/assets/2211145/21903782/6989eb36-d901-11e6-8f02-99c4a8356725.PNG">|<img width="892" alt="screenshot 2017-01-12 a 19 52 56" src="https://cloud.githubusercontent.com/assets/2211145/21903721/407d3bbc-d901-11e6-901b-3f5b65bee650.PNG">|
This will fix the issue by removing it, as we don't need this behavior for inline dumps.
Commits
-------
81e2641 [Profiler] Fix inline dump rendering
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Skip test if xdebug.file_link_format is defined.
| 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 | -
---
The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.
Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.
Commits
-------
7f15bc3 [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
This PR was merged into the 2.7 branch.
Discussion
----------
CS: apply is_null
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not related
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
47feb18 CS: apply is_null
* 3.2:
Fix getMock usage
Remove dead code
[Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
[Validator] Fix caching of constraints derived from non-serializable parents
[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
[FrameworkBundle] Fix relative paths used as cache keys
respect groups when merging constraints
fix IPv6 address handling in server commands
* 3.1:
Fix getMock usage
Remove dead code
[Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
[Validator] Fix caching of constraints derived from non-serializable parents
[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
[FrameworkBundle] Fix relative paths used as cache keys
respect groups when merging constraints
fix IPv6 address handling in server commands
* 2.8:
Fix getMock usage
Remove dead code
[Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
[Validator] Fix caching of constraints derived from non-serializable parents
[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
[FrameworkBundle] Fix relative paths used as cache keys
respect groups when merging constraints
fix IPv6 address handling in server commands
* 2.7:
[Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
[Validator] Fix caching of constraints derived from non-serializable parents
[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
[FrameworkBundle] Fix relative paths used as cache keys
respect groups when merging constraints
fix IPv6 address handling in server commands
* 3.2:
[FrameworkBundle] Add annotated validator cache test case
Fix a typo
[Ldap] Always have a valid connection when using the EntryManager
[FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers
The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.
Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] DateTimeToLocalizedStringTransformer does not use timezone when using date only
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21217
| License | MIT
The `DateTimeToLocalizedStringTransformer` when used with a pattern that have only date (in `DateType` for instance) does not convert the result in the desired output
Reproduction steps:
- Use `DateType` in a form
- Set the `model_timezone` to `Pacific/Tahiti`, having default timezone to `Europe/Berlin`.
- Enter the date `2017-01-10`
- Submit the form
- Notice that the received data is `2017-01-10 00:00 Europe/Berlin`, whereas it should be `2017-01-10 11:00 Europe/Berlin`
Commits
-------
031d8c2c8b [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] Prevent an error when the console component isn't installed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21246
| License | MIT
| Doc PR |n/a
Finish #19443. Alternative to #21246.
Commits
-------
ab133caa8c [FrameworkBundle] Prevent an error when the console component isn't installed
This PR was merged into the 3.3-dev branch.
Discussion
----------
Add a new Dotenv component
| 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#7350
This introduces a new Dotnv Component that manages `.env` files. Read the referenced doc PR above for more information about usage:
But here, I want to explain the rationale behind creating such a component instead of reusing an existing one.
* First, this version only implements what you can do in a "real" bash shell script (which is what a `.env` really is): so **no value validation** for instance (and anyway, an env var value is always a string). That's important as in production, we should use real env variables, and we don't have validation for them there;
* It allows to only parse a file without populating the env variables (we have 3 stages: `load` `parse` and `populate`);
* Strict implementation of what you can do in a `.env` file, same behavior as bash ($VAR and ${VAR} are supported for instance, executing commands as well);
* Great error messages: I spent a lot of time being sure that error reporting is top notch;
* Clean, simple, and straightforward code (small public API);
* It only does `.env` management, there is no uneeded abstractions like being able to add an env variable directly (just use `putenv`);
There are some unimplemented features as I don't think they are needed and would increase the complexity of the code: several concatenated strings `FOO='foo'"bar"` for instance.
Commits
-------
5a6be8ae9c [Dotenv] added the component
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] fix IPv6 address handling in server commands
| 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/21039#discussion_r93915788
| License | MIT
| Doc PR |
This fixes https://github.com/symfony/symfony/pull/21039#discussion_r93915788 as reported by @sstok for the existing commands by backporting @fabpot's patch from #21039.
Commits
-------
2bb4713 fix IPv6 address handling in server commands
This PR was squashed before being merged into the 2.7 branch (closes#20793).
Discussion
----------
[Validator] Fix caching of constraints derived from non-serializable parents
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12302
| License | MIT
| Doc PR | -
This change allows to still cache constraints even when an uncachable constraint (i.e. Callback)
is added to a parent class at runtime.
This is achived by caching only the constraints that are loaded for the class in question only
and merging parent and interface constraints after reading from cache.
Commits
-------
9dd6b0c [Validator] Fix caching of constraints derived from non-serializable parents
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Deprecate case insentivity of service identifiers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | minor (see UPGRADE note)
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #21193
| License | MIT
| Doc PR | -
As discussed in linked RFC.
Commits
-------
d08f1101df [DI] Deprecate case insentivity of service identifiers
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Form] DateIntervalType: Allow to configure labels & enhance form theme
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (unless someone relies on this non themed type)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | Should document the new `labels` option
I just realized by using it for last fixes in #20886 and #20877 that this type was not really themed:
### before
<img width="861" alt="screenshot 2016-12-13 a 00 54 35" src="https://cloud.githubusercontent.com/assets/2211145/21121792/c589d27a-c0ce-11e6-8368-a396fda3bc7a.PNG">
At least labels should appear, but this also means being able to change them (thus the new `labels` option).
I think the form themes should provide a functional & minimalistic integration like this:
### after
<img width="862" alt="screenshot 2016-12-13 a 00 54 17" src="https://cloud.githubusercontent.com/assets/2211145/21121814/d9c4ead6-c0ce-11e6-94e1-41e6c14884a7.PNG">
---
(On screenshots above, I've only added a css rule to remove the 100% width of the `.table` class. See https://github.com/symfony/symfony/pull/20887#discussion_r92069557)
Commits
-------
bfd9e50bbb [Form] DateIntervalType: Allow to configure labels & enhance form theme
This PR was squashed before being merged into the 2.7 branch (closes#19586).
Discussion
----------
[TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
| Q | A |
| --- | --- |
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #6919 |
| License | MIT |
| Doc PR | |
Currently namespaced paths for templates such as `{% extends '@App/Layout/layout.html.twig' %}` do not work with bundles that have overruled templates using the `getParent()` method in another bundle. See attached ticket. This change prepends the path of the bundle implementing `getParent()` to the paths of the namespace of bundle returned as a parent.
Commits
-------
0c77ce2355 [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Form] Removed unused ResolvedTypeFactory in FormFactory constructor
| 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 just removes some legacy code from 2.x.
Commits
-------
3607eb3dd0 [Form] Removed unused ResolvedTypeFactory in FormFactory constructor
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer)
| 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
When using autowiring, Symfony uses reflection to list all available classes. So, each class is loaded, and for the `ClassCacheCacheWarmer`, it means that a deprecation notice is triggered. So, I've moved it to when an instance is created instead.
Commits
-------
eb6ff9c7e3 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] allow to reference files directly from kernel.root_dir
| 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
While working on a bundleless app, I want to be able to reference a directory for routing annotations like this:
```yaml
app:
resource: "../src/Controller/"
type: annotation
```
but that does not work because Symfony expects a bundle resource (`@AppBundle...`) or a directory referenced from the main app `Resources` directory. But as I don't have such a directory, even using `../../src/Controller` does not work.
So, I propose to add the %kernel.root_dir% to the list of allowed directories.
By the way, we don't have the same issue with the routing annotation **file** loader as it does not use the locator for whatever reason. Should we fix it?
Commits
-------
80b61e9127 [FrameworkBundle] allowed to reference files directly from kernel.root_dir
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] FileLoaders: Allow to explicit type to load
| 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/20308
| License | MIT
| Doc PR | Not yet
(fabbot will scream out regarding the PR fixtures)
Commits
-------
6b660c2114 [DI] FileLoaders: Allow to explicit type to load
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Config][FrameworkBundle] Allow to dump extension config reference sub-path
| 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
Same as https://github.com/symfony/symfony/pull/18940 but for the `config:dump-reference` command:
<img width="975" alt="screenshot 2016-11-29 a 19 09 04" src="https://cloud.githubusercontent.com/assets/2211145/20722577/6c9f9b98-b667-11e6-9683-9a304ff80895.PNG">
Only available for yaml, because it's the most common format when developing an end-application, and dumping a sub xml document causes some issues and raises more questions with the current `XmlReferenceDumper` implementation (namespaces, root name, ...).
Commits
-------
869bb1530b [Config][FrameworkBundle] Allow to dump extension config reference sub path
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] respect groups when merging constraints
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20853
| License | MIT
| Doc PR |
Commits
-------
9a60057f42 respect groups when merging constraints
* 3.2:
[DI] Add missing legacy group on testLegacy
Minor tweaks
Fix merge
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
* 3.1:
Fix merge
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
* 2.8:
Fix merge
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
* 2.7:
[DI] Dont share service when no id provided
Fix Container and PhpDumper test inaccuracies
[DI] Fix missing new line after private alias
[ClassLoader] Throw an exception if the cache is not writeable
Fixing regression in TwigEngine exception handling.
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBundle] Fixing regression in TwigEngine exception handling
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21176
| License | MIT
Fixing regression after #20831 in TwigEngine exception handling.
Commits
-------
390cb33 Fixing regression in TwigEngine exception handling.
This PR was merged into the 2.7 branch.
Discussion
----------
Fix Container and PhpDumper test inaccuracies
| 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 |
Stumbled upon and fixed some minor inaccuracies in tests for DI container, they might have lead to undetected changes of `Container`'s behavior
Commits
-------
24b93cc Fix Container and PhpDumper test inaccuracies
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] Dont share service when no id provided
| 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
-------
814f633 [DI] Dont share service when no id provided
This PR was merged into the 3.3-dev branch.
Discussion
----------
[HttpFoundation] Add File\Stream for size-unknown BinaryFileResponse
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19738
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7343
Replaces #19740. Native "getSize" is reported to return false on error, so using false as return type doesn't break the signature.
Commits
-------
8011209a18 [HttpFoundation] Add File\Stream for size-unknown BinaryFileResponse
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Yaml] Remove unused argument
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
This PR removes an unused argument of `Inline::parseScalar()`. I based it on master as that's not really a bug fix but the lowest applicable branch is 3.0 (the method was not internal in 2.x).
Commits
-------
1a14a1f274 [Yaml] Remove an unused argument
* 3.2:
[TwigBundle] fixed usage when Templating is not installed
[Validator] Check cascasdedGroups for being countable
[Cache] Add changelog for 3.2
[Cache] Add changelog
[Filesystem] Check that the directory is writable after created it in dumpFile()
[HttpFoundation] Improved set cookie header tests
[Serializer] int is valid when float is expected when deserializing JSON
[Console] increased code coverage of Output classes
Added missing headers in fixture files
[Profiler][VarDumper] Fix minor color issue & duplicated selector
* 3.1:
[TwigBundle] fixed usage when Templating is not installed
[Validator] Check cascasdedGroups for being countable
[Cache] Add changelog
[Filesystem] Check that the directory is writable after created it in dumpFile()
[HttpFoundation] Improved set cookie header tests
[Serializer] int is valid when float is expected when deserializing JSON
[Console] increased code coverage of Output classes
Added missing headers in fixture files
[Profiler][VarDumper] Fix minor color issue & duplicated selector
* 2.8:
[TwigBundle] fixed usage when Templating is not installed
[Validator] Check cascasdedGroups for being countable
[Filesystem] Check that the directory is writable after created it in dumpFile()
[HttpFoundation] Improved set cookie header tests
[Console] increased code coverage of Output classes
[Profiler][VarDumper] Fix minor color issue & duplicated selector
* 2.7:
[TwigBundle] fixed usage when Templating is not installed
[Validator] Check cascasdedGroups for being countable
[Filesystem] Check that the directory is writable after created it in dumpFile()
[HttpFoundation] Improved set cookie header tests
[Console] increased code coverage of Output classes
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Filesystem] Add appendToFile()
| 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
So we could append content to a file:
```php
(new Filesystem)->appendToFile($file, 'bar');
```
instead of doing it in two steps:
```php
if (false === $content = @file_get_contents($file)) {
throw new \Exception();
}
(new Filesystem)->dumpFile($file, $content.'bar');
```
Doing it opt-in using `dumpFile(..., $append = false)` would have been enough but not possible for BC.
Commits
-------
1f7b753670 [Filesystem] Add appendToFile()
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Filesystem] Add appendToFile()
| 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
So we could append content to a file:
```php
(new Filesystem)->appendToFile($file, 'bar');
```
instead of doing it in two steps:
```php
if (false === $content = @file_get_contents($file)) {
throw new \Exception();
}
(new Filesystem)->dumpFile($file, $content.'bar');
```
Doing it opt-in using `dumpFile(..., $append = false)` would have been enough but not possible for BC.
Commits
-------
9fb5293122 [Filesystem] Add appendToFile()
This PR was squashed before being merged into the 2.7 branch (closes#21155).
Discussion
----------
[Validator] Check cascasdedGroups for being countable
Prevents notice for PHP 7.2
| 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 |
Just repeated for this place https://github.com/symfony/symfony/pull/20859
Waiting travis to fill in the `Tests pass` field
`cascasdedGroups` can be null at this point (according to failures and phpdoc)
Commits
-------
8fa45a130b [Validator] Check cascasdedGroups for being countable
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Yaml] parse multi-line strings
| 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 working on #21084, I discovered that the YAML parser does not support (unquoted) multi-line strings (neither as plain strings nor as values for mappings). This PR adds support for them.
Commits
-------
ec593b923b [Yaml] parse multi-line strings
This PR was squashed before being merged into the 3.3-dev branch (closes#21196).
Discussion
----------
[FrameworkBundle] changed some default configs from canBeEnabled to canBeDisabled
| 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
FrameworkBundle configuration is currently "optimized" for when a project
depends on symfony/symfony (which is the vast majority of Symfony projects out
there as that's how Symfony Standard Edition is set up). As all components are
always available, features (forms, validation, translation, serializer, ...)
are disabled by default in FrameworkBundle's configuration (`canBeEnabled`) and
developers must enable them when they need them (that was done mainly for
performance reasons).
That's annoying as it means one configuration step before being able to use
forms for the first time (or validation, or serialization, or translation, ...).
To make features auto-configurable and make the framework a bit more
user-friendly (that's where I think I need to invoke DX :), I'd like Symfony 4
to work in a different way. Instead of relying on symfony/symfony, I want
people to install only the components/bundles they need. In that scenario, we
can auto-configure Symfony FrameworkBundle based on the available components.
If you add symfony/form as a dependency, then it makes sense to automatically
enable the feature in framework bundle (with the possibility to disable it if
needed thanks to `canBeDisabled`).
Let's recap:
* Before:
* You want to use forms; you have symfony/symfony, so nothing to install;
* Using forms does not work out of the box though; you need to know that you
have to edit `app/config/config.yml` to explicitly enable forms;
* Forms work!
* After:
* You want to use forms so you install symfony/form (like for any other
packages out there; want to use Twig for templating, install twig/twig);
* But for Symfony components, there are no other steps; forms are
auto-configured just because you installed the dependency, go work now!
In a way, it makes handling/installing/configuring Symfony components no
different than doing the same for a third party package. That's about relying
even more on Composer and less on configuration. Symfony components have the
extra benefit of being auto-configured via FrameworkBundle. That's not the case
for other third-party packages/bundles, but for those who attended SymfonyCon
Berlin, you know that this is coming soon via Symfony Flex.
That's even more interesting for forms as CSRF protection needs an extra knob
to be turned on currently. With the new way, just install the CSRF security
component. An again, you still have the possibility to turn it off if you want
to.
Anyway, this PR gives us the flexibility to do both: when using
symfony/symfony, everything works as before, if you are using
symfony/framework-bundle, then auto-configuration based on the installed
packages is automatically activated.
This also brings consistency as this behavior is already what we've done for
the Doctrine Annotation library in 3.2.
Last, but not the least, with all the work currently done on the container
lazyness for Symfony 3.3, concerns about performance are less important than
before, so having components auto-enabled when installed should not be a big
deal. We might even go one step further and remove enabling/disabling for
ESI/SSI/fragments/... And whenever we create an independent Session component,
we will be able to do the same with the session configuration. The astute
reader might have noticed that I haven't talked about the templating
configuration, but as the component will be deprecated in 3.3, I prefer to keep
its activation explicit.
In terms of BC, the only change is for people using symfony/framework-bundle
with some packages that were installed but not enabled in the config. I would
say that this should be pretty rare and anyway, the only consequence is a small
performance hit which can be easily offset by explicitly disabling the config.
That's all folks!
Commits
-------
ef80873d06 [FrameworkBundle] changed some default configs from canBeEnabled to canBeDisabled
98ce21a351 [FrameworkBundle] changed the default value of annotation setting based on the existence of Doctrine Annotations
This PR was merged into the 3.3-dev branch.
Discussion
----------
[EventDispatcher] Deprecate ContainerAwareEventDispatcher
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
These methods shouldn't be available to end users.
Commits
-------
c4a6a8a47c [EventDispatcher] Deprecate ContainerAwareEventDispatcher
This PR was merged into the 3.3-dev branch.
Discussion
----------
[WebServerBundle] Decouple server commands from the container
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20429
| License | MIT
| Doc PR | maybe
This removes the need for injecting the container in the new `server:*` commands, registering them as services when used in the framework and thus making them even more discoverable and extensible.
It would then be easy to reconsider extracting them in a `WebServer` component instead of having a bundle only. IMHO it would make sense to use these commands outside of the framework.
If the idea can be considered I'll add some tests at least ensuring that these commands are bootstrap-able. This must be done before that they are covered by the BC promise (3.3).
Commits
-------
2e63025e18 [WebServerBundle] Decouple server:* commands from the container
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Dont call get() when not required - µ-optim
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
(could be applied on 3.2, please advise)
Helps a bit on https://rawgit.com/kocsismate/php-di-container-benchmarks/master/var/benchmark.html
note: if we want more performance, we should consider deprecating case insensitivity of service identifiers.
Commits
-------
7a42199115 [DI] Dont call get() when not required - µ-optim
This PR was merged into the 3.3-dev branch.
Discussion
----------
[WebServerBundle] Fix package type in composer.json
| Q | A
| ------------- | ---
| Branch? | master
Commits
-------
50baf256d5 [WebServerBundle] Fix package type in composer.json
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI][EventDispatcher] Add & wire closure-proxy argument type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12521, #12007, #20039
| License | MIT
| Doc PR | -
By resolving event subscribers at compile time, then wrapping listeners in a closure, we get laziness almost for free. This should solve/replaced all the above linked issues.
(WIP because tests are missing)
Commits
-------
ecdf857b61 [DI][EventDispatcher] Add & wire closure-proxy argument type
* 3.2:
[Bridge/PhpUnit] Relax expectedDeprecation for forward compat
[FrameworkBundle] Remove Response* from classes to compile
[Workflow] Removed twig from composer.json (dev section, not used)
This PR was merged into the 3.2 branch.
Discussion
----------
[Bridge/PhpUnit] Relax expectedDeprecation for forward compat
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Instead of a strict match, this makes the annotation check ignore not expected messages, while still requiring all the expected ones in order.
This is needed for forward compat with future deprecations, and should make travis green again.
Commits
-------
a3ba726 [Bridge/PhpUnit] Relax expectedDeprecation for forward compat
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Remove Response* from classes to compile
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20560, https://github.com/symfony/symfony-demo/issues/411, https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/issues/276
| License | MIT
| Doc PR | -
When HttpCache is used, Response is loaded first, then the kernel is booted (on cache miss), which triggers the loading of classes.php. Since 3.2 generates a context free classes.php, the Response class is now included there when it was excluded previously. And boom, "Cannot declare class Symfony\Component\HttpFoundation\Response".
Commits
-------
9ab59824a1 [FrameworkBundle] Remove Response* from classes to compile
This PR was squashed before being merged into the 2.7 branch (closes#20972).
Discussion
----------
[HttpFoundation] Improved set cookie header tests
| Q | A
| ------------- | ---
| Branch? | 2.7 (already in master)
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Separated from #20569
Commits
-------
05bce71d7a [HttpFoundation] Improved set cookie header tests
This PR was squashed before being merged into the 3.3-dev branch (closes#20547).
Discussion
----------
[FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation 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 | -
When we have a symlink folder in app/Resources/translations, files inside this symlink are not handled.
Commits
-------
4874e43a4c [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files
This PR was merged into the 3.3-dev branch.
Discussion
----------
Deprecate ClassCollectionLoader and Kernel::loadClassCache
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #20668
| License | MIT
As suggested by @nicolas-grekas in #20668 I added deprecation notices to ClassCollectionLoader and Kernel::loadClassCache.
Commits
-------
660d79a186 Deprecates ClassCache-cache warmer.
This PR was squashed before being merged into the 3.1 branch (closes#21165).
Discussion
----------
[Serializer] int is valid when float is expected when deserializing JSON
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | api-platform/api-platform#37
| License | MIT
| Doc PR | n/a
JSON only has a Number type corresponding to both `int` and `float` PHP types.
PHP's `json_encode`, JavaScript's `JSON.stringify`, Go's `json.Marshal` as well as most other JSON encoders convert floating-point numbers like `12.0` to `12` (the decimal part is dropped when possible).
PHP's `json_decode` automatically converts Numbers without a decimal part to integers.
Actually, the Serializer rejects integers when a float is expected, this PR fixes this behavior when denormalizing JSON-based formats.
Port of api-platform/core#714.
/cc @gorghoa @Shine-neko
Commits
-------
4125455775 [Serializer] int is valid when float is expected when deserializing JSON
This PR was merged into the 3.3-dev branch.
Discussion
----------
[PhpUnitBridge] silence warnings on PHPUnit 4.8
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The concept of warnings is only available since PHPUnit 5. We can later think about whether we need this for PHPUnit 4.8 to or if we should rather aim to drop PHPUnit 4.8 support in 4.0. For now, this change will make the test suite green again.
Commits
-------
2c3de10 silence warnings on PHPUnit 4.8
This PR was squashed before being merged into the 2.7 branch (closes#21124).
Discussion
----------
[Console] increased code coverage of Output classes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR increases the coverage of Output classes of the Console component from 80.81% to 94.95%
Commits
-------
ab4ba23 [Console] increased code coverage of Output classes
This PR was merged into the 3.3-dev branch.
Discussion
----------
No fallback to REQUEST_TIME in TimeDataCollector
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no (?)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
As of PHP 5.4 the `REQUEST_TIME_FLOAT` is available and the minimum version of PHP is 5.5 in Symfony. I think it's safe to use as I can't find cases where this is _not_ defined.
Commits
-------
ba00543 No fallback to REQUEST_TIME in TimeDataCollector
This PR was merged into the 3.3-dev branch.
Discussion
----------
[PhpUnitBridge] deprecate the testLegacy test name prefix
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #18755
| License | MIT
| Doc PR |
Commits
-------
21b72dd deprecate the Legacy/testLegacy test name prefix
This PR was merged into the 2.8 branch.
Discussion
----------
[Profiler][VarDumper] Fix minor color issue & duplicated selector
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
While working on #21109, I spotted this minor issue with `sf-dump-const` and `.sf-dump-ref`:
| Before | After |
| --- | --- |
|<img width="276" alt="screenshot 2017-01-03 a 20 13 55" src="https://cloud.githubusercontent.com/assets/2211145/21619779/7e1e347e-d1f1-11e6-9d84-fbb1d5d6b1fa.PNG">| <img width="275" alt="screenshot 2017-01-03 a 20 14 04" src="https://cloud.githubusercontent.com/assets/2211145/21619786/86dde5dc-d1f1-11e6-8b13-dcfc5abe466a.PNG">|
Commits
-------
b282076 [Profiler][VarDumper] Fix minor color issue & duplicated selector
This PR was squashed before being merged into the 3.3-dev branch (closes#21039).
Discussion
----------
Web server bundle
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21040
| License | MIT
| Doc PR | n/a
Moved the `server:*` commands to a new bundle. It makes them more easily discoverable and more decoupled. Discoverability is important when not using symfony/symfony. In that case, the commands are not available unless you have the symfony/process component installed. With a dedicated bundle, installing the bundle also installs the dependency, making the whole process easier.
Usage is the same as the current commands for basic usage:
To start a web server in the foreground:
```
bin/console server:run
```
To manage a background server:
```
bin/console server:start
bin/console server:stop
bin/console server:status
```
The big difference is that port is auto-determined if something is already listening on port 8000.
Usage is **different** if you pass options:
```
bin/console server:start 127.0.0.1:8888
bin/console server:stop # no need to pass the address again
bin/console server:status # no need to pass the address again
```
That's possible as the web server now stores its address in a pid file stored in the current directory.
Commits
-------
f39b32735b [WebServerBundle] switched auto-run of server:start to off by default
961d1cea55 [WebServerBundle] fixed server:start when already running
126f4d9ec4 [WebServerBundle] added support for port auto-detection
6f689d6597 [WebServerBundle] changed the way we keep track of the web server
585d4451c8 [WebServerBundle] tweaked command docs
fa7ebc57de [WebServerBundle] moved most of the logic in a new class
951a1a227d [WebServerBundle] changed wording
ac1ba7700e made the router configurable via env vars
48dd2b0dbe removed obsolete check
132902c621 moved server:* command to a new bundle
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Implement lazy collection type using generators
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | -
| Fixed tickets | #20875
| License | MIT
| Doc PR | -
Following the RFC https://github.com/symfony/symfony/issues/20875, this PR aims to implement lazy services collections using generators internally.
For now, I suggest to support only XML and PHP definitions. Supporting YAML means adding another convention to the language and this is not the aim of this PR.
- [x] value object holding the semantic (IteratorArgument)
- [x] iterator dumping
- [x] lazyness awareness in CheckCircularReferencesPass & GraphvizDumper
- [x] rewindable iterators
- [x] `*_ON_INVALID_REFERENCE` behavior
- [x] ContainerBuilder::createService
- [x] ArgumentInterface handling in compiler passes
Commits
-------
1dbf52ad03 [DI] Add "=iterator" arguments to Yaml loader
5313943692 [DependencyInjection] Implement lazy collection type using generators
* 3.2:
[Cache] Remove silenced warning tiggered by PhpArrayAdapter
[Cache] Fix order of writes in ChainAdapter
[Console] Fix return type in Terminal docblocks
This PR was merged into the 3.2 branch.
Discussion
----------
[Cache] Remove silenced warning tiggered by PhpArrayAdapter
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Because many reported this silenced warning, which happens all the time unless `cache:warmup` has been run.
Commits
-------
a9dfcd8 [Cache] Remove silenced warning tiggered by PhpArrayAdapter
This PR was merged into the 3.2 branch.
Discussion
----------
[Console] Fix return type in Terminal docblocks
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR updates the docblock to reflect what's already in the code.
Commits
-------
6afb0afa24 [Console] Fix return type in Terminal docblocks
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Show hidden commands in json & xml descriptors
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no (may be considered, but as hidden commands did not exist before 3.2, looks more like a behavior change, hence a feature)
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20866#issuecomment-266678895
| License | MIT
| Doc PR | N/A
Commits
-------
b6cf240ab5 [Console] Show hidden commands in json & xml descriptors
This PR was merged into the 3.2 branch.
Discussion
----------
[DependencyInjection] Fix the priority order of compiler pass trait
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20332, #20993
| License | MIT
| Doc PR | ~
A regression has appeared between the version `3.1` and `3.2` on the compilation passes using a priority option (see #20332).
Indeed, the order is no longer preserved for service definitions with the same priority. This is caused by the `SplPriorityQueue` class that does not have a FIFO implementation (see this [comment](https://github.com/symfony/symfony/issues/20332#issuecomment-268096527)).
The PR #20993 fixes the problem but only for Forms, not for all compiler passes using the `PriorityTaggedServiceTrait` trait since `3.2`.
Commits
-------
aac9a7e Fix the priority order of compiler pass trait
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Security] use authenticated token for json authentication
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21123
| License | MIT
| Doc PR | N/A
When using `UsernamePasswordJsonAuthenticationListener` with [LexikJWTAuthenticationBundle](https://github.com/lexik/LexikJWTAuthenticationBundle), we get a type exception
> Type error: Argument 1 passed to Lexik\Bundle\JWTAuthenticationBundle\Security\Http\Authentication\AuthenticationSuccessHandler::handleAuthenticationSuccess() must implement interface Symfony\Component\Security\Core\User\UserInterface, string given, called in .../vendor/lexik/jwt-authentication-bundle/Security/Http/Authentication/AuthenticationSuccessHandler.php on line 47
This error occurs because the `UsernamePasswordJsonAuthenticationListener` send to the authentication success handler the token which have the user as a string and not the authenticated one that have a UserInterface as user.
Commits
-------
208c617716 use authenticated token for json authentication
This PR was squashed before being merged into the 3.3-dev branch (closes#21088).
Discussion
----------
Rename DebugAccessDecisionManager to TraceableAccessDecisionManager
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21085
| License | MIT
[EDIT] No longer WIP, test passing. Also, test added to preserve BC with the SecurityBundle.
Commits
-------
c5e0e59 Rename DebugAccessDecisionManager to TraceableAccessDecisionManager
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Security] Typo fix
| 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
Remove an extra space, will make fabbot happy for #21136.
Commits
-------
4def721 [Security] Typo fix
This PR was merged into the 3.2 branch.
Discussion
----------
[PhpUnitBridge] Set COMPOSER_ROOT_VERSION while installing
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
8bab09e [PhpUnitBridge] Set COMPOSER_ROOT_VERSION while installing
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Validate/cast cookie expire time
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Commits
-------
8215dbdb31 [HttpFoundation] Validate/cast cookie expire time
This PR was merged into the 3.2 branch.
Discussion
----------
[PhpUnitBridge] skip tests with failure and error states too
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I was actually wrong by not excluding failures and errors to in #21121.
Commits
-------
f3bb206f12 skip tests with failure and error states too
This PR was merged into the 3.3-dev branch.
Discussion
----------
[PhpUnitBridge] run PHPUnit in the same process
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21083
| License | MIT
| Doc PR |
Commits
-------
198627877a [PhpUnitBridge] run PHPUnit in the same process
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Validator] support DateTimeInterface instances for times
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The same has already been done for the `Date` and `DateTime` constraints in #18759.
Commits
-------
1fa9276937 support DateTimeInterface instances for times
This PR was merged into the 3.2 branch.
Discussion
----------
[Yaml] add missing indicator character
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The comma was mentioned in the deprecation message, though it actually was never checked before in the condition.
Commits
-------
8725e0b [Yaml] add missing indicator character
This PR was merged into the 3.3-dev branch.
Discussion
----------
Added missing use statemenet
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
We should use Symfony\Component\Translation\Exception\RuntimeException
Commits
-------
f9848be Added missing use statemenet
* 3.2:
do not depend on a fixed date in layout tests
[Console] Escape default value when dumping help
[Console] OS X Can't call cli_set_process_title php without superuser
Fixed @return when returning this or static #bis
fixed @return when returning this or static
Polish translation improvement in Validator component
[Console] Descriptors should use Helper::strlen
[Config] Improve PHPdoc / IDE autocomplete
[Debug] Wrap call to ->log in a try catch block
[Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
fix merge
[cache] Bump RedisAdapter timeout to 5s
fixed @return when returning this or static
[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
remove is_writable check on filesystem cache
* 3.1:
do not depend on a fixed date in layout tests
[Console] Escape default value when dumping help
[Console] OS X Can't call cli_set_process_title php without superuser
Fixed @return when returning this or static #bis
fixed @return when returning this or static
Polish translation improvement in Validator component
[Console] Descriptors should use Helper::strlen
[Config] Improve PHPdoc / IDE autocomplete
[Debug] Wrap call to ->log in a try catch block
[Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
fix merge
[cache] Bump RedisAdapter timeout to 5s
fixed @return when returning this or static
[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
remove is_writable check on filesystem cache
* 2.8:
do not depend on a fixed date in layout tests
[Console] Escape default value when dumping help
[Console] OS X Can't call cli_set_process_title php without superuser
Fixed @return when returning this or static #bis
Polish translation improvement in Validator component
[Console] Descriptors should use Helper::strlen
[Config] Improve PHPdoc / IDE autocomplete
[Debug] Wrap call to ->log in a try catch block
[Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
* 2.7:
do not depend on a fixed date in layout tests
[Console] Escape default value when dumping help
[Console] OS X Can't call cli_set_process_title php without superuser
Polish translation improvement in Validator component
[Console] Descriptors should use Helper::strlen
[Config] Improve PHPdoc / IDE autocomplete
[Debug] Wrap call to ->log in a try catch block
[Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
* 3.2:
respect skipped and incomplete tests
[DI] Minor fixes in FactoryReturnTypePass
[TwigBridge] Fix upgrade/changelog notes
[Debug] Fixed cast of stream
[Console] minor addition to #20817 for branch 3.2
This PR was merged into the 3.2 branch.
Discussion
----------
[DI] Minor fixes in FactoryReturnTypePass
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
c231f81 [DI] Minor fixes in FactoryReturnTypePass
By default, the `DateType` as well as the `DateTimeType` set the choices
being available for the year to a range starting five years in the past.
After some time, this will make tests fail when the year of the fixed
date being used as the initial data is before the first year being part
of the choices.
This PR was merged into the 2.7 branch.
Discussion
----------
[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
| 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
-------
8227593 [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] OS X Can't call cli_set_process_title php without superuser
| 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
The console component test suite is failing on OS X (10.12.2) as the `cli_set_process_title` function seems not to be allowed to be called without superuser. It seems to be an OS X limitation.
At least, the test suite should pass and a warning should be shown when using the component with this feature on OS X.
---
refs:
- http://stackoverflow.com/questions/27803120/cannot-set-process-title-in-a-php-command-line-script-using-cli-set-process-titl
- https://github.com/liip/php-osx/issues/139
- https://github.com/zfcampus/zf-console/pull/22
Commits
-------
9928c0d [Console] OS X Can't call cli_set_process_title php without superuser
This PR was merged into the 3.2 branch.
Discussion
----------
[TwigBridge] Fix upgrade/changelog notes
| Q | A
| ------------- | ---
| Branch? | 3.2
The current upgrade note is wrong, the renderer cannot be injected in the `TwigRendererEngine`, only the Twig Environment can be.
Also added a missing note about the deprecated `TwigRendererEngineInterface`.
Commits
-------
a7ebe9c [TwigBridge] Fix upgrade/changelog notes
This PR was squashed before being merged into the 2.7 branch (closes#20900).
Discussion
----------
[Console] Descriptors should use Helper::strlen
| 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
Commits
-------
8e9a5f8 [Console] Descriptors should use Helper::strlen
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Improve PHPdoc / IDE autocomplete
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes-ish
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
The missing pieces for fixing the autocomplete in IDE's (tested in `PhpStorm 2016.3.2`).
Each method seems to be found now for the framework bundle configuration 😱
Actually uses #20923 where needed, but i think we should go with it consistently.
Relates to https://github.com/symfony/symfony/pull/20290#issuecomment-257303145
Commits
-------
3f3c6e0 [Config] Improve PHPdoc / IDE autocomplete
This PR was squashed before being merged into the 2.7 branch (closes#21010).
Discussion
----------
[Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
When trying to call a method on an anonymous class (with or without methods) the `UndefinedMethodFatalErrorHandler` tries to iterate `null`.
For ref.: https://3v4l.org/l26u1
Commits
-------
ed713ae [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
This PR was merged into the 3.1 branch.
Discussion
----------
[cache] Bump RedisAdapter default timeout to 5s
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Bump RedisAdapter timeout to 5s because (at least with Predis) 0 means 0s
Commits
-------
eaca2a4 [cache] Bump RedisAdapter timeout to 5s
* 3.2:
[FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
fixed @return when returning this or static
override property constraints in child class
removed unneeded comment
[Console] improved code coverage of Command class
[FrameworkBundle] Make TemplateController working without the Templating component
[FrameworkBundle] Allow multiple transactions with the same name
Only count on arrays or countables to avoid warnings in PHP 7.2
* 3.1:
fixed @return when returning this or static
override property constraints in child class
removed unneeded comment
[Console] improved code coverage of Command class
[FrameworkBundle] Make TemplateController working without the Templating component
Only count on arrays or countables to avoid warnings in PHP 7.2
* 2.8:
fixed @return when returning this or static
override property constraints in child class
removed unneeded comment
[Console] improved code coverage of Command class
[FrameworkBundle] Make TemplateController working without the Templating component
Only count on arrays or countables to avoid warnings in PHP 7.2
* 2.7:
fixed @return when returning this or static
override property constraints in child class
[Console] improved code coverage of Command class
Only count on arrays or countables to avoid warnings in PHP 7.2
This PR was merged into the 2.7 branch.
Discussion
----------
Fix @return statements to use $this or static when relevant
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20290
| License | MIT
| Doc PR | n/a
see #20290
Commits
-------
3c0693d fixed @return when returning this or static
This PR was squashed before being merged into the 3.2 branch (closes#20959).
Discussion
----------
[FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
I ran into a case that led to an `AnnotationException` in the `AnnotationsCacheWarmer`. I deduced that these exceptions should be ignored to not break the cache warming process.
The case :
* You have a controller in your `AppBundle\Controller\` directory.
* You have an annotation in this controller that will never be found (because you made a mistake in the class / annotation name) or not every time : for example your controller is only used in dev env and it uses an annotation that is defined in a vendor bundle that is only under the `require-dev` key in your `composer.json` because you don't need it in your production deployment. So in production, your controller exists but will never be used. However the vendor bundle does not exist.
* You dump your autoload files with composer using the `--optimize` option.
* You end up with an `AnnotationException`.
Why :
* In the [`FrameworkExtension`](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L189), the `**Bundle\Controller\` pattern is added as an "annotated class to compile".
* In the [`AddClassesToCachePass`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php#L50), all the classes defined in the `autoload_classmap.php` file are matched against the previous pattern.
* Your controller will match. So even if you don't use it at all in your application, the annotation will still be read and the exception will be thrown.
Commits
-------
6749569 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Allow multiple transitions with the same name
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20794
| License | MIT
| Doc PR | -
Commits
-------
7c86e16 [FrameworkBundle] Allow multiple transactions with the same name
This PR was merged into the 2.7 branch.
Discussion
----------
Avoid warning in PHP 7.2 because of non-countable data
| 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 | -
Recently, the "[Counting of non-countable objects][1]" RFC was merged in PHP 7.2-dev. This means `count()` now causes a warning when passing anything that's not countable (e.g. `null` or `''`).
As PHP does not lazily execute conditions, `FormUtil::isEmtpy($data) || 0 === count($data)` will cause *both* conditions to be executed. This means `count($data)` errors when `$data` is empty.
Splitting it up in 2 statements avoids the warning being triggered in PHP 7.2.
See https://travis-ci.org/symfony-cmf/content-bundle/jobs/181815895 for a failing test caused by this bug.
[1]: https://wiki.php.net/rfc/counting_non_countables
Commits
-------
94253e8 Only count on arrays or countables to avoid warnings in PHP 7.2
This PR was squashed before being merged into the 2.7 branch (closes#20817).
Discussion
----------
[Console] improved code coverage of Command class
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR increases the code coverage of the Command class from ``86.82%`` to ``96.90%``.
Commits
-------
d393113 [Console] improved code coverage of Command class
This PR was merged into the 2.8 branch.
Discussion
----------
[FrameworkBundle] Make TemplateController working without the Templating component
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The template controller was missed during #15502. Btw I've added some tests for this controller.
Commits
-------
89ccbc4 [FrameworkBundle] Make TemplateController working without the Templating component
* 3.2:
use HHVM 3.15 to run tests
[TwigBridge] fix Twig 2.x compatibility
removed some PHP CS Fixer rules
Improve language
[Console] SymfonyStyle: Escape trailing backslashes in user texts
Mention the community review guide
[Form] fix group sequence based validation
[Console] Fix question formatting using SymfonyStyle::ask()
* 3.1:
use HHVM 3.15 to run tests
[TwigBridge] fix Twig 2.x compatibility
removed some PHP CS Fixer rules
Improve language
[Console] SymfonyStyle: Escape trailing backslashes in user texts
Mention the community review guide
[Form] fix group sequence based validation
[Console] Fix question formatting using SymfonyStyle::ask()
* 2.8:
use HHVM 3.15 to run tests
[TwigBridge] fix Twig 2.x compatibility
removed some PHP CS Fixer rules
Improve language
[Console] SymfonyStyle: Escape trailing backslashes in user texts
Mention the community review guide
[Form] fix group sequence based validation
[Console] Fix question formatting using SymfonyStyle::ask()
* 2.7:
use HHVM 3.15 to run tests
[TwigBridge] fix Twig 2.x compatibility
removed some PHP CS Fixer rules
Improve language
[Console] SymfonyStyle: Escape trailing backslashes in user texts
Mention the community review guide
[Form] fix group sequence based validation
[Console] Fix question formatting using SymfonyStyle::ask()
This PR was merged into the 3.3-dev branch.
Discussion
----------
[TwigBridge] Late deprecation for TwigRendererEngine::setEnvironment()
| 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/20093#discussion_r81309117
| License | MIT
| Doc PR | n/a
This method should have been deprecated in 3.2 since the twig environment should be injected through the constructor and replacing it later can break things (see https://github.com/symfony/symfony/pull/20093#discussion_r81309117 for details).
Maybe this could target 3.2
Commits
-------
aabb73c Deprecate TwigRendererEngine::setEnvironment()
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix question formatting using SymfonyStyle::ask()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20964
| License | MIT
| Doc PR | n/a
Given
```php
$io = new SymfonyStyle($input, $output);
$io->ask('Do you want to use Foo\\Bar <comment>or</comment> Foo\\Baz\\?', 'Foo\\Bar');
```
Before output
![before](http://image.prntscr.com/image/af3806f866654deda2dec79b50d1ffa2.png)
After output
![after](http://image.prntscr.com/image/59c031d9e02949cebeae7a4734c7043f.png)
Commits
-------
e189183 [Console] SymfonyStyle: Escape trailing backslashes in user texts
9d46712 [Console] Fix question formatting using SymfonyStyle::ask()
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] update changelog and upgrade files
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20634
| License | MIT
| Doc PR |
Commits
-------
ad7afe0 Added a needed blank line
d2b4996 [DI] update changelog and upgrade files
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] fix group sequence based validation
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20929
| License | MIT
| Doc PR |
Commits
-------
fb91f74 [Form] fix group sequence based validation
* 3.1:
fixed obsolete getMock() usage
fixed obsolete getMock() usage
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
do not remove the Twig ExceptionController service
removed obsolete condition
do not try to register incomplete definitions
* 2.8:
fixed obsolete getMock() usage
fixed obsolete getMock() usage
[WebProfilerBundle] Display multiple HTTP headers in WDT
do not remove the Twig ExceptionController service
removed obsolete condition
do not try to register incomplete definitions
This PR was merged into the 3.3-dev branch.
Discussion
----------
[WebProfilerBundle] Split PHP version if needed
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | https://github.com/symfony/symfony/pull/20697#issuecomment-263966015
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Commits
-------
1241a00 [WebProfilerBundle] Split PHP version if needed
This PR was squashed before being merged into the 3.3-dev branch (closes#20634).
Discussion
----------
[DI] Deprecate dumping an uncompiled container
| 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/19673#issuecomment-242001836
| License | MIT
| Doc PR | reference to the documentation PR, if any
It makes the PHP dumper less complex. Compiled container goes in, compiled container goes out.
Relates to #19673
Commits
-------
da50fdb [DI] Deprecate dumping an uncompiled container
This PR was squashed before being merged into the 3.3-dev branch (closes#20923).
Discussion
----------
#20921 [Config] Provide shorthand methods for ArrayNodeDefinition::pr…
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20921
| License | MIT
Commits
-------
22b8490#20921 [Config] Provide shorthand methods for ArrayNodeDefinition::pr…
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBundle] do not try to register incomplete definitions
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20212
| License | MIT
| Doc PR |
Commits
-------
2c9dc66 do not try to register incomplete definitions
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Fix DefinitionDecorator existency for composer authoritative+IDEs
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
So that the class is defined for naive parser (e.g. IDEs & composer class map generator).
Fixes autoloading in authoritative mode.
Commits
-------
9c3f755 [DI] Fix DefinitionDecorator existency for composer authoritative+IDEs
* 3.2:
[Security] Fix test
[Validator] phpize default option values
test for the Validator component to be present
[Serializer] Fix MaxDepth annotation exceptions
[DependencyInjection] Fix on-invalid attribute type in xsd
[FrameworkBundle] Fix PHP form templates on translatable attributes
[VarDumper] Fix dumping by-ref variadics
[Validator] add Indonesian translation
fixed CS
[config] Fix issue when key removed and left value only
[HttpFoundation] Fix cookie to string conversion for raw cookies
Fix misresolved parameters in debug:config on 3.2
[Console] fixed BC issue with static closures
[TwigBundle] Config is now a hard dependency
[FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
[Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
* 3.1:
[Security] Fix test
[Validator] phpize default option values
test for the Validator component to be present
[Serializer] Fix MaxDepth annotation exceptions
[DependencyInjection] Fix on-invalid attribute type in xsd
[FrameworkBundle] Fix PHP form templates on translatable attributes
[VarDumper] Fix dumping by-ref variadics
[Validator] add Indonesian translation
fixed CS
[config] Fix issue when key removed and left value only
[HttpFoundation] Fix cookie to string conversion for raw cookies
[Console] fixed BC issue with static closures
[Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
* 2.8:
[Security] Fix test
[Validator] phpize default option values
test for the Validator component to be present
[DependencyInjection] Fix on-invalid attribute type in xsd
[FrameworkBundle] Fix PHP form templates on translatable attributes
[VarDumper] Fix dumping by-ref variadics
[Validator] add Indonesian translation
fixed CS
[config] Fix issue when key removed and left value only
[Console] fixed BC issue with static closures
[Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
* 2.7:
[Validator] phpize default option values
test for the Validator component to be present
[DependencyInjection] Fix on-invalid attribute type in xsd
[FrameworkBundle] Fix PHP form templates on translatable attributes
[VarDumper] Fix dumping by-ref variadics
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Make ContainerBuilder::resolveEnvPlaceholders() able to inline the values of referenced env vars.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Being able to resolve environment variables at compile time as a replacement for `SYMFONY__` special env vars, unlocking their deprecation (see #20100).
Commits
-------
713b081 [DI] Make ContainerBuilder::resolveEnvPlaceholders() able to inline the values of referenced env vars.
This PR was merged into the 3.3-dev branch.
Discussion
----------
Request exceptions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20389, #20615, #20662
| License | MIT
| Doc PR | n/a
Replaces #20389 and #20662. The idea is to generically manage 400 responses when an exception implements `RequestExceptionInterface`.
The "weird" caches on the request for the host and the clients IPs allows to correctly manage exceptions in an exception listener/controller (as we are duplicating the request there, but we don't want to throw an exception there).
Commits
-------
32ec288 [HttpFoundation] refactored Request exceptions
d876809 Return a 400 response for suspicious operations
This PR was merged into the 3.3-dev branch.
Discussion
----------
[HttpKernel] Fix Bundle name regression
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20117
| License | MIT
| Doc PR | N/A
The bundle name can be set manually instead of being guessed from the class name, as the property is protected.
However, a regression prevents this name to be used, as calling `Bundle::getNamespace()` recomputes the bundle name from class instead.
The ability to name explicitly bundles is appreciable when dealing with "virtual" ones, or when providing bundles in a library under a `Vendor\MyPackage\Bridge\Symfony\Bundle` namespace. No need to rename the bundle class `VendorMyPackageBundle` which will make the instantiation in `Kernel::registerBundle()` quite ugly:
```diff
- new Vendor\MyPackage\Bridge\Symfony\Bundle\VendorMyPackageBundle()
+ new Vendor\MyPackage\Bridge\Symfony\Bundle\Bundle()
```
What about removing `Bundle::parseClassName()` and processing the namespace and bundle name separately, but keeping the `namespace` property introduced in #20117?
Commits
-------
3b5127d [HttpKernel] Fix Bundle name regression
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] phpize default option values
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13740
| License | MIT
| Doc PR |
This makes the behavior for default constraints inline with the behavior
when the option is given explicitly.
Commits
-------
d65679b [Validator] phpize default option values
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Fix PHP form templates on translatable attributes
| 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/20365#issuecomment-267333293
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Separated from #20365
Commits
-------
10806e0 [FrameworkBundle] Fix PHP form templates on translatable attributes
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] don't load translator services if not required
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20791
| License | MIT
| Doc PR |
One step further could be to remove all the loader services (or not register them at all) if only the identity translator is used (i.e. when only forms are enabled, but not translations), but that could be seen as a BC break.
Commits
-------
1e67155 don't load translator services if not required
This PR was merged into the 3.3-dev branch.
Discussion
----------
[HttpFoundation] Compute cookie max-age attribute
| 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
See https://wiki.php.net/rfc/cookie_max-age, PHP sends it since 5.5.
~~The date format actually differs now from PHP (`Saturday` instead of `Sat`). But it really doesnt matter much imo, using the constant seems more reliable to me and max-age overrules anyway ;)~~
Relates to https://github.com/symfony/symfony/pull/20569
Commits
-------
8c28317 [HttpFoundation] Compute cookie max-age attribute
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Smarter default for framework.annotations
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yesish (could be considered as a minor BC break)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
`framework.annotations` default should be true only if `doctrine/annotations` is installed.
Indeed, in https://github.com/symfony/symfony/pull/20097, the dependency on `doctrine/annotations` was removed from the framework bundle.
Thus, an application can break (not talking from one actually relying on annotations) as soon as it uses the framework bundle without the `framework.annotations` key explicitly set to `false` (I had the case in a fixture application in the testsuite of a package).
Commits
-------
e38be09 [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
* 2.7:
[Validator] add Indonesian translation
fixed CS
[config] Fix issue when key removed and left value only
[Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] AbstractVoter->supportsAttribute gives false positive if attribute is zero (0)
| 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 |
Issue is easy to reproduce with test giving negative data set.
0 should not pass as supported attribute for any set of attributes but it does as in_array in the method does not use flag 'strict' set to true.
As this is abstract voter and is used by users with their code flag 'strict' should be set to true.
Since is there in 2.7 and 2.8 (LTS) IMHO it should be fixed.
Commits
-------
8306530 [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
When a key attribute is mapped and the key is removed from the value array, if
only 'value' element is left in the array, it should replace its wrapper
array.
Assume the original value array is as follows (key attribute is 'id').
```php
array(
'things' => array(
array('id' => 'option1', 'value' => 'value1'),
array('id' => 'option2', 'value' => 'value2')
)
)
```
After normalized, the above shall be converted to the following array.
```php
array(
'things' => array(
'option1' => 'value1',
'option2' => 'value2'
)
)
```
It's also possible to mix 'value-only' and 'none-value-only' elements in
the array:
```php
array(
'things' => array(
array('id' => 'option1', 'value' => 'value1'),
array('id' => 'option2', 'value' => 'value2', 'foo' => 'foo2')
)
)
```
The above shall be converted to the following array.
```php
array(
'things' => array(
'option1' => 'value1',
'option2' => array('value' => 'value2','foo' => 'foo2')
)
)
```
The 'value' element can also be array:
```php
array(
'things' => array(
array(
'id' => 'option1',
'value' => array('foo'=>'foo1', 'bar' => 'bar1')
)
)
)
```
The above shall be converted to the following array.
```php
array(
'things' => array(
'option1' => array('foo' => 'foo1', 'bar' => 'bar1')
)
)
```
When using VariableNode for value element, it's also possible to mix
different types of value elements:
```php
array(
'things' => array(
array('id' => 'option1', 'value' => array('foo'=>'foo1', 'bar' => 'bar1')),
array('id' => 'option2', 'value' => 'value2')
)
)
```
The above shall be converted to the following array.
```php
array(
'things' => array(
'option1' => array('foo'=>'foo1', 'bar' => 'bar1'),
'option2' => 'value2'
)
)
```
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15270
| License | MIT
| Doc PR | n/a
This PR was squashed before being merged into the 2.8 branch (closes#20847).
Discussion
----------
[Console] fixed BC issue with static closures
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20845
| License | MIT
| Doc PR | n/a
Static closures were unable to be used in Command::setCode since #14431. This change fixes the BC break and ensures static closures can still be used.
Edit: It seems the inability to bind static closures was considered a feature in PHP5 but was considered a bug by PHP7. As such, the tests need to work around this fact - but the code can remain the same. This code change can be tidied/removed once Symfony is PHP7+ only.
Discussion here:
https://bugs.php.net/bug.php?id=64761https://bugs.php.net/bug.php?id=68792
Commits
-------
3247308 [Console] fixed BC issue with static closures
* 3.2:
[Console] Review Application docblocks
[Cache] Improve performances into foreach (PhpFilesAdapter)
bumped Symfony version to 3.2.2
updated VERSION for 3.2.1
updated CHANGELOG for 3.2.1
bumped Symfony version to 3.1.9
updated VERSION for 3.1.8
updated CHANGELOG for 3.1.8
Add support for REDIS_URL environment variables.
bumped Symfony version to 2.8.16
updated VERSION for 2.8.15
updated CHANGELOG for 2.8.15
bumped Symfony version to 2.7.23
updated VERSION for 2.7.22
update CONTRIBUTORS for 2.7.22
updated CHANGELOG for 2.7.22
Update PHP CS Fixer config file
* 3.1:
[Console] Review Application docblocks
bumped Symfony version to 3.1.9
updated VERSION for 3.1.8
updated CHANGELOG for 3.1.8
bumped Symfony version to 2.8.16
updated VERSION for 2.8.15
updated CHANGELOG for 2.8.15
bumped Symfony version to 2.7.23
updated VERSION for 2.7.22
update CONTRIBUTORS for 2.7.22
updated CHANGELOG for 2.7.22
Update PHP CS Fixer config file
* 2.8:
[Console] Review Application docblocks
bumped Symfony version to 2.8.16
updated VERSION for 2.8.15
updated CHANGELOG for 2.8.15
bumped Symfony version to 2.7.23
updated VERSION for 2.7.22
update CONTRIBUTORS for 2.7.22
updated CHANGELOG for 2.7.22
Update PHP CS Fixer config file
* 2.7:
[Console] Review Application docblocks
bumped Symfony version to 2.7.23
updated VERSION for 2.7.22
update CONTRIBUTORS for 2.7.22
updated CHANGELOG for 2.7.22
Update PHP CS Fixer config file
This PR was squashed before being merged into the 2.7 branch (closes#20813).
Discussion
----------
[Console] Review Application docblocks
| 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
~I know there must be a lot of other places in the core where there is some repeated or useless informations in docblocks, but everytime I dig into the `Application` class, I see this, and I don't want to repeat things for consistency when adding new methods 😅 (for instance in #20808, the `setCatchThrowables / areThrowablesCaught ` methods do not need a docblock description IMHO).~
~This PR adapts docblocks where:~
- ~A docblock description is not required, as everything can be expressed in the `@return / @param` argument (the case mentioned above)~
- ~Information is redundant between description and tags, and the context does not have to be reminded again:~
```diff
/**
* Adds an array of command objects.
*
* If a Command is not enabled it will not be added.
*
- * @param Command[] $commands An array of commands
+ * @param Command[] $commands
*/
public function addCommands(array $commands)
{
foreach ($commands as $command) {
$this->add($command);
}
}
```
Commits
-------
d8c18cc [Console] Review Application docblocks
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] replace DefinitionDecorator by ChildDefinition
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | TODO
The DefinitionDecorator class does not deal with decorated services. It reflects a parent-child-relationship between definitions instead. To avoid confusion, this commit deprecates the existing DefinitionDecorator class and introduces a new DefinitionExtension class as replacement.
Commits
-------
184f7ff replace DefinitionDecorator with ChildDefinition
The DefinitionDecorator class does not deal with decorated services. It
reflects a parent-child-relationship between definitions instead. To
avoid confusion, this commit deprecates the existing DefinitionDecorator
class and introduces a new ChildDefinition class as replacement.
* 3.2:
[WebProfilerBundle] Fix AJAX panel with fetch requests
Don’t compile when Opcache is not enabled on CLI
DateIntervalType: 'invert' should not inherit the 'required' option
[Form] DateIntervalType: Do not try to translate choices
[TwigBridge] fix constructor args check
Allow simple-phpunit to be used with an HTTP proxy
Minor fixes for 3.2
Fix a web profiler form issue with fields added to the form after the form was built
do not trigger deprecations for valid YAML
Write an exception message in a one heading line
[Workflow] Added missing docblock
[Finder] Refine phpdoc about argument for NumberComparator
Fixed max width from ajax request url element (td)
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
[Serializer] Optimize max depth checking
* 3.1:
Write an exception message in a one heading line
[Finder] Refine phpdoc about argument for NumberComparator
Fixed max width from ajax request url element (td)
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
[Serializer] Optimize max depth checking
* 2.8:
Write an exception message in a one heading line
[Finder] Refine phpdoc about argument for NumberComparator
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
* 2.7:
Write an exception message in a one heading line
[Finder] Refine phpdoc about argument for NumberComparator
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
This PR was squashed before being merged into the 3.3-dev branch (closes#20197).
Discussion
----------
[WebProfilerBundle] Improve Ajax Profiling Performance (javascript)
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | kinda (is bad performance a bug?) |
| New feature? | kinda (is increased performance a feature?) |
| BC breaks? | no (unless performance is a BC break) |
| Deprecations? | no |
| Tests pass? | do we have JS tests? |
| Fixed tickets | #20155 |
| License | MIT |
| Doc PR | n/a |
The old version of this JS re-rendered the entire list of ajax calls which was causing some performance issues when people had high numbers of ajax requests (increasingly common as people create SPAs.
This PR changes the behavior of the ajax profiler to be more smart about the DOM manipulations it makes. Instead of re-rendering the entire list, on any AJAX requests/responses, it instead adds the row to the profiler when an AJAX request is made, adding the DOM node as a property of the request on the requestStack. When the AJAX response comes back, it updates the existing DOM node instead of re-creating it (and all of the others).
I've tested this on my machine using a modern version of chrome. I don't think I'm doing anything fancy, so I think the likelihood that I broke something is minimal.
I've left a couple of the commits separate, because they represent distinct ideas. The first commit is just some consistency/cleanup. The second commit is the meat of the work. Its diff is basically useless since I've added two new functions and modified one function heavily. I tried to make the diff as easy to read as possible, but it's still pretty rough. The third commit removes some functions/calls that I don't think need to be there now that this is re-written, but I wanted to leave them in a separate commit for ease of revert if they are indeed needed.
Commits
-------
65e391c Replace occurances of querySelectorAll with querySelector
fddff26 Put back the indentation
9942edd Remove unnecessary method calls/definitions
2c053ee Rewrite ajax profiling for performance
da621c9 Fix indentation & JS Cleanup
This PR was squashed before being merged into the 3.3-dev branch (closes#20487).
Discussion
----------
[Console] Disallow inheritance from ProgressBar
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20427
| License | MIT
| Doc PR | ~
Changed `ProgressBar` to `final`, fixed tests.
As explained below, this modification doesn't break BC because inheritance from `ProgressBar` was not possible anyway.
See: https://github.com/symfony/symfony/issues/20427
Commits
-------
a2668f6 [Console] Disallow inheritance from ProgressBar
This PR was merged into the 3.1 branch.
Discussion
----------
[Serializer] Optimize max depth checking
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Avoid to call the metadata factory for each attribute when max depth checking is enabled.
Prepare the code for the "serialized name" feature (that also requires metadata) in Symfony 3.3.
Commits
-------
bb3ee76 [Serializer] Optimize max depth checking
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Added Yaml syntax shortcut for name-only tags
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | todo
This PR adds a little shorcut for tags without any attributes. There are increasingly more name-only tags in Symfony and having to do `{ name: twig.extension }` for these seems way too verbose to me.
**Before**
```yaml
services:
app.twig_extension:
class: AppBundle\Twig\AppExtension
tags:
- { name: twig.extension }
```
**After**
```yaml
services:
app.twig_extension:
class: AppBundle\Twig\AppExtension
tags: [twig.extension]
# or
# - twig.extension
```
This of course means we introduce a new format to achieve the same goal. I believe this isn't a big problem as the decision is distinctive and simple: If you configure tag attributes, use the long format, otherwise use the short format.
Backwards compatibility
---
In this PR, an exception was removed to allow this new shortcut format. The BC promise doesn't cover exceptions and I think removing the exception here should cause anything to break:
* Applications shouldn't rely on exceptions
* If code was triggering this exception before, it would not cause any behaviour change after this PR: The service just retrieves an unused tag, which is simply ignored by the container.
Commits
-------
7fa8c8a Added Yaml syntax shortcut for name-only tags
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Added a shortcut method for autowired definitions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | todo
This is a simple proposal to make adding autowired definitions to the `ContainerBuilder` a little easier. Registering autowired services in PHP code was quite verbose at the moment, while the whole point of autowiring is quick service registration.
**Before**
```php
$container->register('app.twig_extension', AppExtension::class)
->setAutowired(true)
->addTag('twig.extension')
;
```
**After**
```php
$container->autowire('app.twig_extension', AppExtension::class)
->addTag('twig.extension')
;
```
With https://github.com/symfony/symfony/pull/20264, this will be even nicer:
```php
$container->autowire(AppExtension::class)
->addTag('twig.extension')
;
```
Commits
-------
6ef4ce8 Added a shortcut method for autowired definitions
This PR was squashed before being merged into the 3.3-dev branch (closes#20697).
Discussion
----------
Updated the "PHP config" panel in the profiler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I propose to update this panel taking some of the ideas introduced by @ro0NL in #20126:
* Adding more info that helps debugging problems (like 32/64 bits, the locale and the timezone)
* Removing anything related to PHP acceleration that is not OPcache or APC
### Before
![php-config-before](https://cloud.githubusercontent.com/assets/73419/20751739/b557ca9a-b6fd-11e6-98c4-49e80b16d424.png)
### After
![php-config-after](https://cloud.githubusercontent.com/assets/73419/20751740/b7da5c38-b6fd-11e6-8619-3d3b5f477887.png)
Commits
-------
531053b Updated the "PHP config" panel in the profiler
This PR was merged into the 3.1 branch.
Discussion
----------
[WebProfilerBundle] Fix AJAX panel width for long URLs
| 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 | -
When the AJAX url path is very long, the **profile ``<td>``** token value is not fully displayed.
### Before
![before](https://cloud.githubusercontent.com/assets/2028198/20801819/16949c88-b7b8-11e6-9186-c350cb0f6868.png)
### After
![after](https://cloud.githubusercontent.com/assets/2028198/20804230/1519a7ec-b7c0-11e6-8ebe-f2ebfa5ab08e.png)
### Other Possible Solutions
1. Fix ``max-width`` from ``.sf-toolbar-block:hover .sf-toolbar-info`` class to ``512px``. (same result but the AJAX panel is a bit longer)
2. Fix ``max-width`` from ``.sf-toolbar-block:hover .sf-toolbar-info`` class to ``none`` or remove it. It would avoid future issues (mainly with third bundles) with children width greater than ``480px``. (Promising) ?
//cc @javiereguiluz
Commits
-------
b0a8f8e Fixed max width from ajax request url element (td)
This PR was merged into the 2.7 branch.
Discussion
----------
[Finder] Refine phpdoc about argument for NumberComparator
| 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 | -
The most important being the addition of "string" to `Finder::depth()`.
Commits
-------
9b9d339 [Finder] Refine phpdoc about argument for NumberComparator
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] Added GlobalVariables::getToken()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/pull/7191 comments
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7191
I propose this feature as bug fix in 3.2, since I don't use the PHP templating I forgot to add the method in the `FrameworkBundle`, to keep it align with the `TwigBridge` in https://github.com/symfony/symfony/pull/19991.
Is this acceptable or should it go in master?
Commits
-------
099b848 Added GlobalVariables::getToken()
This PR was merged into the 2.7 branch.
Discussion
----------
Write an exception message in a one heading line
| 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 | -
It allows quickly `grep`-ing exception messages in console, for example:
```bash
curl localhost/any-path-which-throws-uncaught-exception | grep '<h1>'
```
But it's impossible to use `grep` filter when exception message goes on the next line after `<h1>` tag.
Commits
-------
21925da Write an exception message in a one heading line
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Improve markdown format
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | not sure?
| 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
This improves the markdown description for a console application. To make the ouput read more friendly and intuitively (less bloated IMHO).
Before:
Markdown files in https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Console/Tests/Fixtures
After:
Markdown files in https://github.com/ro0NL/symfony/tree/console/markdown/src/Symfony/Component/Console/Tests/Fixtures
Commits
-------
302a19d [Console] Improve markdown format
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Include application name/version in JSON descriptions
| 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
To be consistent with other formats.
Commits
-------
a43e040 [Console] Include application name/version in JSON descriptions
This PR was squashed before being merged into the 3.2 branch (closes#20883).
Discussion
----------
Don’t compile when Opcache is not enabled on CLI
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20878
| License | MIT
This should fix#20878 "Zend OPcache seems to be disabled, can't compile file" when Opcache is enabled, but `opcache.enable_cli` is turned off.
Commits
-------
5222643 Don’t compile when Opcache is not enabled on CLI
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Improve UX on not found namespace/command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
This improves the DX/UX when you don't remember what a command is called.. Traditionally you get this message saying "command x is ambiguous (Y, Z or 6 more)" and if the one you are looking for is in the 6 more you are out of luck. You then have to run the console without arg again, get 50 commands displayed, then have to scroll up to find which one it is you meant.
With this patch you get all suggestions always, even with description, so you can make an informed decision right away. See before/after on the screenshot below.
![image](https://cloud.githubusercontent.com/assets/183678/21080350/c3d446ea-bfac-11e6-934b-ba3d7c3dd34d.png)
Commits
-------
aae5fb1 Improve UX on not found namespace/command
This PR was squashed before being merged into the 3.2 branch (closes#20877).
Discussion
----------
DateIntervalType: 'invert' should not inherit the 'required' option
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20876
| License | MIT
| Doc PR | -
As explained in #20876,
> In the DateIntervalType, there is a field, called 'invert', that allows for negative intervals. This is outputted as a checkbox. Which is fine, but it shouldn't be required.
Commits
-------
b1597f1 DateIntervalType: 'invert' should not inherit the 'required' option
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Finder] Deprecate ExceptionInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This interface was missed in https://github.com/symfony/symfony/pull/15805, and should have been removed in 3.0.
Ideally, the component should have such an interface, though, as other components does. But the only domain exception in this component is an `AccessDeniedException` used by the `RecursiveDirectoryIterator`. So it isn't worth it right now.
I think this interface was almost internal actually, but anyway the `\Symfony\Component\Finder\Adapter\AdapterInterface` interface does not exist anymore. So the `ExceptionInterface::getAdapter()` signature cannot be satisfied anyway. I guess anyone relying on this interface in any way should have notice that and removed anything related to Symfony Finder's adapters when upgrading to 3.0.
Should we consider removing it directly in the 3.1 branch instead?
Commits
-------
1b600b0 [Finder] Deprecate ExceptionInterface
This PR was merged into the 3.2 branch.
Discussion
----------
[Form] DateIntervalType: Do not try to translate choices
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
When using choice widgets, the form type should not try to translate each options, otherwise, you'll get something like this:
<img width="150" alt="screenshot 2016-12-12 a 23 37 09" src="https://cloud.githubusercontent.com/assets/2211145/21119721/25411620-c0c4-11e6-9848-95393d1d21c4.PNG">
<img width="1075" alt="screenshot 2016-12-12 a 23 37 23" src="https://cloud.githubusercontent.com/assets/2211145/21119722/2543ccf8-c0c4-11e6-9842-ae84dc895a0b.PNG">
Commits
-------
b6831d2 [Form] DateIntervalType: Do not try to translate choices
This PR was merged into the 3.2 branch.
Discussion
----------
[Yaml] do not trigger deprecations for valid YAML
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19874
| License | MIT
| Doc PR |
Commits
-------
1436349 do not trigger deprecations for valid YAML
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Fix unresolved parameters from default configs in debug:config
| 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 the `debug:config` command, if the dumped configuration is explicitly defined by the user, then parameters are properly resolved in the output. If it is not, and values come from the bundle default configuration directly, they are not.
Steps to reproduce:
- Checkout the symfony demo
- Run `debug:config twig`
- Look at the `debug` key, it is the `kernel.debug` parameter properly resolved: `true`
- Look at the `cache` key, it is not resolved: `'%kernel.cache_dir%/twig'`
This fixes it by resolving the configs once again after processing the configuration.
ping @weaverryan
Commits
-------
26f588a Fix unresolved parameters from default bundle configs in debug:config
This PR was merged into the 3.2 branch.
Discussion
----------
Allow simple-phpunit to be used with an HTTP proxy
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | no
The title pretty much sums it up. I had to use the script behind a proxy and it did not work well so here is a little fix to take the `http_proxy` environment variable into account when downloading with fopen.
I don't think there needs to be a doc PR associated since this feature should be transparent for the end-user.
Commits
-------
921b646 Allow simple-phpunit to be used with an HTTP proxy
This PR was merged into the 3.2 branch.
Discussion
----------
Minor fixes for 3.2
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This only fix minor issues in the codebase introduced in 3.2.
Refs:
- YamlEncoder 9366a7dc77
- File helper: d9a84990cf
- VarDumper ClassStub: 788f7e84b0
- Cache tag based invalidation 19764af74f
- CacheWarmer for Serializer: 810f4694af
- SymfonyStyle simplified test: 85e5060fa1
- Workflow Definition builder: ffaeba39fc
---
There are other issues in older branches, but I guess it's not worth it for them, as it'll only add more conflicts. But for 3.2, it should be feasible.
Commits
-------
7bdfc84 Minor fixes for 3.2
* 3.2:
[Routing] Mention minor BC break about UrlGenerator & query strings
fixed composer.json
fixed composer.json
Skip test when iconv extension is missing
Fix upgrade notes
[Config] fix dev dependencies
Fix bundle commands are not available via find()
This PR was merged into the 2.7 branch.
Discussion
----------
Skip test when iconv extension is missing
| 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
-------
ae7377d Skip test when iconv extension is missing
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Bundle commands are not available via find()
| 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 `Symfony\Bundle\FrameworkBundle\Console\Application::find()` method does not retrieve the bundle commands and only checks the ones that were added manually.
Commits
-------
dd69b88 Fix bundle commands are not available via find()
This PR was merged into the 3.3-dev branch.
Discussion
----------
[SecurityBundle] Rename FirewallContext#getContext()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As pointed out in https://github.com/symfony/symfony/pull/19398#r86254648, the name of this method is misleading.
Because a public service using this class is created for each defined firewall, I suggest to change it to `FirewallContext#getListeners()`, deprecating the current `getContext()` for removing it in 4.0.
Commits
-------
ee66b49 [SecurityBundle] Rename FirewallContext#getContext()
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Do not skip YamlReferenceDumperTest entirely
| 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
The test is now completed in 3.2, but for older branch, any changes in the `YamlReferenceDumper` is not tested on travis and requires to test it manually or comment the `markTestIncomplete` line.
`assertEquals` should still be used on 3.2.
Commits
-------
1ed9335 [Config] Do not skip YamlReferenceDumperTest entirely
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] add dependency on Twig
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20802
| License | MIT
| Doc PR |
Requiring a specific minimum version of the TwigBridge just to be sure
that we end up with the required Twig version does not make much sense
if can simply specify the required version instead (we do in fact depend
on Twig in the WebProfilerBundle).
Commits
-------
91689a7 add dependency on Twig
Requiring a specific minimum version of the TwigBridge just to be sure
that we end up with the required Twig version does not make much sense
if can simply specify the required version instead (we do in fact depend
on Twig in the WebProfilerBundle).
* 3.2:
[WebProfilerBundle] Fix whitespace control in layout.html.twig
[HttpKernel] Fix open_basedir compat in DataCollector
[Validator] Fix init of YamlFileLoader::$classes for empty files
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] Fix whitespace control in layout.html.twig
| 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
-------
d052fa9 [WebProfilerBundle] Fix whitespace control in layout.html.twig
* 3.2: (51 commits)
[FrameworkBundle] [Workflow] Fix service marking store configuration
Fix merge
[Validator] add class name to the cache key
[Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize
Throw less misleading exception when property access not found
[Twig] Fix deprecations with Twig 1.29
[FrameworkBundle] Fix validation cache warmer with failing or missing classes
Fixed typo
[FrameworkBundle] Removed the kernel.debug parameter from the cache pool namespace seed
Fix email address
fix the docblock in regard to the role argument
[Bridge\Twig] Trigger deprecation when using FormExtension::$renderer
Don't use the "app" global variable in the profiler
[VarDumper] fix tests when xdebug is enabled
Fix merge
FIXED NON EXISTING TYPE DECLARATION
[Form] Add failing test for data collector bug
[Cache] Fix dumping SplDoublyLinkedList iter mode
[Form] Fix FormDataCollector
Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles
...
* 3.1: (28 commits)
Fix merge
[Validator] add class name to the cache key
[Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize
Throw less misleading exception when property access not found
[Twig] Fix deprecations with Twig 1.29
Fixed typo
[FrameworkBundle] Removed the kernel.debug parameter from the cache pool namespace seed
Fix email address
fix the docblock in regard to the role argument
Don't use the "app" global variable in the profiler
[VarDumper] fix tests when xdebug is enabled
Fix merge
FIXED NON EXISTING TYPE DECLARATION
[Cache] Fix dumping SplDoublyLinkedList iter mode
[Console] fixed PHP7 Errors when not using Dispatcher
Regression test for missing controller arguments (3.1)
Regression test for missing controller arguments
fix a test checking for a value
[Form][DX] FileType "multiple" fixes
fixed CS
...
This PR was squashed before being merged into the 3.1 branch (closes#20745).
Discussion
----------
[Validator] add class name to the cache key
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20685
| License | MIT
| Doc PR |
Adding the class name to the cache key to avoid collision
Commits
-------
1681fc9 [Validator] add class name to the cache key
This PR was squashed before being merged into the 3.1 branch (closes#20530).
Discussion
----------
[Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | unclear
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I've introduced this method by error in #17113. It has been forgotten during a refactoring. It has always been unused, is not covered by our test suite and has never been documented.
Technically it's a BC break (because this is a protected method), but I think that it's better to remove it has it has never be intended to be used, it's just a miss. An alternative is to deprecate it and remove it in v4.
Commits
-------
fea18aa [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes#19141).
Discussion
----------
Throw less misleading exception when property access not found
Prevent throwing a NoSuchPropertyException with a somewhat misleading message "Neither the property "X" nor one of the methods "addX()"/"removeX()", "setX()", "x()", "__set()" or "__call()" exist and have public access in class when the access cannot be determined, for instance if the doctrine schema is not up to date.
| Q | A |
| --- | --- |
| Branch? | 3.1 for fixes |
| Bug fix? | no |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| License | MIT |
Commits
-------
ec28da4 Throw less misleading exception when property access not found
* 2.8:
[Twig] Fix deprecations with Twig 1.29
Fixed typo
Fix email address
fix the docblock in regard to the role argument
[VarDumper] fix tests when xdebug is enabled
Fix merge
[Cache] Fix dumping SplDoublyLinkedList iter mode
[Console] fixed PHP7 Errors when not using Dispatcher
Regression test for missing controller arguments
fix a test checking for a value
[Form][DX] FileType "multiple" fixes
fixed CS
[TwigBundle] Fix twig loader registered twice
[WebProfilerBundle] Fix dump block is unfairly restrained
[Console] Fix wrong handling of multiline arg/opt descriptions
[DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments.
[Form] fixed "empty_value" option deprecation
Cast result to int before adding to it
This PR was merged into the 2.7 branch.
Discussion
----------
Cast result to int before adding to it
| 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 fixes the occasional warning about non-numeric values when using PHP 7.1.
Commits
-------
70c42f2 Cast result to int before adding to it
This PR was merged into the 3.2 branch.
Discussion
----------
Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | TBD
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
The TwigBundle's `twig.extension.code` service and the DebugBundle's `data_collector.dump` service require the new `debug.file_link_formatter` service however this is only available with the FrameworkBundle or WebProfilerBundle 3.2. The class it refers to was added to the HttpKernel at 3.2 as well. In the case of the TwigBundle, attempting to upgrade a site's dependencies where you try to install `symfony/twig-bundle ~3.2` with `symfony/framework-bundle <3.2` or `symfony/web-profiler-bundle <3.2` causes a `ServiceNotFoundException` with message 'The service "twig" has a dependency on a non-existent service "debug.file_link_formatter".' to be thrown.
Commits
-------
0cd2c58 Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Yaml] Small optimization of the parser
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Very small optimization in the Yaml parser but as it is executed often, there are performance gains (I used [this benchmark](https://gist.github.com/GuilhemN/364c4ddcc8349eaa080054d5f8ef8685); you can see the [comparison master / this PR](https://blackfire.io/profiles/compare/0f4e5497-d410-4c76-83e9-d8fa8e46ce18/graph)).
Commits
-------
5fc8e86 [Yaml] Small optimization of the parser
This PR was merged into the 3.2 branch.
Discussion
----------
[Bridge\Twig] Trigger deprecation when using FormExtension::$renderer
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes (instead of a BC break)
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As spotted in #20710 and https://github.com/sonata-project/SonataAdminBundle/pull/4216.
Note that this simple implementation is fine because neither the class nor its parent have any private/protected properties.
Commits
-------
6f1c59c [Bridge\Twig] Trigger deprecation when using FormExtension::$renderer
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] fix the docblock in regard to the role argument
| 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 |
Makes the docblocks consistent with the `UserInterface` since #17525.
Commits
-------
4e563ae fix the docblock in regard to the role argument
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Support autowiring for EventDispatcher/EventDispatcherInterface
| 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 |
As it is a very common dependency. Currently it gives:
> [Symfony\Component\DependencyInjection\Exception\RuntimeException]
> Unable to autowire argument of type "Symfony\Component\EventDispatcher\EventDispatcherInterface" for the service "dummy". Multiple services exist for this interface (debug.event_dispatcher, debug.event_dispatcher.parent).
After this, the `TraceableEventDispatcher` will be injected in dev and the `ContainerAwareEventDispatcher` in prod, as when injecting `@event_dispatcher` explicitly.
ping @weaverryan
IMHO this could be treated as a an enhancement for the autowiring feature and be part of 3.2.
Commits
-------
5fd4733 Support autowiring for EventDispatcher/EventDispatcherInterface
This PR was merged into the 3.1 branch.
Discussion
----------
Maintain the selected panel when redirecting to another profile
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20637
| License | MIT
| Doc PR | -
Commits
-------
de7b326 Maintain the selected panel when redirecting to another profile
This PR was merged into the 3.3-dev branch.
Discussion
----------
[ClassLoader] Deprecate Apc/WinCache/Xcache class loaders
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
See https://github.com/composer/composer/pull/5559
Commits
-------
fa36e1d [ClassLoader] Deprecate Apc/WinCache/Xcache class loaders
This PR was squashed before being merged into the 3.3-dev branch (closes#20524).
Discussion
----------
[Serializer][XmlEncoder] Allow removing empty tags in generated XML
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20398
| License | MIT
| Doc PR | ~
Allow a new option in $context of XmlEncoder.php to remove empty tags if $context['remove_empty_tags'] setted to true, changing this :
```xml
<node>
<subnode>Value</subnode>
<emptysubnode/>
</node>
```
To this :
```xml
<node>
<subnode>Value</subnode>
</node>
```
Commits
-------
0cb4d8e [Serializer][XmlEncoder] Allow removing empty tags in generated XML
This PR was merged into the 3.2 branch.
Discussion
----------
[Serializer] Fix argument object denormalization
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20670
| License | MIT
| Doc PR | N/A
Fixes#20670. I've seen https://github.com/symfony/symfony/pull/19277#discussion-diff-69389638 so I think it's the right thing to do, but I didn't follow the thread at the time, so I may have missed something.
Ping @theofidry, @dunglas.
Commits
-------
27de65a [Serializer] Fix argument object denormalization
This PR was squashed before being merged into the 2.7 branch (closes#20736).
Discussion
----------
[Console] fixed PHP7 Errors when not using Dispatcher
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17257, #20110, #20111
| License | MIT
| Doc PR | n/a
Original fix, #19813, works only when there is event dispatcher available.
This PR fix the issue also for scenario without event dispatcher.
Closes#20110 issue and #20111 PR connected to it.
Closing #17257 , as everywhere the error is converted to exception and it should be handled
Commits
-------
899fa79 [Console] fixed PHP7 Errors when not using Dispatcher
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Serializer] Throw exception when extra attributes are used during an object denor…
| Q | A |
| --- | --- |
| Branch? | "master" |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #19948 |
| License | MIT |
| Doc PR | [#6975](https://github.com/symfony/symfony-docs/pull/6975) |
I will update the doc if you're ok with this PR.
Commits
-------
565a984 throw exception when extra attributes are used during an object denormalization
* 2.7:
Regression test for missing controller arguments
fix a test checking for a value
[Form][DX] FileType "multiple" fixes
fixed CS
[TwigBundle] Fix twig loader registered twice
[Console] Fix wrong handling of multiline arg/opt descriptions
[DependencyInjection] PhpDumper.php: hasReference() should not search references in lazy service arguments.
[Form] fixed "empty_value" option deprecation
This PR was squashed before being merged into the 2.7 branch (closes#20418).
Discussion
----------
[Form][DX] FileType "multiple" fixes
| 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/issues/12547
| License | MIT
| Doc PR | -
# (1st) Derive "data_class" option from passed "multiple" option
Information
-------------
Following this tutorial ["How to Upload Files"][1] but storing many `brochures` instead of one, i.e.:
```php
// src/AppBundle/Entity/Product.php
class Product
{
/**
* @var string[]
*
* @ORM\Column(type="array")
*/
private $brochures;
//...
}
```
```php
//src/AppBundle/Form/ProductType.php
$builder->add('brochures', FileType::class, array(
'label' => 'Brochures (PDF files)',
'multiple' => true,
));
```
The Problem
--------------
I found a pain point here when the form is loaded again after save some brochures (Exception):
> The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is a(n) array. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) array to an instance of Symfony\Component\HttpFoundation\File\File.
The message is very clear, but counter-intuitive in this case, because the form field (`FileType`) was configured with `multiple = true`, so IMHO it shouldn't expect a `File` instance but an array of them at all events.
The PR's effect
---------------
**Before:**
```php
$form = $this->createFormBuilder($product)
->add('brochures', FileType::class, [
'multiple' => true,
'data_class' => null, // <---- mandatory
])
->getForm();
```
**After:**
```php
$form = $this->createFormBuilder($product)
->add('brochures', FileType::class, [
'multiple' => true,
])
->getForm();
```
# (2nd) Return empty `array()` at submit no file
Information
-------------
Based on the same information before, but adding some constraints:
```php
// src/AppBundle/Entity/Product.php
use Symfony\Component\Validator\Constraints as Assert;
class Product
{
/**
* @var string[]
*
* @ORM\Column(type="array")
*
* @Assert\Count(min="1") // or @Assert\NotBlank()
* @Assert\All({
* @Assert\File(mimeTypes = {"application/pdf", "application/x-pdf"})
* })
*
*/
private $brochures;
}
```
This should require at least one file to be stored.
The Problem
--------------
But, when no file is uploaded at submit the form, it's valid completely. The submitted data for this field was `array(null)` so the constraints pass without any problem:
* `@Assert\Count(min="1")` pass! because contains at least one element (No matter what)
* `@Assert\NotBlank()` it could pass! because no `false` and no `empty()`
* `@Assert\File()` pass! because the element is `null`
Apart from that really we expecting an empty array instead.
The PR's effect
----------------
**Before:**
```php
// src/AppBundle/Entity/Product.php
use Symfony\Component\Validator\Constraints as Assert;
class Product
{
/**
* @var string[]
*
* @ORM\Column(type="array")
*
* @Assert\All({
* @Assert\NotBlank,
* @Assert\File(mimeTypes = {"application/pdf", "application/x-pdf"})
* })
*
*/
private $brochures;
}
```
**After:**
```php
// src/AppBundle/Entity/Product.php
use Symfony\Component\Validator\Constraints as Assert;
class Product
{
/**
* @var string[]
*
* @ORM\Column(type="array")
*
* @Assert\Count(min="1") // or @Assert\NotBlank
* @Assert\All({
* @Assert\File(mimeTypes = {"application/pdf", "application/x-pdf"})
* })
*
*/
private $brochures;
}
```
[1]: http://symfony.com/doc/current/controller/upload_file.html
Commits
-------
36b7ba6 [Form][DX] FileType "multiple" fixes
This PR was squashed before being merged into the 3.3-dev branch (closes#18952).
Discussion
----------
[Security] Add a JSON authentication listener
| 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#7081 |
Add a new authentication listener allowing to login by sending a JSON document like:
`{"_username": "dunglas", "_password": "foo"}`.
It is similar to the traditional form login (but take a JSON document as entry) and is convenient for APIs, especially used in combination with JWT.
See https://github.com/api-platform/core/issues/563 and https://github.com/lexik/LexikJWTAuthenticationBundle/issues/123#issuecomment-173860682 for previous discussions.
- [x] Add functional tests in security bundle
Commits
-------
02178bc [Security] Add a JSON authentication listener
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] fixed "empty_value" option deprecation
| Q | A
| ------------- | ---
| Branch? | 2.x only
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/15945#r86547326
| License | MIT
| Doc PR | ~
I didn't make any profiling but a resolver instance is passed to `configureOptions()` creating locale variables including those exceptions for each field using one of the patched form types, so I guess the memory usage can grow really fast.
Commits
-------
7e84907 [Form] fixed "empty_value" option deprecation
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DomCrawler] Add support for formaction and formmethod attributes
| 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
This adds supports for the ``formaction`` and ``formmethod`` of submit elements, which override the values defined on the ``<form>`` element.
This works only when you call ``$crawler->form()`` on a Crawler containing a button, not when it contains the ``<form>`` itself of course (as the button override is applied only when using this button to submit, not when using another way).
Other button-level overrides are not implemented:
- ``formtarget`` is useless as we don't implement ``target`` either (the Crawler does not deal with frame-based pages anyway)
- ``formnovalidate`` is ignored, as we don't automatically disable the form validation on ``novalidate`` either, but we require an explicit disabling instead (this might be subject to a separate PR though, as it could make sense)
- ``formenctype`` is ignored as we also ignore ``enctype`` (we always submit file fields, even when missing the proper enctype)
Commits
-------
717cf8a [DomCrawler] Add support for formaction and formmethod attributes
This PR was squashed before being merged into the 3.3-dev branch (closes#20509).
Discussion
----------
[Serializer] Allow to specify a single value in @Groups
| 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/19374#issuecomment-256688002
| License | MIT
| Doc PR | todo
Tiny DX improvement:
Before:
```php
use Symfony\Component\Serializer\Annotation\Groups;
class Product
{
/**
* @Groups({"admins"})
*/
public $itemsSold;
}
```
Now allowed:
```php
use Symfony\Component\Serializer\Annotation\Groups;
class Product
{
/**
* @Groups("admins")
*/
public $itemsSold;
}
```
Commits
-------
926aa48 [Serializer] Allow to specify a single value in @Groups
This PR was merged into the 3.2 branch.
Discussion
----------
[Form] Remove unused var cloner property
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Not used anymore after https://github.com/symfony/symfony/pull/19986
EDIT: add missing `use` too.
Commits
-------
0708003 [Form] Remove unused var cloner property
This PR was merged into the 2.8 branch.
Discussion
----------
[WebProfilerBundle] Fix dump block is unfairly restrained
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
The `display: table-row` rule does not suit well for such blocks and prevent from containing them properly in the parent container (thus the reason why the width was set to `200px` I guess).
### Before
<img width="539" alt="screenshot 2016-12-01 a 20 21 49" src="https://cloud.githubusercontent.com/assets/2211145/20808878/8af6faa2-b804-11e6-8656-8ebd710b4acb.PNG">
### After
<img width="524" alt="screenshot 2016-12-01 a 20 21 14" src="https://cloud.githubusercontent.com/assets/2211145/20808885/9106b0cc-b804-11e6-9ddc-0cc09a546274.PNG">
(max width is still fixed to `480px` by `.sf-toolbar-block:hover .sf-toolbar-info`)
Commits
-------
997beb2 [WebProfilerBundle] Fix dump block is unfairly restrained
This PR was merged into the 3.2 branch.
Discussion
----------
[Validator] Bring egulias/email-validator ~2.0 to parity with ~1.2
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | could be ?
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When using egulias/email-validator ~1.2, we make a strict check of the email, which means that emails with RFC warnings will fail validation.
Currently with egulias/email-validator ~2.0, emails with warnings are considerate valids.
This pull request make EmailValidator with egulias/email-validator ~2.0 behave as with egulias/email-validator ~1.2.
Commits
-------
01b2f66 Switch to NoRFCWarningsValidation
* 3.2:
[Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
[VarDumper] Use default color for ellipsed namespaces/paths
mark alias as private during creation
[Serializer] Remove unused GetSetMethodNormalizer::denormalize
* 3.1:
[Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
mark alias as private during creation
[Serializer] Remove unused GetSetMethodNormalizer::denormalize
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] ConfigCache::isFresh() should return false when unserialize() fails
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20654
| License | MIT
| Doc PR | -
Removes some `Warning: Class __PHP_Incomplete_Class has no unserializer` failures when clearing the cache.
Commits
-------
609245e [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
This PR was merged into the 3.2 branch.
Discussion
----------
[VarDumper] Use default color for ellipsed namespaces/paths
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20669
| License | MIT
| Doc PR | -
Eases readability by helping the eye to focus more quickly on the class name and less on its namespace.
And let' disable ellipses on the profiler panels, fixing #20669 meanwhile.
![capture du 2016-11-29 11-00-00](https://cloud.githubusercontent.com/assets/243674/20705475/5d512c9a-b623-11e6-881d-04ae58453824.png)
Commits
-------
ebc23cf [VarDumper] Use default color for ellipsed namespaces/paths
* 3.2:
[ClassLoader] Use only forward slashes in generated class map
[VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector
ensure the proper context for nested validations
bug #20653 [WebProfilerBundle] Profiler includes ghost panels
Fixed getRouteParams() when no parameters are available
bumped Symfony version to 3.2.0
updated VERSION for 3.2.0-RC2
updated CHANGELOG for 3.2.0-RC2
* 2.8:
[ClassLoader] Use only forward slashes in generated class map
ensure the proper context for nested validations
bug #20653 [WebProfilerBundle] Profiler includes ghost panels
* 2.8:
[ClassLoader] Use only forward slashes in generated class map
ensure the proper context for nested validations
bug #20653 [WebProfilerBundle] Profiler includes ghost panels
* 2.7:
[ClassLoader] Use only forward slashes in generated class map
ensure the proper context for nested validations
bug #20653 [WebProfilerBundle] Profiler includes ghost panels
This PR was merged into the 3.1 branch.
Discussion
----------
[FrameworkBundle] mark alias as private during creation
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20577#discussion_r89133711
| License | MIT
| Doc PR | n/a
Commits
-------
828c761 mark alias as private during creation
* 3.2:
Fix tests that do not trigger any depreciation
[HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
[Cache] Mark FilesystemAdapterTrait as internal
[FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Don't rely on any parent definition for "cache.annotations"
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Instead of a generic approach that failed in #20537, let's focus on the `cache.annotations` service, which is the one that needs special care because it can be required while the container is being built. See e.g.:
- #20234
- http://stackoverflow.com/questions/39625863/vichuploadbundle-inb-symfony-3-cant-load-cache-annotations-service/40626277
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/262
When the service is required at build time, we can't provide it a logger, because no logger service is ready at that time. Still, that doesn't prevent the service from working. The late `CachePoolClearerPass` wires the logger for later instantiations so that `cache.annotations` has a properly configured logger *for the next requests*.
Commits
-------
f62b820 [FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
This PR was merged into the 3.2 branch.
Discussion
----------
Fix legacy tests that do not trigger any depreciation
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes `implode(): Invalid arguments passed` error when a `@legacy` test with `@expectedDeprecation` does not actually trigger any deprecation.
Commits
-------
9287b52 Fix tests that do not trigger any depreciation
* 3.2:
[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
[FrameworkBundle] Improve performance of ControllerNameParser
Update documentation link to the component
[HttpFoundation] Add links to RFC-7231
[DI] Initialize properties before method calls
[Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
Tag missing internals
Add missing example for 'path' argument in debug:config
[WebProfilerBundle] Dont use request attributes in RouterController
Fix complete config tests
* 3.1:
[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
[FrameworkBundle] Improve performance of ControllerNameParser
Update documentation link to the component
[HttpFoundation] Add links to RFC-7231
[DI] Initialize properties before method calls
Tag missing internals
[WebProfilerBundle] Dont use request attributes in RouterController
Fix complete config tests
* 2.8:
[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
[FrameworkBundle] Improve performance of ControllerNameParser
Update documentation link to the component
[HttpFoundation] Add links to RFC-7231
[DI] Initialize properties before method calls
Tag missing internals
[WebProfilerBundle] Dont use request attributes in RouterController
Fix complete config tests
* 2.7:
[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
[FrameworkBundle] Improve performance of ControllerNameParser
Update documentation link to the component
[HttpFoundation] Add links to RFC-7231
[DI] Initialize properties before method calls
Tag missing internals
[WebProfilerBundle] Dont use request attributes in RouterController
Fix complete config tests
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Improve performance of ControllerNameParser
| 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 |
Today I was searching for bottlenecks in my application using Blackfire. And among other things I found one in Symfony. Blackfire showed that `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser::findAlternative()` was called almost 300 times which took 28 miliseconds.
It turns out that `Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader::load()` is calling `ControllerNameParser::parse()` without actually needing to do so because `$controller` is in the class::method notation already. `ControllerNameParser` threw an exception, DelegatingLoader caught and ignored it - that's ok. The problem is that generating the exception message took a lot of time because findAlternative is slow. In my case it called the levenshtein function over 5000 times which was completely useless because the exception is ignored anyway.
Commits
-------
cf333f3 [FrameworkBundle] Improve performance of ControllerNameParser
This PR was squashed before being merged into the 2.7 branch (closes#20474).
Discussion
----------
[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern 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 | https://github.com/symfony/symfony-docs/pull/7139
This is a follow up PR to https://github.com/symfony/symfony/pull/20327.
I also decided to improve the current `is_numeric()` check that is done by a truer one. The current limitation is that a PCRE subpattern name must not start with a digit which is different.
Commits
-------
73fbd08 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
This PR was merged into the 2.7 branch.
Discussion
----------
[SecurityBundle] Fix complete config tests
| 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 | -
Fixes a little bug in `*CompleteConfigurationTest`: if a test fails for one format, subsequent tests for other formats will also fail. This is because subsequent tests actually use the container built from the very first tested config, which is PHP if all tests are ran.
This can be reproduced by changing a value in the PHP config fixtures. `PhpCompleteConfigurationTest` will fail as expected but `XmlCompleteConfigurationTest` and `YamlCompleteConfigurationTest` will fail too, which is not expected.
Commits
-------
b25c1d3 Fix complete config tests
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] Dont use request attributes in RouterController
| 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 spotted in #20621, it makes little sense to use request attributes here, and if it were to have, the current code is broken because the returned values here have already been processed by ValueExporter in RequestDataCollector.
Commits
-------
962325a [WebProfilerBundle] Dont use request attributes in RouterController
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Add links to RFC-7231
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
ping @xabbuh
Commits
-------
c17a85b [HttpFoundation] Add links to RFC-7231
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Add missing example for 'path' argument in debug:config
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The argument has been introduced in #18940 .
Commits
-------
c6b7aeb Add missing example for 'path' argument in debug:config
This PR was merged into the 2.7 branch.
Discussion
----------
Tag missing internals
| 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
Commits
-------
97e94b4 Tag missing internals
This PR was merged into the 3.2 branch.
Discussion
----------
[Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Exactly the same issue as in #20610, but for Doctrine ORM's cache:
> That's a design issue: using root_dir as discriminant doesn't work with blue/green deployment strategies, and doesn't prevent collision when different apps are deployed in the same path while sharing the same cache backend.
Commits
-------
5e3cbec [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
This PR was squashed before being merged into the 2.7 branch (closes#20566).
Discussion
----------
[DI] Initialize properties before method calls
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes-ish
| New feature? | no
| BC breaks? | not sure
| Deprecations? | no
| Tests pass? | not yet (only dumps seem to fail)
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
Given
```yml
services:
handler:
class: AppBundle\Handler
properties:
debug: '%kernel.debug%'
calls:
- [handle]
```
I totally expected `Handler::$debug` to be set before `Handler::handle` is called. It was not.. and it's really annoying :)
Commits
-------
0af433b [DI] Initialize properties before method calls
* 3.2:
Fix merge
[DI] Fixed custom services definition BC break introduced in ec7e70fb…
[HttpKernel] Deprecate checking for cacheable HTTP methods in Request::isMethodSafe()
[Process] Fix kill process on reached timeout using getIterator()
[DI] Aliases should preserve the aliased invalid behavior
* 3.1:
[DI] Fixed custom services definition BC break introduced in ec7e70fb…
[Process] Fix kill process on reached timeout using getIterator()
[DI] Aliases should preserve the aliased invalid behavior
This PR was squashed before being merged into the 2.7 branch (closes#20609).
Discussion
----------
[DI] Fixed custom services definition BC break introduced in ec7e70fb…
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no, fixes previous BC
| Deprecations? | no
| Tests pass? | yes (verified on Win only)
| Fixed tickets | #20608
| License | MIT
| Doc PR | -
Commits
-------
7a5e11e [DI] Fixed custom services definition BC break introduced in ec7e70fb…
This PR was merged into the 3.1 branch.
Discussion
----------
[Process] Fix process continuing after reached timeout using getIterator()
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20594
| License | MIT
| Doc PR | n/a
Commits
-------
10992cd [Process] Fix kill process on reached timeout using getIterator()
This PR was merged into the 3.2 branch.
Discussion
----------
[HttpKernel] Deprecate checking for cacheable HTTP methods in Request::isMethodSafe()
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Late deprecation for 3.2, see #20602.
Commits
-------
34e7b95 [HttpKernel] Deprecate checking for cacheable HTTP methods in Request::isMethodSafe()
* 3.2: (24 commits)
[Filesystem] Remove extra argv in dumpFile() tests
[DI] minor FileLoaders tests update
[FrameworkBundle] Add framework.cache.prefix_seed for predictible cache key prefixes
[SecurityBundle] Remove FirewallContext mandatory FirewallConfig argument deprecation
[HttpKernel] Revert BC breaking change of Request::isMethodSafe()
[DI] Allow null as default env value
[WebProfilerBundle] Fix deprecated uses of profiler_dump
[SecurityBundle] Fix FirewallConfig nullable arguments
[FrameworkBundle] Avoid warming up the validator cache for non-existent classes
[DOMCrawler] Bug fixed
[FrameworkBundle] Mark cache.default_*_provider services private
[Process] Do feat test before enabling TTY mode
bumped Symfony version to 3.1.8
updated VERSION for 3.1.7
updated CHANGELOG for 3.1.7
bumped Symfony version to 2.8.15
updated VERSION for 2.8.14
updated CHANGELOG for 2.8.14
bumped Symfony version to 2.7.22
updated VERSION for 2.7.21
...
* 3.1:
[Filesystem] Remove extra argv in dumpFile() tests
[DI] minor FileLoaders tests update
[HttpKernel] Revert BC breaking change of Request::isMethodSafe()
[DOMCrawler] Bug fixed
[FrameworkBundle] Mark cache.default_*_provider services private
[Process] Do feat test before enabling TTY mode
bumped Symfony version to 3.1.8
updated VERSION for 3.1.7
updated CHANGELOG for 3.1.7
bumped Symfony version to 2.8.15
updated VERSION for 2.8.14
updated CHANGELOG for 2.8.14
bumped Symfony version to 2.7.22
updated VERSION for 2.7.21
update CONTRIBUTORS for 2.7.21
updated CHANGELOG for 2.7.21
Fix annotation type for $context
[Doctrine][Form] support large integers
* 2.8:
[DI] minor FileLoaders tests update
[HttpKernel] Revert BC breaking change of Request::isMethodSafe()
[DOMCrawler] Bug fixed
[Process] Do feat test before enabling TTY mode
bumped Symfony version to 2.8.15
updated VERSION for 2.8.14
updated CHANGELOG for 2.8.14
bumped Symfony version to 2.7.22
updated VERSION for 2.7.21
update CONTRIBUTORS for 2.7.21
updated CHANGELOG for 2.7.21
Fix annotation type for $context
[Doctrine][Form] support large integers
* 2.7:
[DI] minor FileLoaders tests update
[HttpKernel] Revert BC breaking change of Request::isMethodSafe()
[DOMCrawler] Bug fixed
[Process] Do feat test before enabling TTY mode
bumped Symfony version to 2.7.22
updated VERSION for 2.7.21
update CONTRIBUTORS for 2.7.21
updated CHANGELOG for 2.7.21
[Doctrine][Form] support large integers
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Revert BC breaking change of Request::isMethodSafe()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes (reverting a previous BC break)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20562
| License | MIT
| Doc PR | -
As spotted in #20562, we should not have broken a minor version. Instead, we should have deprecated the bad behavior. This is done in #20603.
Commits
-------
0c3b7d7 [HttpKernel] Revert BC breaking change of Request::isMethodSafe()
This PR was merged into the 3.2 branch.
Discussion
----------
[FrameworkBundle] Add framework.cache.prefix_seed for predictible cache key prefixes
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
That's a design issue: using root_dir as discriminant doesn't work with blue/green deployment strategies, and doesn't prevent collision when different apps are deployed in the same path while sharing the same cache backend.
Commits
-------
82952bd [FrameworkBundle] Add framework.cache.prefix_seed for predictible cache key prefixes
This PR was merged into the 3.2 branch.
Discussion
----------
[WebProfilerBundle] Fix deprecated uses of profiler_dump
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Replaces #20571 that made me realize that we completely missed updating the "Request / Response" panel that is current triggering a bunch of deprecation notices about profiler_dump. Yet, these notices triggered by the profiler are not displayed anywhere (what, we don't have a profiler for the profiler? :) ). And we missed them.
Commits
-------
b4c327d [WebProfilerBundle] Fix deprecated uses of profiler_dump
This PR was merged into the 2.7 branch.
Discussion
----------
[Doctrine][Form] support large integers
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15642
| License | MIT
| Doc PR | n/a
Commits
-------
6954a07 [Doctrine][Form] support large integers
This PR was merged into the 2.8 branch.
Discussion
----------
Fix annotation type for $context
| 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 | -
Previous type ExecutionContextInterface was referring to a non declared namespace. Replacing it by ExecutionContextInterface2Dot5 fixes autocomplete.
Commits
-------
55e134c Fix annotation type for $context
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] Do feat test before enabling TTY mode
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20565
| License | MIT
| Doc PR | -
Commits
-------
69bfbbf [Process] Do feat test before enabling TTY mode
This PR was merged into the 3.1 branch.
Discussion
----------
[FrameworkBundle] Mark cache.default_*_provider services private
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20563
| License | MIT
| Doc PR | -
I know making a service private has a potential for breaking BC. Yet, these services should not be used directly in controllers/userland code, and I really doubt anyone did. Let's make it private now and fix linked issue (even if it's a false positive from SymfonyServiceDefinitionValidator, it shows we have this service that really isn't meant to be public).
Commits
-------
09adfda [FrameworkBundle] Mark cache.default_*_provider services private
* 3.1:
[YAML] Fix processing timestamp with timezone
[ci] Testing with UTC hides bugs
[DI] Fix error when trying to resolve a DefinitionDecorator
[DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider
Fix time-sensitive tests that use data providers
[Validator] improve and added more Indonesian translation.
This PR was merged into the 3.1 branch.
Discussion
----------
[YAML] Fix processing timestamp strings with timezone
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20399
| License | MIT
| Doc PR | -
Parse date strings containing timezone data correctly
Default date strings not containing timezone data to UTC
Commits
-------
cdb11a7 [YAML] Fix processing timestamp with timezone
* 2.8:
[ci] Testing with UTC hides bugs
[DI] Fix error when trying to resolve a DefinitionDecorator
[DoctrineBridge] Fix deprecation message/documentation of implementing UserProviderInterface using the entity provider
[Validator] improve and added more Indonesian translation.
* 2.7:
[ci] Testing with UTC hides bugs
[DI] Fix error when trying to resolve a DefinitionDecorator
[Validator] improve and added more Indonesian translation.
This PR was merged into the 2.7 branch.
Discussion
----------
[ci] Testing with UTC hides bugs
| 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 | -
As shown by #20550, we're having bugs because we don't in proper TZ conditions.
Let's do Europe on Travis, and America on Windows.
Commits
-------
e0f9bda [ci] Testing with UTC hides bugs
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] Fix error when trying to resolve a DefinitionDecorator
| 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 | -
Instead of the currently obscure `ReflectionException: Class does not exist` message, let's throw a useful error message.
Commits
-------
8e0da2f [DI] Fix error when trying to resolve a DefinitionDecorator
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] improve and added more Indonesian translation.
| 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
- Improve some translation's grammar.
- Added translation unit no. 73 - 80.
Commits
-------
af9016f [Validator] improve and added more Indonesian translation.
This PR was merged into the 2.8 branch.
Discussion
----------
[PhpUnitBridge] Fix time-sensitive tests that use data providers
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When a test uses a data provider, the `@group time-sensitive` annotation does not work if it is set on the method because the test name includes the data provider name by default. This was fixed in master by c344203 but not in 2.8, 3.0 and 3.1.
Commits
-------
f376cde Fix time-sensitive tests that use data providers
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DI] Revert "deprecate get() for uncompiled container builders"
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18728
| License | MIT
| Doc PR | -
ping @xabbuh
This reverts commit 27f4680294, reversing
changes made to e4177a0744.
While upgrading a few projects to 3.2, I found it impossible to remove this deprecation without duplicating "by hand" the instantiation logic of some service needed in a compiler pass.
See https://github.com/dustin10/VichUploaderBundle/blob/master/DependencyInjection/Compiler/RegisterPropelModelsPass.php#L30 for such an example into the wild.
I think we should revert this deprecation. Using the container builder before it is compiled is tricky. Yet, bootstrapping in general is tricky and full of chicken-and-egg issues. In this case, using some services while bootstrapping the container works well. Deprecating would be fine if we were to provide some viable alternative. Duplicating the instantiation logic doesn't qualify as such to me, hence the proposed revert.
@xabbuh, if you'd like to keep some test cases that may be unrelated to the revert, please add comments on the PR, or better: push on my fork, branch revert-get-deprec.
Commits
-------
e449af0 Revert "feature #18728 deprecate get() for uncompiled container builders (xabbuh)"
* 3.1:
[Debug] Remove GLOBALS from exception context to avoid endless recursion
[Serializer] Improve test coverage of the MaxDepth annotation
DX: replace @link with @see annotation
bumped min version of Twig to 1.28
This PR was merged into the 2.7 branch.
Discussion
----------
bumped min version of Twig to 1.28
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see twigphp/Twig#2236
| License | MIT
| Doc PR | n/a
Commits
-------
b8f7614 bumped min version of Twig to 1.28
This PR was merged into the 3.2-dev branch.
Discussion
----------
Added XML support for Workflow configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | symfony/symfony-docs#6871
Commits
-------
94a7e7e [Workflow] streamline XML schema definition
6381caa Added XML support for Workflow configuration
This PR was merged into the 3.1 branch.
Discussion
----------
[Serializer] Improve test coverage of the MaxDepth annotation
| 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
-------
5311696 [Serializer] Improve test coverage of the MaxDepth annotation
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Remove GLOBALS from exception context to avoid endless recursion
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This fixes a endless recursion as seen in https://github.com/felixfbecker/php-language-server/pull/137 - it only happens if you trigger an error in the global context so it's kinda hard to write a test for, but hopefully the fix can be accepted.
Commits
-------
1bb95ac [Debug] Remove GLOBALS from exception context to avoid endless recursion
This PR was squashed before being merged into the 3.2-dev branch (closes#20492).
Discussion
----------
[Workflow] Clarify validator API + fixed unknown "scalar" marking store
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | yes
| New feature? | no
| BC breaks? | no, if merged in 3.2
| 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
See also https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ValidateWorkflowsPass.php#L48
Commits
-------
a9cb38b [Workflow] Clarify validator API + fixed unknown "scalar" marking store
* 3.1:
[TwigBridge] fix tests
Tag the FormFieldRegistry as being internal
[Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
[FrameworkBundle] Register the ArrayDenormalizer
[Serializer] Fix DataUriNormalizer's regex
[Validator] Added missing swedish translation
[TranslationDebug] workaround for getFallbackLocales.
[Translation] fixed nested fallback catalogue using multiple locales.
fixed phpdoc
[Command] Fixed method comments as phpDoc syntax
Added single quotes for upgrade guides.
* 2.8:
[TwigBridge] fix tests
Tag the FormFieldRegistry as being internal
[Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
[Validator] Added missing swedish translation
[TranslationDebug] workaround for getFallbackLocales.
[Translation] fixed nested fallback catalogue using multiple locales.
fixed phpdoc
[Command] Fixed method comments as phpDoc syntax
Added single quotes for upgrade guides.
* 2.7:
[TwigBridge] fix tests
Tag the FormFieldRegistry as being internal
[Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
[Validator] Added missing swedish translation
[TranslationDebug] workaround for getFallbackLocales.
[Translation] fixed nested fallback catalogue using multiple locales.
fixed phpdoc
[Command] Fixed method comments as phpDoc syntax
This PR was merged into the 2.7 branch.
Discussion
----------
Tag the FormFieldRegistry as being internal
| 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
The phpdoc already describes it as being internal (since it was introduced). This adds the proper tag to mark it as internal in our standard way.
Commits
-------
0801f97 Tag the FormFieldRegistry as being internal
This PR was squashed before being merged into the 2.7 branch (closes#20307).
Discussion
----------
[Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
| Q | A |
| --- | --- |
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | 20304 |
| License | MIT |
| Doc PR | |
Fix: When using a form with an Time type with option 'widget' => 'single_text', and 0 is selected in the seconds, we obtain an TransformationFailedException "Unable to reverse value for property path "[time]": Data missing". Check ticket #20304
Commits
-------
bcb03e0 [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] Add --no-prefix option to translation:update
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/20044
| License | MIT
| Doc PR | n/a
This adds an option `--no-prefix` to the `translation:update` command, allowing to use an empty string as prefix. I guess it should be treated as a feature as it adds a new option to the command, but it indeed fixes the bug reported in #20044 (yeah, really this time).
Commits
-------
b5a1584 [FrameworkBundle] Add --no-prefix option to translation:update
This PR was squashed before being merged into the 3.1 branch (closes#20480).
Discussion
----------
[FrameworkBundle] Register the ArrayDenormalizer
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Registers the `ArrayDenormalizer` class in FrameworkBundle.
**Why it's a bug fix?**
Because since 3.1, most normalizers are able to deserialize complex types (e.g.: an object embedded in an object). They use the `Class\Name[]` notation to handle collections.
However, this only works when the `ArrayDenormalizer` has been registered (it is responsible of handling the `[]` notation).
We do it manually in unit tests, but `ArrayDenormalizer` has never been integrated in FrameworkBundle.
See the test case for further details.
Commits
-------
2eedafc [FrameworkBundle] Register the ArrayDenormalizer
This PR was squashed before being merged into the 3.2-dev branch (closes#20478).
Discussion
----------
[Workflow] Removed definition builder
| 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
As of @xabbuh comment in https://github.com/symfony/symfony/pull/20451#discussion_r87398660
We do not really need the definition builder here.
Commits
-------
caa3d6f [Workflow] Removed definition builder
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Workflow] Removed private Definition::addPlaces
| 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
There is no need for this method
Commits
-------
c546857 Removed private Definition::addPlaces
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Workflow] Set the marking then announce enabled transition
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
It allows to auto-apply some transition from a listener. If we don't do that, the marking is not updated in the listener yet, so the transition is not really enabled.
The feature was asked on [twitter](https://twitter.com/gaetanbuellet/status/796387741420441600)
And It has been implemented (userland) [here](9fda92a705)
Commits
-------
51dad72 [Workflow] Set the marking then announce enabled transition
This PR was merged into the 2.7 branch.
Discussion
----------
[YAML] PHPDoc fixes for inline parser/dumper
| Q | A
| ------------- | ---
| Branch? | "master"
| 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
-------
dd47295 fixed phpdoc
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DI] Force env params to be string|null
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
93c25f8 [DI] Force env params to be string|null
* 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 merged into the 2.7 branch.
Discussion
----------
Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
| 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/20184#discussion_r85265689
| License | MIT
| Doc PR | n/a
This reverts commit 3f650f8 because the fix is not valid.
It is actually not possible to have an option with value optional given empty to be `empty` if this one has a default value. The default value will always be the one returned, see https://github.com/symfony/symfony/pull/20184#discussion_r85265689 for details.
Commits
-------
b2fa7c4 Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
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 3.1 branch.
Discussion
----------
Properly format value in UniqueEntityValidator
| Q | A |
| --- | --- |
| Branch? | 3.1 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | / |
| License | MIT |
This PR fixes a small issue introduced in #15279. Having an array in a field considered for a unique check causes an array to string conversion error in the translator. This can be avoided by formatting the value parameter with `formatValue`.
Commits
-------
9043a55 Properly format value in UniqueEntityValidator
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 3.2-dev branch.
Discussion
----------
[Bridge\Monolog][FrameworkBundle] Add & wire a DebugProcessor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #20370
| License | MIT
| Doc PR | -
As identified in #20370, collecting the log records for the profiler should happen before any processor.
The only way to do so is by registering a processor to do exactly that.
Since the last added processor is called first, this one is wired in a compiler pass that is called after other processors are registered.
The DebugHandler class being now useless, it is deprecated.
If this approach is accepted, I'll send a PR on monolog bundle & silex to leverage it.
Commits
-------
7572a53 [Bridge\Monolog][FrameworkBundle] Add & wire a DebugProcessor
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 squashed before being merged into the 3.2-dev branch (closes#20405).
Discussion
----------
[SecurityBundle] Display firewall in debug bar even if not authenticated
| Q | A
| ------------- | ---
| Branch? | master
| Tests pass? | yes
| License | MIT
Before:
![before](http://image.prntscr.com/image/897d1f2b43d64c5a8e15a95bf927a01c.png)
After:
![after](http://image.prntscr.com/image/4491a3aea6fe44dd8ca24a2b25a37596.png)
I will take any input to improve the result, I feel it not optimal.
Commits
-------
d81da79 [SecurityBundle] Display firewall in debug bar even if not authenticated
This PR was merged into the 3.2-dev branch.
Discussion
----------
[SecurityBundle] Make the FirewallConfig class final
| 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
I suggest to make the `FirewallConfig` class final. This value object is only built by the `SecurityExtension` from the `SecurityBundle` and is not meant to be an extension point.
ping @chalasr
Commits
-------
5963627 [SecurityBundle] Make the FirewallConfig class final
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
----------
[DX][SecurityBundle] Introduce a FirewallConfig class accessible from FirewallContext
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | yes but it should not have any impact in userland |
| Tests pass? | yes |
| Fixed tickets | #15294 |
| License | MIT |
| Doc PR | todo |
With this, the `FirewallContext` class now has a `getConfig()` method returning a `FirewallConfig` object representing the firewall configuration.
Also this adds a `getContext()` method to the `FirewallMap` class of the `SecurityBundle`, to be able to retrieve the current context.
In a next time, this could be useful to display some firewall related informations to the Profiler, as pointed out in #15294.
Also, it can be useful to be able to access the current firewall configuration from an AuthenticationListener, especially for third party bundles (I can develop on demand).
Commits
-------
52d25ed Introduce a FirewallConfig class
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
This PR was merged into the 3.2-dev branch.
Discussion
----------
Don't trim long strings in the profiler logs
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20371
| License | MIT
| Doc PR | -
Commits
-------
7a17080 Don't trim long strings in the profiler logs
This PR was merged into the 3.1 branch.
Discussion
----------
[DoctrineBridge] Remove dead code in DoctrineType
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no (Only the last arguments of a method may be removed [[3]](http://symfony.com/doc/current/contributing/code/bc.html#id13) )
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
After optimization of DoctrineChoiceLoader (86b2ff112d in https://github.com/symfony/symfony/pull/18359) this code died :)
Commits
-------
9b49723 remove dead code
* 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 2.7 branch.
Discussion
----------
Enhance GAE compat by removing some realpath()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20241
| License | MIT
| Doc PR | -
The remaining ones are in test folders, or in things that don't run/have to run on GAE directly (e.g. commands).
Commits
-------
f2f232d Enhance GAE compat by removing some realpath()
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
This PR was merged into the 3.2-dev branch.
Discussion
----------
[TwigBundle] made Twig cache independent of the project root directory
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (except if people configured relative paths instead of absolute ones, but this was not supported in earlier versions of Twig)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
This makes Twig cache keys independent of the project root directory, thanks to Twig 1.27.
It cannot be merged in 2.7 as a bug fix as people might have used relative paths for some Twig paths (no officially supported by Twig anyway), which would have resolved to `getcwd()` before, but will now be interpreted as being relative to `%kernel.root_dir%` now.
Commits
-------
dc38af3 [TwigBundle] made Twig cache independent of the project root directory
* 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 2.7 branch.
Discussion
----------
[TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
| 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
Commits
-------
bb791d0 [TwigBridge] Use non-deprecated Twig_Node::getTemplateLine()
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
This PR was merged into the 3.2-dev branch.
Discussion
----------
[DoctrineBridge] Add a way to select the repository used by the UniqueEntity validator
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12573, #4087, #12977
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7057
This is a cherry pick of #12977 on ~~2.8~~ 3.2 branch, as it is clearly a new feature, even if it was primary introduced in order to fix an inappropriate behavior that might be considered as a bug.
Commits
-------
00d5459 [Doctrine] [Bridge] Add a way to select the repository used by the UniqueEntity validator
- 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
----------
[SecurityBundle] Cache contexts per request in FirewallMap
| 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/19819#r77274093
| License | MIT
| Doc PR | n/a
From @HeahDude in https://github.com/symfony/symfony/pull/19819#r77274093, I propose to store and retrieve `Context` objects per `Request` using `SplObjectStorage`.
At the moment, contexts are consumed by the `Symfony\Components\Security\Http\Firewall` class only, but they could be indirectly by end users if #19490 and/or #19819 come to be merged.
Commits
-------
ffacec1 [SecurityBundle] Cache contexts per request in FirewallMap
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Convert null prefix to an empty string in translation:update
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20044
| License | MIT
| Doc PR | n/a
This command needs the ability to use an empty string as prefix, which is not possible using `bin/console translation:update --prefix=""` because `$argv` doesn't parse empty strings thus the value is converted to `null` by `ArgvInput` (only since #19946, before the option was not considered to be set, giving the default `'__'` thus this should be fine from a BC pov).
Here I propose to explicitly convert the `prefix` value to an empty string if set to `null`, as it is a very specific need and we can't guess that from `ArgvInput`.
An other way to fix it could be to add a `--no-prefix` option to the command but I don't think it is worth it, and it couldn't be treated as a bug fix thus not fixed before `3.2`.
Commits
-------
f02b687 [FrameworkBundle] Convert null prefix to an empty string in translation:update command
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
The new option expects an entity path, in order to select its repository.
This allows to properly use the UniqueEntity constraint on hierarchical (inheritance) entities, using the root class repository in order to check the uniqueness, and not just the child repository.
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
This PR was squashed before being merged into the 3.2-dev branch (closes#19576).
Discussion
----------
[WebProfiler] added support for window.fetch calls in ajax section
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17444
| License | MIT
| Doc PR | reference to the documentation PR, if any
This adds support for window.fetch calls to the Ajax section of the WebProfiler toolbar.
Credits to @tbopec for implementation :)
Commits
-------
b1b4d70 [WebProfiler] added support for window.fetch calls in ajax section
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
----------
[TwigBridge] Added access to token from twig AppVariable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | TODO
In Symfony 2.x we could access the token from `app.security` but now we can only get the user even if it comes from the token storage.
This makes mandatory to create a custom twig extension to access it and thus harder to update to symfony 3.x when you need this simple getter in a template where custom tokens are involved (e.g using a ConnectToken from SensioLabs Connect API).
I hope this little feature will be part of 3.2 :)
Commits
-------
efd3e2d Added access to token from twig AppVariable
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
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Alter container class instead of kernel name in cache:clear command
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19912
| License | MIT
| Doc PR | -
The decision to alter kernel's name instead of the container's class dates from cc3a40ed78
But this is causing issues such as #19912. Looking more carefully, the real intent is to change the container class and there is no need to alter also the kernel's name at this stage.
Commits
-------
73c9693 [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
* 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 3.2-dev branch.
Discussion
----------
[TwigBundle] changed the runtime loader to return null if there is no match
| 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
ping @stof
Commits
-------
c03fd80 [TwigBundle] changed the runtime loader to return null if there is no match
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
----------
Twig extensions refatoring to decouple definitions from implementations
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | see Twigphp/twig#1913
| License | MIT
| Doc PR | not yet
This PR tries to use the new Twig runtime loader to the Twig bridge extensions.
Commits
-------
b515702 fixed circular reference in Twig Form integration
4b5e412 removed on indirection
c07fc58 [TwigBridge] decoupled Form extension definitions from its runtime
This PR was merged into the 3.2-dev branch.
Discussion
----------
added checks for public services on compiler passes that use service ids and not references
| 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
Commits
-------
82fa942 added checks for public services on compiler passes that use service id and not references
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
This PR was merged into the 3.2-dev branch.
Discussion
----------
fixed AddConstraintValidatorsPass config
| 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
Commits
-------
65131e2 added checks for public services on compiler passes that use service id and not references
* 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 3.2-dev branch.
Discussion
----------
added Twig runtimes for "critical" Twig extensions
| 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
This PR converts some Twig extensions to use a separate runtime. It also contains some optimizations to not load extensions when the associated component is not installed.
Commits
-------
c541804 fixed tests
812fbb4 decoupled the Twig HttpKernelExtension runtime from the extension
79efb4c [TwigBundle] removed ExpressionLanguage Twig extension when the ExpressionLanguage component is not available
3d4ad0b [TwigBundle] removed Stopwatch Twig extension when the Stopwatch component is not available
d0792e4 [TwigBundle] removed YAML Twig extension when the YAML component is not available
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes (fixing this is easy by adding doctrine/annotations explicitly)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15748 partially
| License | MIT
| Doc PR | n/a
Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Doctrine annotations library from the list.
Commits
-------
c2d8356 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle
* 2.7:
[TwigBundle] Fix CacheWarmingTest are order dependent
Revert "bug #20080 [Form] compound forms without children should be considered rendered implicitly (backbone87)"
#17580 compound forms without children should be considered rendered implicitly
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 3.2-dev branch.
Discussion
----------
[FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/security-core and symfony/security-csrf explicitly)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15748 partially
| License | MIT
| Doc PR | n/a
Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Security Core and CSRF components from the list.
Commits
-------
d703784 [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] removed the Templating component dependency on FrameworkBundle
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/templating explicitly)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15748 partially
| License | MIT
| Doc PR | n/a
Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Templating component from the list.
I made most of the work in previous version, so this change is really just about adding a good error message when templating is not enabled. For the record, this is also in the path of making possible to use Symfony with Twig without using the Templating component indirection (I think that this is in fact the last step).
Commits
-------
b3de62f [FrameworkBundle] removed the Templating component dependency on FrameworkBundle
This PR was merged into the 3.2-dev branch.
Discussion
----------
[FrameworkBundle] fix yaml:lint when yaml is not installed along side framework-bundle
| 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
YAML is not an explicit dependency of FrameworkBundle. If it is not installed, the console is broken as the yaml:lint commands tries to extends the one in the YAML component. This bug only exists in master as this refactoring happened in 3.2
Commits
-------
b1c5a68 [FrameworkBundle] fixed yaml:lint when yaml is not installed along side framwork-bundle
This PR was merged into the 2.8 branch.
Discussion
----------
Fix indexBy type extraction
| Q | A
| ------------- | ---
| Branch? | 2.8+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Bug found and patched by @ksom
Since 3008228b48, the Doctrine Bridge's PropertyInfo Extractor tries to extract the type of the key in an indexed association. However, as you can see in 3008228b48 (diff-7a8fb8072d57f95ea6e37898b05895bcR91), the extractor was using the metadata of the class containing the association instead of the target entity's metadata to retrieve the type of the index.
The tests were green because in 3008228b48 (diff-c7e914ed89ceffd939733efe08c039c2R44), the property used to `indexBy` was present in the classes on both sides of the relation with the same type.
Once the test is fixed (by renaming the property in the targetEntity), the test provided at 3008228b48 (diff-1b2e044d1df011c00caf802a07895bdbR88) gives the error
1) Symfony\Bridge\Doctrine\PropertyInfo\Tests\DoctrineExtractorTest::testExtract with data set #9 ('indexedBar', array(Symfony\Component\PropertyInfo\Type Object (...)))
InvalidArgumentException: "" is not a valid PHP type.
The fix is to fetch the metadata of the target entity and check there for the property type.
Commits
-------
138c6e3 Fix indexBy type extraction
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
This PR was merged into the 3.2-dev branch.
Discussion
----------
[Serializer] use the injected YAML parser
| 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/19326#discussion_r79604370
| License | MIT
| Doc PR |
Commits
-------
a40c0e4 [Serializer] use the injected YAML parser