Skip to content

Commit

Permalink
feat: Laravel 11 (#110)
Browse files Browse the repository at this point in the history
* feat: Laravel 11

* start of moving to vite

* update to vite
  • Loading branch information
blt950 authored Dec 29, 2024
1 parent f76667d commit 5d89421
Show file tree
Hide file tree
Showing 19 changed files with 3,630 additions and 10,953 deletions.
11 changes: 10 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,13 @@ BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=360
SESSION_LIFETIME=360

VITE_THEME_PRIMARY="#1a475f"
VITE_THEME_SECONDARY="#484b4c"
VITE_THEME_TERTIARY="#011328"
VITE_THEME_INFO="#17a2b8"
VITE_THEME_SUCCESS="#41826e"
VITE_THEME_WARNING="#ff9800"
VITE_THEME_DANGER="#b63f3f"
VITE_THEME_BORDER_RADIUS="2px"
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/node_modules
/public/hot
/public/storage
public/css/*
public/js/*
public/build/*
public/fonts/vendor/*
/storage/*.key
/vendor
Expand All @@ -18,3 +17,5 @@ apache/*
public/js/app.js.LICENSE.txt
docker-compose.local.yaml
public/mix-manifest.json
.DS_Store
resources/sass/_env.scss
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Intermediate build container for front-end resources
FROM docker.io/library/node:22.5.1-alpine as frontend
FROM docker.io/library/node:23.5.0-alpine as frontend
# Easy to prune intermediary containers
LABEL stage=build

WORKDIR /app
COPY ./ /app/

RUN npm ci --omit dev && \
npm run prod
npm run build

####################################################################################################
# Primary container

FROM docker.io/library/php:8.2.21-apache-bullseye
FROM docker.io/library/php:8.3.13-apache-bookworm

# Default container port for the apache configuration
EXPOSE 80 443
Expand All @@ -35,7 +35,7 @@ COPY ./container/configs/apache.conf /etc/apache2/apache2.conf
COPY ./container/configs/php.ini /usr/local/etc/php/php.ini

# Install PHP extension(s)
COPY --from=mlocati/php-extension-installer:2.2.19 /usr/bin/install-php-extensions /usr/local/bin/
COPY --from=mlocati/php-extension-installer:2.7.8 /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions pdo_mysql opcache

# Install composer
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Handover
Centralised Handover with OAuth2, using `Laravel 10`. Created by [Daniel L.](https://github.com/blt950) (1352906) and [Matan B.](https://github.com/MatanBudimir) (1375048). An extra special thanks to VATSIM UK's open source core system which helped us on the right track with this one.
Centralised Handover with OAuth2, using `Laravel 11`. Created by [Daniel L.](https://github.com/blt950) (1352906) and [Matan B.](https://github.com/MatanBudimir) (1375048). An extra special thanks to VATSIM UK's open source core system which helped us on the right track with this one.

## Prerequisites

Expand All @@ -14,7 +14,7 @@ In the instructions where we use `docker exec`, we assume your container is name
If you don't want to use Docker, you need:
- An environment that can host PHP websites, such as Apache, Ngnix or similar.
- MySQL database to store data.
- Comply with [Laravel 10 Requirements](https://laravel.com/docs/10.x/deployment)
- Comply with [Laravel 11 Requirements](https://laravel.com/docs/11.x/deployment)
- Manually build the composer, npm and setting up cron jobs and clearing all caches on updates.

## Setup and install
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function login(Request $request)
$request->session()->put('oauthstate', $this->provider->getState());
return redirect()->away($authorizationUrl);
} else if ($request->input('state') !== session()->pull('oauthstate')) {
return redirect()->to('/')->withError("Login state mismatch error. Please try again. If this persists, please contact Web Services.");
return redirect()->to('/')->withError("Login state mismatch error. Please try again. If this persists, please contact technical department.");
} else {
return $this->verifyLogin($request);
}
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
],
"license": "MIT",
"require": {
"php": "^8.1.10",
"laravel/framework": "^10.0",
"laravel/passport": "^11.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^4.0",
"php": "^8.3.13",
"laravel/framework": "^11.0",
"laravel/passport": "^12.0",
"laravel/tinker": "^2.9",
"laravel/ui": "^4.5.2",
"league/oauth2-client": "^2.6.1",
"sentry/sentry-laravel": "^3.7.3"
"sentry/sentry-laravel": "^4.3"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.3",
"spatie/laravel-ignition": "^2.0",
"fakerphp/faker": "^1.23.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0"
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^11.0"
},
"config": {
"optimize-autoloader": true,
Expand Down
Loading

0 comments on commit 5d89421

Please sign in to comment.