Commit Graph

59062 Commits

Author SHA1 Message Date
Diogo Peralta Cordeiro c1e604a2dc
[HttpFoundation] File: Add settable permissions and adopt stricter defaults 2022-01-20 13:05:19 +00:00
Nicolas Grekas 2c91390bce Merge branch '5.4' into 6.0
* 5.4:
  [VarDumper] fix tests
2022-01-17 17:30:44 +01:00
Nicolas Grekas 6cf0ee2cd4 Merge branch '5.3' into 5.4
* 5.3:
  [VarDumper] fix tests
2022-01-17 17:30:37 +01:00
Nicolas Grekas 6cdfd712b3 minor #45045 [VarDumper] fix tests (nicolas-grekas)
This PR was merged into the 5.3 branch.

Discussion
----------

[VarDumper] fix tests

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

Commits
-------

7578cfa4a8 [VarDumper] fix tests
2022-01-17 17:30:29 +01:00
Nicolas Grekas 7578cfa4a8 [VarDumper] fix tests 2022-01-17 17:28:15 +01:00
Nicolas Grekas c44b9fc1f9 Merge branch '5.4' into 6.0
* 5.4:
  [Cache] fix tests with RedisArray
2022-01-17 17:16:34 +01:00
Nicolas Grekas 8c83ae595b Merge branch '5.3' into 5.4
* 5.3:
  [Cache] fix tests with RedisArray
2022-01-17 17:16:19 +01:00
Nicolas Grekas b778acc083 Merge branch '4.4' into 5.3
* 4.4:
  [Cache] fix tests with RedisArray
2022-01-17 17:15:49 +01:00
Nicolas Grekas 99b4885e7e minor #45044 [Cache] fix tests with RedisArray (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] fix tests with RedisArray

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

Commits
-------

c0879ecd65 [Cache] fix tests with RedisArray
2022-01-17 17:15:07 +01:00
Nicolas Grekas c0879ecd65 [Cache] fix tests with RedisArray 2022-01-17 17:11:43 +01:00
Nicolas Grekas 66441111b3 Update expected-missing-return-types 2022-01-17 12:11:09 +01:00
Nicolas Grekas adc8a55bad Merge branch '5.4' into 6.0
* 5.4:
  [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()
  Fix invalid guess with enumType
  [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for
2022-01-17 11:54:40 +01:00
Nicolas Grekas a4d5fb87c5 Merge branch '5.3' into 5.4
* 5.3:
  [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()
  Fix invalid guess with enumType
  [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for
2022-01-17 11:51:41 +01:00
Nicolas Grekas 54df0f7b78 Merge branch '4.4' into 5.3
* 4.4:
  [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()
  Fix invalid guess with enumType
2022-01-17 11:48:48 +01:00
Nicolas Grekas 3974dc112a bug #45012 [DoctrineBridge] Fix invalid guess with enumType (jderusse)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Fix invalid guess with enumType

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

Since https://github.com/doctrine/orm/pull/9304 doctrine allows Enums with the new `enumType` option.
ie.

```php
#[ORM\Column(type: 'string', enumType: Status::class, length: 1)]
public Status $status;
```

The issue is, it break validations at several places:
- `doctrinerExtractor` guess it's a `string` (Because of `type = string`), and validation adds the constraint `Assert\Type(string)`
- `doctrineLoader` guess it's a string with a maxLength and validation adds a constrain `Assert\Length(max=1)`
-

Commits
-------

68dd21881f Fix invalid guess with enumType
2022-01-14 11:28:02 +01:00
Nicolas Grekas 5f6d897444 bug #45015 [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()

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

This PR reverts #44625 and uses a new curl-share handle instead to reset any state.

Commits
-------

d4266464fe [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset()
2022-01-14 11:25:33 +01:00
Nicolas Grekas d4266464fe [HttpClient] fix resetting DNS/etc when calling CurlHttpClient::reset() 2022-01-13 19:40:34 +01:00
Jérémy Derussé 68dd21881f
Fix invalid guess with enumType 2022-01-13 15:51:07 +01:00
Nicolas Grekas 7ce3a15199 bug #45004 [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for (plozmun)
This PR was merged into the 5.3 branch.

Discussion
----------

[HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for

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

Similar to https://github.com/symfony/symfony/pull/44890 but this function was introduced in 5.1 https://github.com/symfony/symfony/pull/37927

Commits
-------

3d2ed700eb [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for
2022-01-13 12:58:34 +01:00
plozmun 3d2ed700eb [HttpClient] Remove deprecated usage of GuzzleHttp\Promise\promise_for 2022-01-12 23:27:38 +01:00
Nicolas Grekas 97d36c6b62 Merge branch '5.4' into 6.0
* 5.4:
  [HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue`
  [PropertyAccess] Fix handling of uninitialized property of anonymous class
  [FrameworkBundle] Allow default cache pools to be overwritten by user
  [DependencyInjection] fix test
  ResolveBindingsPass remove loading of class iterable
  [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand
  Optimization of resolveEnvPlaceholders
  Fix incorrect format
  [DependencyInjection] Fix nested env var with resolve processor
  Allow OutputFormatter::escape() to be used for escaping URLs used in <href>
  allow a zero time-limit
  Use correct tag for ExpoTransportFactory service
  [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory
  [Validators] Add translations for Slovak #43735
2022-01-12 19:59:56 +01:00
Nicolas Grekas bbe4105fe9 Merge branch '5.3' into 5.4
* 5.3:
  [HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue`
  [PropertyAccess] Fix handling of uninitialized property of anonymous class
  [FrameworkBundle] Allow default cache pools to be overwritten by user
  [DependencyInjection] fix test
  ResolveBindingsPass remove loading of class iterable
  [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand
  [DependencyInjection] Fix nested env var with resolve processor
  Allow OutputFormatter::escape() to be used for escaping URLs used in <href>
  allow a zero time-limit
  [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory
  [Validators] Add translations for Slovak #43735
2022-01-12 19:55:10 +01:00
Nicolas Grekas 01640e874a bug #44998 [FrameworkBundle] Allow default cache pools to be overwritten by user (Seldaek)
This PR was merged into the 5.3 branch.

Discussion
----------

[FrameworkBundle] Allow default cache pools to be overwritten by user

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fixes https://github.com/symfony/symfony/issues/44984
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - 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 the latest branch.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

cc7cf5a4a6 [FrameworkBundle] Allow default cache pools to be overwritten by user
2022-01-12 19:38:22 +01:00
Nicolas Grekas bf75321462 Merge branch '4.4' into 5.3
* 4.4:
  [HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue`
  [PropertyAccess] Fix handling of uninitialized property of anonymous class
  [DependencyInjection] fix test
  ResolveBindingsPass remove loading of class iterable
  [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand
  [DependencyInjection] Fix nested env var with resolve processor
  Allow OutputFormatter::escape() to be used for escaping URLs used in <href>
  allow a zero time-limit
  [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory
  [Validators] Add translations for Slovak #43735
2022-01-12 19:37:36 +01:00
Nicolas Grekas 9f5238d4f6 bug #44890 [HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue` (GrahamCampbell)
This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue`

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

`GuzzleHttp\Promise\queue` was deprecated in `1.4.0` in favour of `GuzzleHttp\Promise\Utils::queue`, to enable PSR-4 compliance and eliminate issues with multiple installs globally and locally. Since the minimum version of this package in Symfony's composer.json is `1.4.0` (`^1.4`), then this change should be safe to make.

---

cc `@Nyholm`

Commits
-------

5130dd590a [HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue`
2022-01-12 19:29:25 +01:00
Graham Campbell 5130dd590a [HttpClient] Remove deprecated usage of `GuzzleHttp\Promise\queue` 2022-01-12 19:28:55 +01:00
Nicolas Grekas 727842f644 bug #45002 [PropertyAccess] Fix handling of uninitialized property of anonymous class (filiplikavcan)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyAccess] Fix handling of uninitialized property of anonymous class

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

Commits
-------

27d5edf3d2 [PropertyAccess] Fix handling of uninitialized property of anonymous class
2022-01-12 19:12:28 +01:00
“Filip 27d5edf3d2 [PropertyAccess] Fix handling of uninitialized property of anonymous class 2022-01-12 19:05:29 +01:00
Jordi Boggiano cc7cf5a4a6
[FrameworkBundle] Allow default cache pools to be overwritten by user 2022-01-12 15:43:39 +01:00
Nicolas Grekas 4d04a2dd57 [DependencyInjection] fix test 2022-01-12 13:54:05 +01:00
Nicolas Grekas 9f89250877 bug #44979 [DependencyInjection] Add iterable to possible binding type (vladimir.panivko)
This PR was submitted for the 5.4 branch but it was merged into the 4.4 branch instead.

Discussion
----------

[DependencyInjection] Add iterable to possible binding type

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

When iterable type is set in binding like in example https://symfony.com/doc/current/service_container.html#binding-arguments-by-name-or-type, system tries to autoload class iterable here src/Symfony/Component/DependencyInjection/Compiler/ResolveBindingsPass.php:137
```
if (is_subclass_of($m[1], \UnitEnum::class)) {
```

Commits
-------

f9f78c7c2a ResolveBindingsPass remove loading of class iterable
2022-01-12 13:49:04 +01:00
vladimir.panivko f9f78c7c2a ResolveBindingsPass remove loading of class iterable 2022-01-12 13:48:08 +01:00
Thomas Calvet 3b7df9ad65 bug #44908 [Serializer] Fix AbstractObjectNormalizer TypeError on denormalization (JustDylan23)
This PR was squashed before being merged into the 6.0 branch.

Discussion
----------

[Serializer] Fix AbstractObjectNormalizer TypeError on denormalization

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

When using dependency injection to get the serializer (instead of manually instantiating it) the object normalizer that is injected into that serializer throws a value exception when doing denormalizing the following:

```php
class ObjectOuter {
  public ObjectInner $inner;
}

class ObjectInner {
  public $foo;
}

public function testDenormalizeRecursiveWithObjectAttributeWithStringValue()
{
    $extractor = new ReflectionExtractor();
    $normalizer = new ObjectNormalizer(null, null, null, $extractor);
    $serializer = new Serializer([$normalizer]);

    $obj = $serializer->denormalize(['inner' => 'foo'], ObjectOuter::class);
    $this->assertInstanceOf(ObjectInner::class, $obj->getInner());
    }
```

This throws
```php
TypeError:
Symfony\Component\Serializer\Normalizer\AbstractNormalizer::prepareForDenormalization(): Argument #1 ($data) must be of type object|array|null, string given, called in /var/www/symfony/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php on line 368

  at vendor/symfony/serializer/Normalizer/AbstractNormalizer.php:299
  at Symfony\Component\Serializer\Normalizer\AbstractNormalizer->prepareForDenormalization('test string')
     (vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php:368)
  at Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->denormalize('test string', 'App\\Entity\\User', null, array('cache_key' => 'c93a6d4efa206ea58a62cc6b7fab8dfb', 'deserialization_path' => 'author'))
     (vendor/symfony/serializer/Serializer.php:238)
  at Symfony\Component\Serializer\Serializer->denormalize('test string', 'App\\Entity\\User', null, array('cache_key' => 'c93a6d4efa206ea58a62cc6b7fab8dfb', 'deserialization_path' => 'author'))
     (vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php:559)
  at Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->validateAndDenormalize(array(object(Type)), 'App\\Entity\\Blog', 'author', 'test string', null, array('cache_key' => '44db5a926a1544b1a8585af40107ca3a', 'deserialization_path' => 'author'))
     (vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php:401)
  at Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer->denormalize(array('author' => 'test string'), 'App\\Entity\\Blog', null, array('cache_key' => '44db5a926a1544b1a8585af40107ca3a'))
     (vendor/symfony/serializer/Serializer.php:238)
  at Symfony\Component\Serializer\Serializer->denormalize(array('author' => 'test string'), 'App\\Entity\\Blog')
     (src/Controller/BugReproductionController.php:18)
  at App\Controller\BugReproductionController->test(object(Serializer))
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/var/www/symfony/vendor/autoload_runtime.php')
     (public/index.php:5)
```

Refer to: https://github.com/symfony/symfony/pull/44881 for the description.
Was in the middle of changing the base branch and accidentally pushed when the branch was deleted.

`@fancyweb` I implemented the requested changes

Commits
-------

89092ea279 [Serializer] Fix AbstractObjectNormalizer TypeError on denormalization
2022-01-12 13:47:11 +01:00
JustDylan23 89092ea279 [Serializer] Fix AbstractObjectNormalizer TypeError on denormalization 2022-01-12 13:46:58 +01:00
Nicolas Grekas 6bffe4127a minor #44876 [DependencyInjection] Optimization of resolveEnvPlaceholders (vladimir.panivko)
This PR was merged into the 5.4 branch.

Discussion
----------

[DependencyInjection] Optimization of resolveEnvPlaceholders

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

When you have to much env variables and many services in your container, container compilаtion can take much time due to the function stripos which is called much time.
Look at the bottom of picture https://i2.piccy.info/i9/cdc413af9aecce8f7ed5ca0fe69b6c7c/1640950765/149173/1453384/6833Screenshot_from_2021_12_31_13_38_20.png

It happens because function resolveEnvPlaceholders try to find env placeholders in any value, even when there is no possible env in string.

So i offer to check value on strings env_ or env( and if they are present than look for placeholders.

In my project it helps me to save 10 seconds in container building.

Commits
-------

f73b5aa479 Optimization of resolveEnvPlaceholders
2022-01-12 13:43:31 +01:00
Jérôme Tamarelle c7a5902a20 bug #44976 [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand (pavol-tk, GromNaN)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand

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

Avoid following deprecation notice:
```
php.INFO: Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
```

Commits
-------

3d92f987dc [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand
2022-01-12 12:20:40 +01:00
Pavol Tuka 3d92f987dc [FrameworkBundle] Avoid calling rtrim(null, '/') in AssetsInstallCommand 2022-01-12 12:20:14 +01:00
vladimir.panivko f73b5aa479 Optimization of resolveEnvPlaceholders 2022-01-11 14:42:14 +02:00
Fabien Potencier b41251a33a minor #44955 Fix incorrect format in UPGRADE-5.4.md (malteschlueter)
This PR was merged into the 5.4 branch.

Discussion
----------

Fix incorrect format in UPGRADE-5.4.md

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

The format is not correct, see:
<img width="908" alt="grafik" src="https://user-images.githubusercontent.com/13586874/148679128-cd09da8a-5fea-47c1-b75f-ac3286a3cf78.png">

---

It should be like this:
<img width="993" alt="grafik" src="https://user-images.githubusercontent.com/13586874/148679163-46951132-04bf-445d-9f8f-10ba8da9916f.png">

Commits
-------

6e75bc039f Fix incorrect format
2022-01-09 11:55:23 +01:00
Fabien Potencier c3674b4e7f bug #44879 [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  |  no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/35599, https://github.com/symfony/symfony/issues/44515
| License       | MIT
| Doc PR        | -

When a definition uses a factory, we don't know what it returns.

Commits
-------

b9095e6c09 [DependencyInjection] Ignore argument type check in CheckTypeDeclarationsPass if it's a Definition with a factory
2022-01-09 11:54:01 +01:00
Malte Schlüter 6e75bc039f
Fix incorrect format 2022-01-09 11:50:45 +01:00
Fabien Potencier b626db7565 bug #44920 Use correct tag for ExpoTransportFactory service (jschaedl)
This PR was merged into the 5.4 branch.

Discussion
----------

Use correct tag for ExpoTransportFactory service

| Q             | A
| ------------- | ---
| Branch?       | 5.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       | Fix #44833 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | -
<!--
Replace this notice by a short README for your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - 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 the latest branch.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

1d06c4e5de Use correct tag for ExpoTransportFactory service
2022-01-09 08:58:32 +01:00
Jérôme Tamarelle ddfaf70a33 bug #44931 Allow a zero time-limit for messenger:consume (fritzmg)
This PR was merged into the 4.4 branch.

Discussion
----------

Allow a zero time-limit for messenger:consume

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

By default `messenger:consume` will run indefinitely and as the docs mention you should monitor the process via Supervisor for example. However on shared hostings this is usually not an option and thus this command will be run via a cronjob there (at least I assume that's the intended best practise in such a case). To ensure the worker exits for each cronjob run, you can use the `--time-limit` option, e.g.

```
bin/console messenger:consume --time-limit=1
```

However, this would allow the worker to consume multiple message for the duration of 1000ms - so technically if you want the worker to _immediately_ exit each time after it processed the current message queue it should actually be

```
bin/console messenger:consume --time-limit=0
```

But this does not currently work, as the zero is falsey and thus the `StopWorkerOnTimeLimitListener` will not actually be added.

This PR fixes that by checking whether the option was actually supplied or not.

Commits
-------

2668c0db2f allow a zero time-limit
2022-01-08 23:39:07 +01:00
Jérôme Tamarelle 7b32f97172 bug #44932 [DependencyInjection] Fix nested env var with resolve processor (Laurent Moreau)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix nested env var with resolve processor

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

This PR fixes the issue raised by `@ro0NL`. (see Description)
I added some tests but i'm not confident about how to check with real environment variables.

This is my first PR, i hope i'm not doing it wrong.

Commits
-------

b2a61eec71 [DependencyInjection] Fix nested env var with resolve processor
2022-01-07 18:13:16 +01:00
Laurent Moreau b2a61eec71 [DependencyInjection] Fix nested env var with resolve processor 2022-01-07 18:13:10 +01:00
Fabien Potencier 29843b3ea6 bug #44912 [Console] Allow OutputFormatter::escape() to be used for escaping URLs used in <href> (Seldaek)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Allow OutputFormatter::escape() to be used for escaping URLs used in <href>

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| 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 -->

I was trying to use escape() to make user-provided URLs safe in `<href=...>` but I realized it was really only good for avoid starting tags, and not for escaping the content of a tag.

- escape() now escapes `>` as well as `<`
- URLs containing escaped `<`, `>` are now rendered correctly
- user-provided URLs should now be safe to use (as in they cannot break the formatting) as long as they're piped through `escape()`
- possibly also resolves issues if you were trying to use user-provided colors i.e. `'<'.OutputFormatter::escape($color).'>'` where as in current released code it would not help you at all here. I haven't checked that yet

I am happy to spend time adding tests but would like to first get feedback on the changes to know if it's reasonable or not to change `escape()` in this way.

The rest of the changes I think are absolutely safe to merge and make sense regardless.

Commits
-------

cfa8910dc7 Allow OutputFormatter::escape() to be used for escaping URLs used in <href>
2022-01-07 10:34:51 +01:00
Jordi Boggiano cfa8910dc7
Allow OutputFormatter::escape() to be used for escaping URLs used in <href>
- escape() now escapes `>` as well as `<`
- URLs containing escaped `<` and `>` are rendered correctly as is
- user-provided URLs should now be safe to use (as in they cannot break the formatting) as long as they're piped through `escape()`
2022-01-07 09:38:32 +01:00
Robin Chalas 1a02d0c233
Merge branch '5.4' into 6.0
* 5.4:
  [String] Add conflict for translation-contracts v3
  fixed help text
2022-01-07 01:29:03 +01:00
Robin Chalas 33d4c4314d
Merge branch '5.3' into 5.4
* 5.3:
  [String] Add conflict for translation-contracts v3
  fixed help text
2022-01-07 01:28:17 +01:00
Fritz Michael Gschwantner 2668c0db2f
allow a zero time-limit 2022-01-06 12:44:55 +00:00