Skip to content
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

Dropped obsolete Debug Bundle DebugTemplate class #357

Merged
merged 2 commits into from
Apr 18, 2024
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
5 changes: 0 additions & 5 deletions phpstan-baseline-7.4.neon
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@ parameters:
count: 1
path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php

-
message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|false given\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
count: 1
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline-8.0.neon
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@ parameters:
count: 2
path: src/bundle/Core/URLChecker/Handler/HTTPHandler.php

-
message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#"
count: 1
Expand Down
55 changes: 0 additions & 55 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4140,66 +4140,11 @@ parameters:
count: 1
path: src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\DependencyInjection\\\\IbexaDebugExtension\\:\\:load\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\DependencyInjection\\\\IbexaDebugExtension\\:\\:prepend\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\IbexaDebugBundle\\:\\:build\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/Debug/IbexaDebugBundle.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:display\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:display\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:doDisplay\\(\\) has parameter \\$blocks with no value type specified in iterable type array\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:doDisplay\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#1 \\$haystack of function stripos expects string, string\\|false\\|null given\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#1 \\$path of function dirname expects string, string\\|false given\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false\\|null given\\.$#"
count: 2
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|false given\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Property Ibexa\\\\Bundle\\\\Debug\\\\Twig\\\\DebugTemplate\\:\\:\\$fileSystem has no type specified\\.$#"
count: 1
path: src/bundle/Debug/Twig/DebugTemplate.php

-
message: "#^Method Ibexa\\\\Bundle\\\\IO\\\\ApiLoader\\\\HandlerRegistry\\:\\:setHandlersMap\\(\\) has no return type specified\\.$#"
count: 1
Expand Down
26 changes: 9 additions & 17 deletions src/bundle/Debug/DependencyInjection/IbexaDebugExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
*/
namespace Ibexa\Bundle\Debug\DependencyInjection;

use Ibexa\Bundle\Debug\Twig\DebugTemplate;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

class IbexaDebugExtension extends Extension implements PrependExtensionInterface
/**
* @internal
* @final
*/
class IbexaDebugExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
/**
* @throws \Exception
*/
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new Loader\YamlFileLoader(
$container,
Expand All @@ -25,19 +30,6 @@ public function load(array $configs, ContainerBuilder $container)
// Base services and services overrides
$loader->load('services.yml');
}

/**
* Sets the twig base template class to this bundle's in order to collect template infos.
*/
public function prepend(ContainerBuilder $container)
{
if ($container->getParameter('kernel.debug')) {
$container->prependExtensionConfig(
'twig',
['base_template_class' => DebugTemplate::class]
);
}
}
}

class_alias(IbexaDebugExtension::class, 'eZ\Bundle\EzPublishDebugBundle\DependencyInjection\EzPublishDebugExtension');
93 changes: 0 additions & 93 deletions src/bundle/Debug/Twig/DebugTemplate.php

This file was deleted.

Loading