From 7f65a1d9867b5974269059b35092673fa25daa20 Mon Sep 17 00:00:00 2001 From: Dipesh Sukhia Date: Sun, 24 Mar 2024 16:44:02 +0530 Subject: [PATCH] lara 11 compatibility --- README.md | 2 +- composer.json | 13 +++---------- src/LaravelCountryStateCityData.php | 8 -------- src/LaravelCountryStateCityDataFacade.php | 18 ------------------ ...avelCountryStateCityDataServiceProvider.php | 6 +++--- 5 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 src/LaravelCountryStateCityData.php delete mode 100644 src/LaravelCountryStateCityDataFacade.php diff --git a/README.md b/README.md index e565be5..32ae129 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ php artisan country-data:install ### Requirements ``` bash -Laravel 5.8.x, 6.x, 7.x, 8.x, 9.x, 10.x +Laravel 5.8.x, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x PHP >= 7.1.3 or Grater ``` diff --git a/composer.json b/composer.json index 3f4c506..7805b4e 100644 --- a/composer.json +++ b/composer.json @@ -29,11 +29,10 @@ ], "require": { "php": ">=7.1.3", - "illuminate/support": "^5.8|^6.0|^7.0|^8.0|^9.0|^10.0" + "illuminate/support": "^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0" }, "require-dev": { - "orchestra/testbench": "^8.0", - "phpunit/phpunit": "^9.0|^10.0" + "phpunit/phpunit": "^9.0|^10.5" }, "autoload": { "psr-4": { @@ -49,18 +48,12 @@ "test": "vendor/bin/phpunit", "test-coverage": "vendor/bin/phpunit --coverage-html coverage" }, - "config": { - "sort-packages": true - }, "minimum-stability": "stable", "extra": { "laravel": { "providers": [ "DipeshSukhia\\LaravelCountryStateCityData\\LaravelCountryStateCityDataServiceProvider" - ], - "aliases": { - "LaravelCountryStateCityData": "DipeshSukhia\\LaravelCountryStateCityData\\LaravelCountryStateCityDataFacade" - } + ] } } } diff --git a/src/LaravelCountryStateCityData.php b/src/LaravelCountryStateCityData.php deleted file mode 100644 index 89dd718..0000000 --- a/src/LaravelCountryStateCityData.php +++ /dev/null @@ -1,8 +0,0 @@ -getStubContents( "Models/" . $modelName . ".stub"); $ModelTemplate = str_replace('{{modelNameSpace}}', $modelNameSpace, $ModelTemplate); file_put_contents($modelDir . "/" . $modelName . ".php", $ModelTemplate); } @@ -41,7 +41,7 @@ public function boot() $seedDir = database_path('seeders'); $seederNameSpace = "namespace Database\\Seeders;\n"; } - $seederTemplate = self::getStubContents('seeders/CountryStateCityTableSeeder.stub'); + $seederTemplate = $this->getStubContents('seeders/CountryStateCityTableSeeder.stub'); $seederTemplate = str_replace('{{seederNameSpace}}', $seederNameSpace, $seederTemplate); $seederTemplate = str_replace('{{modelNameSpace}}', $modelNameSpace, $seederTemplate); file_put_contents($seedDir . '/CountryStateCityTableSeeder.php', $seederTemplate); @@ -71,7 +71,7 @@ public function register() // } - private function getStubContents($stubName) + private function getStubContents( string $stubName ) { return file_get_contents(self::STUB_DIR . $stubName); }