Commit Graph

50328 Commits

Author SHA1 Message Date
Fabien Potencier
a379051c82 Merge branch '3.4' into 4.4
* 3.4:
  [Yaml] Fix for #36624; Allow PHP constant as first key in block
  Use PHPUnit 9.3 on php 8.
  fix mapping errors from unmapped forms
  [Validator] Add target guards for Composite nested constraints
2020-08-13 08:22:32 +02:00
Fabien Potencier
a45428c293 feature #20054 [Console] Different approach on merging application definition (ro0NL)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Console] Different approach on merging application definition

| Q | A |
| --- | --- |
| Branch? | "master" |
| Bug fix? | yes |
| New feature? | not really (refactoring) |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #19181, #17804, #19909, partially #20030 |
| License | MIT |
| Doc PR | reference to the documentation PR, if any |

Before/After:

``` diff
$ bin/console list -h
Usage:
  list [options] [--] [<namespace>]

Arguments:
  namespace            The namespace name

Options:
      --raw            To output raw command list
      --format=FORMAT  The output format (txt, xml, json, or md) [default: "txt"]
+  -h, --help            Display this help message
+  -q, --quiet           Do not output any message
+  -V, --version         Display this application version
+      --ansi            Force ANSI output
+      --no-ansi         Disable ANSI output
+  -n, --no-interaction  Do not ask any interactive question
+  -e, --env=ENV         The environment name [default: "dev"]
+      --no-debug        Switches off debug mode
+  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  The list command lists all commands:

    php bin/console list

  You can also display the commands for a specific namespace:

    php bin/console list test

  You can also output the information in other formats by using the --format option:

    php bin/console list --format=xml

  It's also possible to get raw list of commands (useful for embedding command runner):

    php bin/console list --raw
```

This could deprecate `getNativeDefinition` or make it a feature as right now it's internal and unused.

edit: resolved the BC break.

edit2: question is.. should this target 2.7?

Commits
-------

553b173a30 [Console] Different approach on merging application definition
2020-08-13 08:19:16 +02:00
Fabien Potencier
acda2dc31e feature #36648 [Notifier] Add Mobyt bridge (Deamon)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Add Mobyt bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |  #33687
| License       | MIT
| Doc PR        | symfony/symfony-docs#13606
| recipe PR   | symfony/recipes#768

Add Mobyt notifier bridge.

In this SMS Provider, you can choose a sort of "quality service" to send the message.

I updated `src/Symfony/Component/Notifier/Message/SmsMessage.php` to add the notification in order to be able to use the notification importance when creating options.

Commits
-------

bf594b75d0 Add Mobyt Notifier bridge
2020-08-13 08:02:00 +02:00
Fabien Potencier
fee690ad1e feature #37332 [FrameworkBundle] Allow to leverage autoconfiguration for DataCollectors with template (l-vo)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Allow to leverage autoconfiguration for DataCollectors with template

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

When creating a datacollector with a template for the profiler display, an id must be set in the `data_collector` tag and must be the same as this returned by `DataCollectorInterface::getName`. A template path can also be added to the tag. We lose in this case the ability to use autoconfigure. This PR suggests:
- To guess the id configured in the `data_collector` tag. To follow the principle already used for services ids or events names, if not specified, the id is the data collector class name.
- To allow data collectors to provide the template path from the code. Note that the template path configuration via the `data_collector` tags still takes precedence over configuration from the code.

This PR also provides an `AbstractDataCollector` to avoid to implement methods that might be considered as boilerplate: `reset` and `getName`.

Commits
-------

986a0a221e [FrameworkBundle] Allow to leverage autoconfiguration for DataCollectors with template
2020-08-13 07:55:04 +02:00
Laurent VOULLEMIER
986a0a221e [FrameworkBundle] Allow to leverage autoconfiguration for DataCollectors with template 2020-08-12 20:58:59 +02:00
Deamon
bf594b75d0 Add Mobyt Notifier bridge 2020-08-12 18:10:23 +02:00
Fabien Potencier
31c194f7de feature #37359 [Security] Add event to inspect authenticated token before it becomes effective (scheb)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Security] Add event to inspect authenticated token before it becomes effective

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | n/a

Hello there, I'm the author of `scheb/two-factor-bundle`, which extends Symfony's security layer with two-factor authentication. I've been closely following the recent changes by @wouterj to rework the security layer with "authenticators" (great work!). While I managed to make my bundle work with authenticators, I see some limitations in the security layer that I'd like to address to make such extensions easier to implement.

This PR adds a new event, which is disapatched right after the authenticated token has been created by the authenticator, to "announce" it to the application *before* it becomes effective to the security system. The event works similar to `ResponseEvent`, but for security token. It allows listeners to inspect the new token before it becomes effective and - most importantly - apply modifications to it. So components other than the authenticator will be able to influence how the security token looks like, that will be set to the security layer on successful authentication.

Why would you want to do this? Of course I'm looking at this from the 2fa perspective. To make 2fa work, it's necessary to prevent a newly created authenticated token from becoming visible to the security system and therefore exposing its privileges/roles. This is done by replacing the authenticated token with a temporary "TwoFactorToken". Currently I'm doing this through dependency injection, getting all the registered authenticators and decorating them with my own token-exchange logic. This is not very clean and overly complicated, but it works. Adding this event as a hook-in point would allow for a much cleaner integration for any component that wants to have a saying in how the security token should look like.

Commits
-------

20309646b7 [Security] Add event to inspect authenticated token before it becomes effective
2020-08-12 18:06:37 +02:00
Christian Scheb
20309646b7 [Security] Add event to inspect authenticated token before it becomes effective 2020-08-12 18:06:29 +02:00
Christian Flothmann
850389731c stop using the deprecated at() PHPUnit matcher 2020-08-12 16:55:37 +02:00
Fabien Potencier
3cd112328c minor #37813 [Workflow] Simplify code + Updated README.md (lyrixx)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Workflow] Simplify code + Updated README.md

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37539 (cleaning previous PR)
| License       | MIT
| Doc PR        |

Commits
-------

3268bdb90c [Workflow] Simplify code + Updated README.md
2020-08-12 16:53:19 +02:00
Fabien Potencier
684b04bb9c minor #37811 [FrameworkBundle] Fix 7.4 CachePools integration tests (ogizanagi)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] Fix 7.4 CachePools integration tests

| Q             | A
| ------------- | ---
| Branch?       | master <!-- 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       | #36691 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | N/A

Attempt to fix https://github.com/symfony/symfony/runs/975252922#step:11:56 on master.

Commits
-------

d3ef8ba3bd [FrameworkBundle] Fix 7.4 CachePools integration tests
2020-08-12 16:49:52 +02:00
Grégoire Pineau
3268bdb90c [Workflow] Simplify code + Updated README.md 2020-08-12 15:41:55 +02:00
Grégoire Pineau
25095d8908 feature #37539 [Workflow] Added Context to Workflow Event (epitre)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Workflow] Added Context to Workflow Event

There's also a default context for the initial marking event.

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

This time, I need context in the events, because, sometimes, the transition is automatic and sometimes, it is manual. I want to be able to make the difference. I figured using the context for that is a good idea. I hope you do too :)

By the way, I believe it also fixes #37421 . I took @pluk77 request to be able to differentiate an initial marking by having a default context in that case

Commits
-------

bfe07dda83 Added Context to Workflow Event There's also a default context for the initial marking event.
2020-08-12 15:17:24 +02:00
Maxime Steinhausser
d3ef8ba3bd [FrameworkBundle] Fix 7.4 CachePools integration tests 2020-08-12 15:07:58 +02:00
Roland Franssen
553b173a30 [Console] Different approach on merging application definition 2020-08-12 14:42:14 +02:00
Fabien Potencier
78cc0ef62a bug #37771 Use PHPUnit 9.3 on php 8 (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

Use PHPUnit 9.3 on php 8

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Part of #37564
| License       | MIT
| Doc PR        | N/A

Our CI for PHP 8 is currently a blind spot, mainly because the PHPUnit version 8.3 that we use for the test suite is incompatible with php 8. This PR changes the PHPUnit version used on Travis for php 8 to PHPUnit 9.3.

Our test suite might not be 100% compatible with that new PHPUnit release yet, but this change should allow us to run most tests on php 8 again and enable us to iteratively migrate to PHPUnit 9.3.

Commits
-------

d642d85cd3 Use PHPUnit 9.3 on php 8.
2020-08-12 13:46:11 +02:00
Fabien Potencier
969b902826 minor #37810 [Validator] RangeTest: fix expected deprecation (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] RangeTest: fix expected deprecation

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

Fixes https://travis-ci.org/github/symfony/symfony/jobs/717184009#L5830-L5831

Commits
-------

33c8c3a63d [Validator] RangeTest: fix expected deprecation
2020-08-12 13:43:46 +02:00
Maxime Steinhausser
33c8c3a63d [Validator] RangeTest: fix expected deprecation 2020-08-12 11:54:23 +02:00
Fabien Potencier
fc8a1ac592 minor #37809 [Notifier] add doc for free mobile dsn (noniagriconomie)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] add doc for free mobile dsn

| Q             | A
| ------------- | ---
| Branch?       | master (maybe 5.1 ? it is only code doc)
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix https://github.com/symfony/symfony-docs/pull/13600#issuecomment-621086377
| License       | MIT
| Doc PR        |

Improve readme according to the linked comment
I've taken info of my original PR https://github.com/symfony/symfony/pull/35690 (with some rewrite)

Also the package was renamed, fixing the doc here https://github.com/symfony/symfony-docs/pull/14057

Commits
-------

eb067ed58e [Notifier] add doc for free mobile dsn
2020-08-12 11:44:58 +02:00
noniagriconomie
eb067ed58e [Notifier] add doc for free mobile dsn 2020-08-12 11:21:02 +02:00
Fabien Potencier
5afac1df4e Fix bad merge 2020-08-12 11:06:24 +02:00
Fabien Potencier
9b197fe839 Fix bad merge 2020-08-12 11:05:56 +02:00
Fabien Potencier
78f4a9f410 Merge branch '5.1'
* 5.1:
  Fix for issue #37681
  Revert changes to Table->fillCells()
  [Console] Table: support cells with newlines after a cell with colspan >= 2
  Fix redis connect with empty password
  [Validator] Add BC layer for notInRangeMessage when min and max are set
2020-08-12 10:46:31 +02:00
Fabien Potencier
806ef94e98 Merge branch '4.4' into 5.1
* 4.4:
  Fix for issue #37681
  Revert changes to Table->fillCells()
  [Console] Table: support cells with newlines after a cell with colspan >= 2
  Fix redis connect with empty password
  [Validator] Add BC layer for notInRangeMessage when min and max are set
2020-08-12 10:45:47 +02:00
Fabien Potencier
f3753e93d8 bug #36140 [Validator] Add BC layer for notInRangeMessage when min and max are set (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Add BC layer for notInRangeMessage when min and max are set

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

According to #36133, the improvement added in  #32435 may lead to a BC break when the developer pass `min` and `max` options and a custom `minMessage` or `maxMessage`. In this case it's expected to receive a `minMessage`/`maxMessage` in the violation but a `notInRangeMessage` is received instead.

So in the following conditions:
- `min` and `max` options are set
- `minMessage` or `maxMessage` is set

A deprecation is triggered. If a limit is violated and matches to the min/max message passed as option (`minMessage` for `min` violated and `maxMessage` for `max` violated), `minMessage/maxMessage` is used in the violation instead of `notInRangeMessage`.

Commits
-------

092d85c947 [Validator] Add BC layer for notInRangeMessage when min and max are set
2020-08-12 10:39:50 +02:00
Fabien Potencier
92eae57fdb bug #35843 [Validator] Add target guards for Composite nested constraints (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add target guards for Composite nested constraints

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix https://github.com/symfony/symfony/pull/35815#pullrequestreview-362719298 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

a08ddf7636 [Validator] Add target guards for Composite nested constraints
2020-08-12 10:12:34 +02:00
Fabien Potencier
d2b5ee0396 feature #37683 [Console] allow multiline responses to console questions (ramsey)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Console] allow multiline responses to console questions

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#14002

By default, the question helper stops reading user input when it receives a newline character (i.e., when the user hits `ENTER` once). However, with this feature, developers may specify that the response to a question should allow multiline answers by passing `true` to `setMultiline()`.

Multiline questions stop reading user input after receiving three newline characters in a row (i.e., the user hits `ENTER` three times) or an end-of-transmission control character (`Ctrl-D` on Unix systems or `Ctrl-Z` on Windows).

If a user enters a newline character without input, control is returned to the question class, where the input may be validated to prompt the user again (in the case of a required question), or control may be passed along to the rest of the script.

Commits
-------

0bf89cdf71 [Console] allow multiline responses to console questions
2020-08-12 08:37:30 +02:00
Fabien Potencier
7e85a6a6c6 bug #37803 Fix for issue #37681 (Rav)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Fix for issue #37681

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

Allow BOM character and comments before `<!DOCTYPE html>` declaration in DomCrawler while choosing a parser implementation

Commits
-------

9bc249e0b9 Fix for issue #37681
2020-08-12 08:20:48 +02:00
Rav
9bc249e0b9 Fix for issue #37681 2020-08-12 08:20:35 +02:00
Fabien Potencier
8761f80268 minor #37804 [Console] Revert changes to Table->fillCells() (GMTA)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Revert changes to Table->fillCells()

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

These changes were introduced in https://github.com/symfony/symfony/pull/37731 but no longer contributed to the actual fix, which was to perform a ->copyRow().

Commits
-------

17263ca14d Revert changes to Table->fillCells()
2020-08-12 08:15:22 +02:00
Ben Ramsey
0bf89cdf71
[Console] allow multiline responses to console questions 2020-08-11 16:25:31 -05:00
Jelle Raaijmakers
17263ca14d Revert changes to Table->fillCells()
These changes were introduced in https://github.com/symfony/symfony/pull/37731
but no longer contributed to the actual fix, which was to perform a
->copyRow().
2020-08-11 19:02:45 +02:00
Fabien Potencier
c56acfa817 Fix tests 2020-08-11 17:45:15 +02:00
Fabien Potencier
fee38131e1 Fix typo 2020-08-11 17:32:41 +02:00
Fabien Potencier
8449f7040e bug #37728 [FrameworkBundle] do not use deprecated mailer.logger_message_listener service (xabbuh)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[FrameworkBundle] do not use deprecated mailer.logger_message_listener service

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

Commits
-------

0e93216322 do not use deprecated mailer.logger_message_listener service
2020-08-11 17:22:09 +02:00
Christian Flothmann
0e93216322 do not use deprecated mailer.logger_message_listener service 2020-08-11 17:21:52 +02:00
Thomas Calvet
0533f1f63e [ErrorHandler][DebugClassLoader] Add mixed and static return types support 2020-08-11 14:16:16 +02:00
Fabien Potencier
7c522e2163 feature #29117 [Serializer] Add CompiledClassMetadataFactory (fbourigault)
This PR was squashed before being merged into the 5.2-dev branch.

Discussion
----------

[Serializer] Add CompiledClassMetadataFactory

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ?
| License       | MIT
| Doc PR        | todo (issue: https://github.com/symfony/symfony-docs/issues/10706)

This introduce a dumped `ClassMetadataFactoryInterface` implementation to speed up the serializer by leveraging [PHP7 immutable array](https://blog.blackfire.io/php-7-performance-improvements-immutable-arrays.html).

Like for https://github.com/symfony/symfony/pull/28865, if the user have the opcache extension enabled, the compilation time will be skipped. The user will also have a performance boost when not using opcache as we are no longer fetching `ClassMetadata` from the PSR-6 cache.

This allow to speed up the normalization (without opcache) by 9-12% depending on how many objects are involved in the graph:

- [SymfonyObjectNormalizerBenchmark, 100 iterations with complexity of 1](https://blackfire.io/profiles/compare/d937a9cc-eebf-47eb-be90-c8e65cdf12b3/graph)
- [SymfonyObjectNormalizerBenchmark, 3 iterations with complexity of 60](https://blackfire.io/profiles/compare/d490542c-9a79-48a0-b7bc-1ed3ca6a9148/graph)

On the `FrameworkBundle` side, I suggest to add a `CacheWarmer` to dump the metadata array from configured class list. The list could have a _good_ default which will load the classes found in `src/Entity`.

## Dumping the `ClassMetadata`
```php
$classMetadatas = [];

foreach([Category::class, Comment::class, Forum::class, Thread::class, User::class] as $class) {
    $classMetadatas[] = $this->classMetadataFactory->getMetadataFor($class);
}

file_put_contents('dumped.php', $this->classMetadataFactoryCompiler->compile($classMetadatas));
```

## Using the dumped `ClassMetadata`
```php
$classMetadataFactory = new CompiledClassMetadataFactory(
    'dumped.php',
    new CacheClassMetadataFactory(
        new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())),
        new ApcuAdapter('SymfonyMetadata')
    )
);
```
# To do

- [x] Tests.
- [x] Cache warmer.
- [x] Documentation.
- [x] Changelog entry.

Commits
-------

63cbf0abe8 [Serializer] Add CompiledClassMetadataFactory
2020-08-11 12:10:21 +02:00
Fabien Bourigault
63cbf0abe8 [Serializer] Add CompiledClassMetadataFactory 2020-08-11 12:10:04 +02:00
Fabien Potencier
e29d2304bc feature #37676 [Stopwatch] Add name property to the stopwatchEvent (AhmedRaafat14)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Stopwatch] Add name property to the stopwatchEvent

| Q             | A
| ------------- | ---
| Branch?       | master for features
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #37627
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

f2b64ecc6a Add name property to the stopwatchEvent
2020-08-11 11:43:55 +02:00
Fabien Potencier
a77901d6db bug #37744 [Yaml] Fix for #36624; Allow PHP constant as first key in block (jnye)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[Yaml] Fix for #36624; Allow PHP constant as first key in block

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

When using a PHP constant in the first key of a mapping the parser would throw an exception. However if you used a PHP constant in any other key but the first it was allowed. This fix allows PHP constant as the first key.

I've included a test for this parser error along with the fix.

Commits
-------

46f635c492 [Yaml] Fix for #36624; Allow PHP constant as first key in block
2020-08-11 11:42:46 +02:00
Joshua Nye
46f635c492 [Yaml] Fix for #36624; Allow PHP constant as first key in block 2020-08-11 11:42:40 +02:00
Ahmed Raafat
f2b64ecc6a Add name property to the stopwatchEvent 2020-08-11 11:41:23 +02:00
Fabien Potencier
0e9cd90857 bug #37767 [Form] fix mapping errors from unmapped forms (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] fix mapping errors from unmapped forms

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

Commits
-------

235920a388 fix mapping errors from unmapped forms
2020-08-11 11:39:48 +02:00
Fabien Potencier
e7617da03f feature #34704 [Messenger] Add method HandlerFailedException::getNestedExceptionOfClass (tyx)
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Messenger] Add method HandlerFailedException::getNestedExceptionOfClass

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | in progress

I have many times use this kind of code on my own development. It helps when dealing with specific exception through a Messenger usage.

Example in an ExceptionListener, the exception you get could be a `HandlerFailedException` but you want a specific treatment when the original exception is different (like a RedirectResponse, or Http error code different).

edit: I finally also added a getNestedExceptionOfClass that could be useful too

Commits
-------

e0dd84b426 [Messenger] Add method HandlerFailedException::getNestedExceptionOfClass
2020-08-11 09:52:28 +02:00
Fabien Potencier
0f92b9a584 bug #37731 [Console] Table: support cells with newlines after a cell with colspan >= 2 (GMTA)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Console] Table: support cells with newlines after a cell with colspan >= 2

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

When rendering a table with a cell containing newlines after a cell with
colspan set to at least 2, every line in the cell with newlines except the
first one fails to render.

This case is fixed by calling `->fillCells()` on the unmerged rows and
implementing support for rows that start with a non-zero index for the columns.

While fixing this, I discovered another issue with colspan: if a cell following a
colspanned cell contains enough newlines to make the contents extend further
than the colspanned cell's contents, the cells become misaligned. This is now
also fixed.

Commits
-------

ca11772e3f [Console] Table: support cells with newlines after a cell with colspan >= 2
2020-08-11 09:29:54 +02:00
Jelle Raaijmakers
ca11772e3f [Console] Table: support cells with newlines after a cell with colspan >= 2 2020-08-11 09:29:48 +02:00
Fabien Potencier
a06e564607 feature #37793 Revert "[DependencyInjection] Resolve parameters in tag arguments" (rpkamp)
This PR was merged into the 5.2-dev branch.

Discussion
----------

Revert "[DependencyInjection] Resolve parameters in tag arguments"

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

Revert of earlier PR, see discussion https://github.com/symfony/symfony/pull/37243

Commits
-------

9731451b5a Revert "[DependencyInjection] Resolve parameters in tag arguments"
2020-08-10 19:54:09 +02:00
Remon van de Kamp
9731451b5a
Revert "[DependencyInjection] Resolve parameters in tag arguments"
This reverts commit 3dba1fe7bf.
2020-08-10 19:30:39 +02:00
Fabien Potencier
2318170181 Fix typo 2020-08-10 16:14:03 +02:00