8000 [DI] Autowiring exception thrown when inlined service is removed by weaverryan · Pull Request #22993 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DI] Autowiring exception thrown when inlined service is removed #22993

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 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
using original method name
  • Loading branch information
weaverryan committed May 31, 2017
commit e23296e79da37d049a4344258a781c41495a3193
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function process(ContainerBuilder $container)
return;
}

$inlinedIds = $this->inlineServicePass->getInlinedServiceIdData();
$inlinedIds = $this->inlineServicePass->getInlinedServiceIds();
$exceptions = $this->autowirePass->getAutowiringExceptions();

// free up references
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function setRepeatedPass(RepeatedPass $repeatedPass)
*
* @return array
*/
public function getInlinedServiceIdData()
public function getInlinedServiceIds()
{
return $this->inlinedServiceIds;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testThrowsException()
$inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)
->getMock();
$inlinePass->expects($this->any())
->method('getInlinedServiceIdData')
->method('getInlinedServiceIds')
->will($this->returnValue(array()));

$container = new ContainerBuilder();
Expand Down Expand Up @@ -62,7 +62,7 @@ public function testThrowExceptionIfServiceInlined()
$inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)
->getMock();
$inlinePass->expects($this->any())
->method('getInlinedServiceIdData')
->method('getInlinedServiceIds')
->will($this->returnValue(array(
// a_service inlined into b_service
'a_service' => 'b_service',
Expand Down Expand Up @@ -97,7 +97,7 @@ public function testDoNotThrowExceptionIfServiceInlinedButRemoved()
$inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)
->getMock();
$inlinePass->expects($this->any())
->method('getInlinedServiceIdData')
->method('getInlinedServiceIds')
->will($this->returnValue(array(
// a_service inlined into b_service
'a_service' => 'b_service',
Expand Down Expand Up @@ -128,7 +128,7 @@ public function testNoExceptionIfServiceRemoved()
$inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)
->getMock();
$inlinePass->expects($this->any())
->method('getInlinedServiceIdData')
->method('getInlinedServiceIds')
->will($this->returnValue(array()));

$container = new ContainerBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public function testGetInlinedServiceIdData()
$repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), $inlinePass));
$repeatedPass->process($container);

$this->assertEquals(array('inlinable.service' => 'other_service'), $inlinePass->getInlinedServiceIdData());
$this->assertEquals(array('inlinable.service' => 'other_service'), $inlinePass->getInlinedServiceIds());
}

protected function process(ContainerBuilder $container)
Expand Down
0