From 09cf1cada40f4462257a9a3eb5e1b8ceeab4f8ec Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Sat, 7 Mar 2020 21:27:52 -0600 Subject: [PATCH] Removed class aliases and legacy configure loading --- composer.json | 3 +-- src/Event/ConstructEvent.php | 4 ---- src/Event/EnvironmentConfigEvent.php | 4 ---- src/Event/ExtensionsListener.php | 4 ---- src/Event/LoaderEvent.php | 4 ---- src/Event/ProfileEvent.php | 4 ---- src/Event/ProfilerListener.php | 4 ---- src/Event/TokenParsersListener.php | 4 ---- src/Panel/TwigPanel.php | 4 ---- src/Plugin.php | 4 ---- src/Shell/CompileShell.php | 4 ---- src/Shell/Task/TwigTemplateTask.php | 4 ---- src/View/TwigView.php | 9 --------- 13 files changed, 1 insertion(+), 55 deletions(-) diff --git a/composer.json b/composer.json index c425dc2..ef7cfd8 100644 --- a/composer.json +++ b/composer.json @@ -33,8 +33,7 @@ }, "autoload": { "psr-4": { - "Cake\\TwigView\\": "src/", - "WyriHaximus\\TwigView\\": "src/" + "Cake\\TwigView\\": "src/" } }, "autoload-dev": { diff --git a/src/Event/ConstructEvent.php b/src/Event/ConstructEvent.php index ac4857c..0383c80 100644 --- a/src/Event/ConstructEvent.php +++ b/src/Event/ConstructEvent.php @@ -49,7 +49,3 @@ public function getTwig(): Environment return $this->getData()['twig']; } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\ConstructEvent', 'Wyrihaximus\TwigView\Event\ConstructEvent'); -// phpcs:enable diff --git a/src/Event/EnvironmentConfigEvent.php b/src/Event/EnvironmentConfigEvent.php index 3e236ee..cce0d12 100644 --- a/src/Event/EnvironmentConfigEvent.php +++ b/src/Event/EnvironmentConfigEvent.php @@ -55,7 +55,3 @@ public function setConfig(array $config) return $this; } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\EnvironmentConfigEvent', 'Wyrihaximus\TwigView\Event\EnvironmentConfigEvent'); -// phpcs:enable diff --git a/src/Event/ExtensionsListener.php b/src/Event/ExtensionsListener.php index 2507911..178112d 100644 --- a/src/Event/ExtensionsListener.php +++ b/src/Event/ExtensionsListener.php @@ -124,7 +124,3 @@ public function load($class) // @codingStandardsIgnoreEnd } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\ExtensionsListener', 'Wyrihaximus\TwigView\Event\ExtensionsListener'); -// phpcs:enable diff --git a/src/Event/LoaderEvent.php b/src/Event/LoaderEvent.php index ed2d7a3..97fd1c2 100644 --- a/src/Event/LoaderEvent.php +++ b/src/Event/LoaderEvent.php @@ -54,7 +54,3 @@ public function getResultLoader(): LoaderInterface return $this->getLoader(); } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\LoaderEvent', 'Wyrihaximus\TwigView\Event\LoaderEvent'); -// phpcs:enable diff --git a/src/Event/ProfileEvent.php b/src/Event/ProfileEvent.php index d01bf88..c89a196 100644 --- a/src/Event/ProfileEvent.php +++ b/src/Event/ProfileEvent.php @@ -36,7 +36,3 @@ public function getLoader(): Profile return $this->getSubject(); } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\ProfileEvent', 'Wyrihaximus\TwigView\Event\ProfileEvent'); -// phpcs:enable diff --git a/src/Event/ProfilerListener.php b/src/Event/ProfilerListener.php index e4f07bd..1903738 100644 --- a/src/Event/ProfilerListener.php +++ b/src/Event/ProfilerListener.php @@ -52,7 +52,3 @@ public function construct(ConstructEvent $event): void EventManager::instance()->dispatch(ProfileEvent::create($profile)); } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\ProfilerListener', 'Wyrihaximus\TwigView\Event\ProfilerListener'); -// phpcs:enable diff --git a/src/Event/TokenParsersListener.php b/src/Event/TokenParsersListener.php index e5778b1..92c5ae3 100644 --- a/src/Event/TokenParsersListener.php +++ b/src/Event/TokenParsersListener.php @@ -50,7 +50,3 @@ public function construct(ConstructEvent $event): void } } } - -// phpcs:disable -class_alias('Cake\TwigView\Event\TokenParsersListener', 'Wyrihaximus\TwigView\Event\TokenParsersListener'); -// phpcs:enable diff --git a/src/Panel/TwigPanel.php b/src/Panel/TwigPanel.php index a89c045..65cfe55 100644 --- a/src/Panel/TwigPanel.php +++ b/src/Panel/TwigPanel.php @@ -27,7 +27,3 @@ public function data(): array ]; } } - -// phpcs:disable -class_alias('Cake\TwigView\Panel\TwigPanel', 'Wyrihaximus\TwigView\Panel\TwigPanel'); -// phpcs:enable diff --git a/src/Plugin.php b/src/Plugin.php index efa54cf..a1f3dea 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -52,7 +52,3 @@ public function bootstrap(PluginApplicationInterface $app): void } } } - -// phpcs:disable -class_alias('Cake\TwigView\Plugin', 'Wyrihaximus\TwigView\Plugin'); -// phpcs:enable diff --git a/src/Shell/CompileShell.php b/src/Shell/CompileShell.php index 55080d8..743abe3 100644 --- a/src/Shell/CompileShell.php +++ b/src/Shell/CompileShell.php @@ -154,7 +154,3 @@ protected function compileTemplate($fileName) } } } - -// phpcs:disable -class_alias('Cake\TwigView\Shell\CompileShell', 'Wyrihaximus\TwigView\Shell\CompileShell'); -// phpcs:enable diff --git a/src/Shell/Task/TwigTemplateTask.php b/src/Shell/Task/TwigTemplateTask.php index fc50439..70cac13 100644 --- a/src/Shell/Task/TwigTemplateTask.php +++ b/src/Shell/Task/TwigTemplateTask.php @@ -57,7 +57,3 @@ public function bake($action, $content = '', $outputFile = null): string return $content; } } - -// phpcs:disable -class_alias('Cake\TwigView\Shell\Task\TwigTemplateTask', 'Wyrihaximus\TwigView\Shell\Task\TwigTemplateTask'); -// phpcs:enable diff --git a/src/View/TwigView.php b/src/View/TwigView.php index 4e6535c..709c9c8 100644 --- a/src/View/TwigView.php +++ b/src/View/TwigView.php @@ -70,11 +70,6 @@ public function __toString(): string */ public function initialize(): void { - if (!Configure::check('TwigView') && Configure::check('Wyrihaximus.TwigView')) { - Configure::write('TwigView', Configure::read('Wyrihaximus.TwigView')); - deprecationWarning('Use of configure key `Wyrihaximus.TwigView` is deprecated, use `TwigView` instead.'); - } - $this->twig = new Environment($this->getLoader(), $this->resolveConfig()); $this->getEventManager()->dispatch(ConstructEvent::create($this, $this->twig)); @@ -249,7 +244,3 @@ protected function _getElementFileName(string $name, bool $pluginCheck = true) return false; } } - -// phpcs:disable -class_alias('Cake\TwigView\View\TwigView', 'Wyrihaximus\TwigView\View\TwigView'); -// phpcs:enable