Commit Graph

54246 Commits

Author SHA1 Message Date
Matthias Pigulla
ee7bc0272e [HttpKernel] [HttpCache] Keep s-maxage=0 from ESI sub-responses 2021-06-23 11:44:56 +02:00
Fabien Potencier
e1b81e39db bug #41739 Avoid broken action URL in text notification mail (mbrodala)
This PR was submitted for the 5.3 branch but it was merged into the 5.2 branch instead.

Discussion
----------

Avoid broken action URL in text notification mail

| Q             | A
| ------------- | ---
| Branch?       | 5.3 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Some mail clients make URLs clickable automatically which leads to broken URLs due to the appended ":" (colon)

Fix this by moving the action text before the action URL.

Commits
-------

6f6e8cf184 Avoid broken action URL in text notification mail
2021-06-23 11:41:58 +02:00
Mathias Brodala
6f6e8cf184 Avoid broken action URL in text notification mail
Some mail clients make URLs clickable automatically which leads to broken URLs due to the appended ":" (colon)

Fix this by moving the action text before the action URL.
2021-06-23 11:41:51 +02:00
Alexander M. Turek
0c1343f4ee bug #41701 [VarDumper] Fix tests for PHP 8.1 (alexandre-daubois)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Fix tests for PHP 8.1

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Part of #41552 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

f2b0822401 [VarDumper] Fix tests for PHP 8.1
2021-06-22 22:22:50 +02:00
Alexander M. Turek
1a2e10137e Merge branch '4.4' into 5.2
* 4.4:
  [FrameworkBundle] Replace var_export with VarExporter to use array short syntax
  Pin masterminds/html5 to the master branch for PHP 8.1
2021-06-22 22:08:09 +02:00
Alexander M. Turek
6f9f4bee41 minor #41790 Pin masterminds/html5 to the master branch for PHP 8.1 (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Pin masterminds/html5 to the master branch for PHP 8.1

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

Our tests on PHP 8.1 require the changes I've made in Masterminds/html5-php#207. Unfortunately, Composer will not pick a version with those changes because of the reasons described in Masterminds/html5-php#209. This PR adds a small workaround to the PHP 8.1 job which I'll happily revert as soon as Masterminds/html5-php#209 is resolved.

Commits
-------

9c69e77805 Pin masterminds/html5 to the master branch for PHP 8.1
2021-06-22 22:07:07 +02:00
Alexander M. Turek
124ecf07d0 bug #41795 [FrameworkBundle] Replace var_export with VarExporter to use array short syntax in secrets list files (alexandre-daubois)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Replace var_export with VarExporter to use array short syntax in secrets list files

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

I've been using secrets a lot lately. Unfortunately, command exports the `{env}.list.php` with the "old" array syntax using `array()`, and writing `null` in uppercase.

This results in tedious situations with PHP CS Fixer (for example) rewriting the whole file to restore the modern syntax, each time we add a secret.

The Sodium vault currently uses `var_export`. I suggest using Symfony VarExporter, which does the work just fine. It adds a dependency to the FrameworkBundle, but it is a cleaner way to do it rather than using [this type of hack](https://www.php.net/manual/fr/function.var-export.php#124194) IMO.

Commits
-------

7f1c76212f [FrameworkBundle] Replace var_export with VarExporter to use array short syntax
2021-06-22 22:03:29 +02:00
Alexandre Daubois
7f1c76212f [FrameworkBundle] Replace var_export with VarExporter to use array short syntax 2021-06-22 20:48:42 +02:00
Alexander M. Turek
e85323f088 Merge branch '4.4' into 5.2
* 4.4:
  Reapply the change to allow to set the composer binary path
  [DependencyInjection] throw proper exception when decorating a synthetic service
  [WebLink] Sync type with parent interface
  [WebLink] fix types on Link::withAttribute()
  [ErrorHandler][DebugClassLoader] Do not check Phake mocks classes
2021-06-22 18:06:23 +02:00
Alexander M. Turek
8445564d02 bug #41779 [DependencyInjection] throw proper exception when decorating a synthetic service (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] throw proper exception when decorating a synthetic service

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

Commits
-------

b763a29514 [DependencyInjection] throw proper exception when decorating a synthetic service
2021-06-22 18:01:49 +02:00
Alexander M. Turek
9c69e77805 Pin masterminds/html5 to the master branch for PHP 8.1
Signed-off-by: Alexander M. Turek <me@derrabus.de>
2021-06-22 17:42:29 +02:00
Alexander M. Turek
8391e0b2e2 bug #41776 [ErrorHandler] [DebugClassLoader] Do not check Phake mocks classes (adoy)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] [DebugClassLoader] Do not check Phake mocks classes

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | [Phake Issue #300](https://github.com/phake/phake/issues/300)
| License       | MIT
| Doc PR        | -

Similar issue as https://github.com/symfony/symfony/pull/38373 but with Phake mocking framework

Commits
-------

9ed93df77a [ErrorHandler][DebugClassLoader] Do not check Phake mocks classes
2021-06-22 12:26:33 +02:00
Nicolas Grekas
8a32526db8 bug #41780 [PhpUnitBridge] fix handling the COMPOSER_BINARY env var when using simple-phpunit (Taluu)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] fix handling the COMPOSER_BINARY env var when using simple-phpunit

| Q             | A
| ------------- | ---
| Branch?       | 4.4 and next
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41774
| License       | MIT

Since the renaming of the simple phpunit file (from the shebang to the php file) in #31364, it looks like the change made from #36566 was lost as it seems to have been merged after.

So this PR is an attempt to "restore" that functionnality, as it was considered a bug fix on 3.4 at the time.

poke `@nicolas`-grekas

Commits
-------

9589b52a78 Reapply the change to allow to set the composer binary path
2021-06-22 11:38:29 +02:00
Baptiste Clavié
9589b52a78 Reapply the change to allow to set the composer binary path
This change was somehow changed back during the renaming of the file
I think. So this is just restoring the change.
2021-06-22 11:18:56 +02:00
Nicolas Grekas
b763a29514 [DependencyInjection] throw proper exception when decorating a synthetic service 2021-06-22 10:35:27 +02:00
Nicolas Grekas
63e42698d9 [WebLink] Sync type with parent interface 2021-06-22 09:44:52 +02:00
Nicolas Grekas
f0bb3caad1 minor #41763 [WebLink] fix types on Link::withAttribute() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebLink] fix types on Link::withAttribute()

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

Related to 10e52348a2

Commits
-------

29903e2c35 [WebLink] fix types on Link::withAttribute()
2021-06-22 09:35:25 +02:00
Nicolas Grekas
29903e2c35 [WebLink] fix types on Link::withAttribute() 2021-06-22 09:33:19 +02:00
Alexander M. Turek
147713a2ab Merge branch '4.4' into 5.2
* 4.4:
  [HttpFoundation] allow savePath of NativeFileSessionHandler to be null
2021-06-21 23:40:01 +02:00
Alexander M. Turek
6a4dcde41f bug #41670 [HttpFoundation] allow savePath of NativeFileSessionHandler to be null (simon.chrzanowski)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

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

By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

Commits
-------

f8a082daeb [HttpFoundation] allow savePath of NativeFileSessionHandler to be null
2021-06-21 23:37:53 +02:00
Pierrick Charron
9ed93df77a
[ErrorHandler][DebugClassLoader] Do not check Phake mocks classes 2021-06-21 16:27:34 -04:00
Nicolas Grekas
dffde22329 [Cache] Disable locking on Windows by default 2021-06-21 18:21:37 +02:00
Nicolas Grekas
8451a14cf6 [DependencyInjection] Fix binding "iterable $foo" when using the PHP-DSL 2021-06-21 17:20:28 +02:00
Nicolas Grekas
978747e6ea [Config] fix tracking default values that reference the parent class 2021-06-21 16:51:25 +02:00
Nicolas Grekas
67fae67a9a [DependencyInjection] fix accepted types on FactoryTrait::factory() 2021-06-21 14:31:30 +02:00
Nicolas Grekas
46befa8304 minor #41736 [Notifier] Do not use static::class for final messages (norkunas)
This PR was submitted for the 5.4 branch but it was merged into the 5.2 branch instead.

Discussion
----------

[Notifier] Do not use static::class for final messages

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/39402#discussion_r638619033
| License       | MIT
| Doc PR        | N/A

Micro optimization

Commits
-------

69f6409731 Do not use static::class for final messages
2021-06-21 14:11:27 +02:00
Tomas
69f6409731 Do not use static::class for final messages 2021-06-21 14:11:19 +02:00
Christian Flothmann
53c06ea546 bug #41751 [Messenger] prevent reflection usages when classes do not exist (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Messenger] prevent reflection usages when classes do not exist

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

Commits
-------

017b4b341c prevent reflection usages when classes do not exist
2021-06-21 08:56:53 +02:00
Christian Flothmann
017b4b341c prevent reflection usages when classes do not exist 2021-06-19 21:27:24 +02:00
simon.chrzanowski
f8a082daeb [HttpFoundation] allow savePath of NativeFileSessionHandler to be null 2021-06-18 10:57:27 +02:00
Nicolas Grekas
769a05bdc5 [FrameworkBundle] fix leftover 2021-06-17 15:29:25 +02:00
Nicolas Grekas
4a125a856f Merge branch '4.4' into 5.2
* 4.4:
  Fix some typos in Greek language
2021-06-17 14:33:21 +02:00
Nicolas Grekas
9399e2c72d bug #41616 [Messenger] Remove TLS related options when not using TLS (odolbeau)
This PR was merged into the 5.2 branch.

Discussion
----------

[Messenger] Remove TLS related options when not using TLS

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

Remove TLS related options when not using TLS to connect to a broker.

The goal is to be able to use the same configuration for both `amqp://` & `amqps://` DSN.

Currently, when using a configuration containing a `cacert` key with a non-TLS DSN will throw a `AMQPConnectionException` (Socket error: could not connect to host.)

Configuration example:
```yaml
framework:
    messenger:
        transports:
            async:
              dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
              options:
                cacert: '%kernel.project_dir%/amqp_cacert.pem'
```

Commits
-------

37e602dd28 Remove TLS related options when not using TLS
2021-06-17 14:21:31 +02:00
Nicolas Grekas
a026c672e7 bug #41719 [FrameworkBundle] fix Could not find service "test.service_container" (smilesrg)
This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] fix Could not find service "test.service_container"

| Q             | A
| ------------- | ---
| Branch?       |  5.2, needs to be ported to 5.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41715
| License       | MIT

Partial backport of https://github.com/symfony/symfony/pull/41530
Related to https://github.com/symfony/symfony/issues/41715 and https://github.com/symfony/symfony/pull/41530

When launching phpunit, got an error:
`LogicException: Could not find service "test.service_container". Try updating the "framework.test" config to "true".`

```
There was 1 error:

1) App\Symfony\Bundle\Tests\Integration\IntegrationTest::testServiceWiringWithConfiguration
LogicException: Could not find service "test.service_container". Try updating the "framework.test" config to "true".

/Projects/app/vendor/symfony/framework-bundle/Test/KernelTestCase.php:109
/Projects/app/tests/integration/IntegrationTest.php:23

Caused by
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "test.service_container". Did you mean this: "service_container"?

/Projects/app/vendor/symfony/dependency-injection/Container.php:280
/Projects/app/vendor/symfony/dependency-injection/Container.php:228
/Projects/app/vendor/symfony/framework-bundle/Test/KernelTestCase.php:107
/Projects/app/tests/integration/IntegrationTest.php:23
```

/cc `@xabbuh`  `@nicolas`-grekas

Commits
-------

0748b5247e bug #41715: [FrameworkBundle] Partial backport of PR#41530
2021-06-17 14:08:19 +02:00
Alexandre Daubois
f2b0822401 [VarDumper] Fix tests for PHP 8.1 2021-06-17 08:35:48 +02:00
Nyholm
ffb0d2d424
minor #41712 [Validator] Fix some typos in Greek language (simplegr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Fix some typos in Greek language

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

Fix some typos in Greek language

Commits
-------

8df2ea12d3 Fix some typos in Greek language
2021-06-16 16:15:28 +02:00
Serhii Smirnov
0748b5247e bug #41715: [FrameworkBundle] Partial backport of PR#41530
https://github.com/symfony/symfony/issues/41715
https://github.com/symfony/symfony/pull/41530
2021-06-16 00:11:27 +03:00
George Yiannoulopoulos
8df2ea12d3
Fix some typos in Greek language 2021-06-15 11:42:13 +03:00
Nicolas Grekas
8b2ee3138b Merge branch '4.4' into 5.2
* 4.4:
  [Config] fix tracking attributes in ReflectionClassResource
  [Process] Fix incorrect parameter type
  [HttpFoundation] Handle tentative return types
2021-06-12 12:15:01 +02:00
Nicolas Grekas
a04effad3f bug #41674 [HttpClient] fix compat with cURL <= 7.37 (nicolas-grekas)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpClient] fix compat with cURL <= 7.37

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

Commits
-------

d8adf5101a [HttpClient] fix compat with cURL <= 7.37
2021-06-12 11:00:02 +02:00
Nicolas Grekas
d8adf5101a [HttpClient] fix compat with cURL <= 7.37 2021-06-12 10:58:29 +02:00
Robin Chalas
610b51d65a
minor #41679 Remove Debug component from patch-types.php (fancyweb)
This PR was merged into the 5.2 branch.

Discussion
----------

Remove Debug component from patch-types.php

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

Commits
-------

ce8ee160d0 Remove Debug component from patch-types.php
2021-06-11 15:38:20 +02:00
Thomas Calvet
ce8ee160d0 Remove Debug component from patch-types.php 2021-06-11 15:06:13 +02:00
Nicolas Grekas
5b21ce2642 bug #41656 [HttpClient] throw exception when AsyncDecoratorTrait gets an already consumed response (nicolas-grekas)
This PR was merged into the 5.2 branch.

Discussion
----------

[HttpClient] throw exception when AsyncDecoratorTrait gets an already consumed response

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

Commits
-------

38dae138fd [HttpClient] throw exception when AsyncDecoratorTrait gets an already consumed response
2021-06-11 11:55:27 +02:00
Nicolas Grekas
38dae138fd [HttpClient] throw exception when AsyncDecoratorTrait gets an already consumed response 2021-06-11 11:53:21 +02:00
Alexander M. Turek
0fa07c6d7c bug #41644 [Config] fix tracking attributes in ReflectionClassResource (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Config] fix tracking attributes in ReflectionClassResource

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

Commits
-------

7ad8247422 [Config] fix tracking attributes in ReflectionClassResource
2021-06-10 17:19:12 +02:00
David Maicher
608a3e596a [Mailer] fix encoding of addresses using SmtpTransport 2021-06-10 15:25:38 +02:00
Ion Bazan
c8ec05d424
make AbstractDataCollector extend DataCollector to reduce boilerplate 2021-06-10 15:49:44 +08:00
Nicolas Grekas
7ad8247422 [Config] fix tracking attributes in ReflectionClassResource 2021-06-09 17:56:09 +02:00
Nicolas Grekas
dd2e6059b5 bug #41621 [Process] Fix incorrect parameter type (bch36)
This PR was submitted for the 5.4 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Process] Fix incorrect parameter type

In the affected line of code, fclose() should ONLY be passed a parameter of type resource, but fopen() can return a value of type bool (if the fopen() fails). This results in a fatal error under PHP 8: Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given.

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

Commits
-------

d1579a2922 [Process] Fix incorrect parameter type
2021-06-09 16:59:17 +02:00