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

Upgrade assessment to Laravel 11 #6

Open
wants to merge 2 commits into
base: main
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
38 changes: 22 additions & 16 deletions .env.docker
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:M21+wakRh/NyC8o5HZeh81r+ggyRPjDJOreNfZsoev8=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

Expand All @@ -15,20 +26,27 @@ DB_USERNAME=my_user
DB_PASSWORD=my_password
DB_DATABASE=airalo_assessment

BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync

CACHE_STORE=file
CACHE_PREFIX=

SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_MAILER=log
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
Expand All @@ -43,16 +61,4 @@ AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"
48 changes: 27 additions & 21 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

Expand All @@ -15,22 +26,29 @@ DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_MAILER=log
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
Expand All @@ -43,16 +61,4 @@ AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text=auto
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
Expand All @@ -7,6 +8,7 @@
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Welcome. This project is meant to accompany you during your interview at Airalo.

## Requirements
- PHP >= 8.0
- PHP >= 8.3

## Installation
```
cd [YOUR WORKSPACE]
mkdir -p airalo-assessment/project
mkdir -p airalo-assessment/project
cd airalo-assessment/project
git clone git@github.com:Airalo/backend-assessment.git .
```
Expand Down Expand Up @@ -62,5 +62,5 @@ docker compose exec myapp php artisan <command>
```
docker compose exec myapp php artisan migrate
curl http://127.0.0.1:8000/db-test
# [{"Tables_in_airalo_assessment":"failed_jobs"},{"Tables_in_airalo_assessment":"migrations"},{"Tables_in_airalo_assessment":"password_resets"},{"Tables_in_airalo_assessment":"personal_access_tokens"},{"Tables_in_airalo_assessment":"users"}]
# [{"Tables_in_airalo_assessment":"cache"},{"Tables_in_airalo_assessment":"cache_locks"},{"Tables_in_airalo_assessment":"failed_jobs"},{"Tables_in_airalo_assessment":"job_batches"},{"Tables_in_airalo_assessment":"jobs"},{"Tables_in_airalo_assessment":"migrations"},{"Tables_in_airalo_assessment":"password_reset_tokens"},{"Tables_in_airalo_assessment":"personal_access_tokens"},{"Tables_in_airalo_assessment":"sessions"},{"Tables_in_airalo_assessment":"users"}]
```
32 changes: 0 additions & 32 deletions app/Console/Kernel.php

This file was deleted.

50 changes: 0 additions & 50 deletions app/Exceptions/Handler.php

This file was deleted.

9 changes: 2 additions & 7 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
abstract class Controller
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
//
}
67 changes: 0 additions & 67 deletions app/Http/Kernel.php

This file was deleted.

21 changes: 0 additions & 21 deletions app/Http/Middleware/Authenticate.php

This file was deleted.

17 changes: 0 additions & 17 deletions app/Http/Middleware/EncryptCookies.php

This file was deleted.

Loading