8000 [SecurityBundle] Rename FirewallContext#getContext() · symfony/symfony@033da86 · GitHub
[go: up one dir, main page]

Skip to content

Commit 033da86

Browse files
committed
[SecurityBundle] Rename FirewallContext#getContext()
1 parent 4459598 commit 033da86

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,17 @@ public function getConfig()
4141
return $this->config;
4242
}
4343

44+
/**
45+
* @deprecated since version 3.2, will be removed in 4.0. Use {@link getListeners()} instead.
46+
*/
4447
public function getContext()
48+
{
49+
@trigger_error(sprintf('Method "%s()" is deprecated since version 3.2 and will be removed in 4.0. Use "%s::getListeners()" instead.', __METHOD__, __CLASS__), E_USER_DEPRECATED);
50+
51+
return $this->getListeners();
52+
}
53+
54+
public function getListeners()
4555
{
4656
return array($this->listeners, $this->exceptionListener);
4757
}

src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getListeners(Request $request)
4646
return array(array(), null);
4747
}
4848

49-
return $context->getContext();
49+
return $context->getListeners();
5050
}
5151

5252
/**

src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testGetters()
3939

4040
$context = new FirewallContext($listeners, $exceptionListener, $config);
4141

42-
$this->assertEquals(array($listeners, $exceptionListener), $context->getContext());
42+
$this->assertEquals(array($listeners, $exceptionListener), $context->getListeners());
4343
$this->assertEquals($config, $context->getConfig());
4444
}
4545
}

0 commit comments

Comments
 (0)
0