Commit Graph

48717 Commits

Author SHA1 Message Date
Fabien Potencier 8e1c507fce
Merge pull request #36614 from fabpot/release-4.4.8
released v4.4.8
2020-04-28 20:48:03 +02:00
Fabien Potencier f7b9d93cb2 updated VERSION for 4.4.8 2020-04-28 20:47:42 +02:00
Fabien Potencier d408c55845 updated CHANGELOG for 4.4.8 2020-04-28 20:47:32 +02:00
Nicolas Grekas c699b9cb3d Merge branch '5.0'
* 5.0:
  [Validator] fix merge
2020-04-28 20:26:40 +02:00
Nicolas Grekas 270d204750 Merge branch '4.4' into 5.0
* 4.4:
  [Validator] fix merge
2020-04-28 20:26:18 +02:00
Nicolas Grekas dfc4a71eac [Validator] fix merge 2020-04-28 20:23:58 +02:00
Nicolas Grekas be8adfaf99 Merge branch '5.0'
* 5.0:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  Allow invalidateTags calls to be traced by data collector
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Mailer] Add a comment to avoid more wrong PRs on this piece of code
  [Form] apply automatically step=1 for datetime-local input
  remove getContainer overwrites in tests
  Fixing a bug where class_alias would cause incorrect items in debug:autowiring
  [DependencyInjection][ServiceSubscriber] Support late aliases
  Fix profiler nullable string type
2020-04-28 20:01:52 +02:00
Nicolas Grekas 77cdbffcb3 Merge branch '4.4' into 5.0
* 4.4:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  Allow invalidateTags calls to be traced by data collector
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Mailer] Add a comment to avoid more wrong PRs on this piece of code
  [Form] apply automatically step=1 for datetime-local input
  Fixing a bug where class_alias would cause incorrect items in debug:autowiring
  [DependencyInjection][ServiceSubscriber] Support late aliases
2020-04-28 19:58:55 +02:00
Nicolas Grekas 49b74baab4 Merge branch '3.4' into 4.4
* 3.4:
  updated VERSION for 3.4.40
  update CONTRIBUTORS for 3.4.40
  updated CHANGELOG for 3.4.40
  [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
  add tests for the ConstraintViolationBuilder class
  Improve dirname usage
  [PhpUnitBridge] Use COMPOSER_BINARY env var if available
  [YAML] escape DEL(\x7f)
  fix compatibility with phpunit 9
  [Cache] skip APCu in chains when the backend is disabled
  [Form] apply automatically step=1 for datetime-local input
2020-04-28 19:55:16 +02:00
Christian Flothmann 88d836643a provide a useful message when extension types don't match 2020-04-28 19:46:51 +02:00
Fabien Potencier ad6f8608e9
Merge pull request #36612 from fabpot/release-3.4.40
released v3.4.40
2020-04-28 19:41:57 +02:00
Fabien Potencier f59e0e9c23 updated VERSION for 3.4.40 2020-04-28 19:41:38 +02:00
Fabien Potencier 1822b065d7 update CONTRIBUTORS for 3.4.40 2020-04-28 19:41:24 +02:00
Fabien Potencier 99080bdbe7 updated CHANGELOG for 3.4.40 2020-04-28 19:40:55 +02:00
Jérémy Derussé 41165beb48
Add missing port SQS Host Header request 2020-04-28 15:17:36 +02:00
Serhey Dolgushev 3d6e942da5 [Cache] Fixed not supported Redis eviction policies 2020-04-28 12:13:53 +01:00
soyuka e5c20293fa Fix serializer do not transform empty \Traversable to Array 2020-04-27 16:07:50 +02:00
Christian Flothmann 25ba1a241d deprecate not using a rounding mode 2020-04-27 08:57:02 +02:00
Gabriel Ostrolucký ee7fc5544e
[Console] Default hidden question to 1 attempt for non-tty session 2020-04-27 05:08:14 +02:00
Nicolas Grekas 4170346ea7 bug #36581 [DI] fix not preloading excluded service factories (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] fix not preloading excluded service factories

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

Commits
-------

2a20c6e605 [DI] fix not preloading excluded service factories
2020-04-26 16:30:55 +02:00
Nicolas Grekas 1bc3ee798d bug #36536 [Cache] Allow invalidateTags calls to be traced by data collector (l-vo)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Allow invalidateTags calls to be traced by data collector

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

`TraceableTagAwareAdapter` is not used in the fullstack framework since tag aware pools don't have the `cache.pool` tag (it's the decorated adapter that has it). This PR aims to use `TraceableTagAwareAdapter` when a pool is configured with `tags: true`

Commits
-------

28fdb3a879 Allow invalidateTags calls to be traced by data collector
2020-04-26 16:19:08 +02:00
Nicolas Grekas b023e4cac3 [DI] allow loading and dumping tags with an attribute named "name" 2020-04-26 16:03:15 +02:00
Nicolas Grekas 048e6f3dd8 minor #36571 [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) (Lozik)
This PR was squashed before being merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36533
| License       | MIT
| Doc PR        | none
<!--
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 master.
-->
This PR changes the label of the peak memory usage from `MB` into `MiB` in the time and memory panels of the web profiler, as discussed in #36533.

The changed file `Resources/views/Collector/time.html.twig` is completely updated by commit c9433b0090 for v4.3. So for correctly displaying the label in 4.4 (& 5.0), the file `Resources/views/Collector/time.js` needs to be updated.

Commits
-------

89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB)
2020-04-26 14:49:57 +02:00
Loïc Beurlet 89fb0799cd [WebProfilerBundle] changed label of peak memory usage in the time & memory panels (MB into MiB) 2020-04-26 14:49:41 +02:00
Fabien Potencier 1889672a59 minor #36584 [Validator] add tests for the ConstraintViolationBuilder class (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add tests for the ConstraintViolationBuilder class

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

Commits
-------

fb3aaefbf2 add tests for the ConstraintViolationBuilder class
2020-04-26 12:56:11 +02:00
Christian Flothmann fb3aaefbf2 add tests for the ConstraintViolationBuilder class 2020-04-26 10:10:12 +02:00
Nicolas Grekas 2a20c6e605 [DI] fix not preloading excluded service factories 2020-04-25 22:55:37 +02:00
Fabien Potencier 6b4851168d feature #36570 [Security] Integrated Guards with the Authenticator system (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Security] Integrated Guards with the Authenticator system

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

This way, the guard configuration (and guard authenticators) can use the new authenticator system as well. Advantages:

* Any bundle providing guard integration (e.g. Lexik JWT, Knp Oauth) can now integrate with the authenticator system as well
* (after we've integrated LDAP as well) Anyone can set `security.enable_authenticator_manager: true` to test the new experimental system without needing to update any PHP code.

cc @weaverryan

Commits
-------

8708a6c37d Integrated Guards with the Authenticator system
2020-04-25 16:35:45 +02:00
Fabien Potencier e3dc5effa6 bug #36566 [PhpUnitBridge] Use COMPOSER_BINARY env var if available (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Use COMPOSER_BINARY env var if available

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

Commits
-------

6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available
2020-04-25 14:18:34 +02:00
Fabien Potencier b3cdf5c989 minor #36568 [PhpUnitBridge] Improve dirname usage (Jean85)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Improve dirname usage

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #36499
| License       | MIT

This is a very small performance improvement on top of #36539

Commits
-------

e721cfd65c Improve dirname usage
2020-04-25 14:02:39 +02:00
Wouter de Jong 8708a6c37d Integrated Guards with the Authenticator system 2020-04-24 19:07:56 +02:00
Alessandro Lai e721cfd65c
Improve dirname usage 2020-04-24 16:08:51 +02:00
Thomas Calvet 6dce90d47b [PhpUnitBridge] Use COMPOSER_BINARY env var if available 2020-04-24 14:56:41 +02:00
Laurent VOULLEMIER 28fdb3a879 Allow invalidateTags calls to be traced by data collector 2020-04-24 13:56:40 +02:00
Fabien Potencier fe5eacd3a2 bug #36560 [YAML] escape DEL(\x7f) (sdkawata)
This PR was merged into the 3.4 branch.

Discussion
----------

[YAML] escape DEL(\x7f)

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

Commits
-------

734d97bdcc [YAML] escape DEL(\x7f)
2020-04-24 12:37:21 +02:00
sdkawata 734d97bdcc [YAML] escape DEL(\x7f) 2020-04-24 19:16:04 +09:00
Fabien Potencier c6cf433589 feature #36562 Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)" (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"

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

This reverts commit 477ee19778, reversing changes made to 9bfa25869a.

The reverted PR is #30501. Actually, it's a partial revert: changes made to the `Routing` component are not reverted.

The reason for this revert is that a discussion is still on-going in #35653 (which provides the same configuration extensions to yaml+xml), and we won't be able to resolve them in time for 5.1.

Better postpone for 5.2.

@HeahDude I invite you to open a PR after this one, reverting this very PR, which we'll consider again but for 5.2 if you don't mind.

Commits
-------

e4e8945aef Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"
2020-04-24 12:11:53 +02:00
Nicolas Grekas e4e8945aef Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)"
This reverts commit 477ee19778, reversing
changes made to 9bfa25869a.
2020-04-24 12:08:40 +02:00
Fabien Potencier 69452b22c2 bug #36548 [DI] fix lazy factory code generation (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] fix lazy factory code generation

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

Commits
-------

7d55151ff4 [DI] fix lazy factory code generation
2020-04-24 11:16:27 +02:00
Fabien Potencier d6b9011ebf feature #36373 [DI] add syntax to stack decorators (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] add syntax to stack decorators

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

Declare this:
```yaml
services:
    my_stack_of_decorators:
        stack:
            - class: App\ExternalDecorator
            - class: App\InternalDecorator
            - class: App\DecoratoredClass
```

And get this:
![image](https://user-images.githubusercontent.com/243674/78615803-b8c8e580-7872-11ea-95c2-22cb78f88ca8.png)

The PR is now ready with support for Yaml, XML and the PHP-DSL. It needs #36388, #36392 and #36389 to pass, and relates to #36390 to be DX-friendly.

The new syntax now supports composable stacks - i.e stack you can reuse in the middle of another stack.

RIP middleware, simple decorators FTW :)

From the test cases:
```yaml
services:
    reusable_stack:
        stack:
            - class: stdClass
              properties:
                  label: A
                  inner: '@.inner'
            - class: stdClass
              properties:
                  label: B
                  inner: '@.inner'

    concrete_stack:
        stack:
            - parent: reusable_stack
            - class: stdClass
              properties:
                  label: C
```

This will create a service similar to:
```php
(object) [
    'label' => 'A',
    'inner' => (object) [
        'label' => 'B',
        'inner' => (object) [
             'label' => 'C',
        ]
    ],
];
```

When used together with autowiring, this is enough to declare a stack of decorators:
```yaml
services:
    my_processing_stack:
        stack:
            - App\ExternalDecorator: ~
            - App\InternalDecorator: ~
            - App\TheDecoratedClass: ~
```

See fixtures for the other configuration formats.

See also https://twitter.com/nicolasgrekas/status/1248198573998604288

Todo:
- [x] rebase on top of #36388, #36392 and #36389 once they are merged
- [x] test declaring deeper nested stacks

Commits
-------

98eeeae3d1 [DI] add syntax to stack decorators
2020-04-24 11:12:12 +02:00
Fabien Potencier 9d763e0a93 feature #36545 [DI] fix definition and usage of AbstractArgument (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] fix definition and usage of AbstractArgument

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

Reading https://symfony.com/blog/new-in-symfony-5-1-abstract-service-arguments and the comments there made me realize that the current implementation is not generic enough. Abstract arguments can be found anywhere, not only as service arguments. Also, `AbstractArgument` instances should not convey the key/id since that makes them harder to use in the PHP-DSL.

Commits
-------

abb463c749 [DI] fix definition and usage of AbstractArgument
2020-04-24 10:41:57 +02:00
Fabien Potencier 734a0061e5 feature #28744 [Serializer] Add an @Ignore annotation (dunglas)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Serializer] Add an @Ignore annotation

| Q             | A
| ------------- | ---
| Branch?       | master
 Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #24071
| License       | MIT
| Doc PR        | n/a

Add an `@Ignore` annotation to configure [ignored attributes](https://symfony.com/doc/current/components/serializer.html#ignoring-attributes) in a convenient way, as well as the related XML and YAML loaders.

TODO:

* [x] Add tests

Commits
-------

8526d7c050 [Serializer] Add an @Ignore annotation
2020-04-24 10:37:03 +02:00
Kévin Dunglas 8526d7c050 [Serializer] Add an @Ignore annotation 2020-04-24 10:36:57 +02:00
Fabien Potencier 260dea0387 feature #36456 [String] Add locale-sensitive map for slugging symbols (lmasforne)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] Add locale-sensitive map for slugging symbols

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

By default chars '@' and '&' are respectively replaced by 'at' and 'and' (so limited by enlgish language).
I had an $options arguments to 'slug' method to replace chars with your own logic.

Commits
-------

1331584fa1 [String] Add locale-sensitive map for slugging symbols
2020-04-24 10:33:33 +02:00
Fabien Potencier 719bb15c38 bug #36539 [PhpUnitBridge] fix compatibility with phpunit 9 (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] fix compatibility with phpunit 9

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

See related issue

Commits
-------

e27ed28bae fix compatibility with phpunit 9
2020-04-24 10:28:23 +02:00
Fabien Potencier 259f523010 bug #36555 [Cache] skip APCu in chains when the backend is disabled (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] skip APCu in chains when the backend is disabled

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

I think this should do it.

Commits
-------

5a7208481d [Cache] skip APCu in chains when the backend is disabled
2020-04-24 10:25:10 +02:00
Fabien Potencier ac3bd146a3 feature #36535 [DI] skip preloading dependencies of non-preloaded services (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[DI] skip preloading dependencies of non-preloaded services

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

Suggested by @stof on Slack: this improves preloading by propagating the `container.no_preload` tag to services that are referenced only by not-preloaded services.

The benefit is double:
1. this fixes potential over-preloading
2. this requires less work from the community: no need to add the tag anymore most of the time

As a corollary, listeners of console events are tagged with `container.no_preload` automatically now.

Commits
-------

add867020a [DI] skip preloading dependencies of non-preloaded services
2020-04-24 10:23:03 +02:00
Massimiliano Arione e27ed28bae
fix compatibility with phpunit 9 2020-04-24 09:55:53 +02:00
Fabien Potencier 87c9ab4cbe minor #36556 Use is_file() instead of file_exists() where possible (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Use is_file() instead of file_exists() where possible

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

Thanks to caching, `is_file()` is much faster than `file_exists()`.
I screened the codebase for places where it could matter, here they are.

Commits
-------

f38904ea93 Use is_file() instead of file_exists() where possible
2020-04-24 08:35:01 +02:00
Nicolas Grekas f38904ea93 Use is_file() instead of file_exists() where possible 2020-04-24 00:29:19 +02:00