Commit Graph

29843 Commits

Author SHA1 Message Date
Fabien Potencier
28a00dac0c feature #19822 [HttpKernel] Deprecate X-Status-Code for better alternative (jameshalsall)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Deprecate X-Status-Code for better alternative

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

This marks the X-Status-Code header method of setting a custom response status
code in exception listeners for a better alternative. There is now a new method
on the `GetResponseForExceptionEvent` that allows successful status codes in
the response sent to the client.

The old method of setting the X-Status-Code header will now throw a deprecation warning.

Instead, in your exception listener you simply call `GetResponseForExceptionEvent::allowCustomResponseCode()` which will tell the Kernel not to override the status code of the event's response object.

Currenty the `X-Status-Code` header will still be removed, so as not to change the existing behaviour, but this is something we can remove in 4.0.

TODO:
- [x] Replace usage of X-Status-Code in `FormAuthenticationEntryPoint`
- [x] Open Silex issue
- [x] Rename method on the response
- [x] Ensure correct response code is set in `AuthenticationEntryPointInterface` implementations
- [x] Ensure the exception listeners are marking `GetResponseForExceptionEvent` as allowing a custom response code
- [x] In the Security component we should only use the new method of setting a custom response code if it is available, and fall back to the `X-Status-Code` method

Commits
-------

cc0ef282cd [HttpKernel] Deprecate X-Status-Code for better alternative
2017-02-28 22:52:11 -08:00
Fabien Potencier
4aa9508ae3 feature #21228 [Console] Explicitly passed options without value (or empty) should remain empty (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Explicitly passed options without value (or empty) should remain empty

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21215 https://github.com/symfony/symfony/issues/11572 https://github.com/symfony/symfony/pull/12773
| License       | MIT
| Doc PR        | n/a (maybe look at updating the existing one)

This conserves empty values for options instead of returning their default values.

Code:
```php
// cli.php
$application = new Application();
$application
    ->register('echo')
    ->addOption('prefix', null, InputOption::VALUE_OPTIONAL, null, 'my-default')
    ->addArgument('value', InputArgument::REQUIRED)
    ->setCode(function ($input, $output) {
        var_dump($input->getOption('prefix'));
    });
$application->run();
```

Before:
![before](http://image.prntscr.com/image/157d9c6c054240da8b0dce54c9ce24d6.png)

After:
![after](http://image.prntscr.com/image/4aeded77f8084d3c985687fc8cc7b54e.png)

Commits
-------

80867422ac [Console] Explicitly passed options without value (or empty) should remain empty
2017-02-28 17:10:31 -08:00
Fabien Potencier
ae52490f13 minor #21808 Fix DI test (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fix DI test

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes

Should fix appveyor/travis builds

Commits
-------

8740e44086 Fix DI test
2017-02-28 17:01:26 -08:00
Robin Chalas
8740e44086 Fix DI test 2017-03-01 01:03:24 +01:00
Robin Chalas
80867422ac [Console] Explicitly passed options without value (or empty) should remain empty 2017-03-01 00:35:20 +01:00
Fabien Potencier
526d396ccd bug #21627 [DependencyInjection] make the service container builder register its own self referencing definition (hhamon)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] make the service container builder register its own self referencing definition

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

Commits
-------

9c97496b5f [DependencyInjection] make the service container builder register the definition of its related service container service (and aliases) in order to make compiler passes be able to reference the special service_container service.
2017-02-28 14:49:08 -08:00
Fabien Potencier
4a70919cea feature #21723 [Routing][DX] Add full route definition for invokable controller/class (yceruto)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Routing][DX] Add full route definition for invokable controller/class

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

Currently the [`@Route`][1] annotation can be set on the class (for global parameters only). This PR allows you to define the full route annotation for _single_ controllers on the class.

Here a common use case of [ADR pattern][3] applied to Symfony:

**Before:**
```
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

/**
 * @Route(service="AppBundle\Controller\Hello")
 */
class Hello
{
    private $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    /**
     * @Route("/hello/{name}", name="hello")
     */
    public function __invoke($name = 'World')
    {
        $this->logger->info('log entry...');

        return new Response(sprintf('Hello %s!', $name));
    }
}
```

**After:**
```
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

/**
 * @Route("/hello/{name}", name="hello", service="AppBundle\Controller\Hello")
 */
class Hello
{
    private $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    public function __invoke($name = 'World')
    {
        $this->logger->info('log entry...');

        return new Response(sprintf('Hello %s!', $name));
    }
}
```

This feature does not break any behavior before and works under these conditions:
 * The class cannot contain other methods with `@Route` annotation (otherwise, this works as before: used for global parameters).
 *  <del>The class `@Route` must have the `name` option defined (otherwise, the route is ignored).</del> This one is auto-generated if `null`.
 * The class must be invokable: [`__invoke()` method][2] (otherwise, the route is ignored).

Btw, this PR fix the inconsistency with other route definitions (xml, yml) where the `_controller` parameter points to the class name only (i.e. without method).

  [1]: https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Routing/Annotation/Route.php
  [2]: http://php.net/manual/en/language.oop5.magic.php#object.invoke
  [3]: https://github.com/pmjones/adr

Commits
-------

34e360ade3 Add full route definition to invokable class
2017-02-28 13:57:59 -08:00
Fabien Potencier
2353a34180 feature #21768 [HttpKernel] Add a ContainerControllerResolver (psr-11) (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Add a ContainerControllerResolver (psr-11)

| 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

Extracts the controller as service resolution from the framework bundle controller resolver in a `Symfony/Component/HttpKernel/Controller/Psr11ControllerResolver`, allowing you to use `HttpKernel` with your own psr-11 container.

Commits
-------

7bbae4159b [HttpKernel] Add a ContainerControllerResolver (psr-11)
2017-02-28 12:45:21 -08:00
Maxime Steinhausser
7bbae4159b [HttpKernel] Add a ContainerControllerResolver (psr-11) 2017-02-28 21:33:09 +01:00
Fabien Potencier
d1da474f8d feature #21690 [Form] allow form types + form type extensions + form type guessers to be private services (hhamon)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] allow form types + form type extensions + form type guessers to be private services

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

This pull request is about making internal form services (aka form types, form type extensions and form type guessers) private. They used to be public until Symfony 3.2 for one valid reason: lazyness. However, Symfony 3.3 now comes with built-in mechanism to support effective lazy loading of private services with service locators and proxies.

This PR makes the `DependencyInjectionExtension` class of the `Form` component leverage these new DI component mechanisms. Form types, form type extensions and form type guessers can now be declared private as a best practice. We decided to make these services private as of Symfony 3.3 and of course it would break BC. But this PR introduces a BC layer using a Symfony trick to keep internal form services public. The service container currently has a known issue where private services are not really private if they're referenced by at least two other services in the container. We use this trick to maintain the legacy services public even though the new API relies on private ones. This trick is done thanks to the `deprecated.form.registry` and `deprecated.form.registry.csrf` fake services that will be removed in Symfony 4.0.

Commits
-------

600e75ce88 [Form] use new service locator in DependencyInjectionExtension class, so that form types can be made private at some point.
2017-02-28 12:26:30 -08:00
Fabien Potencier
59a3b51b9c minor #21675 [Config][FrameworkBundle] Lazy load resource checkers (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config][FrameworkBundle] Lazy load resource checkers

| 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

`ResourceCheckerConfigCache::isFresh()` stops on the first resource checker supporting a resource (considered authoritative). Thus no need to instantiate other checkers.

Commits
-------

5a24ee2da1 [Config][FrameworkBundle] Lazy load resource checkers
2017-02-28 12:21:05 -08:00
Fabien Potencier
9e1b567d62 feature #21755 [Routing] Optimised dumped router matcher, prevent unneeded function calls. (frankdejonge)
This PR was squashed before being merged into the 3.3-dev branch (closes #21755).

Discussion
----------

[Routing] Optimised dumped router matcher, prevent unneeded function calls.

| 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        | does not apply

The application I'm working on is fairly large. Because we had a routing issue (not caused by the framework) I looked through the dumped routing code. I spotted some easy wins. These changes brought down the time for the `match` method to run from ~ 7.5ms to ~2.5ms. It's not a lot, but it's something. I've profiled it several times with blackfire to confirm. The results were very consistent. Mind you, our application has quite a serious amount of routes, a little over 900.

Commits
-------

dd647ffc8a [Routing] Optimised dumped router matcher, prevent unneeded function calls.
2017-02-28 12:11:09 -08:00
Frank de Jonge
dd647ffc8a [Routing] Optimised dumped router matcher, prevent unneeded function calls. 2017-02-28 12:11:03 -08:00
Maxime Steinhausser
5a24ee2da1 [Config][FrameworkBundle] Lazy load resource checkers 2017-02-28 18:07:25 +01:00
Fabien Potencier
41fd5d1286 feature #21375 [FrameworkBundle][Config] Move ConfigCachePass from FrameworkBundle to Config (Deamon)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Config] Move ConfigCachePass from FrameworkBundle to Config

| Q             | A
| ------------- | ---
| Branch?       | master<!--see comment below-->
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes/no
| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!--highly recommended for new features-->

This MR is part of the #21284 todo list
<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

bce445f452 Move ConfigCachePass from FrameworkBundle to Config
2017-02-28 08:10:35 -08:00
Nicolas Grekas
3729a157b9 bug #21803 [master] Fix issues reported by static analyse (romainneutron)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[master] Fix issues reported by static analyse

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

Follow-up #21802

Commits
-------

671694d [master] Fix issues reported by static analyse
2017-02-28 16:52:13 +01:00
Fabien Potencier
adc6ba5d9d bug #21797 [DI] Simplify AutowirePass and other master-only cleanups (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Simplify AutowirePass and other master-only cleanups

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

A few minor cleanups and fixes, and an overall simplification of AutowirePass.

Commits
-------

34e5cc7698 [DI] Simplify AutowirePass and other master-only cleanups
2017-02-28 07:41:20 -08:00
Romain Neutron
671694d0d6
[master] Fix issues reported by static analyse 2017-02-28 16:38:18 +01:00
Fabien Potencier
0f4bc14797 feature #21786 [PhpUnitBridge] testing for deprecations is not risky (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[PhpUnitBridge] testing for deprecations is not risky

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

Commits
-------

044cc8f14e testing for deprecations is not risky
2017-02-28 07:34:28 -08:00
Nicolas Grekas
9e4f82e9cc Merge branch '3.2'
* 3.2:
  [3.2] Fix issues reported by static analyse
  [Workflow] Remove unnecessary method calls
2017-02-28 15:44:39 +01:00
Nicolas Grekas
3b420f9091 bug #21802 [3.2] Fix issues reported by static analyse (romainneutron)
This PR was merged into the 3.2 branch.

Discussion
----------

[3.2] Fix issues reported by static analyse

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

Follow-up #21801

Commits
-------

a9ccacc [3.2] Fix issues reported by static analyse
2017-02-28 15:42:52 +01:00
Romain Neutron
a9ccaccd41
[3.2] Fix issues reported by static analyse 2017-02-28 15:39:50 +01:00
Nicolas Grekas
bbb17df480 minor #21784 [Workflow] Remove unnecessary method calls (izzyp)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #21784).

Discussion
----------

[Workflow] Remove unnecessary method calls

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

getEnabledTransitions() method only requires 1 parameter "$subject".

Removed places where a second parameter "$this->getMarking($subject)" is being passed to getEnabledTransitions().

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

12d9129 [Workflow] Remove unnecessary method calls
2017-02-28 15:33:16 +01:00
izzyp
12d91290cc [Workflow] Remove unnecessary method calls 2017-02-28 15:33:16 +01:00
Nicolas Grekas
25d17345c0 Merge branch '3.2'
* 3.2:
  fix merge
  [2.8] Fix issues reported by static analyse
2017-02-28 15:21:44 +01:00
Nicolas Grekas
f11511e300 fix merge 2017-02-28 15:19:54 +01:00
Nicolas Grekas
f03e93395e Merge branch '2.8' into 3.2
* 2.8:
  [2.8] Fix issues reported by static analyse
2017-02-28 15:10:24 +01:00
Nicolas Grekas
d8c964cae9 minor #21801 [2.8] Fix issues reported by static analyse (romainneutron)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Fix issues reported by static analyse

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

Followup #21800

Commits
-------

cb14bfd [2.8] Fix issues reported by static analyse
2017-02-28 15:10:03 +01:00
Romain Neutron
cb14bfd166
[2.8] Fix issues reported by static analyse 2017-02-28 15:08:20 +01:00
Nicolas Grekas
6bede45549 Merge branch '3.2'
* 3.2:
  [2.7] Fix issues reported by static analyse
  [Serializer] Reduce nesting in YamlFileLoader
  [DependencyInjection] add missing dumped private services list in a container frozen constructor.
2017-02-28 14:19:28 +01:00
Nicolas Grekas
4990b6ee7c Merge branch '2.8' into 3.2
* 2.8:
  [2.7] Fix issues reported by static analyse
  [Serializer] Reduce nesting in YamlFileLoader
2017-02-28 14:16:45 +01:00
Nicolas Grekas
8881221244 Merge branch '2.7' into 2.8
* 2.7:
  [2.7] Fix issues reported by static analyse
  [Serializer] Reduce nesting in YamlFileLoader
2017-02-28 14:13:45 +01:00
Nicolas Grekas
4597768377 bug #21800 [2.7] Fix issues reported by static analyze (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Fix issues reported by static analyze

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

This PR fixes invalid doc blocks (typo or missing use) and a `sprintf` issue

Commits
-------

e473aa8 [2.7] Fix issues reported by static analyse
2017-02-28 14:13:17 +01:00
Romain Neutron
e473aa8bc1
[2.7] Fix issues reported by static analyse 2017-02-28 14:08:19 +01:00
Nicolas Grekas
0f353ad6c9 minor #21754 [Serializer] Reduce nesting in YamlFileLoader (gadelat)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Reduce nesting in YamlFileLoader

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

We don't need to check if $this->classes is empty, because isset takes care of it in next call anyway

Diffs on GH are hard to read for this type of change, here is old and new code:

```php
public function loadClassMetadata(ClassMetadataInterface $classMetadata)
{
    if (null === $this->classes) {
        $this->classes = $this->getClassesFromYaml();
    }

    if (!$this->classes) {
        return false;
    }

    if (isset($this->classes[$classMetadata->getName()])) {
        $yaml = $this->classes[$classMetadata->getName()];

        if (isset($yaml['attributes']) && is_array($yaml['attributes'])) {
           ...
        }

        return true;
    }

    return false;
}
```

```php
public function loadClassMetadata(ClassMetadataInterface $classMetadata)
{
    if (null === $this->classes) {
        $this->classes = $this->getClassesFromYaml();
    }

    if (!isset($this->classes[$classMetadata->getName()])) {
        return false;
    }

    $yaml = $this->classes[$classMetadata->getName()];

    if (isset($yaml['attributes']) && is_array($yaml['attributes'])) {
        ...
    }

    return true;
}
```

Commits
-------

45f0b16 [Serializer] Reduce nesting in YamlFileLoader
2017-02-28 13:57:37 +01:00
Nicolas Grekas
b69ca56e1c bug #21782 [DependencyInjection] add missing dumped private services list in a container frozen constructor. (hhamon)
This PR was merged into the 3.2 branch.

Discussion
----------

[DependencyInjection] add missing dumped private services list in a container frozen constructor.

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

Commits
-------

838d9ca [DependencyInjection] add missing dumped private services list in a container frozen constructor.
2017-02-28 13:46:37 +01:00
Nicolas Grekas
2afd781afe Merge branch '3.2'
* 3.2:
  Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
  [DependencyInjection] inline conditional statements.
2017-02-28 13:42:54 +01:00
Nicolas Grekas
fcde9e689d Merge branch '2.8' into 3.2
* 2.8:
  Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
  [DependencyInjection] inline conditional statements.
2017-02-28 13:37:44 +01:00
Nicolas Grekas
15106bf918 Merge branch '2.7' into 2.8
* 2.7:
  Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
  [DependencyInjection] inline conditional statements.
2017-02-28 13:31:05 +01:00
Nicolas Grekas
5014fd2351 bug #21799 Revert "feature #21792 [Security] deprecate multiple providers in context listener (xabbuh)" (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Revert "feature #21792 [Security] deprecate multiple providers in context listener (xabbuh)"

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

#21792 was a mistake as pointed out by @slaci (see https://github.com/symfony/symfony/pull/21791#issuecomment-282990746) and @stof (see https://github.com/symfony/symfony/pull/21792#issuecomment-282980046).

Commits
-------

3cfa0c7 Revert "feature #21792 [Security] deprecate multiple providers in context listener (xabbuh)"
2017-02-28 13:29:33 +01:00
Nicolas Grekas
9aebfad501 bug #21798 Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)" (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"

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

#21791 was a mistake as pointed out by @slaci (see https://github.com/symfony/symfony/pull/21791#issuecomment-282990746) and @stof (see https://github.com/symfony/symfony/pull/21792#issuecomment-282980046).

Commits
-------

f6637dd Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
2017-02-28 13:27:45 +01:00
Nicolas Grekas
c1b3422900 minor #21785 [DependencyInjection] inline conditional statements (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] inline conditional statements

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

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

b7b7c54 [DependencyInjection] inline conditional statements.
2017-02-28 13:23:43 +01:00
Christian Flothmann
3cfa0c7ecb Revert "feature #21792 [Security] deprecate multiple providers in context listener (xabbuh)"
This reverts commit 924c1f06bf, reversing
changes made to afff0ce43e.
2017-02-28 13:21:14 +01:00
Christian Flothmann
f6637dd900 Revert "bug #21791 [SecurityBundle] only pass relevant user provider (xabbuh)"
This reverts commit eb750be851, reversing
changes made to 70be4ba3ca.
2017-02-28 13:20:26 +01:00
Nicolas Grekas
7f012b685a bug #21794 [DI] Fix ServiceLocatorArgument::setValues() for non-reference values (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix ServiceLocatorArgument::setValues() for non-reference values

| Q             | A
| ------------- | ---
| Branch?       | master
| Fixed tickets | https://github.com/symfony/symfony/pull/21625#issuecomment-282938336
| Tests pass?   | yes
| License       | MIT

`ResolveInvalidReferencesPass` [calls `setValues()`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php#L91) with resolved invalid reference (null), the `Reference` type check should occurs at construction only.

Commits
-------

256b836 [DI] Fix ServiceLocatorArgument::setValues() for non-reference values
2017-02-28 13:08:10 +01:00
Nicolas Grekas
e0568d8214 Fix dep 2017-02-28 13:05:45 +01:00
Nicolas Grekas
34e5cc7698 [DI] Simplify AutowirePass and other master-only cleanups 2017-02-28 12:39:23 +01:00
Robin Chalas
256b836482 [DI] Fix ServiceLocatorArgument::setValues() for non-reference values 2017-02-28 10:31:03 +01:00
Hugo Hamon
600e75ce88 [Form] use new service locator in DependencyInjectionExtension class, so that form types can be made private at some point. 2017-02-28 10:16:52 +01:00
Hugo Hamon
b7b7c5433a [DependencyInjection] inline conditional statements. 2017-02-28 10:12:48 +01:00