Commit Graph

43635 Commits

Author SHA1 Message Date
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
54cb7ec0cc Merge branch '5.2' into 5.x
* 5.2:
  CS fix
2021-03-17 18:02:51 +01:00
Nicolas Grekas
00036b934b Merge branch '4.4' into 5.2
* 4.4:
  CS fix
2021-03-17 18:02:05 +01:00
Nicolas Grekas
6a6274ca89 CS fix 2021-03-17 18:01:41 +01:00
Nicolas Grekas
285cdb0ecd bug #40498 [DebugBundle] Remove warning of ServerDumpPlaceholderCommand in console (DemigodCode)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DebugBundle] Remove warning of ServerDumpPlaceholderCommand in console

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

In 5.2.5 the console commands are lazy. (https://github.com/symfony/symfony/pull/39851)
With this change the ServerDumpCommand::$defaultName is used which isn't set in the placeholder command.
If no vardump-server in debug.dump_destination is defined, this will lead to a warning and not adding the command to the console list.

Commits
-------

37b2a19989 [DebugBundle] Add $defaultName to PlaceholderCommand
2021-03-17 17:59:56 +01:00
DemigodCode
37b2a19989 [DebugBundle] Add $defaultName to PlaceholderCommand 2021-03-17 17:58:09 +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
Nicolas Grekas
7678d62f75 bug #40494 [PhpUnitBridge] fix compat with symfony/debug (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] fix compat with symfony/debug

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

Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/40494/files?w=1).

Commits
-------

35dd54a654 [PhpUnitBridge] fix compat with symfony/debug
2021-03-17 12:14:50 +01:00
Nicolas Grekas
35dd54a654 [PhpUnitBridge] fix compat with symfony/debug 2021-03-17 09:57:09 +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
Wouter de Jong
77fb0eb0a1 [Security] Add XML support for authenticator manager 2021-03-16 19:11:03 +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
faf7269806 bug #40368 [FrameworkBundle] Make the TestBrowserToken interchangeable with other tokens (Seldaek)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] Make the TestBrowserToken interchangeable with other tokens

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

For some reason most tokens implement getFirewallName (and the deprecated getProviderKey), but not all. This adds it to TestBrowserToken because it caused issues in my tests when upgrading to Symfony 5's `Client::loginUser()`.

I am also happy to add this to AnonymousToken but I am more worried about BC impacts there, so I left it alone for now. All other token classes implement it, so I am not sure why this isn't in TokenInterface to begin with.

Commits
-------

a4958ae7ad [FrameworkBundle] Make the TestBrowserToken interchangeable with other tokens
2021-03-16 09:58:51 +01:00
Jordi Boggiano
a4958ae7ad [FrameworkBundle] Make the TestBrowserToken interchangeable with other tokens 2021-03-16 09:58:32 +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
e21004d922 bug #40178 [FrameworkBundle] Exclude unreadable files when executing About command (michaljusiega)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Exclude unreadable files when executing About command

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

Fix as explained in: https://github.com/symfony/symfony/issues/39916.

Tests failed looks like not releated to my changes.

Commits
-------

25f503a813 [FrameworkBundle] Exclude unreadable files when executing About command
2021-03-16 09:47:37 +01:00
Michał Jusięga
25f503a813 [FrameworkBundle] Exclude unreadable files when executing About command 2021-03-16 09:46:52 +01:00
Nicolas Grekas
73cef1553a minor #40423 [DependencyInjection] Fix return type of getSubscribedServices() (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fix return type of getSubscribedServices()

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

Commits
-------

ef59c89dea [DependencyInjection] Fix return type
2021-03-16 09:36:52 +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
Nicolas Grekas
fcd658e6da minor #40475 Be explicit about anchor background color in profiler toolbar (bezin)
This PR was merged into the 4.4 branch.

Discussion
----------

Be explicit about anchor background color in profiler toolbar

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

Hello,

we have a project where we work with background colors on links. When we define this in our stylesheet, the Web Profiler picks these styles up due to the cascade. We added two CSS statements to the Web Profiler stylesheet to be explicit about the transparent background.

![2021-03-15 16_10_08](https://user-images.githubusercontent.com/4400435/111176325-860e8d80-85a9-11eb-82c4-7954aa01245a.png)
![2021-03-15 16_10_30](https://user-images.githubusercontent.com/4400435/111176328-86a72400-85a9-11eb-9515-280c5593a288.png)

Commits
-------

f0cac47ae7 Be explicit about transparent background color of links in toolbar
2021-03-16 09:13:06 +01:00
Oviglo
e73db2b1f1 [Bridge\Twig] Add 'form-control-range' for range input type 2021-03-16 09:08:39 +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
bezin
f0cac47ae7
Be explicit about transparent background color of links in toolbar 2021-03-15 16:12:10 +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