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

Removed class aliases and legacy configure loading #1

Merged
merged 1 commit into from
Mar 8, 2020
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
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