upgraded to laravel 10

This commit is contained in:
Denis Duliçi 2023-03-16 16:36:13 +03:00
parent f16d121c45
commit 37b0d4207e
34 changed files with 843 additions and 866 deletions

View File

@ -15,11 +15,11 @@ jobs:
strategy:
matrix:
php: ['8.0', '8.1']
php: ['8.1', '8.2']
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Cache Composer
uses: actions/cache@v1

View File

@ -22,10 +22,10 @@ abstract class Model extends Eloquent implements Ownable
protected $tenantable = true;
protected $dates = ['deleted_at'];
protected $casts = [
'enabled' => 'boolean',
'amount' => 'double',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
public $allAttributes = [];
@ -105,7 +105,7 @@ abstract class Model extends Eloquent implements Ownable
/**
* Modules that use the sort parameter in CRUD operations cause an error,
* so this sort parameter set back to old value after the query is executed.
*
*
* for Custom Fields module
*/
$request_sort = $request->get('sort');

View File

@ -141,13 +141,13 @@ class Kernel extends HttpKernel
];
/**
* The application's route middleware.
* The application's middleware aliases.
*
* These middleware may be assigned to groups or used individually.
* Aliases may be used to conveniently assign middleware to routes and groups.
*
* @var array
* @var array<string, class-string|string>
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
// Laravel
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,

View File

@ -37,7 +37,8 @@ class User extends Authenticatable implements HasLocalePreference
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
/**
@ -195,7 +196,7 @@ class User extends Authenticatable implements HasLocalePreference
/**
* Modules that use the sort parameter in CRUD operations cause an error,
* so this sort parameter set back to old value after the query is executed.
*
*
* for Custom Fields module
*/
$request_sort = $request->get('sort');

View File

@ -33,8 +33,9 @@ class Account extends Model
* @var array
*/
protected $casts = [
'opening_balance' => 'double',
'enabled' => 'boolean',
'opening_balance' => 'double',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
/**

View File

@ -26,9 +26,10 @@ class Reconciliation extends Model
* @var array
*/
protected $casts = [
'closing_balance' => 'double',
'reconciled' => 'boolean',
'transactions' => 'array',
'closing_balance' => 'double',
'reconciled' => 'boolean',
'transactions' => 'array',
'deleted_at' => 'datetime',
];
/**

View File

@ -30,8 +30,6 @@ class Transaction extends Model
protected $table = 'transactions';
protected $dates = ['deleted_at', 'paid_at'];
/**
* Attributes that should be mass-assignable.
*
@ -64,8 +62,10 @@ class Transaction extends Model
* @var array
*/
protected $casts = [
'amount' => 'double',
'currency_rate' => 'double',
'paid_at' => 'datetime',
'amount' => 'double',
'currency_rate' => 'double',
'deleted_at' => 'datetime',
];
/**

View File

@ -34,12 +34,11 @@ class Company extends Eloquent implements Ownable
*/
protected $appends = ['location'];
protected $dates = ['deleted_at'];
protected $fillable = ['domain', 'enabled', 'created_from', 'created_by'];
protected $casts = [
'enabled' => 'boolean',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
public $allAttributes = [];

View File

@ -15,7 +15,6 @@ use Bkwld\Cloner\Cloneable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Contact extends Model
{
use Cloneable, Contacts, Currencies, HasFactory, Media, Notifiable, Transactions;
@ -59,15 +58,6 @@ class Contact extends Model
'created_by',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
];
/**
* Sortable columns.
*

View File

@ -20,15 +20,6 @@ class Dashboard extends Model
*/
protected $fillable = ['company_id', 'name', 'enabled', 'created_from', 'created_by'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
];
/**
* Sortable columns.
*

View File

@ -36,9 +36,10 @@ class Item extends Model
* @var array
*/
protected $casts = [
'sale_price' => 'double',
'purchase_price' => 'double',
'enabled' => 'boolean',
'sale_price' => 'double',
'purchase_price' => 'double',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
/**

View File

@ -12,7 +12,9 @@ class Media extends BaseMedia
{
use Owners, SoftDeletes, Sources, Tenants;
protected $dates = ['deleted_at'];
protected $fillable = ['company_id', 'created_from', 'created_by'];
protected $casts = [
'deleted_at' => 'datetime',
];
}

View File

@ -43,7 +43,8 @@ class Recurring extends Model
* @var array
*/
protected $casts = [
'auto_send' => 'boolean',
'auto_send' => 'boolean',
'deleted_at' => 'datetime',
];
/**

View File

@ -25,7 +25,8 @@ class Report extends Model
* @var array
*/
protected $casts = [
'settings' => 'object',
'settings' => 'object',
'deleted_at' => 'datetime',
];
/**

View File

@ -26,7 +26,8 @@ class Widget extends Model
* @var array
*/
protected $casts = [
'settings' => 'object',
'settings' => 'object',
'deleted_at' => 'datetime',
];
/**

View File

@ -30,8 +30,6 @@ class Document extends Model
protected $appends = ['attachment', 'amount_without_tax', 'discount', 'paid', 'received_at', 'status_label', 'sent_at', 'reconciled', 'contact_location'];
protected $dates = ['deleted_at', 'issued_at', 'due_at'];
protected $fillable = [
'company_id',
'type',
@ -67,8 +65,11 @@ class Document extends Model
* @var array
*/
protected $casts = [
'amount' => 'double',
'issued_at' => 'datetime',
'due_at' => 'datetime',
'amount' => 'double',
'currency_rate' => 'double',
'deleted_at' => 'datetime',
];
/**

View File

@ -40,9 +40,10 @@ class DocumentItem extends Model
* @var array
*/
protected $casts = [
'price' => 'double',
'total' => 'double',
'tax' => 'double',
'price' => 'double',
'total' => 'double',
'tax' => 'double',
'deleted_at' => 'datetime',
];
/**

View File

@ -16,15 +16,6 @@ class DocumentItemTax extends Model
protected $fillable = ['company_id', 'type', 'document_id', 'document_item_id', 'tax_id', 'name', 'amount', 'created_from', 'created_by'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'amount' => 'double',
];
public function document()
{
return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document');

View File

@ -18,15 +18,6 @@ class DocumentTotal extends Model
protected $fillable = ['company_id', 'type', 'document_id', 'code', 'name', 'amount', 'sort_order', 'created_from', 'created_by'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'amount' => 'double',
];
public function document()
{
return $this->belongsTo('App\Models\Document\Document')->withoutGlobalScope('App\Scopes\Document');

View File

@ -15,15 +15,6 @@ class Module extends Model
*/
protected $fillable = ['company_id', 'alias', 'enabled', 'created_from', 'created_by'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
];
/**
* Scope alias.
*

View File

@ -34,15 +34,6 @@ class Category extends Model
*/
protected $fillable = ['company_id', 'name', 'type', 'color', 'enabled', 'created_from', 'created_by', 'parent_id'];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'enabled' => 'boolean',
];
/**
* Sortable columns.
*
@ -231,7 +222,7 @@ class Category extends Model
/**
* Get the display name of the category.
*/
*/
public function getDisplayNameAttribute()
{
return $this->name . ' (' . ucfirst($this->type) . ')';

View File

@ -40,8 +40,9 @@ class Currency extends Model
* @var array
*/
protected $casts = [
'rate' => 'double',
'enabled' => 'boolean',
'rate' => 'double',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
/**

View File

@ -32,8 +32,9 @@ class Tax extends Model
* @var array
*/
protected $casts = [
'rate' => 'double',
'enabled' => 'boolean',
'rate' => 'double',
'enabled' => 'boolean',
'deleted_at' => 'datetime',
];
/**

View File

@ -46,20 +46,6 @@ trait Jobs
return app(Dispatcher::class)->dispatchSync($job, $handler);
}
/**
* Dispatch a command to its appropriate handler in the current process.
*
* @param mixed $job
* @param mixed $handler
* @return mixed
*
* @deprecated Will be removed in a future Laravel version.
*/
public function dispatchNow($job, $handler = null)
{
return app(Dispatcher::class)->dispatchNow($job, $handler);
}
/**
* Dispatch a job to its appropriate handler and return a response array for ajax calls.
*

View File

@ -3,7 +3,7 @@
/**
* @package Akaunting
* @copyright 2017-2022 Akaunting. All rights reserved.
* @copyright 2017-2023 Akaunting. All rights reserved.
* @license GNU GPL version 3; see LICENSE.txt
* @link https://akaunting.com
*/

View File

@ -13,7 +13,7 @@
"license": "GPL-3.0+",
"type": "project",
"require": {
"php": "^8.0.2",
"php": "^8.1",
"ext-bcmath": "*",
"ext-ctype": "*",
"ext-curl": "*",
@ -32,8 +32,8 @@
"akaunting/laravel-firewall": "^2.0",
"akaunting/laravel-language": "^1.0",
"akaunting/laravel-menu": "^3.0",
"akaunting/laravel-module": "^2.0",
"akaunting/laravel-money": "^3.0",
"akaunting/laravel-module": "^3.0",
"akaunting/laravel-money": "^4.0",
"akaunting/laravel-mutable-observer": "^1.0",
"akaunting/laravel-setting": "^1.2",
"akaunting/laravel-sortable": "^1.0",
@ -46,17 +46,17 @@
"bkwld/cloner": "^3.10",
"bugsnag/bugsnag-laravel": "^2.24",
"doctrine/dbal": "^3.1",
"genealabs/laravel-model-caching": "0.12.*",
"graham-campbell/markdown": "14.0.x-dev",
"genealabs/laravel-model-caching": "^0.13",
"graham-campbell/markdown": "^15.0",
"guzzlehttp/guzzle": "^7.4",
"intervention/image": "^2.5",
"intervention/imagecache": "^2.5",
"laracasts/flash": "3.2.*",
"laravel/framework": "^9.0",
"laravel/sanctum": "^2.14",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.2",
"laravel/slack-notification-channel": "^2.3",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.0",
"laravel/ui": "^4.2",
"league/flysystem-aws-s3-v3": "^3.0",
"league/oauth2-client": "^2.6",
"league/omnipay": "^3.2",
@ -78,14 +78,14 @@
"symfony/sendgrid-mailer": "^6.0"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.5",
"brianium/paratest": "^6.1",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3",
"spatie/laravel-ignition": "^1.0",
"wnx/laravel-stats": "^2.5"
"beyondcode/laravel-dump-server": "^1.9",
"brianium/paratest": "^6.9|^7.1",
"fakerphp/faker": "^1.20",
"mockery/mockery": "^1.4",
"nunomaduro/collision": "^7.1",
"phpunit/phpunit": "^9.5|^10.0",
"spatie/laravel-ignition": "^2.0",
"wnx/laravel-stats": "^2.11"
},
"extra": {
"laravel": {

1468
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -86,10 +86,14 @@ return [
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that each reset token will be
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [

View File

@ -36,8 +36,11 @@ return [
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html

View File

@ -3,6 +3,7 @@
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
use Monolog\Processor\PsrLogMessageProcessor;
return [
@ -61,6 +62,7 @@ return [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'daily' => [
@ -68,6 +70,7 @@ return [
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
'replace_placeholders' => true,
],
'slack' => [
@ -76,6 +79,7 @@ return [
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
'replace_placeholders' => true,
],
'papertrail' => [
@ -87,6 +91,7 @@ return [
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
],
'processors' => [PsrLogMessageProcessor::class],
],
'stderr' => [
@ -97,6 +102,7 @@ return [
'with' => [
'stream' => 'php://stderr',
],
'processors' => [PsrLogMessageProcessor::class],
],
'stdout' => [
@ -107,16 +113,20 @@ return [
'with' => [
'stream' => 'php://stdout',
],
'processors' => [PsrLogMessageProcessor::class],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => LOG_USER,
'replace_placeholders' => true,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
'null' => [
@ -131,11 +141,13 @@ return [
'bugsnag' => [
'driver' => 'bugsnag',
'level' => env('LOG_LEVEL', 'debug'),
'processors' => [PsrLogMessageProcessor::class],
],
'sentry' => [
'driver' => 'sentry',
'level' => env('LOG_LEVEL', 'debug'),
'processors' => [PsrLogMessageProcessor::class],
],
],

View File

@ -28,7 +28,7 @@ return [
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "log", "array", "mail", "failover"
|
*/
@ -42,6 +42,7 @@ return [
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => env('MAIL_TIMEOUT'),
'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
'ses' => [
@ -50,10 +51,16 @@ return [
'mailgun' => [
'transport' => 'mailgun',
// 'client' => [
// 'timeout' => 5,
// ],
],
'postmark' => [
'transport' => 'postmark',
// 'client' => [
// 'timeout' => 5,
// ],
'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
],

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"/livewire.js":"/livewire.js?id=fe747446aa84856d8b66"}
{"/livewire.js":"/livewire.js?id=90730a3b0e7144480175"}