Skip to content

Commit

Permalink
Remove trailing slash from plugin path when creating PSR4 mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
petitphp committed May 19, 2020
1 parent 215f597 commit 7091545
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Command/ScaffoldPluginCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ protected function execute( InputInterface $input, OutputInterface $output ) {

try {
$composerJson = $composerFile->read();
$composerJson['autoload']['psr-4'][ $pluginNamespace . "\\" ] = $installPath . '/classes/';

$composerJson['autoload']['psr-4'][ $pluginNamespace . "\\" ] = rtrim( $installPath, '/' ) . '/classes/';

$composerFile->write( $composerJson );
$output->writeln( "The namespace have been added to the composer.json file !" );
Expand Down

0 comments on commit 7091545

Please sign in to comment.