From b92c3f2c57c70d52ee8b76c76be8921a0d180a2e Mon Sep 17 00:00:00 2001 From: Anton Komarev <1849174+antonkomarev@users.noreply.github.com> Date: Wed, 1 Mar 2023 21:24:18 +0300 Subject: [PATCH] Add Laravel v10 support (#35) --- .github/workflows/tests.yml | 6 +++++- CHANGELOG.md | 22 +++++++++++++++++++++- composer.json | 10 +++++----- tests/AbstractTestCase.php | 7 +------ tests/Facades/OptimusTest.php | 21 +++------------------ tests/OptimusManagerTest.php | 2 +- 6 files changed, 36 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8b17604..47b8eb1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,14 +10,18 @@ jobs: matrix: os: [ ubuntu-latest ] php: [ 8.0, 8.1, 8.2 ] - laravel: [ 9.* ] + laravel: [ 9.*, 10.* ] dependency-version: [ prefer-lowest, prefer-stable ] exclude: - laravel: 9.* php: 8.2 + - laravel: 10.* + php: 8.0 include: - laravel: 9.* testbench: 7.* + - laravel: 10.* + testbench: 8.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf1329..5ec270d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,24 @@ All notable changes to `cybercog/laravel-optimus` will be documented in this fil ## [Unreleased] +## [3.9.0] - 2023-03-01 + +### Added + +- ([#35]) Added Laravel 10 support + +### Removed + +- ([#35]) Dropped Laravel 5.5 support +- ([#35]) Dropped Laravel 5.6 support +- ([#35]) Dropped Laravel 5.7 support +- ([#35]) Dropped Laravel 5.8 support +- ([#35]) Dropped Laravel 6 support +- ([#35]) Dropped Laravel 7 support +- ([#35]) Dropped PHP 7.1 support +- ([#35]) Dropped PHP 7.2 support +- ([#35]) Dropped PHP 7.3 support + ## [3.8.0] - 2022-02-11 ### Added @@ -100,7 +118,8 @@ All notable changes to `cybercog/laravel-optimus` will be documented in this fil Initial release -[Unreleased]: https://github.com/cybercog/laravel-optimus/compare/3.8.0...master +[Unreleased]: https://github.com/cybercog/laravel-optimus/compare/3.9.0...master +[3.9.0]: https://github.com/cybercog/laravel-optimus/compare/3.8.0...3.9.0 [3.8.0]: https://github.com/cybercog/laravel-optimus/compare/3.7.0...3.8.0 [3.7.0]: https://github.com/cybercog/laravel-optimus/compare/3.6.0...3.7.0 [3.6.0]: https://github.com/cybercog/laravel-optimus/compare/3.5.0...3.6.0 @@ -115,6 +134,7 @@ Initial release [2.1.0]: https://github.com/cybercog/laravel-optimus/compare/2.0.0...2.1.0 [2.0.0]: https://github.com/cybercog/laravel-optimus/compare/1.0.0...2.0.0 +[#35]: https://github.com/cybercog/laravel-optimus/pull/35 [#32]: https://github.com/cybercog/laravel-optimus/pull/32 [#31]: https://github.com/cybercog/laravel-optimus/pull/31 [#30]: https://github.com/cybercog/laravel-optimus/pull/30 diff --git a/composer.json b/composer.json index a62d488..ad83ae3 100644 --- a/composer.json +++ b/composer.json @@ -34,14 +34,14 @@ "docs": "https://github.com/cybercog/laravel-optimus/wiki" }, "require": { - "php": "^7.1.3|^8.0", - "graham-campbell/manager": "^4.0", - "illuminate/contracts": "^5.5|^6.0|^7.0|^8.0|^9.0", - "illuminate/support": "^5.5|^6.0|^7.0|^8.0|^9.0", + "php": "^7.4|^8.0", + "graham-campbell/manager": "^5.0", + "illuminate/contracts": "^8.0|^9.0|^10.0", + "illuminate/support": "^8.0|^9.0|^10.0", "jenssegers/optimus": "^0.2.2" }, "require-dev": { - "graham-campbell/testbench": "^5.0", + "graham-campbell/testbench": "^6.0", "mockery/mockery": "^1.0", "phpunit/phpunit": "^9.6" }, diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index fc6f561..d689f61 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -18,12 +18,7 @@ abstract class AbstractTestCase extends AbstractPackageTestCase { - /** - * Get the service provider class. - * - * @return string - */ - protected function getServiceProviderClass() + protected static function getServiceProviderClass(): string { return OptimusServiceProvider::class; } diff --git a/tests/Facades/OptimusTest.php b/tests/Facades/OptimusTest.php index d2fbb5a..b088337 100644 --- a/tests/Facades/OptimusTest.php +++ b/tests/Facades/OptimusTest.php @@ -22,32 +22,17 @@ final class OptimusTest extends AbstractTestCase { use FacadeTrait; - /** - * Get the facade accessor. - * - * @return string - */ - protected function getFacadeAccessor(): string + protected static function getFacadeAccessor(): string { return 'optimus'; } - /** - * Get the facade class. - * - * @return string - */ - protected function getFacadeClass(): string + protected static function getFacadeClass(): string { return Optimus::class; } - /** - * Get the facade root. - * - * @return string - */ - protected function getFacadeRoot(): string + protected static function getFacadeRoot(): string { return OptimusManager::class; } diff --git a/tests/OptimusManagerTest.php b/tests/OptimusManagerTest.php index ae4eacd..994f51b 100644 --- a/tests/OptimusManagerTest.php +++ b/tests/OptimusManagerTest.php @@ -40,7 +40,7 @@ public function testCreateConnection(): void $this->assertArrayHasKey('optimus', $manager->getConnections()); } - protected function getManager(array $config) + protected function getManager(array $config): OptimusManager { $repository = Mockery::mock(Repository::class); $factory = Mockery::mock(OptimusFactory::class);