Commit Graph

48499 Commits

Author SHA1 Message Date
Christian Flothmann
89fedfa9e9 fix code style 2021-01-04 16:15:05 +01:00
Fabien Potencier
262525b95b minor #39709 fix code style (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

fix code style

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

I ran the CS fixer and checked all test methods to not make use of `void`.

Commits
-------

689e3039fc fix code style
2021-01-04 15:37:48 +01:00
Christian Flothmann
689e3039fc fix code style 2021-01-04 15:27:21 +01:00
Christian Flothmann
126105146f apply the sort callback on the whole search result 2021-01-04 15:07:41 +01:00
Christian Flothmann
28b6051f53 take query and request parameters into account when matching routes 2021-01-04 14:59:34 +01:00
Gerard Berengué
caa59fae81
mistake 2021-01-04 14:29:17 +01:00
Fabien Potencier
0304f754b3 minor #39705 [ProxyManager] fix tests (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ProxyManager] fix tests

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

Commits
-------

5ec2a252ee [ProxyManager] fix tests
2021-01-04 13:05:33 +01:00
Fabien Potencier
135a9b20af minor #39704 [Finder] actually compare the order of entries when any sorting is applied (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Finder] actually compare the order of entries when any sorting is applied

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

Without this change the tests where still passing if the sorting didn't work as expected. There are three more tests that sort by file times. I do not really know how to make them more stable though.

Commits
-------

f1ed653eee actually compare the order of entries when any sorting is applied
2021-01-04 13:04:05 +01:00
Fabien Potencier
b9bdb8e5ed minor #39706 [HttpKernel] harden test to not depend on the actual time (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpKernel] harden test to not depend on the actual time

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

From time to time this test fails (e.g. https://travis-ci.com/github/symfony/symfony/jobs/468014427#L7092). We can fix that by not depending on the system clock which is actually not needed in this test.

Commits
-------

28a956baa9 harden test to not depend on the actual time
2021-01-04 13:01:41 +01:00
Christian Flothmann
28a956baa9 harden test to not depend on the actual time 2021-01-04 12:47:44 +01:00
Nicolas Grekas
5ec2a252ee [ProxyManager] fix tests 2021-01-04 12:30:20 +01:00
Christian Flothmann
f1ed653eee actually compare the order of entries when any sorting is applied 2021-01-04 12:28:59 +01:00
Alexander M. Turek
04671ee726 minor #39694 [PropertyAccess] remove unneeded sprintf() call (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyAccess] remove unneeded sprintf() call

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

Commits
-------

a8252a43b8 remove unneeded sprintf() call
2021-01-03 13:23:32 +01:00
Christian Flothmann
a8252a43b8 remove unneeded sprintf() call 2021-01-03 12:55:43 +01:00
Christian Flothmann
1d0c91629a fix tests to run assertions on returned Crawler instances 2021-01-03 11:13:13 +01:00
Fabien Potencier
a902dd8a1b bug #39683 [Yaml] keep trailing newlines when dumping multi-line strings (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] keep trailing newlines when dumping multi-line strings

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony/pull/39668#issuecomment-753484545
| License       | MIT
| Doc PR        |

Commits
-------

4c513c24c7 keep trailing newlines when dumping multi-line strings
2021-01-03 09:28:04 +01:00
Fabien Potencier
da07550827 bug #39670 [Form] disable error bubbling by default when inherit_data is configured (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] disable error bubbling by default when inherit_data is configured

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

Commits
-------

8679c2ac05 disable error bubbling by default when inherit_data is configured
2021-01-03 09:24:31 +01:00
Fabien Potencier
4bced61887 Fix CS 2021-01-03 09:19:04 +01:00
Fabien Potencier
a0d66d2ecd bug #39686 [Lock] Fix config merging in lock (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] Fix config merging in lock

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

Commits
-------

6bb2d67cf1 Fix config merging in lock
2021-01-03 09:18:23 +01:00
Jérémy Derussé
6bb2d67cf1
Fix config merging in lock 2021-01-02 23:18:12 +01:00
Christian Flothmann
4c513c24c7 keep trailing newlines when dumping multi-line strings 2021-01-02 17:02:59 +01:00
Fabien Potencier
04c67e61e2 bug #39668 [Yaml] do not dump extra trailing newlines for multiline blocks (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] do not dump extra trailing newlines for multiline blocks

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

Commits
-------

5fa9592d5e do not dump extra trailing newlines for multiline blocks
2021-01-01 10:44:44 +01:00
Fabien Potencier
2c4337ae5b Bump license year 2021-01-01 10:24:35 +01:00
Christian Flothmann
8679c2ac05 disable error bubbling by default when inherit_data is configured 2020-12-31 15:25:34 +01:00
Christian Flothmann
5fa9592d5e do not dump extra trailing newlines for multiline blocks 2020-12-31 11:51:02 +01:00
Nicolas Grekas
841ec99831 bug #39653 [Form] fix passing null $pattern to IntlDateFormatter (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] fix passing null $pattern to IntlDateFormatter

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

Commits
-------

52360c1e4e [Form] fix passing null $pattern to IntlDateFormatter
2020-12-29 14:57:58 +01:00
Nicolas Grekas
52360c1e4e [Form] fix passing null $pattern to IntlDateFormatter 2020-12-29 14:49:19 +01:00
Alexander M. Turek
40677a014e minor #39646 Update README.md (abdounikarim)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.

Discussion
----------

Update README.md

update readme semver link to use https

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

I just update semver link to use https instead of http. 😉

Commits
-------

9ee2dc6d66 Update README.md
2020-12-29 01:30:08 +01:00
Abdouni Abdelkarim
9ee2dc6d66
Update README.md
update semver link to use https
2020-12-29 01:17:49 +01:00
Nicolas Grekas
cd0db690f8 [ProxyManagerBridge] Fix tests 2020-12-28 22:45:17 +01:00
Fabien Potencier
bbe1bb77ef bug #39598 [Messenger] Fix stopwach usage if it has been reset (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Messenger] Fix stopwach usage if it has been reset

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

I'm slowly migrating an application to messenger (from swarrot) and I
hit a strange bug. My message was well processeed **BUT** retry!

It comes from two things

* I manually reset the application (via the service resetter, to keep a
low memory usage)
* symfony/messenger try to collect some information, but since the
stopwatch has been reset, an exception occurs and the message has been
retried

So this patch avoid throwing an exception when everything works well

<details>

<summary>the trace:</summary>

```

18:45:41 INFO      [messenger] Message AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage handled by AppBundle\Crawler\Messenger\MessageHandler\CrawlSitemapMessageHa
ndler::__invoke
[
  "message" => AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage^ {
    -crawlId: "885d23a7-8ad5-4935-a2b3-1c114ac76ded"
  },
  "class" => "AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage",
  "handler" => "AppBundle\Crawler\Messenger\MessageHandler\CrawlSitemapMessageHandler::__invoke"
]
18:45:41 ERROR     [messenger] Error thrown while handling message AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage. Sending for retry #1 using 1000 ms delay. Erro
r: "Event ""Symfony\Component\Messenger\Middleware\HandleMessageMiddleware" on "messenger.bus.default"" is not started."
[
  "message" => AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage^ {
    -crawlId: "885d23a7-8ad5-4935-a2b3-1c114ac76ded"
  },
  "class" => "AppBundle\Crawler\Messenger\Message\CrawlSitemapMessage",
  "retryCount" => 1,
  "delay" => 1000,
  "error" => "Event ""Symfony\Component\Messenger\Middleware\HandleMessageMiddleware" on "messenger.bus.default"" is not started.",
  "exception" => LogicException {
    #message: "Event ""Symfony\Component\Messenger\Middleware\HandleMessageMiddleware" on "messenger.bus.default"" is not started."
    #code: 0
    #file: "./vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php"
    #line: 142
    trace: {
      ./vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Section.php:142 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Stopwatch/Stopwatch.php:126 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php:75 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/HandleMessageMiddleware.php:83 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php:74 { …}
      ./src/Middleware/ResetApplicationMiddlerwareMiddleware.php:14 {
        AppBundle\Middleware\ResetApplicationMiddlerwareMiddleware->handle(Envelope $envelope, StackInterface $stack): Envelope^
        ›     echo "couocu";
        ›     return $stack->next()->handle($envelope, $stack);
        › }
      }
      ./vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Messenger/DoctrinePingConnectionMiddleware.php:34 { …}
      ./vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Messenger/AbstractDoctrineMiddleware.php:45 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/FailedMessageProcessingMiddleware.php:34 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/DispatchAfterCurrentBusMiddleware.php:68 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/RejectRedeliveredMessageMiddleware.php:48 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/AddBusNameStampMiddleware.php:37 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php:43 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/MessageBus.php:80 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/TraceableMessageBus.php:41 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/RoutableMessageBus.php:54 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Worker.php:114 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Worker.php:77 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php:198 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:989 { …}
      ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:290 { …}
      ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:82 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:166 { …}
      ./bin/console:29 { …}
    }
  }
]

```

</details>

Commits
-------

bf4b0cc022 [Messenger] Fix stopwach usage if it has been reset
2020-12-28 11:10:10 +01:00
Grégoire Pineau
bf4b0cc022 [Messenger] Fix stopwach usage if it has been reset 2020-12-28 10:51:48 +01:00
Alexander M. Turek
fc794e5964 minor #39632 CS: Apply ternary_to_null_coalescing fixer (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

CS: Apply ternary_to_null_coalescing fixer

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | N/A

Since we don't need to support PHP 5 anymore, we can upgrade our older code to use the null coalescing operator and enforce its usage through our PHP CS Fixer configuration. I think, the usage of that operator improves the readability of our codebase at lot.

Note that the changes in this PR are (with the exception of `.php_cs.dist`) completely automated. You should get the same results by running the following command (and reverting the changes to PhpUnitBridge afterwards).

```sh
php-cs-fixer fix --rules='{"ternary_to_null_coalescing":true}' src
```

Commits
-------

07c4773d98 CS: Apply ternary_to_null_coalescing fixer
2020-12-27 13:58:34 +01:00
Alexander M. Turek
07c4773d98 CS: Apply ternary_to_null_coalescing fixer 2020-12-27 00:49:32 +01:00
Alexander M. Turek
0ed047f49d bug #39631 [VarDumper] Fix display of nullable union return types (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Fix display of nullable union return types

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/39629#pullrequestreview-558863674
| License       | MIT
| Doc PR        | N/A

Commits
-------

efeb2dcf70 [VarDumper] Fix display of nullable union return types.
2020-12-26 20:35:52 +01:00
Alexander M. Turek
efeb2dcf70 [VarDumper] Fix display of nullable union return types. 2020-12-26 15:01:31 +01:00
Alexander M. Turek
018e33ab2d bug #39629 [VarDumper] fixed displaying "mixed" as "?mixed" (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] fixed displaying "mixed" as "?mixed"

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

Commits
-------

87dc694094 [VarDumper] fixed displaying "mixed" as "?mixed"
2020-12-26 14:41:53 +01:00
Nicolas Grekas
87dc694094 [VarDumper] fixed displaying "mixed" as "?mixed" 2020-12-26 12:22:20 +01:00
Jérémy Derussé
457c8b119d
bug #39597 [Mailer] Handle failure when sending DATA (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Handle failure when sending DATA

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

When an exception is thrown while sending an email via SMTP (ie. A attachment is not readable) the SMTP connection is left opened with a partial message sent.

This PR closes the connection (we can't abort after sending the `DATA` command) in such situation.

/cc @fabpot

Commits
-------

849211a780 Handle failure when sending DATA
2020-12-24 10:07:56 +01:00
Jérémy Derussé
849211a780
Handle failure when sending DATA 2020-12-23 18:20:02 +01:00
Nicolas Grekas
8b3c1a1edf minor #39614 Add missing @return annotations to fix deprecations on PHP 8 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Add missing `@return` annotations to fix deprecations on PHP 8

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

Commits
-------

3ffe5573e9 Add missing `@return` annotations to fix deprecations on PHP 8
2020-12-23 16:21:09 +01:00
Nicolas Grekas
3ffe5573e9 Add missing @return annotations to fix deprecations on PHP 8 2020-12-23 16:11:26 +01:00
Nicolas Grekas
64cc4d8e7a bug #39610 [ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts" (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts"

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

I submitted the fix for #39089 on the origin library at https://github.com/Ocramius/ProxyManager/pull/646.

Because of the [versioning policy](6d45615155/version-support.md (dependency-upgrades)) in use at the origin library, this fix won't be available for PHP < 7.4.

We usually resort to monkey-patching to workaround the policy and still ship the fix for 4.4 (which supports PHP >= 7.1).

This time, and as explained in https://github.com/Ocramius/ProxyManager/issues/630, I propose to delegate the fix to [friendsofphp/proxy-manager-lts](https://github.com/FriendsOfPHP/proxy-manager-lts/). It already embeds the fix and a few others that allow us to remove most of the monkey-patching we had to accumulate over time.

Commits
-------

389f5304c7 [ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts"
2020-12-23 15:36:40 +01:00
Nicolas Grekas
389f5304c7 [ProxyManagerBridge] fix PHP notice, switch to "friendsofphp/proxy-manager-lts" 2020-12-22 17:08:05 +01:00
Alexander M. Turek
18927fe54a minor #39573 [Intl] Update the ICU data to 68.2 (jakzal)
This PR was merged into the 4.4 branch.

Discussion
----------

[Intl] Update the ICU data to 68.2

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

Commits
-------

4573965f74 [Intl] Update the ICU data to 68.2
2020-12-21 17:14:24 +01:00
Alexander M. Turek
8f7a8d345a minor #39561 [Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock (jeroennoten)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | N.A.
| License       | MIT
| Doc PR        | N.A.

DenormalizableInterface::denormalize() should not return anything, so the `@return` declaration should be removed. If you look at the usage in `CustomNormalizer::denormalize()`, it becomes clear that this method shouldn't return anything:
```php
    public function denormalize($data, $type, $format = null, array $context = [])
    {
        $object = $this->extractObjectToPopulate($type, $context) ?: new $type();
        $object->denormalize($this->serializer, $data, $format, $context);

        return $object;
    }
```

Commits
-------

00c90aed51 [Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
2020-12-20 14:32:21 +01:00
Jakub Zalas
4573965f74
[Intl] Update the ICU data to 68.2 2020-12-19 12:57:32 +01:00
Fabien Potencier
c1b9323f30 Bump Symfony version to 4.4.19 2020-12-18 14:39:05 +01:00
Fabien Potencier
a05cc024d3
Merge pull request #39562 from fabpot/release-4.4.18
released v4.4.18
2020-12-18 14:32:50 +01:00
Fabien Potencier
92334dd0c5 Update VERSION for 4.4.18 2020-12-18 14:32:33 +01:00