Commit Graph

25229 Commits

Author SHA1 Message Date
Jakub Zalas
00acb37205
[Intl] Update ICU data to 59.1 2017-05-03 19:20:02 +01:00
Nicolas Grekas
0656284f7f [DI] Defaults to public=false in all service config files 2017-05-03 19:24:51 +02:00
Nicolas Grekas
9190e108c1 [Config] Fix resource tracking with new GlobResource 2017-05-03 15:21:08 +02:00
maryo
9c08109739 Fix incorrectly calling PHP process on Windows when path contains space 2017-05-03 02:32:32 +02:00
rubenrua
49ea93a23c [Validator] Update Galician (gl) translations 2017-05-02 18:40:49 +02:00
rubenrua
0269f9d422 [FrameworkBundle] Fix "Locale class not found" in AboutCommand 2017-05-02 18:27:29 +02:00
Nicolas Grekas
0c704cf76a minor #22602 [EventDispatcher] fix merge of #22541 from 2.8 (dmaicher)
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
2017-05-02 11:20:19 +02:00
Fabien Potencier
85e2d2f91d bumped Symfony version to 3.3.0 2017-05-01 11:49:34 -07:00
David Maicher
f67eba863c [EventDispatcher] fix merge of #22541 from 2.8 2017-05-01 20:34:19 +02:00
Fabien Potencier
b3937618a6 updated VERSION for 3.3.0-BETA1 2017-05-01 11:30:25 -07:00
Fabien Potencier
da26b3f32f bumped Symfony version to 3.2.9 2017-05-01 11:00:12 -07:00
Fabien Potencier
e3133489bc updated VERSION for 3.2.8 2017-05-01 10:46:48 -07:00
Fabien Potencier
1f1b5d4f9e bumped Symfony version to 2.8.21 2017-05-01 10:40:16 -07:00
Fabien Potencier
db017ebba2 updated VERSION for 2.8.20 2017-05-01 09:14:16 -07:00
Fabien Potencier
0e9a243bba bumped Symfony version to 2.7.28 2017-05-01 09:13:24 -07:00
Fabien Potencier
161bed58be updated VERSION for 2.7.27 2017-05-01 09:01:24 -07:00
Fabien Potencier
33d4bce1f9 Merge branch '3.2'
* 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
2017-05-01 08:01:29 -07:00
Fabien Potencier
c7a7170e0e fixed tests 2017-05-01 07:58:48 -07:00
Fabien Potencier
9c610ee1a2 fixed merge 2017-05-01 07:56:26 -07:00
Fabien Potencier
824dc8ba5f Merge branch '2.8' into 3.2
* 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
2017-05-01 07:55:58 -07:00
Fabien Potencier
6000fafa27 Merge branch '2.7' into 2.8
* 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
2017-05-01 07:31:55 -07:00
Fabien Potencier
3c9a7e4dc5 minor #22591 [Profiler] DataCollector: Remove unused static property (ogizanagi)
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
2017-05-01 07:29:48 -07:00
Ryan Weaver
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).
2017-05-01 09:36:02 -04:00
Maxime Steinhausser
96743e69ad [Profiler] DataCollector: Remove unused static property 2017-04-30 18:37:23 +02:00
Fabien Potencier
37ec869511 [Lock] remove the component from 3.3 2017-04-30 08:55:30 -07:00
Christophe Coevoet
82a6a35446 bug #22585 [Security] json login listener: ensure a json response is sent on bad request (ogizanagi)
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
2017-04-30 14:43:24 +02:00
Maxime Steinhausser
4427cf9157 [Security] json login listener: ensure a json response is sent on bad request 2017-04-30 11:12:10 +02:00
Iltar van der Berg
f81c57755d [DI] Test references inside ServiceLocator are not inlined 2017-04-29 20:26:40 +02:00
Nicolas Grekas
8783602946 [DI] Fix invalid callables dumped for ArgumentInterface objects 2017-04-29 20:26:39 +02:00
Roland Franssen
2967807b14 [Security] Avoid unnecessary route lookup for empty logout path 2017-04-29 20:08:02 +02:00
Robin Chalas
b6948ddb34 Fix tests 2017-04-29 19:49:33 +02:00
Fabien Potencier
8872833c5d feature #22527 [DI] Throw useful exception on bad XML argument tags (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Throw useful exception on bad XML argument tags

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22525
| License       | MIT
| Doc PR        | -

I still think that the feature request in #22525 would make things better.
But at least, let's make thing fail loudly, instead of silently today, with the associated usual wtfs :)

Commits
-------

91828ecd17 [DI] Throw useful exception on bad XML argument tags
2017-04-29 09:33:57 -07:00
Nicolas Grekas
91828ecd17 [DI] Throw useful exception on bad XML argument tags 2017-04-29 18:31:27 +02:00
Fabien Potencier
c84ee65b99 minor #22453 Fix minor phpdoc mismatches with the code(detected by phan) (TysonAndre)
This PR was squashed before being merged into the 2.7 branch (closes #22453).

Discussion
----------

Fix minor phpdoc mismatches with the code(detected by phan)

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | no

Fix minor mismatches between phpdoc and the type of the code itself, detected by etsy/phan (Prevent confusion in the future)
The actual return types of a few functions have changed from int to bool where preg_match or `&` was used.
Fix optional param before required param in src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

The config used and the rest of the output is at https://gist.github.com/TysonAndre/91bed0e16583301f1e6e5cc2a4807081 (Uses some patches to etsy/phan that weren't merged to master yet)

Commits
-------

12f1239565 Fix minor phpdoc mismatches with the code(detected by phan)
2017-04-29 08:58:47 -07:00
Tyson Andre
12f1239565 Fix minor phpdoc mismatches with the code(detected by phan) 2017-04-29 08:58:46 -07:00
Fabien Potencier
35608f57d5 minor #22477 [Security] add Request type json check in json_login (lsmith77)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] add Request type json check in json_login

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no, unreleased feature
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

follow up to https://github.com/symfony/symfony/pull/22425 to limit the `UsernamePasswordJsonAuthenticationListener` to only requests with appropriate JSON content type.

I am not entirely happy with this implementation but mostly because Symfony out of the box only provides very limited content type negotiation. I guess anyone that wants to tweak the content negotiation will simply need to ensure the Request::$format is set accordingly before the code is triggered.

Commits
-------

045a36b303 add Request type json check in json_login
2017-04-29 08:53:46 -07:00
Fabien Potencier
5863e4b6a1 minor #22555 [Serializer] Add missing normalizer options constants (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Serializer] Add missing normalizer options constants

| Q             | A
| ------------- | ---
| Branch?       | master (3.3)
| Bug fix?      | not really
| New feature?  | yesish, but for 3.3 as those options were added on this branch and not released yet
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22537#discussion_r113719848
| License       | MIT
| Doc PR        | N/A

As seen in https://github.com/symfony/symfony/pull/22537#discussion_r113719848.

@dunglas : I'm not sure about the exposing the `key_type` option as a constant in `ArrayDenormalizer`/`AbstractObjectNormalizer`, as it looks more or less like a detail of the AbstractObjectNormalizer implementation, but anyway it should be in 3.2 if we add it, so I haven't included it here.
However, I wonder if this option shouldn't directly accept a string too, rather than just a `Symfony\Component\PropertyInfo\Type` instance if we want to consider this option "public"?

Commits
-------

b0c414f2c8 [Serializer] Add missing normalizer options constants
2017-04-29 08:51:18 -07:00
Fabien Potencier
1cef186dfe feature #22537 [Serializer] Allow to pass csv encoder options in context (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Serializer] Allow to pass csv encoder options in context

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

CSV contents typically are provided by one or many third-parties, not always allowing you to get control over the provided format. In case you need to import csv files with different formats, either you have to instantiate a decoder yourself/inject it instead of the main serializer instance, either you need another serializer instance with a differently configured csv encoder registered within.

This PR allows to configure any encoder option through the context, so you can keep injecting and using the same serializer instance.

Commits
-------

10a76aac15 [Serializer] Allow to pass csv encoder options in context
2017-04-29 08:50:00 -07:00
Fabien Potencier
07fc0602e1 bug #22550 Allow Upper Case property names in ObjectNormalizer (insekticid)
This PR was merged into the 2.8 branch.

Discussion
----------

Allow Upper Case property names in ObjectNormalizer

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22547
| License       | MIT

Same problem that has been fixed here https://github.com/symfony/symfony/pull/22265
and here https://github.com/api-platform/core/pull/1037

ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible

```php
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```

Commits
-------

b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
2017-04-29 08:44:59 -07:00
Fabien Potencier
460fcbf23b bug #22569 [Security] Handle bad request format in json auth listener (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] Handle bad request format in json auth listener

| Q             | A
| ------------- | ---
| Branch?       | master (3.3)
| Bug fix?      | yesish
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

In https://github.com/symfony/symfony/pull/22034, I wondered myself if we shouldn't throw a dedicated exception to handle bad formatted requests and give more inputs to the client by returning a 400 response with an explicit message.

~~Here is a suggestion, introducing a new `BadRequestFormatException` and using it in `UsernamePasswordJsonAuthenticationListener` whenever there is no custom failure handler set (but someone using its own handler should be able to treat the failure properly too).~~

As discussed with @chalasr , it seems better to directly throw a `BadRequestHttpException` as it's actually out of the whole security process. PR updated.

Commits
-------

93a8cb9cd4 [Security] Handle bad request format in json auth listener
2017-04-29 08:39:09 -07:00
Fabien Potencier
288d55f620 bug #22551 [Process] Ecaping of CLI arguments containing slashes on Windows (maryo)
This PR was squashed before being merged into the 3.3-dev branch (closes #22551).

Discussion
----------

[Process] Ecaping of CLI arguments containing slashes on Windows

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22549
| License       | MIT

Actually only the first argument - the command needs to be escaped but that would need another condition. I think it should be OK.

Commits
-------

0d073128de [Process] Ecaping of CLI arguments containing slashes on Windows
2017-04-29 08:36:13 -07:00
maryo
0d073128de [Process] Ecaping of CLI arguments containing slashes on Windows 2017-04-29 08:36:12 -07:00
Fabien Potencier
89979ca1eb feature #22563 Not allowing autoconfigure, instanceofConditionals or defaults for ChildDefinition (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Not allowing autoconfigure, instanceofConditionals or defaults for ChildDefinition

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes (removing risky behavior)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see #22530
| License       | MIT
| Doc PR        | n/a

This PR *prohibits* using `autoconfigure`, `_instanceof` and `_defaults` for ChildDefinition.

Additionally, I added many "integration" test cases: we need to test and prove all edge cases. These are in the `integration/` directory: the `main.yml` file is parsed and compared to `expected.yml`. Both are in YAML to ease comparing the before/after. We need to check these out and make sure they're right and we're not missing anything else.

This PR removes MANY of the "wtf" cases, but there are still 4 that I know of... and of course they all deal with parent-child stuff :).

A) [MAJOR] [autoconfigure_parent_child_tags](https://github.com/symfony/symfony/pull/22563/files#diff-fd6cf15470c5abd40156e4e7dc4e7f6d) `instanceof` tags from autoconfigure are NEVER applied to the child (you can't set `autoconfigure` directly on a Child, but you still can set it on a parent and inherit it... sneaky). We could throw an Exception I suppose to prevent this `autoconfigure` from cascading from parent to child... but it's tricky due to `instanceof`.

B( [MAJOR] [instanceof_parent_child](https://github.com/symfony/symfony/pull/22563/files#diff-14666e9a25322d44b3c2c583b6814dc2) `instanceof` tags that are applied to the parent, are not applied to the child. Again, you can't set `instanceof` directly on a Child, but you *can* set it on a parent, and have that cascade to the child. Like before, we could maybe throw an exception to prevent this.

C) [MINOR] ([autoconfigure_child_not_applied](https://github.com/symfony/symfony/pull/22563/files#diff-3372a1dcaf3af30d14a7d0a6c8bfa988))  automatic `instanceof` will not be applied to the child when the parent class has a different (non-instanceof-ed) class. If we could throw an exception for (A), then it would cover this too.

D) `_tags` from defaults are never used (unless you have inherit_tags) - fixed in #22530

A, B & C are effectively caused by there being a "sneaky" way to re-enable `autoconfigure` and `instanceof` for ChildDefinition... which opens up wtf cases.

## Wait, why not support `_defaults`, `autoconfigure` and `_instanceof` for child definitions?

1 big reason: reduction of wtf moments where we arbitrarily decide override logic. PLUS, since `_defaults`, `instanceof` and `autoconfigure` *are* applied to parent definitions, in practice (other than tags), this makes no difference: the configuration will still pass from parent down to child.

Also, using parent-child definitions is already an edge case, and this *simply* prevents *just* those services from using the new features.

## Longer reasons why

The reason behind this is that parent-child definitions are a different mechanism for "inheritance"
than `_instanceof` and `_defaults`... creating some edge cases when trying to figure out which settings "win". For example:

```yml
# file1.yml
services:
    _defaults:
        public: false

    ChildService:
        parent: parent_service

# file2.yml
services:
    _defaults:
        public: true

    ParentService: ~
```

Is `ChildDefinition` `public: true` (so the parent
overrides the child, even though it only came from _defaults) or `public: false` (where
the child wins... even though it was only set from its _defaults)?

Or, if ParentService is explicitly set to `public: true`, should that override the `public: false` of ChildService (which it got from its `_defaults`)? On one hand, ParentService is being explicitly
set. On the other hand, ChildService is explicitly in a file settings `_defaults` `public: false`
There's no correct answer.

There are also problems with `_instanceof`. The importance goes:

> defaults < instanceof < service definition

But how do parent-child relationships fit into that? If a child has public: false
from an _instanceof, but the parent explicitly sets public: true, which wins? Should
we assume the parent definition wins because it's explicitly set? Or would the
_instanceof win, because that's being explicitly applied to the child definition's
class by an _instanceof that lives in the same file as that class (whereas the parent
definition may live in a different file).

Because of this, @nicolas-grekas and I (we also talked a bit to Fabien) decided that
the complexity was growing too much. The solution is to not allow any of these
new feature to be used by ChildDefinition objects. In other words, when you want some
sort of "inheritance" for your service, you should *either* giving your service a
parent *or* using defaults and instanceof. And instead of silently not applying
defaults and instanceof to child definitions, I think it's better to scream that it's
not supported.

Commits
-------

a943b96d42 Not allowing autoconfigure, instanceofConditionals or defaults for ChildDefinition
2017-04-29 08:25:33 -07:00
Fabien Potencier
8806628d43 bug #22579 [Console][HttpKernel] Avoid reflection-based registration for command public services (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console][HttpKernel] Avoid reflection-based registration for command public services

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22410#issuecomment-298158585
| License       | MIT
| Doc PR        | n/a

By mapping commands ids by their alias in `console.command.ids` (even if the alias is not registered in the container for public services), then skipping reflection if the predictable alias exists as a key of `console.command.ids`.

Please note that the whole command service registration process is far from ideal.
I'm working on changing this for 3.4 in a transparent way regarding end users, leveraging PSR-11 to make the console component DI friendly, allowing to register commands as true private services (no more public aliases) and providing laziness for those.

Commits
-------

6c1b384b75 Avoid reflection-based registration for command public services
2017-04-29 08:24:25 -07:00
Christophe Coevoet
ceabf11b64 bug #22564 Fixing problem where _defaults set to null was seen as a service (weaverryan)
This PR was squashed before being merged into the 3.3-dev branch (closes #22564).

Discussion
----------

Fixing problem where _defaults set to null was seen as a service

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

```yml
services:
    _defaults:
```

If you leave `_defaults` empty (i.e. null), you got a bad error before. Now it's better :)

Before:
>The definition for "_defaults" has no class. If you intend to inject this service dynamicall
  y at runtime, please mark it as synthetic=true. If this is an abstract definition solely use
  d by child definitions, please add abstract=true, otherwise specify a class to get rid of th
  is error.

After:
> Service "_defaults" key must be an array, "NULL" given in "/path/to/services.yml"

Commits
-------

4b7e148a9b Fixing problem where _defaults set to null was seen as a service
2017-04-29 12:32:06 +02:00
Ryan Weaver
4b7e148a9b Fixing problem where _defaults set to null was seen as a service 2017-04-29 12:32:04 +02:00
Robin Chalas
6c1b384b75 Avoid reflection-based registration for command public services 2017-04-29 11:46:23 +02:00
Fabien Potencier
c669b88403 bug #22528 [Asset] Starting slash should indicate no basePath wanted (weaverryan)
This PR was squashed before being merged into the 2.7 branch (closes #22528).

Discussion
----------

[Asset] Starting slash should indicate no basePath wanted

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes-ish... and no-ish
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

**Important** View the second commit for an accurate diff. The first commit just renames some strings in a test for clarity.

When we moved `PathPackage` from `Templating` to `Asset`, we actually changed its behavior. Assume that we're deployed under a `/subdir` subdirectory:

**Before** `{{ asset('/main.css') }}` would *not* have the base path prefixed -> `/main.css`

**After** `{{ asset('/main.css') }}` *does* have the base path prefixed -> `/subdir/main.css`

3adff11d72/src/Symfony/Component/Templating/Asset/PathPackage.php (L61-L63)

This PR simply reverses that, to the *previous* behavior. This *is* a BC break... and also arguably a bug fix :). Interestingly, when we changed the behavior the first time (i.e. broke BC), I don't think that anyone noticed. It should only affect users deployed under a subdirectory.

Why do I care? I'm using the new `JsonManifestVersionStrategy` with a library that is outputting paths that *already* include my subdirectory:

```json
{
    "build/main.css": "/subdir/build/main.abc123.css"
}
```

So, I do not want Symfony to detect the `/subdir` and apply it a second time.

Commits
-------

3cc096b540 [Asset] Starting slash should indicate no basePath wanted
2017-04-28 16:08:26 -07:00
Ryan Weaver
3cc096b540 [Asset] Starting slash should indicate no basePath wanted 2017-04-28 16:08:24 -07:00
Ryan Weaver
a943b96d42 Not allowing autoconfigure, instanceofConditionals or defaults for ChildDefinition
Also, not allowing arguments or method calls for autoconfigure. This is a safety
mechanism, since we don't have merging logic. It will allow us to add this in the
future if we want to.

The reason is that parent-child definitions are a different mechanism for "inheritance"
than instanceofConditionas and defaults... creating some edge cases when trying to
figure out which settings "win". For example:

Suppose a child and parent definitions are defined in different YAML files. The
child receives public: false from its _defaults, and the parent receives public: true
from its _defaults. Should the final child definition be public: true (so the parent
overrides the child, even though it only came from _defaults) or public: false (where
the child wins... even though it was only set from its _defaults). Or, if the parent
is explicitly set to public: true, should that override the public: false of the
child (which it got from its _defaults)? On one hand, the parent is being explicitly
set. On the other hand, the child is explicitly in a file settings _defaults public
to false. There's no correct answer.

There are also problems with instanceof. The importance goes:
  defaults < instanceof < service definition

But how does parent-child relationships fit into that? If a child has public: false
from an _instanceof, but the parent explicitly sets public: true, which wins? Should
we assume the parent definition wins because it's explicitly set? Or would the
_instanceof win, because that's being explicitly applied to the child definition's
class by an _instanceof that lives in the same file as that class (whereas the parent
definition may live in a different file).

Because of this, @nicolas-grekas and I (we also talked a bit to Fabien) decided that
the complexity was growing too much. The solution is to not allow any of these
new feature to be used by ChildDefinition objects. In other words, when you want some
sort of "inheritance" for your service, you should *either* giving your service a
parent *or* using defaults and instanceof. And instead of silently not applying
defaults and instanceof to child definitions, I think it's better to scream that it's
not supported.
2017-04-28 17:09:21 -04:00
Ryan Weaver
ab0fd6e663 If a (non-global) instanceof does not exist, throw an exception 2017-04-28 14:07:50 -04:00
Roland Franssen
e843924c03 [Security] Fix phpdoc logout listener 2017-04-28 10:36:25 -07:00
Pierre Rineau
3cb2e5b7dd Fixes twig bundle project root dir discovery 2017-04-28 10:16:50 -07:00
Maxime Steinhausser
93a8cb9cd4 [Security] Handle bad request format in json auth listener 2017-04-28 14:46:31 +02:00
David Maicher
79b71c069d [EventDispatcher] fix getting priorities of listeners during dispatch 2017-04-28 13:59:53 +02:00
Julien Falque
13f17079ef
Add iconv extension to suggested dependencies 2017-04-28 08:26:40 +02:00
Maxime Steinhausser
b0c414f2c8 [Serializer] Add missing normalizer options constants 2017-04-27 17:51:26 +02:00
Nicolas Grekas
9d9f628d92 minor #22531 Throwing an exception if the class is not found (weaverryan)
This PR was squashed before being merged into the 3.3-dev branch (closes #22531).

Discussion
----------

Throwing an exception if the class is not found

| 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

We now throw an exception if the user makes a mistake with their PSR-4 prefix and namespace. For example:

```yml
AppBundle\Controller\:
    resource: '../../src/AppBundle/{Controller}'
    public: true
```

I should not have the `\Controller` at the end of the key. Previously, it would silently not import any services from the directory. Now it throws:

> Expected to find class "AppBundle\Controller\Controller\Admin\BlogController" in file "/path/to/project/src/AppBundle/Controller/Admin/BlogController.php" while importing services from resource "../../src/AppBundle/{Controller}", but it was not found! Check the namespace prefix used with the resource.

The only "downside" is that this prevents someone from importing files from a resource that has a file with no class in it (`functions.php`). @nicolas-grekas and I decided today that we can throw an exception now to be safe, and see if anyone has that valid use-case.

Cheers!

Commits
-------

e85bcc9 Throwing an exception if the class is not found
2017-04-27 10:37:41 -04:00
Ryan Weaver
e85bcc9e8d Throwing an exception if the class is not found 2017-04-27 10:37:33 -04:00
insekticid
b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
| Q                | A
| ---------------- | -----
| Bug report?      | yes
| Feature request? | no
| BC Break report? | yes
| RFC?             | no
| Symfony version  | 2.8.19

Same problem that has been fixed here https://github.com/symfony/symfony/pull/22265
and here https://github.com/api-platform/core/pull/1037

ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible

```php
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```
2017-04-27 14:34:21 +02:00
Roland Franssen
dc375794a5 [FrameworkBundle] Remove deprecated session listener from class compilation 2017-04-27 12:05:49 +02:00
Lesnykh Ilia
2fa1628743
Fix misprint. 2017-04-27 10:47:28 +03:00
Fabien Potencier
b11822640a bug #22481 [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata

| 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        | -

I tried updating a Sonata project to 3.3, and found it broken.
The issue is that Sonata uses the constructor arguments of the `form.extension` to create its own `form.extension` service - but borrows its first args from the Symfony one.

Here is the form pass doing that:
https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/Compiler/FormFactoryCompilerPass.php
And the implementation of the form extension:
https://github.com/sonata-project/SonataCoreBundle/blob/3.x/DependencyInjection/SonataCoreExtension.php

Question: is this covered by the BC policy? It shouldn't to me, because that would prevent *any* service reconfiguration.

Thus, I'm proposing the attached patch, which basically reverts the deprecated `FormPass` in FrameworkBundle to its 3.2 state.

I added a check to the new `FormPass` in the Form component so that it doesn't overwrite such compatibility configurations.

See for corresponding fix on https://github.com/sonata-project/SonataCoreBundle/pull/399

Commits
-------

c97b08e6c0 [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata
2017-04-26 13:20:29 -04:00
Fabien Potencier
0257013308 minor #22475 [SecurityBundle] Enhance FirewallContext::getListeners() (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] Enhance FirewallContext::getListeners()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20417#discussion_r91704023, https://github.com/symfony/symfony/pull/20417#discussion_r91704145
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I think @stof is right.. and the fact we can do this on master currently without the hassle.

cc @chalasr

Commits
-------

ba650783f5 [SecurityBundle] Enhance FirewallContext::getListeners()
2017-04-26 13:18:04 -04:00
David Maicher
d8c5869b7c [EventDispatcher] fix: unwrap listeners for correct info 2017-04-26 18:56:54 +02:00
Nicolas Grekas
0085a07acb Merge branch '3.2'
* 3.2:
  [Asset] Fix invalid assets.xml
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:43 -04:00
Nicolas Grekas
eb1e27737e Merge branch '2.8' into 3.2
* 2.8:
  [Asset] Fix invalid assets.xml
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:18 -04:00
Nicolas Grekas
1bee0adef1 Merge branch '2.7' into 2.8
* 2.7:
  Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 10:23:06 -04:00
Maxime Steinhausser
10a76aac15 [Serializer] Allow to pass csv encoder options in context 2017-04-26 16:04:52 +02:00
Fabien Potencier
345b8c287a minor #22529 [Asset] Fix invalid assets.xml (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Asset] Fix invalid assets.xml

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Fixes invalid xml definitions.

Commits
-------

de1b20ac58 [Asset] Fix invalid assets.xml
2017-04-26 08:53:26 -04:00
Fabien Potencier
fc1fe8decf bug #22526 [Asset] Preventing the base path or absolute URL from being prefixed incorrectly (weaverryan)
This PR was merged into the 2.7 branch.

Discussion
----------

[Asset] Preventing the base path or absolute URL from being prefixed incorrectly

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Fixes an edge case (which I need) where the version strategy returns an absolute URL. Currently, if this happens, the baseUrl or basePath is prefixed - giving `https://baseurl.com/https://pathreturnedfromversioning.com` or `/basePath/https://pathreturnedfromversioning.com`.

I don't see any reason to prevent an absolute URL from being returned by the version strategy. And it's not a BC break, because the previous paths that were returned were nonsense.

Cheers!

Commits
-------

746c91eea4 Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
2017-04-26 08:47:35 -04:00
Robin Chalas
cf6110225f Do not extend @final SessionListener internally 2017-04-26 14:32:32 +02:00
Nicolas Grekas
de1b20ac58 [Asset] Fix invalid assets.xml 2017-04-25 21:58:43 -04:00
Nicolas Grekas
8701cae777 Merge branch '3.2'
* 3.2:
  Fixed the flickering when loading complex profiler panels
  [Console] Fix bar width with multilines ProgressBar's format
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:46:15 -04:00
Nicolas Grekas
8a8d92d793 Merge branch '2.8' into 3.2
* 2.8:
  Fixed the flickering when loading complex profiler panels
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:39:17 -04:00
Nicolas Grekas
3adff11d72 Merge branch '2.7' into 2.8
* 2.7:
  [DI] Add missing check in PhpDumper
  [Serializer] XmlEncoder: fix negative int and large numbers handling
  [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 21:38:53 -04:00
Fabien Potencier
00a33dd360 feature #22441 [Console] Review console.ERROR related behavior (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Review console.ERROR related behavior

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This PR is a follow up of #18140 that I wanted to do since a few weeks.
It enhances this work with fixes and behavior changes.
It embeds #22435 and resolves issues like the one described in #20808.

- makes ConsoleErrorEvent *not* extend the deprecated ConsoleExceptionEvent
- replace ConsoleErrorEvent::markErrorAsHandled by ConsoleErrorEvent::setExitCode
- triggers the deprecation in a more appropriate moment
- renames ExceptionListener to ErrorListener
- tweaks the behavior in relation to  #22435

Commits
-------

a7c67c9ab2 [Console] Review console.ERROR related behavior
2017-04-25 21:33:28 -04:00
Ryan Weaver
746c91eea4 Preventing the base path or absolute URL from being prefixed incorrectly on an absolute URL
If the version strategy returns an absolute URL, that should be the final URL.
2017-04-25 21:08:25 -04:00
Nicolas Grekas
d696b391a1 bug #22465 [Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache

| 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        | -

Right now, TraceableAdapter and TraceableCache both keep all fetched values.
This exhaustive reporting is too much data gathering to me.
Here is a PR that keeps only true/false for each hit/miss + all corresponding keys.
That can still be a lot of data (one item per fetched key) - but a bit better.
Should we go further in stats-only gathering? Or should we *not* do this and keep collecting *all* the values?
The PR also fixes "Traversable" handling.

ping @Nyholm

The profiler panel still works (although breaking lines in the middle of words is strange, but this is the profiler's CSS, nothing special to this specific case).

![capture du 2017-04-19 11-40-13](https://cloud.githubusercontent.com/assets/243674/25173586/f9615dd6-24f4-11e7-8d6f-36fb2437c3b6.png)

Commits
-------

0c73c5d [Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache
2017-04-25 13:35:31 -04:00
Nicolas Grekas
97747808b2 minor #22498 [DI] Add missing check in PhpDumper (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Add missing check in PhpDumper

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

5cabf88 [DI] Add missing check in PhpDumper
2017-04-25 11:08:04 -04:00
Javier Eguiluz
e9132b3445 Fixed the flickering when loading complex profiler panels 2017-04-25 16:22:01 +02:00
Nicolas Grekas
a7c67c9ab2 [Console] Review console.ERROR related behavior 2017-04-25 10:16:45 -04:00
Fabien Potencier
2145f56920 bug #21958 [Console] Fix bar width with multilines ProgressBar's format (maidmaid)
This PR was squashed before being merged into the 3.2 branch (closes #21958).

Discussion
----------

[Console] Fix bar width with multilines ProgressBar's format

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The bar width is badly recalculated when we use multilines (``\n``) and bar placeholer (``%bar%``) in ProgressBar's format. The bar width is reduced because multilines is considered as a big oneline. This PR fixes this.

Commits
-------

3d58ab5bad [Console] Fix bar width with multilines ProgressBar's format
2017-04-25 10:15:10 -04:00
Dany Maillard
3d58ab5bad [Console] Fix bar width with multilines ProgressBar's format 2017-04-25 10:15:09 -04:00
Fabien Potencier
81f48b80f3 bug #22435 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix dispatching throwables from ConsoleEvents::COMMAND

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Exceptions thrown by `ConsoleEvents::COMMAND` listeners should be trigger `ConsoleEvents::EXCEPTION` events.
(best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/22435/files?w=1))

Commits
-------

6d6b04ae97 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND
2017-04-25 10:03:21 -04:00
Fabien Potencier
b9ee33fd03 bug #22457 [DI] Allow service subscribers to leverage autowiring to know where their locator should be injected (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow service subscribers to leverage autowiring to know where their locator should be injected

| 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        | -

Commits
-------

e407b3d42e [DI] Allow service subscribers to leverage autowiring to know where the locator should be injected
2017-04-25 09:50:48 -04:00
Fabien Potencier
63dca040e6 bug #22487 [Process] Fix BC break: "exec" should remain an internal "detail" (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Process] Fix BC break: "exec" should remain an internal "detail"

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22476
| License       | MIT
| Doc PR        | -

Commits
-------

eedcece20b [Process] Fix BC break: "exec" should remain an internal "detail"
2017-04-25 09:44:56 -04:00
Alex Rock Ancelet
e5758317b1
Update a test value for consistency 2017-04-24 12:32:00 +02:00
Javier Eguiluz
0a95d89ed7
Minor changes to make tests more readable 2017-04-24 12:31:34 +02:00
Alex Rock Ancelet
3bf7e490b0
[DotEnv] Don't override existing $_SERVER vars 2017-04-24 12:31:34 +02:00
Lukas Kahwe Smith
045a36b303
add Request type json check in json_login 2017-04-24 08:23:15 +02:00
Fabien Potencier
3471b58318 bug #22496 [DI] Fix inlining conflict by restricting IteratorArgument to Reference[] (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix inlining conflict by restricting IteratorArgument to Reference[]

| 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        | -

`Reference` found in `ArgumentInterface::getValue()` are currently not inlined.
While trying to do so (hint: I failed), I noticed that the current code is broken for `IteratorArgument` which can contain anonymous `Definition` for now, which are then not inlined correctly.

This PR restricts `IteratorArgument` to arrays of `Reference`, and improves a few related things found while doing it.

(fabbot failure is false positive)

Commits
-------

4d3dce1c0f [DI] Fix inlining conflict by restricting IteratorArgument to Reference[]
2017-04-23 15:36:34 -07:00
Fabien Potencier
93b7530f20 bug #22478 [Serializer] XmlEncoder: fix negative int and large numbers handling (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] XmlEncoder: fix negative int and large numbers handling

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22329, #22333 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Alternative to #22333.

* Negative integers are now handled
* Float are now handled
* Large numbers are converted to float (as the `JsonEncoder` and native PHP functions like `ceil` do)

@vlastv, I've adapted your test. Can you check if it fixes your problem?

Commits
-------

1eeadb0c98 [Serializer] XmlEncoder: fix negative int and large numbers handling
2017-04-23 15:32:35 -07:00
Fabien Potencier
3d4b212a09 bug #22494 [Security] Fix json_login default success/failure handling (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] Fix json_login default success/failure handling

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (master only)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22483
| License       | MIT
| Doc PR        | n/a

This makes the `json_login` listener default configuration stateless oriented by:

- Not using the default (redirect based) failure handler, it returns a 401 (json) response containing the failure reason instead
- Not using the default (redirect based) success handler, just let the original request continue instead (reaching the targeted resource without being redirected).
- Setting `require_previous_session` to `false` by default (I have to set it on `form-login` each time I want it to be stateless)
- Removing the options related to redirections (`default_target_path`, `login_path`, ...) from the listener factory, if one wants redirections then one has to write its own handlers, not the inverse

Commits
-------

9749618ff5 Fix json_login default success/failure handling
2017-04-23 15:21:45 -07:00
Nicolas Grekas
4d3dce1c0f [DI] Fix inlining conflict by restricting IteratorArgument to Reference[] 2017-04-21 14:38:43 +02:00
Nicolas Grekas
5cabf880d6 [DI] Add missing check in PhpDumper 2017-04-21 13:48:46 +02:00
Robin Chalas
9749618ff5 Fix json_login default success/failure handling 2017-04-21 10:18:17 +02:00
Robin Chalas
883723ef53 Show private aliases in debug:container 2017-04-21 00:49:45 +02:00
Javier Eguiluz
73d81de6d2 Fixed the rendering of exceptions inside the profiler 2017-04-20 21:57:39 +02:00
Fabien Potencier
26bc96ea77 fixed CS 2017-04-20 11:21:47 -06:00
Fabien Potencier
f730ffae49 feature #22234 [DI] Introducing autoconfigure: automatic _instanceof configuration (weaverryan)
This PR was squashed before being merged into the 3.3-dev branch (closes #22234).

Discussion
----------

[DI] Introducing autoconfigure: automatic _instanceof configuration

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes (mostly, a continuation of a new feature)
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/7538

This is a proposal to allow the user to opt into some automatic `_instanceof` config. Suppose I want to auto-tag all of my voters and event subscribers

```yml
# current
services:
    _defaults:
        autowire: true

    _instanceof:
        Symfony\Component\Security\Core\Authorization\Voter\VoterInterface:
            tags: [security.voter]

        Symfony\Component\EventDispatcher\EventSubscriberInterface:
            tags: [kernel.event_subscriber]

    # services using the above tags
    AppBundle\Security\PostVoter: ~
    AppBundle\EventListener\CheckRequirementsSubscriber: ~
```

If I'm registering a service with a class that implements `VoterInterface`, when would I ever *not* want that to be tagged with `security.voter`? Here's the proposed code:

```yml
# proposed
services:
    _defaults:
        autowire: true
        autoconfigure: true

    # services using the auto_configure_instanceof functionality
    AppBundle\Security\PostVoter: ~
    AppBundle\EventListener\CheckRequirementsSubscriber: ~
```

The user must opt into this and it only applies locally to this configuration file. It works because each enabled bundle would have the opportunity to add one or more "automatic instanceof" definitions - e.g. SecurityBundle would add the `security.voter` instanceof config, FrameworkBundle would add the `kernel.event_subscriber` instanceof config, etc.

For another example, you can check out the proposed changes to `symfony-demo` - symfony/symfony-demo#483 - the `_instanceof` section is pretty heavy: 81694ac21e/app/config/services.yml (L20)

Thanks!

Commits
-------

18627bf9f6 [DI] Introducing autoconfigure: automatic _instanceof configuration
2017-04-20 11:20:32 -06:00
Ryan Weaver
18627bf9f6 [DI] Introducing autoconfigure: automatic _instanceof configuration 2017-04-20 11:20:30 -06:00
Fabien Potencier
ad86e2dff0 feature #21502 Persist app bootstrapping logs for logger datacollector (ScullWM, nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Persist app bootstrapping logs for logger datacollector

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | ?
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21405
| License       | MIT

Logs generated during the container build are catched by the BufferingLogger with a special flag.

They are persist by the LoggerDataCollector and are available in the logger profiler.
In the profiler toolbar, the "container build" logs increment the current logs counter (even if the container was previously built).

<img width="540" alt="capture d ecran 2017-02-01 a 20 56 40" src="https://cloud.githubusercontent.com/assets/1017746/22523826/0bc12e4a-e8c1-11e6-830f-7f6238ea7423.png">

<img width="1022" alt="capture d ecran 2017-02-01 a 20 57 55" src="https://cloud.githubusercontent.com/assets/1017746/22523859/2c48a698-e8c1-11e6-9bdb-d85f3e692938.png">

The BufferingLogger now require the cachePath and the filesystem to persist a (unique) container build logs.
If the current workflow is ok, I will update the test coverage (actually they fail). Maybe we can display the appDevDebugProjectContainerCompiler.log content in that logger profile.

Commits
-------

2fd18b5503 [VarDumper] Fine tune dumping log messages
ce3ef6a96e Persist app bootstrapping logs for logger datacollector
2017-04-20 11:12:40 -06:00
Fabien Potencier
f9bb4dccb8 minor #22480 [DI] Reduce memory overhead of id normalization (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Reduce memory overhead of id normalization

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

1dd3285c91 [DI] Reduce memory overhead of id normalization
2017-04-20 11:03:47 -06:00
Nicolas Grekas
eedcece20b [Process] Fix BC break: "exec" should remain an internal "detail" 2017-04-20 19:01:24 +02:00
Christian Flothmann
35fe02f101 clarify constraint for the Asset component
The conflict rule already forbids installing releases before 3.3 of the
Asset component. This will bring the constraint in the `require-dev`
section inline with the conflict rule.
2017-04-20 15:59:31 +02:00
Nicolas Grekas
c97b08e6c0 [FrameworkBundle] Restore 3.2-like behavior for FormPass, to help BC with Sonata 2017-04-20 15:25:36 +02:00
Nicolas Grekas
1dd3285c91 [DI] Reduce memory overhead of id normalization 2017-04-20 10:02:26 +02:00
Fabien Potencier
9c0067b19f bug #22322 [Console] Fix fatal error when logging console.error without command (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Fix fatal error when logging console.error without command

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22449
| License       | MIT
| Doc PR        | n/a

Happens now that the console.error event is dispatched on command not found, I  ran into using `server:run` on 3.3 without `web-server-bundle` enabled:

> PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getName() on null

In this case, this first tries to cast the event input as string (less good than when the command name is available, there're extra quotes around the command name) and, if can't be casted, uses a generic message.

Commits
-------

97129fc611 Fix fatal error when logging console.error without a command
2017-04-19 17:40:30 -06:00
Kévin Dunglas
1eeadb0c98
[Serializer] XmlEncoder: fix negative int and large numbers handling 2017-04-19 22:42:09 +02:00
Nicolas Grekas
04ae502b0d Merge branch '3.2'
* 3.2:
  Make .travis.yml more readable
  Fold Travis CI output by component
  [VarDumper] Minor tweaks to html/css dumps
  Add trhows PHPDoc in Application::run
  [Debug] Set exit status to 255 on error
  [HttpFoundation] Store IANA's RNG files in the repository
  [PropertyInfo] Remove a useless call to count() in SerializerExtractor
  [PropertyInfo] Prevent returning int values in some cases.
  [HttpFoundation] Fix getClientIp @return docblock
  Add @throws phpdoc
  unify PHPUnit config files
2017-04-19 22:25:39 +02:00
Nicolas Grekas
fc195dc4f9 Merge branch '2.8' into 3.2
* 2.8:
  Make .travis.yml more readable
  Fold Travis CI output by component
  Add trhows PHPDoc in Application::run
  [Debug] Set exit status to 255 on error
  [HttpFoundation] Store IANA's RNG files in the repository
  [PropertyInfo] Remove a useless call to count() in SerializerExtractor
  [PropertyInfo] Prevent returning int values in some cases.
  [HttpFoundation] Fix getClientIp @return docblock
  Add @throws phpdoc
  unify PHPUnit config files
2017-04-19 22:17:50 +02:00
Nicolas Grekas
9af7354e13 Merge branch '2.7' into 2.8
* 2.7:
  Make .travis.yml more readable
  Fold Travis CI output by component
  Add trhows PHPDoc in Application::run
  [Debug] Set exit status to 255 on error
  [HttpFoundation] Store IANA's RNG files in the repository
  [HttpFoundation] Fix getClientIp @return docblock
  Add @throws phpdoc
  unify PHPUnit config files
2017-04-19 21:56:30 +02:00
Nicolas Grekas
e407b3d42e [DI] Allow service subscribers to leverage autowiring to know where the locator should be injected 2017-04-19 21:52:02 +02:00
Roland Franssen
ba650783f5 [SecurityBundle] Enhance FirewallContext::getListeners() 2017-04-19 20:32:53 +02:00
Fabien Potencier
df155dd5b4 bug #22470 [SecurityBundle] conditionally register user checker FQCN alias (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] conditionally register user checker FQCN alias

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22466
| License       | MIT
| Doc PR        |

Commits
-------

eede70a8a2 conditionally register user checker FQCN alias
2017-04-19 10:21:45 -06:00
Fabien Potencier
610a2385f6 feature #22459 [HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass

| 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        | -

As done in https://github.com/symfony/symfony/pull/20735

Commits
-------

f4b5784dd9 [HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass
2017-04-19 10:18:46 -06:00
Christian Flothmann
eede70a8a2 conditionally register user checker FQCN alias 2017-04-19 15:35:51 +02:00
Nicolas Grekas
0c73c5d1f3 [Cache] Keep only hit/miss (not values) in TraceableAdapter/Cache 2017-04-19 11:39:36 +02:00
Fabien Potencier
6c7bceda81 bug #22425 [Security] Allow to set a check_path on json_login listener (chalasr)
This PR was squashed before being merged into the 3.3-dev branch (closes #22425).

Discussion
----------

[Security] Allow to set a check_path on json_login listener

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no, master only
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21948, ~~#22423~~
| License       | MIT
| Doc PR        | n/a

The listener should allow to restrict authentication to a given check_path, as stated in the docs http://symfony.com/doc/master/security/json_login_setup.html

Commits
-------

9f7eb618a4 [Security] Allow to set a check_path on json_login listener
2017-04-18 16:20:19 -06:00
Robin Chalas
9f7eb618a4 [Security] Allow to set a check_path on json_login listener 2017-04-18 16:20:11 -06:00
Nicolas Grekas
f4b5784dd9 [HttpKernel] Fix deprecation of Extension::addClassesToCompile() / AddClassesToCachePass 2017-04-18 17:56:38 +02:00
Nicolas Grekas
86dbbde66f feature #22416 [FrameworkBundle][Workflow] Deprecate the default type of a workflow (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Workflow] Deprecate the default type of a workflow

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

---

Before this patch, the default type is "workflow". Most of the time a
"state_machine" is better because it's simpler and it involves less
knowledge to be able to use it.

So this patch deprecate a missing type in Symfony 3.3. And In Symfony
4.0 the default value will become "state_machine".

Commits
-------

004751c [FrameworkBundle][Workflow] Deprecate the default type of a workflow
2017-04-18 17:41:42 +02:00
Nicolas Grekas
1674f9218b bug #22422 [FrameworkBundle][Console][EventDispatcher] Fixed debug:event command (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Console][EventDispatcher] Fixed debug:event command

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

---

before:

![screenshot5](https://cloud.githubusercontent.com/assets/408368/25013888/bcd561ba-2075-11e7-8538-b977420640d2.png)

after:

![screenshot6](https://cloud.githubusercontent.com/assets/408368/25013894/c2bc9332-2075-11e7-97f6-ebfcca70b23b.png)

Commits
-------

9960b7e [FrameworkBundle][Console][EventDispatcher] Fixed debug:event command
2017-04-18 17:38:19 +02:00
Fabien Potencier
b72c11fd05 minor #22445 [Form] rename getTypedExtensions() to getTypeExtensions() (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] rename getTypedExtensions() to getTypeExtensions()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21780#discussion_r111664409
| License       | MIT
| Doc PR        |

Commits
-------

099f626e4d rename getTypedExtensions() to getTypeExtensions()
2017-04-18 08:29:00 -06:00
Nicolas Grekas
3b83fe115b [VarDumper] Minor tweaks to html/css dumps 2017-04-18 12:10:25 +02:00
Fabien Potencier
e4f854d8c9 minor #22451 [DI] Enhance auto-registration failure message (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance auto-registration failure message

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22306#issuecomment-294247722
| License       | MIT
| Doc PR        | -

Commits
-------

b23d5da1c3 [DI] Enhance auto-registration failure message
2017-04-17 14:36:54 -06:00
Fabien Potencier
9296a10b4b bug #22443 [HttpKernel] Fix identifier in request data collector (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Fix identifier in request data collector

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

3.2

![image](https://cloud.githubusercontent.com/assets/1047696/25063277/3fe8c57c-21e0-11e7-9bc3-c2edc679bd61.png)

master

![image](https://cloud.githubusercontent.com/assets/1047696/25063279/536803ec-21e0-11e7-8b95-c29c6e042c4f.png)

Commits
-------

009f87f74e [HttpKernel] Fix identifier in request data collector
2017-04-17 14:33:40 -06:00
Nicolas Grekas
2fd18b5503 [VarDumper] Fine tune dumping log messages 2017-04-17 18:48:03 +02:00
Thomas Perez
ce3ef6a96e Persist app bootstrapping logs for logger datacollector 2017-04-17 15:51:47 +02:00
Nicolas Grekas
b23d5da1c3 [DI] Enhance auto-registration failure message 2017-04-16 19:27:11 +02:00
Christian Flothmann
099f626e4d rename getTypedExtensions() to getTypeExtensions() 2017-04-15 14:35:45 +02:00
Roland Franssen
009f87f74e [HttpKernel] Fix identifier in request data collector 2017-04-15 13:32:48 +02:00
Nicolas Grekas
6d6b04ae97 [Console] Fix dispatching throwables from ConsoleEvents::COMMAND 2017-04-14 21:35:59 +02:00
Fabien Potencier
301bfa4bc4 minor #22430 [Console] Add throws PHPDoc in Application::run() (maidmaid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Add throws PHPDoc in Application::run()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | /
| License       | MIT
| Doc PR        | /

Same idea than merged #22411.

Commits
-------

28332afb38 Add trhows PHPDoc in Application::run
2017-04-14 07:55:35 -07:00
Robin Chalas
8fe122fc79 Move ValidateWorkflowsPass to the Workflow component 2017-04-14 12:36:38 +02:00
Fabien Potencier
5d83502ab5 bug #22424 [Debug] Set exit status to 255 on error (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Set exit status to 255 on error

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (no easily testable in fact)
| Fixed tickets | #20775
| License       | MIT
| Doc PR        | -

Commits
-------

67e249dc81 [Debug] Set exit status to 255 on error
2017-04-13 15:15:37 -07:00
Dany Maillard
28332afb38 Add trhows PHPDoc in Application::run 2017-04-13 23:07:15 +02:00
Nicolas Grekas
67e249dc81 [Debug] Set exit status to 255 on error 2017-04-13 22:03:51 +02:00
Fabien Potencier
f5609e809c minor #22427 [PropertyInfo] Remove a useless call to count() in SerializerExtractor (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Remove a useless call to count() in SerializerExtractor

| Q             | A
| ------------- | ---
| Branch?       |  2.8 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

7a8a72ddbf [PropertyInfo] Remove a useless call to count() in SerializerExtractor
2017-04-13 13:03:47 -07:00
Kévin Dunglas
4d2c454fad
[HttpFoundation] Store IANA's RNG files in the repository 2017-04-13 21:16:53 +02:00
Kévin Dunglas
7a8a72ddbf
[PropertyInfo] Remove a useless call to count() in SerializerExtractor 2017-04-13 21:08:13 +02:00
Kévin Dunglas
b190ec241e
[PropertyInfo] Prevent returning int values in some cases. 2017-04-13 21:00:55 +02:00
Robin Chalas
cd4a01c247 Don't create unused aliases for public command 2017-04-13 18:59:03 +02:00
Christian Flothmann
3cca48c715 respect inline level when dumping objects as maps 2017-04-13 18:51:11 +02:00
Grégoire Pineau
9960b7e1d4 [FrameworkBundle][Console][EventDispatcher] Fixed debug:event command 2017-04-13 18:24:39 +02:00
Fabien Potencier
5742958a49 minor #22418 [HttpFoundation] Fix getClientIp @return docblock (e-moe)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix getClientIp @return docblock

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22415
| License       | MIT
| Doc PR        | none

Commits
-------

af3424fb95 [HttpFoundation] Fix getClientIp @return docblock
2017-04-13 08:44:20 -07:00
Fabien Potencier
eff4feb7a1 minor #22411 [Console] Add @throws PHPDoc in Command::run() (maidmaid)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Add @throws PHPDoc in Command::run()

| 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
-------

7489a14656 Add @throws phpdoc
2017-04-13 08:31:13 -07:00
Fabien Potencier
4f0daa740a feature #22420 [DI] Make tagged abstract services throw earlier (nicolas-grekas)
This PR was squashed before being merged into the 3.3-dev branch (closes #22420).

Discussion
----------

[DI] Make tagged abstract services throw earlier

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As spotted by @stof in https://github.com/symfony/symfony/pull/22388#issuecomment-293565243, skipping abstract tagged services removes an opportunity to report config mistakes to users.

Instead of skipping them, let's throw as done before (thus reverting #22039, ping @chalasr).
I made `$container->findTaggedServiceIds()` accept a 2nd arg to make this more systematic.
To keep the possibility to have abstract tagged services *for the purpose of tag inheritance*, `ResolveTagsInheritancePass` now resets their tags.

Commits
-------

388e4b3389 [DI] Make tagged abstract services throw earlier
cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
2017-04-13 08:28:14 -07:00
Fabien Potencier
64b715bb25 bug #22386 [DI] Fix inheriting defaults with instanceof conditionals (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix inheriting defaults with instanceof conditionals

| 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        | -

Commits
-------

168765da0f [DI] Fix inheriting defaults with instanceof conditionals
2017-04-13 08:01:38 -07:00
Grégoire Pineau
004751c5e8 [FrameworkBundle][Workflow] Deprecate the default type of a workflow
Before this patch, the default type is "workflow". Most of the time a
"state_machine" is better because it's simpler and it involves less
knowledge to be able to use it.

So this patch deprecate a missing type in Symfony 3.3. And In Symfony
4.0 the default value will become "state_machine".
2017-04-13 16:36:11 +02:00
Nicolas Grekas
8596b19374 minor #22398 Enhancing integration test to show that "override" tags show up first (weaverryan)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Enhancing integration test to show that "override" tags show up first

| 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        | not needed

Relates a bit to #22396, in that I'm clarifying and emphasizing the following types of situations:

```yml
services:
    _instanceof:
        Symfony\Component\Security\Core\Authorization\Voter\VoterInterface:
            tags:
                # you probably shouldn't set priority here, but let's pretend we did
                - { name: security.voter, priority: 100 }

    AppBundle\Security\CoolPersonVoter:
        tags:
            - { name: security.voter, priority: 50 }
```

In the final `Definition`, the tags will appear in this order:
* security.voter, priority 50
* security.voter, priority 100

It works the same for parent-child definitions.

tl;dr; If a service has the same tag multiple times, the one that should be used should appear *earlier* in the Definition. The code already works that way - this test emphasizes it.

Commits
-------

e9b96e5 Enhancing integration test to show that "override" tags always show up first
2017-04-13 16:15:41 +02:00
Nicolas Grekas
388e4b3389 [DI] Make tagged abstract services throw earlier 2017-04-13 15:45:25 +02:00
Nicolas Grekas
8e4e741a8f minor #22417 Add a note about the ServiceLocator class in the changelog (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Add a note about the ServiceLocator class in the changelog

| 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

In addition to have `container.service_locator` and `container.service_subscriber` based on, this class is useful on its own as it is the one avoiding the need for having the `Container` class filling this role.

Commits
-------

92994f3 Add a note about the ServiceLocator class in the changelog
2017-04-13 13:49:54 +02:00
Nikolay Labinskiy
af3424fb95 [HttpFoundation] Fix getClientIp @return docblock 2017-04-13 14:19:24 +03:00
Robin Chalas
92994f3f94 Add a note about the ServiceLocator class in the changelog 2017-04-13 11:59:51 +02:00
Nicolas Grekas
cd06c1297b Revert "minor #22039 Skip abstract definitions in compiler passes (chalasr)"
This reverts commit 207d068a40, reversing
changes made to 4836007172.
2017-04-13 10:36:10 +02:00
Nicolas Grekas
168765da0f [DI] Fix inheriting defaults with instanceof conditionals 2017-04-13 09:57:57 +02:00
Christian Flothmann
9d733177a4 relax FormPass test assertions
Relying on a precalculated hash makes the test very fragile as the hash
value changes with every change we make for some of the DI classes.
2017-04-13 09:22:50 +02:00
Dany Maillard
7489a14656 Add @throws phpdoc 2017-04-13 00:55:15 +02:00
Nicolas Grekas
46fc0b9363 Merge branch '3.2'
* 3.2:
  add changelog for the DUMP_OBJECT_AS_MAP flag
  Relax some mocks
2017-04-12 22:43:31 +02:00
Nicolas Grekas
3d9ad54015 minor #22405 [Yaml] add changelog for the DUMP_OBJECT_AS_MAP flag (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Yaml] add changelog for the DUMP_OBJECT_AS_MAP flag

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17728
| License       | MIT
| Doc PR        |

Adds missing changelog entry for the `DUMP_OBJECT_AS_MAP` flag introduced in #17728.

Commits
-------

8fd3602 add changelog for the DUMP_OBJECT_AS_MAP flag
2017-04-12 22:33:42 +02:00
Christian Flothmann
53ad49b4ef unify PHPUnit config files
* add XML namespace attributes
* remove attributes using default values
* remove unknown `syntaxCheck` option
2017-04-12 21:20:43 +02:00
Christian Flothmann
8fd3602d83 add changelog for the DUMP_OBJECT_AS_MAP flag 2017-04-12 21:06:01 +02:00
Christian Flothmann
f6da5dde3e fix remaining risky tests 2017-04-12 20:55:56 +02:00
Nicolas Grekas
61be73394e Relax some mocks 2017-04-12 20:12:51 +02:00
Nicolas Grekas
2c4e186339 fix merge 2017-04-12 19:09:14 +02:00
Nicolas Grekas
3deeb0cb73 Merge branch '3.2'
* 3.2:
  [2.8] Prevent double registrations related to tag priorities
  Prevent double registrations related to tag priorities
  [3.2] Prevent double registrations related to tag priorities
2017-04-12 18:56:48 +02:00
Fabien Potencier
766ae29f85 bug #22401 [3.2] Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[3.2] Prevent double registrations related to tag priorities

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

#22396 and #22399 on 3.2

Commits
-------

ec6a2f9eba [3.2] Prevent double registrations related to tag priorities
2017-04-12 09:53:37 -07:00
Fabien Potencier
79d2c0e2ca Merge branch '2.8' into 3.2
* 2.8:
  [2.8] Prevent double registrations related to tag priorities
  Prevent double registrations related to tag priorities
2017-04-12 09:52:46 -07:00
Fabien Potencier
d564c6ad7d bug #22399 [2.8] Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Prevent double registrations related to tag priorities

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

#22396 on 2.8

Commits
-------

2be5821743 [2.8] Prevent double registrations related to tag priorities
2017-04-12 09:50:09 -07:00
Fabien Potencier
c839532f5c Merge branch '2.7' into 2.8
* 2.7:
  Prevent double registrations related to tag priorities
2017-04-12 09:49:00 -07:00
Nicolas Grekas
2be5821743 [2.8] Prevent double registrations related to tag priorities 2017-04-12 18:45:59 +02:00
Fabien Potencier
92eb9e1616 bug #22396 Prevent double registrations related to tag priorities (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Prevent double registrations related to tag priorities

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

The current logic is inconsistent, and allows the same id to be used several times. This makes the first explicit priority to always win.

Commits
-------

6764dcdf39 Prevent double registrations related to tag priorities
2017-04-12 09:30:10 -07:00
Nicolas Grekas
f24a1a89a0 Merge branch '3.2'
* 3.2:
  use risky tests free version of the Form component
2017-04-12 17:55:13 +02:00
Nicolas Grekas
6764dcdf39 Prevent double registrations related to tag priorities 2017-04-12 17:35:56 +02:00
Nicolas Grekas
ec6a2f9eba [3.2] Prevent double registrations related to tag priorities 2017-04-12 17:25:29 +02:00
Christian Flothmann
e581fdadea use risky tests free version of the Form component 2017-04-12 17:22:35 +02:00
Ryan Weaver
e9b96e5f44 Enhancing integration test to show that "override" tags always show up first 2017-04-12 10:34:49 -04:00
Fabien Potencier
4e13eeecfb bug #22390 [FrameworkBundle] Fix serializer aliases (jvasseur)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix serializer aliases

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        |

Fix serializer aliases introduced in #22098

Commits
-------

22e72d0a62 Fix serializer aliases
2017-04-12 07:20:30 -07:00
Fabien Potencier
9541264c2b bug #22393 [TwigBundle] Fix log message formatting in exception views (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[TwigBundle] Fix log message formatting in exception views

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22335
| License       | MIT
| Doc PR        | n/a

| __Before__      |
| ------------- |
| ![before](http://image.prntscr.com/image/984005e787ea4418a75e76d968f3af14.png)   |

| __After__        |
| ------------- |
| ![after](http://image.prntscr.com/image/608331f67030455d9bb1eaeec2bc4eb8.png)   |

Commits
-------

0f9660b854 Fix log message formatting in exception views
2017-04-12 07:18:23 -07:00
Fabien Potencier
0c19ca8af9 feature #22384 [DI] Replace autowiring BC break by regular deprecation (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Replace autowiring BC break by regular deprecation

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

It happens that doing so is really easy now. And as discussed in #22295, this should be more friendly to our users.

Commits
-------

0ed087d972 [DI] Replace autowiring BC break by regular deprecation
2017-04-12 07:16:24 -07:00
Fabien Potencier
2f885ccc4c fail when detecting risky tests 2017-04-12 07:15:58 -07:00
Fabien Potencier
03acba5341 Merge branch '3.2'
* 3.2:
  fail when detecting risky tests
  fail when detecting risky tests
  fail when detecting risky tests
2017-04-12 07:14:56 -07:00
Fabien Potencier
0834f133ec fail when detecting risky tests 2017-04-12 07:14:23 -07:00
Fabien Potencier
d7a0737d72 Merge branch '2.8' into 3.2
* 2.8:
  fail when detecting risky tests
  fail when detecting risky tests
2017-04-12 07:13:17 -07:00
Fabien Potencier
6edd08d7c5 fail when detecting risky tests 2017-04-12 07:11:35 -07:00
Fabien Potencier
d362bb1936 Merge branch '2.7' into 2.8
* 2.7:
  fail when detecting risky tests
2017-04-12 07:07:15 -07:00
Fabien Potencier
48b048d864 feature #22383 added a more specialized exception for a better error message (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

added a more specialized exception for a better error message

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes/no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

When trying to load a resource, it is very interesting to understand why a resource cannot be loaded. Especially when you get `Cannot load resource "../src/Controller/".`... when the real error is that annotation support is disabled. This PR adds more information in that case.

Commits
-------

aeb9bffa8f added a more specialized exception for a better error message
2017-04-12 06:59:41 -07:00
Asmir Mustafic
4f5c149798 Test case for not in-lined map-objects 2017-04-12 14:58:48 +02:00
Robin Chalas
0f9660b854 Fix log message formatting in exception views 2017-04-12 13:47:16 +02:00
Jérôme Vasseur
22e72d0a62 Fix serializer aliases 2017-04-12 12:44:19 +02:00
Christian Flothmann
3792ee6c93 fail when detecting risky tests 2017-04-12 09:39:27 +02:00
Nicolas Grekas
0ed087d972 [DI] Replace autowiring BC break by regular deprecation 2017-04-11 23:14:08 +02:00
Fabien Potencier
aeb9bffa8f added a more specialized exception for a better error message 2017-04-11 13:45:43 -07:00
Nicolas Grekas
9fdd36f23d Merge branch '3.2'
* 3.2:
  Fix bad merge
2017-04-11 22:43:03 +02:00
Nicolas Grekas
e71807bc60 Fix bad merge 2017-04-11 22:42:49 +02:00
Nicolas Grekas
6491fd5854 Merge branch '3.2'
* 3.2:
  Allow terminal dimensions to be set to 0 (unbounded)
  [Cache] Remove exception false-positive from FilesystemAdapterTrait
  fix risky tests
  fix risky tests
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:40:10 +02:00
Fabien Potencier
5b4091ed7c bug #22372 [DI] Allow using parameters in "prototype" resource paths (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow using parameters in "prototype" resource paths

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22016
| License       | MIT
| Doc PR        | -

Commits
-------

d3fc86c709 [DI] Allow using parameters in "prototype" resource paths
2017-04-11 11:36:38 -07:00
Nicolas Grekas
a2bd375f60 Merge branch '2.8' into 3.2
* 2.8:
  fix risky tests
  [Yaml] release memory after parsing
  [HttpFoundation] Fix and test status codes according to IANA's data
  Add `use_strict_mode` in validOptions for session
  [Console] Inherit phpdoc from OutputFormatterInterface
2017-04-11 20:36:00 +02:00