Commit Graph

41441 Commits

Author SHA1 Message Date
Nicolas Grekas e45bc83f21 Merge branch '4.2'
* 4.2:
  Skip testing the phpunit-bridge on not-master branches when $deps is empty
  more tests
  [DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
  [DI] fix removing non-shared definition while inlining them
2019-04-12 17:33:39 +02:00
Nicolas Grekas dc2edaffe2 Merge branch '3.4' into 4.2
* 3.4:
  Skip testing the phpunit-bridge on not-master branches when $deps is empty
  more tests
  [DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
2019-04-12 17:32:33 +02:00
Nicolas Grekas 39f20844b3 minor #31095 Skip testing the phpunit-bridge on not-master branches when $deps is empty (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Skip testing the phpunit-bridge on not-master branches when $deps is empty

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

Tests are not in sync with the autoloaded code on these jobs.
The bridge is still tested on deps=low/high jobs + master

Commits
-------

b0ee192aaa Skip testing the phpunit-bridge on not-master branches when $deps is empty
2019-04-12 17:30:21 +02:00
Nicolas Grekas 08577f4398 [PhpUnitBridge] fix PHP 5.5 support 2019-04-12 17:26:05 +02:00
Nicolas Grekas b0ee192aaa Skip testing the phpunit-bridge on not-master branches when $deps is empty 2019-04-12 17:12:49 +02:00
Nicolas Grekas 770c7ddec4 [PhpUnitBridge] CS fix 2019-04-12 16:49:44 +02:00
Nicolas Grekas 8297a75eb7 bug #31088 [DI] fix removing non-shared definition while inlining them (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[DI] fix removing non-shared definition while inlining them

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

I didn't manage to create a specific test case but this still has 100% coverage for the added lines and fixed the reproducer (and makes sense also :) )

Commits
-------

317e820694 [DI] fix removing non-shared definition while inlining them
2019-04-12 16:35:03 +02:00
Nicolas Grekas 37eff9bf68 feature #31093 [PhpUnitBridge] ClockMock does not mock gmdate() (Simperfit)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PhpUnitBridge] ClockMock does not mock gmdate()

| Q             | A
| ------------- | ---
| Branch?       | feature
| 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 | #30393   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11418 <!-- 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.
-->
Adding the feature to mock gmdate directly in ClockMock.

Commits
-------

b34738bba6 [PhpUnitBridge] ClockMock does not mock gmdate()
2019-04-12 16:34:26 +02:00
Nicolas Grekas 3403a8e65a bug #29944 [DI] Overriding services autowired by name under _defaults bind not working (przemyslaw-bogusz, renanbr)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Overriding services autowired by name under _defaults bind not working

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

This is an implementation of ideas and suggestions of @nicolas-grekas and @GuilhemN.

Commits
-------

7e805eae2b more tests
35a40ace6f [DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working
2019-04-12 16:33:47 +02:00
renanbr 7e805eae2b more tests 2019-04-12 16:27:23 +02:00
Przemysław Bogusz 35a40ace6f [DI] Fixes: #28326 - Overriding services autowired by name under _defaults bind not working 2019-04-12 16:15:59 +02:00
Amrouche Hamza b34738bba6
[PhpUnitBridge] ClockMock does not mock gmdate() 2019-04-12 16:09:30 +02:00
Nicolas Grekas 2f73c2f66b fix 2019-04-12 15:55:35 +02:00
Nicolas Grekas 0cf183375a Merge branch '4.2'
* 4.2:
  [TwigBridge] fix tests
  [FrameworkBundle] Fix Controller deprecated when using composer --optimized
2019-04-12 15:50:47 +02:00
Nicolas Grekas 1d02ef2ccb Merge branch '3.4' into 4.2
* 3.4:
  [TwigBridge] fix tests
2019-04-12 15:50:35 +02:00
Nicolas Grekas d134dfcbe2 minor #31091 [TwigBridge] fix tests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] fix tests

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

Follows https://github.com/twigphp/Twig/pull/2935

Commits
-------

33c6681585 [TwigBridge] fix tests
2019-04-12 15:50:12 +02:00
Nicolas Grekas 371b55ac7e bug #31094 [PhpUnitBridge] fixes (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PhpUnitBridge] fixes

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

Fixes @stof's review in #29211 + fixes PHP5.5 support (array consts are PHP5.6+)
/cc @greg0ire

Commits
-------

b11585e31f [PhpUnitBridge] fixes
2019-04-12 15:49:45 +02:00
Nicolas Grekas b11585e31f [PhpUnitBridge] fixes 2019-04-12 15:46:34 +02:00
Nicolas Grekas 33c6681585 [TwigBridge] fix tests 2019-04-12 15:39:20 +02:00
Nicolas Grekas 317e820694 [DI] fix removing non-shared definition while inlining them 2019-04-12 11:55:35 +02:00
Fabien Potencier a36fbe3d38 feature #29211 [PhpUnitBridge] Url encoded deprecations helper config (greg0ire)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PhpUnitBridge] Url encoded deprecations helper config

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

First stab at implementing a new way of configuring the deprecation error handler. Includes a refactoring to keep things manageable.

Rework of #24867, blocked by #29718

TODO:

- [x] make the code 5.5 compatible 😢
- [x] add more tests
- [x] deprecate modes (using echo :P)
- [x] test this on real life projects and add some screenshots
- [x] docs PR
- [x] handle `strict`
- [x] adapt existing CI config

# Quiet configuration

![quiet](https://user-images.githubusercontent.com/657779/49341318-fa78c900-f64b-11e8-9504-a8a9eac4baf8.png)

# Default configuration

![verbose](https://user-images.githubusercontent.com/657779/49341322-10868980-f64c-11e8-9d90-dc3f6a18c335.png)

Commits
-------

1c73f9cfed [PhpUnitBridge] Url encoded deprecations helper config
2019-04-12 11:11:22 +02:00
Fabien Potencier 9edd84bce0 bug #30967 [HttpClient] Document the state object that is passed around by the HttpClient (derrabus)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient] Document the state object that is passed around by the HttpClient

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

In an attempt to make the code of the new HttpClient component more understandable, I've introduced internal classes that document the `$multi` object that is being passed around between *Client and *Response classes.

My goal is to make the code more accessible to potential contributors and static code analyzers.

Commits
-------

20f4eb3204 Document the state object that is passed around by the HttpClient.
2019-04-12 11:04:34 +02:00
Fabien Potencier 69b43fa8a8 bug #30993 [FrameworkBundle] Fix for Controller DEPRECATED when using composer --optimized (aweelex)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] Fix for Controller DEPRECATED  when using composer --optimized

| Q | A |
| --- | --- |
| Branch? | 4.2 |
| Bug fix? | Yes |
| New feature? | No |
| BC breaks? | No |
| Deprecations? | No |
| Tests pass? | Yes |
| Fixed tickets | --- |
| License | MIT |

Using `composer --optimize-autoload` causes `console cache:clear` (without warmup) to give DEPRECATED error, that stays in profiler.

I moved `@trigger_error` from beggining of the file to Controller __consctruct method.

Commits
-------

2ae2fd800d [FrameworkBundle] Fix Controller deprecated when using composer --optimized
2019-04-12 11:01:41 +02:00
Grégoire Paris 1c73f9cfed
[PhpUnitBridge] Url encoded deprecations helper config 2019-04-11 23:10:50 +02:00
Fabien Potencier 936355e2a2 minor #31063 CS Fixes: Not double split with one array argument (rubenrua)
This PR was merged into the 4.3-dev branch.

Discussion
----------

CS Fixes: Not double split with one array argument

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

Keep to use the same CS in all the Symfony code base.

Use:
```php
$resolver->setDefaults([
    'compound' => false
]);
```

Instead of:
```php
$resolver->setDefaults(
    [
        'compound' => false,
    ]
);
```

Keep the double split when the method has two or more arguments.

I miss a PSR with this rule.

Commits
-------

027bd12884 CS Fixes: Not double split with one array argument
2019-04-11 21:35:58 +02:00
rubenrua 027bd12884 CS Fixes: Not double split with one array argument
Keep to use the same CS in all the Symfony code base.

Use:
```php
$resolver->setDefaults([
    'compound' => false
]);
```

Instead of:
```php
$resolver->setDefaults(
    [
        'compound' => false,
    ]
);
```

Keep the double split when the method has two or more arguments.

I miss a PSR with this rule.
2019-04-11 16:45:23 +02:00
Nicolas Grekas 713aab79cc Merge branch '4.2'
* 4.2:
  Catch empty deprecation.log silently (fixes #31050)
  minor: the meaning of the data breach was not correct
  Optimize SVGs
  property normalizer should also pass format and context to isAllowedAttribute
2019-04-11 14:10:52 +02:00
Nicolas Grekas ebe9ccf0cc Merge branch '3.4' into 4.2
* 3.4:
  Catch empty deprecation.log silently (fixes #31050)
2019-04-11 13:58:13 +02:00
Nicolas Grekas 9483779f5f bug #31076 [HttpKernel] Fixed LoggerDataCollector crashing on empty file (althaus)
This PR was submitted for the 4.2 branch but it was merged into the 3.4 branch instead (closes #31076).

Discussion
----------

[HttpKernel] Fixed LoggerDataCollector crashing on empty file

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

This PR adds a check to the LoggerDataCollector if there's acutal some content in the log file.

Commits
-------

291c73a290 Catch empty deprecation.log silently (fixes #31050)
2019-04-11 13:43:56 +02:00
Matthias Althaus 291c73a290 Catch empty deprecation.log silently (fixes #31050) 2019-04-11 13:43:50 +02:00
Nicolas Grekas 9399cb99a5 Merge branch '3.4' into 4.2
* 3.4:
  minor: the meaning of the data breach was not correct
  Optimize SVGs
  property normalizer should also pass format and context to isAllowedAttribute
2019-04-11 13:27:41 +02:00
Nicolas Grekas 5f4c27f0de minor #31067 Optimize SVGs (MartijnCuppens)
This PR was merged into the 3.4 branch.

Discussion
----------

Optimize SVGs

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

Used [svgo](https://github.com/svg/svgo) to optimize the svgs. I kept the `viewBox` attribute to keep the aspects when SVGs are rescaled.

I also added `insert_final_newline = false` to the `.editorconfig` file because the newlines are removed from the SVGs and there's only one line left.

Commits
-------

4614cea9d2 Optimize SVGs
2019-04-11 13:23:48 +02:00
Nicolas Grekas bc9c89eb44 Merge branch '4.2'
* 4.2:
  CS Fixes: Not double split with one array argument
2019-04-11 13:18:55 +02:00
Nicolas Grekas 3d2bc481cc bug #31073 #30998 Fix deprecated setCircularReferenceHandler call (dhaarbrink)
This PR was squashed before being merged into the 4.3-dev branch (closes #31073).

Discussion
----------

#30998 Fix deprecated setCircularReferenceHandler call

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

Instead of calling the `setCircularReferenceHandler()` method, it puts the handler in the default context.

Commits
-------

3a680402ce #30998 Fix deprecated setCircularReferenceHandler call
2019-04-11 13:04:26 +02:00
Dennis Haarbrink 3a680402ce #30998 Fix deprecated setCircularReferenceHandler call 2019-04-11 13:04:16 +02:00
Nicolas Grekas 2a1137a05c bug #31071 property normalizer should also pass format and context to isAllowedAttribute (dbu)
This PR was merged into the 3.4 branch.

Discussion
----------

property normalizer should also pass format and context to isAllowedAttribute

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | found while working on https://github.com/symfony/symfony/pull/30888
| License       | MIT
| Doc PR        | -

the context and format are optional parameters to `isAllowedAttribute`, but should be forwarded. due to this omission, the PropertyNormalizer was ignoring the 'attributes' context option (and does in version 4 also ignore the 'ignore_attributes' context option - that one is a property on the normalizer class in version 3 and therefore not ignored here)

Commits
-------

13e2fb735d property normalizer should also pass format and context to isAllowedAttribute
2019-04-11 13:03:39 +02:00
Nicolas Grekas 9dfd8f1cc2 minor #31072 CS Fixes: Not double split with one array argument (Yurujai)
This PR was merged into the 4.2 branch.

Discussion
----------

CS Fixes: Not double split with one array argument

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

Fix for https://github.com/symfony/symfony/pull/31064#issuecomment-481760760

Commits
-------

93dabbc96a CS Fixes: Not double split with one array argument
2019-04-11 12:53:53 +02:00
Nicolas Grekas bd28ac6c79 minor #31074 minor: the meaning of the data breach was not correct (Simperfit)
This PR was squashed before being merged into the 3.4 branch (closes #31074).

Discussion
----------

 minor: the meaning of the data breach was not correct

| 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 | none  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- 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.
-->

It seems that the french translation was wrong as the phrasing suggested that the data breach came from the current application/website.

Changing as discussed here: https://github.com/symfony/symfony/pull/31053#discussion_r274310683

Commits
-------

97ac9bae11  minor: the meaning of the data breach was not correct
2019-04-11 12:48:58 +02:00
Hamza Amrouche 97ac9bae11 minor: the meaning of the data breach was not correct 2019-04-11 12:48:53 +02:00
Martijn Cuppens 4614cea9d2 Optimize SVGs 2019-04-11 11:48:14 +02:00
Pablo Ogando Ferreira 93dabbc96a CS Fixes: Not double split with one array argument 2019-04-11 09:45:22 +02:00
Nicolas Grekas 15fedec58b minor #31070 [Dotenv] Improve Dotenv messages (xuanquynh)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Dotenv] Improve Dotenv messages

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

This PR improves a little bit of some messages from https://github.com/symfony/symfony/pull/31062

The first, passive sentences may be more suitable here because the value couldn't change by itself. It is changed by us - human.

The second, if we use **The default value of $usePutenv" argument of "%s\'s constructor**, we have to pass `__CLASS__` as the second parameter of `sprintf` function instead of `__METHOD__`. So, I suggest using **The default value of $usePutenv" argument of "%s"**.

Finally, the deprecation warning of `Dotenv::__construct()` is very long. Let's separate it into 2 pieces for readable reason.

Commits
-------

e871a6a83a Improve Dotenv messages
2019-04-11 09:25:05 +02:00
Nicolas Grekas 66701b84f5 bug #31069 Make sure that logged URL is the same as the one which is requested. (drupol)
This PR was squashed before being merged into the 4.3-dev branch (closes #31069).

Discussion
----------

Make sure that logged URL is the same as the one which is requested.

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

Commits
-------

526cad6909 Make sure that logged URL is the same as the one which is requested.
2019-04-11 09:17:52 +02:00
Pol Dellaiera 526cad6909 Make sure that logged URL is the same as the one which is requested. 2019-04-11 09:17:46 +02:00
Fabien Potencier 751baaf3c7 bug #31024 [Mailer] fixed roundrobin test one dead which should recover (scuben, fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] fixed roundrobin test one dead which should recover

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

The Test `testSendOneDeadButRecover` is not checking the recovery part of its job. I fixed that by adding more `send` calls and added another test so that both recoveries (within retry period and not within retry period) are covered.

The `RoundRobinTransport` had a bug where the transport is dead but not yet in the `retryPeriod`. In that case the transport would not have been added back to the stack and thus got lost. Fixed that but that required an additional check if all transports are dead to prevent an infinite loop.

Commits
-------

5d4d4e7a71 fixed roundrobin dead transport which should recover
ccbb171312 fixed roundrobin dead transport which should recover
2019-04-11 08:24:11 +02:00
David Buchmann 13e2fb735d property normalizer should also pass format and context to isAllowedAttribute 2019-04-11 07:44:34 +02:00
Quynh Xuan Nguyen e871a6a83a Improve Dotenv messages 2019-04-11 08:53:16 +07:00
Nicolas Grekas e0c4528237 [Dotenv] fix typos 2019-04-10 22:28:30 +02:00
Fabien Potencier 5d4d4e7a71 fixed roundrobin dead transport which should recover 2019-04-10 21:43:06 +02:00
Patrick Landolt ccbb171312 fixed roundrobin dead transport which should recover 2019-04-10 21:43:06 +02:00