Skip to content

Commit

Permalink
Merge branch 'master' into 1.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nomadicjosh committed Sep 22, 2023
2 parents ef023b5 + 58d8dd6 commit de3ca15
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ vendor
.env
.env.local
.php-cs-fixer.cache
.phpunit.result.cache
composer.lock
contents.php
default.php
4 changes: 3 additions & 1 deletion App/Infrastructure/Providers/ApiRouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Infrastructure\Providers;

use Codefy\Framework\Support\CodefyServiceProvider;
use Qubus\Routing\Router;

final class ApiRouteServiceProvider extends CodefyServiceProvider
{
Expand All @@ -14,6 +15,7 @@ public function boot(): void
return;
}

$router = $this->codefy->make('router');
/** @var $router Router */
$router = $this->codefy->make(name: 'router');
}
}
6 changes: 6 additions & 0 deletions App/Infrastructure/Providers/WebRouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
namespace App\Infrastructure\Providers;

use Codefy\Framework\Support\CodefyServiceProvider;
use Qubus\Routing\Exceptions\TooLateToAddNewRouteException;
use Qubus\Routing\Router;

final class WebRouteServiceProvider extends CodefyServiceProvider
{
/**
* @throws TooLateToAddNewRouteException
*/
public function boot(): void
{
if ($this->codefy->isRunningInConsole()) {
return;
}

/** @var $router Router */
$router = $this->codefy->make(name: 'router');

$router->get('/', 'HomeController@index');
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
}
},
"scripts": {
"test": "vendor/bin/pest",
"cs-check": "phpcs",
"cs-fix": "phpcbf"
},
Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
Codefy\Framework\Console\Commands\RedoCommand::class,
Codefy\Framework\Console\Commands\ListCommand::class,
Codefy\Framework\Console\Commands\ServeCommand::class,
Codefy\Framework\Console\Commands\UuidCommand::class,
Codefy\Framework\Console\Commands\UlidCommand::class,

/*
* Application Console Commands . . .
Expand Down

0 comments on commit de3ca15

Please sign in to comment.