Skip to content

Commit

Permalink
feat(core): strong typing, repositories (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzarbn committed Oct 11, 2023
1 parent 04e1e25 commit d49464c
Show file tree
Hide file tree
Showing 142 changed files with 1,463 additions and 1,195 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": ">=7.4",
"php": ">=8.0",
"ext-json": "*",
"doctrine/dbal": "^2.9|^3.1",
"illuminate/bus": ">=6.0",
Expand All @@ -26,6 +26,7 @@
"illuminate/http": ">=6.0",
"illuminate/pagination": ">=6.0",
"illuminate/support": ">=6.0",
"laravel/legacy-factories": "^1.3",
"symfony/yaml": "^5.3|^6.0"
},
"require-dev": {
Expand Down
3 changes: 3 additions & 0 deletions config/orion.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
return [
'namespaces' => [
'models' => 'App\\Models\\',
'repositories' => 'App\\Repositories\\',
'controllers' => 'App\\Http\\Controllers\\',
'requests' => 'App\\Http\\Requests\\',
'resources' => 'App\\Http\\Resources\\'
],
'auth' => [
'guard' => 'api',
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/BuildSpecsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Illuminate\Console\Command;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Support\Facades\Storage;
use InvalidArgumentException;
use Orion\Contracts\Specs\Formatter;
use Orion\Contracts\Specs\Parser;
Expand All @@ -14,7 +15,6 @@
use Orion\Specs\Formatters\YamlFormatter;
use Orion\Specs\Parsers\JsonParser;
use Orion\Specs\Parsers\YamlParser;
use Storage;
use Throwable;

class BuildSpecsCommand extends Command
Expand Down
2 changes: 2 additions & 0 deletions src/Concerns/BuildsResponses.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Orion\Concerns;

use Illuminate\Contracts\Pagination\LengthAwarePaginator;
Expand Down
7 changes: 3 additions & 4 deletions src/Concerns/DisableAuthorization.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php

declare(strict_types=1);

namespace Orion\Concerns;

trait DisableAuthorization
{
/**
* @var bool $authorizationDisabled
*/
protected $authorizationDisabled = true;
protected bool $authorizationDisabled = true;
}
7 changes: 2 additions & 5 deletions src/Concerns/DisablePagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@

trait DisablePagination
{
/**
* @var bool $paginationDisabled
*/
protected $paginationDisabled = true;
}
protected bool $paginationDisabled = true;
}
1 change: 1 addition & 0 deletions src/Concerns/ExtendsResources.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

declare(strict_types=1);

namespace Orion\Concerns;

Expand Down
2 changes: 2 additions & 0 deletions src/Concerns/HandlesAuthorization.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Orion\Concerns;

use Illuminate\Auth\Access\Response;
Expand Down
Loading

0 comments on commit d49464c

Please sign in to comment.