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 deprecated functions and classes #14634

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
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
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('debug.xml');

$definition = $container->findDefinition('http_kernel');
$definition->replaceArgument(2, new Reference('debug.controller_resolver'));
$definition->replaceArgument(1, new Reference('debug.controller_resolver'));

// replace the regular event_dispatcher service with the debug one
$definition = $container->findDefinition('event_dispatcher');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
<argument type="service" id="service_container" />
</service>

<service id="http_kernel" class="Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel">
<service id="http_kernel" class="Symfony\Component\HttpKernel\HttpKernel">
<argument type="service" id="event_dispatcher" />
<argument type="service" id="service_container" />
<argument type="service" id="controller_resolver" />
<argument type="service" id="request_stack" />
</service>
Expand Down
18 changes: 18 additions & 0 deletions 18 src/Symfony/Component/HttpKernel/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ CHANGELOG

* removed `Symfony\Component\HttpKernel\Kernel::init()`
* removed `Symfony\Component\HttpKernel\Kernel::isClassInActiveBundle()` and `Symfony\Component\HttpKernel\KernelInterface::isClassInActiveBundle()`
* removed `Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher::setProfiler()`
* removed `Symfony\Component\HttpKernel\EventListener\FragmentListener::getLocalIpAddresses()`
* removed `Symfony\Component\HttpKernel\EventListener\LocaleListener::setRequest()`
* removed `Symfony\Component\HttpKernel\EventListener\RouterListener::setRequest()`
* removed `Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest()`
* removed `Symfony\Component\HttpKernel\Fragment\FragmentHandler::setRequest()`
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::hasSurrogateEsiCapability()`
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::addSurrogateEsiCapability()`
* removed `Symfony\Component\HttpKernel\HttpCache\Esi::needsEsiParsing()`
* removed `Symfony\Component\HttpKernel\HttpCache\HttpCache::getEsi()`
* removed `Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel`
* removed `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`
* removed `Symfony\Component\HttpKernel\EventListener\ErrorsLoggerListener`
* removed `Symfony\Component\HttpKernel\EventListener\EsiListener`
* removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategy`
* removed `Symfony\Component\HttpKernel\HttpCache\EsiResponseCacheStrategyInterface`
* removed `Symfony\Component\HttpKernel\Log\LoggerInterface`
* removed `Symfony\Component\HttpKernel\Log\NullLogger`

2.7.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,8 @@ public function getDumps($format, $maxDepthLimit = -1, $maxItemsPerDepth = -1)
$dumps = array();

foreach ($this->data as $dump) {
if (method_exists($dump['data'], 'withMaxDepth')) {
$dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth));
} else {
// getLimitedClone is @deprecated, to be removed in 3.0
$dumper->dump($dump['data']->getLimitedClone($maxDepthLimit, $maxItemsPerDepth));
}
$dumper->dump($dump['data']->withMaxDepth($maxDepthLimit)->withMaxItemsPerDepth($maxItemsPerDepth));

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should keep this line!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

rewind($data);
$dump['data'] = stream_get_contents($data);
ftruncate($data, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\HttpKernel\Debug;

use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher;
use Symfony\Component\HttpKernel\Profiler\Profiler;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\Event;

Expand All @@ -25,22 +24,6 @@
*/
class TraceableEventDispatcher extends BaseTraceableEventDispatcher
{
/**
* Sets the profiler.
*
* The traceable event dispatcher does not use the profiler anymore.
* The job is now done directly by the Profiler listener and the
* data collectors themselves.
*
* @param Profiler|null $profiler A Profiler instance
*
* @deprecated since version 2.4, to be removed in 3.0.
*/
public function setProfiler(Profiler $profiler = null)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
}

/**
* {@inheritdoc}
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\HttpKernel\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;

/**
Expand Down Expand Up @@ -59,14 +58,7 @@ public function process(ContainerBuilder $container)
}

foreach ($tags as $tag) {
if (!isset($tag['alias'])) {
trigger_error(sprintf('Service "%s" will have to define the "alias" attribute on the "%s" tag as of Symfony 3.0.', $id, $this->rendererTag), E_USER_DEPRECATED);

// register the handler as a non-lazy-loaded one
$definition->addMethodCall('addRenderer', array(new Reference($id)));
} else {
$definition->addMethodCall('addRendererService', array($tag['alias'], $id));
}
$definition->addMethodCall('addRendererService', array($tag['alias'], $id));
}
}
}
Expand Down

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions 25 src/Symfony/Component/HttpKernel/EventListener/EsiListener.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ protected function duplicateRequest(\Exception $exception, Request $request)
'_controller' => $this->controller,
'exception' => FlattenException::create($exception),
'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null,
// keep for BC -- as $format can be an argument of the controller callable
// see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
// @deprecated since version 2.4, to be removed in 3.0
'format' => $request->getRequestFormat(),
);
$request = $request->duplicate(null, null, $attributes);
$request->setMethod('GET');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,6 @@ protected function validateRequest(Request $request)
throw new AccessDeniedHttpException();
}

/**
* @deprecated since version 2.3.19, to be removed in 3.0.
*
* @return string[]
*/
protected function getLocalIpAddresses()
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3.19 and will be removed in 3.0.', E_USER_DEPRECATED);

return array('127.0.0.1', 'fe80::1', '::1');
}

public static function getSubscribedEvents()
{
return array(
Expand Down
23 changes: 0 additions & 23 deletions 23 src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,6 @@ public function __construct($defaultLocale = 'en', RequestContextAwareInterface
$this->router = $router;
}

/**
* Sets the current Request.
*
* This method was used to synchronize the Request, but as the HttpKernel
* is doing that automatically now, you should never call it directly.
* It is kept public for BC with the 2.3 version.
*
* @param Request|null $request A Request instance
*
* @deprecated since version 2.4, to be removed in 3.0.
*/
public function setRequest(Request $request = null)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);

if (null === $request) {
return;
}

$this->setLocale($request);
$this->setRouterContext($request);
}

public function onKernelRequest(GetResponseEvent $event)
{
$request = $event->getRequest();
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.