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

Allow extensions to have an install method, which is called on installation (to install assets, for example) #1656

Merged
merged 2 commits into from
Jul 29, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
CS fixes
bobdenotter committed Jul 29, 2020
commit 86cbde2107fd4e3bff66ecd35edb8c3ab7ddab1a
6 changes: 3 additions & 3 deletions src/Command/ExtensionsConfigureCommand.php
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ private function copyExtensionConfig(array $packages): void
$path = $this->getPackagePath($package);
$origin = $this->getRelativePath($path) . '/config/config.yaml';

[$namespace, $name] = explode('\\', mb_strtolower($this->getNamespace($package). '\\'));
[$namespace, $name] = explode('\\', mb_strtolower($this->getNamespace($package) . '\\'));
$destination = $this->getExtensionConfigPath($namespace, $name);

if (file_exists($origin) && ! file_exists($destination)) {
@@ -133,10 +133,10 @@ private function getExtensionServicesPath(string $path = '*'): string

private function getExtensionConfigPath(string $namespace, string $name): string
{
return sprintf("%s/config/extensions/%s%s%s.yaml",
return sprintf('%s/config/extensions/%s%s%s.yaml',
$this->projectDir,
$namespace,
(! empty($name) ? '-' : '' ),
(! empty($name) ? '-' : ''),
$name);
}