This PR was squashed before being merged into the 3.4 branch (closes#20361).
Discussion
----------
[Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
| Q | A |
| --- | --- |
| Branch? | "master" |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes
| Fixed tickets | #20356 |
| License | MIT |
| Doc PR | reference to the documentation PR, if any |
As @vudaltsov mentioned, we ignore any calls to `ArrayNodeDefinition::cannotBeEmpty`, which can lead to unexpected behavior. Imo. all subclasses should follow the base API.
Commits
-------
d40e7e4c2d [Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Remove leading 0 in microseconds of date caster
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
It looks more like a [engineering notation](https://en.wikipedia.org/wiki/Engineering_notation). We can now better discern **milli**seconds and **micro**seconds.
```php
// before -> after
1.000000 -> 1.0
1.100000 -> 1.100
1.120000 -> 1.120
1.123000 -> 1.123
1.123400 -> 1.123400
1.123450 -> 1.123450
1.123456 -> 1.123456
```
Commits
-------
94956ebae4 Remove leading 0 in ms of date caster
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Generate safe fallback filename for wrongly encoded filename
| 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 |
This handles the case where the encoding of a random string cannot be detected. Until now this causes a PHP Warning `mb_strlen(): Unknown encoding ""`.
Commits
-------
8fd5569 [HttpFoundation] Generate safe fallback filename for wrongly encoded filename
This PR was merged into the 2.7 branch.
Discussion
----------
Avoid infinite loops when profiler data is malformed
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22963
| License | MIT
| Doc PR | -
Thanks to the bug reproducer provided by @Kyoushu, I could reproduce this error:
```
PHP 7.1.4 Development Server started at Thu Aug 3 22:13:26 2017
Listening on http://127.0.0.1:8000
Document root is projects/symfony-fileprofilerstorage-bug/web
Press Ctrl-C to quit.
[Thu Aug 3 22:13:26 2017] PHP Fatal error:
Allowed memory size of 2147483648 bytes exhausted (tried to allocate 282624 bytes) in
projects/symfony-fileprofilerstorage-bug/vendor/symfony/symfony/src/Symfony/Component/
HttpKernel/Profiler/FileProfilerStorage.php on line 124
```
After the changes proposed in this PR, the browser no longer exhausts the memory and you can see the exception page explaining the error. The web debug toolbar doesn't load, but it doesn't crash anything:
![error-profiler](https://user-images.githubusercontent.com/73419/28941732-3c7eb29c-7899-11e7-88e8-a16517d5bcf7.png)
Commits
-------
e5ef9fb Avoid infinite loops when profiler data is malformed
This PR was squashed before being merged into the 3.4 branch (closes#22913).
Discussion
----------
[Yaml] Deprecate tags using colon
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Using a colon in a tag doesn't look like yaml and causes trouble (see https://github.com/symfony/symfony/pull/22878), so I propose to just deprecate these tags in favor of more consistent tags.
```yml
- !php/const:PHP_INT_MAX
- !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}
```
would become
```yml
- !php/const PHP_INT_MAX
- !php/object O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}
```
Commits
-------
9815af3 [Yaml] Deprecate tags using colon
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle][Workflow] better errors when security deps are missing
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23499#discussion_r128752026
| License | MIT
| Doc PR |
All the referenced services must either be explicitly configured or the SecurityBundle must be installed with some security related config being enabled. Otherwise, you will end up with a not so useful error message.
Commits
-------
56ee4aa better errors when security deps are missing
* 3.3:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
Docblock improvement
bumped Symfony version to 2.8.27
updated VERSION for 2.8.26
updated CHANGELOG for 2.8.26
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
* 2.8:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
Docblock improvement
bumped Symfony version to 2.8.27
updated VERSION for 2.8.26
updated CHANGELOG for 2.8.26
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
* 2.7:
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
bumped Symfony version to 2.7.34
updated VERSION for 2.7.33
update CONTRIBUTORS for 2.7.33
updated CHANGELOG for 2.7.33
This PR was merged into the 2.7 branch.
Discussion
----------
[Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
While working on making #23678 green, I discovered that if a lazy service implements `__destruct`, then that service is not lazy anymore: it is created at destruct time.
That behavior is documented at https://github.com/Ocramius/ProxyManager/issues/258 (+related issues).
While I may understand why this behavior is the default for ProxyManager, it does not fit our "lazy-services" use case to me. Typically, nobody wants a database connection to be created to destruct the uninitialized lazy-proxy.
Blocks #23678
Commits
-------
2d79ffa0ca [Bridge\ProxyManager] Dont call __destruct() on non-instantiated services
This PR was merged into the 3.4 branch.
Discussion
----------
Consistently use 7 chars of sha256 for hash-based id generation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This prevents generating over long service ids, and for filesystem-related changes, makes the Windows 258 chars limit farther.
Commits
-------
bc22cdd034 Consistently use 7 chars of sha256 for hash-based id generation
* 3.3:
Removed useless argument $definition
Fix comment
[Config] Fix checking class existence freshness
bumped Symfony version to 3.3.7
updated VERSION for 3.3.6
updated CHANGELOG for 3.3.6
Bump minimal PHP version to ^5.5.9|>=7.0.8
This PR was squashed before being merged into the 3.4 branch (closes#22948).
Discussion
----------
[Yaml] Recommend using quotes instead of PARSE_KEYS_AS_STRINGS
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
Sorry for opening this so lately... I just realized that we could get rid of `Yaml::PARSE_KEYS_AS_STRINGS` just by recommending using quotes...
~This way we don't allow a behavior not respecting the spec and we won't need to deprecate `PARSE_KEYS_AS_STRINGS` later.~
~Is it too late for this to be merged in 3.3?~
ping @xabbuh
Commits
-------
b63c55c [Yaml] Recommend using quotes instead of PARSE_KEYS_AS_STRINGS
This PR was merged into the 3.4 branch.
Discussion
----------
Autoconfigure instances of ArgumentValueResolverInterface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23701
| License | MIT
| Doc PR | n/a
Autoconfigure instances of `Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface` so they get the `controller.argument_value_resolver` tag automatically added to them.
This avoids avoid having to tag each resolver or add an `_instanceof` configuration such as
```yaml
_instanceof:
Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface:
tags: [controller.argument_value_resolver]
```
Commits
-------
ee4dc20 Autoconfigure instances of ArgumentValueResolverInterface
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix comment
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
Actually, DataUriNormalizer runs before the serializer.normalizer.object since it has a higher priority (-920 vs -1000).
Commits
-------
103b23e Fix comment
This PR was merged into the 3.3 branch.
Discussion
----------
Bump minimal PHP version to ^5.5.9|>=7.0.8
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22973
| License | MIT
| Doc PR | -
As spotted in the linked issue, because of https://bugs.php.net/72229.
Commits
-------
2282a6f Bump minimal PHP version to ^5.5.9|>=7.0.8
This PR was merged into the 3.3 branch.
Discussion
----------
[Form] Removed useless argument $definition
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
After https://github.com/symfony/symfony/pull/22175/files this argument is not used anymore.
Commits
-------
81396c7fac Removed useless argument $definition
This PR was merged into the 3.3 branch.
Discussion
----------
[Config] Fix checking class existence freshness
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23753
| License | MIT
| Doc PR | -
Commits
-------
a63ab77 [Config] Fix checking class existence freshness
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8][Security][Guard] Docblock improvement
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Added this small detail which might prevent [exception](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Security/Guard/Firewall/GuardAuthenticationListener.php#L193) when developing
Commits
-------
ce86449 Docblock improvement