Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 033da86

Browse filesBrowse files
committed
[SecurityBundle] Rename FirewallContext#getContext()
1 parent 4459598 commit 033da86
Copy full SHA for 033da86

File tree

Expand file treeCollapse file tree

3 files changed

+12
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php
+10Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Security/FirewallContextTest.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.