Commit Graph

29268 Commits

Author SHA1 Message Date
Fabien Potencier
f82beb51de bug #29714 [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset() callStack to null (mlievertz)
This PR was merged into the 3.4 branch.

Discussion
----------

[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset() callStack to null

[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29703    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

[Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset. Basically https://github.com/symfony/symfony/pull/29411 introduced an issue where calling dispatch after a reset would throw an error because now reset set callStack to array but dispatch expected either SplObjectStorage or null. Now reset sets null. Also added a test to verify dispatch works following a call to reset.

Commits
-------

51bcdb8dc3 [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
2018-12-29 10:25:13 +01:00
mlievertz
51bcdb8dc3 [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset. 2018-12-28 07:55:37 -05:00
Javier Eguiluz
9b400bc720 Fixed minor typos 2018-12-28 12:28:01 +01:00
Andreas Möller
a7755f8663
Fix: Method can also return null 2018-12-27 19:08:15 +01:00
Samuel NELA
7f46dfb1c4 [Stopwatch] Fixed phpdoc for category name 2018-12-25 12:24:02 +01:00
Nicolas Grekas
44e9a91f30 bug #29597 [DI] fix reporting bindings on overriden services as unused (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix reporting bindings on overriden services as unused

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28326
| License       | MIT
| Doc PR        | -

Commits
-------

e07ad2b477 [DI] fix reporting bindings on overriden services as unused
2018-12-24 10:36:00 +01:00
Nicolas Grekas
91b28ff081 minor #29654 [Twig] Replace for-loops with blocks for attributes (royklutman)
This PR was squashed before being merged into the 3.4 branch (closes #29654).

Discussion
----------

[Twig] Replace for-loops with blocks for attributes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   |
| Fixed tickets |
| License       | MIT
| Doc PR        |

As mentioned in #29636, replaced for-loops with blocks for attributes to make use of its features.

Commits
-------

0cd8088a6d [Twig] Replace for-loops with blocks for attributes
2018-12-24 10:24:27 +01:00
Roy Klutman
0cd8088a6d [Twig] Replace for-loops with blocks for attributes 2018-12-24 10:23:42 +01:00
George Mponos
0695834657 [Tests] Change to willThrowException 2018-12-23 15:04:59 +01:00
Martin Hujer
13bcd6ae9f [Console] fix PHPDoc in Command
Issue was introduced #28714
2018-12-23 10:19:16 +01:00
Andreas Braun
596b9812e3
Fix wrong calls to clearstatcache 2018-12-22 14:25:23 +01:00
Tri Pham
c76c23e6fe Add Vietnamese translation for validators 2018-12-19 22:06:34 +01:00
Nicolas Grekas
88525d71bf bug #29639 [Yaml] detect circular references (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] detect circular references

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29462
| License       | MIT
| Doc PR        |

Commits
-------

b7487f476b [Yaml] detect circular references
2018-12-19 20:15:57 +01:00
Nicolas Séverin
7a7165ee0d Allow running PHPUnit with "xdebug.scream" ON
Since https://github.com/symfony/symfony/pull/25733 the Kernel attempts to unlink the legacy container while being built.
This throws an error if the file did not exist, for example on a clean install, on the build, which is then silenced.

That's fine on production systems, but on our build we have enabled "xdebug.scream" in order to visualise every errors, which basically un-silences the errors. I believe there should not be a need to silence anything on a usual, clean usage of the system.
Making this `unlink` conditional fixes it.

Could you please approve and merge this PR?
Thanks
2018-12-19 19:59:04 +01:00
Christian Flothmann
b7487f476b [Yaml] detect circular references 2018-12-18 10:36:45 +01:00
Nicolas Grekas
e07ad2b477 [DI] fix reporting bindings on overriden services as unused 2018-12-17 17:48:01 +01:00
Nicolas Grekas
7fa13be610 bug #29411 [EventDispatcher] Revers event tracing order (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Revers event tracing order

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Split from #29312 for 3.4

This traces events in dispatch order.

Before:

![image](https://user-images.githubusercontent.com/1047696/49330956-5f71e780-f596-11e8-8701-80458e715213.png)

After:

![image](https://user-images.githubusercontent.com/1047696/49330963-79abc580-f596-11e8-8666-5535afd59b31.png)

Here we see it also collects "terminate" events (both kernel & console for not-called listeners). In case of exception page the fix is even better: https://github.com/symfony/symfony/pull/29312#pullrequestreview-178076750

Which now correctly shows the kernel.exception event of the main request is dispatched _before_ the kernel.request event of the sub-request.

Moreover, it de-duplicates events. So we actually see the sub-request events 🎉

_Havent looked at tests yet._

Commits
-------

2570d6f877 [EventDispatcher] Revers event tracing order
2018-12-17 11:20:13 +01:00
Nicolas Grekas
b2575600c9 bug #29533 Fixed public directory when configured in composer.json (alexander-schranz)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixed public directory when configured in composer.json

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? |  no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT

As documented you should be able to change the public-dir by composer.json so the server:run and assets:install should also use that configuration when available:

https://symfony.com/doc/3.4/configuration/override_dir_structure.html#override-the-web-directory
https://symfony.com/doc/current/configuration/override_dir_structure.html#override-the-public-directory

#SymfonyConHackDay2018

Commits
-------

c45062b71a fixed public directory of web server and assets install when configured in composer.json
2018-12-17 11:11:02 +01:00
Nicolas Grekas
3d33e71bd5 bug #29619 [Console] OutputFormatter: move strtolower to createStyleFromString (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] OutputFormatter: move strtolower to createStyleFromString

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | not really
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

While playing with the href feature that'll be available in 4.3,
I spotted href value [is lowercased](https://github.com/symfony/symfony/pull/29620). Which I guess could be an issue on case-sensitive filesystems.
This changes nothing for the current branch, but will allow when merging
to upper branches to fix the behavior described above, hence keep original case.

Commits
-------

8e2bd35dca [Console] OutputFormatter: move strtolower to createStyleFromString
2018-12-17 11:05:51 +01:00
Roland Franssen
2570d6f877 [EventDispatcher] Revers event tracing order 2018-12-16 11:39:27 +01:00
Robin Chalas
a8eba803a3 [Security] Prefer clone over unserialize(serialize()) for user refreshment 2018-12-15 11:33:19 +01:00
Maxime Steinhausser
8e2bd35dca [Console] OutputFormatter: move strtolower to createStyleFromString
While playing with the href feature that'll be available in 4.3,
I spotted href value is lowercased. Which I guess could be an issue
on case-sensitive filesystems.
This changes nothing for the current branch, but will allow when merging
to upper branches to fix the behavior described above, hence keep original case.
2018-12-15 11:33:10 +01:00
Andreas Hasenack
b9359a57ec Adjust tests to work in the armhf architecture. Fixes #29281. 2018-12-14 16:57:34 +01:00
Tri Pham
93a0c98cc2 Vietnamese translations improvement 2018-12-14 13:19:56 +01:00
Nicolas Grekas
488617394a minor #29606 [Form] Fixed FormErrorIterator class phpdoc (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #29606).

Discussion
----------

[Form] Fixed FormErrorIterator class phpdoc

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Fixed an outdated paragraph  in `FormErrorIterator` (since https://github.com/symfony/symfony/pull/10418).

Commits
-------

732b86317d [Form] Fixed FormErrorIterator class phpdoc
2018-12-14 13:15:53 +01:00
Valentin
732b86317d [Form] Fixed FormErrorIterator class phpdoc 2018-12-14 13:15:48 +01:00
Frank de Jonge
d4e426c466 Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete. 2018-12-14 10:32:06 +01:00
Daniel Wehner
8caab72f5e Don't use he in docs when its not needed 2018-12-13 17:47:06 +01:00
Daniel Wehner
f58338e251 EventSubscriberInterface isn't a man 2018-12-13 17:46:10 +01:00
Nicolas Grekas
3fff3068db bug #29587 [Debug] ignore underscore vs backslash namespaces in DebugClassLoader (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] ignore underscore vs backslash namespaces in DebugClassLoader

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29503
| License       | MIT
| Doc PR        | -

Commits
-------

d858dad065 [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
2018-12-13 09:06:10 +01:00
Nicolas Grekas
d858dad065 [Debug] ignore underscore vs backslash namespaces in DebugClassLoader 2018-12-12 21:57:22 +01:00
Alexander Schranz
c45062b71a
fixed public directory of web server and assets install when configured in composer.json 2018-12-12 18:56:32 +01:00
Nicolas Grekas
7a34a78be6 bug #29584 [FrameworkBundle] fix describing routes with no controllers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] fix describing routes with no controllers

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Spotted by @jpauli during a training.

Commits
-------

a1c612aedf [FrameworkBundle] fix describing routes with no controllers
2018-12-12 18:36:44 +01:00
Nicolas Grekas
7028f842b0 bug #29582 [DI] move RegisterServiceSubscribersPass before DecoratorServicePass (kbond)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] move RegisterServiceSubscribersPass before DecoratorServicePass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29550
| License       | MIT
| Doc PR        | n/a

From https://github.com/symfony/symfony/issues/29550#issuecomment-446351365: The fact that `RegisterServiceSubscribersPass` runs after `DecoratorServicePass` makes it impossible to decorate a service implementing `ServiceSubscriberInterface` if the decorator does not implement it.

Commits
-------

c3271d9385 [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
2018-12-12 18:36:18 +01:00
Nicolas Grekas
153220a932 bug #29527 [TwigBridge][Form] Prevent multiple rendering of form collection prototypes (Shoplifter)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge][Form] Prevent multiple rendering of form collection prototypes

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29489   <!-- #-prefixed issue number(s), if any -->
| License       | MIT

prevents attemt to render of prototype in CollectionType when it has been rendered already.
(see [Deprecated calling FormRenderer::searchAndRenderBlock for fields which were already rendered.](https://github.com/symfony/symfony/blob/master/UPGRADE-4.2.md#form))

Commits
-------

ffd272243b [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
2018-12-12 18:34:38 +01:00
Thomas Baumgartner
ffd272243b [TwigBridge][Form] Prevent multiple rendering of form collection prototypes 2018-12-12 18:31:24 +01:00
Nicolas Grekas
a1c612aedf [FrameworkBundle] fix describing routes with no controllers 2018-12-12 18:02:13 +01:00
Kevin Bond
c3271d9385
[DI] move RegisterServiceSubscribersPass before DecoratorServicePass 2018-12-12 10:27:19 -05:00
Samuele Lilli
3b9d8efc95 Update ValidationListener.php
This comment was misleading.
It's true that no groups (ie.: `Default`) are setted into validation process but it's not clear from the comment.
I suppose that is better to be more explicit about this process.
BTW I'm still not sure if `FormValidator` reference is necessary as we can change it and we should remember to update this comment and this does not seems to fit.
WDYT, is better to leave `FormValidator` out of this comment?

For reference: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L46-L92
2018-12-12 07:47:27 +01:00
Jörn Lang
56ab129b96 [Yaml] ensures that the mb_internal_encoding is reset to its initial value 2018-12-11 15:13:08 +01:00
Samuel NELA
362339f26c [WebLink] Fixed documentation link 2018-12-10 14:11:36 +01:00
Fabien Potencier
68b823f243 minor #29408 [Security] getTargetPath of TargetPathTrait must return string or null (gmponos)
This PR was squashed before being merged into the 3.4 branch (closes #29408).

Discussion
----------

[Security] getTargetPath of TargetPathTrait must return string or null

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (possible bug)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Since the return type is string the default return value must be also string.

Commits
-------

8d4b787dd9 [Security] getTargetPath of TargetPathTrait must return string or null
2018-12-10 05:09:26 +01:00
Mponos George
8d4b787dd9 [Security] getTargetPath of TargetPathTrait must return string or null 2018-12-10 05:09:19 +01:00
Fabien Potencier
9c84b149c5 minor #29437 [HttpFoundation] Fix HeaderBag::get phpdoc (jvasseur)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fix HeaderBag::get phpdoc

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

When setting `$first` to `false`, the default value is wrapped into an array meaning you need to pass a string as the default value instead of an array of strings.

Commits
-------

5196dac7a8 Fix HeaderBag::get phpdoc
2018-12-10 04:58:44 +01:00
Fabien Potencier
21d740dfee minor #29520 Feature/add missing space (knuch)
This PR was merged into the 3.4 branch.

Discussion
----------

Feature/add missing space

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Adding a much needed space in the serviceLocator createNotFoundException error message.

from
`Service "foo" not found: even though it exists in the app's container, the container inside "foo" is a smaller service locator that is empty...Try using dependency injection instead.
`
to
`Service "foo" not found: even though it exists in the app's container, the container inside "foo" is a smaller service locator that is empty... Try using dependency injection instead.
`
#SymfonyConHackday2018

Commits
-------

ceb7a68efa merge conflicts
2018-12-10 04:39:53 +01:00
Fabien Potencier
326ebaabaa bug #29513 [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument (karser)
This PR was squashed before being merged into the 3.4 branch (closes #29513).

Discussion
----------

[Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument

| Q             | A
| ------------- | ---
| Branch?       | 3.4 and up to 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28825
| License       | MIT

This is a fix of #28825 big thanks @dunglas and @xabbuh

Commits
-------

8741d00d6e [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
2018-12-10 04:34:10 +01:00
karser
8741d00d6e [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument 2018-12-10 04:34:01 +01:00
Enrico Schultz
21c3030092 [Security] defer log message in guard authenticator
prevent an unneccessary log message if the guard authenticator does not support the current request
2018-12-09 17:00:22 +01:00
Fabien Potencier
02b3510a11 bug #29531 [Validator] Added IBAN format for Vatican City State (raulfraile)
This PR was squashed before being merged into the 3.4 branch (closes #29531).

Discussion
----------

[Validator] Added IBAN format for Vatican City State

IBAN for Vatican City State was added to [IBAN registry](https://www.swift.com/sites/default/files/resources/iban_registry.pdf) recently. This PR adds support for this new format in the `Iban` validator.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

5f0261429a [Validator] Added IBAN format for Vatican City State
2018-12-09 11:02:06 +01:00
Raul Fraile
5f0261429a [Validator] Added IBAN format for Vatican City State 2018-12-09 11:01:50 +01:00