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

Base package registration in Laravel #7

Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ psalm.xml
vendor
.php-cs-fixer.cache

.DS_Store
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shell:=/bin/bash

composer_install:
@php81 composer install
17 changes: 13 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
},
"require-dev": {
"pestphp/pest": "^2.0",
"laravel/pint": "^2.3",
"spatie/ray": "^1.28"
"laravel/pint": "^v1.13.2",
"spatie/ray": "^1.28",
"illuminate/support": "^9.21|^10.0",
"illuminate/console": "^v9.21|^v10.0"
},
"autoload": {
"psr-4": {
Expand All @@ -45,5 +47,12 @@
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
"prefer-stable": true,
"extra": {
"laravel": {
"providers": [
"EmilHorlyck\\LaravelPareto\\ServiceProvider"
]
}
}
}
4 changes: 2 additions & 2 deletions src/Commands/TestCommand.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace EmilHorlyck\LaravelPareto;
namespace EmilHorlyck\LaravelPareto\Commands;

use Illuminate\Console\Command;

Expand All @@ -12,6 +12,6 @@ class TestCommand extends Command

public function handle(): int
{
this->info('Test command');
$this->info('Test command');
}
}
7 changes: 0 additions & 7 deletions src/LaravelPareto.php

This file was deleted.

28 changes: 28 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace EmilHorlyck\LaravelPareto;

use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use EmilHorlyck\LaravelPareto\Commands\TestCommand;

class ServiceProvider extends BaseServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
}

/**
* Bootstrap services.
*/
public function boot(): void
{
if ($this->app->runningInConsole()) {
$this->commands([
TestCommand::class
]);
}
}
}