8000 [DependencyInjection] Add autowiring capabilities by dunglas · Pull Request #15613 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DependencyInjection] Add autowiring capabilities #15613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix some tests
  • Loading branch information
dunglas committed Oct 1, 2015
commit 7ab5b0873ed24ec42a5e29455c97140c70966d65
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
<argument /> <!-- The custom success handler service id -->
<argument type="collection" /> <!-- Options -->
<argument /> <!-- Provider-shared Key -->

<tag name="no_autowiring" />
</service>

<service id="security.authentication.success_handler" class="%security.authentication.success_handler.class%" abstract="true" public="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Compiler
*
* @param bool $autowiring Enable the autowiring
*/
public function __construct($autowiring = false)
public function __construct($autowiring = true)
{
$this->passConfig = new PassConfig($autowiring);
$this->serviceReferenceGraph = new ServiceReferenceGraph();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PassConfig
*
* @param bool $autowiring Enable the autowiring
*/
public function __construct($autowiring = false)
public function __construct($autowiring = true)
{
$this->mergePass = new MergeExtensionConfigurationPass();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function getCompilerPassConfig()
public function getCompiler()
{
if (null === $this->compiler) {
$this->compiler = new Compiler($this->hasParameter('container.autowiring') ? $this->getParameter('container.autowiring') : false);
$this->compiler = new Compiler($this->hasParameter('container.autowiring') ? $this->getParameter('container.autowiring') : true);
}

return $this->compiler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ public function testLazyLoadedService()

public function testAutowiring()
{
$container = new ContainerBuilder();
$container = new ContainerBuilder(new ParameterBag(array('container.autowiring' => true)));

$container->register('a', __NAMESPACE__.'\A');
$container->register('b', __NAMESPACE__.'\B');
Expand Down
0