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

Browse filesBrowse files
committed
[HttpKernel] Remove unused method Kernel::isClassInActiveBundle
Follow-up of symfony#11869
1 parent e0205ba commit 91dcca4
Copy full SHA for 91dcca4

File tree

Expand file treeCollapse file tree

5 files changed

+1
-84
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+1
-84
lines changed

‎src/Symfony/Component/HttpKernel/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
-----
66

77
* Removed `Symfony\Component\HttpKernel\Kernel::init()`
8+
* Removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()`
89

910
2.6.0
1011
-----

‎src/Symfony/Component/HttpKernel/Kernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Kernel.php
-18Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -196,24 +196,6 @@ public function getBundles()
196196
return $this->bundles;
197197
}
198198

199-
/**
200-
* {@inheritdoc}
201-
*
202-
* @api
203-
*
204-
* @deprecated Deprecated since version 2.6, to be removed in 3.0.
205-
*/
206-
public function isClassInActiveBundle($class)
207-
{
208-
foreach ($this->getBundles() as $bundle) {
209-
if (0 === strpos($class, $bundle->getNamespace())) {
210-
return true;
211-
}
212-
}
213-
214-
return false;
215-
}
216-
217199
/**
218200
* {@inheritdoc}
219201
*

‎src/Symfony/Component/HttpKernel/KernelInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/KernelInterface.php
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,6 @@ public function shutdown();
6969
*/
7070
public function getBundles();
7171

72-
/**
73-
* Checks if a given class name belongs to an active bundle.
74-
*
75-
* @param string $class A class name
76-
*
77-
* @return bool true if the class belongs to an active bundle, false otherwise
78-
*
79-
* @api
80-
*
81-
* @deprecated Deprecated since version 2.6, to be removed in 3.0.
82-
*/
83-
public function isClassInActiveBundle($class);
84-
8572
/**
8673
* Returns a bundle and optionally its descendants by its name.
8774
*

‎src/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php
-19Lines changed: 0 additions & 19 deletions
This file was deleted.

‎src/Symfony/Component/HttpKernel/Tests/KernelTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/KernelTest.php
-34Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\HttpFoundation\Response;
1818
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest;
1919
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName;
20-
use Symfony\Component\HttpKernel\Tests\Fixtures\FooBarBundle;
2120

2221
class KernelTest extends \PHPUnit_Framework_TestCase
2322
{
@@ -279,39 +278,6 @@ public function doStuff()
279278
$this->assertEquals($expected, $output);
280279
}
281280

282-
public function testIsClassInActiveBundleFalse()
283-
{
284-
$kernel = $this->getKernelMockForIsClassInActiveBundleTest();
285-
286-
$this->assertFalse($kernel->isClassInActiveBundle('Not\In\Active\Bundle'));
287-
}
288-
289-
public function testIsClassInActiveBundleFalseNoNamespace()
290-
{
291-
$kernel = $this->getKernelMockForIsClassInActiveBundleTest();
292-
293-
$this->assertFalse($kernel->isClassInActiveBundle('NotNamespacedClass'));
294-
}
295-
296-
public function testIsClassInActiveBundleTrue()
297-
{
298-
$kernel = $this->getKernelMockForIsClassInActiveBundleTest();
299-
300-
$this->assertTrue($kernel->isClassInActiveBundle(__NAMESPACE__.'\Fixtures\FooBarBundle\SomeClass'));
301-
}
302-
303-
protected function getKernelMockForIsClassInActiveBundleTest()
304-
{
305-
$bundle = new FooBarBundle();
306-
307-
$kernel = $this->getKernel(array('getBundles'));
308-
$kernel->expects($this->once())
309-
->method('getBundles')
310-
->will($this->returnValue(array($bundle)));
311-
312-
return $kernel;
313-
}
314-
315281
public function testGetRootDir()
316282
{
317283
$kernel = new KernelForTest('test', true);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.