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

Feature/upgrade to laravel10 #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion development.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.4'

services:
web:
image: webdevops/php-nginx:8.0-alpine
image: webdevops/php-nginx:8.1-alpine
restart: ${SERVICES_RESTART}
working_dir: /var/www
depends_on:
Expand Down
4 changes: 2 additions & 2 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM webdevops/php:8.0-alpine AS builder
FROM webdevops/php:8.1-alpine AS builder
WORKDIR /app
COPY src .
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN composer install --no-dev

FROM webdevops/php-nginx:8.0-alpine
FROM webdevops/php-nginx:8.1-alpine
WORKDIR /var/www
COPY --from=builder /app .
# prepare laravel app
Expand Down
8 changes: 4 additions & 4 deletions web/src/app/Console/Commands/FtpAccountAddCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
use App\Features\CreateAccountFeature;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Lucid\Foundation\ServesFeaturesTrait;
use Lucid\Bus\ServesFeatures;

class FtpAccountAddCommand extends BaseCommand
{
use ServesFeaturesTrait;
use ServesFeatures;

/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ftp:account:add {domain} {login}
{--dir=/}
protected $signature = 'ftp:account:add {domain} {login}
{--dir=/}
{--desc=}
{--pass=secret}
{--status=1}';
Expand Down
6 changes: 3 additions & 3 deletions web/src/app/Console/Commands/FtpAccountChangeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
use App\Features\UpdateAccountFeature;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Lucid\Foundation\ServesFeaturesTrait;
use Lucid\Bus\ServesFeatures;

class FtpAccountChangeCommand extends BaseCommand
{
use ServesFeaturesTrait;
use ServesFeatures;

/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ftp:account:change {login}
{--dir=/}
{--dir=/}
{--desc=}
{--pass=secret}
{--status=1}';
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/Console/Commands/FtpAccountListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
use App\Data\Repositories\Interfaces\DomainRepository;
use App\Features\ListAccountsFeature;
use Illuminate\Http\Request;
use Lucid\Foundation\ServesFeaturesTrait;
use Lucid\Bus\ServesFeatures;

class FtpAccountListCommand extends BaseCommand
{
use ServesFeaturesTrait;
use ServesFeatures;

/**
* The name and signature of the console command.
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/Console/Commands/FtpAccountRmCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
use App\Features\DeleteAccountFeature;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Lucid\Foundation\ServesFeaturesTrait;
use Lucid\Bus\ServesFeatures;

class FtpAccountRmCommand extends BaseCommand
{
use ServesFeaturesTrait;
use ServesFeatures;

/**
* The name and signature of the console command.
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/Console/Commands/FtpDomainListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
use App\Features\ListDomainsFeature;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Lucid\Foundation\ServesFeaturesTrait;
use Lucid\Bus\ServesFeatures;

class FtpDomainListCommand extends BaseCommand
{
use ServesFeaturesTrait;
use ServesFeatures;

/**
* The name and signature of the console command.
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Account/Jobs/CreateAccountJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use App\Data\Repositories\Interfaces\AccountRepository;
use App\Http\Requests\CreateAccountRequest;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class CreateAccountJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Account/Jobs/DeleteAccountJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use App\Data\Criteria\DomainIDCriteria;
use App\Data\Repositories\Interfaces\AccountRepository;
use Illuminate\Http\Request;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class DeleteAccountJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Account/Jobs/GetAccountJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use App\Data\Criteria\DomainIDCriteria;
use App\Data\Repositories\Interfaces\AccountRepository;
use Illuminate\Http\Request;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class GetAccountJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Account/Jobs/GetAccountsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use App\Data\Criteria\DomainIDCriteria;
use App\Data\Repositories\Interfaces\AccountRepository;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class GetAccountsJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Account/Jobs/GetDomainIDJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace App\Domains\Account\Jobs;

use Illuminate\Http\Request;
use Lucid\Foundation\Job;
use Lucid\Units\Job;
use Illuminate\Contracts\Auth\Guard;

class GetDomainIDJob extends Job
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Account/Jobs/UpdateAccountJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Data\Models\Account;
use App\Data\Repositories\Interfaces\AccountRepository;
use App\Http\Requests\UpdateAccountRequest;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class UpdateAccountJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Domain/Jobs/GetDomainsJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use App\Data\Criteria\IDCriteria;
use App\Data\Repositories\Interfaces\DomainRepository;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class GetDomainsJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Health/Jobs/CheckDBJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace App\Domains\Health\Jobs;

use App\Data\Repositories\Interfaces\AccountRepository;
use Lucid\Foundation\Job;
use Lucid\Units\Job;

class CheckDBJob extends Job
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Health/Jobs/CheckFTPJob.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace App\Domains\Health\Jobs;

use Lucid\Foundation\Job;
use Lucid\Units\Job;
use \FtpClient\FtpClient;

class CheckFTPJob extends Job
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Health/Jobs/CheckSSLJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace App\Domains\Health\Jobs;

use Carbon\Carbon;
use Lucid\Foundation\Job;
use Lucid\Units\Job;
use Spatie\SslCertificate\SslCertificate;

class CheckSSLJob extends Job
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Domains/Http/Jobs/RespondWithJsonJob.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace App\Domains\Http\Jobs;

use Lucid\Foundation\Job;
use Lucid\Units\Job;
use Illuminate\Routing\ResponseFactory;

class RespondWithJsonJob extends Job
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/CheckHealthFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Domains\Health\Jobs\CheckFTPJob;
use App\Domains\Health\Jobs\CheckSSLJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;
use Illuminate\Http\Request;

class CheckHealthFeature extends Feature
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/CreateAccountFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Domains\Account\Jobs\GetDomainIDJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Illuminate\Http\Request;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;

class CreateAccountFeature extends Feature
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/DeleteAccountFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use App\Domains\Account\Jobs\DeleteAccountJob;
use App\Domains\Account\Jobs\GetDomainIDJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;

class DeleteAccountFeature extends Feature
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/ListAccountsFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Domains\Account\Jobs\GetDomainIDJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Illuminate\Http\Request;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;

class ListAccountsFeature extends Feature
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/ListDomainsFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Domains\Domain\Jobs\GetDomainsJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Illuminate\Http\Request;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;

class ListDomainsFeature extends Feature
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/ShowAccountFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use App\Domains\Account\Jobs\GetAccountJob;
use App\Domains\Account\Jobs\GetDomainIDJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;

class ShowAccountFeature extends Feature
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Features/UpdateAccountFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Domains\Account\Jobs\UpdateAccountJob;
use App\Domains\Http\Jobs\RespondWithJsonJob;
use Illuminate\Http\Request;
use Lucid\Foundation\Feature;
use Lucid\Units\Feature;

class UpdateAccountFeature extends Feature
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Lucid\Foundation\Http\Controller as LucidController;
use Lucid\Units\Controller as LucidController;

/**
* @OA\OpenApi(
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/Http/Middleware/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Middleware;

use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;

class TrustProxies extends Middleware
{
Expand Down
2 changes: 0 additions & 2 deletions web/src/app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class AuthServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->registerPolicies();

Auth::viaRequest('bearer-token', function($request){
// remove "Bearer " from start
$token = substr($request->header('Authorization'), 7);
Expand Down
22 changes: 13 additions & 9 deletions web/src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
"description": "The Laravel Framework.",
"license": "MIT",
"type": "project",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ksimenic/lucid"
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"darkaonline/l5-swagger": "^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^v8.26",
"laravel/framework": "^10.0",
"laravel/tinker": "^2.5",
"lucid-arch/laravel-foundation": "^8.0",
"lucidarch/lucid": "dev-latest",
"nicolab/php-ftp-client": "^1.5",
"prettus/l5-repository": "^2.7",
"spatie/ssl-certificate": "^1.22"
},
"require-dev": {
"facade/ignition": "^2.5",
"fzaninotto/faker": "^1.9.1",
"spatie/laravel-ignition": "^2.0",
"fakerphp/faker": "^1.0",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.1",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3.3"
},
"autoload": {
Expand Down Expand Up @@ -60,6 +64,6 @@
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true
}
Loading