From 12f61de984430d12bcf3395c8daa9a1dee51ff9e Mon Sep 17 00:00:00 2001 From: George Steel Date: Thu, 24 Mar 2022 22:22:50 +0000 Subject: [PATCH] Removes stream wrapper functionality Signed-off-by: George Steel --- src/NamespacedPathStackResolver.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/NamespacedPathStackResolver.php b/src/NamespacedPathStackResolver.php index 56f9d95..59f1d47 100644 --- a/src/NamespacedPathStackResolver.php +++ b/src/NamespacedPathStackResolver.php @@ -7,7 +7,6 @@ use Laminas\View\Exception as ViewException; use Laminas\View\Renderer\RendererInterface; use Laminas\View\Resolver\TemplatePathStack; -use Laminas\View\Stream; use SplFileInfo; use SplStack; use Traversable; @@ -17,8 +16,6 @@ use function file_exists; use function get_class; use function gettype; -use function in_array; -use function ini_get; use function is_array; use function is_object; use function is_string; @@ -26,8 +23,6 @@ use function pathinfo; use function preg_match; use function sprintf; -use function stream_get_wrappers; -use function stream_wrapper_register; use function substr; use const PATHINFO_EXTENSION; @@ -58,14 +53,6 @@ class NamespacedPathStackResolver extends TemplatePathStack */ public function __construct(?iterable $options = null) { - $this->useViewStream = (bool) ini_get('short_open_tag'); - if ($this->useViewStream) { - if (! in_array('laminas.view', stream_get_wrappers())) { - /** @psalm-suppress DeprecatedClass */ - stream_wrapper_register('laminas.view', Stream::class); - } - } - if (null !== $options) { $this->setOptions($options); } @@ -221,11 +208,6 @@ private function getPathFromNamespace(string $template, string $namespace): ?str } } - /** @psalm-suppress DeprecatedMethod */ - if ($this->useStreamWrapper()) { - // If using a stream wrapper, prepend the spec to the path - $filePath = 'laminas.view://' . $filePath; - } return $filePath; } }