From 77e4109b03de31d347e28e5d738eaa73fbb06636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 17 Oct 2020 14:53:24 +0300 Subject: [PATCH] updated module compatibility --- app/Console/Stubs/Modules/command.stub | 4 +- app/Console/Stubs/Modules/factory.stub | 31 ++++++-- app/Console/Stubs/Modules/model.stub | 13 ++++ composer.json | 2 +- composer.lock | 102 +++++++++++++------------ 5 files changed, 93 insertions(+), 59 deletions(-) diff --git a/app/Console/Stubs/Modules/command.stub b/app/Console/Stubs/Modules/command.stub index e9ef86567..95145d84b 100644 --- a/app/Console/Stubs/Modules/command.stub +++ b/app/Console/Stubs/Modules/command.stub @@ -9,11 +9,11 @@ use Symfony\Component\Console\Input\InputArgument; class $CLASS$ extends Command { /** - * The console command name. + * The name and signature of the console command. * * @var string */ - protected $name = '$COMMAND_NAME$'; + protected $signature = '$COMMAND_NAME$'; /** * The console command description. diff --git a/app/Console/Stubs/Modules/factory.stub b/app/Console/Stubs/Modules/factory.stub index 65e422147..99c73a338 100644 --- a/app/Console/Stubs/Modules/factory.stub +++ b/app/Console/Stubs/Modules/factory.stub @@ -1,9 +1,28 @@ define(Model::class, function (Faker $faker) { - return [ - // - ]; -}); +use Illuminate\Database\Eloquent\Factories\Factory; + +use Faker\Generator as Faker; +class $NAME$ extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = \$MODEL_NAMESPACE$\$NAME$::class; + + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + // + ]; + } +} diff --git a/app/Console/Stubs/Modules/model.stub b/app/Console/Stubs/Modules/model.stub index a567130a5..079205ec0 100644 --- a/app/Console/Stubs/Modules/model.stub +++ b/app/Console/Stubs/Modules/model.stub @@ -3,8 +3,21 @@ namespace $NAMESPACE$; use App\Abstracts\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class $CLASS$ extends Model { + use HasFactory; + protected $fillable = $FILLABLE$; + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \$FACTORY_NAMESPACE$\$NAME$::new(); + } } diff --git a/composer.json b/composer.json index 059d0b06f..991af5b73 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "akaunting/firewall": "1.2.*", "akaunting/language": "1.0.*", "akaunting/menu": "1.0.*", - "akaunting/module": "1.0.*", + "akaunting/module": "2.0.*", "akaunting/money": "1.2.*", "akaunting/setting": "1.2.*", "akaunting/version": "1.0.*", diff --git a/composer.lock b/composer.lock index a58bc9d49..a234b36b4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "084c7fe9e0172d89509d9e891a749b0a", + "content-hash": "afd1e161515c05a1e24476af19f286e6", "packages": [ { "name": "akaunting/firewall", @@ -197,27 +197,28 @@ }, { "name": "akaunting/module", - "version": "1.0.11", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/akaunting/module.git", - "reference": "7df640d9556b098a427fcff84dc92879a272e8d6" + "reference": "6706d88dd34b4f4524b3e3c8b1a82fbcdecfbe5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/akaunting/module/zipball/7df640d9556b098a427fcff84dc92879a272e8d6", - "reference": "7df640d9556b098a427fcff84dc92879a272e8d6", + "url": "https://api.github.com/repos/akaunting/module/zipball/6706d88dd34b4f4524b3e3c8b1a82fbcdecfbe5f", + "reference": "6706d88dd34b4f4524b3e3c8b1a82fbcdecfbe5f", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "friendsofphp/php-cs-fixer": ">=2.15", + "friendsofphp/php-cs-fixer": ">=2.16", + "laravel/framework": "^8.0", "mockery/mockery": ">=1.0", - "orchestra/testbench": ">=3.8", - "phpstan/phpstan": ">=0.9.2", - "phpunit/phpunit": ">=7.0", + "orchestra/testbench": ">=6.0", + "phpstan/phpstan": ">=0.12.14", + "phpunit/phpunit": ">=8.5", "spatie/phpunit-snapshot-assertions": ">=2.1.0" }, "type": "library", @@ -258,7 +259,7 @@ "module", "rad" ], - "time": "2020-07-10T20:18:06+00:00" + "time": "2020-10-17T11:46:04+00:00" }, { "name": "akaunting/money", @@ -5934,20 +5935,20 @@ }, { "name": "paragonie/random_compat", - "version": "v9.99.99", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": "^7" + "php": ">= 7" }, "require-dev": { "phpunit/phpunit": "4.*|5.*", @@ -5975,7 +5976,7 @@ "pseudorandom", "random" ], - "time": "2018-07-02T15:55:56+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "phenx/php-font-lib", @@ -8611,16 +8612,16 @@ }, { "name": "symfony/http-client-contracts", - "version": "v2.2.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "3a5d0fe7908daaa23e3dbf4cee3ba4bfbb19fdd3" + "reference": "41db680a15018f9c1d4b23516059633ce280ca33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/3a5d0fe7908daaa23e3dbf4cee3ba4bfbb19fdd3", - "reference": "3a5d0fe7908daaa23e3dbf4cee3ba4bfbb19fdd3", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/41db680a15018f9c1d4b23516059633ce280ca33", + "reference": "41db680a15018f9c1d4b23516059633ce280ca33", "shasum": "" }, "require": { @@ -8631,8 +8632,9 @@ }, "type": "library", "extra": { + "branch-version": "2.3", "branch-alias": { - "dev-master": "2.2-dev" + "dev-main": "2.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -8682,7 +8684,7 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2020-10-14T17:08:19+00:00" }, { "name": "symfony/http-foundation", @@ -10744,16 +10746,16 @@ }, { "name": "facade/ignition", - "version": "2.3.8", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "e8fed9c382cd1d02b5606688576a35619afdf82c" + "reference": "9fc6c3d3de5271a1b94cff19dce2c9295abf0ffa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/e8fed9c382cd1d02b5606688576a35619afdf82c", - "reference": "e8fed9c382cd1d02b5606688576a35619afdf82c", + "url": "https://api.github.com/repos/facade/ignition/zipball/9fc6c3d3de5271a1b94cff19dce2c9295abf0ffa", + "reference": "9fc6c3d3de5271a1b94cff19dce2c9295abf0ffa", "shasum": "" }, "require": { @@ -10812,29 +10814,29 @@ "laravel", "page" ], - "time": "2020-10-01T23:01:14+00:00" + "time": "2020-10-14T08:59:59+00:00" }, { "name": "facade/ignition-contracts", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/facade/ignition-contracts.git", - "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b" + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/aeab1ce8b68b188a43e81758e750151ad7da796b", - "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3|^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5|^8.0", - "vimeo/psalm": "^3.12" + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" }, "type": "library", "autoload": { @@ -10861,29 +10863,29 @@ "flare", "ignition" ], - "time": "2020-07-14T10:10:28+00:00" + "time": "2020-10-16T08:27:54+00:00" }, { "name": "filp/whoops", - "version": "2.7.3", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d" + "reference": "fa50d9db1c0c2fae99cf988d27023effda5524a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", - "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", + "url": "https://api.github.com/repos/filp/whoops/zipball/fa50d9db1c0c2fae99cf988d27023effda5524a3", + "reference": "fa50d9db1c0c2fae99cf988d27023effda5524a3", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0", + "php": "^5.5.9 || ^7.0 || ^8.0", "psr/log": "^1.0.1" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "suggest": { @@ -10893,7 +10895,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { @@ -10922,7 +10924,7 @@ "throwable", "whoops" ], - "time": "2020-06-14T09:00:00+00:00" + "time": "2020-10-17T09:00:00+00:00" }, { "name": "fzaninotto/faker", @@ -11792,16 +11794,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.2", + "version": "v9.18.1.3", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9" + "reference": "6a1699707b099081f20a488ac1f92d682181018c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/efb6e445494a9458aa59b0af5edfa4bdcc6809d9", - "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/6a1699707b099081f20a488ac1f92d682181018c", + "reference": "6a1699707b099081f20a488ac1f92d682181018c", "shasum": "" }, "require": { @@ -11863,7 +11865,7 @@ "type": "github" } ], - "time": "2020-08-27T03:24:44+00:00" + "time": "2020-10-16T07:43:22+00:00" }, { "name": "sebastian/cli-parser",