Commit Graph

43157 Commits

Author SHA1 Message Date
Christian Flothmann
12bf0b07f8 ignore not existing translator service 2019-07-23 13:15:07 +02:00
Nicolas Grekas
30a19863f9 Merge branch '3.4' into 4.2
* 3.4:
  [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
  revert private properties handling
  [HttpFoundation] Fix URLs
  [VarDumper] finish PHP 7.4 support and add tests
  [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
  Ignore missing translation dependency in FrameworkBundle
  [Debug][ExceptionHandler] Add tests for custom handlers
2019-07-23 11:50:15 +02:00
Nicolas Grekas
396f4bee04 feature #32582 [Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader

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

This PR aims at deprecating some things to have a more consistent code.

### ServiceRouterLoader

1. This class actually fetches an object from a container. In https://github.com/symfony/symfony/pull/30926#discussion_r281170917, it was suggested that it should be renamed to `ContainerRouteLoader`. Actually I think it's better to rename it to `ContainerLoader` since all others route loaders does not have "Route" in their name. Let's be consistent!

2. This class is in a `DependencyInjection` sub directory for historical reasons. Let's remove that! It accepts any PSR-11 container.

### ObjectRouteLoader

1. This class has "Route" in its name too. Let's rename it!

2. This class is supposed to be an abstract implementation for "object" loaders to reuse, but in its code it has a lot of references to "services". Let's remove those references! That means renaming some methods, altering messages, etc.. That also means removing the `supports` method from it to let extending classes implement it.

3. IMHO, this abstract implementation is useless. We sould just deprecate the whole class and move the implemention in the `ContainerLoader` class.

Commits
-------

154810119d [Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader
2019-07-23 11:46:29 +02:00
Nicolas Grekas
789c33048e minor #32619 [Debug][ExceptionHandler] Add tests for custom handlers (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug][ExceptionHandler] Add tests for custom handlers

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

In https://github.com/symfony/symfony/pull/31694 I mixed many things but the whole PR was closed. I wrote some tests for custom handlers + the handle tests don't use mock anymore

I think they are useful even if the `ExceptionHandler` will disappear in the new component because it will still exists in 4.4 for the next 3 years.

Commits
-------

c53e25332a [Debug][ExceptionHandler] Add tests for custom handlers
2019-07-23 10:39:19 +02:00
Nicolas Grekas
e45c7a3251 minor #32625 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion (janvt)
This PR was squashed before being merged into the 3.4 branch (closes #32625).

Discussion
----------

[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion

FrameworkBundle & SecurityBundle each had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
class has been renamed to AbstractWebTestCase and made abstract.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (or, yes, but internal class)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32577
| License       | MIT

This PR is to ease integration, as not all test classes are present in all currently
maintained branches.

See https://github.com/symfony/symfony/pull/32617

Commits
-------

775d970927 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
2019-07-23 10:36:14 +02:00
Jan van Thoor
775d970927 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion 2019-07-23 10:36:08 +02:00
Nicolas Grekas
90acd03c13 minor #32672 [VarDumper] revert private properties handling (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] revert private properties handling

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

Commits
-------

9bad90578a revert private properties handling
2019-07-23 10:33:50 +02:00
Christian Flothmann
9bad90578a revert private properties handling 2019-07-23 10:29:16 +02:00
Nicolas Grekas
2ab1521388 minor #32671 [Lock] Add missing changelog entry for Factory deprecation (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Add missing changelog entry for Factory deprecation

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

Add missing changelog entry for the deprecation of the Factory into LockFactory

Commits
-------

c6daa617b0 [Lock] Add missing changelog entry for Factory deprecation
2019-07-23 09:37:51 +02:00
Amrouche Hamza
c6daa617b0
[Lock] Add missing changelog entry for Factory deprecation 2019-07-23 09:12:19 +02:00
Fabien Potencier
12f99c09c4 feature #32661 [ErrorRenderer] Improving the exception page provided by HtmlErrorRenderer (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32661).

Discussion
----------

[ErrorRenderer] Improving the exception page provided by HtmlErrorRenderer

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

As part of the component responsability, this proposal is intended to provide a full exception page (advanced) in debug mode, just like the one provided by TwigBundle which would be deprecated.

Commits
-------

5d76eb7b86 [ErrorRenderer] Improving the exception page provided by HtmlErrorRenderer
2019-07-23 08:35:18 +02:00
Yonel Ceruto
5d76eb7b86 [ErrorRenderer] Improving the exception page provided by HtmlErrorRenderer 2019-07-23 08:34:52 +02:00
Fabien Potencier
828ba66d4a minor #32632 [HttpFoundation] Fix URLs (Arman-Hosseini)
This PR was squashed before being merged into the 3.4 branch (closes #32632).

Discussion
----------

[HttpFoundation] Fix URLs

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please 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 -->

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

be53c593dc [HttpFoundation] Fix URLs
2019-07-23 08:27:59 +02:00
Arman Hosseini
be53c593dc [HttpFoundation] Fix URLs 2019-07-23 08:27:47 +02:00
Nicolas Grekas
b8d03cad6e bug #31303 [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4) (dorumd, nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)

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

Prepare for PHP 7.4: use ReflectionReference in VarCloner

Commits
-------

40f24ef676 [VarDumper] finish PHP 7.4 support and add tests
e99a6b85b8 [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4)
2019-07-23 08:20:12 +02:00
Nicolas Grekas
40f24ef676 [VarDumper] finish PHP 7.4 support and add tests 2019-07-23 08:17:10 +02:00
Dorel Mardari
e99a6b85b8 [VarDumper] Use \ReflectionReference for determining if a key is a reference (php >= 7.4) 2019-07-23 08:17:09 +02:00
Tobias Schultze
bfe4e1677f minor #32664 Ignore missing translation dependency in FrameworkBundle (alcaeus)
This PR was merged into the 3.4 branch.

Discussion
----------

Ignore missing translation dependency in FrameworkBundle

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

This applies the fix from #31156 to the validator.xml file. The error came up a couple of times in the test suite for DoctrineBundle. When using `symfony/framework-bundle` with `symfony/validator` installed but without `symfony/translation`, the call to `setTranslator` will error out because of the missing `translator` service. Thus, the call to `setTranslator` needs to ignore a missing translator dependency to support this scenario.

I don't know how to best test this since the translation component is present in the `require-dev` directive of FrameworkBundle's `composer.json`. If you have any suggestions how to achieve this, please let me know.

Commits
-------

19eb90d8cf Ignore missing translation dependency in FrameworkBundle
2019-07-23 00:03:03 +02:00
Tobias Schultze
759f91c565 minor #32659 [ErrorRenderer] Fixed the priority order of the error renderers registration (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorRenderer] Fixed the priority order of the error renderers registration

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

Spotted in https://github.com/symfony/symfony/pull/31398 and https://github.com/symfony/symfony/pull/32504

Commits
-------

710b51dcb1 Fixed the priority order of the error renderers registration
2019-07-22 23:36:35 +02:00
Tobias Schultze
41c530fdb8 minor #32660 [ErrorRenderer] Making debug = false by default and cleanup (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorRenderer] Making debug = false by default and cleanup

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

Consistent with other places where the default value is `false`.

Commits
-------

b28986f119 Making debug = false by default and cleanup
2019-07-22 23:28:49 +02:00
Yonel Ceruto
710b51dcb1 Fixed the priority order of the error renderers registration 2019-07-22 17:27:21 -04:00
Thomas Calvet
154810119d [Routing] Deprecate ServiceRouterLoader and ObjectRouteLoader in favor of ContainerLoader and ObjectLoader 2019-07-22 23:07:16 +02:00
Tobias Schultze
560dc8b9f7 minor #32610 [Mime] Add missing changelog entry for BC-break (Koc)
This PR was merged into the 4.3 branch.

Discussion
----------

[Mime] Add missing changelog entry for BC-break

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

Commits
-------

3a354321c8 [Mime] Add missing changelog entry for BC-break
2019-07-22 22:39:47 +02:00
Christian Flothmann
475c7a469a adapt tests 2019-07-22 22:38:49 +02:00
Sébastien ALFAIATE
b946b11d5a [Form] Repeat preferred choices in the main list 2019-07-22 22:38:49 +02:00
Tobias Schultze
e726161ad3 minor #32648 Remove hack to access class scope inside closures (carusogabriel)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove hack to access class scope inside closures

This is possible since 5.4.

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

<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/roadmap):
 - Bug fixes must be submitted against the lowest maintained 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 branch 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

f84c71b582 Remove hack to access class scope inside closures
2019-07-22 22:36:48 +02:00
Andreas Braun
19eb90d8cf
Ignore missing translation dependency in FrameworkBundle
When using symfony/framework-bundle with symfony/validator installed but without symfony/translation, the call to setTranslator will error out because of the missing translator service. Thus, the call to setTranslator needs to ignore a missing translator dependency to support this scenario.
2019-07-22 21:42:44 +02:00
Robin Chalas
f70430515d minor #32662 [Security/Http] Don't mark AbstractAuthenticationListener as internal (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Security/Http] Don't mark AbstractAuthenticationListener as internal

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

This class is documented as useful to build custom listeners, and some projects do.
There's no need to have it internal (its "handle" method is already marked as deprecated in LegacyListenerTrait)

Commits
-------

5a14b7e039 [Security/Http] Don't mark AbstractAuthenticationListener as internal
2019-07-22 19:25:44 +02:00
Nicolas Grekas
5a14b7e039 [Security/Http] Don't mark AbstractAuthenticationListener as internal 2019-07-22 19:05:35 +02:00
Yonel Ceruto
b28986f119 Making debug = false by default and cleanup 2019-07-22 11:38:55 -04:00
Gabriel Caruso
f84c71b582
Remove hack to access class scope inside closures
This is possible since 5.4
2019-07-22 17:15:39 +02:00
Fabien Potencier
79a9bf1ec6 minor #32647 [4.2] Remove dead tests fixtures (fancyweb)
This PR was merged into the 4.2 branch.

Discussion
----------

[4.2] Remove dead tests fixtures

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

More cleaning on 4.2.

Commits
-------

016a214bc5 Remove dead tests fixtures
2019-07-22 11:20:36 +02:00
Fabien Potencier
7dfc97be9f minor #32608 [Mailer][DX] Improve exception message for unsupported scheme (Koc)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer][DX] Improve exception message for unsupported scheme

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

This PR improves exception message for unsupported schemes by providing list of available. Throw something like: ` 'The "foo" scheme is not supported for mailer "mailgun". Supported schemes are: "api", "http", "smtp".'`

Commits
-------

8c24a537c7 [Mailer][DX] Improve exception message for unsupported scheme
2019-07-22 11:17:59 +02:00
Thomas Calvet
016a214bc5 Remove dead tests fixtures 2019-07-21 19:35:01 +02:00
Arman Hosseini
162819fef3
Avoid getting right to left style 2019-07-21 16:03:23 +04:30
Nicolas Grekas
f6d6931fff Merge branch '3.4' into 4.2
* 3.4:
  Remove more dead tests fixtures
2019-07-19 18:57:10 +02:00
Nicolas Grekas
b601a4a352 minor #32627 Remove more dead tests fixtures (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove more dead tests fixtures

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

Continuation of https://github.com/symfony/symfony/pull/32623

I am sorry but I detected a few more cases.

Commits
-------

a1fb54d900 Remove more dead tests fixtures
2019-07-19 18:55:44 +02:00
Robin Chalas
376a8f4cab minor #32627 Remove more dead tests fixtures (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove more dead tests fixtures

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

Continuation of https://github.com/symfony/symfony/pull/32623

I am sorry but I detected a few more cases.

Commits
-------

a1fb54d900 Remove more dead tests fixtures
2019-07-19 18:55:39 +02:00
Thomas Calvet
a1fb54d900 Remove more dead tests fixtures 2019-07-19 18:34:11 +02:00
Konstantin Myakshin
8c24a537c7 [Mailer][DX] Improve exception message for unsupported scheme 2019-07-19 19:29:21 +03:00
Konstantin Myakshin
3a354321c8 [Mime] Add missing changelog entry for BC-break 2019-07-19 19:21:19 +03:00
Tobias Schultze
950306adaa minor #32624 [Messenger] fix transport_name option not passing validation (Tobion)
This PR was merged into the 4.3 branch.

Discussion
----------

[Messenger] fix transport_name option not passing validation

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

the doctrine transport connection validates the options and complains about this option, so we remove it before. the other transports will probably add the validation as well: #32575
the purpose of the option is for custom transport factories anyway.

Commits
-------

48408e3c5b [Messenger] fix transport_name option not passing validation
2019-07-19 14:36:59 +02:00
Tobias Schultze
48408e3c5b [Messenger] fix transport_name option not passing validation
the doctrine transport connection validates the options and complains about this option, so we remove it before. the purpose is for custom transport factories anyway
2019-07-19 14:27:46 +02:00
Nicolas Grekas
98cdd007a8 Merge branch '3.4' into 4.2
* 3.4:
  Remove dead tests fixtures
2019-07-19 14:05:51 +02:00
Nicolas Grekas
0bbcdc4400 minor #32623 Remove dead tests fixtures (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove dead tests fixtures

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

Once this is merged up to 4.2, I will check 4.2.

Commits
-------

f7e24c2c80 Remove dead tests fixtures
2019-07-19 14:05:10 +02:00
Thomas Calvet
f7e24c2c80 Remove dead tests fixtures 2019-07-19 13:52:08 +02:00
Thomas Calvet
c53e25332a [Debug][ExceptionHandler] Add tests for custom handlers 2019-07-19 10:43:44 +02:00
Nicolas Grekas
0d8f5fe985 Merge branch '4.3' into 4.4
* 4.3:
  fix tests
  [Validator] Added support for validation of giga values
  Fix Debug component tests
  [Messenger] fixed UnrecoverableExceptionInterface handling in Worker (fixes #32325)
  [Messenger] pass transport name to factory
2019-07-19 10:35:48 +02:00
Nicolas Grekas
f805fe3a16 Merge branch '4.2' into 4.3
* 4.2:
  fix tests
  [Validator] Added support for validation of giga values
  Fix Debug component tests
2019-07-19 10:33:28 +02:00
Nicolas Grekas
7964eb816a Merge branch '3.4' into 4.2
* 3.4:
  fix tests
  [Validator] Added support for validation of giga values
  Fix Debug component tests
2019-07-19 10:33:10 +02:00