From 1ba8835a2d0c9b78cce1480fdc45e05ff402a2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Wed, 14 Oct 2020 17:07:59 +0300 Subject: [PATCH] laravel 8 --- .github/workflows/tests.yml | 2 +- README.md | 2 +- app/Abstracts/Factory.php | 26 + .../Stubs/Modules/scaffold/provider.stub | 15 - app/Exceptions/Handler.php | 2 +- app/Http/Kernel.php | 4 +- .../Middleware/RedirectIfAuthenticated.php | 21 +- app/Http/Middleware/TrustHosts.php | 20 + app/Listeners/Menu/AddAdminItems.php | 6 +- app/Listeners/Update/V21/Version210.php | 29 + app/Models/Auth/Permission.php | 13 +- app/Models/Auth/Role.php | 13 +- app/Models/Auth/User.php | 13 +- app/Models/Banking/Account.php | 13 +- app/Models/Banking/Transaction.php | 13 +- app/Models/Banking/Transfer.php | 13 +- app/Models/Common/Contact.php | 13 +- app/Models/Common/Item.php | 13 +- app/Models/Purchase/Bill.php | 13 +- app/Models/Sale/Invoice.php | 13 +- app/Models/Setting/Category.php | 13 +- app/Models/Setting/Currency.php | 13 +- app/Models/Setting/Tax.php | 13 + app/Providers/App.php | 33 +- app/Providers/Auth.php | 11 +- app/Providers/Event.php | 1 + app/Providers/Route.php | 28 +- composer.json | 52 +- composer.lock | 2222 ++++++++++------- config/laratrust.php | 145 +- config/logging.php | 12 +- config/mail.php | 1 + config/queue.php | 2 +- config/session.php | 4 +- database/factories/Account.php | 100 +- database/factories/Bill.php | 409 +-- database/factories/Category.php | 128 +- database/factories/Contact.php | 118 +- database/factories/Currency.php | 101 +- database/factories/Dashboard.php | 98 +- database/factories/Invoice.php | 437 ++-- database/factories/Item.php | 76 +- database/factories/Permission.php | 44 +- database/factories/Role.php | 75 +- database/factories/Tax.php | 142 +- database/factories/Transaction.php | 101 +- database/factories/Transfer.php | 93 +- database/factories/User.php | 78 +- .../2020_10_13_000000_core_v210.php | 30 + database/seeds/SampleData.php | 14 +- phpunit.xml | 8 +- .../views/auth/permissions/edit.blade.php | 4 +- .../views/auth/permissions/index.blade.php | 8 +- resources/views/auth/roles/edit.blade.php | 4 +- resources/views/auth/roles/index.blade.php | 8 +- resources/views/auth/users/create.blade.php | 8 +- resources/views/auth/users/edit.blade.php | 12 +- resources/views/auth/users/index.blade.php | 8 +- .../views/banking/accounts/edit.blade.php | 4 +- .../views/banking/accounts/index.blade.php | 8 +- .../banking/reconciliations/edit.blade.php | 4 +- .../banking/reconciliations/index.blade.php | 8 +- .../banking/transactions/index.blade.php | 8 +- .../views/banking/transfers/edit.blade.php | 4 +- .../views/banking/transfers/index.blade.php | 8 +- .../views/common/companies/edit.blade.php | 4 +- .../views/common/companies/index.blade.php | 8 +- .../views/common/dashboards/create.blade.php | 4 +- .../views/common/dashboards/edit.blade.php | 8 +- .../views/common/dashboards/index.blade.php | 8 +- .../views/common/dashboards/show.blade.php | 16 +- resources/views/common/items/edit.blade.php | 4 +- resources/views/common/items/index.blade.php | 12 +- resources/views/common/reports/edit.blade.php | 4 +- .../views/common/reports/index.blade.php | 12 +- .../views/modules/item/pre_sale.blade.php | 4 +- resources/views/modules/item/show.blade.php | 14 +- resources/views/partials/admin/menu.blade.php | 12 +- .../views/partials/admin/navbar.blade.php | 56 +- resources/views/partials/media/file.blade.php | 4 +- .../views/partials/portal/navbar.blade.php | 4 +- .../widgets/standard_header.blade.php | 12 +- .../partials/widgets/stats_header.blade.php | 12 +- resources/views/portal/profile/edit.blade.php | 4 +- .../views/purchases/bills/edit.blade.php | 4 +- .../views/purchases/bills/index.blade.php | 16 +- .../views/purchases/bills/show.blade.php | 24 +- .../views/purchases/payments/edit.blade.php | 4 +- .../views/purchases/payments/index.blade.php | 12 +- .../views/purchases/vendors/edit.blade.php | 4 +- .../views/purchases/vendors/index.blade.php | 12 +- .../views/sales/customers/edit.blade.php | 4 +- .../views/sales/customers/index.blade.php | 12 +- resources/views/sales/invoices/edit.blade.php | 4 +- .../views/sales/invoices/index.blade.php | 16 +- resources/views/sales/invoices/show.blade.php | 24 +- resources/views/sales/revenues/edit.blade.php | 4 +- .../views/sales/revenues/index.blade.php | 12 +- .../views/settings/categories/edit.blade.php | 4 +- .../views/settings/categories/index.blade.php | 8 +- .../views/settings/company/edit.blade.php | 4 +- .../views/settings/currencies/edit.blade.php | 4 +- .../views/settings/currencies/index.blade.php | 8 +- .../views/settings/default/edit.blade.php | 4 +- resources/views/settings/email/edit.blade.php | 4 +- .../views/settings/invoice/edit.blade.php | 4 +- .../settings/localisation/edit.blade.php | 4 +- .../views/settings/modules/edit.blade.php | 4 +- .../views/settings/schedule/edit.blade.php | 4 +- .../views/settings/settings/index.blade.php | 36 +- resources/views/settings/taxes/edit.blade.php | 4 +- .../views/settings/taxes/index.blade.php | 8 +- .../views/wizard/currencies/index.blade.php | 4 +- resources/views/wizard/taxes/index.blade.php | 4 +- tests/Feature/Auth/PermissionsTest.php | 2 +- tests/Feature/Auth/RolesTest.php | 2 +- tests/Feature/Auth/UsersTest.php | 2 +- tests/Feature/Banking/AccountsTest.php | 2 +- tests/Feature/Banking/TransfersTest.php | 8 +- tests/Feature/Commands/BillReminderTest.php | 2 +- .../Feature/Commands/InvoiceReminderTest.php | 2 +- tests/Feature/Common/DashboardsTest.php | 2 +- tests/Feature/Common/ItemsTest.php | 2 +- tests/Feature/Purchases/BillsTest.php | 4 +- tests/Feature/Purchases/PaymentsTest.php | 2 +- tests/Feature/Purchases/VendorsTest.php | 2 +- tests/Feature/Sales/CustomersTest.php | 2 +- tests/Feature/Sales/InvoicesTest.php | 4 +- tests/Feature/Sales/RevenuesTest.php | 2 +- tests/Feature/Settings/CategoriesTest.php | 2 +- tests/Feature/Settings/CurrenciesTest.php | 2 +- tests/Feature/Settings/TaxesTest.php | 2 +- tests/Feature/Wizard/CurrenciesTest.php | 2 +- tests/Feature/Wizard/TaxesTest.php | 2 +- 134 files changed, 3515 insertions(+), 1952 deletions(-) create mode 100644 app/Abstracts/Factory.php create mode 100644 app/Http/Middleware/TrustHosts.php create mode 100644 app/Listeners/Update/V21/Version210.php create mode 100644 database/migrations/2020_10_13_000000_core_v210.php diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7889ce304..d0c33782f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php: ['7.2', '7.3', '7.4'] + php: ['7.3', '7.4'] steps: - name: Checkout code diff --git a/README.md b/README.md index f7edf19a1..4499434d8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Akaunting is a free, open source and online accounting software designed for sma ## Requirements -* PHP 7.2.5 or higher +* PHP 7.3 or higher * Database (eg: MySQL, PostgreSQL, SQLite) * Web Server (eg: Apache, Nginx, IIS) * [Other libraries](https://akaunting.com/docs/requirements) diff --git a/app/Abstracts/Factory.php b/app/Abstracts/Factory.php new file mode 100644 index 000000000..030aabf25 --- /dev/null +++ b/app/Abstracts/Factory.php @@ -0,0 +1,26 @@ +user = User::first(); + $this->company = $this->user->companies()->first(); + + session(['company_id' => $this->company->id]); + setting()->setExtraColumns(['company_id' => $this->company->id]); + } + + public function getCompanyUsers() + { + return $this->company->users()->enabled()->get()->pluck('id')->toArray(); + } +} diff --git a/app/Console/Stubs/Modules/scaffold/provider.stub b/app/Console/Stubs/Modules/scaffold/provider.stub index e5d1ca8e0..2e5fe8c62 100644 --- a/app/Console/Stubs/Modules/scaffold/provider.stub +++ b/app/Console/Stubs/Modules/scaffold/provider.stub @@ -16,7 +16,6 @@ class $NAME$ extends Provider $this->loadViews(); $this->loadTranslations(); $this->loadMigrations(); - $this->loadFactories(); //$this->loadConfig(); } @@ -60,20 +59,6 @@ class $NAME$ extends Provider $this->loadMigrationsFrom(__DIR__ . '/../$MIGRATIONS_PATH$'); } - /** - * Load factories. - * - * @return void - */ - public function loadFactories() - { - if (app()->environment('production') || !app()->runningInConsole()) { - return; - } - - $this->loadFactoriesFrom(__DIR__ . '/../$FACTORIES_PATH$'); - } - /** * Load config. * diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 4092f98d8..996093a9d 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -12,7 +12,7 @@ use Throwable; class Handler extends ExceptionHandler { /** - * A list of the exception types that should not be reported. + * A list of the exception types that are not reported. * * @var array */ diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index de6cfdeb8..8c8f16d35 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,7 +14,9 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ + // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, + \Fruitcake\Cors\HandleCors::class, \MisterPhilip\MaintenanceMode\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, @@ -51,7 +53,7 @@ class Kernel extends HttpKernel 'api' => [ 'api.auth', 'auth.disabled', - 'throttle:60,1', + 'throttle:api', 'permission:read-api', 'api.company', 'bindings', diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 0cbd3659a..b427639f3 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -3,6 +3,7 @@ namespace App\Http\Middleware; use Closure; +use Illuminate\Http\Request; class RedirectIfAuthenticated { @@ -11,19 +12,23 @@ class RedirectIfAuthenticated * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @param string|null $guard + * @param string|null ...$guards * @return mixed */ - public function handle($request, Closure $next, $guard = null) + public function handle(Request $request, Closure $next, ...$guards) { - if (auth()->guard($guard)->check()) { - $user = user(); + $guards = empty($guards) ? [null] : $guards; - if ($user->contact) { - return redirect()->route('portal.dashboard'); + foreach ($guards as $guard) { + if (auth()->guard($guard)->check()) { + $user = user(); + + if ($user->contact) { + return redirect()->route('portal.dashboard'); + } + + return redirect()->route($user->landing_page); } - - return redirect()->route($user->landing_page); } return $next($request); diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php new file mode 100644 index 000000000..aec05a776 --- /dev/null +++ b/app/Http/Middleware/TrustHosts.php @@ -0,0 +1,20 @@ +allSubdomainsOfApplicationUrl(), + ]; + } +} \ No newline at end of file diff --git a/app/Listeners/Menu/AddAdminItems.php b/app/Listeners/Menu/AddAdminItems.php index 5549c38ca..5d656ba51 100644 --- a/app/Listeners/Menu/AddAdminItems.php +++ b/app/Listeners/Menu/AddAdminItems.php @@ -53,7 +53,7 @@ class AddAdminItems } // Sales - if ($user->can(['read-sales-invoices', 'read-sales-revenues', 'read-sales-customers'])) { + if ($user->canAny(['read-sales-invoices', 'read-sales-revenues', 'read-sales-customers'])) { $menu->dropdown(trim(trans_choice('general.sales', 2)), function ($sub) use ($user, $attr) { if ($user->can('read-sales-invoices')) { $sub->route('invoices.index', trans_choice('general.invoices', 2), [], 10, $attr); @@ -73,7 +73,7 @@ class AddAdminItems } // Purchases - if ($user->can(['read-purchases-bills', 'read-purchases-payments', 'read-purchases-vendors'])) { + if ($user->canAny(['read-purchases-bills', 'read-purchases-payments', 'read-purchases-vendors'])) { $menu->dropdown(trim(trans_choice('general.purchases', 2)), function ($sub) use ($user, $attr) { if ($user->can('read-purchases-bills')) { $sub->route('bills.index', trans_choice('general.bills', 2), [], 10, $attr); @@ -93,7 +93,7 @@ class AddAdminItems } // Banking - if ($user->can(['read-banking-accounts', 'read-banking-transfers', 'read-banking-transactions', 'read-banking-reconciliations'])) { + if ($user->canAny(['read-banking-accounts', 'read-banking-transfers', 'read-banking-transactions', 'read-banking-reconciliations'])) { $menu->dropdown(trim(trans('general.banking')), function ($sub) use ($user, $attr) { if ($user->can('read-banking-accounts')) { $sub->route('accounts.index', trans_choice('general.accounts', 2), [], 10, $attr); diff --git a/app/Listeners/Update/V21/Version210.php b/app/Listeners/Update/V21/Version210.php new file mode 100644 index 000000000..85c98ed27 --- /dev/null +++ b/app/Listeners/Update/V21/Version210.php @@ -0,0 +1,29 @@ +skipThisUpdate($event)) { + return; + } + + Artisan::call('migrate', ['--force' => true]); + } +} diff --git a/app/Models/Auth/Permission.php b/app/Models/Auth/Permission.php index e70ad7fbd..9109840d6 100644 --- a/app/Models/Auth/Permission.php +++ b/app/Models/Auth/Permission.php @@ -3,6 +3,7 @@ namespace App\Models\Auth; use App\Traits\Tenants; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Laratrust\Models\LaratrustPermission; use Laratrust\Traits\LaratrustPermissionTrait; use Kyslik\ColumnSortable\Sortable; @@ -10,7 +11,7 @@ use Lorisleiva\LaravelSearchString\Concerns\SearchString; class Permission extends LaratrustPermission { - use LaratrustPermissionTrait, SearchString, Sortable, Tenants; + use HasFactory, LaratrustPermissionTrait, SearchString, Sortable, Tenants; protected $table = 'permissions'; @@ -80,4 +81,14 @@ class Permission extends LaratrustPermission return $title; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Permission::new(); + } } diff --git a/app/Models/Auth/Role.php b/app/Models/Auth/Role.php index f951568f6..852dd2e91 100644 --- a/app/Models/Auth/Role.php +++ b/app/Models/Auth/Role.php @@ -3,6 +3,7 @@ namespace App\Models\Auth; use App\Traits\Tenants; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Laratrust\Models\LaratrustRole; use Laratrust\Traits\LaratrustRoleTrait; use Kyslik\ColumnSortable\Sortable; @@ -10,7 +11,7 @@ use Lorisleiva\LaravelSearchString\Concerns\SearchString; class Role extends LaratrustRole { - use LaratrustRoleTrait, SearchString, Sortable, Tenants; + use HasFactory, LaratrustRoleTrait, SearchString, Sortable, Tenants; protected $table = 'roles'; @@ -40,4 +41,14 @@ class Role extends LaratrustRole return $query->usingSearchString($search)->sortable($sort)->paginate($limit); } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Role::new(); + } } diff --git a/app/Models/Auth/User.php b/app/Models/Auth/User.php index 75b4b6881..9ca294d18 100644 --- a/app/Models/Auth/User.php +++ b/app/Models/Auth/User.php @@ -6,6 +6,7 @@ use App\Traits\Tenants; use App\Notifications\Auth\Reset; use App\Traits\Media; use Date; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; @@ -15,7 +16,7 @@ use Lorisleiva\LaravelSearchString\Concerns\SearchString; class User extends Authenticatable { - use LaratrustUserTrait, Notifiable, SearchString, SoftDeletes, Sortable, Media, Tenants; + use HasFactory, LaratrustUserTrait, Notifiable, SearchString, SoftDeletes, Sortable, Media, Tenants; protected $table = 'users'; @@ -205,4 +206,14 @@ class User extends Authenticatable { $this->offsetUnset('company_ids'); } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\User::new(); + } } diff --git a/app/Models/Banking/Account.php b/app/Models/Banking/Account.php index 4a5b51883..a0de5a30e 100644 --- a/app/Models/Banking/Account.php +++ b/app/Models/Banking/Account.php @@ -4,10 +4,11 @@ namespace App\Models\Banking; use App\Abstracts\Model; use App\Traits\Transactions; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Account extends Model { - use Transactions; + use HasFactory, Transactions; protected $table = 'accounts'; @@ -91,4 +92,14 @@ class Account extends Model return $total; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Account::new(); + } } diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index a0af1503e..896189d53 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -10,11 +10,12 @@ use App\Traits\Media; use App\Traits\Recurring; use App\Traits\Transactions; use Bkwld\Cloner\Cloneable; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Support\Str; class Transaction extends Model { - use Cloneable, Currencies, DateTime, Media, Recurring, Transactions; + use Cloneable, Currencies, DateTime, HasFactory, Media, Recurring, Transactions; protected $table = 'transactions'; @@ -323,4 +324,14 @@ class Transaction extends Model { return $value ?? $this->document_id ?? $this->id; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Transaction::new(); + } } diff --git a/app/Models/Banking/Transfer.php b/app/Models/Banking/Transfer.php index 79cb83247..08bdf65a7 100644 --- a/app/Models/Banking/Transfer.php +++ b/app/Models/Banking/Transfer.php @@ -4,10 +4,11 @@ namespace App\Models\Banking; use App\Abstracts\Model; use App\Traits\Currencies; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Transfer extends Model { - use Currencies; + use HasFactory, Currencies; protected $table = 'transfers'; @@ -44,4 +45,14 @@ class Transfer extends Model { return $this->belongsTo('App\Models\Banking\Account', 'income_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]); } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Transfer::new(); + } } diff --git a/app/Models/Common/Contact.php b/app/Models/Common/Contact.php index 6f61f916c..c8bc33ba3 100644 --- a/app/Models/Common/Contact.php +++ b/app/Models/Common/Contact.php @@ -8,11 +8,12 @@ use App\Traits\Contacts; use App\Traits\Currencies; use App\Traits\Media; use App\Traits\Transactions; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Notifications\Notifiable; class Contact extends Model { - use Cloneable, Contacts, Currencies, Media, Notifiable, Transactions; + use Cloneable, Contacts, Currencies, HasFactory, Media, Notifiable, Transactions; protected $table = 'contacts'; @@ -144,4 +145,14 @@ class Contact extends Model return $amount; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Contact::new(); + } } diff --git a/app/Models/Common/Item.php b/app/Models/Common/Item.php index 030cd03db..12caeed6e 100644 --- a/app/Models/Common/Item.php +++ b/app/Models/Common/Item.php @@ -6,10 +6,11 @@ use App\Abstracts\Model; use App\Traits\Currencies; use App\Traits\Media; use Bkwld\Cloner\Cloneable; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Item extends Model { - use Cloneable, Currencies, Media; + use Cloneable, Currencies, HasFactory, Media; protected $table = 'items'; @@ -137,4 +138,14 @@ class Item extends Model return $this->getMedia('picture')->last(); } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Item::new(); + } } diff --git a/app/Models/Purchase/Bill.php b/app/Models/Purchase/Bill.php index aa342737f..8967159c9 100644 --- a/app/Models/Purchase/Bill.php +++ b/app/Models/Purchase/Bill.php @@ -4,10 +4,11 @@ namespace App\Models\Purchase; use App\Abstracts\DocumentModel; use App\Traits\Purchases; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Bill extends DocumentModel { - use Purchases; + use HasFactory, Purchases; protected $table = 'bills'; @@ -108,4 +109,14 @@ class Bill extends DocumentModel return ($received) ? $received->created_at : null; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Bill::new(); + } } diff --git a/app/Models/Sale/Invoice.php b/app/Models/Sale/Invoice.php index 52973918b..f67dc6af6 100644 --- a/app/Models/Sale/Invoice.php +++ b/app/Models/Sale/Invoice.php @@ -4,10 +4,11 @@ namespace App\Models\Sale; use App\Abstracts\DocumentModel; use App\Traits\Sales; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Invoice extends DocumentModel { - use Sales; + use HasFactory, Sales; protected $table = 'invoices'; @@ -115,4 +116,14 @@ class Invoice extends DocumentModel return ($sent) ? $sent->created_at : null; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Invoice::new(); + } } diff --git a/app/Models/Setting/Category.php b/app/Models/Setting/Category.php index f00bde121..50e69bc53 100644 --- a/app/Models/Setting/Category.php +++ b/app/Models/Setting/Category.php @@ -4,10 +4,11 @@ namespace App\Models\Setting; use App\Abstracts\Model; use App\Traits\Transactions; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Category extends Model { - use Transactions; + use HasFactory, Transactions; protected $table = 'categories'; @@ -130,4 +131,14 @@ class Category extends Model { return (int) $query->other()->pluck('id')->first(); } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Category::new(); + } } diff --git a/app/Models/Setting/Currency.php b/app/Models/Setting/Currency.php index c75e19c4e..58a2ef1aa 100644 --- a/app/Models/Setting/Currency.php +++ b/app/Models/Setting/Currency.php @@ -5,10 +5,11 @@ namespace App\Models\Setting; use App\Abstracts\Model; use App\Traits\Contacts; use App\Traits\Transactions; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Currency extends Model { - use Contacts, Transactions; + use Contacts, HasFactory, Transactions; protected $table = 'currencies'; @@ -163,4 +164,14 @@ class Currency extends Model { return $query->where($this->table . '.code', $code); } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Currency::new(); + } } diff --git a/app/Models/Setting/Tax.php b/app/Models/Setting/Tax.php index 8f9f717bf..76e2c8377 100644 --- a/app/Models/Setting/Tax.php +++ b/app/Models/Setting/Tax.php @@ -3,9 +3,12 @@ namespace App\Models\Setting; use App\Abstracts\Model; +use Illuminate\Database\Eloquent\Factories\HasFactory; class Tax extends Model { + use HasFactory; + protected $table = 'taxes'; /** @@ -127,4 +130,14 @@ class Tax extends Model return $title; } + + /** + * Create a new factory instance for the model. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + protected static function newFactory() + { + return \Database\Factories\Tax::new(); + } } diff --git a/app/Providers/App.php b/app/Providers/App.php index e3a0d8f8e..197a9eade 100644 --- a/app/Providers/App.php +++ b/app/Providers/App.php @@ -2,28 +2,12 @@ namespace App\Providers; -use Blade; +use Illuminate\Pagination\Paginator; +use Illuminate\Support\Facades\Schema; use Illuminate\Support\ServiceProvider as Provider; -use Schema; class App extends Provider { - /** - * Bootstrap any application services. - * - * @return void - */ - public function boot() - { - // Laravel db fix - Schema::defaultStringLength(191); - - // @todo Remove the if control after 1.3 update - if (method_exists('Blade', 'withoutDoubleEncoding')) { - Blade::withoutDoubleEncoding(); - } - } - /** * Register any application services. * @@ -39,4 +23,17 @@ class App extends Provider $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); } } + + /** + * Bootstrap any application services. + * + * @return void + */ + public function boot() + { + // Laravel db fix + Schema::defaultStringLength(191); + + Paginator::useBootstrap(); + } } diff --git a/app/Providers/Auth.php b/app/Providers/Auth.php index 7ea862a63..92a989fa3 100644 --- a/app/Providers/Auth.php +++ b/app/Providers/Auth.php @@ -2,6 +2,8 @@ namespace App\Providers; +use Illuminate\Contracts\Auth\Access\Authorizable; +use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as Provider; class Auth extends Provider @@ -12,7 +14,7 @@ class Auth extends Provider * @var array */ protected $policies = [ - //'App\Model' => 'App\Policies\ModelPolicy', + //'App\Models\Model' => 'App\Policies\ModelPolicy', ]; /** @@ -24,6 +26,11 @@ class Auth extends Provider { $this->registerPolicies(); - // + // Register permissions to Laravel Gate + app(Gate::class)->before(function (Authorizable $user, string $ability) { + if (method_exists($user, 'hasPermission')) { + return $user->hasPermission($ability) ?: null; + } + }); } } diff --git a/app/Providers/Event.php b/app/Providers/Event.php index 85cdd486e..827842710 100644 --- a/app/Providers/Event.php +++ b/app/Providers/Event.php @@ -25,6 +25,7 @@ class Event extends Provider 'App\Listeners\Update\V20\Version2020', 'App\Listeners\Update\V20\Version2023', 'App\Listeners\Update\V20\Version2024', + 'App\Listeners\Update\V21\Version210', ], 'Illuminate\Auth\Events\Login' => [ 'App\Listeners\Auth\Login', diff --git a/app/Providers/Route.php b/app/Providers/Route.php index 47b2287c5..20dcefa37 100644 --- a/app/Providers/Route.php +++ b/app/Providers/Route.php @@ -2,11 +2,23 @@ namespace App\Providers; -use Illuminate\Support\Facades\Route as Facade; +use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as Provider; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\RateLimiter; +use Illuminate\Support\Facades\Route as Facade; class Route extends Provider { + /** + * The path to the "home" route for your application. + * + * This is used by Laravel authentication to redirect users after login. + * + * @var string + */ + public const HOME = '/'; + /** * This namespace is applied to your controller routes. * @@ -64,6 +76,8 @@ class Route extends Provider */ protected function mapApiRoutes() { + $this->configureRateLimiting(); + Facade::prefix('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); @@ -155,4 +169,16 @@ class Route extends Provider ->namespace($this->namespace) ->group(base_path('routes/signed.php')); } + + /** + * Configure the rate limiters for the application. + * + * @return void + */ + protected function configureRateLimiting() + { + RateLimiter::for('api', function (Request $request) { + return Limit::perMinute(60); + }); + } } diff --git a/composer.json b/composer.json index 2fc7416bd..acc3e0a77 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "license": "GPL-3.0+", "type": "project", "require": { - "php": "^7.2.5", + "php": "^7.3.0", "ext-bcmath": "*", "akaunting/firewall": "1.2.*", "akaunting/language": "1.0.*", @@ -21,45 +21,45 @@ "akaunting/money": "1.2.*", "akaunting/setting": "1.2.*", "akaunting/version": "1.0.*", - "barryvdh/laravel-debugbar": "3.3.*", + "barryvdh/laravel-debugbar": "3.5.*", "barryvdh/laravel-dompdf": "0.*", "barryvdh/laravel-ide-helper": "2.8.*", - "bkwld/cloner": "3.7.*", + "bkwld/cloner": "3.9.*", "consoletvs/charts": "6.5.*", "dingo/api": "3.0.*", - "doctrine/dbal": "2.9.*", - "fideloper/proxy": "^4.2", + "doctrine/dbal": "2.11.*", + "fideloper/proxy": "^4.4", "fruitcake/laravel-cors": "^1.0", - "genealabs/laravel-model-caching": "0.8.*", - "graham-campbell/markdown": "12.0.*", - "guzzlehttp/guzzle": "^6.5", + "genealabs/laravel-model-caching": "0.11.*", + "graham-campbell/markdown": "13.1.*", + "guzzlehttp/guzzle": "^7.0", "intervention/image": "2.5.*", - "intervention/imagecache": "^2.4", + "intervention/imagecache": "^2.5", "kyslik/column-sortable": "^6.0", - "laracasts/flash": "3.1.*", - "laravel/framework": "^7.0", + "laracasts/flash": "3.2.*", + "laravel/framework": "^8.0", "laravel/tinker": "^2.0", - "laravel/ui": "^2.0", - "laravelcollective/html": "6.1.*", - "league/omnipay": "3.0.*", + "laravel/ui": "^3.0", + "laravelcollective/html": "6.2.*", + "league/omnipay": "3.1.x-dev", "lorisleiva/laravel-search-string": "1.0.*", "maatwebsite/excel": "3.1.*", "misterphilip/maintenance-mode": "2.0.*", - "monooso/unobserve": "^2.0", - "plank/laravel-mediable": "4.2.*", + "monooso/unobserve": "^3.0", + "plank/laravel-mediable": "4.4.*", "riverskies/laravel-mobile-detect": "^1.3", - "santigarcor/laratrust": "5.2.*", + "santigarcor/laratrust": "6.2.*", "simshaun/recurr": "4.0.*", - "staudenmeir/belongs-to-through": "^2.10", - "staudenmeir/eloquent-has-many-deep": "^1.12" + "staudenmeir/belongs-to-through": "^2.11", + "staudenmeir/eloquent-has-many-deep": "^1.13" }, "require-dev": { - "beyondcode/laravel-dump-server": "^1.0", - "facade/ignition": "^2.0", + "beyondcode/laravel-dump-server": "^1.5", + "facade/ignition": "^2.3", "fzaninotto/faker": "^1.9.1", "mockery/mockery": "^1.3.1", - "nunomaduro/collision": "^4.1", - "phpunit/phpunit": "^8.5" + "nunomaduro/collision": "^5.0", + "phpunit/phpunit": "^9.3" }, "extra": { "laravel": { @@ -67,13 +67,11 @@ } }, "autoload": { - "classmap": [ - "database/seeds", - "database/factories" - ], "psr-4": { "App\\": "app/", "Modules\\": "modules/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeds\\": "database/seeds/", "Akaunting\\Module\\Commands\\": "overrides/akaunting/module/Commands/", "Illuminate\\Translation\\": "overrides/Illuminate/Translation/", "Illuminate\\View\\Concerns\\": "overrides/Illuminate/View/Concerns/", diff --git a/composer.lock b/composer.lock index 58c67c9e9..a58bc9d49 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": "00858902c3a4d86628fb2110b4e945bc", + "content-hash": "084c7fe9e0172d89509d9e891a749b0a", "packages": [ { "name": "akaunting/firewall", @@ -537,34 +537,36 @@ }, { "name": "barryvdh/laravel-debugbar", - "version": "v3.3.3", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5" + "reference": "233c10688f4c1a6e66ed2ef123038b1363d1bedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/57f2219f6d9efe41ed1bc880d86701c52f261bf5", - "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/233c10688f4c1a6e66ed2ef123038b1363d1bedc", + "reference": "233c10688f4c1a6e66ed2ef123038b1363d1bedc", "shasum": "" }, "require": { - "illuminate/routing": "^5.5|^6|^7", - "illuminate/session": "^5.5|^6|^7", - "illuminate/support": "^5.5|^6|^7", - "maximebf/debugbar": "^1.15.1", - "php": ">=7.0", - "symfony/debug": "^3|^4|^5", - "symfony/finder": "^3|^4|^5" + "illuminate/routing": "^6|^7|^8", + "illuminate/session": "^6|^7|^8", + "illuminate/support": "^6|^7|^8", + "maximebf/debugbar": "^1.16.3", + "php": ">=7.2", + "symfony/debug": "^4.3|^5", + "symfony/finder": "^4.3|^5" }, "require-dev": { - "laravel/framework": "5.5.x" + "orchestra/testbench-dusk": "^4|^5|^6", + "phpunit/phpunit": "^8.5|^9.0", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.5-dev" }, "laravel": { "providers": [ @@ -607,7 +609,7 @@ "type": "github" } ], - "time": "2020-05-05T10:53:32+00:00" + "time": "2020-09-07T19:32:39+00:00" }, { "name": "barryvdh/laravel-dompdf", @@ -803,20 +805,20 @@ }, { "name": "bkwld/cloner", - "version": "3.7.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/BKWLD/cloner.git", - "reference": "bfb2db6e4e42cf2710b5d507074d0e1c1af04da3" + "reference": "d47d92c442a06a96d5971e2a74a9ca67d74ae7e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/BKWLD/cloner/zipball/bfb2db6e4e42cf2710b5d507074d0e1c1af04da3", - "reference": "bfb2db6e4e42cf2710b5d507074d0e1c1af04da3", + "url": "https://api.github.com/repos/BKWLD/cloner/zipball/d47d92c442a06a96d5971e2a74a9ca67d74ae7e3", + "reference": "d47d92c442a06a96d5971e2a74a9ca67d74ae7e3", "shasum": "" }, "require": { - "illuminate/support": "^5.5|^6.0|^7.0", + "illuminate/support": "^5.5|^6.0|^7.0|^8.0", "php": ">=7.0" }, "require-dev": { @@ -854,7 +856,7 @@ } ], "description": "A trait for Laravel Eloquent models that lets you clone of a model and it's relationships, including files.", - "time": "2020-05-07T16:08:16+00:00" + "time": "2020-09-13T19:46:22+00:00" }, { "name": "brick/math", @@ -910,23 +912,23 @@ }, { "name": "clue/stream-filter", - "version": "v1.4.1", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/clue/php-stream-filter.git", - "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" + "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", - "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", "shasum": "" }, "require": { "php": ">=5.3" }, "require-dev": { - "phpunit/phpunit": "^5.0 || ^4.8" + "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -944,7 +946,7 @@ "authors": [ { "name": "Christian Lück", - "email": "christian@lueck.tv" + "email": "christian@clue.engineering" } ], "description": "A simple and modern approach to stream filtering in PHP", @@ -958,7 +960,17 @@ "stream_filter_append", "stream_filter_register" ], - "time": "2019-04-09T12:31:48+00:00" + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2020-10-02T12:38:20+00:00" }, { "name": "composer/ca-bundle", @@ -1032,16 +1044,16 @@ }, { "name": "composer/composer", - "version": "1.10.13", + "version": "1.10.15", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "47c841ba3b2d3fc0b4b13282cf029ea18b66d78b" + "reference": "547c9ee73fe26c77af09a0ea16419176b1cdbd12" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/47c841ba3b2d3fc0b4b13282cf029ea18b66d78b", - "reference": "47c841ba3b2d3fc0b4b13282cf029ea18b66d78b", + "url": "https://api.github.com/repos/composer/composer/zipball/547c9ee73fe26c77af09a0ea16419176b1cdbd12", + "reference": "547c9ee73fe26c77af09a0ea16419176b1cdbd12", "shasum": "" }, "require": { @@ -1122,7 +1134,7 @@ "type": "tidelift" } ], - "time": "2020-09-09T09:46:34+00:00" + "time": "2020-10-13T13:59:09+00:00" }, { "name": "composer/semver", @@ -1389,39 +1401,39 @@ }, { "name": "dingo/api", - "version": "v3.0.1", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/dingo/api.git", - "reference": "3813eb9102b900177c7c700efab93f3714093689" + "reference": "7355bb6e687e9ddc895feff53764d0ce261a834b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dingo/api/zipball/3813eb9102b900177c7c700efab93f3714093689", - "reference": "3813eb9102b900177c7c700efab93f3714093689", + "url": "https://api.github.com/repos/dingo/api/zipball/7355bb6e687e9ddc895feff53764d0ce261a834b", + "reference": "7355bb6e687e9ddc895feff53764d0ce261a834b", "shasum": "" }, "require": { "dingo/blueprint": "^0.4", - "illuminate/routing": "^7.0", - "illuminate/support": "^7.0", + "illuminate/routing": "^7.0|^8.0", + "illuminate/support": "^7.0|^8.0", "league/fractal": "^0.19", "php": "^7.2.5" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2", - "illuminate/auth": "^7.0", - "illuminate/cache": "^7.0", - "illuminate/console": "^7.0", - "illuminate/database": "^7.0", - "illuminate/events": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/log": "^7.0", - "illuminate/pagination": "^7.0", - "laravel/lumen-framework": "^7.0", + "illuminate/auth": "^7.0|^8.0", + "illuminate/cache": "^7.0|^8.0", + "illuminate/console": "^7.0|^8.0", + "illuminate/database": "^7.0|^8.0", + "illuminate/events": "^7.0|^8.0", + "illuminate/filesystem": "^7.0|^8.0", + "illuminate/log": "^7.0|^8.0", + "illuminate/pagination": "^7.0|^8.0", + "laravel/lumen-framework": "^7.0|^8.0", "mockery/mockery": "~1.0", "phpdocumentor/reflection-docblock": "3.3.2", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^8.5|^9.0", "squizlabs/php_codesniffer": "~2.0", "tymon/jwt-auth": "1.0.*" }, @@ -1467,7 +1479,7 @@ "laravel", "restful" ], - "time": "2020-09-09T14:24:22+00:00" + "time": "2020-10-09T01:27:06+00:00" }, { "name": "dingo/blueprint", @@ -1791,31 +1803,33 @@ }, { "name": "doctrine/dbal", - "version": "v2.9.3", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "7345cd59edfa2036eb0fa4264b77ae2576842035" + "reference": "6e6903cd5e3a5be60a79439e3ee8fe126f78fe86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/7345cd59edfa2036eb0fa4264b77ae2576842035", - "reference": "7345cd59edfa2036eb0fa4264b77ae2576842035", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/6e6903cd5e3a5be60a79439e3ee8fe126f78fe86", + "reference": "6e6903cd5e3a5be60a79439e3ee8fe126f78fe86", "shasum": "" }, "require": { "doctrine/cache": "^1.0", "doctrine/event-manager": "^1.0", "ext-pdo": "*", - "php": "^7.1" + "php": "^7.3" }, "require-dev": { - "doctrine/coding-standard": "^5.0", - "jetbrains/phpstorm-stubs": "^2018.1.2", - "phpstan/phpstan": "^0.10.1", - "phpunit/phpunit": "^7.4", - "symfony/console": "^2.0.5|^3.0|^4.0", - "symfony/phpunit-bridge": "^3.4.5|^4.0.5" + "doctrine/coding-standard": "^8.1", + "jetbrains/phpstorm-stubs": "^2019.1", + "nikic/php-parser": "^4.4", + "phpstan/phpstan": "^0.12.40", + "phpunit/phpunit": "^9.3", + "psalm/plugin-phpunit": "^0.10.0", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.14.2" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -1826,8 +1840,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.9.x-dev", - "dev-develop": "3.0.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -1862,14 +1875,39 @@ "keywords": [ "abstraction", "database", + "db2", "dbal", + "mariadb", + "mssql", "mysql", - "persistence", + "oci8", + "oracle", + "pdo", "pgsql", - "php", - "queryobject" + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" ], - "time": "2019-11-02T22:19:34+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2020-09-27T04:09:41+00:00" }, { "name": "doctrine/event-manager", @@ -2198,30 +2236,29 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.0", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27" + "reference": "48212cdc0a79051d50d7fc2f0645c5a321caf926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", - "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/48212cdc0a79051d50d7fc2f0645c5a321caf926", + "reference": "48212cdc0a79051d50d7fc2f0645c5a321caf926", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1|^8.0" + }, + "replace": { + "mtdowling/cron-expression": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0" + "phpstan/phpstan": "^0.11|^0.12", + "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -2232,11 +2269,6 @@ "MIT" ], "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, { "name": "Chris Tankersley", "email": "chris@ctankersley.com", @@ -2248,7 +2280,13 @@ "cron", "schedule" ], - "time": "2019-03-31T00:38:28+00:00" + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2020-10-13T01:26:01+00:00" }, { "name": "egulias/email-validator", @@ -2438,36 +2476,36 @@ }, { "name": "genealabs/laravel-model-caching", - "version": "0.8.10", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/GeneaLabs/laravel-model-caching.git", - "reference": "f9be69e6937ef4bb4477deacf10e65c40d7df00f" + "reference": "f790e9c8ef7097b39bcf893c1e7335763cb812f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GeneaLabs/laravel-model-caching/zipball/f9be69e6937ef4bb4477deacf10e65c40d7df00f", - "reference": "f9be69e6937ef4bb4477deacf10e65c40d7df00f", + "url": "https://api.github.com/repos/GeneaLabs/laravel-model-caching/zipball/f790e9c8ef7097b39bcf893c1e7335763cb812f3", + "reference": "f790e9c8ef7097b39bcf893c1e7335763cb812f3", "shasum": "" }, "require": { - "genealabs/laravel-pivot-events": "^0.3.0", - "illuminate/cache": "^7.0", - "illuminate/config": "^7.0", - "illuminate/console": "^7.0", - "illuminate/container": "^7.0", - "illuminate/database": "^7.0", - "illuminate/http": "^7.0", - "illuminate/support": "^7.0", - "php": ">=7.2.5", - "predis/predis": "^1.1" + "genealabs/laravel-pivot-events": "^8.0", + "illuminate/cache": "^8.0", + "illuminate/config": "^8.0", + "illuminate/console": "^8.0", + "illuminate/container": "^8.0", + "illuminate/database": "^8.0", + "illuminate/http": "^8.0", + "illuminate/support": "^8.0", + "php": ">=7.3" }, "require-dev": { "doctrine/dbal": "^2.10", "fzaninotto/faker": "^1.9", - "laravel/nova": "^3.0", - "orchestra/testbench": "^5.0", - "orchestra/testbench-browser-kit": "^5.0", + "laravel/legacy-factories": "^1.0", + "laravel/nova": "^3.9", + "orchestra/testbench": "^6.0", + "orchestra/testbench-browser-kit": "^6.0", "php-coveralls/php-coveralls": "^2.2", "phpmd/phpmd": "^2.7", "phpunit/phpunit": "^8.0", @@ -2499,38 +2537,28 @@ } ], "description": "Automatic caching for Eloquent models.", - "funding": [ - { - "url": "https://github.com/GeneaLabs", - "type": "github" - }, - { - "url": "https://github.com/mikebronner", - "type": "github" - } - ], - "time": "2020-07-08T18:08:06+00:00" + "time": "2020-09-08T15:51:40+00:00" }, { "name": "genealabs/laravel-pivot-events", - "version": "0.3.0", + "version": "8.0", "source": { "type": "git", "url": "https://github.com/GeneaLabs/laravel-pivot-events.git", - "reference": "7f35d5af019558474c0afc437bfa49ee161b658b" + "reference": "aafc9d7f6a0b31e0d58bd2b31e38253fbd27c2a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GeneaLabs/laravel-pivot-events/zipball/7f35d5af019558474c0afc437bfa49ee161b658b", - "reference": "7f35d5af019558474c0afc437bfa49ee161b658b", + "url": "https://api.github.com/repos/GeneaLabs/laravel-pivot-events/zipball/aafc9d7f6a0b31e0d58bd2b31e38253fbd27c2a9", + "reference": "aafc9d7f6a0b31e0d58bd2b31e38253fbd27c2a9", "shasum": "" }, "require": { - "illuminate/database": "^7.0", - "illuminate/support": "^7.0" + "illuminate/database": "^8.0", + "illuminate/support": "^8.0" }, "require-dev": { - "orchestra/testbench": "^5.0", + "orchestra/testbench": "^6.0", "symfony/thanks": "^1.0" }, "type": "library", @@ -2560,40 +2588,38 @@ "laravel pivot events", "laravel sync events" ], - "time": "2020-02-29T18:56:56+00:00" + "time": "2020-09-08T14:39:12+00:00" }, { "name": "graham-campbell/markdown", - "version": "v12.0.2", + "version": "v13.1.1", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Laravel-Markdown.git", - "reference": "584eb9f24004238b80ee98b6e7be82f0933554dd" + "reference": "d25b873e5c5870edc4de7d980808f1a8e092a9c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Markdown/zipball/584eb9f24004238b80ee98b6e7be82f0933554dd", - "reference": "584eb9f24004238b80ee98b6e7be82f0933554dd", + "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Markdown/zipball/d25b873e5c5870edc4de7d980808f1a8e092a9c7", + "reference": "d25b873e5c5870edc4de7d980808f1a8e092a9c7", "shasum": "" }, "require": { - "illuminate/contracts": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "illuminate/view": "^6.0|^7.0", - "league/commonmark": "^1.3", - "php": "^7.2.5" + "illuminate/contracts": "^6.0 || ^7.0 || ^8.0", + "illuminate/filesystem": "^6.0 || ^7.0 || ^8.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0", + "illuminate/view": "^6.0 || ^7.0 || ^8.0", + "league/commonmark": "^1.5", + "php": "^7.2.5 || ^8.0" }, "require-dev": { "graham-campbell/analyzer": "^3.0", "graham-campbell/testbench": "^5.4", "mockery/mockery": "^1.3.1", - "phpunit/phpunit": "^8.5|^9.0" + "phpunit/phpunit": "^8.5.8 || ^9.3.7" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "12.0-dev" - }, "laravel": { "providers": [ "GrahamCampbell\\Markdown\\MarkdownServiceProvider" @@ -2627,41 +2653,119 @@ "laravel", "markdown" ], - "time": "2020-04-14T16:14:52+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/markdown", + "type": "tidelift" + } + ], + "time": "2020-08-22T14:18:21+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.5.5", + "name": "graham-campbell/result-type", + "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", - "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb", + "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0", + "phpoption/phpoption": "^1.7.3" + }, + "require-dev": { + "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2020-04-13T13:17:36+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79", + "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", "psr/log": "^1.1" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5-dev" + "dev-master": "7.1-dev" } }, "autoload": { @@ -2681,6 +2785,11 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "Guzzle is a PHP HTTP client library", @@ -2691,30 +2800,50 @@ "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], - "time": "2020-06-16T21:01:06+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2020-10-10T11:47:56+00:00" }, { "name": "guzzlehttp/promises", - "version": "v1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "reference": "60d379c243457e073cff02bc323a2a86cb355631" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631", + "reference": "60d379c243457e073cff02bc323a2a86cb355631", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { @@ -2745,20 +2874,20 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "time": "2020-09-30T07:37:28+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.6.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a" + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a", - "reference": "239400de7a173fe9901b9ac7c06497751f00727a", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3", + "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3", "shasum": "" }, "require": { @@ -2771,15 +2900,15 @@ }, "require-dev": { "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" }, "suggest": { - "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -2816,7 +2945,7 @@ "uri", "url" ], - "time": "2019-07-01T23:21:34+00:00" + "time": "2020-09-30T07:37:11+00:00" }, { "name": "hoa/compiler", @@ -3672,16 +3801,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.99", + "version": "v1.2.100", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "0ffea34489b258a2709bfe93a9553e1efa5d1904" + "reference": "82e1d983e29d9fea6e8e5505110d0278a5285f36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/0ffea34489b258a2709bfe93a9553e1efa5d1904", - "reference": "0ffea34489b258a2709bfe93a9553e1efa5d1904", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/82e1d983e29d9fea6e8e5505110d0278a5285f36", + "reference": "82e1d983e29d9fea6e8e5505110d0278a5285f36", "shasum": "" }, "require": { @@ -3717,7 +3846,7 @@ "crawlerdetect", "php crawler detect" ], - "time": "2020-08-25T21:35:55+00:00" + "time": "2020-10-11T18:08:38+00:00" }, { "name": "jenssegers/agent", @@ -3968,20 +4097,20 @@ }, { "name": "laracasts/flash", - "version": "3.1", + "version": "3.2", "source": { "type": "git", "url": "https://github.com/laracasts/flash.git", - "reference": "150d4348477db31b9a93ccd07f713e3d0513b3bf" + "reference": "76c2e200498795bdbeda97b682536130316e8b97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laracasts/flash/zipball/150d4348477db31b9a93ccd07f713e3d0513b3bf", - "reference": "150d4348477db31b9a93ccd07f713e3d0513b3bf", + "url": "https://api.github.com/repos/laracasts/flash/zipball/76c2e200498795bdbeda97b682536130316e8b97", + "reference": "76c2e200498795bdbeda97b682536130316e8b97", "shasum": "" }, "require": { - "illuminate/support": "~5.0|^6.0|^7.0", + "illuminate/support": "~5.0|^6.0|^7.0|^8.0", "php": ">=5.4.0" }, "require-dev": { @@ -4018,25 +4147,25 @@ } ], "description": "Easy flash notifications", - "time": "2020-03-03T15:50:52+00:00" + "time": "2020-09-07T13:25:35+00:00" }, { "name": "laravel/framework", - "version": "v7.28.3", + "version": "v8.10.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b0942c391975972b1a54b2dc983e33a239f169a9" + "reference": "0c80950806cd1bc6d9a7068585a12c2bfa23bdf3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b0942c391975972b1a54b2dc983e33a239f169a9", - "reference": "b0942c391975972b1a54b2dc983e33a239f169a9", + "url": "https://api.github.com/repos/laravel/framework/zipball/0c80950806cd1bc6d9a7068585a12c2bfa23bdf3", + "reference": "0c80950806cd1bc6d9a7068585a12c2bfa23bdf3", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^2.0", + "dragonmantank/cron-expression": "^3.0", "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", @@ -4045,24 +4174,23 @@ "league/flysystem": "^1.0.34", "monolog/monolog": "^2.0", "nesbot/carbon": "^2.17", - "opis/closure": "^3.1", - "php": "^7.2.5", + "opis/closure": "^3.5.3", + "php": "^7.3", "psr/container": "^1.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^3.7|^4.0", + "ramsey/uuid": "^4.0", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^5.0", - "symfony/error-handler": "^5.0", - "symfony/finder": "^5.0", - "symfony/http-foundation": "^5.0", - "symfony/http-kernel": "^5.0", - "symfony/mime": "^5.0", - "symfony/polyfill-php73": "^1.17", - "symfony/process": "^5.0", - "symfony/routing": "^5.0", - "symfony/var-dumper": "^5.0", + "symfony/console": "^5.1", + "symfony/error-handler": "^5.1", + "symfony/finder": "^5.1", + "symfony/http-foundation": "^5.1", + "symfony/http-kernel": "^5.1", + "symfony/mime": "^5.1", + "symfony/process": "^5.1", + "symfony/routing": "^5.1", + "symfony/var-dumper": "^5.1", "tijsverkoyen/css-to-inline-styles": "^2.2.2", - "vlucas/phpdotenv": "^4.0", + "vlucas/phpdotenv": "^5.2", "voku/portable-ascii": "^1.4.8" }, "conflict": { @@ -4076,6 +4204,7 @@ "illuminate/broadcasting": "self.version", "illuminate/bus": "self.version", "illuminate/cache": "self.version", + "illuminate/collections": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -4088,6 +4217,7 @@ "illuminate/hashing": "self.version", "illuminate/http": "self.version", "illuminate/log": "self.version", + "illuminate/macroable": "self.version", "illuminate/mail": "self.version", "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", @@ -4106,15 +4236,14 @@ "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3.1|^7.0", + "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.3.1", - "moontoast/math": "^1.1", - "orchestra/testbench-core": "^5.0", + "orchestra/testbench-core": "^6.0", "pda/pheanstalk": "^4.0", "phpunit/phpunit": "^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/cache": "^5.0" + "symfony/cache": "^5.1" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", @@ -4127,37 +4256,42 @@ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "filp/whoops": "Required for friendly error pages in development (^2.4).", "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).", + "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "mockery/mockery": "Required to use mocking (^1.3.1).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).", "predis/predis": "Required to use the predis connector (^1.1.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.0).", - "symfony/filesystem": "Required to create relative storage directory symbolic links (^5.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^5.1).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^5.1).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { "files": [ + "src/Illuminate/Collections/helpers.php", + "src/Illuminate/Events/functions.php", "src/Illuminate/Foundation/helpers.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { - "Illuminate\\": "src/Illuminate/" + "Illuminate\\": "src/Illuminate/", + "Illuminate\\Support\\": [ + "src/Illuminate/Macroable/", + "src/Illuminate/Collections/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -4176,7 +4310,7 @@ "framework", "laravel" ], - "time": "2020-09-17T14:23:26+00:00" + "time": "2020-10-13T14:20:53+00:00" }, { "name": "laravel/tinker", @@ -4244,30 +4378,29 @@ }, { "name": "laravel/ui", - "version": "v2.4.1", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "1c69ae3e8b52fe6c9eaf83b43c6dd8ef5c3f9e2c" + "reference": "ff6af4f0bc5a5bfe73352cdc03dbfffc4ace92d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/1c69ae3e8b52fe6c9eaf83b43c6dd8ef5c3f9e2c", - "reference": "1c69ae3e8b52fe6c9eaf83b43c6dd8ef5c3f9e2c", + "url": "https://api.github.com/repos/laravel/ui/zipball/ff6af4f0bc5a5bfe73352cdc03dbfffc4ace92d8", + "reference": "ff6af4f0bc5a5bfe73352cdc03dbfffc4ace92d8", "shasum": "" }, "require": { - "illuminate/console": "^7.0", - "illuminate/filesystem": "^7.0", - "illuminate/support": "^7.0", - "php": "^7.2.5" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.0" + "illuminate/console": "^8.0", + "illuminate/filesystem": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3" }, "type": "library", "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + }, "laravel": { "providers": [ "Laravel\\Ui\\UiServiceProvider" @@ -4295,32 +4428,32 @@ "laravel", "ui" ], - "time": "2020-09-22T16:51:51+00:00" + "time": "2020-09-11T15:34:08+00:00" }, { "name": "laravelcollective/html", - "version": "v6.1.2", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "5ef9a3c9ae2423fe5618996f3cde375d461a3fc6" + "reference": "3bb99be7502feb2129b375cd026ccb0fa4b66628" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/5ef9a3c9ae2423fe5618996f3cde375d461a3fc6", - "reference": "5ef9a3c9ae2423fe5618996f3cde375d461a3fc6", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/3bb99be7502feb2129b375cd026ccb0fa4b66628", + "reference": "3bb99be7502feb2129b375cd026ccb0fa4b66628", "shasum": "" }, "require": { - "illuminate/http": "^6.0|^7.0", - "illuminate/routing": "^6.0|^7.0", - "illuminate/session": "^6.0|^7.0", - "illuminate/support": "^6.0|^7.0", - "illuminate/view": "^6.0|^7.0", + "illuminate/http": "^6.0|^7.0|^8.0", + "illuminate/routing": "^6.0|^7.0|^8.0", + "illuminate/session": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", + "illuminate/view": "^6.0|^7.0|^8.0", "php": ">=7.2.5" }, "require-dev": { - "illuminate/database": "^6.0|^7.0", + "illuminate/database": "^6.0|^7.0|^8.0", "mockery/mockery": "~1.0", "phpunit/phpunit": "~7.1" }, @@ -4363,7 +4496,7 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2020-05-19T18:02:16+00:00" + "time": "2020-09-07T19:59:40+00:00" }, { "name": "league/commonmark", @@ -4462,28 +4595,29 @@ }, { "name": "league/flysystem", - "version": "1.0.70", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493" + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493", - "reference": "585824702f534f8d3cf7fab7225e8466cc4b7493", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": ">=5.5.9" + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "phpunit/phpunit": "^5.7.26" + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -4548,7 +4682,7 @@ "type": "other" } ], - "time": "2020-07-26T07:20:36+00:00" + "time": "2020-08-23T07:39:11+00:00" }, { "name": "league/fractal", @@ -4615,23 +4749,75 @@ "time": "2020-01-24T23:17:29+00:00" }, { - "name": "league/omnipay", - "version": "v3.0.2", + "name": "league/mime-type-detection", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/thephpleague/omnipay.git", - "reference": "9e10d91cbf84744207e13d4483e79de39b133368" + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "ea2fbfc988bade315acd5967e6d02274086d0f28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay/zipball/9e10d91cbf84744207e13d4483e79de39b133368", - "reference": "9e10d91cbf84744207e13d4483e79de39b133368", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ea2fbfc988bade315acd5967e6d02274086d0f28", + "reference": "ea2fbfc988bade315acd5967e6d02274086d0f28", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.36", + "phpunit/phpunit": "^8.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2020-09-21T18:10:53+00:00" + }, + { + "name": "league/omnipay", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/omnipay.git", + "reference": "1ba7c8a3312cf2342458b99c9e5b86eaae44aed2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/omnipay/zipball/1ba7c8a3312cf2342458b99c9e5b86eaae44aed2", + "reference": "1ba7c8a3312cf2342458b99c9e5b86eaae44aed2", "shasum": "" }, "require": { "omnipay/common": "^3", - "php": "^5.6|^7", - "php-http/guzzle6-adapter": "^1.1|^2" + "php": "^7.2", + "php-http/discovery": "^1.12", + "php-http/guzzle7-adapter": "^0.1" }, "require-dev": { "omnipay/tests": "^3" @@ -4639,7 +4825,7 @@ "type": "metapackage", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "3.1.x-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -4664,7 +4850,7 @@ "omnipay", "payment" ], - "time": "2019-03-20T14:28:28+00:00" + "time": "2020-09-22T14:02:17+00:00" }, { "name": "lorisleiva/laravel-search-string", @@ -4716,16 +4902,16 @@ }, { "name": "maatwebsite/excel", - "version": "3.1.22", + "version": "3.1.23", "source": { "type": "git", "url": "https://github.com/Maatwebsite/Laravel-Excel.git", - "reference": "ba7152670257ba9f47bb6ff7cee025f8fc9da608" + "reference": "b8145257f020635f374d2314ccd556674efcbfcb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/ba7152670257ba9f47bb6ff7cee025f8fc9da608", - "reference": "ba7152670257ba9f47bb6ff7cee025f8fc9da608", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/b8145257f020635f374d2314ccd556674efcbfcb", + "reference": "b8145257f020635f374d2314ccd556674efcbfcb", "shasum": "" }, "require": { @@ -4786,7 +4972,7 @@ "type": "github" } ], - "time": "2020-09-08T15:29:50+00:00" + "time": "2020-09-29T07:30:12+00:00" }, { "name": "maennchen/zipstream-php", @@ -4857,30 +5043,30 @@ }, { "name": "markbaker/complex", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "c3131244e29c08d44fefb49e0dd35021e9e39dd2" + "reference": "9999f1432fae467bc93c53f357105b4c31bb994c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/c3131244e29c08d44fefb49e0dd35021e9e39dd2", - "reference": "c3131244e29c08d44fefb49e0dd35021e9e39dd2", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c", + "reference": "9999f1432fae467bc93c53f357105b4c31bb994c", "shasum": "" }, "require": { - "php": "^5.6.0|^7.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.0", "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "^4.0|^5.0|^6.0|^7.0", + "phploc/phploc": "^4.0", "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^4.8.35|^5.0|^6.0|^7.0", - "sebastian/phpcpd": "2.*", - "squizlabs/php_codesniffer": "^3.4.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.4" }, "type": "library", "autoload": { @@ -4948,33 +5134,34 @@ "complex", "mathematics" ], - "time": "2020-08-26T19:47:57+00:00" + "time": "2020-08-26T10:42:07+00:00" }, { "name": "markbaker/matrix", - "version": "1.2.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "182d44c3b2e3b063468f7481ae3ef71c69dc1409" + "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/182d44c3b2e3b063468f7481ae3ef71c69dc1409", - "reference": "182d44c3b2e3b063468f7481ae3ef71c69dc1409", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/9567d9c4c519fbe40de01dbd1e4469dbbb66f46a", + "reference": "9567d9c4c519fbe40de01dbd1e4469dbbb66f46a", "shasum": "" }, "require": { - "php": "^5.6.0|^7.0.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", - "phpcompatibility/php-compatibility": "dev-master", - "phploc/phploc": "^4", - "phpmd/phpmd": "dev-master", - "phpunit/phpunit": "^5.7|^6.0|7.0", - "sebastian/phpcpd": "^3.0", - "squizlabs/php_codesniffer": "^3.0@dev" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.4" }, "type": "library", "autoload": { @@ -5007,7 +5194,7 @@ "authors": [ { "name": "Mark Baker", - "email": "mark@lange.demon.co.uk" + "email": "mark@demon-angel.eu" } ], "description": "PHP Class for working with matrices", @@ -5017,7 +5204,7 @@ "matrix", "vector" ], - "time": "2020-08-28T19:41:55+00:00" + "time": "2020-08-28T17:11:00+00:00" }, { "name": "maximebf/debugbar", @@ -5362,27 +5549,27 @@ }, { "name": "monooso/unobserve", - "version": "v2.0.2", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/monooso/unobserve.git", - "reference": "7511624967166968962ad5f059d5376b1a949cb2" + "reference": "e7cc357d405ecf73b392604d49e65359cd471d24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/monooso/unobserve/zipball/7511624967166968962ad5f059d5376b1a949cb2", - "reference": "7511624967166968962ad5f059d5376b1a949cb2", + "url": "https://api.github.com/repos/monooso/unobserve/zipball/e7cc357d405ecf73b392604d49e65359cd471d24", + "reference": "e7cc357d405ecf73b392604d49e65359cd471d24", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0", - "illuminate/support": "^7.0", - "php": ">=7.2.5" + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.15", - "orchestra/testbench": "^5.0", - "phpunit/phpunit": "^8.5", + "orchestra/testbench": "^6.0", + "phpunit/phpunit": "^9.3", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", @@ -5413,7 +5600,7 @@ "keywords": [ "laravel" ], - "time": "2020-09-03T19:19:38+00:00" + "time": "2020-10-10T14:11:58+00:00" }, { "name": "myclabs/php-enum", @@ -5463,16 +5650,16 @@ }, { "name": "nesbot/carbon", - "version": "2.40.1", + "version": "2.41.3", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "d9a76d8b7eb0f97cf3a82529393245212f40ba3b" + "reference": "e148788eeae9b9b7b87996520358b86faad37b52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d9a76d8b7eb0f97cf3a82529393245212f40ba3b", - "reference": "d9a76d8b7eb0f97cf3a82529393245212f40ba3b", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e148788eeae9b9b7b87996520358b86faad37b52", + "reference": "e148788eeae9b9b7b87996520358b86faad37b52", "shasum": "" }, "require": { @@ -5548,7 +5735,7 @@ "type": "tidelift" } ], - "time": "2020-09-23T08:17:37+00:00" + "time": "2020-10-12T20:36:09+00:00" }, { "name": "nikic/php-parser", @@ -5686,29 +5873,29 @@ }, { "name": "opis/closure", - "version": "3.5.7", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "4531e53afe2fc660403e76fb7644e95998bff7bf" + "reference": "c547f8262a5fa9ff507bd06cc394067b83a75085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/4531e53afe2fc660403e76fb7644e95998bff7bf", - "reference": "4531e53afe2fc660403e76fb7644e95998bff7bf", + "url": "https://api.github.com/repos/opis/closure/zipball/c547f8262a5fa9ff507bd06cc394067b83a75085", + "reference": "c547f8262a5fa9ff507bd06cc394067b83a75085", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0" + "php": "^5.4 || ^7.0 || ^8.0" }, "require-dev": { "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5.x-dev" + "dev-master": "3.6.x-dev" } }, "autoload": { @@ -5743,7 +5930,7 @@ "serialization", "serialize" ], - "time": "2020-09-06T17:02:15+00:00" + "time": "2020-10-11T21:42:15+00:00" }, { "name": "paragonie/random_compat", @@ -5933,22 +6120,22 @@ "time": "2020-09-22T13:31:04+00:00" }, { - "name": "php-http/guzzle6-adapter", - "version": "v2.0.1", + "name": "php-http/guzzle7-adapter", + "version": "0.1.0", "source": { "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f" + "url": "https://github.com/php-http/guzzle7-adapter.git", + "reference": "5b361e0dbd7d9d5e21f80400bcccf9fb8d5d1f1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/6074a4b1f4d5c21061b70bab3b8ad484282fe31f", - "reference": "6074a4b1f4d5c21061b70bab3b8ad484282fe31f", + "url": "https://api.github.com/repos/php-http/guzzle7-adapter/zipball/5b361e0dbd7d9d5e21f80400bcccf9fb8d5d1f1e", + "reference": "5b361e0dbd7d9d5e21f80400bcccf9fb8d5d1f1e", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1", + "guzzlehttp/guzzle": "^7.0", + "php": "^7.2", "php-http/httplug": "^2.0", "psr/http-client": "^1.0" }, @@ -5958,19 +6145,18 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "ext-curl": "*", "php-http/client-integration-tests": "^2.0", "phpunit/phpunit": "^7.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "0.2.x-dev" } }, "autoload": { "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" + "Http\\Adapter\\Guzzle7\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -5979,21 +6165,17 @@ ], "authors": [ { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" } ], - "description": "Guzzle 6 HTTP Adapter", + "description": "Guzzle 7 HTTP Adapter", "homepage": "http://httplug.io", "keywords": [ "Guzzle", "http" ], - "time": "2018-12-16T14:44:03+00:00" + "time": "2020-09-17T07:29:54+00:00" }, { "name": "php-http/httplug", @@ -6055,16 +6237,16 @@ }, { "name": "php-http/message", - "version": "1.9.0", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "2c7256e3c1aba0bfca70f099810f1c7712e00945" + "reference": "09f3f13af3a1a4273ecbf8e6b27248c002a3db29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/2c7256e3c1aba0bfca70f099810f1c7712e00945", - "reference": "2c7256e3c1aba0bfca70f099810f1c7712e00945", + "url": "https://api.github.com/repos/php-http/message/zipball/09f3f13af3a1a4273ecbf8e6b27248c002a3db29", + "reference": "09f3f13af3a1a4273ecbf8e6b27248c002a3db29", "shasum": "" }, "require": { @@ -6124,7 +6306,7 @@ "message", "psr-7" ], - "time": "2020-08-17T06:33:14+00:00" + "time": "2020-10-13T06:21:08+00:00" }, { "name": "php-http/message-factory", @@ -6377,16 +6559,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.14.1", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "2383aad5689778470491581442aab38cec41bf1d" + "reference": "a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/2383aad5689778470491581442aab38cec41bf1d", - "reference": "2383aad5689778470491581442aab38cec41bf1d", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f", + "reference": "a8e8068b31b8119e1daa5b1eb5715a3a8ea8305f", "shasum": "" }, "require": { @@ -6404,9 +6586,9 @@ "ext-zip": "*", "ext-zlib": "*", "maennchen/zipstream-php": "^2.1", - "markbaker/complex": "^1.4", - "markbaker/matrix": "^1.2", - "php": "^7.2", + "markbaker/complex": "^1.5|^2.0", + "markbaker/matrix": "^1.2|^2.0", + "php": "^7.2|^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", "psr/simple-cache": "^1.0" @@ -6417,15 +6599,15 @@ "jpgraph/jpgraph": "^4.0", "mpdf/mpdf": "^8.0", "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^8.5", + "phpunit/phpunit": "^8.5|^9.3", "squizlabs/php_codesniffer": "^3.5", "tecnickcom/tcpdf": "^6.3" }, "suggest": { - "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)", "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", "mpdf/mpdf": "Option for rendering PDF with PDF Writer", - "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)" }, "type": "library", "autoload": { @@ -6469,7 +6651,7 @@ "xls", "xlsx" ], - "time": "2020-07-19T09:51:35+00:00" + "time": "2020-10-11T13:20:59+00:00" }, { "name": "phpoption/phpoption", @@ -6538,36 +6720,37 @@ }, { "name": "plank/laravel-mediable", - "version": "4.2.3", + "version": "4.4.2", "source": { "type": "git", "url": "https://github.com/plank/laravel-mediable.git", - "reference": "7362587090d8152035d6e94d5586ac0689a84e94" + "reference": "c52785afc1b57c517b3bf092692484264b081cb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/plank/laravel-mediable/zipball/7362587090d8152035d6e94d5586ac0689a84e94", - "reference": "7362587090d8152035d6e94d5586ac0689a84e94", + "url": "https://api.github.com/repos/plank/laravel-mediable/zipball/c52785afc1b57c517b3bf092692484264b081cb8", + "reference": "c52785afc1b57c517b3bf092692484264b081cb8", "shasum": "" }, "require": { "ext-fileinfo": "*", - "illuminate/database": "^5.6|^6.0|^7.0", - "illuminate/filesystem": "^5.6|^6.0|^7.0", - "illuminate/support": "^5.6|^6.0|^7.0", - "league/flysystem": "~1.0.23", - "php": ">=7.2.0", + "illuminate/database": ">6.0", + "illuminate/filesystem": ">6.0", + "illuminate/support": ">6.0", + "league/flysystem": "^1.0.23", + "php": ">=7.3.0", "psr/http-message": "^1.0" }, "require-dev": { - "aws/aws-sdk-php": "~3.29.0", + "aws/aws-sdk-php": "^3.128.1", "guzzlehttp/guzzle": "^6.3", "guzzlehttp/promises": "^1.3", - "league/flysystem-aws-s3-v3": "~1.0.23", - "orchestra/testbench": "^3.3|^4.0|^5.0", + "laravel/legacy-factories": "^1.0.4", + "league/flysystem-aws-s3-v3": "^1.0.23", + "orchestra/testbench": "^3.3|^4.0|^5.0|^6.0", "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^8.0|^9.0", - "vlucas/phpdotenv": "^3.3" + "phpunit/phpunit": "^8.2.4|^9.0", + "vlucas/phpdotenv": "^3.3|^4.0|^5.0" }, "type": "library", "extra": { @@ -6603,82 +6786,7 @@ "media", "uploader" ], - "time": "2020-06-03T01:51:59+00:00" - }, - { - "name": "predis/predis", - "version": "v1.1.6", - "source": { - "type": "git", - "url": "https://github.com/predis/predis.git", - "reference": "9930e933c67446962997b05201c69c2319bf26de" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/9930e933c67446962997b05201c69c2319bf26de", - "reference": "9930e933c67446962997b05201c69c2319bf26de", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "cweagans/composer-patches": "^1.6", - "phpunit/phpunit": "~4.8" - }, - "suggest": { - "ext-curl": "Allows access to Webdis when paired with phpiredis", - "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" - }, - "type": "library", - "extra": { - "composer-exit-on-patch-failure": true, - "patches": { - "phpunit/phpunit-mock-objects": { - "Fix PHP 7 and 8 compatibility": "./tests/phpunit_mock_objects.patch" - }, - "phpunit/phpunit": { - "Fix PHP 7 compatibility": "./tests/phpunit_php7.patch", - "Fix PHP 8 compatibility": "./tests/phpunit_php8.patch" - } - } - }, - "autoload": { - "psr-4": { - "Predis\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Daniele Alessandri", - "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net", - "role": "Creator & Maintainer" - }, - { - "name": "Till Krüss", - "homepage": "https://till.im", - "role": "Maintainer" - } - ], - "description": "Flexible and feature-complete Redis client for PHP and HHVM", - "homepage": "http://github.com/predis/predis", - "keywords": [ - "nosql", - "predis", - "redis" - ], - "funding": [ - { - "url": "https://github.com/sponsors/tillkruss", - "type": "github" - } - ], - "time": "2020-09-11T19:18:05+00:00" + "time": "2020-09-27T01:55:59+00:00" }, { "name": "psr/container", @@ -7458,27 +7566,27 @@ }, { "name": "santigarcor/laratrust", - "version": "5.2.9", + "version": "6.2.2", "source": { "type": "git", "url": "https://github.com/santigarcor/laratrust.git", - "reference": "454a338500ea5ab2807da5ee0a799c9c3d01cc05" + "reference": "dfc2f0880c827bd20607fd4bfbe8ac471de29800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/santigarcor/laratrust/zipball/454a338500ea5ab2807da5ee0a799c9c3d01cc05", - "reference": "454a338500ea5ab2807da5ee0a799c9c3d01cc05", + "url": "https://api.github.com/repos/santigarcor/laratrust/zipball/dfc2f0880c827bd20607fd4bfbe8ac471de29800", + "reference": "dfc2f0880c827bd20607fd4bfbe8ac471de29800", "shasum": "" }, "require": { "kkszymanowski/traitor": "^0.2.0", - "laravel/framework": "~5.6.0|~5.7.0|~5.8.0|~6.0|~7.0", - "php": "^7.1" + "laravel/framework": "~6.0|~7.0|~8.0", + "php": "^7.2" }, "require-dev": { - "mockery/mockery": ">=0.9.9", - "orchestra/testbench": "~3.6.0|~3.7.0|~3.8.0|~3.9.0|4.*|5.*", - "phpunit/phpunit": ">=4.1" + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "4.*|5.*|6.*", + "phpunit/phpunit": "^7.5.15|^8.4|^9.0" }, "type": "library", "extra": { @@ -7519,7 +7627,13 @@ "rbac", "roles" ], - "time": "2020-04-29T23:28:02+00:00" + "funding": [ + { + "url": "https://github.com/santigarcor", + "type": "github" + } + ], + "time": "2020-09-15T13:30:03+00:00" }, { "name": "seld/jsonlint", @@ -7680,24 +7794,24 @@ }, { "name": "staudenmeir/belongs-to-through", - "version": "v2.10", + "version": "v2.11", "source": { "type": "git", "url": "https://github.com/staudenmeir/belongs-to-through.git", - "reference": "23be043a4885f696a0e5eb24da7221947e480cb5" + "reference": "266643c617e550f905cd6a7a8c4c26937d808255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staudenmeir/belongs-to-through/zipball/23be043a4885f696a0e5eb24da7221947e480cb5", - "reference": "23be043a4885f696a0e5eb24da7221947e480cb5", + "url": "https://api.github.com/repos/staudenmeir/belongs-to-through/zipball/266643c617e550f905cd6a7a8c4c26937d808255", + "reference": "266643c617e550f905cd6a7a8c4c26937d808255", "shasum": "" }, "require": { - "illuminate/database": "^7.0", - "php": "^7.2.5" + "illuminate/database": "^8.0", + "php": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "autoload": { @@ -7720,31 +7834,37 @@ } ], "description": "Laravel Eloquent BelongsToThrough relationships", - "time": "2020-01-31T11:29:47+00:00" + "funding": [ + { + "url": "https://paypal.me/JonasStaudenmeir", + "type": "custom" + } + ], + "time": "2020-08-19T20:48:30+00:00" }, { "name": "staudenmeir/eloquent-has-many-deep", - "version": "v1.12", + "version": "v1.13", "source": { "type": "git", "url": "https://github.com/staudenmeir/eloquent-has-many-deep.git", - "reference": "7417572873c9fb4fa84e894ebbf324629cbc63c0" + "reference": "6ba7af2a83e263bd27ee4e65fafabf89c2efcb26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/staudenmeir/eloquent-has-many-deep/zipball/7417572873c9fb4fa84e894ebbf324629cbc63c0", - "reference": "7417572873c9fb4fa84e894ebbf324629cbc63c0", + "url": "https://api.github.com/repos/staudenmeir/eloquent-has-many-deep/zipball/6ba7af2a83e263bd27ee4e65fafabf89c2efcb26", + "reference": "6ba7af2a83e263bd27ee4e65fafabf89c2efcb26", "shasum": "" }, "require": { - "illuminate/database": "^7.0", - "php": "^7.2.5" + "illuminate/database": "^8.0", + "php": "^7.3" }, "require-dev": { - "illuminate/pagination": "^7.0", - "laravel/homestead": "^10.0", - "phpunit/phpunit": "^8.5", - "staudenmeir/eloquent-eager-limit": "^1.5" + "illuminate/pagination": "^8.0", + "laravel/homestead": "^11.0", + "phpunit/phpunit": "^9.3", + "staudenmeir/eloquent-eager-limit": "^1.6" }, "type": "library", "autoload": { @@ -7763,7 +7883,13 @@ } ], "description": "Laravel Eloquent HasManyThrough relationships with unlimited levels", - "time": "2020-01-31T12:37:57+00:00" + "funding": [ + { + "url": "https://paypal.me/JonasStaudenmeir", + "type": "custom" + } + ], + "time": "2020-08-19T20:13:24+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -7829,16 +7955,16 @@ }, { "name": "symfony/console", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "04c3a31fe8ea94b42c9e2d1acc93d19782133b00" + "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/04c3a31fe8ea94b42c9e2d1acc93d19782133b00", - "reference": "04c3a31fe8ea94b42c9e2d1acc93d19782133b00", + "url": "https://api.github.com/repos/symfony/console/zipball/ae789a8a2ad189ce7e8216942cdb9b77319f5eb8", + "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8", "shasum": "" }, "require": { @@ -7918,11 +8044,11 @@ "type": "tidelift" } ], - "time": "2020-09-18T14:27:32+00:00" + "time": "2020-10-07T15:23:00+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -7989,7 +8115,7 @@ }, { "name": "symfony/debug", - "version": "v4.4.14", + "version": "v4.4.15", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -8124,16 +8250,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "d2f1d4996d5499f1261164d10080e4120001f041" + "reference": "5e4d8ef8d71822922d1eebd130219ae3491a5ca9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/d2f1d4996d5499f1261164d10080e4120001f041", - "reference": "d2f1d4996d5499f1261164d10080e4120001f041", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/5e4d8ef8d71822922d1eebd130219ae3491a5ca9", + "reference": "5e4d8ef8d71822922d1eebd130219ae3491a5ca9", "shasum": "" }, "require": { @@ -8191,11 +8317,11 @@ "type": "tidelift" } ], - "time": "2020-09-27T03:44:28+00:00" + "time": "2020-10-02T08:49:02+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -8358,16 +8484,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "f3194303d3077829dbbc1d18f50288b2a01146f2" + "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/f3194303d3077829dbbc1d18f50288b2a01146f2", - "reference": "f3194303d3077829dbbc1d18f50288b2a01146f2", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/1a8697545a8d87b9f2f6b1d32414199cc5e20aae", + "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae", "shasum": "" }, "require": { @@ -8418,11 +8544,11 @@ "type": "tidelift" } ], - "time": "2020-09-02T16:23:27+00:00" + "time": "2020-09-27T14:02:37+00:00" }, { "name": "symfony/finder", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -8560,16 +8686,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "6cca6b2e4b69fc5bace160d14cf1ee5f71483db4" + "reference": "353b42e7b4fd1c898aab09a059466c9cea74039b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/6cca6b2e4b69fc5bace160d14cf1ee5f71483db4", - "reference": "6cca6b2e4b69fc5bace160d14cf1ee5f71483db4", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/353b42e7b4fd1c898aab09a059466c9cea74039b", + "reference": "353b42e7b4fd1c898aab09a059466c9cea74039b", "shasum": "" }, "require": { @@ -8631,20 +8757,20 @@ "type": "tidelift" } ], - "time": "2020-09-13T05:01:27+00:00" + "time": "2020-09-27T14:14:57+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "17227644c3c66dcf32bdfeceff4364d090cd6756" + "reference": "1764b87d2f10d5c9ce6e4850fe27934116d89708" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/17227644c3c66dcf32bdfeceff4364d090cd6756", - "reference": "17227644c3c66dcf32bdfeceff4364d090cd6756", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1764b87d2f10d5c9ce6e4850fe27934116d89708", + "reference": "1764b87d2f10d5c9ce6e4850fe27934116d89708", "shasum": "" }, "require": { @@ -8745,11 +8871,11 @@ "type": "tidelift" } ], - "time": "2020-09-27T04:33:19+00:00" + "time": "2020-10-04T07:57:28+00:00" }, { "name": "symfony/mime", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", @@ -9606,7 +9732,7 @@ }, { "name": "symfony/process", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -9670,16 +9796,16 @@ }, { "name": "symfony/routing", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d36e06eb02a55522a8eed070c1cbc3dc3c389876" + "reference": "720348c2ae011f8c56964c0fc3e992840cb60ccf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d36e06eb02a55522a8eed070c1cbc3dc3c389876", - "reference": "d36e06eb02a55522a8eed070c1cbc3dc3c389876", + "url": "https://api.github.com/repos/symfony/routing/zipball/720348c2ae011f8c56964c0fc3e992840cb60ccf", + "reference": "720348c2ae011f8c56964c0fc3e992840cb60ccf", "shasum": "" }, "require": { @@ -9758,7 +9884,7 @@ "type": "tidelift" } ], - "time": "2020-09-02T16:23:27+00:00" + "time": "2020-10-02T13:05:43+00:00" }, { "name": "symfony/service-contracts", @@ -9838,7 +9964,7 @@ }, { "name": "symfony/string", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", @@ -9923,7 +10049,7 @@ }, { "name": "symfony/translation", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", @@ -10015,16 +10141,16 @@ }, { "name": "symfony/translation-contracts", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "77ce1c3627c9f39643acd9af086631f842c50c4d" + "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/77ce1c3627c9f39643acd9af086631f842c50c4d", - "reference": "77ce1c3627c9f39643acd9af086631f842c50c4d", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e2eaa60b558f26a4b0354e1bbb25636efaaad105", + "reference": "e2eaa60b558f26a4b0354e1bbb25636efaaad105", "shasum": "" }, "require": { @@ -10036,7 +10162,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -10086,11 +10212,11 @@ "type": "tidelift" } ], - "time": "2020-09-07T11:33:47+00:00" + "time": "2020-09-28T13:05:58+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.1.6", + "version": "v5.1.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", @@ -10229,37 +10355,39 @@ }, { "name": "vlucas/phpdotenv", - "version": "v4.1.8", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32" + "reference": "fba64139db67123c7a57072e5f8d3db10d160b66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/572af79d913627a9d70374d27a6f5d689a35de32", - "reference": "572af79d913627a9d70374d27a6f5d689a35de32", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/fba64139db67123c7a57072e5f8d3db10d160b66", + "reference": "fba64139db67123c7a57072e5f8d3db10d160b66", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0", - "phpoption/phpoption": "^1.7.3", - "symfony/polyfill-ctype": "^1.17" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.1", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.7.4", + "symfony/polyfill-ctype": "^1.17", + "symfony/polyfill-mbstring": "^1.17", + "symfony/polyfill-php80": "^1.17" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "ext-pcre": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0" + "phpunit/phpunit": "^7.5.20 || ^8.5.2 || ^9.0" }, "suggest": { - "ext-filter": "Required to use the boolean validator.", - "ext-pcre": "Required to use most of the library." + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "5.2-dev" } }, "autoload": { @@ -10299,7 +10427,7 @@ "type": "tidelift" } ], - "time": "2020-07-14T19:22:52+00:00" + "time": "2020-09-14T15:57:31+00:00" }, { "name": "voku/portable-ascii", @@ -10616,16 +10744,16 @@ }, { "name": "facade/ignition", - "version": "2.3.7", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "b364db8860a63c1fb58b72b9718863c21df08762" + "reference": "e8fed9c382cd1d02b5606688576a35619afdf82c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/b364db8860a63c1fb58b72b9718863c21df08762", - "reference": "b364db8860a63c1fb58b72b9718863c21df08762", + "url": "https://api.github.com/repos/facade/ignition/zipball/e8fed9c382cd1d02b5606688576a35619afdf82c", + "reference": "e8fed9c382cd1d02b5606688576a35619afdf82c", "shasum": "" }, "require": { @@ -10684,7 +10812,7 @@ "laravel", "page" ], - "time": "2020-09-06T19:26:27+00:00" + "time": "2020-10-01T23:01:14+00:00" }, { "name": "facade/ignition-contracts", @@ -10895,30 +11023,33 @@ }, { "name": "mockery/mockery", - "version": "1.3.3", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" + "reference": "20cab678faed06fac225193be281ea0fddb43b93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", - "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "url": "https://api.github.com/repos/mockery/mockery/zipball/20cab678faed06fac225193be281ea0fddb43b93", + "reference": "20cab678faed06fac225193be281ea0fddb43b93", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" + "phpunit/phpunit": "^8.5 || ^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -10956,7 +11087,7 @@ "test double", "testing" ], - "time": "2020-08-11T18:10:21+00:00" + "time": "2020-08-11T18:10:13+00:00" }, { "name": "myclabs/deep-copy", @@ -11014,35 +11145,35 @@ }, { "name": "nunomaduro/collision", - "version": "v4.2.0", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "d50490417eded97be300a92cd7df7badc37a9018" + "reference": "4a343299054e9368d0db4a982a780cc4ffa12707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/d50490417eded97be300a92cd7df7badc37a9018", - "reference": "d50490417eded97be300a92cd7df7badc37a9018", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/4a343299054e9368d0db4a982a780cc4ffa12707", + "reference": "4a343299054e9368d0db4a982a780cc4ffa12707", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.4", - "php": "^7.2.5", + "filp/whoops": "^2.7.2", + "php": "^7.3", "symfony/console": "^5.0" }, "require-dev": { - "facade/ignition": "^2.0", - "fideloper/proxy": "^4.2", - "friendsofphp/php-cs-fixer": "^2.16", - "fruitcake/laravel-cors": "^1.0", - "laravel/framework": "^7.0", - "laravel/tinker": "^2.0", - "nunomaduro/larastan": "^0.5", - "orchestra/testbench": "^5.0", - "phpstan/phpstan": "^0.12.3", - "phpunit/phpunit": "^8.5.1 || ^9.0" + "fideloper/proxy": "^4.4.0", + "friendsofphp/php-cs-fixer": "^2.16.4", + "fruitcake/laravel-cors": "^2.0.1", + "laravel/framework": "^8.0", + "laravel/tinker": "^2.4.1", + "nunomaduro/larastan": "^0.6.2", + "nunomaduro/mock-final-classes": "^1.0", + "orchestra/testbench": "^6.0", + "phpstan/phpstan": "^0.12.36", + "phpunit/phpunit": "^9.3.3" }, "type": "library", "extra": { @@ -11094,32 +11225,33 @@ "type": "patreon" } ], - "time": "2020-04-04T19:56:08+00:00" + "time": "2020-08-27T18:58:22+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -11149,24 +11281,24 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "c6bb6825def89e0a32220f88337f8ceaf1975fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/c6bb6825def89e0a32220f88337f8ceaf1975fa0", + "reference": "c6bb6825def89e0a32220f88337f8ceaf1975fa0", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -11196,32 +11328,32 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "time": "2020-06-27T14:39:04+00:00" }, { "name": "phpspec/prophecy", - "version": "1.11.1", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160" + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b20034be5efcdab4fb60ca3a29cba2949aead160", - "reference": "b20034be5efcdab4fb60ca3a29cba2949aead160", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2", - "phpdocumentor/reflection-docblock": "^5.0", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0 || ^9.0 <9.3" }, "type": "library", "extra": { @@ -11259,44 +11391,48 @@ "spy", "stub" ], - "time": "2020-07-08T12:44:21+00:00" + "time": "2020-09-29T09:10:42+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.10", + "version": "9.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" + "reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", - "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53a4b737e83be724efd2bc4e7b929b9a30c48972", + "reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" + "nikic/php-parser": "^4.8", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^8.2.2" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.7.2" + "ext-pcov": "*", + "ext-xdebug": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -11322,32 +11458,38 @@ "testing", "xunit" ], - "time": "2019-11-20T13:55:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-02T03:37:32+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -11372,26 +11514,99 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "18c887016e60e52477e54534956d7b47bc52cd84" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/18c887016e60e52477e54534956d7b47bc52cd84", + "reference": "18c887016e60e52477e54534956d7b47bc52cd84", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -11413,32 +11628,38 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:03:05+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9ff14f493699e2f6adee9fd06a0245b276643b7", + "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -11462,106 +11683,65 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", - "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": "^7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "url": "https://github.com/sebastianbergmann", + "type": "github" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "abandoned": true, - "time": "2019-09-17T06:23:10+00:00" + "time": "2020-09-28T06:00:25+00:00" }, { "name": "phpunit/phpunit", - "version": "8.5.8", + "version": "9.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997" + "reference": "1f09a12726593737e8a228ebb1c8647305d07c41" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/34c18baa6a44f1d1fbf0338907139e9dce95b997", - "reference": "34c18baa6a44f1d1fbf0338907139e9dce95b997", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1f09a12726593737e8a228ebb1c8647305d07c41", + "reference": "1f09a12726593737e8a228ebb1c8647305d07c41", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.1", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3", + "sebastian/version": "^3.0.2" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" }, "suggest": { "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" + "ext-xdebug": "*" }, "bin": [ "phpunit" @@ -11569,12 +11749,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.5-dev" + "dev-master": "9.4-dev" } }, "autoload": { "classmap": [ "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -11605,7 +11788,7 @@ "type": "github" } ], - "time": "2020-06-22T07:06:58+00:00" + "time": "2020-10-11T07:41:19+00:00" }, { "name": "scrivo/highlight.php", @@ -11683,29 +11866,133 @@ "time": "2020-08-27T03:24:44+00:00" }, { - "name": "sebastian/code-unit-reverse-lookup", + "name": "sebastian/cli-parser", "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/59236be62b1bb9919e6d7f60b0b832dc05cef9ab", + "reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-02T14:47:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" } }, "autoload": { @@ -11725,34 +12012,40 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "7a8ff306445707539c1a6397372a982a1ec55120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7a8ff306445707539c1a6397372a982a1ec55120", + "reference": "7a8ff306445707539c1a6397372a982a1ec55120", "shasum": "" }, "require": { - "php": "^7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -11765,6 +12058,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -11776,10 +12073,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -11789,33 +12082,39 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-30T06:47:25+00:00" }, { - "name": "sebastian/diff", - "version": "3.0.2", + "name": "sebastian/complexity", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ba8cc2da0c0bfbc813d03b56406734030c7f1eff", + "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff", "shasum": "" }, "require": { - "php": "^7.1" + "nikic/php-parser": "^4.7", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -11829,12 +12128,65 @@ ], "authors": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:05:03+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ffc949a1a2aae270ea064453d7535b82e4c32092", + "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -11845,27 +12197,33 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:32:55+00:00" }, { "name": "sebastian/environment", - "version": "4.2.3", + "version": "5.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", - "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -11873,7 +12231,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -11898,34 +12256,40 @@ "environment", "hhvm" ], - "time": "2019-11-20T08:46:58+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", - "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -11965,30 +12329,36 @@ "export", "exporter" ], - "time": "2019-09-14T09:02:43+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ea779cb749a478b22a2564ac41cd7bda79c78dc7", + "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7", "shasum": "" }, "require": { - "php": "^7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-uopz": "*" @@ -11996,7 +12366,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -12019,34 +12389,93 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:54:06+00:00" }, { - "name": "sebastian/object-enumerator", - "version": "3.0.3", + "name": "sebastian/lines-of-code", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/6514b8f21906b8b46f520d1fbd17a4523fa59a54", + "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "nikic/php-parser": "^4.6", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:07:27+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "f6f5957013d84725427d361507e13513702888a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f6f5957013d84725427d361507e13513702888a4", + "reference": "f6f5957013d84725427d361507e13513702888a4", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" } }, "autoload": { @@ -12066,122 +12495,33 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:55:06+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5", + "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "shasum": "" - }, - "require": { - "php": "^7.1" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { @@ -12204,34 +12544,150 @@ "email": "sebastian@phpunit.de" } ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:56:16+00:00" }, { - "name": "sebastian/type", - "version": "1.1.3", + "name": "sebastian/recursion-context", + "version": "4.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "ed8c9cd355089134bc9cba421b5cfdd58f0eaef7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/ed8c9cd355089134bc9cba421b5cfdd58f0eaef7", + "reference": "ed8c9cd355089134bc9cba421b5cfdd58f0eaef7", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.2" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:17:32+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fa592377f3923946cb90bf1f6a71ba2e5f229909", + "reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" } }, "autoload": { @@ -12252,29 +12708,35 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-06T08:41:03+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -12295,7 +12757,13 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "theseer/tokenizer", @@ -12346,11 +12814,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "league/omnipay": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.2.5", + "php": "^7.3.0", "ext-bcmath": "*" }, "platform-dev": [], diff --git a/config/laratrust.php b/config/laratrust.php index 28c0df553..387d13e73 100644 --- a/config/laratrust.php +++ b/config/laratrust.php @@ -67,30 +67,6 @@ return [ 'expiration_time' => 3600, ], - /* - |-------------------------------------------------------------------------- - | Use teams feature in the package - |-------------------------------------------------------------------------- - | - | Defines if Laratrust will use the teams feature. - | Please check the docs to see what you need to do in case you have the package already configured. - | - */ - 'use_teams' => false, - - /* - |-------------------------------------------------------------------------- - | Strict check for roles/permissions inside teams - |-------------------------------------------------------------------------- - | - | Determines if a strict check should be done when checking if a role or permission - | is attached inside a team. - | If it's false, when checking a role/permission without specifying the team, - | it will check only if the user has attached that role/permission ignoring the team. - | - */ - 'teams_strict_check' => false, - /* |-------------------------------------------------------------------------- | Laratrust User Models @@ -132,7 +108,6 @@ return [ * Team model */ 'team' => 'App\Models\Auth\Team', - ], /* @@ -173,7 +148,6 @@ return [ * Permission - Role intermediate table. */ 'permission_role' => 'role_permissions', - ], /* @@ -204,7 +178,6 @@ return [ * Role foreign key on Laratrust's role_user and permission_user tables. */ 'team' => 'team_id', - ], /* @@ -236,7 +209,8 @@ return [ * Aborts the execution with a 403 code. */ 'abort' => [ - 'code' => 403 + 'code' => 403, + 'message' => 'User does not have any of the necessary access rights.' ], /** * Redirects the user to the given url. @@ -254,14 +228,123 @@ return [ ] ], + 'teams' => [ + /* + |-------------------------------------------------------------------------- + | Use teams feature in the package + |-------------------------------------------------------------------------- + | + | Defines if Laratrust will use the teams feature. + | Please check the docs to see what you need to do in case you have the package already configured. + | + */ + 'enabled' => false, + + /* + |-------------------------------------------------------------------------- + | Strict check for roles/permissions inside teams + |-------------------------------------------------------------------------- + | + | Determines if a strict check should be done when checking if a role or permission + | is attached inside a team. + | If it's false, when checking a role/permission without specifying the team, + | it will check only if the user has attached that role/permission ignoring the team. + | + */ + 'strict_check' => false, + ], + /* |-------------------------------------------------------------------------- - | Laratrust Magic 'can' Method + | Laratrust Magic 'isAbleTo' Method |-------------------------------------------------------------------------- | - | Supported cases for the magic can method (Refer to the docs). + | Supported cases for the magic is able to method (Refer to the docs). | Available: camel_case|snake_case|kebab_case | */ - 'magic_can_method_case' => 'kebab_case', + 'magic_is_able_to_method_case' => 'kebab_case', + + /* + |-------------------------------------------------------------------------- + | Laratrust Panel + |-------------------------------------------------------------------------- + | + | Section to manage everything related with the admin panel for the roles and permissions. + | + */ + 'panel' => [ + /* + |-------------------------------------------------------------------------- + | Laratrust Panel Register + |-------------------------------------------------------------------------- + | + | This manages if routes used for the admin panel should be registered. + | Turn this value to false if you don't want to use Laratrust admin panel + | + */ + 'register' => false, + + /* + |-------------------------------------------------------------------------- + | Laratrust Panel Path + |-------------------------------------------------------------------------- + | + | This is the URI path where Laratrust panel for roles and permissions + | will be accessible from. + | + */ + 'path' => 'laratrust', + + /* + |-------------------------------------------------------------------------- + | Laratrust Panel Path + |-------------------------------------------------------------------------- + | + | The route where the go back link should point + | + */ + 'go_back_route' => '/', + + /* + |-------------------------------------------------------------------------- + | Laratrust Panel Route Middleware + |-------------------------------------------------------------------------- + | + | These middleware will get attached onto each Laratrust panel route. + | + */ + 'middleware' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Enable permissions assignment + |-------------------------------------------------------------------------- + | + | Enable/Disable the permissions assignment to the users. + | + */ + 'assign_permissions_to_user' => true, + + /* + |-------------------------------------------------------------------------- + | Add restriction to roles in the panel + |-------------------------------------------------------------------------- + | + | Configure which roles can not be editable, deletable and removable. + | To add a role to the restriction, use name of the role here. + | + */ + 'roles_restrictions' => [ + // The user won't be able to remove roles already assigned to users. + 'not_removable' => [], + + // The user won't be able to edit the role and the permissions assigned. + 'not_editable' => [], + + // The user won't be able to delete the role. + 'not_deletable' => [], + ], + ], + ]; diff --git a/config/logging.php b/config/logging.php index 83bcc69f1..26577ead3 100644 --- a/config/logging.php +++ b/config/logging.php @@ -44,13 +44,13 @@ return [ 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), ], 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), 'days' => 14, ], @@ -59,12 +59,12 @@ return [ 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', 'emoji' => ':boom:', - 'level' => 'critical', + 'level' => env('LOG_LEVEL', 'critical'), ], 'papertrail' => [ 'driver' => 'monolog', - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), 'handler' => SyslogUdpHandler::class, 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), @@ -83,12 +83,12 @@ return [ 'syslog' => [ 'driver' => 'syslog', - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), ], 'errorlog' => [ 'driver' => 'errorlog', - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), ], 'null' => [ diff --git a/config/mail.php b/config/mail.php index 493071742..7fc6f3c10 100644 --- a/config/mail.php +++ b/config/mail.php @@ -42,6 +42,7 @@ return [ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => env('MAIL_TIMEOUT'), + 'auth_mode' => env('MAIL_AUTH_MODE'), ], 'ses' => [ diff --git a/config/queue.php b/config/queue.php index 00b76d651..122229666 100644 --- a/config/queue.php +++ b/config/queue.php @@ -81,7 +81,7 @@ return [ */ 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database'), + 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 'database' => env('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], diff --git a/config/session.php b/config/session.php index 257fc398e..53fb21b17 100644 --- a/config/session.php +++ b/config/session.php @@ -92,10 +92,12 @@ return [ | Session Cache Store |-------------------------------------------------------------------------- | - | When using the "apc", "memcached", or "dynamodb" session drivers you may + | While using one of the framework's cache driven session backends you may | list a cache store that should be used for these sessions. This value | must match with one of the application's configured cache "stores". | + | Affects: "apc", "dynamodb", "memcached", "redis" + | */ 'store' => env('SESSION_STORE', null), diff --git a/database/factories/Account.php b/database/factories/Account.php index 571f5e460..0a5417e55 100644 --- a/database/factories/Account.php +++ b/database/factories/Account.php @@ -1,38 +1,78 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Banking\Account as Model; -$factory->define(Account::class, function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); +class Account extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'company_id' => $company->id, - 'name' => $faker->text(15), - 'number' => (string) $faker->iban(), - 'currency_code' => $company->currencies()->enabled()->get()->random(1)->pluck('code')->first(), - 'opening_balance' => '0', - 'bank_name' => $faker->text(15), - 'bank_phone' => $faker->phoneNumber, - 'bank_address' => $faker->address, - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + 'company_id' => $this->company->id, + 'name' => $this->faker->text(15), + 'number' => (string) $this->faker->iban(), + 'currency_code' => $this->company->currencies()->enabled()->get()->random(1)->pluck('code')->first(), + 'opening_balance' => '0', + 'bank_name' => $this->faker->text(15), + 'bank_phone' => $this->faker->phoneNumber, + 'bank_address' => $this->faker->address, + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Account::class, 'enabled', ['enabled' => 1]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Account::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } -$factory->state(Account::class, 'default_currency', function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); - - return [ - 'currency_code' => setting('default.currency'), - ]; -}); + /** + * Indicate that the default currency is used. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function default_currency() + { + return $this->state(function (array $attributes) { + return [ + 'currency_code' => setting('default.currency'), + ]; + }); + } +} diff --git a/database/factories/Bill.php b/database/factories/Bill.php index 968455fc8..4ea921872 100644 --- a/database/factories/Bill.php +++ b/database/factories/Bill.php @@ -1,185 +1,274 @@ companies()->first(); +class Bill extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; -$factory->define(Bill::class, function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $billed_at = $this->faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'); + $due_at = Date::parse($billed_at)->addDays(10)->format('Y-m-d H:i:s'); - $billed_at = $faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'); - $due_at = Date::parse($billed_at)->addDays(10)->format('Y-m-d H:i:s'); + $contacts = Contact::vendor()->enabled()->get(); - $contacts = Contact::vendor()->enabled()->get(); + if ($contacts->count()) { + $contact = $contacts->random(1)->first(); + } else { + $contact = Contact::factory()->vendor()->enabled()->create(); + } - if ($contacts->count()) { - $contact = $contacts->random(1)->first(); - } else { - $contact = factory(Contact::class)->states('enabled', 'vendor')->create(); + $statuses = ['draft', 'received', 'partial', 'paid', 'cancelled']; + + return [ + 'company_id' => $this->company->id, + 'billed_at' => $billed_at, + 'due_at' => $due_at, + 'bill_number' => (string) $this->faker->randomNumber(5), + 'currency_code' => setting('default.currency'), + 'currency_rate' => '1', + 'notes' => $this->faker->text(5), + 'category_id' => $this->company->categories()->expense()->get()->random(1)->pluck('id')->first(), + 'contact_id' => $contact->id, + 'contact_name' => $contact->name, + 'contact_email' => $contact->email, + 'contact_tax_number' => $contact->tax_number, + 'contact_phone' => $contact->phone, + 'contact_address' => $contact->address, + 'status' => $this->faker->randomElement($statuses), + 'amount' => '0', + ]; } - $statuses = ['draft', 'received', 'partial', 'paid', 'cancelled']; - - return [ - 'company_id' => $company->id, - 'billed_at' => $billed_at, - 'due_at' => $due_at, - 'bill_number' => (string) $faker->randomNumber(5), - 'currency_code' => setting('default.currency'), - 'currency_rate' => '1', - 'notes' => $faker->text(5), - 'category_id' => $company->categories()->expense()->get()->random(1)->pluck('id')->first(), - 'contact_id' => $contact->id, - 'contact_name' => $contact->name, - 'contact_email' => $contact->email, - 'contact_tax_number' => $contact->tax_number, - 'contact_phone' => $contact->phone, - 'contact_address' => $contact->address, - 'status' => $faker->randomElement($statuses), - 'amount' => '0', - ]; -}); - -$factory->state(Bill::class, 'draft', ['status' => 'draft']); - -$factory->state(Bill::class, 'received', ['status' => 'received']); - -$factory->state(Bill::class, 'partial', ['status' => 'partial']); - -$factory->state(Bill::class, 'paid', ['status' => 'paid']); - -$factory->state(Bill::class, 'cancelled', ['status' => 'cancelled']); - -$factory->state(Bill::class, 'recurring', function (Faker $faker) { - $frequencies = ['monthly', 'weekly']; - - return [ - 'recurring_frequency' => 'yes', - 'recurring_interval' => '1', - 'recurring_custom_frequency' => $faker->randomElement($frequencies), - 'recurring_count' => '1', - ]; -}); - -$factory->state(Bill::class, 'items', function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); - - $amount = $faker->randomFloat(2, 1, 1000); - - $taxes = Tax::enabled()->get(); - - if ($taxes->count()) { - $tax = $taxes->random(1)->first(); - } else { - $tax = factory(Tax::class)->states('enabled')->create(); - } - - $items = Item::enabled()->get(); - - if ($items->count()) { - $item = $items->random(1)->first(); - } else { - $item = factory(Item::class)->states('enabled')->create(); - } - - $items = [ - [ - 'name' => $item->name, - 'item_id' => $item->id, - 'tax_id' => [$tax->id], - 'quantity' => '1', - 'price' => $amount, - 'currency' => setting('default.currency'), - ] - ]; - - return [ - 'items' => $items, - 'recurring_frequency' => 'no', - ]; -}); - -$factory->afterCreating(Bill::class, function ($bill, $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); - - $init_status = $bill->status; - - $bill->status = 'draft'; - event(new BillCreated($bill)); - $bill->status = $init_status; - - $amount = $faker->randomFloat(2, 1, 1000); - - $taxes = Tax::enabled()->get(); - - if ($taxes->count()) { - $tax = $taxes->random(1)->first(); - } else { - $tax = factory(Tax::class)->states('enabled')->create(); - } - - $items = Item::enabled()->get(); - - if ($items->count()) { - $item = $items->random(1)->first(); - } else { - $item = factory(Item::class)->states('enabled')->create(); - } - - $items = [ - [ - 'name' => $item->name, - 'item_id' => $item->id, - 'tax_id' => [$tax->id], - 'quantity' => '1', - 'price' => $amount, - 'currency' => $bill->currency_code, - ] - ]; - - $request = [ - 'items' => $items, - 'recurring_frequency' => 'no', - ]; - - $updated_bill = dispatch_now(new UpdateBill($bill, $request)); - - switch ($init_status) { - case 'received': - event(new BillReceived($updated_bill)); - - break; - case 'partial': - case 'paid': - $payment_request = [ - 'paid_at' => $updated_bill->due_at, + /** + * Indicate that the model status is draft. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function draft() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'draft', ]; + }); + } - if ($init_status == 'partial') { - $payment_request['amount'] = (int) round($amount / 3, $bill->currency->precision); + /** + * Indicate that the model status is received. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function received() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'received', + ]; + }); + } + + /** + * Indicate that the model status is partial. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function partial() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'partial', + ]; + }); + } + + /** + * Indicate that the model status is paid. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function paid() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'paid', + ]; + }); + } + + /** + * Indicate that the model status is cancelled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function cancelled() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'cancelled', + ]; + }); + } + + /** + * Indicate that the model is recurring. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function recurring() + { + return $this->state(function (array $attributes) { + $frequencies = ['monthly', 'weekly']; + + return [ + 'recurring_frequency' => 'yes', + 'recurring_interval' => '1', + 'recurring_custom_frequency' => $this->faker->randomElement($frequencies), + 'recurring_count' => '1', + ]; + }); + } + + /** + * Indicate that the model has items. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function items() + { + return $this->state(function (array $attributes) { + $amount = $this->faker->randomFloat(2, 1, 1000); + + $taxes = Tax::enabled()->get(); + + if ($taxes->count()) { + $tax = $taxes->random(1)->first(); + } else { + $tax = Tax::factory()->enabled()->create(); } - $transaction = dispatch_now(new CreateDocumentTransaction($updated_bill, $payment_request)); + $items = Item::enabled()->get(); - break; - case 'cancelled': - event(new BillCancelled($updated_bill)); + if ($items->count()) { + $item = $items->random(1)->first(); + } else { + $item = Item::factory()->enabled()->create(); + } - break; + $items = [ + [ + 'name' => $item->name, + 'item_id' => $item->id, + 'tax_id' => [$tax->id], + 'quantity' => '1', + 'price' => $amount, + 'currency' => setting('default.currency'), + ] + ]; + + return [ + 'items' => $items, + 'recurring_frequency' => 'no', + ]; + }); } -}); + + /** + * Configure the model factory. + * + * @return $this + */ + public function configure() + { + return $this->afterCreating(function (Model $bill) { + $init_status = $bill->status; + + $bill->status = 'draft'; + event(new BillCreated($bill)); + $bill->status = $init_status; + + $amount = $this->faker->randomFloat(2, 1, 1000); + + $taxes = Tax::enabled()->get(); + + if ($taxes->count()) { + $tax = $taxes->random(1)->first(); + } else { + $tax = Tax::factory()->enabled()->create(); + } + + $items = Item::enabled()->get(); + + if ($items->count()) { + $item = $items->random(1)->first(); + } else { + $item = Item::factory()->enabled()->create(); + } + + $items = [ + [ + 'name' => $item->name, + 'item_id' => $item->id, + 'tax_id' => [$tax->id], + 'quantity' => '1', + 'price' => $amount, + 'currency' => $bill->currency_code, + ] + ]; + + $request = [ + 'items' => $items, + 'recurring_frequency' => 'no', + ]; + + $updated_bill = $this->dispatch(new UpdateBill($bill, $request)); + + switch ($init_status) { + case 'received': + event(new BillReceived($updated_bill)); + + break; + case 'partial': + case 'paid': + $payment_request = [ + 'paid_at' => $updated_bill->due_at, + ]; + + if ($init_status == 'partial') { + $payment_request['amount'] = (int) round($amount / 3, $bill->currency->precision); + } + + $transaction = dispatch_now(new CreateDocumentTransaction($updated_bill, $payment_request)); + + break; + case 'cancelled': + event(new BillCancelled($updated_bill)); + + break; + } + }); + } +} diff --git a/database/factories/Category.php b/database/factories/Category.php index c8ed5c9a5..4dc1882c7 100644 --- a/database/factories/Category.php +++ b/database/factories/Category.php @@ -1,34 +1,118 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Setting\Category as Model; -$factory->define(Category::class, function (Faker $faker) use ($company) { - setting()->setExtraColumns(['company_id' => $company->id]); +class Category extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - $types = ['income', 'expense', 'item', 'other']; + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $types = ['income', 'expense', 'item', 'other']; - return [ - 'company_id' => $company->id, - 'name' => $faker->text(15), - 'type' => $faker->randomElement($types), - 'color' => $faker->hexColor, - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + return [ + 'company_id' => $this->company->id, + 'name' => $this->faker->text(15), + 'type' => $this->faker->randomElement($types), + 'color' => $this->faker->hexColor, + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Category::class, 'enabled', ['enabled' => 1]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Category::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } -$factory->state(Category::class, 'income', ['type' => 'income']); + /** + * Indicate that the model type is income. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function income() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'income', + ]; + }); + } -$factory->state(Category::class, 'expense', ['type' => 'expense']); + /** + * Indicate that the model type is expense. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function expense() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'expense', + ]; + }); + } -$factory->state(Category::class, 'item', ['type' => 'item']); + /** + * Indicate that the model type is item. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function item() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'item', + ]; + }); + } -$factory->state(Category::class, 'other', ['type' => 'other']); + /** + * Indicate that the model type is other. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function other() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'other', + ]; + }); + } +} diff --git a/database/factories/Contact.php b/database/factories/Contact.php index 0a33aede7..3d194e131 100644 --- a/database/factories/Contact.php +++ b/database/factories/Contact.php @@ -1,38 +1,100 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Common\Contact as Model; +use App\Traits\Contacts; -$factory->define(Contact::class, function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); +class Contact extends Factory +{ + use Contacts; - $types = ['customer', 'vendor']; + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'company_id' => $company->id, - 'type' => $faker->randomElement($types), - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, - 'user_id' => null, - 'tax_number' => $faker->randomNumber(9), - 'phone' => $faker->phoneNumber, - 'address' => $faker->address, - 'website' => 'https://akaunting.com', - 'currency_code' => setting('default.currency'), - 'reference' => $faker->text(5), - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $types = array_merge($this->getCustomerTypes(), $this->getVendorTypes()); -$factory->state(Contact::class, 'enabled', ['enabled' => 1]); + return [ + 'company_id' => $this->company->id, + 'type' => $this->faker->randomElement($types), + 'name' => $this->faker->name, + 'email' => $this->faker->unique()->safeEmail, + 'user_id' => null, + 'tax_number' => $this->faker->randomNumber(9), + 'phone' => $this->faker->phoneNumber, + 'address' => $this->faker->address, + 'website' => 'https://akaunting.com', + 'currency_code' => setting('default.currency'), + 'reference' => $this->faker->text(5), + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Contact::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Contact::class, 'customer', ['type' => 'customer']); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } -$factory->state(Contact::class, 'vendor', ['type' => 'vendor']); + /** + * Indicate that the model type is customer. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function customer() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'customer', + ]; + }); + } + + /** + * Indicate that the model type is vendor. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function vendor() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'vendor', + ]; + }); + } +} diff --git a/database/factories/Currency.php b/database/factories/Currency.php index 11cc5b174..07c187b3e 100644 --- a/database/factories/Currency.php +++ b/database/factories/Currency.php @@ -1,45 +1,80 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Setting\Currency as Model; -$factory->define(Currency::class, function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); +class Currency extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - $currencies = config('money'); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $currencies = config('money'); - Currency::pluck('code')->each(function ($db_code) use (&$currencies) { - unset($currencies[$db_code]); - }); + Model::pluck('code')->each(function ($db_code) use (&$currencies) { + unset($currencies[$db_code]); + }); - $random = $faker->randomElement($currencies); + $random = $this->faker->randomElement($currencies); - $filtered = array_filter($currencies, function ($value) use ($random) { - return ($value['code'] == $random['code']); - }); + $filtered = array_filter($currencies, function ($value) use ($random) { + return ($value['code'] == $random['code']); + }); - $code = key($filtered); - $currency = $filtered[$code]; + $code = key($filtered); + $currency = $filtered[$code]; - return [ - 'company_id' => $company->id, - 'name' => $currency['name'], - 'code' => $code, - 'rate' => $faker->randomFloat($currency['precision'], 1, 10), - 'precision' => $currency['precision'], - 'symbol' => $currency['symbol'], - 'symbol_first' => $currency['symbol_first'], - 'decimal_mark' => $currency['decimal_mark'], - 'thousands_separator' => $currency['thousands_separator'], - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + return [ + 'company_id' => $this->company->id, + 'name' => $currency['name'], + 'code' => $code, + 'rate' => $this->faker->randomFloat($currency['precision'], 1, 10), + 'precision' => $currency['precision'], + 'symbol' => $currency['symbol'], + 'symbol_first' => $currency['symbol_first'], + 'decimal_mark' => $currency['decimal_mark'], + 'thousands_separator' => $currency['thousands_separator'], + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Currency::class, 'enabled', ['enabled' => 1]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Currency::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } +} diff --git a/database/factories/Dashboard.php b/database/factories/Dashboard.php index 73e1bc2ab..70e715e90 100644 --- a/database/factories/Dashboard.php +++ b/database/factories/Dashboard.php @@ -1,32 +1,84 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Common\Dashboard as Model; -$factory->define(Dashboard::class, function (Faker $faker) use ($company) { - setting()->setExtraColumns(['company_id' => $company->id]); +class Dashboard extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'company_id' => $company->id, - 'name' => $faker->text(15), - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + 'company_id' => $this->company->id, + 'name' => $this->faker->text(15), + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Dashboard::class, 'enabled', ['enabled' => 1]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Dashboard::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } -$factory->state(Dashboard::class, 'users', function (Faker $faker) use ($company) { - return [ - 'users' => $company->users()->enabled()->get()->pluck('id')->toArray(), - ]; -}); + /** + * Indicate the model users. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function users() + { + return $this->state(function (array $attributes) { + return [ + 'users' => $this->getCompanyUsers(), + ]; + }); + } -$factory->afterCreating(Dashboard::class, function ($dashboard, $faker) use ($company) { - $dashboard->users()->attach($company->users()->enabled()->get()->pluck('id')->toArray()); -}); + /** + * Configure the model factory. + * + * @return $this + */ + public function configure() + { + return $this->afterCreating(function (Model $dashboard) { + $dashboard->users()->attach($this->getCompanyUsers()); + }); + } +} diff --git a/database/factories/Invoice.php b/database/factories/Invoice.php index 38aaa1b17..6717323b3 100644 --- a/database/factories/Invoice.php +++ b/database/factories/Invoice.php @@ -1,194 +1,295 @@ companies()->first(); +class Invoice extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; -$factory->define(Invoice::class, function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $invoiced_at = $this->faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'); + $due_at = Date::parse($invoiced_at)->addDays(setting('invoice.payment_terms'))->format('Y-m-d H:i:s'); - $invoiced_at = $faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'); - $due_at = Date::parse($invoiced_at)->addDays(setting('invoice.payment_terms'))->format('Y-m-d H:i:s'); + $contacts = Contact::customer()->enabled()->get(); - $contacts = Contact::customer()->enabled()->get(); + if ($contacts->count()) { + $contact = $contacts->random(1)->first(); + } else { + $contact = Contact::factory()->customer()->enabled()->create(); + } - if ($contacts->count()) { - $contact = $contacts->random(1)->first(); - } else { - $contact = factory(Contact::class)->states('enabled', 'customer')->create(); + $statuses = ['draft', 'sent', 'viewed', 'partial', 'paid', 'cancelled']; + + return [ + 'company_id' => $this->company->id, + 'invoiced_at' => $invoiced_at, + 'due_at' => $due_at, + 'invoice_number' => setting('invoice.number_prefix') . $this->faker->randomNumber(setting('invoice.number_digit')), + 'currency_code' => setting('default.currency'), + 'currency_rate' => '1', + 'notes' => $this->faker->text(5), + 'category_id' => $this->company->categories()->income()->get()->random(1)->pluck('id')->first(), + 'contact_id' => $contact->id, + 'contact_name' => $contact->name, + 'contact_email' => $contact->email, + 'contact_tax_number' => $contact->tax_number, + 'contact_phone' => $contact->phone, + 'contact_address' => $contact->address, + 'status' => $this->faker->randomElement($statuses), + 'amount' => '0', + ]; } - $statuses = ['draft', 'sent', 'viewed', 'partial', 'paid', 'cancelled']; - - return [ - 'company_id' => $company->id, - 'invoiced_at' => $invoiced_at, - 'due_at' => $due_at, - 'invoice_number' => setting('invoice.number_prefix') . $faker->randomNumber(setting('invoice.number_digit')), - 'currency_code' => setting('default.currency'), - 'currency_rate' => '1', - 'notes' => $faker->text(5), - 'category_id' => $company->categories()->income()->get()->random(1)->pluck('id')->first(), - 'contact_id' => $contact->id, - 'contact_name' => $contact->name, - 'contact_email' => $contact->email, - 'contact_tax_number' => $contact->tax_number, - 'contact_phone' => $contact->phone, - 'contact_address' => $contact->address, - 'status' => $faker->randomElement($statuses), - 'amount' => '0', - ]; -}); - -$factory->state(Invoice::class, 'draft', ['status' => 'draft']); - -$factory->state(Invoice::class, 'sent', ['status' => 'sent']); - -$factory->state(Invoice::class, 'viewed', ['status' => 'viewed']); - -$factory->state(Invoice::class, 'partial', ['status' => 'partial']); - -$factory->state(Invoice::class, 'paid', ['status' => 'paid']); - -$factory->state(Invoice::class, 'cancelled', ['status' => 'cancelled']); - -$factory->state(Invoice::class, 'recurring', function (Faker $faker) { - $frequencies = ['monthly', 'weekly']; - - return [ - 'recurring_frequency' => 'yes', - 'recurring_interval' => '1', - 'recurring_custom_frequency' => $faker->randomElement($frequencies), - 'recurring_count' => '1', - ]; -}); - -$factory->state(Invoice::class, 'items', function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); - - $amount = $faker->randomFloat(2, 1, 1000); - - $taxes = Tax::enabled()->get(); - - if ($taxes->count()) { - $tax = $taxes->random(1)->first(); - } else { - $tax = factory(Tax::class)->states('enabled')->create(); - } - - $items = Item::enabled()->get(); - - if ($items->count()) { - $item = $items->random(1)->first(); - } else { - $item = factory(Item::class)->states('enabled')->create(); - } - - $items = [ - [ - 'name' => $item->name, - 'item_id' => $item->id, - 'tax_id' => [$tax->id], - 'quantity' => '1', - 'price' => $amount, - 'currency' => setting('default.currency'), - ] - ]; - - return [ - 'items' => $items, - 'recurring_frequency' => 'no', - ]; -}); - -$factory->afterCreating(Invoice::class, function ($invoice, $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); - - $init_status = $invoice->status; - - $invoice->status = 'draft'; - event(new InvoiceCreated($invoice)); - $invoice->status = $init_status; - - $amount = $faker->randomFloat(2, 1, 1000); - - $taxes = Tax::enabled()->get(); - - if ($taxes->count()) { - $tax = $taxes->random(1)->first(); - } else { - $tax = factory(Tax::class)->states('enabled')->create(); - } - - $items = Item::enabled()->get(); - - if ($items->count()) { - $item = $items->random(1)->first(); - } else { - $item = factory(Item::class)->states('enabled')->create(); - } - - $items = [ - [ - 'name' => $item->name, - 'item_id' => $item->id, - 'tax_id' => [$tax->id], - 'quantity' => '1', - 'price' => $amount, - 'currency' => $invoice->currency_code, - ] - ]; - - $request = [ - 'items' => $items, - 'recurring_frequency' => 'no', - ]; - - $updated_invoice = dispatch_now(new UpdateInvoice($invoice, $request)); - - switch ($init_status) { - case 'sent': - event(new InvoiceSent($updated_invoice)); - - break; - case 'viewed': - $updated_invoice->status = 'sent'; - event(new InvoiceViewed($updated_invoice)); - $updated_invoice->status = $init_status; - - break; - case 'partial': - case 'paid': - $payment_request = [ - 'paid_at' => $updated_invoice->due_at, + /** + * Indicate that the model status is draft. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function draft() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'draft', ]; + }); + } - if ($init_status == 'partial') { - $payment_request['amount'] = (int) round($amount / 3, $invoice->currency->precision); + /** + * Indicate that the model status is sent. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function sent() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'sent', + ]; + }); + } + + /** + * Indicate that the model status is viewed. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function viewed() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'viewed', + ]; + }); + } + + /** + * Indicate that the model status is partial. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function partial() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'partial', + ]; + }); + } + + /** + * Indicate that the model status is paid. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function paid() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'paid', + ]; + }); + } + + /** + * Indicate that the model status is cancelled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function cancelled() + { + return $this->state(function (array $attributes) { + return [ + 'status' => 'cancelled', + ]; + }); + } + + /** + * Indicate that the model is recurring. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function recurring() + { + return $this->state(function (array $attributes) { + $frequencies = ['monthly', 'weekly']; + + return [ + 'recurring_frequency' => 'yes', + 'recurring_interval' => '1', + 'recurring_custom_frequency' => $this->faker->randomElement($frequencies), + 'recurring_count' => '1', + ]; + }); + } + + /** + * Indicate that the model has items. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function items() + { + return $this->state(function (array $attributes) { + $amount = $this->faker->randomFloat(2, 1, 1000); + + $taxes = Tax::enabled()->get(); + + if ($taxes->count()) { + $tax = $taxes->random(1)->first(); + } else { + $tax = Tax::factory()->enabled()->create(); } - event(new PaymentReceived($updated_invoice, $payment_request)); + $items = Item::enabled()->get(); - break; - case 'cancelled': - event(new InvoiceCancelled($updated_invoice)); + if ($items->count()) { + $item = $items->random(1)->first(); + } else { + $item = Item::factory()->enabled()->create(); + } - break; + $items = [ + [ + 'name' => $item->name, + 'item_id' => $item->id, + 'tax_id' => [$tax->id], + 'quantity' => '1', + 'price' => $amount, + 'currency' => setting('default.currency'), + ] + ]; + + return [ + 'items' => $items, + 'recurring_frequency' => 'no', + ]; + }); } -}); + + /** + * Configure the model factory. + * + * @return $this + */ + public function configure() + { + return $this->afterCreating(function (Model $invoice) { + $init_status = $invoice->status; + + $invoice->status = 'draft'; + event(new InvoiceCreated($invoice)); + $invoice->status = $init_status; + + $amount = $this->faker->randomFloat(2, 1, 1000); + + $taxes = Tax::enabled()->get(); + + if ($taxes->count()) { + $tax = $taxes->random(1)->first(); + } else { + $tax = Tax::factory()->enabled()->create(); + } + + $items = Item::enabled()->get(); + + if ($items->count()) { + $item = $items->random(1)->first(); + } else { + $item = Item::factory()->enabled()->create(); + } + + $items = [ + [ + 'name' => $item->name, + 'item_id' => $item->id, + 'tax_id' => [$tax->id], + 'quantity' => '1', + 'price' => $amount, + 'currency' => $invoice->currency_code, + ] + ]; + + $request = [ + 'items' => $items, + 'recurring_frequency' => 'no', + ]; + + $updated_invoice = $this->dispatch(new UpdateInvoice($invoice, $request)); + + switch ($init_status) { + case 'sent': + event(new InvoiceSent($updated_invoice)); + + break; + case 'viewed': + $updated_invoice->status = 'sent'; + event(new InvoiceViewed($updated_invoice)); + $updated_invoice->status = $init_status; + + break; + case 'partial': + case 'paid': + $payment_request = [ + 'paid_at' => $updated_invoice->due_at, + ]; + + if ($init_status == 'partial') { + $payment_request['amount'] = (int) round($amount / 3, $invoice->currency->precision); + } + + event(new PaymentReceived($updated_invoice, $payment_request)); + + break; + case 'cancelled': + event(new InvoiceCancelled($updated_invoice)); + + break; + } + }); + } +} diff --git a/database/factories/Item.php b/database/factories/Item.php index 61664c320..f940cba0b 100644 --- a/database/factories/Item.php +++ b/database/factories/Item.php @@ -1,27 +1,63 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Common\Item as Model; -$factory->define(Item::class, function (Faker $faker) use ($company) { - setting()->setExtraColumns(['company_id' => $company->id]); +class Item extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'company_id' => $company->id, - 'name' => $faker->text(15), - 'description' => $faker->text(100), - 'purchase_price' => $faker->randomFloat(2, 10, 20), - 'sale_price' => $faker->randomFloat(2, 10, 20), - 'category_id' => $company->categories()->item()->get()->random(1)->pluck('id')->first(), - 'tax_id' => null, - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + return [ + 'company_id' => $this->company->id, + 'name' => $this->faker->text(15), + 'description' => $this->faker->text(100), + 'purchase_price' => $this->faker->randomFloat(2, 10, 20), + 'sale_price' => $this->faker->randomFloat(2, 10, 20), + 'category_id' => $this->company->categories()->item()->get()->random(1)->pluck('id')->first(), + 'tax_id' => null, + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Item::class, 'enabled', ['enabled' => 1]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Item::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } +} diff --git a/database/factories/Permission.php b/database/factories/Permission.php index 487091031..c2b313a18 100644 --- a/database/factories/Permission.php +++ b/database/factories/Permission.php @@ -1,18 +1,36 @@ define(Permission::class, function (Faker $faker) { - $map = ['Create', 'Read', 'Update', 'Delete']; +use App\Abstracts\Factory; +use App\Models\Auth\Permission as Model; - $prefix = $faker->randomElement($map); - $word_1 = $faker->word; - $word_2 = $faker->word; +class Permission extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'name' => strtolower($prefix) . '-' . strtolower($word_1) . '-' . strtolower($word_2), - 'display_name' => $prefix . ' ' . $word_1 . ' ' . $word_2, - 'description' => $prefix . ' ' . $word_1 . ' ' . $word_2, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $map = ['Create', 'Read', 'Update', 'Delete']; + + $prefix = $this->faker->randomElement($map); + $word_1 = $this->faker->word; + $word_2 = $this->faker->word; + + return [ + 'name' => strtolower($prefix) . '-' . strtolower($word_1) . '-' . strtolower($word_2), + 'display_name' => $prefix . ' ' . $word_1 . ' ' . $word_2, + 'description' => $prefix . ' ' . $word_1 . ' ' . $word_2, + ]; + } +} diff --git a/database/factories/Role.php b/database/factories/Role.php index b234d01b3..40c9e5d90 100644 --- a/database/factories/Role.php +++ b/database/factories/Role.php @@ -1,25 +1,64 @@ define(Role::class, function (Faker $faker) { - $name = $faker->word; +class Role extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'name' => strtolower($name), - 'display_name' => $name, - 'description' => $name, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $name = $this->faker->word; -$factory->state(Role::class, 'permissions', function (Faker $faker) { - return [ - 'permissions' => Permission::take(50)->pluck('id')->toArray(), - ]; -}); + return [ + 'name' => strtolower($name), + 'display_name' => $name, + 'description' => $name, + ]; + } -$factory->afterCreating(Role::class, function ($role, $faker) { - $role->permissions()->attach(Permission::take(50)->pluck('id')->toArray()); -}); + /** + * Indicate the model permissions. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function permissions() + { + return $this->state(function (array $attributes) { + return [ + 'permissions' => $this->getPermissions(), + ]; + }); + } + + protected function getPermissions() + { + return Permission::take(50)->pluck('id')->toArray(); + } + + /** + * Configure the model factory. + * + * @return $this + */ + public function configure() + { + return $this->afterCreating(function (Model $role) { + $role->permissions()->attach($this->getPermissions()); + }); + } +} diff --git a/database/factories/Tax.php b/database/factories/Tax.php index 0777fabe9..5e108b66f 100644 --- a/database/factories/Tax.php +++ b/database/factories/Tax.php @@ -1,36 +1,132 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Setting\Tax as Model; -$factory->define(Tax::class, function (Faker $faker) use ($company) { - setting()->setExtraColumns(['company_id' => $company->id]); +class Tax extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - $types = ['normal', 'inclusive', 'compound', 'fixed', 'withholding']; + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $types = ['normal', 'inclusive', 'compound', 'fixed', 'withholding']; - return [ - 'company_id' => $company->id, - 'name' => $faker->text(15), - 'rate' => $faker->randomFloat(2, 10, 20), - 'type' => $faker->randomElement($types), - 'enabled' => $faker->boolean ? 1 : 0, - ]; -}); + return [ + 'company_id' => $this->company->id, + 'name' => $this->faker->text(15), + 'rate' => $this->faker->randomFloat(2, 10, 20), + 'type' => $this->faker->randomElement($types), + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(Tax::class, 'enabled', ['enabled' => 1]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } -$factory->state(Tax::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } -$factory->state(Tax::class, 'normal', ['type' => 'normal']); + /** + * Indicate that the model type is normal. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function normal() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'normal', + ]; + }); + } -$factory->state(Tax::class, 'inclusive', ['type' => 'inclusive']); + /** + * Indicate that the model type is inclusive. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function inclusive() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'inclusive', + ]; + }); + } -$factory->state(Tax::class, 'compound', ['type' => 'compound']); + /** + * Indicate that the model type is compound. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function compound() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'compound', + ]; + }); + } -$factory->state(Tax::class, 'fixed', ['type' => 'fixed']); + /** + * Indicate that the model type is fixed. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function fixed() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'fixed', + ]; + }); + } -$factory->state(Tax::class, 'withholding', ['type' => 'withholding']); + /** + * Indicate that the model type is normal. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function withholding() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'withholding', + ]; + }); + } +} diff --git a/database/factories/Transaction.php b/database/factories/Transaction.php index d0b6e3bcc..5dabed3eb 100644 --- a/database/factories/Transaction.php +++ b/database/factories/Transaction.php @@ -1,43 +1,74 @@ companies()->first(); +use App\Abstracts\Factory; +use App\Models\Banking\Transaction as Model; +use App\Traits\Transactions; -$factory->define(Transaction::class, function (Faker $faker) use ($company) { - setting()->setExtraColumns(['company_id' => $company->id]); +class Transaction extends Factory +{ + use Transactions; - $types = ['income', 'expense']; - $type = $faker->randomElement($types); + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'company_id' => $company->id, - 'type' => $type, - 'account_id' => setting('default.account'), - 'paid_at' => $faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'), - 'amount' => $faker->randomFloat(2, 1, 1000), - 'currency_code' => setting('default.currency'), - 'currency_rate' => '1.0', - 'description' => $faker->text(5), - 'category_id' => $company->categories()->type($type)->get()->random(1)->pluck('id')->first(), - 'reference' => $faker->text(5), - 'payment_method' => setting('default.payment_method'), - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $types = array_merge($this->getIncomeTypes(), $this->getExpenseTypes()); + $type = $this->faker->randomElement($types); -$factory->state(Transaction::class, 'income', function (Faker $faker) use ($company) { - return [ - 'type' => 'income', - 'category_id' => $company->categories()->income()->get()->random(1)->pluck('id')->first(), - ]; -}); + return [ + 'company_id' => $this->company->id, + 'type' => $type, + 'account_id' => setting('default.account'), + 'paid_at' => $this->faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'), + 'amount' => $this->faker->randomFloat(2, 1, 1000), + 'currency_code' => setting('default.currency'), + 'currency_rate' => '1.0', + 'description' => $this->faker->text(5), + 'category_id' => $this->company->categories()->type($type)->get()->random(1)->pluck('id')->first(), + 'reference' => $this->faker->text(5), + 'payment_method' => setting('default.payment_method'), + ]; + } -$factory->state(Transaction::class, 'expense', function (Faker $faker) use ($company) { - return [ - 'type' => 'expense', - 'category_id' => $company->categories()->expense()->get()->random(1)->pluck('id')->first(), - ]; -}); + /** + * Indicate that the model type is income. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function income() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'income', + 'category_id' => $this->company->categories()->income()->get()->random(1)->pluck('id')->first(), + ]; + }); + } + + /** + * Indicate that the model type is expense. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function expense() + { + return $this->state(function (array $attributes) { + return [ + 'type' => 'expense', + 'category_id' => $this->company->categories()->expense()->get()->random(1)->pluck('id')->first(), + ]; + }); + } +} diff --git a/database/factories/Transfer.php b/database/factories/Transfer.php index abd361202..243ba52c5 100644 --- a/database/factories/Transfer.php +++ b/database/factories/Transfer.php @@ -1,53 +1,64 @@ companies()->first(); +class Transfer extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; -$factory->define(Transfer::class, function (Faker $faker) use ($company) { - session(['company_id' => $company->id]); - setting()->setExtraColumns(['company_id' => $company->id]); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $accounts = Account::enabled()->get(); - $accounts = Account::enabled()->get(); + if ($accounts->count() >= 2) { + $random = $accounts->random(2); - if ($accounts->count() >= 2) { - $random = $accounts->random(2); + $expense_account = $random->first(); + $income_account = $random->last(); + } else { + $expense_account = $accounts->first(); - $expense_account = $random->first(); - $income_account = $random->last(); - } else { - $expense_account = $accounts->first(); + $income_account = Account::factory()->enabled()->default_currency()->create(); + } - $income_account = factory(Account::class)->states('enabled', 'default_currency')->create(); + $request = [ + 'amount' => $this->faker->randomFloat(2, 1, 1000), + 'paid_at' => $this->faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d'), + 'category_id' => Category::transfer(), + 'description' => $this->faker->text(20), + 'reference' => $this->faker->text(20), + ]; + + $expense_transaction = Transaction::factory()->create(array_merge($request, [ + 'type' => 'expense', + 'account_id' => $expense_account->id, + ])); + + $income_transaction = Transaction::factory()->create(array_merge($request, [ + 'type' => 'income', + 'account_id' => $income_account->id, + ])); + + return [ + 'company_id' => $this->company->id, + 'expense_transaction_id' => $expense_transaction->id, + 'income_transaction_id' => $income_transaction->id, + ]; } - - $request = [ - 'amount' => $faker->randomFloat(2, 1, 1000), - 'paid_at' => $faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d'), - 'category_id' => Category::transfer(), - 'description' => $faker->text(20), - 'reference' => $faker->text(20), - ]; - - $expense_transaction = factory(Transaction::class)->create(array_merge($request, [ - 'type' => 'expense', - 'account_id' => $expense_account->id, - ])); - - $income_transaction = factory(Transaction::class)->create(array_merge($request, [ - 'type' => 'income', - 'account_id' => $income_account->id, - ])); - - return [ - 'company_id' => $company->id, - 'expense_transaction_id' => $expense_transaction->id, - 'income_transaction_id' => $income_transaction->id, - ]; -}); +} diff --git a/database/factories/User.php b/database/factories/User.php index bca544a95..ae4c61f6b 100644 --- a/database/factories/User.php +++ b/database/factories/User.php @@ -1,25 +1,67 @@ define(User::class, function (Faker $faker) { - $password = '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi'; // password +class User extends Factory +{ + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = Model::class; - return [ - 'name' => $faker->name, - 'email' => $faker->unique()->safeEmail, - 'password' => $password, - 'password_confirmation' => $password, - 'remember_token' => Str::random(10), - 'locale' => 'en-GB', - 'companies' => ['1'], - 'roles' => ['1'], - 'enabled' => $this->faker->boolean ? 1 : 0, - ]; -}); + /** + * Define the model's default state. + * + * @return array + */ + public function definition() + { + $password = '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi'; // password -$factory->state(User::class, 'enabled', ['enabled' => 1]); + return [ + 'name' => $this->faker->name, + 'email' => $this->faker->unique()->safeEmail, + 'password' => $password, + 'password_confirmation' => $password, + 'remember_token' => Str::random(10), + 'locale' => 'en-GB', + 'companies' => ['1'], + 'roles' => ['1'], + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } -$factory->state(User::class, 'disabled', ['enabled' => 0]); + /** + * Indicate that the model is enabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function enabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 1, + ]; + }); + } + + /** + * Indicate that the model is disabled. + * + * @return \Illuminate\Database\Eloquent\Factories\Factory + */ + public function disabled() + { + return $this->state(function (array $attributes) { + return [ + 'enabled' => 0, + ]; + }); + } +} diff --git a/database/migrations/2020_10_13_000000_core_v210.php b/database/migrations/2020_10_13_000000_core_v210.php new file mode 100644 index 000000000..509b671a9 --- /dev/null +++ b/database/migrations/2020_10_13_000000_core_v210.php @@ -0,0 +1,30 @@ +string('uuid')->after('id')->nullable()->unique(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/database/seeds/SampleData.php b/database/seeds/SampleData.php index 47414b85f..445d57033 100755 --- a/database/seeds/SampleData.php +++ b/database/seeds/SampleData.php @@ -35,25 +35,25 @@ class SampleData extends Seeder $bar->start(); - factory(Contact::class, $count)->create(); + Contact::factory()->count($count)->create(); $bar->advance(); - factory(Category::class, $count)->create(); + Category::factory()->count($count)->create(); $bar->advance(); - factory(Tax::class, $small_count)->states('enabled')->create(); + Tax::factory()->count($small_count)->enabled()->create(); $bar->advance(); - factory(Item::class, $count)->create(); + Item::factory()->count($count)->create(); $bar->advance(); - factory(Account::class, $small_count)->create(); + Account::factory()->count($small_count)->create(); $bar->advance(); - factory(Bill::class, $count)->create(); + Bill::factory()->count($count)->create(); $bar->advance(); - factory(Invoice::class, $count)->create(); + Invoice::factory()->count($count)->create(); $bar->advance(); $bar->finish(); diff --git a/phpunit.xml b/phpunit.xml index 4a514d787..ce58ba1ed 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -13,11 +13,11 @@ ./modules/**/Tests/Feature - - + + ./app - - + + diff --git a/resources/views/auth/permissions/edit.blade.php b/resources/views/auth/permissions/edit.blade.php index 5b89082e8..71305aa67 100644 --- a/resources/views/auth/permissions/edit.blade.php +++ b/resources/views/auth/permissions/edit.blade.php @@ -26,13 +26,13 @@ - @permission('update-auth-permissions') + @can('update-auth-permissions') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/auth/permissions/index.blade.php b/resources/views/auth/permissions/index.blade.php index 6ea3f0687..54d53b2e0 100644 --- a/resources/views/auth/permissions/index.blade.php +++ b/resources/views/auth/permissions/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.permissions', 2)) -@permission('create-auth-permissions') +@can('create-auth-permissions') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -54,10 +54,10 @@
diff --git a/resources/views/auth/roles/edit.blade.php b/resources/views/auth/roles/edit.blade.php index 52681c5bf..7047edb3e 100644 --- a/resources/views/auth/roles/edit.blade.php +++ b/resources/views/auth/roles/edit.blade.php @@ -79,13 +79,13 @@ - @permission('update-auth-roles') + @can('update-auth-roles') - @endpermission + @endcan {!! Form::close() !!} diff --git a/resources/views/auth/roles/index.blade.php b/resources/views/auth/roles/index.blade.php index 46632063e..1489ca8ec 100644 --- a/resources/views/auth/roles/index.blade.php +++ b/resources/views/auth/roles/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.roles', 2)) -@permission('create-auth-roles') +@can('create-auth-roles') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -54,10 +54,10 @@
diff --git a/resources/views/auth/users/create.blade.php b/resources/views/auth/users/create.blade.php index df59b55de..cffa741ab 100644 --- a/resources/views/auth/users/create.blade.php +++ b/resources/views/auth/users/create.blade.php @@ -47,13 +47,13 @@ {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }} @endif - @permission('read-common-companies') + @can('read-common-companies') {{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, [], ['required' => 'required', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }} - @endpermission + @endcan - @permission('read-auth-roles') + @can('read-auth-roles') {{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }} - @endpermission + @endcan {{ Form::radioGroup('enabled', trans('general.enabled'), true) }} diff --git a/resources/views/auth/users/edit.blade.php b/resources/views/auth/users/edit.blade.php index 996fc6b43..29c02178f 100644 --- a/resources/views/auth/users/edit.blade.php +++ b/resources/views/auth/users/edit.blade.php @@ -48,25 +48,25 @@ {{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }} @endif - @permission('read-common-companies') + @can('read-common-companies') {{ Form::multiSelectRemoteGroup('companies', trans_choice('general.companies', 2), 'user', $companies, $user->company_ids, ['required' => 'required', 'disabled' => (in_array('customer', $user->roles()->pluck('name')->toArray())) ? 'true' : 'false', 'remote_action' => route('companies.autocomplete'), 'remote_type' => 'company']) }} - @endpermission + @endcan - @permission('read-auth-roles') + @can('read-auth-roles') {{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }} - @endpermission + @endcan {{ Form::radioGroup('enabled', trans('general.enabled'), $user->enabled) }} - @permission(['update-auth-users', 'update-auth-profile']) + @canany(['update-auth-users', 'update-auth-profile']) - @endpermission + @endcanany {!! Form::close() !!} @endsection diff --git a/resources/views/auth/users/index.blade.php b/resources/views/auth/users/index.blade.php index e55e83962..69e5cd50f 100644 --- a/resources/views/auth/users/index.blade.php +++ b/resources/views/auth/users/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.users', 2)) -@permission('create-auth-users') +@can('create-auth-users') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -88,10 +88,10 @@
diff --git a/resources/views/banking/accounts/edit.blade.php b/resources/views/banking/accounts/edit.blade.php index 11e616c33..b19b6d02b 100644 --- a/resources/views/banking/accounts/edit.blade.php +++ b/resources/views/banking/accounts/edit.blade.php @@ -38,13 +38,13 @@ - @permission('update-banking-accounts') + @can('update-banking-accounts') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/banking/accounts/index.blade.php b/resources/views/banking/accounts/index.blade.php index 3b93e416c..888ff8cc7 100644 --- a/resources/views/banking/accounts/index.blade.php +++ b/resources/views/banking/accounts/index.blade.php @@ -3,9 +3,9 @@ @section('title', trans_choice('general.accounts', 2)) @section('new_button') - @permission('create-banking-accounts') + @can('create-banking-accounts') {{ trans('general.add_new') }} - @endpermission + @endcan @endsection @section('content') @@ -68,10 +68,10 @@ diff --git a/resources/views/banking/reconciliations/edit.blade.php b/resources/views/banking/reconciliations/edit.blade.php index e0560097a..b04c9c782 100644 --- a/resources/views/banking/reconciliations/edit.blade.php +++ b/resources/views/banking/reconciliations/edit.blade.php @@ -107,7 +107,7 @@ @endif - @permission('update-banking-reconciliations') + @can('update-banking-reconciliations') - @endpermission + @endcan {!! Form::close() !!} diff --git a/resources/views/banking/reconciliations/index.blade.php b/resources/views/banking/reconciliations/index.blade.php index 125a0267a..2c0a9b255 100644 --- a/resources/views/banking/reconciliations/index.blade.php +++ b/resources/views/banking/reconciliations/index.blade.php @@ -3,9 +3,9 @@ @section('title', trans_choice('general.reconciliations', 2)) @section('new_button') - @permission('create-banking-reconciliations') + @can('create-banking-reconciliations') {{ trans('general.add_new') }} - @endpermission + @endcan @endsection @section('content') @@ -65,10 +65,10 @@ diff --git a/resources/views/banking/transactions/index.blade.php b/resources/views/banking/transactions/index.blade.php index f9148aa48..58d9a3a95 100644 --- a/resources/views/banking/transactions/index.blade.php +++ b/resources/views/banking/transactions/index.blade.php @@ -3,12 +3,12 @@ @section('title', trans_choice('general.transactions', 2)) @section('new_button') - @permission('create-sales-revenues') + @can('create-sales-revenues') {{ trans('general.add_income') }} - @endpermission - @permission('create-purchases-payments') + @endcan + @can('create-purchases-payments') {{ trans('general.add_expense') }} - @endpermission + @endcan {{ trans('import.import') }} {{ trans('general.export') }} @endsection diff --git a/resources/views/banking/transfers/edit.blade.php b/resources/views/banking/transfers/edit.blade.php index bd98c593f..722f762a1 100644 --- a/resources/views/banking/transfers/edit.blade.php +++ b/resources/views/banking/transfers/edit.blade.php @@ -37,13 +37,13 @@ - @permission('update-banking-transfers') + @can('update-banking-transfers') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/banking/transfers/index.blade.php b/resources/views/banking/transfers/index.blade.php index 12619eda1..58440ec56 100644 --- a/resources/views/banking/transfers/index.blade.php +++ b/resources/views/banking/transfers/index.blade.php @@ -3,9 +3,9 @@ @section('title', trans_choice('general.transfers', 2)) @section('new_button') - @permission('create-banking-transfers') + @can('create-banking-transfers')  {{ trans('general.add_new') }} - @endpermission + @endcan  {{ trans('import.import') }}  {{ trans('general.export') }} @endsection @@ -59,10 +59,10 @@ diff --git a/resources/views/common/companies/edit.blade.php b/resources/views/common/companies/edit.blade.php index c450d7e7a..43d65ea00 100644 --- a/resources/views/common/companies/edit.blade.php +++ b/resources/views/common/companies/edit.blade.php @@ -34,13 +34,13 @@ - @permission('update-common-companies') + @can('update-common-companies') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/common/companies/index.blade.php b/resources/views/common/companies/index.blade.php index 3e7757cfe..b4de518d9 100644 --- a/resources/views/common/companies/index.blade.php +++ b/resources/views/common/companies/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.companies', 2)) -@permission('create-common-companies') +@can('create-common-companies') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -78,10 +78,10 @@ @endif {{ trans('general.edit') }} - @permission('delete-common-companies') + @can('delete-common-companies') {!! Form::deleteLink($item, 'companies.destroy') !!} - @endpermission + @endcan
diff --git a/resources/views/common/dashboards/create.blade.php b/resources/views/common/dashboards/create.blade.php index 1ffc32c7f..948363cb0 100644 --- a/resources/views/common/dashboards/create.blade.php +++ b/resources/views/common/dashboards/create.blade.php @@ -19,9 +19,9 @@
{{ Form::textGroup('name', trans('general.name'), 'font') }} - @permission('read-auth-users') + @can('read-auth-users') {{ Form::checkboxGroup('users', trans_choice('general.users', 2), $users, 'name') }} - @endpermission + @endcan {{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
diff --git a/resources/views/common/dashboards/edit.blade.php b/resources/views/common/dashboards/edit.blade.php index 58d52b02c..14b304ac3 100644 --- a/resources/views/common/dashboards/edit.blade.php +++ b/resources/views/common/dashboards/edit.blade.php @@ -20,21 +20,21 @@
{{ Form::textGroup('name', trans('general.name'), 'font') }} - @permission('read-auth-users') + @can('read-auth-users') {{ Form::checkboxGroup('users', trans_choice('general.users', 2), $users, 'name') }} - @endpermission + @endcan {{ Form::radioGroup('enabled', trans('general.enabled'), $dashboard->enabled) }}
- @permission('update-common-dashboards') + @can('update-common-dashboards') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/common/dashboards/index.blade.php b/resources/views/common/dashboards/index.blade.php index 918e95913..06cc6964a 100644 --- a/resources/views/common/dashboards/index.blade.php +++ b/resources/views/common/dashboards/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.dashboards', 2)) -@permission('create-common-dashboards') +@can('create-common-dashboards') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -68,10 +68,10 @@ @endif {{ trans('general.edit') }} - @permission('delete-common-dashboards') + @can('delete-common-dashboards') {!! Form::deleteLink($item, 'dashboards.destroy') !!} - @endpermission + @endcan
diff --git a/resources/views/common/dashboards/show.blade.php b/resources/views/common/dashboards/show.blade.php index 122e47e04..4301e4f9f 100644 --- a/resources/views/common/dashboards/show.blade.php +++ b/resources/views/common/dashboards/show.blade.php @@ -3,7 +3,7 @@ @section('title', $dashboard->name) @section('dashboard_action') - @permission(['create-common-widgets', 'read-common-dashboards']) + @canany(['create-common-widgets', 'read-common-dashboards']) - @endpermission + @endcanany @php $text = json_encode([ diff --git a/resources/views/common/items/edit.blade.php b/resources/views/common/items/edit.blade.php index f0e93058c..e41c742ae 100644 --- a/resources/views/common/items/edit.blade.php +++ b/resources/views/common/items/edit.blade.php @@ -36,13 +36,13 @@ - @permission('update-common-items') + @can('update-common-items') - @endpermission + @endcan {!! Form::close() !!} diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index 317a0a0bd..6a7170a7f 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.items', 2)) @section('new_button') - @permission('create-common-items') + @can('create-common-items') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -82,14 +82,14 @@ diff --git a/resources/views/common/reports/edit.blade.php b/resources/views/common/reports/edit.blade.php index dcf4d333b..0a13e0067 100644 --- a/resources/views/common/reports/edit.blade.php +++ b/resources/views/common/reports/edit.blade.php @@ -67,13 +67,13 @@ - @permission('update-common-reports') + @can('update-common-reports') - @endpermission + @endcan {!! Form::close() !!} diff --git a/resources/views/common/reports/index.blade.php b/resources/views/common/reports/index.blade.php index 5e4aa38c2..07d96c218 100644 --- a/resources/views/common/reports/index.blade.php +++ b/resources/views/common/reports/index.blade.php @@ -3,9 +3,9 @@ @section('title', trans_choice('general.reports', 2)) @section('new_button') - @permission('create-common-reports') + @can('create-common-reports') {{ trans('general.add_new') }} - @endpermission + @endcan {{ trans('general.clear_cache') }} @endsection @@ -26,14 +26,14 @@ diff --git a/resources/views/modules/item/pre_sale.blade.php b/resources/views/modules/item/pre_sale.blade.php index 0c8305553..d9239c7d0 100644 --- a/resources/views/modules/item/pre_sale.blade.php +++ b/resources/views/modules/item/pre_sale.blade.php @@ -83,7 +83,7 @@ -@endpermission +@endcanany diff --git a/resources/views/partials/widgets/stats_header.blade.php b/resources/views/partials/widgets/stats_header.blade.php index 83044a71d..347167980 100644 --- a/resources/views/partials/widgets/stats_header.blade.php +++ b/resources/views/partials/widgets/stats_header.blade.php @@ -1,4 +1,4 @@ -@permission(['update-common-widgets', 'delete-common-widgets']) +@canany(['update-common-widgets', 'delete-common-widgets']) -@endpermission +@endcanany diff --git a/resources/views/portal/profile/edit.blade.php b/resources/views/portal/profile/edit.blade.php index 357cfe536..6098e1c46 100644 --- a/resources/views/portal/profile/edit.blade.php +++ b/resources/views/portal/profile/edit.blade.php @@ -38,13 +38,13 @@ - @permission(['update-portal-profile']) + @canany(['update-portal-profile']) - @endpermission + @endcanany {!! Form::close() !!} diff --git a/resources/views/purchases/bills/edit.blade.php b/resources/views/purchases/bills/edit.blade.php index 1a8371fc7..6a99aecdf 100644 --- a/resources/views/purchases/bills/edit.blade.php +++ b/resources/views/purchases/bills/edit.blade.php @@ -212,13 +212,13 @@ - @permission('update-purchases-bills') + @can('update-purchases-bills') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/purchases/bills/index.blade.php b/resources/views/purchases/bills/index.blade.php index 7ca4d9655..97f715f75 100644 --- a/resources/views/purchases/bills/index.blade.php +++ b/resources/views/purchases/bills/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.bills', 2)) @section('new_button') - @permission('create-purchases-bills') + @can('create-purchases-bills') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -73,21 +73,21 @@ @if ($item->status != 'cancelled') - @permission('create-purchases-bills') + @can('create-purchases-bills') {{ trans('general.duplicate') }} - @endpermission + @endcan - @permission('update-purchases-bills') + @can('update-purchases-bills') {{ trans('general.cancel') }} - @endpermission + @endcan @endif - @permission('delete-purchases-bills') + @can('delete-purchases-bills') @if (!$item->reconciled) {!! Form::deleteLink($item, 'bills.destroy') !!} @endif - @endpermission + @endcan diff --git a/resources/views/purchases/bills/show.blade.php b/resources/views/purchases/bills/show.blade.php index 4b29a507d..bb837123c 100644 --- a/resources/views/purchases/bills/show.blade.php +++ b/resources/views/purchases/bills/show.blade.php @@ -102,9 +102,9 @@
@stack('timeline_body_receive_bill_body_button_received_start') - @permission('update-purchases-bills') + @can('update-purchases-bills') {{ trans('bills.mark_received') }} - @endpermission + @endcan @stack('timeline_body_receive_bill_body_button_received_end')
@else @@ -142,9 +142,9 @@
@stack('timeline_body_get_paid_body_button_pay_start') - @permission('update-purchases-bills') + @can('update-purchases-bills') {{ trans('bills.mark_paid') }} - @endpermission + @endcan @stack('timeline_body_get_paid_body_button_pay_end') @stack('timeline_body_make_payment_body_button_payment_start') @@ -468,9 +468,9 @@ @if ($bill->status != 'cancelled') @if ($bill->status != 'paid') @stack('button_pay_start') - @permission('update-purchases-bills') + @can('update-purchases-bills') {{ trans('bills.mark_paid') }} - @endpermission + @endcan @if (empty($bill->paid) || ($bill->paid != $bill->amount)) @@ -481,7 +481,7 @@ @stack('button_dropdown_divider_1') - @permission('update-purchases-bills') + @can('update-purchases-bills') @stack('button_received_start') @if ($bill->status == 'draft') {{ trans('bills.mark_received') }} @@ -489,30 +489,30 @@ @endif @stack('button_received_end') - @endpermission + @endcan @endif @stack('button_pdf_start') {{ trans('bills.download_pdf') }} @stack('button_pdf_end') - @permission('update-purchases-bills') + @can('update-purchases-bills') @if ($bill->status != 'cancelled') @stack('button_cancelled_start') {{ trans('general.cancel') }} @stack('button_cancelled_end') @endif - @endpermission + @endcan @stack('button_dropdown_divider_2') - @permission('delete-purchases-bills') + @can('delete-purchases-bills') @if (!$bill->reconciled) @stack('button_delete_start') {!! Form::deleteLink($bill, 'purchases/bills') !!} @stack('button_delete_end') @endif - @endpermission + @endcan @stack('button_dropdown_end')
diff --git a/resources/views/purchases/payments/edit.blade.php b/resources/views/purchases/payments/edit.blade.php index 5b5799fe7..9000303b7 100644 --- a/resources/views/purchases/payments/edit.blade.php +++ b/resources/views/purchases/payments/edit.blade.php @@ -73,13 +73,13 @@ - @permission('update-purchases-payments') + @can('update-purchases-payments') - @endpermission + @endcan {{ Form::hidden('type', 'expense') }} {!! Form::close() !!} diff --git a/resources/views/purchases/payments/index.blade.php b/resources/views/purchases/payments/index.blade.php index 411b56266..3c24e4cb6 100644 --- a/resources/views/purchases/payments/index.blade.php +++ b/resources/views/purchases/payments/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.payments', 2)) @section('new_button') - @permission('create-purchases-payments') + @can('create-purchases-payments') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -93,15 +93,15 @@ @endif @if (empty($item->document_id)) - @permission('create-purchases-payments') + @can('create-purchases-payments') {{ trans('general.duplicate') }} - @endpermission + @endcan @endif @if (!$item->reconciled) - @permission('delete-purchases-payments') + @can('delete-purchases-payments') {!! Form::deleteLink($item, 'payments.destroy') !!} - @endpermission + @endcan @endif diff --git a/resources/views/purchases/vendors/edit.blade.php b/resources/views/purchases/vendors/edit.blade.php index 41167795d..65dbd4976 100644 --- a/resources/views/purchases/vendors/edit.blade.php +++ b/resources/views/purchases/vendors/edit.blade.php @@ -40,13 +40,13 @@ - @permission('update-purchases-vendors') + @can('update-purchases-vendors') - @endpermission + @endcan {{ Form::hidden('type', 'vendor') }} {!! Form::close() !!} diff --git a/resources/views/purchases/vendors/index.blade.php b/resources/views/purchases/vendors/index.blade.php index 1de0a00ec..8d2f4501a 100644 --- a/resources/views/purchases/vendors/index.blade.php +++ b/resources/views/purchases/vendors/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.vendors', 2)) @section('new_button') - @permission('create-purchases-vendors') + @can('create-purchases-vendors') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -82,14 +82,14 @@ diff --git a/resources/views/sales/customers/edit.blade.php b/resources/views/sales/customers/edit.blade.php index 4d4637b0d..fc30861e7 100644 --- a/resources/views/sales/customers/edit.blade.php +++ b/resources/views/sales/customers/edit.blade.php @@ -71,13 +71,13 @@ - @permission('update-sales-customers') + @can('update-sales-customers') - @endpermission + @endcan {{ Form::hidden('type', 'customer') }} diff --git a/resources/views/sales/customers/index.blade.php b/resources/views/sales/customers/index.blade.php index f5342a419..9c4dc6d55 100644 --- a/resources/views/sales/customers/index.blade.php +++ b/resources/views/sales/customers/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.customers', 2)) @section('new_button') - @permission('create-sales-customers') + @can('create-sales-customers') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -84,14 +84,14 @@ {{ trans('general.edit') }} - @permission('create-sales-customers') + @can('create-sales-customers') {{ trans('general.duplicate') }} - @endpermission - @permission('delete-sales-customers') + @endcan + @can('delete-sales-customers') {!! Form::deleteLink($item, 'customers.destroy') !!} - @endpermission + @endcan diff --git a/resources/views/sales/invoices/edit.blade.php b/resources/views/sales/invoices/edit.blade.php index a767627b6..becc1d6e6 100644 --- a/resources/views/sales/invoices/edit.blade.php +++ b/resources/views/sales/invoices/edit.blade.php @@ -214,13 +214,13 @@ - @permission('update-sales-invoices') + @can('update-sales-invoices') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/sales/invoices/index.blade.php b/resources/views/sales/invoices/index.blade.php index d3c1c96be..6918bfdb0 100644 --- a/resources/views/sales/invoices/index.blade.php +++ b/resources/views/sales/invoices/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.invoices', 2)) @section('new_button') - @permission('create-sales-invoices') + @can('create-sales-invoices') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -72,21 +72,21 @@ @if ($item->status != 'cancelled') - @permission('create-sales-invoices') + @can('create-sales-invoices') {{ trans('general.duplicate') }} - @endpermission + @endcan - @permission('update-sales-invoices') + @can('update-sales-invoices') {{ trans('general.cancel') }} - @endpermission + @endcan @endif - @permission('delete-sales-invoices') + @can('delete-sales-invoices') @if (!$item->reconciled) {!! Form::deleteLink($item, 'invoices.destroy') !!} @endif - @endpermission + @endcan diff --git a/resources/views/sales/invoices/show.blade.php b/resources/views/sales/invoices/show.blade.php index f548c9a80..1def2453b 100644 --- a/resources/views/sales/invoices/show.blade.php +++ b/resources/views/sales/invoices/show.blade.php @@ -100,7 +100,7 @@
@stack('timeline_body_send_invoice_body_button_sent_start') - @permission('update-sales-invoices') + @can('update-sales-invoices') @if($invoice->status == 'draft') {{ trans('invoices.mark_sent') }} @else @@ -108,7 +108,7 @@ {{ trans('invoices.mark_sent') }} @endif - @endpermission + @endcan @stack('timeline_body_send_invoice_body_button_sent_end') @stack('timeline_body_send_invoice_body_button_email_start') @@ -161,9 +161,9 @@
@stack('timeline_body_get_paid_body_button_pay_start') - @permission('update-sales-invoices') + @can('update-sales-invoices') {{ trans('invoices.mark_paid') }} - @endpermission + @endcan @stack('timeline_body_get_paid_body_button_pay_end') @stack('timeline_body_get_paid_body_button_payment_start') @@ -490,9 +490,9 @@ @if ($invoice->status != 'cancelled') @if ($invoice->status != 'paid') @stack('button_pay_start') - @permission('update-sales-invoices') + @can('update-sales-invoices') {{ trans('invoices.mark_paid') }} - @endpermission + @endcan @if (empty($invoice->paid) || ($invoice->paid != $invoice->amount)) @@ -503,7 +503,7 @@ @stack('button_dropdown_divider_1') - @permission('update-sales-invoices') + @can('update-sales-invoices') @stack('button_sent_start') @if ($invoice->status == 'draft') {{ trans('invoices.mark_sent') }} @@ -511,7 +511,7 @@ @endif @stack('button_sent_end') - @endpermission + @endcan @stack('button_email_start') @if ($invoice->contact_email) @@ -528,23 +528,23 @@ {{ trans('invoices.download_pdf') }} @stack('button_pdf_end') - @permission('update-sales-invoices') + @can('update-sales-invoices') @if ($invoice->status != 'cancelled') @stack('button_cancelled_start') {{ trans('general.cancel') }} @stack('button_cancelled_end') @endif - @endpermission + @endcan @stack('button_dropdown_divider_2') - @permission('delete-sales-invoices') + @can('delete-sales-invoices') @if (!$invoice->reconciled) @stack('button_delete_start') {!! Form::deleteLink($invoice, 'sales/invoices') !!} @stack('button_delete_end') @endif - @endpermission + @endcan @stack('button_dropdown_end')
diff --git a/resources/views/sales/revenues/edit.blade.php b/resources/views/sales/revenues/edit.blade.php index e11c41f02..9c3bfb2cc 100644 --- a/resources/views/sales/revenues/edit.blade.php +++ b/resources/views/sales/revenues/edit.blade.php @@ -73,13 +73,13 @@ - @permission('update-sales-revenues') + @can('update-sales-revenues') - @endpermission + @endcan {{ Form::hidden('type', 'income') }} {!! Form::close() !!} diff --git a/resources/views/sales/revenues/index.blade.php b/resources/views/sales/revenues/index.blade.php index 67a6b9e95..75930749e 100644 --- a/resources/views/sales/revenues/index.blade.php +++ b/resources/views/sales/revenues/index.blade.php @@ -3,10 +3,10 @@ @section('title', trans_choice('general.revenues', 2)) @section('new_button') - @permission('create-sales-revenues') + @can('create-sales-revenues') {{ trans('general.add_new') }} {{ trans('import.import') }} - @endpermission + @endcan {{ trans('general.export') }} @endsection @@ -93,15 +93,15 @@ @endif @if (empty($item->document_id)) - @permission('create-sales-revenues') + @can('create-sales-revenues') {{ trans('general.duplicate') }} - @endpermission + @endcan @endif @if (!$item->reconciled) - @permission('delete-sales-revenues') + @can('delete-sales-revenues') {!! Form::deleteLink($item, 'revenues.destroy') !!} - @endpermission + @endcan @endif diff --git a/resources/views/settings/categories/edit.blade.php b/resources/views/settings/categories/edit.blade.php index 58cfe31a6..46065c5bb 100644 --- a/resources/views/settings/categories/edit.blade.php +++ b/resources/views/settings/categories/edit.blade.php @@ -46,13 +46,13 @@ - @permission('update-settings-categories') + @can('update-settings-categories') - @endpermission + @endcan {!! Form::close() !!} @endsection diff --git a/resources/views/settings/categories/index.blade.php b/resources/views/settings/categories/index.blade.php index 2a54e4012..50d1a1ade 100644 --- a/resources/views/settings/categories/index.blade.php +++ b/resources/views/settings/categories/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.categories', 2)) -@permission('create-settings-categories') +@can('create-settings-categories') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -69,10 +69,10 @@
diff --git a/resources/views/settings/company/edit.blade.php b/resources/views/settings/company/edit.blade.php index 2d3f9d928..cd508fbc4 100644 --- a/resources/views/settings/company/edit.blade.php +++ b/resources/views/settings/company/edit.blade.php @@ -32,13 +32,13 @@ - @permission('update-settings-settings') + @can('update-settings-settings') - @endpermission + @endcan {!! Form::hidden('_prefix', 'company') !!} diff --git a/resources/views/settings/currencies/edit.blade.php b/resources/views/settings/currencies/edit.blade.php index 03f77dc71..43c08b6c9 100644 --- a/resources/views/settings/currencies/edit.blade.php +++ b/resources/views/settings/currencies/edit.blade.php @@ -40,13 +40,13 @@ - @permission('update-settings-currencies') + @can('update-settings-currencies') - @endpermission + @endcan {!! Form::close() !!} diff --git a/resources/views/settings/currencies/index.blade.php b/resources/views/settings/currencies/index.blade.php index 98b659ca8..3a22a21ba 100644 --- a/resources/views/settings/currencies/index.blade.php +++ b/resources/views/settings/currencies/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.currencies', 2)) -@permission('create-settings-currencies') +@can('create-settings-currencies') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content')
@@ -68,10 +68,10 @@
diff --git a/resources/views/settings/default/edit.blade.php b/resources/views/settings/default/edit.blade.php index 84a1a52b4..e18c01914 100644 --- a/resources/views/settings/default/edit.blade.php +++ b/resources/views/settings/default/edit.blade.php @@ -34,13 +34,13 @@ - @permission('update-settings-settings') + @can('update-settings-settings') - @endpermission + @endcan {!! Form::hidden('_prefix', 'default') !!} diff --git a/resources/views/settings/email/edit.blade.php b/resources/views/settings/email/edit.blade.php index a71b89e12..689666af4 100644 --- a/resources/views/settings/email/edit.blade.php +++ b/resources/views/settings/email/edit.blade.php @@ -87,7 +87,7 @@ - @permission('update-settings-settings') + @can('update-settings-settings')
@@ -97,7 +97,7 @@
- @endpermission + @endcan {!! Form::hidden('_prefix', 'email') !!} diff --git a/resources/views/settings/invoice/edit.blade.php b/resources/views/settings/invoice/edit.blade.php index 2a4cbda73..447fb3c7f 100644 --- a/resources/views/settings/invoice/edit.blade.php +++ b/resources/views/settings/invoice/edit.blade.php @@ -52,13 +52,13 @@ - @permission('update-settings-settings') + @can('update-settings-settings') - @endpermission + @endcan {!! Form::hidden('_prefix', 'invoice') !!} diff --git a/resources/views/settings/localisation/edit.blade.php b/resources/views/settings/localisation/edit.blade.php index c8017802b..4d825715e 100644 --- a/resources/views/settings/localisation/edit.blade.php +++ b/resources/views/settings/localisation/edit.blade.php @@ -32,13 +32,13 @@ - @permission('update-settings-settings') + @can('update-settings-settings') - @endpermission + @endcan {!! Form::hidden('_prefix', 'localisation') !!} diff --git a/resources/views/settings/modules/edit.blade.php b/resources/views/settings/modules/edit.blade.php index 0b9799502..5bcf9b468 100644 --- a/resources/views/settings/modules/edit.blade.php +++ b/resources/views/settings/modules/edit.blade.php @@ -46,13 +46,13 @@ - @permission('update-' . $module->getAlias() . '-settings') + @can('update-' . $module->getAlias() . '-settings') - @endpermission + @endcan {!! Form::close() !!} diff --git a/resources/views/settings/schedule/edit.blade.php b/resources/views/settings/schedule/edit.blade.php index 7c1bf8ba4..53b141828 100644 --- a/resources/views/settings/schedule/edit.blade.php +++ b/resources/views/settings/schedule/edit.blade.php @@ -35,13 +35,13 @@ - @permission('update-settings-settings') + @can('update-settings-settings') - @endpermission + @endcan {!! Form::hidden('_prefix', 'schedule') !!} diff --git a/resources/views/settings/settings/index.blade.php b/resources/views/settings/settings/index.blade.php index 50c50cc73..a6246bbc6 100644 --- a/resources/views/settings/settings/index.blade.php +++ b/resources/views/settings/settings/index.blade.php @@ -6,7 +6,7 @@
- @permission('read-settings-company') + @can('read-settings-company') - @endpermission + @endcan - @permission('read-settings-localisation') + @can('read-settings-localisation') - @endpermission + @endcan - @permission('read-settings-invoice') + @can('read-settings-invoice') - @endpermission + @endcan - @permission('read-settings-defaults') + @can('read-settings-defaults') - @endpermission + @endcan - @permission('read-settings-email') + @can('read-settings-email') - @endpermission + @endcan - @permission('read-settings-schedule') + @can('read-settings-schedule') - @endpermission + @endcan - @permission('read-settings-categories') + @can('read-settings-categories') - @endpermission + @endcan - @permission('read-settings-currencies') + @can('read-settings-currencies') - @endpermission + @endcan - @permission('read-settings-taxes') + @can('read-settings-taxes') - @endpermission + @endcan @foreach($modules as $module)
diff --git a/resources/views/settings/taxes/edit.blade.php b/resources/views/settings/taxes/edit.blade.php index 7f3c74246..a32924e96 100644 --- a/resources/views/settings/taxes/edit.blade.php +++ b/resources/views/settings/taxes/edit.blade.php @@ -28,13 +28,13 @@
- @permission('update-settings-taxes') + @can('update-settings-taxes') - @endpermission + @endcan {!! Form::close() !!}
@endsection diff --git a/resources/views/settings/taxes/index.blade.php b/resources/views/settings/taxes/index.blade.php index 96d4bcc4b..fd22cde08 100644 --- a/resources/views/settings/taxes/index.blade.php +++ b/resources/views/settings/taxes/index.blade.php @@ -2,11 +2,11 @@ @section('title', trans_choice('general.tax_rates', 2)) -@permission('create-settings-taxes') +@can('create-settings-taxes') @section('new_button') {{ trans('general.add_new') }} @endsection -@endpermission +@endcan @section('content') @if ($taxes->count()) @@ -69,10 +69,10 @@
diff --git a/resources/views/wizard/currencies/index.blade.php b/resources/views/wizard/currencies/index.blade.php index 3e39fe123..5b69f05ee 100644 --- a/resources/views/wizard/currencies/index.blade.php +++ b/resources/views/wizard/currencies/index.blade.php @@ -68,10 +68,10 @@ - @permission('delete-settings-currencies') + @can('delete-settings-currencies') {!! Form::deleteLink($item, 'wizard/currencies') !!} - @endpermission + @endcan diff --git a/resources/views/wizard/taxes/index.blade.php b/resources/views/wizard/taxes/index.blade.php index edee305bc..bac6d83b0 100644 --- a/resources/views/wizard/taxes/index.blade.php +++ b/resources/views/wizard/taxes/index.blade.php @@ -65,10 +65,10 @@ - @permission('delete-settings-taxes') + @can('delete-settings-taxes') {!! Form::deleteLink($item, 'wizard/taxes') !!} - @endpermission + @endcan diff --git a/tests/Feature/Auth/PermissionsTest.php b/tests/Feature/Auth/PermissionsTest.php index ad7f7a334..990325939 100644 --- a/tests/Feature/Auth/PermissionsTest.php +++ b/tests/Feature/Auth/PermissionsTest.php @@ -84,6 +84,6 @@ class PermissionsTest extends FeatureTestCase public function getRequest() { - return factory(Permission::class)->raw(); + return Permission::factory()->raw(); } } diff --git a/tests/Feature/Auth/RolesTest.php b/tests/Feature/Auth/RolesTest.php index 3e79070bf..4cd6dbc10 100644 --- a/tests/Feature/Auth/RolesTest.php +++ b/tests/Feature/Auth/RolesTest.php @@ -84,7 +84,7 @@ class RolesTest extends FeatureTestCase public function getRequest() { - return factory(Role::class)->states('permissions')->raw(); + return Role::factory()->permissions()->raw(); } public function getAssertRequest($request) diff --git a/tests/Feature/Auth/UsersTest.php b/tests/Feature/Auth/UsersTest.php index d66343ffa..f0a75fb63 100644 --- a/tests/Feature/Auth/UsersTest.php +++ b/tests/Feature/Auth/UsersTest.php @@ -129,7 +129,7 @@ class UsersTest extends FeatureTestCase public function getRequest() { - return factory(User::class)->states('enabled')->raw(); + return User::factory()->enabled()->raw(); } public function getAssertRequest($request) diff --git a/tests/Feature/Banking/AccountsTest.php b/tests/Feature/Banking/AccountsTest.php index 9892f879b..5469d63f5 100644 --- a/tests/Feature/Banking/AccountsTest.php +++ b/tests/Feature/Banking/AccountsTest.php @@ -84,6 +84,6 @@ class AccountsTest extends FeatureTestCase public function getRequest() { - return factory(Account::class)->states('enabled')->raw(); + return Account::factory()->enabled()->raw(); } } diff --git a/tests/Feature/Banking/TransfersTest.php b/tests/Feature/Banking/TransfersTest.php index 5b8f17ff6..4cf86a02e 100644 --- a/tests/Feature/Banking/TransfersTest.php +++ b/tests/Feature/Banking/TransfersTest.php @@ -76,7 +76,7 @@ class TransfersTest extends FeatureTestCase public function testItShouldExportTransfers() { $count = 5; - factory(Transfer::class, $count)->create(); + Transfer::factory()->count($count)->create(); \Excel::fake(); @@ -96,7 +96,7 @@ class TransfersTest extends FeatureTestCase public function testItShouldExportSelectedTransfers() { $count = 5; - $transfers = factory(Transfer::class, $count)->create(); + $transfers = Transfer::factory()->count($count)->create(); \Excel::fake(); @@ -138,9 +138,9 @@ class TransfersTest extends FeatureTestCase public function getRequest() { - $from_account = factory(Account::class)->states('enabled', 'default_currency')->create(); + $from_account = Account::factory()->enabled()->default_currency()->create(); - $to_account = factory(Account::class)->states('enabled', 'default_currency')->create(); + $to_account = Account::factory()->enabled()->default_currency()->create(); return [ 'company_id' => $this->company->id, diff --git a/tests/Feature/Commands/BillReminderTest.php b/tests/Feature/Commands/BillReminderTest.php index dbff11869..9b24d0f47 100644 --- a/tests/Feature/Commands/BillReminderTest.php +++ b/tests/Feature/Commands/BillReminderTest.php @@ -41,7 +41,7 @@ class BillReminderTest extends FeatureTestCase public function getRequest() { - return factory(Bill::class)->states('items', 'received')->raw([ + return Bill::factory()->items()->received()->raw([ 'due_at' => Date::now()->subDays($this->add_days - 1), ]); } diff --git a/tests/Feature/Commands/InvoiceReminderTest.php b/tests/Feature/Commands/InvoiceReminderTest.php index 183855a43..e67ec6fb8 100644 --- a/tests/Feature/Commands/InvoiceReminderTest.php +++ b/tests/Feature/Commands/InvoiceReminderTest.php @@ -41,7 +41,7 @@ class InvoiceReminderTest extends FeatureTestCase public function getRequest() { - return factory(Invoice::class)->states('items', 'sent')->raw([ + return Invoice::factory()->items()->sent()->raw([ 'due_at' => Date::now()->subDays($this->add_days - 1), ]); } diff --git a/tests/Feature/Common/DashboardsTest.php b/tests/Feature/Common/DashboardsTest.php index 142682358..6e29f7b69 100644 --- a/tests/Feature/Common/DashboardsTest.php +++ b/tests/Feature/Common/DashboardsTest.php @@ -93,7 +93,7 @@ class DashboardsTest extends FeatureTestCase public function getRequest() { - return factory(Dashboard::class)->states('enabled', 'users')->raw(); + return Dashboard::factory()->enabled()->users()->raw(); } public function getAssertRequest($request) diff --git a/tests/Feature/Common/ItemsTest.php b/tests/Feature/Common/ItemsTest.php index 221278962..0f6559199 100644 --- a/tests/Feature/Common/ItemsTest.php +++ b/tests/Feature/Common/ItemsTest.php @@ -84,6 +84,6 @@ class ItemsTest extends FeatureTestCase public function getRequest() { - return factory(Item::class)->states('enabled')->raw(); + return Item::factory()->enabled()->raw(); } } diff --git a/tests/Feature/Purchases/BillsTest.php b/tests/Feature/Purchases/BillsTest.php index 69c7199b4..797067595 100644 --- a/tests/Feature/Purchases/BillsTest.php +++ b/tests/Feature/Purchases/BillsTest.php @@ -106,9 +106,9 @@ class BillsTest extends FeatureTestCase public function getRequest($recurring = false) { - $factory = factory(Bill::class); + $factory = Bill::factory(); - $recurring ? $factory->states('items', 'recurring') : $factory->states('items'); + $recurring ? $factory->items()->recurring() : $factory->items(); return $factory->raw(); } diff --git a/tests/Feature/Purchases/PaymentsTest.php b/tests/Feature/Purchases/PaymentsTest.php index 34b3cf8c8..8cc680296 100644 --- a/tests/Feature/Purchases/PaymentsTest.php +++ b/tests/Feature/Purchases/PaymentsTest.php @@ -84,6 +84,6 @@ class PaymentsTest extends FeatureTestCase public function getRequest() { - return factory(Transaction::class)->states('expense')->raw(); + return Transaction::factory()->expense()->raw(); } } diff --git a/tests/Feature/Purchases/VendorsTest.php b/tests/Feature/Purchases/VendorsTest.php index ef2c297c0..ccb2cdda0 100644 --- a/tests/Feature/Purchases/VendorsTest.php +++ b/tests/Feature/Purchases/VendorsTest.php @@ -98,6 +98,6 @@ class VendorsTest extends FeatureTestCase public function getRequest() { - return factory(Contact::class)->states('vendor', 'enabled')->raw(); + return Contact::factory()->vendor()->enabled()->raw(); } } diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php index 38172d946..9e04fcdf2 100644 --- a/tests/Feature/Sales/CustomersTest.php +++ b/tests/Feature/Sales/CustomersTest.php @@ -120,7 +120,7 @@ class CustomersTest extends FeatureTestCase public function getRequest() { - return factory(Contact::class)->states('customer', 'enabled')->raw(); + return Contact::factory()->customer()->enabled()->raw(); } public function getRequestWithUser() diff --git a/tests/Feature/Sales/InvoicesTest.php b/tests/Feature/Sales/InvoicesTest.php index 3997706d3..6b2f465d4 100644 --- a/tests/Feature/Sales/InvoicesTest.php +++ b/tests/Feature/Sales/InvoicesTest.php @@ -106,9 +106,9 @@ class InvoicesTest extends FeatureTestCase public function getRequest($recurring = false) { - $factory = factory(Invoice::class); + $factory = Invoice::factory(); - $recurring ? $factory->states('items', 'recurring') : $factory->states('items'); + $recurring ? $factory->items()->recurring() : $factory->items(); return $factory->raw(); } diff --git a/tests/Feature/Sales/RevenuesTest.php b/tests/Feature/Sales/RevenuesTest.php index 147aeca6e..9b5b4a45f 100644 --- a/tests/Feature/Sales/RevenuesTest.php +++ b/tests/Feature/Sales/RevenuesTest.php @@ -84,6 +84,6 @@ class RevenuesTest extends FeatureTestCase public function getRequest() { - return factory(Transaction::class)->states('income')->raw(); + return Transaction::factory()->income()->raw(); } } diff --git a/tests/Feature/Settings/CategoriesTest.php b/tests/Feature/Settings/CategoriesTest.php index b7346e260..60beacb18 100644 --- a/tests/Feature/Settings/CategoriesTest.php +++ b/tests/Feature/Settings/CategoriesTest.php @@ -84,6 +84,6 @@ class CategoriesTest extends FeatureTestCase public function getRequest() { - return factory(Category::class)->states('enabled')->raw(); + return Category::factory()->enabled()->raw(); } } diff --git a/tests/Feature/Settings/CurrenciesTest.php b/tests/Feature/Settings/CurrenciesTest.php index af995fdad..c7945c4da 100644 --- a/tests/Feature/Settings/CurrenciesTest.php +++ b/tests/Feature/Settings/CurrenciesTest.php @@ -90,6 +90,6 @@ class CurrenciesTest extends FeatureTestCase public function getRequest() { - return factory(Currency::class)->states('enabled')->raw(); + return Currency::factory()->enabled()->raw(); } } diff --git a/tests/Feature/Settings/TaxesTest.php b/tests/Feature/Settings/TaxesTest.php index 319a56e69..4be46e562 100644 --- a/tests/Feature/Settings/TaxesTest.php +++ b/tests/Feature/Settings/TaxesTest.php @@ -84,6 +84,6 @@ class TaxesTest extends FeatureTestCase public function getRequest() { - return factory(Tax::class)->states('enabled')->raw(); + return Tax::factory()->enabled()->raw(); } } diff --git a/tests/Feature/Wizard/CurrenciesTest.php b/tests/Feature/Wizard/CurrenciesTest.php index cd1ce2cc4..b3405a455 100644 --- a/tests/Feature/Wizard/CurrenciesTest.php +++ b/tests/Feature/Wizard/CurrenciesTest.php @@ -68,6 +68,6 @@ class CurrenciesTest extends FeatureTestCase public function getRequest() { - return factory(Currency::class)->states('enabled')->raw(); + return Currency::factory()->enabled()->raw(); } } diff --git a/tests/Feature/Wizard/TaxesTest.php b/tests/Feature/Wizard/TaxesTest.php index ab8fabf7a..9f9640aa2 100644 --- a/tests/Feature/Wizard/TaxesTest.php +++ b/tests/Feature/Wizard/TaxesTest.php @@ -62,6 +62,6 @@ class TaxesTest extends FeatureTestCase public function getRequest() { - return factory(Tax::class)->states('enabled')->raw(); + return Tax::factory()->enabled()->raw(); } }