Skip to content

Commit

Permalink
Merge pull request #1 from Muetze42/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Muetze42 authored Oct 22, 2023
2 parents 7f351aa + 5fc4af0 commit ef8aec9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Command extends LuraInstaller
* @see https://getcomposer.org/doc/04-schema.md#type
* @var array|string[]
*/
protected array $validTypes = [
protected array $outOfTheBoxSupportedTypes = [
'library',
'project',
'metapackage',
Expand Down Expand Up @@ -306,6 +306,8 @@ public function getIO(): IOInterface|NullIO
* @param bool|null $disableScripts If null, reads --no-scripts as default
*
* @throws \Composer\Json\JsonValidationException
* @author Nils Adermann <naderman@naderman.de>
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
public function tryComposer(?bool $disablePlugins = null, ?bool $disableScripts = null): ?Composer
{
Expand Down Expand Up @@ -335,7 +337,6 @@ protected function getThePlatformRequirementFilter(): PlatformRequirementFilterI
return PlatformRequirementFilterFactory::ignoreNothing();
}


/**
* Get Major Version of a Version string.
*
Expand Down
4 changes: 2 additions & 2 deletions src/ConfigurationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ protected function determinePackageType(): void
{
$this->type = $this->command->ask('Package Type');

if ($this->type && !in_array($this->type, $this->validTypes)) {
if ($this->type && !in_array($this->type, $this->outOfTheBoxSupportedTypes)) {
$this->command->warn(
'Warning: The package type ’' . $this->type .
'’ will need to provide an installer capable of installing packages of that type.'
);
$this->command->warn(
'Out of the box, Composer supports four types: ' .
implode(', ', $this->validTypes)
implode(', ', $this->outOfTheBoxSupportedTypes)
);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/GeneratorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ protected function createLaravelPackageFiles(): void
'routes/api.php',
$this->getContents('stubs/routes/api.stub') . "\n"
);
$this->command->cwdDisk->makeDirectory('src/Http/Controllers');
$this->command->cwdDisk->makeDirectory('src/Http/Middleware');
}

if ($this->laravelPackageResources['Language Files']) {
Expand Down

0 comments on commit ef8aec9

Please sign in to comment.