Skip to content

Commit

Permalink
Removed class aliases and legacy configure loading
Browse files Browse the repository at this point in the history
  • Loading branch information
othercorey committed Mar 8, 2020
1 parent 91c4abb commit 09cf1ca
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 55 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
},
"autoload": {
"psr-4": {
"Cake\\TwigView\\": "src/",
"WyriHaximus\\TwigView\\": "src/"
"Cake\\TwigView\\": "src/"
}
},
"autoload-dev": {
Expand Down
4 changes: 0 additions & 4 deletions src/Event/ConstructEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/Event/EnvironmentConfigEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/Event/ExtensionsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,3 @@ public function load($class)
// @codingStandardsIgnoreEnd
}
}

// phpcs:disable
class_alias('Cake\TwigView\Event\ExtensionsListener', 'Wyrihaximus\TwigView\Event\ExtensionsListener');
// phpcs:enable
4 changes: 0 additions & 4 deletions src/Event/LoaderEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/Event/ProfileEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/Event/ProfilerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions src/Event/TokenParsersListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,3 @@ public function construct(ConstructEvent $event): void
}
}
}

// phpcs:disable
class_alias('Cake\TwigView\Event\TokenParsersListener', 'Wyrihaximus\TwigView\Event\TokenParsersListener');
// phpcs:enable
4 changes: 0 additions & 4 deletions src/Panel/TwigPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ public function data(): array
];
}
}

// phpcs:disable
class_alias('Cake\TwigView\Panel\TwigPanel', 'Wyrihaximus\TwigView\Panel\TwigPanel');
// phpcs:enable
4 changes: 0 additions & 4 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,3 @@ public function bootstrap(PluginApplicationInterface $app): void
}
}
}

// phpcs:disable
class_alias('Cake\TwigView\Plugin', 'Wyrihaximus\TwigView\Plugin');
// phpcs:enable
4 changes: 0 additions & 4 deletions src/Shell/CompileShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,3 @@ protected function compileTemplate($fileName)
}
}
}

// phpcs:disable
class_alias('Cake\TwigView\Shell\CompileShell', 'Wyrihaximus\TwigView\Shell\CompileShell');
// phpcs:enable
4 changes: 0 additions & 4 deletions src/Shell/Task/TwigTemplateTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 0 additions & 9 deletions src/View/TwigView.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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

0 comments on commit 09cf1ca

Please sign in to comment.