This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Defaults to public=false in all service config files
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is what we call "eating your own dog food" :)
Made me realize that we need a tweak to the defaults<>ChildDefinition conflict we have now:
tags should be applied, and there should be *no* conflict when everything is set *explicitly* on the child definition.
Commits
-------
0656284f7f [DI] Defaults to public=false in all service config files
This PR was merged into the 3.2 branch.
Discussion
----------
[EventDispatcher] fix merge of #22541 from 2.8
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This cleans up a test case that was merged from 2.8 into 3.2 here: 824dc8ba5f
@fabpot due to different implementations I created 2 PR's:
2.8: https://github.com/symfony/symfony/pull/22541
3.2: https://github.com/symfony/symfony/pull/22568
So the 2.8 merge into 3.2 of my change-set introduced some unused variable `$isWrapped` here: 824dc8ba5f (diff-af3c4fbca8bb77957c00087543ae5a4dR113)
This PR just cleans it up and also removes the data provider 😉
Commits
-------
f67eba8 [EventDispatcher] fix merge of #22541 from 2.8
This PR was merged into the 2.7 branch.
Discussion
----------
[appveyor] Run the test suite on PHP 7.1
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
a537d6c [appveyor] Run the test suite on PHP 7.1
This PR was merged into the 3.2 branch.
Discussion
----------
[appveyor][3.x] Run the test suite on PHP 7.1
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | let's see
| Fixed tickets | #22556
| License | MIT
| Doc PR | -
Commits
-------
51b82f5 [appveyor][3.x] Run the test suite on PHP 7.1
* 3.2:
fixed tests
fixed merge
Fix minor phpdoc mismatches with the code(detected by phan)
[Asset] Starting slash should indicate no basePath wanted
[Security] Fix phpdoc logout listener
[EventDispatcher] fix getting priorities of listeners during dispatch
Add iconv extension to suggested dependencies
Fix minor typo in the main README.md
Allow Upper Case property names in ObjectNormalizer
[EventDispatcher] fix: unwrap listeners for correct info
* 2.8:
Fix minor phpdoc mismatches with the code(detected by phan)
[Asset] Starting slash should indicate no basePath wanted
[Security] Fix phpdoc logout listener
Add iconv extension to suggested dependencies
Fix minor typo in the main README.md
Allow Upper Case property names in ObjectNormalizer
[EventDispatcher] fix: unwrap listeners for correct info
* 2.7:
Fix minor phpdoc mismatches with the code(detected by phan)
[Asset] Starting slash should indicate no basePath wanted
[Security] Fix phpdoc logout listener
Fix minor typo in the main README.md
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Profiler] DataCollector: Remove unused static property
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Unless I missed something, any usage of this property were removed in https://github.com/symfony/symfony/pull/21638.
Commits
-------
96743e69ad [Profiler] DataCollector: Remove unused static property
This PR was merged into the 3.3-dev branch.
Discussion
----------
Making tags under _defaults always apply
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22497
| License | MIT
| Doc PR | n/a
Obviously, things under `_defaults` are applied to all services in that file. However, tags was an exception: it was *not* applied unless you have `inherit_tags`. The correct behavior is subjective, but after talking about it today, we (mostly) decided that tags *should* always apply. This does exactly that.
One side-effect (explained in the commit message) is that if you have a parent and child service both in the same file, the tag from `_defaults` is applied twice. I think that makes sense, and at some point, we can't protect the users from their own configuration :). This kind of "weird" behavior is likely not a problem, as compiler passes now handle multiple tags well AND it only affects a case where the user has added tags to `_defaults` *and* is using parent-child definitions. That's quite a strange mixture of conditions :).
Cheers!
Commits
-------
037a782b91 Making tags under _defaults always apply and removing inherit_tags entirely
Now that inherit_tags has been removed, 3.3 has the same functionality as 3.2: tags
are *never* cascaded from parent to child (but you tags do inherit from defaults
to a service and instanceof to a service).
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Lock] remove the component from 3.3
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22580
| License | MIT
| Doc PR | n/a
As decided in #22580, we will read the Lock component in 3.4.
Commits
-------
37ec869511 [Lock] remove the component from 3.3
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Security] json login listener: ensure a json response is sent on bad request
| Q | A
| ------------- | ---
| Branch? | master (3.3)
| Bug fix? | yesish
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
I would have simply recommended to set the proper format when declaring the route:
```yml
# routing.yml
api_login:
path: /login
defaults: { _format: json }
```
but, since https://github.com/symfony/symfony/pull/22477 has been merged, and considering https://github.com/symfony/symfony/pull/22477#issuecomment-295897629:
> my point above regarding checking the content type is so that one could use form_login and json_login in parallel on the same routes and within the same firewall
we may consider setting the request format to json when throwing the `BadRequestHttpException`, so used conjointly with the TwigBundle, the exception is rendered using the `exception.json.twig` template.
ping @lsmith77
(An alternative would be to check the Accept header to set the request format to json if it's the preferred one instead of doing it each time we throw the exception. But Symfony never used such content negotiation AFAIK, and I think it's safe enough to assume someone sending json is expecting json as ouput for exceptions.)
Commits
-------
4427cf9157 [Security] json login listener: ensure a json response is sent on bad request
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Fix invalid callables dumped for ArgumentInterface objects
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Follow up of #22511, from @iltar:
> Currently, when having a service definition which has more than 1 usage of that service, it will put the argument in `$a` for example. By doing so, it will also use `$a` in the callable of the `ServiceLocator`, which result in an undefined variable `$a`.
> I managed to trigger this with the translator service, where I have my own loader, that I add for NL and EN, causing 2 method calls to turn the direct getter into a variable. I've added 2 test cases, 1 with only 1 method call and 1 with 2 method calls.
Commits
-------
f81c577 [DI] Test references inside ServiceLocator are not inlined
8783602 [DI] Fix invalid callables dumped for ArgumentInterface objects