Commit Graph

48717 Commits

Author SHA1 Message Date
Fabien Potencier
910cc727a0 Tweak the code to avoid fabbot false positives 2020-04-12 19:06:46 +02:00
Fabien Potencier
edb0518e56 Merge branch '5.0'
* 5.0:
  Fix tests
  Fix test
2020-04-12 18:56:52 +02:00
Fabien Potencier
780b539669 Merge branch '4.4' into 5.0
* 4.4:
  Fix tests
  Fix test
2020-04-12 18:56:42 +02:00
Fabien Potencier
093a71500a Fix tests 2020-04-12 18:56:09 +02:00
Fabien Potencier
96b28104bf Merge branch '3.4' into 4.4
* 3.4:
  Fix test
2020-04-12 18:54:34 +02:00
Fabien Potencier
311a944a08 Fix test 2020-04-12 18:54:01 +02:00
Fabien Potencier
b7c7b6f445 Merge branch '5.0'
* 5.0:
  Fix code
  Tweak the code to avoid fabbot false positives
2020-04-12 18:48:26 +02:00
Fabien Potencier
8e9bd7ad06 Merge branch '4.4' into 5.0
* 4.4:
  Fix code
  Tweak the code to avoid fabbot false positives
2020-04-12 18:45:47 +02:00
Fabien Potencier
9f9383b25f Fix code 2020-04-12 18:45:36 +02:00
Fabien Potencier
e4d4428bb3 Fix code 2020-04-12 18:39:58 +02:00
Fabien Potencier
e03e1bf420 minor #36438 Tweak the code to avoid fabbot false positives (4.4) (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

Tweak the code to avoid fabbot false positives (4.4)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

To avoid false positives from fabbot, I've changed some exception messages (the way we concatenate values) to avoid them.

Commits
-------

7d2cab1644 Tweak the code to avoid fabbot false positives
2020-04-12 18:18:20 +02:00
Fabien Potencier
7d2cab1644 Tweak the code to avoid fabbot false positives 2020-04-12 18:14:02 +02:00
Fabien Potencier
253e018ea5 Merge branch '5.0'
* 5.0:
  Tweak the code to avoid fabbot false positives
  Remove UPGRADE files for 4.x
2020-04-12 16:42:09 +02:00
Fabien Potencier
9e254aea75 Merge branch '4.4' into 5.0
* 4.4:
  Tweak the code to avoid fabbot false positives
2020-04-12 16:40:17 +02:00
Fabien Potencier
11a707200d Merge branch '3.4' into 4.4
* 3.4:
  Tweak the code to avoid fabbot false positives
2020-04-12 16:39:55 +02:00
Fabien Potencier
270d1be04a minor #36437 Tweak the code to avoid fabbot false positives (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Tweak the code to avoid fabbot false positives

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

To avoid false positives from fabbot, I've changed some exception messages (the way we concatenate values) to avoid them.

Commits
-------

ad6f75e5c8 Tweak the code to avoid fabbot false positives
2020-04-12 16:35:48 +02:00
Fabien Potencier
ad6f75e5c8 Tweak the code to avoid fabbot false positives 2020-04-12 16:33:46 +02:00
Fabien Potencier
7800a2ab92 feature #36426 [Form] Deprecated unused old ServerParams util (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] Deprecated unused old `ServerParams` util

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | ~
| License       | MIT
| Doc PR        | ~

A left over after https://github.com/symfony/symfony/pull/11924#issuecomment-56511557, this class is unused since Symfony 2.3 ^^'. I've noticed it before but never took the time to submit a PR because this is very minor IMHO. But since this deprecation should not impact anyone, let's keep the codebase clean and remove it in 6.0.

Commits
-------

e05e924c5a [Form] Deprecated unused old `ServerParams` util
2020-04-12 15:57:46 +02:00
Fabien Potencier
cea5ebc81f feature #36433 [Console] cursor tweaks (fabpot)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Console] cursor tweaks

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Refs #27444
| License       | MIT
| Doc PR        | n/a

While playing with the new cursor class, I realized that I would like to make some changes. Mainly having a fluent interface: `$cursor->moveUp(10)->clearOutput()` for instance.

I have also separater the `clearLine()` method in two method to avoid the bool arg.

/cc @pierredup

Commits
-------

5a7b3146f5 Make the Cursor class final
b0e7eb66e0 Make Cursor fluent
55fef914cc Split a method
d00b5b5e08 Remove default value
2020-04-12 15:54:11 +02:00
Fabien Potencier
1e4f6cd640 minor #36436 Remove UPGRADE files for 4.x (fabpot)
This PR was merged into the 5.0 branch.

Discussion
----------

Remove UPGRADE files for 4.x

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

We forgot to remove the 4.x UPGRADE file before releasing 5.0
Also, the UPGRADE 5.0 file is only about migrating from 4.4, not any version of the 4 branch.

Commits
-------

34a2ac6da6 Remove UPGRADE files for 4.x
2020-04-12 15:52:41 +02:00
Fabien Potencier
6eaafed6df Fix typo 2020-04-12 15:51:25 +02:00
Fabien Potencier
852eabdb9e feature #35828 [Notifier][Slack] Send messages using Incoming Webhooks (birkof, fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier][Slack] Send messages using Incoming Webhooks

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

> Legacy tokens are a deprecated method of generating tokens for testing and development.

As tokens will became deprecated on May 5th, 2020 we should use Incoming Webhooks app for using this bundle.
**Usage:**
_`slack://hooks.slack.com/services/xxx/xxx/xxx`_

Commits
-------

4b0807bd1a [Notifier] Tweak Slack support
e242cc35e9 Git rebase form master
2020-04-12 15:50:16 +02:00
Fabien Potencier
4b0807bd1a [Notifier] Tweak Slack support 2020-04-12 15:45:49 +02:00
Jules Pietri
e05e924c5a
[Form] Deprecated unused old ServerParams util 2020-04-12 15:23:35 +02:00
Fabien Potencier
34a2ac6da6 Remove UPGRADE files for 4.x 2020-04-12 15:08:12 +02:00
Fabien Potencier
5a7b3146f5 Make the Cursor class final 2020-04-12 14:38:26 +02:00
Fabien Potencier
b0e7eb66e0 Make Cursor fluent 2020-04-12 14:38:26 +02:00
Nicolas Grekas
ee3caba5eb [Lock] fix tests for MongoDB 2020-04-12 13:23:14 +02:00
Nicolas Grekas
c8472b5125 Merge branch '5.0'
* 5.0:
  [Lock] remove mention of mongodb
  [Routing] µtweaks
2020-04-12 13:07:37 +02:00
Nicolas Grekas
ce838882cf Merge branch '4.4' into 5.0
* 4.4:
  [Lock] remove mention of mongodb
  [Routing] µtweaks
2020-04-12 13:07:29 +02:00
Nicolas Grekas
8b84ab6002 [Lock] remove mention of mongodb 2020-04-12 13:06:58 +02:00
Nicolas Grekas
d53973afdb Merge branch '3.4' into 4.4
* 3.4:
  [Routing] µtweaks
2020-04-12 13:06:44 +02:00
Nicolas Grekas
a21c1127dc [Routing] µtweaks 2020-04-12 11:58:27 +02:00
Nicolas Grekas
de4523aa3a Merge branch '5.0'
* 5.0:
  [travis] fix CI (ter)
  Revert "[travis][appveyor] don't cache .phpunit"
  silence E_NOTICE triggered since PHP 7.4
  [Form] Removed legacy check in `ValidationListener`
  [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only
  Force ping after transport Exception
  do not merge constraints within interfaces
  [Validator] Fixed default group for nested composite constraints
2020-04-12 11:49:11 +02:00
Nicolas Grekas
7e739eeee2 Merge branch '4.4' into 5.0
* 4.4:
  [travis] fix CI (ter)
  Revert "[travis][appveyor] don't cache .phpunit"
  silence E_NOTICE triggered since PHP 7.4
  [Form] Removed legacy check in `ValidationListener`
  [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only
  Force ping after transport Exception
  do not merge constraints within interfaces
  [Validator] Fixed default group for nested composite constraints
2020-04-12 11:48:36 +02:00
Nicolas Grekas
31eecc3925 [travis] fix CI (ter) 2020-04-12 11:46:54 +02:00
Nicolas Grekas
44212f96d8 Merge branch '3.4' into 4.4
* 3.4:
  Revert "[travis][appveyor] don't cache .phpunit"
  silence E_NOTICE triggered since PHP 7.4
  [Form] Removed legacy check in `ValidationListener`
  do not merge constraints within interfaces
  [Validator] Fixed default group for nested composite constraints
2020-04-12 11:41:03 +02:00
Nicolas Grekas
966989a2b9 Revert "[travis][appveyor] don't cache .phpunit"
This reverts commit 5182253aa2.
2020-04-12 11:36:17 +02:00
Fabien Potencier
4e6a3bddf5 bug #36434 [HttpKernel] silence E_NOTICE triggered since PHP 7.4 (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] silence E_NOTICE triggered since PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36413
| License       | MIT
| Doc PR        |

Commits
-------

c4e2c447ba silence E_NOTICE triggered since PHP 7.4
2020-04-12 11:33:14 +02:00
Christian Flothmann
c4e2c447ba silence E_NOTICE triggered since PHP 7.4 2020-04-12 11:28:02 +02:00
Fabien Potencier
55fef914cc Split a method 2020-04-12 11:15:20 +02:00
Fabien Potencier
d00b5b5e08 Remove default value 2020-04-12 11:14:14 +02:00
Fabien Potencier
6a27337333 bug #36365 [Validator] Fixed default group for nested composite constraints (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed default group for nested composite constraints

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #33986
| License       | MIT
| Doc PR        | ~

Take a breath: when composite constraints are nested in a parent composite constraint without having non composite nested constraints (i.e empty), then the default group is not added, making the validator failing to validate in any group (including default), because there is no group at all, which should never happen.

Commits
-------

117ee34698 [Validator] Fixed default group for nested composite constraints
2020-04-12 09:44:21 +02:00
Fabien Potencier
d69b8bb730 feature #27444 [Console] Add Cursor class to control the cursor in the terminal (pierredup)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Console] Add Cursor class to control the cursor in the terminal

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

Add a new `Cursor` class to the Console component, that allows to manipulate the cursor in the terminal.

Options to move the cursor include: moveUp, moveDown, moveLeft, moveRight, show, hide, save and restore position, get current position etc.

Example usage:

```php
$cursor = new Cursor($output);

$parts = [
    ['x' => 9, 'y' => 5, 'string' => '#'],
    ['x' => 9, 'y' => 7, 'string' => '#'],
    ['x' => 2, 'y' => 7, 'string' => '#####'],
    ['x' => 9, 'y' => 1, 'string' => '#######'],
    ['x' => 7, 'y' => 6, 'string' => '#'],
    ['x' => 9, 'y' => 2, 'string' => '#'],
    ['x' => 9, 'y' => 6, 'string' => '#'],
    ['x' => 9, 'y' => 3, 'string' => '#'],
    ['x' => 2, 'y' => 1, 'string' => '#####'],
    ['x' => 7, 'y' => 2, 'string' => '#'],
    ['x' => 9, 'y' => 4, 'string' => '#####'],
    ['x' => 1, 'y' => 2, 'string' => '#'],
    ['x' => 1, 'y' => 6, 'string' => '#'],
    ['x' => 2, 'y' => 4, 'string' => '#####'],
    ['x' => 1, 'y' => 3, 'string' => '#'],
    ['x' => 7, 'y' => 5, 'string' => '#'],
];

foreach ($parts as $part) {
    $cursor->moveToPosition($part['x'], $part['y']);
    $output->write($part['string']);

    usleep(200000);
}

$cursor->moveToPosition(1, 8);
```

Result:

![kapture 2018-05-31 at 12 39 10](https://user-images.githubusercontent.com/144858/40777952-abb7c252-64cf-11e8-80a7-7417676c8b0b.gif)

Commits
-------

80d59d5c4a [Console] Add Cursor class to control the cursor in the terminal
2020-04-12 09:39:56 +02:00
Pierre du Plessis
80d59d5c4a [Console] Add Cursor class to control the cursor in the terminal 2020-04-12 09:39:50 +02:00
Fabien Potencier
f84592ac83 bug #36422 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36419
| License       | MIT
| Doc PR        | -

Commits
-------

a5b884cd94 [HttpClient] fix HTTP/2 support on non-SSL connections - CurlHttpClient only
2020-04-12 09:39:11 +02:00
Fabien Potencier
280674f8bc bug #36417 Force ping after transport exception (oesteve)
This PR was merged into the 4.4 branch.

Discussion
----------

Force ping after transport exception

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36301
| License       | MIT
| Doc PR        |

SMTP transport fails for long running processes after tranport exception, if stream is closed all messages will throw a transport exception until $lastMessageTime exceds $pingThreshold.

With this PR, after transport expception the transport will ping the server to check if the connection is still alive.

Commits
-------

7ccbef62f6 Force ping after transport Exception
2020-04-12 09:31:22 +02:00
Fabien Potencier
cd4a4bd3d1 bug #35591 [Validator] do not merge constraints within interfaces (greedyivan)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] do not merge constraints within interfaces

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #22538
| License       | MIT
| Doc PR        |

This fix disables merge constraints within interfaces.

There is no reason to merge constraints from one interface to another because each class merges the constraints of all its interfaces. Only one check is needed is to eliminate all interfaces that comes from parent class to avoid duplication.

Commits
-------

67f336b808 do not merge constraints within interfaces
2020-04-12 09:28:41 +02:00
Fabien Potencier
db733da440 minor #36428 [Form] Removed legacy check in ValidationListener (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Removed legacy check in `ValidationListener`

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | ~
| License       | MIT
| Doc PR        | ~

A left over of #13198, should have been removed in 3.0. The tests don't use `null` anymore, no update needed here, this is just about removing dead code.

Commits
-------

e479e51f7c [Form] Removed legacy check in `ValidationListener`
2020-04-12 09:19:14 +02:00
Fabien Potencier
7c98954920 feature #31390 [Serializer] UnwrappingDenormalizer (nonanerz)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Serializer] UnwrappingDenormalizer

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

UnwrappingDenormalizer, registered with very high priority. Unwrapping the data if UNWRAP_PATH is provided.

Very often some APIs give nested responses in which we need only the child object. With UnwrappingDenormalizer we can get the needed object without creating unnecessary Model class that we don't really need.

Regarding to https://github.com/symfony/symfony/pull/28887 and https://github.com/symfony/symfony/pull/30894

Usage:

`$serialiser->deserialize('{"baz": {"foo": "bar", "inner": {"title": "value", "numbers": [5,3]}}}', Object::class, ['UnwrappingDenormalizer::UNWRAP_PATH' => '[baz][inner]'])`

Commits
-------

00d103d5f7 UnwrappingDenormalizer
2020-04-12 09:17:11 +02:00