-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #429 from jolicode/fix/self-update-composer
fix(composer): remove self update command from composer when added
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Castor\Import\Remote; | ||
|
||
use Composer\Command\SelfUpdateCommand; | ||
use Composer\Console\Application as BaseApplication; | ||
use Symfony\Component\DependencyInjection\Attribute\Exclude; | ||
|
||
/** @internal */ | ||
#[Exclude] | ||
final class ComposerApplication extends BaseApplication | ||
{ | ||
protected function getDefaultCommands(): array | ||
{ | ||
$commands = []; | ||
|
||
foreach (parent::getDefaultCommands() as $command) { | ||
if ($command instanceof SelfUpdateCommand) { | ||
continue; | ||
} | ||
|
||
$commands[] = $command; | ||
} | ||
|
||
return $commands; | ||
} | ||
} |