Commit Graph

32329 Commits

Author SHA1 Message Date
Maxime Steinhausser
e226492db7 [DI] Add trim env processor 2019-01-05 12:09:07 +01:00
Fabien Potencier
0a3d3d4dff bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #29697).

Discussion
----------

[DI] Fixed wrong factory method in exception

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

When a service definition with a factory defines invalid arguments, the [resulting exception message ](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php#L70)incorrectly specifies the factory constructor instead of the factory method as not having the specified named arguments.

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

922885c892 [DI] Fixed wrong factory method in exception
2019-01-05 10:39:43 +01:00
Christian Flothmann
16ebeb395f [Intl] make type-hinted arguments nullable 2019-01-05 09:55:10 +01:00
Fabien Potencier
5c2cee5c0f feature #28902 [Debug] Detect virtual methods using @method (ro0NL)
This PR was squashed before being merged into the 4.3-dev branch (closes #28902).

Discussion
----------

[Debug] Detect virtual methods using @method

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/28897#issuecomment-430542792
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/10504

My first Debug PR, so im still on it. But early feedback welcome.

In #28901 we'll introduce a new virtual interface method using `@method` annotation. IIUC the idea is to trigger whenever such a method is overridden.

Commits
-------

38877c32ac [Debug] Detect virtual methods using @method
2019-01-05 09:11:12 +01:00
Roland Franssen
38877c32ac [Debug] Detect virtual methods using @method 2019-01-05 09:11:02 +01:00
Fabien Potencier
e38b5d2990 bug #29494 [HttpFoundation] Fix request uri when it starts with double slashes (alquerci)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Fix request uri when it starts with double slashes

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

When the `REQUEST_URI` starts with a slash no need to `parse_url()`. However to keep the same behaviour regarding the fragment we need to add a logic to remove it. While `parse_url()` handle all cases itself.

Commits
-------

cf850c1a15 [HttpFoundation] Fix request uri when it starts with double slashes
2019-01-05 09:05:37 +01:00
Fabien Potencier
5053bfec14 minor #29509 [Validator] Add tests in regex validator for objects with __toString method (raulfraile)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] Add tests in regex validator for objects with __toString method

This PR adds tests to cover objects implementing the `__toString` method for the `Regex` validator.

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

Commits
-------

11e0df4f55 [Validator] Add tests in regex validator for objects with __toString method
2019-01-05 08:52:57 +01:00
Wojciech Gorczyca
922885c892 [DI] Fixed wrong factory method in exception 2019-01-05 08:48:02 +01:00
Fabien Potencier
482f49afde bug #29679 [HttpKernel] Correctly Render Signed URIs Containing Fragments (zanbaldwin)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Correctly Render Signed URIs Containing Fragments

| 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

- Rebuild the URL with the computed hash instead of appending it onto the end of the fragment.
- Update unit tests, and add new unit test to cover URIs that include fragments.

Commits
-------

b9ece6bde7 [HttpKernel] Correctly Render Signed URIs Containing Fragments
2019-01-05 08:46:55 +01:00
Maxime Steinhausser
d80bfad54e [Profiler] Still show locale and fallback locale even if no trans used 2019-01-05 08:44:15 +01:00
Aaron Somi
fdf98af58b Changed gender choice types to color
Signed-off-by: Aaron Somi <aaronsomi@gmail.com>
2019-01-05 06:17:43 +00:00
Maxime Steinhausser
b3093440d8 Fix unnecessary use 2019-01-04 19:00:57 +01:00
Fabien Potencier
a1c8da08f6 minor #29769 [Form] Fix FormDefaultChoiceListFactory test (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fix FormDefaultChoiceListFactory test

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29731#pullrequestreview-189023682
| License       | MIT
| Doc PR        | n/a

`$groupBy` is either `null` or `callable`. Passing `array()` is wrong.

Commits
-------

b8f6390ef9 Fixed groupBy argument value in DefaultChoiceListFactoryTest
2019-01-04 16:47:57 +01:00
Fabien Potencier
3ee1adbd90 minor #29776 remove no longer needed PHP version checks (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

remove no longer needed PHP version checks

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

Commits
-------

99448c6e78 remove no longer needed PHP version checks
2019-01-04 16:46:05 +01:00
Fabien Potencier
34c8a8b7ae minor #29778 remove no longer needed PHP version checks (xabbuh)
This PR was merged into the 4.1 branch.

Discussion
----------

remove no longer needed PHP version checks

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

Commits
-------

7a132fe156 remove no longer needed PHP version checks
2019-01-04 16:44:56 +01:00
Robin Chalas
44aa362419 Merge branch '4.2'
* 4.2:
  Ensure final input of CommandTester works with default
  Do not risk waiting 100 seconds
  [Intl] handle null date and time types
  Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
  Do not ignore the choice groups for caching
2019-01-04 16:14:53 +01:00
Robin Chalas
b594ad65e1 Merge branch '4.1' into 4.2
* 4.1:
  Ensure final input of CommandTester works with default
  [Intl] handle null date and time types
  Do not ignore the choice groups for caching
2019-01-04 16:13:53 +01:00
Robin Chalas
2d84041a66 Merge branch '3.4' into 4.1
* 3.4:
  Ensure final input of CommandTester works with default
  [Intl] handle null date and time types
  Do not ignore the choice groups for caching
2019-01-04 16:13:30 +01:00
Christian Flothmann
7a132fe156 remove no longer needed PHP version checks 2019-01-04 16:09:47 +01:00
Christian Flothmann
99448c6e78 remove no longer needed PHP version checks 2019-01-04 14:48:06 +01:00
Eric Stern
6b87b67cf0 Ensure final input of CommandTester works with default
If the final element of `CommandTester::setInputs()` is an empty string (to send the default value), the internal stream the tester uses hits EOF and triggers the `Aborted` exception. This appends an additional EOL to the stream after the `implode` to simulate one final return key, allowing the final input to use the default value when used in the tester's documented style.
2019-01-04 05:42:43 +01:00
Valentin
b8f6390ef9 Fixed groupBy argument value in DefaultChoiceListFactoryTest 2019-01-04 02:14:05 +03:00
Fabien Potencier
44bb34680d bug #29695 [Form] Do not ignore the choice groups for caching (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Do not ignore the choice groups for caching

| 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

While working on a different issue I suddenly came over a strange behaviour.

```php
$builder
    ->add('choice1', ChoiceType::class, [
        'choices' => [
            'a' => 'a',
            'b' => 'b',
            'c' => 'c',
        ],
        'multiple' => true,
    ])
    ->add('choice2', ChoiceType::class, [
        'choices' => [
            'ab' => [
                'a' => 'a',
                'b' => 'b',
            ],
            'c' => 'c',
        ],
        'multiple' => true,
    ]);
```
The code above will result in two identical selects:

![image](https://user-images.githubusercontent.com/2552865/50459865-b3e36980-0980-11e9-8f3d-17f9cfa9a7f8.png)

The reason for this is hash generation in `Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator::createListFromChoices()` — it does not take array structure into account. See [the comment and the code below it](7f46dfb1c4/src/Symfony/Component/Form/ChoiceList/Factory/CachingFactoryDecorator.php (L116)).

The comment says that the same choice list should be returned for the same collection of choices no matter the structure. This is wrong, because `ChoiceListInterface` has a method `getStructuredValues()` and thus a list instance cannot identified by a hash which does not take structure into account.

I propose a simple change that fixes this and allows for similar choice fields with different groupings.

ping @HeahDude

Commits
-------

9007911a85 Do not ignore the choice groups for caching
2019-01-03 16:02:55 +01:00
Fabien Potencier
b948d5a987 feature #29680 [Form] Add new block_prefix option for an easy form theming (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Add new block_prefix option for an easy form theming

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29651
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10835

Commits
-------

bd50ac44fc Add block_prefix option for an easy form theming
2019-01-03 16:01:11 +01:00
Nicolas Grekas
4f567326d0 minor #29720 Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)" (chalasr)
This PR was merged into the 4.2 branch.

Discussion
----------

Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"

| Q             | A
| ------------- | ---
| Branch?       | 4.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

Intl is an hard dependency for Form, these checks cannot be reached.

Commits
-------

3ac98a6a17 Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
2019-01-03 16:00:40 +01:00
Nicolas Grekas
743b52fa4e bug #29755 Improved BIC + IBAN validator for some special cases (javiereguiluz)
This PR was squashed before being merged into the 4.3-dev branch (closes #29755).

Discussion
----------

Improved BIC + IBAN validator for some special cases

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

While blogging about [Improved Financial Constraints in Symfony 4.3](https://symfony.com/blog/new-in-symfony-4-3-improved-financial-constraints) I found this resource that mentions some exceptions when validating BIC + IBAN: https://wiki.xmldation.com/index.php?title=Support/EPC/IBAN_%26_BIC_relation

I don't know if that resource is fully reliable ... but I checked it in the official "European Banking Resources" website (https://www.ecbs.org/iban/) and most of it matches, so I think we can safely make this change.

Commits
-------

88a1696a64 Improved BIC + IBAN validator for some special cases
2019-01-03 15:56:41 +01:00
Javier Eguiluz
88a1696a64 Improved BIC + IBAN validator for some special cases 2019-01-03 15:56:35 +01:00
Nicolas Grekas
c573cfb4f5 bug #29738 [Intl] handle null date and time types (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] handle null date and time types

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

Commits
-------

6ded31a3b9 [Intl] handle null date and time types
2019-01-03 15:54:54 +01:00
Grégoire Paris
9f45af4a2b
Do not risk waiting 100 seconds
It this happens, and it happens, this will make the build quite slow.
Refs #29760
2019-01-03 15:48:52 +01:00
Christian Flothmann
6ded31a3b9 [Intl] handle null date and time types 2019-01-03 13:58:33 +01:00
Christian Flothmann
3860d685f4 Merge branch '4.2'
* 4.2:
  update years in license files
  Fix: Adjust DocBlock
  \"ParserTest->getParserTestData()\" -> only some more tests
  access the container getting it from the kernel
  Replace slave and master by replica and primary
  Fix erasing cookies issue
  [Lock] Pedantic improvements for lock
  [EventDispatcher] Fixed phpdoc on interface
  update year in license files
  [VarExporter] fix exporting array indexes
  [SecurityBundle] Fix traceable voters
  [Console] Fix help text for single command applications
  Fix random test failure on lock
  improve error message when using test client without the BrowserKit component
  Fixed minor typos in an error message
  [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
  Fixed minor typos
  Fix: Method can also return null
  [Stopwatch] Fixed phpdoc for category name
2019-01-03 10:16:58 +01:00
Christian Flothmann
36110b1e95 update years in license files 2019-01-03 10:09:06 +01:00
Christian Flothmann
3007e36a5c Merge branch '4.1' into 4.2
* 4.1:
  Fix: Adjust DocBlock
  \"ParserTest->getParserTestData()\" -> only some more tests
  access the container getting it from the kernel
  [Lock] Pedantic improvements for lock
  [EventDispatcher] Fixed phpdoc on interface
  update year in license files
  [Console] Fix help text for single command applications
  Fix random test failure on lock
  improve error message when using test client without the BrowserKit component
  [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
  Fixed minor typos
  Fix: Method can also return null
  [Stopwatch] Fixed phpdoc for category name
2019-01-03 10:07:35 +01:00
Christian Flothmann
4973a5e9e1 Merge branch '3.4' into 4.1
* 3.4:
  Fix: Adjust DocBlock
  \"ParserTest->getParserTestData()\" -> only some more tests
  [Lock] Pedantic improvements for lock
  [EventDispatcher] Fixed phpdoc on interface
  update year in license files
  [Console] Fix help text for single command applications
  Fix random test failure on lock
  improve error message when using test client without the BrowserKit component
  [Event Dispatcher] fixed 29703: TraceableEventDispatcher reset now sets callStack to null with test to dispatch after reset.
  Fixed minor typos
  Fix: Method can also return null
  [Stopwatch] Fixed phpdoc for category name
2019-01-03 10:05:57 +01:00
Daniel Gonzalez
91e8057d9a [DebugBundle] Added 'theme' option to change the color of dump() when rendered inside templates 2019-01-03 04:26:06 +01:00
Andreas Möller
f8be46be0e
Fix: Adjust DocBlock 2019-01-02 22:24:08 +01:00
Fabien Potencier
10b3d0055a feature #24576 [FrameworkBundle] Added ControllerTrait::isFormValid (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Added `ControllerTrait::isFormValid`

| Q             | A
| ------------- | ---
| Branch?       | master (4.1)
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/8518

Commits
-------

1a8c844f0e [FrameworkBundle] Added `ControllerTrait::isFormValid`
2019-01-02 13:07:52 +01:00
Fabien Potencier
556a9206ca feature #29483 [HttpKernel] Set the default locale early (thewilkybarkid)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] Set the default locale early

| 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        |

Similar to #29186, the default locale isn't set till after the router so isn't available when trying to handle errors there (well, only the _default_ default locale is).

Commits
-------

02c9f352d9 Set the default locale early
2019-01-02 11:31:36 +01:00
Fabien Potencier
2ce6a34881 feature #29186 [HttpKernel] Increase priority of AddRequestFormatsListener (thewilkybarkid)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpKernel] Increase priority of AddRequestFormatsListener

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

Currently `AddRequestFormatsListener` has a low priority, so it won't fire before others like `RouterListener` which can create problems (eg when listening for a HTTP exception thrown by the router you don't have access for any custom types).

IMO this map should be in the application rather than set on every request, but the same can be achieved by giving it a high priority. (Can't think of a reason for it to not be first...)

Commits
-------

9bf313660d Increase priority of AddRequestFormatsListener
2019-01-02 11:02:59 +01:00
Fabien Potencier
c7d6bda56a feature #29658 [Validator] Choices constraint improvement (nikophil)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] Choices constraint improvement

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

Hi,

here is a little improvement for the choice constraint:  expose a new `choices` wildcard for the messages, in order to provide a way to display easily the valid choices to the user.

thanks.

Commits
-------

71dfa35a21 add new `choices` wildcard in message
2019-01-02 10:34:24 +01:00
Lars Moelleken
a95a8e418b \"ParserTest->getParserTestData()\" -> only some more tests 2019-01-02 10:30:52 +01:00
Christian Flothmann
68ea3f1a64 access the container getting it from the kernel 2019-01-02 10:28:14 +01:00
Raphaëll Roussel
f06e6b46ef Replace slave and master by replica and primary
Remove racially charged terms.
2019-01-02 10:25:07 +01:00
Yonel Ceruto
bd50ac44fc Add block_prefix option for an easy form theming 2019-01-01 19:34:10 -05:00
Fabien Potencier
23cdc73a35 feature #29283 [Serializer] CsvEncoder no header option (encode / decode) (redecs)
This PR was squashed before being merged into the 4.3-dev branch (closes #29283).

Discussion
----------

[Serializer] CsvEncoder no header option (encode / decode)

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

This PR wants to introduce a new context option for the CsvEncoder, `CsvEncoder::NO_HEADERS_KEY` (boolean), that allows CSV encoding/decoding when you don't have/need a header.

By default this is assumed to be false, so the headers are included in the CSV output or assumed to be present in the CSV input.

When the option is set to true, the following behaviour occurs.

Encoding
===
The following PHP input
```php
array(array('a','b'), array('c', 'd'))
```
will generate this CSV output
```csv
a,b
c,d
```

Decoding
===
Considering the CSV input to be
```csv
a,b
c,d
```
the following PHP array will be returned
```php
array (
  0 => array (
    0 => 'a',
    1 => 'b',
  ),
  1 => array (
    0 => 'c',
    1 => 'd',
  ),
)
```

Commits
-------

0e63c61190 [Serializer] CsvEncoder no header option (encode / decode)
2019-01-01 19:36:14 +01:00
Mihai Nica
0e63c61190 [Serializer] CsvEncoder no header option (encode / decode) 2019-01-01 19:36:06 +01:00
Emanuele Iannone
b40801a492 Fix erasing cookies issue
Prevent replacing existing cookies when starting or regenerating session on PHP < 7.3 with 'cookie_samesite' option.
See issue https://github.com/symfony/symfony/issues/29675
2019-01-01 19:29:22 +01:00
Fabien Potencier
c4d6d15e03 feature #29718 [PHPUnit bridge] Bump php version of PHPUnit-bridge (gmponos)
This PR was squashed before being merged into the 4.3-dev branch (closes #29718).

Discussion
----------

[PHPUnit bridge] Bump php version of PHPUnit-bridge

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

Related to https://github.com/symfony/symfony/pull/29623#issuecomment-450400625

I checked the BC page I think I couldn't find any related to BC changes... anyway...

As far as I understood from the comment above I must target `master` branch.

Commits
-------

59313095d3 [PHPUnit bridge] Bump php version of PHPUnit-bridge
2019-01-01 19:14:04 +01:00
George Mponos
59313095d3 [PHPUnit bridge] Bump php version of PHPUnit-bridge 2019-01-01 19:13:57 +01:00
Fabien Potencier
99c92210c9 minor #29743 [EventDispatcher] Fixed phpdoc on interface (samnela)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] Fixed phpdoc on interface

| 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 | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

94bd28ebb0 [EventDispatcher] Fixed phpdoc on interface
2019-01-01 19:08:36 +01:00
Fabien Potencier
113ba10f8f bug #29741 [VarExporter] fix exporting array indexes (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

[VarExporter] fix exporting array indexes

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

Commits
-------

3c936f447b [VarExporter] fix exporting array indexes
2019-01-01 18:38:21 +01:00
Fabien Potencier
7c518477b1 minor #29742 update year in license files (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

update year in license files

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

Happy new year to each and everyone from the Symfony community. 🎉

Commits
-------

6c895b9757 update year in license files
2019-01-01 18:35:40 +01:00
Fabien Potencier
9fc71e0f64 bug #29704 [FrameworkBundle] improve errors in tests missing the BrowserKit component (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] improve errors in tests missing the BrowserKit component

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

Commits
-------

7961a29a57 improve error message when using test client without the BrowserKit component
2019-01-01 18:32:41 +01:00
Fabien Potencier
1fafdaf9e6 minor #29726 [Lock] Fix lock test random failure (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] Fix lock test random failure

| 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        | NA

The expiration of some store (PDO and Memcached) have a precision of 1 second.

The current test suite of the component tries to putof the expiration to time + 1 second then tries to check the value of the lock. This could generate test failure (see https://travis-ci.org/symfony/symfony/jobs/473530213#L3389)

Commits
-------

8cff565947 Fix random test failure on lock
2019-01-01 18:30:58 +01:00
Fabien Potencier
63ef2f5179 minor #29727 [Lock] Pedantic improvements for lock (greg0ire)
This PR was squashed before being merged into the 3.4 branch (closes #29727).

Discussion
----------

[Lock] Pedantic improvements for lock

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

Yes, this PR is just about comments, I hope it's ok, I just stumbled into this issues while trying to figure out the bug fixed by #29726

Commits
-------

dc568c0ba1 [Lock] Pedantic improvements for lock
2019-01-01 18:28:56 +01:00
Grégoire Paris
dc568c0ba1 [Lock] Pedantic improvements for lock 2019-01-01 18:28:50 +01:00
Samuel NELA
94bd28ebb0 [EventDispatcher] Fixed phpdoc on interface 2019-01-01 15:10:43 +01:00
Christian Flothmann
6c895b9757 update year in license files 2019-01-01 14:45:19 +01:00
Christian Flothmann
3c936f447b [VarExporter] fix exporting array indexes 2019-01-01 14:11:42 +01:00
Roland Franssen
a7df429a8f [SecurityBundle] Fix traceable voters 2019-01-01 07:57:09 +01:00
Tim Goudriaan
7058f555b5 [Console] Fix help text for single command applications 2019-01-01 05:40:01 +01:00
Jérémy Derussé
8cff565947
Fix random test failure on lock 2018-12-30 15:22:53 +01:00
Christian Flothmann
7961a29a57 improve error message when using test client without the BrowserKit component 2018-12-30 10:16:39 +01:00
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
Javier Eguiluz
913fdbe107 Fixed minor typos in an error message 2018-12-29 00:07:14 +01:00
Robin Chalas
3ac98a6a17 Revert "minor #28610 [Form] Check for Intl availibility (ro0NL)"
This reverts commit 15aa25a1ed, reversing
changes made to 3cd411af3e.
2018-12-28 23:40:08 +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
Nicolas PHILIPPE
71dfa35a21 add new choices wildcard in message 2018-12-27 11:55:44 +01:00
Valentin
9007911a85 Do not ignore the choice groups for caching 2018-12-27 02:35:06 +03:00
Samuel NELA
7f46dfb1c4 [Stopwatch] Fixed phpdoc for category name 2018-12-25 12:24:02 +01:00
Maxime Steinhausser
0f65a76f9f [Console][VarDumper] Ignore href for PhpStorm terminal emulator 2018-12-24 14:40:20 +01:00
Maxime Steinhausser
32a53bfc13 fix cs 2018-12-24 14:39:10 +01:00
Zan Baldwin
b9ece6bde7 [HttpKernel] Correctly Render Signed URIs Containing Fragments
Rebuild the URL with the computed hash instead of appending it onto the end of the URI, preventing incorrect formatting when dealing with URIs containing fragments.
2018-12-24 13:29:26 +00:00
Maxime Steinhausser
66928dd09d fix merge (bis) 2018-12-24 11:44:29 +01:00
Nicolas Grekas
1fe2fc2697 fix merge 2018-12-24 11:20:31 +01:00
Nicolas Grekas
edb12b48c7 Merge branch '4.2'
* 4.2:
  [Twig] Remove spaces to fix whitespace in tags
  [Twig] Replace for-loops with blocks for attributes
  fixed CS
  [Tests] Change to willThrowException
  [Console] fix PHPDoc in Command
  Update FileLoaderLoadException.php
  Fix wrong calls to clearstatcache
  Add Vietnamese translation for validators
  Allow running PHPUnit with "xdebug.scream" ON
  [VarDumper] Add descriptors tests
  [Cache] fix bad optim
  [Yaml] detect circular references
  [DI] fix reporting bindings on overriden services as unused
  [Routing] minor fix or previous PR
2018-12-24 11:03:37 +01:00
Nicolas Grekas
8943f20770 minor #29636 [Twig] Remove spaces to fix whitespace in tags (royklutman)
This PR was squashed before being merged into the 4.2 branch (closes #29636).

Discussion
----------

[Twig] Remove spaces to fix whitespace in tags

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| License       | MIT

`form_help` tags in forms have double spaces between its `id` als `class` attributes.

Fixed this by removing unnecessary spaces.

This issue was introduced in `4.2`.

Commits
-------

82acc89840 [Twig] Remove spaces to fix whitespace in tags
2018-12-24 11:02:30 +01:00
Roy Klutman
82acc89840 [Twig] Remove spaces to fix whitespace in tags 2018-12-24 11:02:23 +01:00
Nicolas Grekas
5ee0c04fd7 Merge branch '4.1' into 4.2
* 4.1:
  [Twig] Replace for-loops with blocks for attributes
  fixed CS
  [Tests] Change to willThrowException
  [Console] fix PHPDoc in Command
  Update FileLoaderLoadException.php
  Fix wrong calls to clearstatcache
  Add Vietnamese translation for validators
  Allow running PHPUnit with "xdebug.scream" ON
  [VarDumper] Add descriptors tests
  [Yaml] detect circular references
  [DI] fix reporting bindings on overriden services as unused
  [Routing] minor fix or previous PR
2018-12-24 11:01:29 +01:00
Nicolas Grekas
ed1500fb4b Merge branch '3.4' into 4.1
* 3.4:
  [Twig] Replace for-loops with blocks for attributes
  [DI] fix reporting bindings on overriden services as unused
2018-12-24 10:43:03 +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
57dad6640b feature #29599 [Routing] Allow force-generation of trailing parameters using eg "/exports/news.{!_format}" (zavulon)
This PR was squashed before being merged into the 4.3-dev branch (closes #29599).

Discussion
----------

[Routing] Allow force-generation of trailing parameters using eg "/exports/news.{!_format}"

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

When a route is defined as path: `/exports/news.{!_format}`, we should force `_format` be defined in `defaults` and the generator should generate URLs with that default when none is provided (should work with any parameter of course).

Commits
-------

9fab3d62ec [Routing] Allow force-generation of trailing parameters using eg \"/exports/news.{!_format}\"
2018-12-24 10:28:22 +01:00
Vladimir Luchaninov
9fab3d62ec [Routing] Allow force-generation of trailing parameters using eg \"/exports/news.{!_format}\" 2018-12-24 10:28:14 +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
Fabien Potencier
34274d4e1e minor #29642 [VarDumper] Add descriptors tests (ogizanagi)
This PR was merged into the 4.1 branch.

Discussion
----------

[VarDumper] Add descriptors tests

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- 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 | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Just adding some tests for these classes & fixing a small issue with the optional `project_dir` entry from `source` context provider.

If merged before #29613, I'll update tests in it (796ca6b4c6b6f758383ec37ebec952d0fe0ccfe0) (otherwise could be picked on merge).

Commits
-------

8570b8af2a [VarDumper] Add descriptors tests
2018-12-23 15:12:51 +01:00
Fabien Potencier
842c5943dc fixed CS 2018-12-23 15:08:41 +01:00
Fabien Potencier
729edde312 Merge branch '3.4' into 4.1
* 3.4:
  [Tests] Change to willThrowException
  [Console] fix PHPDoc in Command
  Fix wrong calls to clearstatcache
  Add Vietnamese translation for validators
  Allow running PHPUnit with "xdebug.scream" ON
  [Yaml] detect circular references
2018-12-23 15:06:12 +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
azjezz
2021f9ecbb
Update FileLoaderLoadException.php 2018-12-22 20:20:16 +01:00
Andreas Braun
596b9812e3
Fix wrong calls to clearstatcache 2018-12-22 14:25:23 +01:00
Nicolas Grekas
5f737e836e feature #29613 [VarDumper] Use hyperlinks in CliDescriptor (ogizanagi)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] Use hyperlinks in CliDescriptor

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

Leverages #29168 to add the hyperlink directly on the source text instead of printing below:

#### Before (or with `symfony/console < 4.3`)

![capture d ecran 2018-12-14 a 16 37 18](https://user-images.githubusercontent.com/2211145/50012891-1e2efe00-ffc0-11e8-9e07-b5358cb057bd.png)

#### After

![capture d ecran 2018-12-14 a 16 12 13](https://user-images.githubusercontent.com/2211145/50012921-25560c00-ffc0-11e8-92cd-d6efd43419f9.png)

Commits
-------

e54e21933a [VarDumper] Use hyperlinks in CliDescriptor
2018-12-20 13:55:11 +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 Grekas
9337422aa4 bug #29644 [Cache] fix bad optim (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] fix bad optim

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

Commits
-------

b76d4ea95f [Cache] fix bad optim
2018-12-19 20:03:56 +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
Nicolas Grekas
55113775c0 Merge branch '4.2'
* 4.2:
  [Cache] fix test
2018-12-19 10:29:56 +01:00
Nicolas Grekas
9ade0a7605 [Cache] fix test 2018-12-19 10:29:46 +01:00
Nicolas Grekas
96285882cf Merge branch '4.2'
* 4.2:
  [Cache] fix Simple\Psr6Cache proxying of metadata
2018-12-19 10:10:47 +01:00
Nicolas Grekas
02edc9b049 [Cache] fix Simple\Psr6Cache proxying of metadata 2018-12-19 10:07:27 +01:00
Maxime Steinhausser
8570b8af2a [VarDumper] Add descriptors tests 2018-12-18 22:25:45 +01:00
Nicolas Grekas
b76d4ea95f [Cache] fix bad optim 2018-12-18 18:14:53 +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
Alexandre Quercia
cf850c1a15
[HttpFoundation] Fix request uri when it starts with double slashes 2018-12-17 16:40:03 +01:00
Nicolas Grekas
562448ad24 feature #28581 [DomCrawler] return empty string on Crawler::text() and Crawler::html() instead of an exception (respinoza)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DomCrawler] return empty string on `Crawler::text()` and `Crawler::html()` instead of an exception

…stead of an exception

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

This changes the behavior when using text and html methods from the Crawler by returning null instead of throwing an exception.

Commits
-------

6a4ce386fe [DomCrawler] Added ability to return a default value in `text()` and `html()` instead of throwing an exception when node is empty.
2018-12-17 15:58:40 +01:00
Roberto Espinoza
6a4ce386fe [DomCrawler] Added ability to return a default value in text() and html() instead of throwing an exception when node is empty. 2018-12-17 15:56:38 +01:00
Nicolas Grekas
64e2449f8e Revert "bug #29409 Fix env fallback to an unresolved variable (jderusse)"
This reverts commit ab95ae3f7a, reversing
changes made to 8a6090793b.
2018-12-17 15:44:10 +01:00
Nicolas Grekas
48658d957a Merge branch '4.2'
* 4.2:
  [FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock
  Fix env fallback to an unresolved variable
  [DI] map snake-case ids of service subscribers to camel-case autowiring aliases
2018-12-17 15:43:57 +01:00
Serkan Yildiz
485ed4dd19 [FrameworkBundle] decouple debug:autowiring from phpdocumentor/reflection-docblock 2018-12-17 15:23:57 +01:00
Nicolas Grekas
5333bd2fb7 bug #29546 [DI] map snake-case ids of service subscribers to camel-case autowiring aliases (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[DI] map snake-case ids of service subscribers to camel-case autowiring aliases

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

Discovered during the workshop at SymfonyCon Lisbon.

Commits
-------

af17da9f82 [DI] map snake-case ids of service subscribers to camel-case autowiring aliases
2018-12-17 14:54:22 +01:00
Jérémy Derussé
ad6df01b9f Fix env fallback to an unresolved variable 2018-12-17 14:52:50 +01:00
Nicolas Grekas
af038a6067 minor #29620 [Console] Test href case conservation (ogizanagi)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Console] Test href case conservation

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

Expecting this test to fail until https://github.com/symfony/symfony/pull/29619 is merged up.

Commits
-------

2b55d1504e [Console] Test href case conservation
2018-12-17 14:51:43 +01:00
Nicolas Grekas
75eebcf7dc Merge branch '4.2'
* 4.2:
  [Routing] fix trailing slash redirections involving a trailing var
  [EventDispatcher] Revers event tracing order
  [Security] Prefer clone over unserialize(serialize()) for user refreshment
  [Console] OutputFormatter: move strtolower to createStyleFromString
  Adjust tests to work in the armhf architecture. Fixes #29281.
  Vietnamese translations improvement
  [Form] Fixed FormErrorIterator class phpdoc
  Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
  Don't use he in docs when its not needed
  EventSubscriberInterface isn't a man
  Fix undefined variable in cache ArrayTrait
  fixed public directory of web server and assets install when configured in composer.json
2018-12-17 14:49:19 +01:00
Nicolas Grekas
1dbb3746b2 [Routing] minor fix or previous PR 2018-12-17 14:44:21 +01:00
Nicolas Grekas
8a6090793b Merge branch '4.1' into 4.2
* 4.1:
  [Routing] fix trailing slash redirections involving a trailing var
  [EventDispatcher] Revers event tracing order
  [Security] Prefer clone over unserialize(serialize()) for user refreshment
  [Console] OutputFormatter: move strtolower to createStyleFromString
  Adjust tests to work in the armhf architecture. Fixes #29281.
  Vietnamese translations improvement
  [Form] Fixed FormErrorIterator class phpdoc
  Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
  Don't use he in docs when its not needed
  EventSubscriberInterface isn't a man
  fixed public directory of web server and assets install when configured in composer.json
2018-12-17 14:32:53 +01:00
Nicolas Grekas
40a79f750f bug #29626 [Routing] fix trailing slash redirections involving a trailing var (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] fix trailing slash redirections involving a trailing var

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

The code in `PhpMatcherDumper` is terrible, but the good news is that 4.2 is much better already.
The change in `UrlMatcher` is much more readable and implements the same fixed logic.
The new test case is in `UrlMatcherTest`.

Commits
-------

6433f8a3e9 [Routing] fix trailing slash redirections involving a trailing var
2018-12-17 11:23:48 +01:00
Nicolas Grekas
7ccd4df8ad Merge branch '3.4' into 4.1
* 3.4:
  [EventDispatcher] Revers event tracing order
  [Security] Prefer clone over unserialize(serialize()) for user refreshment
  [Console] OutputFormatter: move strtolower to createStyleFromString
  Adjust tests to work in the armhf architecture. Fixes #29281.
  Vietnamese translations improvement
  [Form] Fixed FormErrorIterator class phpdoc
  Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
  Don't use he in docs when its not needed
  EventSubscriberInterface isn't a man
  fixed public directory of web server and assets install when configured in composer.json
2018-12-17 11:22:03 +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
Nicolas Grekas
6433f8a3e9 [Routing] fix trailing slash redirections involving a trailing var 2018-12-17 09:26:05 +01:00
Roland Franssen
2570d6f877 [EventDispatcher] Revers event tracing order 2018-12-16 11:39:27 +01:00
Maxime Steinhausser
2b55d1504e [Console] Test href case conservation 2018-12-15 11:39:52 +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
Maxime Steinhausser
e54e21933a [VarDumper] Use hyperlinks in CliDescriptor 2018-12-14 16:36:24 +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
f2590d196f feature #29286 [WebProfilerBundle] Enable translation filters (ro0NL)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[WebProfilerBundle] Enable translation filters

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

Enable filters in the translation panel:

![image](https://user-images.githubusercontent.com/1047696/48918835-724a3500-ee8f-11e8-9d1b-6d464314fe2a.png)

![image](https://user-images.githubusercontent.com/1047696/48918876-b806fd80-ee8f-11e8-8d4d-1f3fa81dd9ce.png)

Commits
-------

9ae2bb45b2 [WebProfilerBundle] Enable translation filters
2018-12-13 15:06:49 +01:00
Nicolas Grekas
0d2fb4b977 bug #29591 [Cache] Fix undefined variable in ArrayTrait (eXtreme)
This PR was merged into the 4.2 branch.

Discussion
----------

[Cache] Fix undefined variable in ArrayTrait

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

After upgrading my project to 4.2 my tests failed with a message that `$key` variable is missing here: e81285249b/src/Symfony/Component/Cache/Traits/ArrayTrait.php (L131) which seems to be introduced with PR https://github.com/symfony/symfony/pull/27563.

So I added that variable to the trait and method calls (are there any other?). This is internal class so I guess noone is using it anywhere.

Anyway, my tests pass with this fix.

Commits
-------

b0b5937d1d Fix undefined variable in cache ArrayTrait
2018-12-13 14:38:51 +01:00
Jacek Jędrzejewski
b0b5937d1d Fix undefined variable in cache ArrayTrait 2018-12-13 14:24:29 +01:00
Nicolas Grekas
1e0165ba94 Fix deps=low 2018-12-13 14:01:35 +01:00
Nicolas Grekas
df4ad4e7d4 Merge branch '4.2'
* 4.2: (27 commits)
  [VarExporter] dont call userland code with uninitialized objects
  Fix typos in doc blocks
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [Messenger] Restore message handlers laziness
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  Optimize perf by replacing call_user_func with dynamic vars
  [Cache] Fix dsn parsing
  [Routing] fix dumping same-path routes with placeholders
  [WebProfilerBundle][TwigBundle] CSS fixes
  Add a docblock for FormFactoryInterface
  [Security] defer log message in guard authenticator
  [Validator] Added IBAN format for Vatican City State
  merge conflicts
  ...
2018-12-13 13:43:21 +01:00
Nicolas Grekas
b88728a13a Merge branch '4.1' into 4.2
* 4.1:
  Fix typos in doc blocks
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  Optimize perf by replacing call_user_func with dynamic vars
  [Routing] fix dumping same-path routes with placeholders
  [Security] defer log message in guard authenticator
  [Validator] Added IBAN format for Vatican City State
  merge conflicts
  filter out invalid Intl values
  filter out invalid language values
  [Validator] Fixed grouped composite constraints
  [Form] Filter arrays out of scalar form types
  Fix HeaderBag::get phpdoc
2018-12-13 13:39:50 +01:00
Nicolas Grekas
547bf26eee Merge branch '3.4' into 4.1
* 3.4:
  [Debug] ignore underscore vs backslash namespaces in DebugClassLoader
  [TwigBridge][Form] Prevent multiple rendering of form collection prototypes
  [FrameworkBundle] fix describing routes with no controllers
  [DI] move RegisterServiceSubscribersPass before DecoratorServicePass
  Update ValidationListener.php
  [Yaml] ensures that the mb_internal_encoding is reset to its initial value
  [WebLink] Fixed documentation link
  [Security] getTargetPath of TargetPathTrait must return string or null
  [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument
  [Security] defer log message in guard authenticator
  merge conflicts
  Fix HeaderBag::get phpdoc
2018-12-13 13:30:33 +01:00
karser
2f0e948bf0 [Hackday][Messenger] Add an alias for transport.symfony_serializer so SerializerInterface can be autowired 2018-12-13 11:40:41 +01:00
Chris Wilkinson
9bf313660d Increase priority of AddRequestFormatsListener 2018-12-13 10:20:24 +00:00
Chris Wilkinson
02c9f352d9 Set the default locale early 2018-12-13 10:16:14 +00:00
Nicolas Grekas
0b99a8e28c bug #29558 [Messenger] Restore message handlers laziness (chalasr)
This PR was merged into the 4.2 branch.

Discussion
----------

[Messenger] Restore message handlers laziness

| Q             | A
| ------------- | ---
| Branch?       | 4.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

The `HandlersLocator` introduced in 4.2 currently needs to instantiate all message handlers of the bus in order to be wired, while they were lazily loaded in 4.1 via ContainerHandlerLocator (removed).

Example:
```yaml
framework:
    messenger:
        buses:
            messenger.bus.command: ~
services:
    App\Messenger\:
        resource: '../src/Messenger/*Handler.php'
        tags:
            - { name: messenger.message_handler, bus: messenger.bus.command }
```

```php
namespace App\Messenger;

class BarCommand {}
class BarCommandHandler { public function __invoke(BarCommand $command): void {} }

class FooCommand {}
class FooCommandHandler { public function __invoke(FooCommand $command): void {} }
```
(Dumped `HandleMessageMiddleware` factory) Before:

```php
return $this->privates['messenger.bus.command.middleware.handle_message'] = new \Symfony\Component\Messenger\Middleware\HandleMessageMiddleware(new \Symfony\Component\Messenger\Handler\HandlersLocator(array(
    'App\\Messenger\\BarCommand' => \current(array(0 => array(0 => new \App\Messenger\BarCommandHandler()))),
    'App\\Messenger\\FooCommand' => \current(array(0 => array(0 => new \App\Messenger\FooCommandHandler())))
)));
```

After:
```php
return $this->privates['messenger.bus.command.middleware.handle_message'] = new \Symfony\Component\Messenger\Middleware\HandleMessageMiddleware(new \Symfony\Component\Messenger\Handler\HandlersLocator(array(
    'App\\Messenger\\BarCommand' => new RewindableGenerator(function () {
        yield 0 => ($this->privates['App\Messenger\BarCommandHandler'] ?? ($this->privates['App\Messenger\BarCommandHandler'] = new \App\Messenger\BarCommandHandler()));
    }, 1),
    'App\\Messenger\\FooCommand' => new RewindableGenerator(function () {
        yield 0 => ($this->privates['App\Messenger\FooCommandHandler'] ?? ($this->privates['App\Messenger\FooCommandHandler'] = new \App\Messenger\FooCommandHandler()));
    }, 1)
)));
```

Commits
-------

c608e731a9 [Messenger] Restore message handlers laziness
2018-12-13 09:58:21 +01:00
Nicolas Grekas
d12a6d0330 feature #29108 [DI] compute autowiring error messages lazily (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DI] compute autowiring error messages lazily

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

As suggested in the linked issue:

> the error message may ultimately be "hidden" because the definition in question is removed... and so we're doing work unnecessarily.

Commits
-------

3b3a1bd3cc [DI] compute autowiring error messages lazily
2018-12-13 09:09:52 +01:00
Nicolas Grekas
58c7ad46c4 feature #29235 [VarDumper] add support for links in CliDumper (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[VarDumper] add support for links in CliDumper

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

Same as #29168 for VarDumper:

![capture d ecran de 2018-11-15 20-10-08](https://user-images.githubusercontent.com/243674/48576196-24c04c00-e914-11e8-8a61-c1304c876243.png)

Thanks @ostrolucky for this nice discovery!

Commits
-------

e7cd44f5b2 [VarDumper] add support for links in CliDumper
2018-12-13 09:09:04 +01:00