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

[3.0][HttpKernel] Remove unused method Kernel::isClassInActiveBundle #12854

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

Merged
merged 1 commit into from
Dec 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions 1 src/Symfony/Component/HttpKernel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
-----

* Removed `Symfony\Component\HttpKernel\Kernel::init()`
* Removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()`

2.6.0
-----
Expand Down
18 changes: 0 additions & 18 deletions 18 src/Symfony/Component/HttpKernel/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,24 +196,6 @@ public function getBundles()
return $this->bundles;
}

/**
* {@inheritdoc}
*
* @api
*
* @deprecated Deprecated since version 2.6, to be removed in 3.0.
*/
public function isClassInActiveBundle($class)
{
foreach ($this->getBundles() as $bundle) {
if (0 === strpos($class, $bundle->getNamespace())) {
return true;
}
}

return false;
}

/**
* {@inheritdoc}
*
Expand Down
13 changes: 0 additions & 13 deletions 13 src/Symfony/Component/HttpKernel/KernelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,6 @@ public function shutdown();
*/
public function getBundles();

/**
* Checks if a given class name belongs to an active bundle.
*
* @param string $class A class name
*
* @return bool true if the class belongs to an active bundle, false otherwise
*
* @api
*
* @deprecated Deprecated since version 2.6, to be removed in 3.0.
*/
public function isClassInActiveBundle($class);

/**
* Returns a bundle and optionally its descendants by its name.
*
Expand Down
19 changes: 0 additions & 19 deletions 19 src/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php

This file was deleted.

34 changes: 0 additions & 34 deletions 34 src/Symfony/Component/HttpKernel/Tests/KernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest;
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName;
use Symfony\Component\HttpKernel\Tests\Fixtures\FooBarBundle;

class KernelTest extends \PHPUnit_Framework_TestCase
{
Expand Down Expand Up @@ -279,39 +278,6 @@ public function doStuff()
$this->assertEquals($expected, $output);
}

public function testIsClassInActiveBundleFalse()
{
$kernel = $this->getKernelMockForIsClassInActiveBundleTest();

$this->assertFalse($kernel->isClassInActiveBundle('Not\In\Active\Bundle'));
}

public function testIsClassInActiveBundleFalseNoNamespace()
{
$kernel = $this->getKernelMockForIsClassInActiveBundleTest();

$this->assertFalse($kernel->isClassInActiveBundle('NotNamespacedClass'));
}

public function testIsClassInActiveBundleTrue()
{
$kernel = $this->getKernelMockForIsClassInActiveBundleTest();

$this->assertTrue($kernel->isClassInActiveBundle(__NAMESPACE__.'\Fixtures\FooBarBundle\SomeClass'));
}

protected function getKernelMockForIsClassInActiveBundleTest()
{
$bundle = new FooBarBundle();

$kernel = $this->getKernel(array('getBundles'));
$kernel->expects($this->once())
->method('getBundles')
->will($this->returnValue(array($bundle)));

return $kernel;
}

public function testGetRootDir()
{
$kernel = new KernelForTest('test', true);
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.