Commit Graph

32737 Commits

Author SHA1 Message Date
Cristoforo Cervino
5f913cec74 [Form] Add "form_attr" FormType option 2021-03-18 16:04:09 +01:00
Alexander M. Turek
1c22e6a0fc feature #38488 [Validator] Add normalizer option to Unique constraint (henry2778)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Validator] Add normalizer option to Unique constraint

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #37451
| License       | MIT
| Doc PR        | todo

Hello! Reopening my PR #37507 with target branch `5.x`

This PR is about https://github.com/symfony/symfony/issues/37451. The idea is to make that constraint more flexible and able to process business rules, especially when working with objects. We can think about it as the similar feature in UniqueEntity constraint, when we declare on which attributes we are applying the constraint. But in our case it is more general - we pass a callable with whatever logic we want to apply to collection elements before we apply 'uniqueness check' :)

Looks like no BC breaks. Thanks! :)

Commits
-------

44e1e8bc9b [Validator] Add normalizer option to Unique constraint
2021-03-18 15:44:46 +01:00
Andrii Popov
44e1e8bc9b [Validator] Add normalizer option to Unique constraint 2021-03-18 15:44:36 +01:00
Christian Flothmann
acb32dd396 Merge branch '5.2' into 5.x
* 5.2:
  fix version constraint
2021-03-17 21:38:37 +01:00
Christian Flothmann
e3788b68be fix version constraint 2021-03-17 21:31:43 +01:00
Nicolas Grekas
4b312ab06c Merge branch '5.2' into 5.x
* 5.2:
  Fix test
2021-03-17 18:12:23 +01:00
Nicolas Grekas
763edf9c92 Fix test 2021-03-17 18:12:15 +01:00
Nicolas Grekas
78fccbeb4c Merge branch '5.2' into 5.x
* 5.2:
  [Console] Fix line wrapping for decorated text in block output
  [Inflector] Fixed pluralize "coupon"
  [PhpUnitBridge] fix compat with symfony/debug
  [VarDumper] Adds support for ReflectionUnionType to VarDumper
  Correctly clear lines for multi-line progress bar messages.
  [Security] Add XML support for authenticator manager
2021-03-17 17:56:09 +01:00
Nicolas Grekas
98fce3ee7f Merge branch '4.4' into 5.2
* 4.4:
  [Console] Fix line wrapping for decorated text in block output
  [Inflector] Fixed pluralize "coupon"
  [PhpUnitBridge] fix compat with symfony/debug
  [VarDumper] Adds support for ReflectionUnionType to VarDumper
  Correctly clear lines for multi-line progress bar messages.
2021-03-17 17:55:51 +01:00
Nicolas Grekas
9030fd368b bug #40348 [Console] Fix line wrapping for decorated text in block output (grasmash)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Console] Fix line wrapping for decorated text in block output

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

Fixed bug that caused decorated text to be wrapped too early in SymfonyStyle->block().

Commits
-------

760be88310 [Console] Fix line wrapping for decorated text in block output
2021-03-17 17:22:13 +01:00
Matthew Grasmick
760be88310 [Console] Fix line wrapping for decorated text in block output 2021-03-17 17:22:06 +01:00
Nyholm
d3412e919f [Inflector] Fixed pluralize "coupon" 2021-03-17 17:19:54 +01:00
Fabien Potencier
692c6296d7 minor #40437 [Runtime] Remove "docs" from readme (Nyholm)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Runtime] Remove "docs" from readme

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15081

Make the readme of the Runtime component link to the docs. This PR is blocked by the doc PR.

Commits
-------

6f4552fcec [Runtime] Remove "docs" from readme
2021-03-17 07:33:10 +01:00
Fabien Potencier
550489aa8e bug #40453 [VarDumper] Adds support for ReflectionUnionType to VarDumper (Michael Nelson, michaeldnelson)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[VarDumper] Adds support for ReflectionUnionType to VarDumper

Fixes a bug with VarDumper when dumping a ReflectionUnionType.
> PHP Error:  Call to undefined method ReflectionUnionType::isBuiltin()

Notes:
* One of the existing tests relies on its position in the test file. I had to modify its expected line number.
* There is an existing trailing space around line 367 in an expected value.
  I'm not sure if this was left for BC reasons but it seems like a bug if the dumper is leaving trailing spaces.

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

This commit fixes a crash when dumping ReflectionUnionType.  The code is minimal but uses a few extra lines to preserve key order for bc and consistency.  Additionally, there is an else condition that is currently unreachable but is defensive should they add additional subtypes of ReflectionType. Tests are included.  Please let me know if you have any questions or suggestions.  Thanks for Symfony it's a wonderful project.

Commits
-------

1a11491f6e [VarDumper] Adds support for ReflectionUnionType to VarDumper
2021-03-17 07:30:13 +01:00
Michael Nelson
1a11491f6e [VarDumper] Adds support for ReflectionUnionType to VarDumper 2021-03-17 07:30:06 +01:00
Fabien Potencier
9630c2fb57 Fix CS 2021-03-17 07:23:45 +01:00
Fabien Potencier
9287099c57 minor #40488 [Mailer] Add supported auth modes to exception (liayn)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Mailer] Add supported auth modes to exception

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

If there is no match for the available authenticators the thrown exception now includes the supported auth methods as reported by the server.

Commits
-------

d9c99d86ab [Mailer] Add supported auth modes to exception
2021-03-17 07:21:46 +01:00
Fabien Potencier
d70c0988d3 bug #40492 [Security] Fix BC layer (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Fix BC layer

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

Tests were broken because no password hasher was configured for the new `InMemoryUser` class in configs on lower branches.
This PR fixes it by making the new class extend the deprecated one, so that the password hasher factory is able to find a password hasher for it (instanceof-based match).

Commits
-------

2d7f7b5072 [Security] Fix BC layer
2021-03-17 07:06:36 +01:00
Fabien Potencier
50591a771b Fix CS 2021-03-17 07:04:35 +01:00
Wouter de Jong
99cf2a3a71 [Security] Disallow passing a UserInterface to Passport
This was deprecated in 5.2, with a warning that support would be dropped in 5.3
(due to the experimental state).
2021-03-17 07:03:24 +01:00
Matthew Grasmick
8ada55c07c Correctly clear lines for multi-line progress bar messages. 2021-03-16 22:19:58 -04:00
Robin Chalas
2d7f7b5072 [Security] Fix BC layer 2021-03-16 23:18:28 +01:00
Nicolas Grekas
49d23d4813 minor #40484 [DependencyInjection] accept null index in #[TaggedItem] (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DependencyInjection] accept null index in #[TaggedItem]

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

As hinted by @stof in https://github.com/symfony/symfony/pull/40248#discussion_r595065941

Commits
-------

6d16fac703 [DI] accept null index in #[TaggedItem]
2021-03-16 20:14:20 +01:00
Nicolas Grekas
6d16fac703 [DI] accept null index in #[TaggedItem] 2021-03-16 20:13:40 +01:00
Fabien Potencier
db87d72869 feature #40443 [Security] Rename User to InMemoryUser (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Rename User to InMemoryUser

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       | Closes #26348
| License       | MIT
| Doc PR        | -

This PR aims to clarify that the `User` class should only be used by the `InMemoryUserProvider`, as documented:
c06a76c384/src/Symfony/Component/Security/Core/User/User.php (L15-L17)
It also renames `UserChecker` to `InMemoryUserChecker` because it only works with the in-memory user class:
c06a76c384/src/Symfony/Component/Security/Core/User/UserChecker.php (L31-L32)

Commits
-------

55b51d3f90 [Security] Rename User to InMemoryUser
2021-03-16 19:12:12 +01:00
Markus Klein
d9c99d86ab [Mailer] Add supported auth modes to exception
If there is no match for the available authenticators the thrown
exception now includes the supported auth methods as reported by the server.
2021-03-16 14:41:21 +01:00
Nicolas Grekas
7cc5cef1c3 feature #40468 Deprecate configuring tag names and service ids in compiler passes (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

Deprecate configuring tag names and service ids in compiler passes

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

This PR is aimed at reducing the code complexity by hardcoding the name of tags and service ids that compiler passes have to deal with.

I think making these names configurable only adds boilerplate and maintenance overhead for no benefit:
- for the practice: the need to use a pass with a renamed tag/id should be extremely rare (do yo know any?)
- for the theory: a decorating pass could still rename before/after the processing, so this use case is still supported.

Side note: I skipped updating changelog+upgrade files. This would be just noise to me (nobody uses this possibility anyway ;) )

Commits
-------

6fe82d8be7 Deprecate configuring tag names and service ids in compiler passes
2021-03-16 10:12:04 +01:00
Nicolas Grekas
5850f3d4ea Merge branch '5.2' into 5.x
* 5.2:
  [ErrorHandler] Fix error caused by `include` + open_basedir
  [FrameworkBundle] Make the TestBrowserToken interchangeable with other tokens
  [Console] ProgressBar clears too many lines on update
  [FrameworkBundle] Exclude unreadable files when executing About command
  [Bridge\Twig] Add 'form-control-range' for range input type
  Be explicit about transparent background color of links in toolbar
  [Translation] fix test case name
  [Cache] Fix wrong namespace in test
  [DependencyInjection] Fix return type
2021-03-16 10:10:58 +01:00
Nicolas Grekas
ca06651235 Merge branch '4.4' into 5.2
* 4.4:
  [Console] ProgressBar clears too many lines on update
  [FrameworkBundle] Exclude unreadable files when executing About command
  [Bridge\Twig] Add 'form-control-range' for range input type
  Be explicit about transparent background color of links in toolbar
  [Translation] fix test case name
  [Cache] Fix wrong namespace in test
  [DependencyInjection] Fix return type
2021-03-16 10:10:13 +01:00
stlrnz
9ad7832acd [ErrorHandler] Fix error caused by include + open_basedir 2021-03-16 10:07:47 +01:00
Nicolas Grekas
a78fb1832b bug #40450 [Console] ProgressBar clears too many lines on update (danepowell)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Console] ProgressBar clears too many lines on update

| 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

The ProgressBar incorrectly calculates line lengths when updating, including non-displayable characters such as ANSI colors. This causes it to clear too many lines if the terminal width is greater than the displayed line length but less than the line length including non-displayed characters. An example of this bug in action is https://github.com/acquia/cli/issues/467

Commits
-------

2aa3df0c74 [Console] ProgressBar clears too many lines on update
2021-03-16 09:54:45 +01:00
Dane Powell
2aa3df0c74 [Console] ProgressBar clears too many lines on update 2021-03-16 09:54:32 +01:00
Nicolas Grekas
1e6237c717 feature #40248 [DependencyInjection] Add #[TaggedItem] attribute for defining the index and priority of classes found in tagged iterators/locators (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DependencyInjection] Add `#[TaggedItem]` attribute for defining the index and priority of classes found in tagged iterators/locators

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

Next to #39804, this PR adds a new `#[TaggedItem]` attribute that ppl can use to define the index of their service classes when they're used in tagged collections (iterators/locators.

This replaces the `public static getDefaultName()` and `getDefaultPriority()` methods that ppl could use for this purpose:
```php
#[TaggedItem(index: 'api.logger', priority: 123)]
class MyApiLogger implements LoggerInterface
{
}
```

This will ship the corresponding service at index `api.logger`, priority=123 when building locators/iterators.

Commits
-------

252f2ca1fb [DependencyInjection] Add `#[TaggedItem]` attribute for defining the index and priority of classes found in tagged iterators/locators
2021-03-16 09:24:13 +01:00
Fabien Potencier
a5a2d86929 Merge branch '5.2' into 5.x
* 5.2:
  Make async-ses required
  [RateLimiter] Fix wrong namespace in tests
2021-03-16 08:55:45 +01:00
Jérémy Derussé
7904d0896b
Make async-ses required 2021-03-16 08:45:57 +01:00
Robin Chalas
55b51d3f90 [Security] Rename User to InMemoryUser 2021-03-16 00:01:28 +01:00
Nicolas Grekas
6fe82d8be7 Deprecate configuring tag names and service ids in compiler passes 2021-03-15 19:33:21 +01:00
Nicolas Grekas
e2dffea49d [Translation] fix test case name 2021-03-15 13:54:07 +01:00
Nicolas Grekas
252f2ca1fb [DependencyInjection] Add #[TaggedItem] attribute for defining the index and priority of classes found in tagged iterators/locators 2021-03-15 12:58:02 +01:00
Robin Chalas
c620f407ba [RateLimiter] Fix wrong namespace in tests 2021-03-14 20:33:15 +01:00
Robin Chalas
b3759c2882 [Cache] Fix wrong namespace in test 2021-03-14 20:28:18 +01:00
Robin Chalas
59e5ac5dcf Merge branch '5.2' into 5.x
* 5.2:
  [Routing] Remove unnecessary references to User class in test fixtures
2021-03-14 15:11:16 +01:00
Robin Chalas
76ee9baf8e [Routing] Remove unnecessary references to User class in test fixtures 2021-03-14 14:53:33 +01:00
Christian Flothmann
98892f7db9 Merge branch '5.2' into 5.x
* 5.2:
  fix test
2021-03-12 14:29:20 +01:00
Christian Flothmann
088fbf7948 fix test 2021-03-12 14:28:30 +01:00
Christian Flothmann
3145fde13b Merge branch '5.2' into 5.x
* 5.2:
  [Mailer] fix lowest allowed dependencies
  Refresh original user in SwitchUserListener.
  check if templating engine supports view
  [Mime] Escape commas in address names
2021-03-12 14:21:57 +01:00
Christian Flothmann
03a9ac26bc Merge branch '4.4' into 5.2
* 4.4:
  [Mailer] fix lowest allowed dependencies
  Refresh original user in SwitchUserListener.
  check if templating engine supports view
  [Mime] Escape commas in address names
2021-03-12 14:18:39 +01:00
Christian Flothmann
e9f2ef211e [Mailer] fix lowest allowed dependencies 2021-03-12 12:23:44 +01:00
Fabien Potencier
6c0102c184 feature #40240 [Validator] Add Validation::createIsValidCallable() that returns a boolean instead of exception (wouterj)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Validator] Add Validation::createIsValidCallable() that returns a boolean instead of exception

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #36820
| License       | MIT
| Doc PR        | tbd

This adds a `Validator::createValidCallable()` (I'm very open for other name suggestions) that returns a boolean instead of exceptions. This allows usingit in places where booleans are expected, for instance in the referenced OptionsResolver case:

```php
$resolver->setAllowedValues('name', Validation::createValidCallable(
    new Assert\Length(['min' => 10 ])
));
```

Commits
-------

e731f5fda9 [Validator] Add createValidCallable() that returns a boolean
2021-03-12 09:58:03 +01:00
Fabien Potencier
93467c507e bug #39866 [Mime] Escape commas in address names (YaFou)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mime] Escape commas in address names

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39416
| License       | MIT
| Doc PR        | --
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - 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 branch 5.x.
-->

Before:
```php
$address = new Address('fabien@symfony.com', 'Fabien, Potencier');
$address->toString(); // Fabien, Potencier <fabien@symfony.com> -> Interpreted like two emails
```

After:
```php
$address = new Address('fabien@symfony.com', 'Fabien, Potencier');
$address->toString(); // "Fabien, Potencier" <fabien@symfony.com>
```

Commits
-------

39e9158999 [Mime] Escape commas in address names
2021-03-12 09:47:38 +01:00
Fabien Potencier
c487a56bf4 minor #40322 [Console] improve exception message when required argument is added after an optional one (marbul)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Console] improve exception message when required argument is added after an optional one

| Q             | A
| ------------- | ---
| Branch?       | 5.x <!-- see below -->
| Bug fix?      | no
| New feature?  | wouldn't say so, rather DX improvement <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #40302 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a

Hello, this is my first contribution to Symfony Framework. It's time to pull my weight.
About the issue:
I did improve an error message to include passed argument's name and the latest optional argument's name.
![Screenshot at 2021-02-26 23-08-10](https://user-images.githubusercontent.com/79662742/109361609-8f011e80-7889-11eb-8700-cbbd388c0109.png)
An author also mentioned "But which command?", however this is shown twice as we can see on the screenshot above so I skipped that.

Commits
-------

9bddbbd7ed #40302 improve exception message when required argument is added after an optional one
2021-03-12 09:40:58 +01:00
Fabien Potencier
7754beddfc minor #40315 [HttpFoundation] Use InputBag for POST requests too (acasademont)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[HttpFoundation] Use InputBag for POST requests too

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Partially revert #37265
| License       | MIT
| Doc PR        | -

#37265 was created as a fix for #37100. However, when #37327 was merged, the original bug was also fixed with a different solution (allowing null values on `InputBag::set`) and parts of #37265 are not needed anymore. By using only `InputBag` as the `$request` bag we can tighten the typehint again and make static analysis a bit more useful.

Commits
-------

381a0a19f7 use InputBag for POST requests too, added missing scalar type hints
2021-03-12 09:36:26 +01:00
AndrolGenhald
42453454c9 Refresh original user in SwitchUserListener.
Fixes #39991
2021-03-11 19:21:32 -06:00
Alexander M. Turek
7f65a27996 Merge branch '5.2' into 5.x
* 5.2:
  bug #40427 [Console] Stop accepting ints as InputOption defaults
  Fix fingerprint when context is not serializable
  Fix `ConstraintViolation#getMessageTemplate()` to always return `string`
2021-03-12 01:42:40 +01:00
Alexander M. Turek
950e1444cb Merge branch '4.4' into 5.2
* 4.4:
  bug #40427 [Console] Stop accepting ints as InputOption defaults
  Fix fingerprint when context is not serializable
2021-03-12 01:42:05 +01:00
Oliver Klee
3a2d1b4a0a bug #40427 [Console] Stop accepting ints as InputOption defaults
The types accepted and provided by `InputInterface::getOption`
and `setOption` do not include `int` (and passing something like
`--option=123` will set the option to the string `"123"`, not
to the integer `123`).

The `InputOption` default types should match this.
2021-03-11 16:23:19 +01:00
Fabien Potencier
dc8a43b764 bug #40416 Fix ConstraintViolation#getMessageTemplate() to always return string (Ocramius)
This PR was merged into the 5.2 branch.

Discussion
----------

Fix `ConstraintViolation#getMessageTemplate()` to always return `string`

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

`ConstraintViolation#getMessageTemplate()`'s inherited signature states that `string` is
to be returned by it at all times, yet the implementation returns `null` when no message
template had been provided at instantiation.

This patch obviates it, returning an empty string when the
message template is `null`.

Ref: https://github.com/symfony/symfony/pull/40415#issuecomment-792839512

Commits
-------

72a464e449 Fix `ConstraintViolation#getMessageTemplate()` to always return `string`
2021-03-11 08:18:44 +01:00
Alexander M. Turek
906b609d0e Merge branch '5.2' into 5.x
* 5.2:
  Bump Symfony version to 5.2.6
  Update VERSION for 5.2.5
  Update CHANGELOG for 5.2.5
  Update translations for Norwegian Nynorsk (nn) #38756
  Fix eventListener initialization when eventSubscriber constructor dispatch an event
  [FrameworkBundle] fix XSD
  clear unchecked choice radio boxes even if clear missing is set to false
  Fix `ConstraintViolation#getPropertyPath()` to always return `string`
  [ErrorHandler] Added missing type annotations to FlattenException
  [TwigBridge] Allow version 3 of the Twig extra packages
  Fix FrameworkBundle PropertyAccess definition when not in debug
2021-03-10 23:12:52 +01:00
Alexander M. Turek
16bacb1b27 Merge branch '4.4' into 5.2
* 4.4:
  Update translations for Norwegian Nynorsk (nn) #38756
  Fix eventListener initialization when eventSubscriber constructor dispatch an event
  clear unchecked choice radio boxes even if clear missing is set to false
  [ErrorHandler] Added missing type annotations to FlattenException
  [TwigBridge] Allow version 3 of the Twig extra packages
  Fix FrameworkBundle PropertyAccess definition when not in debug
2021-03-10 23:10:15 +01:00
Fabien Potencier
74c3c5fcb3 Bump Symfony version to 5.2.6 2021-03-10 18:11:15 +01:00
Fabien Potencier
3da617f52c Update VERSION for 5.2.5 2021-03-10 18:07:35 +01:00
Nyholm
6f4552fcec
[Runtime] Remove "docs" from readme 2021-03-10 15:14:31 +01:00
Fabien Potencier
c06a76c384 feature #38465 [Runtime] a new component to decouple applications from global state (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Runtime] a new component to decouple applications from global state

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15081

Follow up of #36652, see discussion there.

What if we could decouple the bootstrapping logic of our apps from any global state?

This PR makes it possible via a new proposed `symfony/runtime` component.

The immediate benefit this provides is easier maintenance of Symfony apps: code that is currently shipped by recipes will be able to move to `vendor/`. Read the previous sentence twice, this is big :)
Check the following PR to see how far this goes: https://github.com/symfony/recipes/pull/787

The longer-term benefit is being able to run the exact same app under several runtimes: PHP-FPM, CLI, but also PHP-PM and similar. Thanks to the proposed interface, this benefit could span to any PHP apps; not only to apps using the Symfony HttpKernel/HttpFoundation components. This part could be moved to `symfony/contracts` in the future.

Performance-wise, I measured no significant difference with the current way of running apps.

RuntimeInterface
----------------

The core of this component is the `RuntimeInterface` which describes a high-order
runtime logic.

It is designed to be totally generic and able to run any application outside of
the global state in 6 steps:

 1. the main entry point returns a callable that wraps the application;
 2. this callable is passed to `RuntimeInterface::getResolver()`, which returns a
    `ResolverInterface`; this resolver returns an array with the (potentially
    decorated) callable at index 0, and all its resolved arguments at index 1;
 3. the callable is invoked with its arguments; it returns an object that
    represents the application;
 4. that object is passed to `RuntimeInterface::getRunner()`, which returns a
    `RunnerInterface`: an instance that knows how to "run" the object;
 5. that instance is `run()` and returns the exit status code as `int`;
 6. the PHP engine is exited with this status code.

This process is extremely flexible as it allows implementations of
`RuntimeInterface` to hook into any critical steps.

Autoloading
-----------

This package registers itself as a Composer plugin to generate a
`vendor/autoload_runtime.php` file. This file shall be required instead of the
usual `vendor/autoload.php` in front-controllers that leverage this component
and return a callable.

Before requiring the `vendor/autoload_runtime.php` file, set the
`$_SERVER['APP_RUNTIME']` variable to a class that implements `RuntimeInterface`
and that should be used to run the returned callable.

Alternatively, the class of the runtime can be defined in the `extra.runtime.class`
entry of the `composer.json` file.

A `SymfonyRuntime` is used by default. It knows the conventions to run
Symfony and native PHP applications.

Examples
--------

This `public/index.php` is a "Hello World" that handles a "name" query parameter:
```php
<?php

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (array $request, array $context): void {
    // $request holds keys "query", "body", "files" and "session",
    // which map to $_GET, $_POST, $_FILES and &$_SESSION respectively

    // $context maps to $_SERVER

    $name = $request['query']['name'] ?? 'World';
    $time = $context['REQUEST_TIME'];

    echo sprintf('Hello %s, the current Unix timestamp is %s.', $name, $time);
};
```

This `bin/console.php` is a single-command "Hello World" application
(run `composer require symfony/console` before launching it):
```php
<?php

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

return function (Command $command) {
    $command->addArgument('name', null, 'Who should I greet?', 'World');

    return $command->setCode(function (InputInterface $input, OutputInterface $output) {
        $name = $input->getArgument('name');
        $output->writeln(sprintf('Hello <comment>%s</>', $name));
    });
};
```

The `SymfonyRuntime` can resolve and handle many types related to the
`symfony/http-foundation` and `symfony/console` components.
Check its source code for more information.

Commits
-------

61b32ab2a3 [Runtime] a new component to decouple applications from global state
2021-03-10 14:27:50 +01:00
Gunnstein Lye
9a4a04664f Update translations for Norwegian Nynorsk (nn) #38756 2021-03-10 14:26:08 +01:00
Robin Chalas
d6791a6281 minor #40434 Don't use sprintf in trigger_deprecation() calls (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

Don't use sprintf in trigger_deprecation() calls

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

Old habits die hard :)

Commits
-------

9ba8f0567d Don't use sprintf in trigger_deprecation() calls
2021-03-10 12:42:38 +01:00
Robin Chalas
9ba8f0567d Don't use sprintf in trigger_deprecation() calls 2021-03-10 11:16:25 +01:00
Marco Pivetta
72a464e449 Fix ConstraintViolation#getMessageTemplate() to always return string
`ConstraintViolation#getMessageTemplate()`'s inherited signature states that `string` is
to be returned by it at all times, yet the implementation returns `null` when no message
template had been provided at instantiation.

This patch obviates it, returning an empty string when the
message template is `null`.

Ref: https://github.com/symfony/symfony/pull/40415#issuecomment-792839512
2021-03-10 10:59:31 +01:00
Nicolas Grekas
4449b553a8 [HttpKernel] Deprecate returning a ContainerBuilder from KernelInterface::registerContainerConfiguration() 2021-03-10 09:24:39 +01:00
Nicolas Grekas
a69bb1ef99 feature #40337 [DependencyInjection] Add support an integer return for default_index_method (maranqz)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[DependencyInjection] Add support an integer return for default_index_method

| Q             | A
| ------------- | ---
| Branch?       | 5.x for features
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | #40319
| License       | MIT
| Doc PR        | TODO

Commits
-------

f0922c70d6 [DependencyInjection] Add support an integer return for default_index_method
2021-03-10 08:45:30 +01:00
maranqz
f0922c70d6 [DependencyInjection] Add support an integer return for default_index_method 2021-03-10 08:45:06 +01:00
Nicolas Grekas
61b32ab2a3 [Runtime] a new component to decouple applications from global state 2021-03-09 21:44:54 +01:00
Fabien Potencier
2fb98c8104 bug #40417 [Form] clear unchecked choice radio boxes even if clear missing is set to false (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] clear unchecked choice radio boxes even if clear missing is set to false

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

Commits
-------

e7b4851ea0 clear unchecked choice radio boxes even if clear missing is set to false
2021-03-09 10:34:10 +01:00
Alexander M. Turek
fc016ddd92 feature #39693 [PropertyAccess] use bitwise flags to configure when the property accessor should throw (xabbuh)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[PropertyAccess] use bitwise flags to configure when the property accessor should throw

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes
| Tickets       | Fix #31126
| License       | MIT
| Doc PR        |

Commits
-------

a50cfcb49d use bitwise flags to configure when the property accessor should throw
2021-03-09 10:10:37 +01:00
Nicolas Grekas
1f65e78280 minor #40317 [Cache] boost perf by wrapping keys validity checks with assert() (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Cache] boost perf by wrapping keys validity checks with `assert()`

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

PSR-6 has one perf hog: checking the validity of keys.

But in practice, an invalid key should never happen in production: encoding/cleanup is a must-have, and it's a step that should be identified *during dev*.

That's why I think we're safe wrapping these checks with `assert()`.

On an `ArrayAdapter`, this doubles the throughput of the pool when getting items.

I didn't use `assert()` in constructors when not on the hot path.

This PR also makes some callable properties static, as they should be from the beginning.

Commits
-------

8f03a1f555 [Cache] boost perf by wrapping keys validity checks with `assert()`
2021-03-09 09:28:49 +01:00
Christian Flothmann
a50cfcb49d use bitwise flags to configure when the property accessor should throw 2021-03-09 09:10:03 +01:00
Benjamin Franzke
daaa760fd2 Avoid unneeded preg_replace_callback in console application
Motivations for this change:
 * Avoid an unneded preg call, explode+implode is faster
 * The previous regex created to suboptimal expressions,
   due to the pipe that caused empty to be matched.

   That means an input like `foo:bar`
   was translated into `foo[^:]*[^:]*:bar[^:]*[^:]*`
   instead of simply `foo[^:]*:bar[^:]*`
2021-03-08 22:52:55 +01:00
Christian Flothmann
e7b4851ea0 clear unchecked choice radio boxes even if clear missing is set to false 2021-03-08 18:14:47 +01:00
Marco Pivetta
7d1029b907 Fix ConstraintViolation#getPropertyPath() to always return string
`ConstraintViolation#getPropertyPath()`'s inherited signature states that `string` is
to be returned by it at all times, yet the implementation returns `null` when no property
path had been provided at instantiation.

This patch obviates it, returning an empty string when the
property path is `null`.
2021-03-08 14:20:18 +01:00
Alexander M. Turek
d68832e1b9 [ErrorHandler] Added missing type annotations to FlattenException 2021-03-08 11:28:40 +01:00
Alexander M. Turek
10d869d835 Merge branch '5.2' into 5.x
* 5.2:
  Allow egulias/email-validator 3.x
2021-03-07 17:16:20 +01:00
Alexander M. Turek
ce8be3c079 Merge branch '4.4' into 5.2
* 4.4:
  Allow egulias/email-validator 3.x
2021-03-07 17:08:20 +01:00
Fabien Potencier
d8cfa3e9a4 bug #39685 [Mailer][Mime][TwigBridge][Validator] Allow egulias/email-validator 3.x (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer][Mime][TwigBridge][Validator] Allow egulias/email-validator 3.x

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

Commits
-------

3beeadb0c3 Allow egulias/email-validator 3.x
2021-03-07 16:59:23 +01:00
Alexander M. Turek
0f92ad4fa8 Merge branch '5.2' into 5.x
* 5.2:
  [WebLink] Removed unused property
  Fix method name compare in ResolveControllerNameSubscriber
  add uz security validator and form validator file
  uzb translation
2021-03-07 16:51:58 +01:00
Alexander M. Turek
4667c85098 Merge branch '4.4' into 5.2
* 4.4:
  [WebLink] Removed unused property
  Fix method name compare in ResolveControllerNameSubscriber
  add uz security validator and form validator file
  uzb translation
2021-03-07 16:51:33 +01:00
Alexander M. Turek
3beeadb0c3 Allow egulias/email-validator 3.x 2021-03-07 16:14:50 +01:00
Alexander M. Turek
848972e830 [WebLink] Removed unused property 2021-03-07 14:19:33 +01:00
Wouter de Jong
e731f5fda9 [Validator] Add createValidCallable() that returns a boolean 2021-03-07 13:57:34 +01:00
shokhaa
73392924bf add uz security validator and form validator file 2021-03-07 00:00:06 +05:00
shokhaa
df4679c163 uzb translation 2021-03-06 19:17:14 +01:00
Robin Chalas
f052d11a43 Merge branch '5.2' into 5.x
* 5.2:
  [Security] Fix test
  fix test
  [Console] Fix tests
2021-03-06 14:50:37 +01:00
Robin Chalas
7bc31c64f2 [Security] Fix test 2021-03-06 14:47:01 +01:00
Robin Chalas
04cb83e1f9 fix test 2021-03-06 14:42:15 +01:00
Robin Chalas
706f05a8db Merge branch '4.4' into 5.2
* 4.4:
  [Console] Fix tests
2021-03-06 14:35:24 +01:00
Robin Chalas
415e019d77 [Console] Fix tests 2021-03-06 14:09:26 +01:00
Fabien Potencier
8de664d4f3 feature #40267 [Security] Decouple passwords from UserInterface (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Decouple passwords from UserInterface

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       | #23081, helps with #39308
| License       | MIT
| Doc PR        | todo

This PR addresses a long-standing issue of the Security component: UserInterface is coupled to passwords.
It does it by moving the `getPassword()` method from `UserInterface` to a `PasswordAuthenticatedUserInterface`, and the `getSalt()` method to a `LegacyPasswordAuthenticatedUserInterface`.

Steps:
- In 5.3, we add the new interface and, at places where password-based authentication happens, trigger deprecation notices when a `UserInterface` object does not implement the new interface(s). The UserInterface is kept as-is until 6.0.
- In 6.0, we can remove the methods from `UserInterface` as well as support for using password authentication with user objects not implementing the new interface(s).

As a side-effect, some password-related interfaces (`UserPasswordHasherInterface` and `PasswordUpgraderInterface`) must change their signatures to type-hint against the new interface.
That is done in a BC way, which is to make the concerned methods virtual until 6.0, with deprecation notices triggered from callers and concrete implementations.

Benefits:
In 6.0, applications that use password-less authentication (e.g. login links) won't need to write no-op `getPassword()` and `getSalt()` in order to fulfil the `UserInterface` contract.

For applications that do use password-based authentication, they will need to opt-in explicitly by implementing the relevant interface(s).

This build on great discussions with @wouterj and @nicolas-grekas, and it is part of the overall rework of the Security component.

Commits
-------

2764225a38 [Security] Decouple passwords from UserInterface
2021-03-06 11:59:38 +01:00
Fabien Potencier
d752c1ecb5 feature #40377 [Notifier] [OvhCloud] Add "sender" (notFloran)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [OvhCloud] Add "sender"

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features --> (I'm waiting to see if the feature is accepted )

Add "sender" option to the DSN that allows configuring the sender of the message.

OVHCloud manages two cases for sending sms according to the [doc](https://docs.ovh.com/fr/sms/envoyer_des_sms_avec_lapi_ovh_en_php/):

> The senderForResponse parameter will allow the use of a short number, which allows you to send SMS directly without having to create an alphanumeric sender (for example: your name).
> Short numbers also allow you to receive responses from the recipients of your SMS, which can be useful for a satisfaction survey, a voting application, a game, etc.

![CleanShot 2021-03-05 at 13 26 33](https://user-images.githubusercontent.com/523981/110115554-84c5af80-7db6-11eb-815d-7e8bafa81e5d.png)

This PR introduces the management of these 2 cases with a new option `sender`:
* if `sender` is set, we use it
* if `sender` is not set, we use `senderForResponse` to get a short number (current behavior)

I took the logic implementedin the old official SDK : 52d279e112/src/Message.php (L161)

Commits
-------

c5a9b252ab [Notifier] [OvhCloud] Add "sender"
2021-03-06 09:31:28 +01:00
Floran Brutel
c5a9b252ab [Notifier] [OvhCloud] Add "sender" 2021-03-06 09:31:27 +01:00
Fabien Potencier
25e8d7dafb feature #40384 [DependencyInjection] Implement psr/container 1.1 (derrabus)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DependencyInjection] Implement psr/container 1.1

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

The `psr/container` interfaces have been updated with type declarations. The lack of those is what kept us from adding property type declarations to the `get()` and `has()` methods of our own `ContainerInterface`.

A small BC break is that we have never prevented calling code from passing `null` as the service ID. Even without strict types, this will cause a `TypeError` after my changes. I already had to update `AutowirePass` because of that.

On the other hand, it was neither documented that we allow `null` here nor did the container do anything useful (`has(null)` always resulted in `false` and `get(null)` always returned `null`).

Commits
-------

d9095aa892 [DependencyInjection] Implement psr/container 1.1
2021-03-06 09:21:02 +01:00
Fabien Potencier
94b8e32c4c Fix typo 2021-03-06 09:14:32 +01:00
Fabien Potencier
f467708b06 Merge branch '5.2' into 5.x
* 5.2:
  Fix typo
2021-03-06 09:11:22 +01:00
Fabien Potencier
436f697d81 Fix typo 2021-03-06 09:10:55 +01:00
Fabien Potencier
e53bb8b4f2 Merge branch '5.2' into 5.x
* 5.2:
  Fix #36973: Command description consistency
  Render email once
2021-03-06 09:05:19 +01:00
Fabien Potencier
7ed3d36f53 Merge branch '4.4' into 5.2
* 4.4:
  Fix #36973: Command description consistency
  Render email once
2021-03-06 08:59:01 +01:00
Fabien Potencier
57fb475ebf minor #40387 Fix #36973: Command description consistency (danepowell)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix #36973: Command description consistency

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

This rewords command descriptions and options to use consistent verb mood.

Commits
-------

01e18b039a Fix #36973: Command description consistency
2021-03-06 08:54:06 +01:00
Robin Chalas
2764225a38 [Security] Decouple passwords from UserInterface 2021-03-06 00:37:05 +01:00
Alexander M. Turek
d9095aa892 [DependencyInjection] Implement psr/container 1.1 2021-03-05 23:51:52 +01:00
Alexander M. Turek
57953845ad Merge branch '5.2' into 5.x
* 5.2:
  Backport psr/container 1.1/2.0 compatibility
  Update notifier_transports.php
  Dont lock tables or start transactions
  Bump Symfony version to 5.2.5
  Update VERSION for 5.2.4
  Update CHANGELOG for 5.2.4
  Bump Symfony version to 4.4.21
  Update VERSION for 4.4.20
  Update CONTRIBUTORS for 4.4.20
  Update CHANGELOG for 4.4.20
2021-03-05 21:15:37 +01:00
Alexander M. Turek
59731896ed Merge branch '4.4' into 5.2
* 4.4:
  Backport psr/container 1.1/2.0 compatibility
  Bump Symfony version to 4.4.21
  Update VERSION for 4.4.20
  Update CONTRIBUTORS for 4.4.20
  Update CHANGELOG for 4.4.20
2021-03-05 21:13:41 +01:00
Alexander M. Turek
7f8242ef58 Backport psr/container 1.1/2.0 compatibility 2021-03-05 19:16:26 +01:00
Dane Powell
01e18b039a
Fix #36973: Command description consistency 2021-03-05 09:58:50 -08:00
Nyholm
26061a131d
Dont lock tables or start transactions 2021-03-05 13:14:19 +01:00
Robin Chalas
c656ef9cf9 minor #40367 [Security] Re-add accidentally removed property declarations (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Re-add accidentally removed property declarations

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

spotted while playing with psalm locally,  mistake made in #39802

Commits
-------

bccf736b99 [Security] Readd accidentally removed property declarations
2021-03-05 11:14:22 +01:00
Robin Chalas
bccf736b99 [Security] Readd accidentally removed property declarations 2021-03-05 10:30:44 +01:00
Fabien Potencier
f72d5165fd Bump Symfony version to 5.2.5 2021-03-04 19:11:30 +01:00
Fabien Potencier
ff8cb872d3 Update VERSION for 5.2.4 2021-03-04 19:05:55 +01:00
Fabien Potencier
2536e178b1 Bump Symfony version to 4.4.21 2021-03-04 19:04:32 +01:00
Fabien Potencier
369dea8c72 Update VERSION for 4.4.20 2021-03-04 19:00:27 +01:00
Fabien Potencier
4c6a3f9dd2 Merge branch '5.2' into 5.x
* 5.2:
  [Messenger] Doctrine setup with migrations
2021-03-04 18:39:06 +01:00
Fabien Potencier
0940043bfc bug #40336 [Messenger] Doctrine setup with migrations (Nyholm)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[Messenger] Doctrine setup with migrations

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

This PR reverts parts of #40055.

When running these commands, You do need to be in a transaction:
- `doctrine:schema:create`
- `messenger:setup-transports`
- `doctrine:migrations:diff` and `doctrine:migrations:migrate`

Commits
-------

3371e1cf39 [Messenger] Doctrine setup with migrations
2021-03-04 18:38:30 +01:00
Nyholm
3371e1cf39 [Messenger] Doctrine setup with migrations 2021-03-04 18:38:24 +01:00
Fabien Potencier
33791925af Merge branch '5.2' into 5.x
* 5.2:
  [Validator] Fix return types
  Add translation for Belarusian
  fix parsing calls of methods named "method"
  [Security] Remove unnecessary inherited doc annotation
  deal with indented heredoc/nowdoc tokens
  Adding templates for Belarusian
2021-03-04 16:41:30 +01:00
Fabien Potencier
5fea563f4a Merge branch '4.4' into 5.2
* 4.4:
  [Validator] Fix return types
  Add translation for Belarusian
  fix parsing calls of methods named "method"
  deal with indented heredoc/nowdoc tokens
  Adding templates for Belarusian
2021-03-04 16:41:09 +01:00
Fabien Potencier
218bf5ea9a bug #40318 [Translation] deal with indented heredoc/nowdoc tokens (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Translation] deal with indented heredoc/nowdoc tokens

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

Commits
-------

4721097cab deal with indented heredoc/nowdoc tokens
2021-03-04 16:39:09 +01:00
Alexander M. Turek
e67ef5bbff [Validator] Fix return types 2021-03-03 23:57:07 +01:00
marbul
9bddbbd7ed #40302 improve exception message when required argument is added after an optional one 2021-03-03 18:38:02 +01:00
Alexander M. Turek
ea741e6165 minor #40297 Add missing translations for Belarusian (Nyholm, OxanaKozlova)
This PR was merged into the 4.4 branch.

Discussion
----------

Add missing translations for Belarusian

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

Add translations for Belarusian

Commits
-------

1b84d5d23b Add translation for Belarusian
8e1d3285ed Adding templates for Belarusian
2021-03-03 18:05:48 +01:00
OxanaKozlova
1b84d5d23b Add translation for Belarusian 2021-03-03 19:55:00 +03:00
Christian Flothmann
a9de390676 fix parsing calls of methods named "method" 2021-03-03 13:11:09 +01:00
Junaid Farooq
4b70db1e85 [Security] Remove unnecessary inherited doc annotation 2021-03-02 19:18:23 +01:00
Alexander M. Turek
a8a0650161 Merge branch '5.2' into 5.x
* 5.2:
  [Messenger][SQS] Document missing option
  Specify that we run CI on Ubuntu-20.04
  zero parts can be omitted in date interval input
2021-03-02 13:23:03 +01:00
Alexander M. Turek
5985199754 Merge branch '4.4' into 5.2
* 4.4:
  Specify that we run CI on Ubuntu-20.04
  zero parts can be omitted in date interval input
2021-03-02 13:14:02 +01:00
Nyholm
bd6930effe
[Messenger][SQS] Document missing option 2021-03-02 12:28:15 +01:00
Christian Flothmann
07d7f6bad7 bug #40316 [Serializer] zero parts can be omitted in date interval input (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Serializer] zero parts can be omitted in date interval input

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

Commits
-------

c316708669 zero parts can be omitted in date interval input
2021-03-01 14:37:03 +01:00
Alexander M. Turek
f49ca6f9cc Merge branch '5.2' into 5.x
* 5.2:
  improve exception message if symfony/security-csrf is missing
  fix: MockResponse total_time should not be simulated when provided
2021-03-01 01:41:04 +01:00
Alexander M. Turek
82e3b17cf4 Merge branch '4.4' into 5.2
* 4.4:
  improve exception message if symfony/security-csrf is missing
  fix: MockResponse total_time should not be simulated when provided
2021-03-01 01:40:14 +01:00
Albert Casademont
381a0a19f7 use InputBag for POST requests too, added missing scalar type hints 2021-02-26 23:11:14 +01:00
Christian Flothmann
4721097cab deal with indented heredoc/nowdoc tokens 2021-02-26 14:53:48 +01:00
Nicolas Grekas
8f03a1f555 [Cache] boost perf by wrapping keys validity checks with assert() 2021-02-26 13:15:59 +01:00
Christian Flothmann
c316708669 zero parts can be omitted in date interval input 2021-02-26 13:02:03 +01:00
Christian Flothmann
1a26ed43e7 improve exception message if symfony/security-csrf is missing 2021-02-26 11:19:16 +01:00
Nicolas Grekas
a5683c5324 bug #40239 MockResponse total_time should not be simulated when provided (Pierrick VIGNAND)
This PR was merged into the 4.4 branch.

Discussion
----------

MockResponse total_time should not be simulated when provided

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

When you provide a `total_time` to a MockResponse, it is overriden. It should be simulated only when it is not provided I guess.
Ex: `new MockResponse('{"foo":"bar"}', ['total_time' => 0.4])`

Commits
-------

8dada95cbf fix: MockResponse total_time should not be simulated when provided
2021-02-26 11:01:20 +01:00
Robin Chalas
d771e449ec [HttpKernel] Handle multi-attribute controller arguments 2021-02-26 01:25:47 +01:00
Nicolas Grekas
59fbe57ed1 feature #39607 [Messenger] Add rediss:// DSN scheme support for TLS to Redis transport (njutn95)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Messenger] Add `rediss://` DSN scheme support for TLS to Redis transport

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

This adds a support for `rediss://` DSN (as discussed in https://github.com/symfony/symfony/pull/39599) and deprecates the use of `tls` parameter introduced in https://github.com/symfony/symfony/pull/35503 so it can be standardized to single format.

Commits
-------

28e7b74b47 [Messenger] Add `rediss://` DSN scheme support for TLS to Redis transport
2021-02-26 01:02:05 +01:00
viktor
28e7b74b47 [Messenger] Add rediss:// DSN scheme support for TLS to Redis transport 2021-02-26 01:01:54 +01:00
Nicolas Grekas
008f28026c Merge branch '5.2' into 5.x
* 5.2:
  [Cache] Add server-commands support for Predis Replication Environments
  Speedup psalm
2021-02-26 00:55:26 +01:00
Nicolas Grekas
2068652fc9 Merge branch '4.4' into 5.2
* 4.4:
  [Cache] Add server-commands support for Predis Replication Environments
  Speedup psalm
2021-02-26 00:54:56 +01:00
Nicolas Grekas
3fe1564912 bug #40299 [Cache] Add server-commands support for Predis Replication Environments (DemigodCode)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Add server-commands support for Predis Replication Environments

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

This fix is for predis MasterSlaveConnections which don't allow to run server commands.
Due to that it's not possible to e.g. clear a cache with cache:pool:clear.

PhpRedis and Predis do not have the same interface, so have to check which implementation is used.
Furthermore, the getClientFor('master') works only for replicated redis instances.

Commits
-------

2ae5c33c80 [Cache] Add server-commands support for Predis Replication Environments
2021-02-26 00:52:22 +01:00
DemigodCode
2ae5c33c80 [Cache] Add server-commands support for Predis Replication Environments 2021-02-26 00:52:11 +01:00
Robin Chalas
64b76968bf minor #40309 Fix deprecation messages (rosier)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

Fix deprecation messages

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

The wrong namespace is used in the deprecation messages

Commits
-------

4aca3edb9e Fix deprecation messages
2021-02-25 19:35:29 +01:00
Jan Rosier
4aca3edb9e Fix deprecation messages 2021-02-25 19:35:00 +01:00