Skip to content

Commit

Permalink
Upgrade to 1.5.0 (read the commit)
Browse files Browse the repository at this point in the history
- Upgrade from Laravel 10 to 11
- Dropped PHP 8.1
- Seems laravel dropped APC cache
- Added some customizations in .env
- The default session driver is now "database"; it obviously requires running db migrations. If you are upgrading you have probably "SESSION_DRIVER" set to "file" in your .env. You have to change it manually to "database"
- Cache driver is kept to "file" as default. You may change it to "database", but usually providers do a huge user compression in databases, so it may slow down your whole website. Usually local file system (with SSD) is better, but you may need to test
- The default mailer is local sendmail
- Added some tables to handle cache and sessions in the database. Please remember to run `php artisan migrate` to update the schema if you want to try them
  • Loading branch information
FedericoHeichou committed Oct 5, 2024
1 parent b93e3b5 commit 4c9e44c
Show file tree
Hide file tree
Showing 32 changed files with 959 additions and 859 deletions.
25 changes: 21 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ APP_NAME=PizzaReader
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_TIMEZONE=UTC
APP_URL=http://localhost
ASSET_URL=${APP_URL}

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 @@ -17,15 +27,22 @@ DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

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

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_CONNECTION=database

CACHE_DRIVER=file
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1

REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
Expand All @@ -17,4 +18,5 @@ yarn-error.log
/.fleet
/.idea
/.vscode
/.zed
composer.phar
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# <p align="center">![PizzaReader Logo](storage/app/public/img/logo/PizzaReader-128.png)<br />PizzaReader</p>
<p align="center">
<img alt="Latest version" src="https://img.shields.io/badge/stable-v1.4.x-blue">
<img alt="PHP Version Support" src="https://img.shields.io/badge/php-%3E%3D8.1-blue">
<img alt="Laravel version" src="https://img.shields.io/badge/laravel-%5E10.0-lime">
<img alt="Latest version" src="https://img.shields.io/badge/stable-v1.5.x-blue">
<img alt="PHP Version Support" src="https://img.shields.io/badge/php-%3E%3D8.2-blue">
<img alt="Laravel version" src="https://img.shields.io/badge/laravel-%5E11.0-lime">
<img alt="License" src="https://img.shields.io/badge/license-GPL--3.0-green"></p>

# About PizzaReader
Expand Down Expand Up @@ -50,7 +50,7 @@ The `master` version usually is stable because branches are merged after being t
If you see my last commit is old, you can consider the `master` branch stable, I just forgot to tag.
Sometime I merge dependabot's pull requests on `master` without rebuilding the application because most of them are only for development.

The current stable version is based on Laravel 10 and requires PHP >=8.1.
The current stable version is based on Laravel 11 and requires PHP >=8.2.
Older versions are not mainted at all.

# Installation
Expand Down
1 change: 0 additions & 1 deletion app/Models/Chapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\File;
use Illuminate\Validation\Rule;

class Chapter extends Model {
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Comic.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Comic extends Model {
'hidden' => 'integer',
'comic_format_id' => 'integer',
'adult' => 'integer',
'order_index' => 'float',
'order_index' => 'decimal:3',
];

public function scopePublished($query) {
Expand Down
23 changes: 13 additions & 10 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ class User extends Authenticatable
];

/**
* The attributes that should be cast.
* Get the attributes that should be cast.
*
* @var array<string, string>
* @return array<string, string>
*/
protected $casts = [
'id' => 'integer',
'role_id' => 'integer',
'email_verified_at' => 'datetime',
'password' => 'hashed',
'last_login' => 'datetime',
'all_comics' => 'boolean',
];
protected function casts(): array
{
return [
'id' => 'integer',
'role_id' => 'integer',
'email_verified_at' => 'datetime',
'password' => 'hashed',
'last_login' => 'datetime',
'all_comics' => 'boolean',
];
}

public function role() {
return $this->belongsTo(Role::class);
Expand Down
36 changes: 2 additions & 34 deletions artisan
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,19 @@

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually. It's great to relax.
|
*/

// Register the Composer autoloader...
require __DIR__.'/vendor/autoload.php';

// Bootstrap Laravel and handle the command...
$app = require_once __DIR__.'/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/

$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);

$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);

/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/

$kernel->terminate($input, $status);

exit($status);
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"type": "project",
"description": "A Manga and Comics reader written in Laravel",
"keywords": [
"framework",
"laravel"
"manga",
"comics",
"reader"
],
"license": "Apache-2.0",
"require": {
"php": "^8.1",
"php": "^8.2",
"guzzlehttp/guzzle": "^7.2",
"intervention/image": "^2.5",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.2",
"laravel/framework": "^11.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.7",
"laravel/ui": "^4.0",
"ext-json": "*",
Expand All @@ -25,7 +26,7 @@
"laravel/pint": "^1.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
},
Expand Down
Loading

0 comments on commit 4c9e44c

Please sign in to comment.