From c947d57f212cddd21a623903760afc8a7fa9f1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Sun, 14 May 2023 08:29:25 -0400 Subject: [PATCH 1/3] Upgrade Laravel 8 to 10 --- README.md | 2 +- web/app/Http/Kernel.php | 2 +- web/app/Http/Middleware/TrustProxies.php | 2 +- web/composer.json | 39 ++++++++++++------------ 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 452bdd11f..cccf904dc 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ Open the URL generated in your console. Once you grant permission to the app, yo ### Application Storage -This template uses [Laravel's Eloquent framework](https://laravel.com/docs/9.x/eloquent) to store Shopify session data. +This template uses [Laravel's Eloquent framework](https://laravel.com/docs/10.x/eloquent) to store Shopify session data. It provides migrations to create the necessary tables in your database, and it stores and loads session data from them. The database that works best for you depends on the data your app needs and how it is queried. diff --git a/web/app/Http/Kernel.php b/web/app/Http/Kernel.php index 4af497fa0..7e87caa7a 100644 --- a/web/app/Http/Kernel.php +++ b/web/app/Http/Kernel.php @@ -16,7 +16,7 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, + \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, diff --git a/web/app/Http/Middleware/TrustProxies.php b/web/app/Http/Middleware/TrustProxies.php index a297111e7..c0617abea 100644 --- a/web/app/Http/Middleware/TrustProxies.php +++ b/web/app/Http/Middleware/TrustProxies.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -use Fideloper\Proxy\TrustProxies as Middleware; +use Illuminate\Http\Middleware\TrustProxies as Middleware; use Illuminate\Http\Request; class TrustProxies extends Middleware diff --git a/web/composer.json b/web/composer.json index dc6382c2d..bffd4cd00 100644 --- a/web/composer.json +++ b/web/composer.json @@ -2,31 +2,28 @@ "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", - "keywords": [ - "framework", - "laravel" - ], + "keywords": ["framework", "laravel"], "license": "UNLICENSED", "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "^8.1", "ext-xml": "*", "ext-zip": "*", - "doctrine/dbal": "^3.1", - "fideloper/proxy": "^4.4", - "fruitcake/laravel-cors": "^3.0", - "guzzlehttp/guzzle": "^7.0.1", - "laravel/framework": "^8.12", - "laravel/tinker": "^2.5", - "shopify/shopify-api": "^5.0", + "doctrine/dbal": "^3.0", + "guzzlehttp/guzzle": "^7.2", + "laravel/framework": "^10.0", + "laravel/sanctum": "^3.2", + "laravel/tinker": "^2.8", + "shopify/shopify-api": "^4.0", "squizlabs/php_codesniffer": "^3.6" }, "require-dev": { - "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", - "laravel/sail": "^1.0.1", - "mockery/mockery": "^1.4.2", - "nunomaduro/collision": "^5.0", - "phpunit/phpunit": "^9.3.3" + "laravel/pint": "^1.0", + "laravel/sail": "^1.18", + "mockery/mockery": "^1.4.4", + "nunomaduro/collision": "^7.0", + "phpunit/phpunit": "^10.1", + "spatie/laravel-ignition": "^2.0" }, "autoload": { "psr-4": { @@ -68,8 +65,12 @@ "config": { "optimize-autoloader": true, "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "pestphp/pest-plugin": true, + "php-http/discovery": true + } }, - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true } From 70db27e9e31988fe583b253fa15c961970aece21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Sun, 14 May 2023 08:37:25 -0400 Subject: [PATCH 2/3] CI > Removing support to PHP 8.0 --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2040b3f45..a534c6f3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ jobs: fail-fast: false matrix: php-version: - - "8.0" - "8.1" - "8.2" defaults: From 15611c412dd7f557d0b072fa09497df3f54193a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Corr=C3=AAa=20Gomes?= Date: Sun, 14 May 2023 09:20:45 -0400 Subject: [PATCH 3/3] Upgrade Shopify SDK --- web/composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/composer.json b/web/composer.json index bffd4cd00..6182013e4 100644 --- a/web/composer.json +++ b/web/composer.json @@ -5,7 +5,7 @@ "keywords": ["framework", "laravel"], "license": "UNLICENSED", "require": { - "php": "^8.1", + "php": "~8.1.0 || ~8.2.0", "ext-xml": "*", "ext-zip": "*", "doctrine/dbal": "^3.0", @@ -13,7 +13,7 @@ "laravel/framework": "^10.0", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", - "shopify/shopify-api": "^4.0", + "shopify/shopify-api": "^5.0", "squizlabs/php_codesniffer": "^3.6" }, "require-dev": {