From 82dc9ca5b3927426999450a8b6c7bc6b4111a361 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Fri, 20 Nov 2026 12:32:54 +0000 Subject: [PATCH] Modernise Laravel Modules dependencies and add initial tests --- .gitignore | 3 +++ composer.json | 28 +++++++++++++++++----------- phpunit.xml.dist | 16 ++++++++++++++++ tests/ServiceProviderTest.php | 25 +++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 phpunit.xml.dist create mode 100644 tests/ServiceProviderTest.php diff --git a/.gitignore b/.gitignore index 4f38912..08d0fec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ .idea vendor composer.lock +.phpunit.result.cache +composer.json.bak-* +.phpunit.cache/ diff --git a/composer.json b/composer.json index 8f667ae..99fb8c6 100644 --- a/composer.json +++ b/composer.json @@ -16,17 +16,23 @@ } ], "require": { - "php": ">=7.3", - "ext-json": "*" + "php": "^8.0", + "ext-json": "*", + "illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", + "illuminate/console": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", + "illuminate/contracts": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", + "illuminate/database": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", + "illuminate/filesystem": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", + "illuminate/routing": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0" }, "require-dev": { - "phpunit/phpunit": "^8.5", - "mockery/mockery": "~1.0", - "orchestra/testbench": "^6.0", - "friendsofphp/php-cs-fixer": "^2.16", - "laravel/framework": "^8.0", - "spatie/phpunit-snapshot-assertions": "^2.1.0", - "phpstan/phpstan": "^0.12.14" + "phpunit/phpunit": "^12.5", + "mockery/mockery": "^1.6", + "orchestra/testbench": "^11.0", + "friendsofphp/php-cs-fixer": "^3.0", + "laravel/framework": "^13.0", + "spatie/phpunit-snapshot-assertions": "^5.4", + "phpstan/phpstan": "^2.0" }, "autoload": { "psr-4": { @@ -61,7 +67,7 @@ "test-coverage": "vendor/bin/phpunit --debug --coverage-html coverage", "pcf": "vendor/bin/php-cs-fixer fix --verbose" }, - "minimum-stability": "dev", - "prefer-stable": false, + "minimum-stability": "stable", + "prefer-stable": true, "type": "library" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..cc1211a --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + tests + + + + + + + + diff --git a/tests/ServiceProviderTest.php b/tests/ServiceProviderTest.php new file mode 100644 index 0000000..1d438e9 --- /dev/null +++ b/tests/ServiceProviderTest.php @@ -0,0 +1,25 @@ +assertTrue( + $this->app->providerIsLoaded( + LaravelModulesServiceProvider::class + ) + ); + } +}