Commit Graph

48837 Commits

Author SHA1 Message Date
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
Nicolas Grekas
add867020a [DI] skip preloading dependencies of non-preloaded services 2020-04-23 23:57:44 +02:00
Nicolas Grekas
5a7208481d [Cache] skip APCu in chains when the backend is disabled 2020-04-23 23:50:38 +02:00
Nicolas Grekas
abb463c749 [DI] fix definition and usage of AbstractArgument 2020-04-23 22:40:01 +02:00
Nicolas Grekas
ea69f77b70 bug #36523 [Form] apply automatically step=1 for datetime-local input (ottaviano)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] apply automatically step=1 for datetime-local input

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | ~
| License       | MIT
| Doc PR        |

this PR just reapplies the same fix from `TimeType` (https://github.com/symfony/symfony/pull/10777 thanks @tucksaun) to `DateTimeType`.

### before:
```php
'widget' => 'single_text',
'with_seconds' => true,
```
![image](https://user-images.githubusercontent.com/4582866/79972699-a5369500-8496-11ea-8272-d43b68ff49b5.png)

### after:
```php
'widget' => 'single_text',
'with_seconds' => true,
```
![image](https://user-images.githubusercontent.com/4582866/79972801-cbf4cb80-8496-11ea-9af5-b193445b1f1d.png)

Commits
-------

3c24cfecdd [Form] apply automatically step=1 for datetime-local input
2020-04-23 22:22:05 +02:00
Nicolas Grekas
2d7b0b8dad bug #36519 [FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias (weaverryan)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] debug:autowiring: Fix wrong display when using class_alias

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

Imagine that `FooInterface` is an alias, but it is deprecated and so has a `class_alias` to `BarInterface`. Currently, `debug:autowiring` will actually print that's the autowiring alias is `BarInterface`, despite there being no such id in the container.

@nicolas-grekas originally (on purpose) made the 2nd argument to `Descriptor::getClassDescription()` be passed by reference *for* this exact feature - 56aab09b01 - but I can't figure out why. This change (which effectively removes the by-reference modifying) made no existing tests fail.

Discovered this because the whole deprecated`Doctrine\Common\Persistence\ManagerRegistry` vs newer `Doctrine\Persistence\ManagerRegistry` causes the issue.

Thanks!

Commits
-------

d34b437ce0 Fixing a bug where class_alias would cause incorrect items in debug:autowiring
2020-04-23 22:17:53 +02:00
Thomas Calvet
fc6cf3d3c6 [DX] Show the ParseException message in YAML file loaders 2020-04-23 16:16:02 +02:00
Nicolas Grekas
7d55151ff4 [DI] fix lazy factory code generation 2020-04-23 15:09:13 +02:00
Fabien Potencier
bbbf80f60b minor #36546 [Mailer] Add a comment to avoid more wrong PRs on this piece of code (fabpot)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Add a comment to avoid more wrong PRs on this piece of code

| 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       | Numerous bogus PRs <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

444e616f6b [Mailer] Add a comment to avoid more wrong PRs on this piece of code
2020-04-23 14:42:49 +02:00
Fabien Potencier
444e616f6b [Mailer] Add a comment to avoid more wrong PRs on this piece of code 2020-04-23 14:41:43 +02:00
Robin Chalas
83b37e8010 feature #36525 Improve SQS interoperability (jderusse)
This PR was squashed before being merged into the 5.1-dev branch (closes #36525).

Discussion
----------

Improve SQS interoperability

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

The Symfony Messenger component provides a SerializerInterface to encode/decode the `Envelope`, this can be used to improve the Interoperability (see [article from jolicode](https://jolicode.com/blog/symfony-messenger-et-linteroperabilite) (french))

Sadly, the current implementation of SQS adapter json_encode the elements of the `Envelope` (`string body` + `string[] headers`) and store everything in the SQS message `Body`. That partially defect the interoperability: 3rd party have to also wrap (unwrap) message form json_encoded Body.

This PR leverage the AWS SQS `Body` and `MessageAttribute` properties to store message information:

```yaml
# before
SQS Message:
  Body: {"body": "hello world", "headers": {"foo": "bar"}}
  MessageAttributes: {}

# after
SQS Message:
  Body: hello world
  MessageAttributes:
    foor: bar
```

Commits
-------

00d84c125e Improve SQS interoperability
2020-04-23 11:06:03 +02:00
Jérémy Derussé
00d84c125e Improve SQS interoperability 2020-04-23 11:05:32 +02:00
Robin Chalas
f2f82d1e14 minor #36531 [Mailer] Don't dispatch MessageEvent twice (chalasr)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Mailer] Don't dispatch MessageEvent twice

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

Introduced in 829566cdea

Commits
-------

fc4be4822a [Mailer] Don't dispatch MessageEvent twice
2020-04-22 17:47:45 +02:00
Robin Chalas
fc4be4822a [Mailer] Don't dispatch MessageEvent twice 2020-04-22 17:34:22 +02:00
Dimitri Gritsajuk
3c24cfecdd [Form] apply automatically step=1 for datetime-local input 2020-04-22 12:34:32 +02:00
Nicolas Grekas
a2f0bf89d7 minor #36522 [FrameworkBundle] remove getContainer overwrites in tests (Tobion)
This PR was merged into the 5.0 branch.

Discussion
----------

[FrameworkBundle] remove getContainer overwrites in tests

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| Doc PR        |

Since 5.0 the parent implementation throws an exception anyway making the overwrites obsolete, see https://github.com/symfony/symfony/pull/31202

Commits
-------

5ef9390b2f remove getContainer overwrites in tests
2020-04-22 11:08:16 +02:00
Tobias Schultze
5ef9390b2f remove getContainer overwrites in tests
Since 5.0 the parent implementation throws an exception anyway making the overwrites obsolete, see https://github.com/symfony/symfony/pull/31202
2020-04-22 02:36:07 +02:00
Nicolas Grekas
119ba3b742 bug #36454 [DependencyInjection][ServiceSubscriber] Support late aliases (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection][ServiceSubscriber] Support late aliases

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

A service subscriber that references a service that is aliased after optimization passes (after ResolveReferencesToAliasesPass technically) end up being dumped with the real service and not the alias.

I would consider it a bug but @nicolas-grekas told me it's a feature for him, this is why I'm submitting this on master.

@nicolas-grekas, feel free to close this one and open with your solution since you definitely know the subject better.

Commits
-------

24150370c3 [DependencyInjection][ServiceSubscriber] Support late aliases
2020-04-21 23:46:25 +02:00
Fabien Potencier
829566cdea [Mailer] Avoid reusing the same var names 2020-04-21 23:44:24 +02:00
Fabien Potencier
418c8479b0 minor #36509 [OptionsResolver] remove not needed BC layer (xabbuh)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[OptionsResolver] remove not needed BC layer

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

Commits
-------

1452619a52 remove not needed BC layer
2020-04-21 23:43:03 +02:00
Nicolas Grekas
33392442e7 fix merge (ter) 2020-04-21 23:41:31 +02:00
Fabien Potencier
22f1076375 bug #36162 [Profiler] Fix profiler nullable string type (mRoca)
This PR was merged into the 5.0 branch.

Discussion
----------

[Profiler] Fix profiler nullable string type

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

This PR fixes nullable string types in setter for the Profile class.

The detected issue comes from [the Profiler class](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Profiler/Profiler.php#L149) :

```php
$profile->setIp($request->getClientIp()); // string or null
```

The corresponding return types for the Profile getters are allready good:
```php
    /**
     * Returns the IP.
     *
     * @return string|null The IP
     */
    public function getIp()
    {
        return $this->ip;
    }
```

Commits
-------

b5d406117d Fix profiler nullable string type
2020-04-21 23:40:38 +02:00
Nicolas Grekas
7ff6fb0b21 fix merge (bis) 2020-04-21 23:40:12 +02:00
Nicolas Grekas
5105062e7a fix merge 2020-04-21 23:38:17 +02:00
Nicolas Grekas
670e601d19 Merge branch '5.0'
* 5.0:
  fix merge
2020-04-21 23:19:50 +02:00
Nicolas Grekas
ebc90fb0c5 Merge branch '4.4' into 5.0
* 4.4:
  fix merge
2020-04-21 23:19:41 +02:00
Nicolas Grekas
15d2b77632 fix merge 2020-04-21 23:19:23 +02:00
Nicolas Grekas
7ce2f2401a Merge branch '5.0'
* 5.0:
  [FrameworkBundle] Fix session.attribute_bag service definition
  [Routing] Remove unused properties from the Route annotation
  [Routing] Add missing _locale requirements
  Update LdapBindAuthenticationProvider.php
  Add reproducer to for hit after update expire cacheItem
  [Cache] fix FilesystemTagAwareAdapter failing when a tag link preexists
2020-04-21 23:06:40 +02:00
Nicolas Grekas
4042cc49d1 Merge branch '4.4' into 5.0
* 4.4:
  [FrameworkBundle] Fix session.attribute_bag service definition
  [Routing] Remove unused properties from the Route annotation
  [Routing] Add missing _locale requirements
  Update LdapBindAuthenticationProvider.php
  Add reproducer to for hit after update expire cacheItem
  [Cache] fix FilesystemTagAwareAdapter failing when a tag link preexists
2020-04-21 23:02:50 +02:00
Nicolas Grekas
0ed6cfd412 Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Fix session.attribute_bag service definition
  Update LdapBindAuthenticationProvider.php
2020-04-21 23:01:55 +02:00
Nicolas Grekas
08ded7fed6 bug #36498 [Security/Core] fix escape for username in LdapBindAuthenticationProvider.php (stoccc)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] fix escape for username in LdapBindAuthenticationProvider.php

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

I think that when we call `ldap_search()` as definitely it will do the `$this->ldap->query()` call, the proper filter applied should be `LdapInterface::ESCAPE_FILTER` as documented in
https://www.php.net/manual/en/function.ldap-escape.php while `LdapInterface::ESCAPE_DN` should be used for `dn` only

This simple change should fix, I'm sorry if I'm wrong.

Commits
-------

4bda68a9a2 Update LdapBindAuthenticationProvider.php
2020-04-21 22:51:56 +02:00
Nicolas Grekas
6642f09053 bug #36506 [FrameworkBundle] Fix session.attribute_bag service definition (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix session.attribute_bag service definition

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

It looks like in https://github.com/symfony/symfony/pull/36063, the fact the the `getAttributeBag` method is private was forgotten. It cannot be used as the factory method. I guess we can make it public. Should it maybe marked `@internal`?

Commits
-------

76072c6424 [FrameworkBundle] Fix session.attribute_bag service definition
2020-04-21 22:46:18 +02:00