From cadbd5a5905d854a1df8155636e73aa2bb76397f Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Tue, 12 Mar 2024 07:36:47 -0400 Subject: [PATCH] Laravel 11.x Compatibility (#84) --- .github/workflows/run-tests.yml | 11 ++++++++--- README.md | 13 ++----------- composer.json | 6 +++--- tests/TestCase.php | 2 ++ 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c311289..f9c649e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,19 +1,24 @@ name: run-tests -on: [push, pull_request] +on: + - push + - pull_request jobs: test: runs-on: ubuntu-latest + strategy: fail-fast: true matrix: - php: [8.3, 8.2, 8.1] - laravel: [10.*] + php: [8.3, 8.2] + laravel: ["10.*", "11.*"] dependency-version: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} diff --git a/README.md b/README.md index fbc6b48..6e6b62b 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,10 @@ This Laravel package allows you to search through multiple Eloquent models. It s ❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider [sponsoring the maintenance and development](https://github.com/sponsors/pascalbaljet). Keeping track of issues and pull requests takes time, but we're happy to help! -## Laravel Splade - -**Did you hear about Laravel Splade? 🤩** - -It's the *magic* of Inertia.js with the *simplicity* of Blade. [Splade](https://github.com/protonemedia/laravel-splade) provides a super easy way to build Single Page Applications using Blade templates. Besides that magic SPA-feeling, it comes with more than ten components to sparkle your app and make it interactive, all without ever leaving Blade. ## Requirements -* PHP 8.1 or higher +* PHP 8.2 or higher * MySQL 8.0+ * Laravel 10.0+ @@ -401,18 +396,14 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## Other Laravel packages -* [`Form Components Pro`](https://github.com/protonemedia/form-components-pro): A set of Vue 3 components to rapidly build forms with Tailwind CSS 3. It supports validation, model binding, integrates with Autosize/Choices.js/Flatpickr, includes default vendor styling and is fully customizable! Even better in conjunction with Laravel Jetstream + Inertia.js. -* [`Laravel Analytics Event Tracking`](https://github.com/protonemedia/laravel-analytics-event-tracking): Laravel package to easily send events to Google Analytics. * [`Laravel Blade On Demand`](https://github.com/protonemedia/laravel-blade-on-demand): Laravel package to compile Blade templates in memory. * [`Laravel Eloquent Scope as Select`](https://github.com/protonemedia/laravel-eloquent-scope-as-select): Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery. -* [`Laravel Eloquent Where Not`](https://github.com/protonemedia/laravel-eloquent-where-not): This Laravel package allows you to flip/invert an Eloquent scope, or really any query constraint. * [`Laravel FFMpeg`](https://github.com/protonemedia/laravel-ffmpeg): This package provides an integration with FFmpeg for Laravel. The storage of the files is handled by Laravel's Filesystem. -* [`Laravel Form Components`](https://github.com/protonemedia/laravel-form-components): Blade components to rapidly build forms with Tailwind CSS Custom Forms and Bootstrap 4. Supports validation, model binding, default values, translations, includes default vendor styling and fully customizable! * [`Laravel MinIO Testing Tools`](https://github.com/protonemedia/laravel-minio-testing-tools): Run your tests against a MinIO S3 server. * [`Laravel Mixins`](https://github.com/protonemedia/laravel-mixins): A collection of Laravel goodies. * [`Laravel Paddle`](https://github.com/protonemedia/laravel-paddle): Paddle.com API integration for Laravel with support for webhooks/events. +* [`Laravel Task Runner`](https://github.com/protonemedia/laravel-task-runner): Write Shell scripts like Blade Components and run them locally or on a remote server. * [`Laravel Verify New Email`](https://github.com/protonemedia/laravel-verify-new-email): This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified. -* [`Laravel WebDAV`](https://github.com/protonemedia/laravel-webdav): WebDAV driver for Laravel's Filesystem. * [`Laravel XSS Protection`](https://github.com/protonemedia/laravel-xss-protection): Laravel Middleware to protect your app against Cross-site scripting (XSS). It sanitizes request input, and it can sanatize Blade echo statements. ### Security diff --git a/composer.json b/composer.json index 9a20306..6744232 100644 --- a/composer.json +++ b/composer.json @@ -16,12 +16,12 @@ } ], "require": { - "php": "^8.1|^8.2|^8.3", - "illuminate/support": "^10.0" + "php": "^8.2|^8.3", + "illuminate/support": "^10.0|^11.0" }, "require-dev": { "mockery/mockery": "^1.4.4", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^8.0|^9.0", "phpunit/phpunit": "^10.4" }, "autoload": { diff --git a/tests/TestCase.php b/tests/TestCase.php index b80fb59..7cea102 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -50,6 +50,8 @@ protected function initDatabase($prefix = '') ]) : [], ]); + DB::setDefaultConnection('mysql'); + $this->artisan('migrate:fresh'); include_once __DIR__ . '/create_tables.php';