Commit Graph

32384 Commits

Author SHA1 Message Date
Javier Eguiluz
de4f8ac21d Added instructions to upgrade Symfony applications to 4.x 2017-10-28 17:03:09 +02:00
Fabien Potencier
4910ac6fe9 bug #24686 Fix $_ENV/$_SERVER precedence in test framework (fabpot)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix $_ENV/$_SERVER precedence in test framework

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

When defining env vars values in `phpunit.xml.dist`, we are using `<env ...>`. PHPUnit registers those env vars in `$_ENV`, but not in `$_SERVER`. This means that those values might not be used by Symfony if env vars defined in `.env` are automatically registered (which is my case).

In any case, I think it makes sense to make `$_ENV` take precedence as this is how we register them in `phpunit.xml.dist`.

Commits
-------

6ed9919d24 fixed $_ENV/$_SERVER precedence in test framework
2017-10-26 09:22:06 -07:00
Fabien Potencier
6ed9919d24 fixed $_ENV/$_SERVER precedence in test framework 2017-10-25 18:38:07 -07:00
Fabien Potencier
6cf3d5681a bug #24673 [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop) (dunglas)
This PR was squashed before being merged into the 3.3 branch (closes #24673).

Discussion
----------

[DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

If an environment variable is used to build a service name (like in [this snippet](4b3d1abfe5/src/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php (L471))), an infinite loop occurs.

It's common to build dynamic service names (in a compiler pass), if the dynamic part comes from a parameter, this bug can occurs.

Commits
-------

14e30857ea [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop)
2017-10-25 18:14:48 -07:00
Kévin Dunglas
14e30857ea [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop) 2017-10-25 18:14:47 -07:00
Nicolas Grekas
ea3a9a9f96 Revert "minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)"
This reverts commit 41509a2dcf, reversing
changes made to 3e3e74c3fa.
2017-10-25 18:54:16 +02:00
Nicolas Grekas
41509a2dcf minor #24685 Make it easy for Drupal to use the PHPUnit bridge (alexpott)
This PR was squashed before being merged into the 3.3 branch (closes #24685).

Discussion
----------

Make it easy for Drupal to use the PHPUnit bridge

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Drupal doesn't use src/Symfony/Bridge/PhpUnit/bin/simple-phpunit but would like to use the deprecation collection features of src/Symfony/Bridge/PhpUnit. The checks in src/Symfony/Bridge/PhpUnit/bootstrap.php mean that this is difficult because they rely on simple-phpunit - but I'm not sure that that is necessary.

Commits
-------

1de6bf8 Make it easy for Drupal to use the PHPUnit bridge
2017-10-25 16:41:27 +02:00
Alex Pott
1de6bf87b9 Make it easy for Drupal to use the PHPUnit bridge 2017-10-25 16:41:18 +02:00
Nicolas Grekas
3e3e74c3fa Fix phpunit bridge 2017-10-25 11:55:09 +02:00
Nicolas Grekas
7e6e2f07e2 Fix simple-phpunit 2017-10-25 11:25:11 +02:00
Nicolas Grekas
107705abd3 bug #24681 Fix isolated error handling (alexpott)
This PR was squashed before being merged into the 3.3 branch (closes #24681).

Discussion
----------

Fix isolated error handling

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Fixes \Symfony\Bridge\PhpUnit\Tests\ProcessIsolationTest on PHP5.5 and PHP5.6 and (probably) HHVM.

Commits
-------

b1a2205 Fix isolated error handling
2017-10-25 10:01:09 +02:00
Alex Pott
b1a22059e7 Fix isolated error handling 2017-10-25 10:00:59 +02:00
Nicolas Grekas
e6d949b233 minor #24604 Fix deprecation triggering test deduction (alexpott)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix deprecation triggering test deduction

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
This PR is just testing some additions https://github.com/symfony/symfony/pull/24597 - I want to see if the travis run is successful.

Commits
-------

5333680 Fix review points
2017-10-24 19:16:44 +02:00
Nicolas Grekas
8984260f38 bug #24575 Ensure that PHPUnit's error handler is still working in isolated tests (alexpott)
This PR was squashed before being merged into the 3.3 branch (closes #24575).

Discussion
----------

Ensure that PHPUnit's error handler is still working in isolated tests

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

This PR fixes the \Symfony\Bridge\PhpUnit\Tests\ProcessIsolationTest and adds new coverage to ensure PHPUnit error handling works as expected. Tested with both PHPUnit 4.8.35 and 6.2.4

Commits
-------

dc7e5a3 Ensure that PHPUnit's error handler is still working in isolated tests
2017-10-24 19:15:55 +02:00
Alex Pott
dc7e5a39fa Ensure that PHPUnit's error handler is still working in isolated tests 2017-10-24 19:15:51 +02:00
Alex Pott
5333680f7d Fix review points 2017-10-24 17:40:01 +01:00
Nicolas Grekas
4365d23e38 bug #24597 [PhpUnitBridge] fix deprecation triggering test detection (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[PhpUnitBridge] fix deprecation triggering test detection

| 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/24548#issuecomment-336438768, #24568
| License       | MIT
| Doc PR        |

Commits
-------

da617e8 fix deprecation triggering test detection
2017-10-24 17:58:59 +02:00
Robin Chalas
d9746d45b1 fix merge 2017-10-24 16:40:00 +02:00
Nicolas Grekas
7fb9f614ee Merge branch '2.8' into 3.3
* 2.8:
  [DI] minor docblock fixes
2017-10-24 16:05:06 +02:00
Nicolas Grekas
2b95ba3299 Merge branch '2.7' into 2.8
* 2.7:
  [DI] minor docblock fixes
2017-10-24 15:48:52 +02:00
Nicolas Grekas
962687e64f minor #24663 [DI] minor docblock fixes (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] minor docblock fixes

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

As found in #24611

Commits
-------

0c9edaf [DI] minor docblock fixes
2017-10-24 15:38:54 +02:00
Nicolas Grekas
c73ee30f6a Merge branch '2.8' into 3.3
* 2.8:
  [2.8] Fix some docblocks
  Escape trailing \ in QuestionHelper autocompletion
  Add "doctrine/annotations" to top-level composer.json
  Remove inapplicable phpdoc comment
  nit: Fix phpdoc inconsistency and unreachable statement
2017-10-24 14:44:43 +02:00
Nicolas Grekas
2627081a90 Merge branch '2.7' into 2.8
* 2.7:
  Escape trailing \ in QuestionHelper autocompletion
  Add "doctrine/annotations" to top-level composer.json
  nit: Fix phpdoc inconsistency and unreachable statement
2017-10-24 14:43:40 +02:00
Nicolas Grekas
6ad4fa4b06 minor #24664 [2.8] Fix some docblocks (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Fix some docblocks

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

Commits
-------

1cfd7de [2.8] Fix some docblocks
2017-10-24 14:41:51 +02:00
Nicolas Grekas
aa49a0006b bug #24660 Escape trailing \ in QuestionHelper autocompletion (kamazee)
This PR was merged into the 2.7 branch.

Discussion
----------

Escape trailing \ in QuestionHelper autocompletion

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

Fixes symfony/symfony#24652
Trailing backslash, being unescaped, used to escape closing formatting
tag and, thus, formatting tag appeared in autocompletion

Output of the added test without the fix:
```
./phpunit --filter testAutocompleteWithTrailingBackslash src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php
#!/usr/bin/env php
PHPUnit 6.0.13 by Sebastian Bergmann and contributors.

Testing Symfony\Component\Console\Tests\Helper\QuestionHelperTest
F                                                                   1 / 1 (100%)

Time: 4.28 seconds, Memory: 6.00MB

There was 1 failure:

1) Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testAutocompleteWithTrailingBackslash
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'ExampleNamespace\'
+'ExampleNamespace</hl>'
```

`OutputFormatter::escapeTrailingBackslash` is marked as `@internal`; however, this seems to be a valid use without exposing outside of the component. `OutputFormatter::escape`, which is not internal, doesn't fit here because escaping tags in autocompletion options is a deeper topic: there might be a valid use for tags in autocompletion and even if not, taking out the possibility to use them might be considered a BC break (even though it hasn't been advertised anywhere).

Commits
-------

0c0f1da Escape trailing \ in QuestionHelper autocompletion
2017-10-24 14:32:50 +02:00
Nicolas Grekas
d3e419a36b minor #24658 Add "doctrine/annotations" to top-level composer.json (siwinski)
This PR was merged into the 2.7 branch.

Discussion
----------

Add "doctrine/annotations" to top-level composer.json

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

Adding to top-level composer.json as require-dev since it is already dev-required by the following:

* `src/Symfony/Bundle/FrameworkBundle/composer.json`:        `"doctrine/annotations": "~1.0"`
* `src/Symfony/Bundle/TwigBundle/composer.json`:        `"doctrine/annotations": "~1.0"`
* `src/Symfony/Component/PropertyInfo/composer.json`:        `"doctrine/annotations": "~1.0"`
* `src/Symfony/Component/Routing/composer.json`:        `"doctrine/annotations": "~1.0",`
* `src/Symfony/Component/Serializer/composer.json`:        `"doctrine/annotations": "~1.0",`
* `src/Symfony/Component/Validator/composer.json`:        `"doctrine/annotations": "~1.0",`

Commits
-------

3cdf4eb Add "doctrine/annotations" to top-level composer.json
2017-10-24 14:30:32 +02:00
Nicolas Grekas
2dc8534f13 bug #24598 Prefer line formatter on missing cli dumper (greg0ire)
This PR was merged into the 3.3 branch.

Discussion
----------

Prefer line formatter on missing cli dumper

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none, but closes https://github.com/symfony/recipes/pull/145
| License       | MIT
| Doc PR        | n/a

The console formatter does a better job, unless the VarDumper component
is missing, in which case the LineFormatter should be preferred.

Commits
-------

574f9f5 Prefer line formatter on missing cli dumper
2017-10-24 14:19:44 +02:00
Nicolas Grekas
0c9edaf336 [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
Nicolas Grekas
1cfd7de0dc [2.8] Fix some docblocks 2017-10-23 15:27:00 +02:00
Fabien Potencier
0aaab0537c minor #24649 Fix minor inconsistencies and no-op sprintf detected by static analysis (TysonAndre)
This PR was merged into the 3.3 branch.

Discussion
----------

Fix minor inconsistencies and no-op sprintf detected by static analysis

and fix required param after optional param

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

Commits
-------

c9ddd68ea6 Fix phpdoc inconsistencies, simplify no-op sprintf.
2017-10-22 08:27:28 -07:00
Alexander Kurilo
0c0f1da67d Escape trailing \ in QuestionHelper autocompletion
Fixes symfony/symfony#24652
Trailing backslash, being unescaped, used to escape closing formatting
tag and, thus, formatting tag appeared in autocompletion
2017-10-22 14:12:24 +03:00
Maxime Steinhausser
e366a98dc4 minor #24657 Remove inapplicable phpdoc comment (TysonAndre)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove inapplicable phpdoc comment

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

Commits
-------

7a7bda7de7 Remove inapplicable phpdoc comment
2017-10-22 10:25:55 +02:00
Maxime Steinhausser
0f9c6e6682 minor #24656 nit: Fix phpdoc inconsistency and unreachable statement (TysonAndre)
This PR was merged into the 2.7 branch.

Discussion
----------

nit: Fix phpdoc inconsistency and unreachable statement

(detected by static analysis)

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

Commits
-------

44a21cd195 nit: Fix phpdoc inconsistency and unreachable statement
2017-10-22 10:24:23 +02:00
Maxime Steinhausser
b93ed8d8fa [FrameworkBundle][Serializer] Remove outdated condition 2017-10-22 01:30:07 +02:00
Shawn Iwinski
3cdf4ebba4 Add "doctrine/annotations" to top-level composer.json
Adding to top-level composer.json as require-dev since it is already dev-required by the following:

* src/Symfony/Bundle/FrameworkBundle/composer.json:        "doctrine/annotations": "~1.0"
* src/Symfony/Bundle/TwigBundle/composer.json:        "doctrine/annotations": "~1.0"
* src/Symfony/Component/PropertyInfo/composer.json:        "doctrine/annotations": "~1.0"
* src/Symfony/Component/Routing/composer.json:        "doctrine/annotations": "~1.0",
* src/Symfony/Component/Serializer/composer.json:        "doctrine/annotations": "~1.0",
* src/Symfony/Component/Validator/composer.json:        "doctrine/annotations": "~1.0",
2017-10-21 16:32:46 -04:00
Tyson Andre
c9ddd68ea6 Fix phpdoc inconsistencies, simplify no-op sprintf.
(detected by static analysis)
2017-10-21 13:27:13 -07:00
Tyson Andre
7a7bda7de7 Remove inapplicable phpdoc comment 2017-10-21 13:23:55 -07:00
Tyson Andre
44a21cd195 nit: Fix phpdoc inconsistency and unreachable statement
(detected by static analysis)
2017-10-21 13:19:30 -07:00
Nicolas Grekas
beed426e9a minor #24582 [DI] Enhance service locator error message (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Enhance service locator error message

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

See linked issue.

Commits
-------

fdb0ea9 [DI] Enhance service locator error message
2017-10-20 12:00:26 -07:00
Fabien Potencier
402246ebaa Merge branch '2.8' into 3.3
* 2.8:
  [Routing] Fix resource miss
  [Security] Fixed auth provider authenticate() cannot return void
  declare argument type
  streamed response should return $this
  content can be a resource
  Adding the Form default theme files to be warmed up in Twig's cache
2017-10-20 11:30:21 -07:00
Fabien Potencier
77a74df487 Merge branch '2.7' into 2.8
* 2.7:
  [Security] Fixed auth provider authenticate() cannot return void
  declare argument type
  streamed response should return $this
  content can be a resource
2017-10-20 11:30:07 -07:00
Fabien Potencier
2661da415e bug #24644 [Security] Fixed auth provider authenticate() cannot return void (glye)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fixed auth provider authenticate() cannot return void

| Q             | A
| ------------- | ---
| Branch?       | 2.7 and up
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (arguably)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The `AuthenticationManagerInterface` [requires](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php#L30) that `authenticate()` must return a TokenInterface, never null. Several authentication providers are violating this. Changed to throw exception instead.

See discussion in earlier PR https://github.com/symfony/symfony/pull/24585 which was changing the docblock rather than the implementations.

Commits
-------

6e18b56b77 [Security] Fixed auth provider authenticate() cannot return void
2017-10-20 11:28:37 -07:00
Fabien Potencier
5e7a03b288 minor #24622 declare type AcceptHeaderItem for array_map (DQNEO)
This PR was merged into the 2.7 branch.

Discussion
----------

declare type AcceptHeaderItem  for array_map

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

In `array_filter` , argument type is declared.
https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/HttpFoundation/AcceptHeader.php#L133
So It's natural to do so in `array_map` too.

Commits
-------

ab8f5be40c declare argument type
2017-10-20 11:23:47 -07:00
Fabien Potencier
9d66c90934 bug #24642 [Routing] Fix resource miss (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #24642).

Discussion
----------

[Routing] Fix resource miss

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Some routing resources are not watched. To reproduce:

1. Install Symfony 4
2. Change something in `config/routes.yaml`

The change is not taken into account.

This PR fixes this bug.

Commits
-------

6610c25cd6 [Routing] Fix resource miss
2017-10-20 11:22:07 -07:00
Kévin Dunglas
6610c25cd6 [Routing] Fix resource miss 2017-10-20 11:22:06 -07:00
Gunnstein Lye
6e18b56b77 [Security] Fixed auth provider authenticate() cannot return void
The AuthenticationManagerInterface requires that authenticate() must return a TokenInterface, never null.
Several authentication providers are violating this. Changed to throw exception instead.
2017-10-20 16:23:30 +02:00
Christian Flothmann
da617e8624 fix deprecation triggering test detection 2017-10-20 11:26:45 +02:00
DQNEO
ab8f5be40c declare argument type 2017-10-20 13:13:59 +09:00
Fabien Potencier
2f1af1b749 minor #24634 [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks (ogizanagi)
This PR was squashed before being merged into the 3.3 branch (closes #24634).

Discussion
----------

[FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

- `DataUriNormalizer` was added in 3.1 (cc7b5af170 (diff-b7fc65c7d852312152e353f395fc70a8))

- `DateTimeNormalizer` was added in 3.1 (6749a70326 (diff-17828084c07e429d87a1754420d312ef))

- `JsonSerializableNormalizer` was added in 3.1 (a6788813fa (diff-537ddf87a3d7ff914be4244a1e0c07f0))

- `YamlEncoder` was added in 3.2 (9366a7dc77 (diff-11720cb963c63bb0ad3fb23aba4ae294))
    `Yaml::DUMP_OBJECT` was added in 3.1 (286103b225 (diff-5199351a5995f15f224160f6969931c5R23))

- `CsvEncoder` was added in 3.2 (e71f5bea96 (diff-4de6bbbd40ea769ada711de28fb180c8))

while on 3.3, FrameworkBundle [conflicts](https://github.com/symfony/symfony/blob/3.3/src/Symfony/Bundle/FrameworkBundle/composer.json#L70) with `"symfony/serializer": "<3.3"` and both 3.1 and 3.2 are EOL anyway.

Moving these definitions to the `serializer.xml` file unclutters a bit the `FrameworkExtension`, make things clear about these service being always registered and allows the PhpStorm's Symfony plugin to properly detect and jump to them from classes.

Commits
-------

0d7657b306 [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks
2017-10-19 13:37:59 -07:00
Maxime Steinhausser
0d7657b306 [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks 2017-10-19 13:37:57 -07:00