From 8725d40f8d21c9f65d3161498eb7ad88c3b7b494 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 22 Jun 2023 17:00:42 -0400 Subject: [PATCH 1/9] current value added to asset index page. translations for this in reports --- app/Http/Controllers/ReportsController.php | 22 ++++++++++----------- app/Http/Transformers/AssetsTransformer.php | 1 + app/Presenters/AssetPresenter.php | 7 +++++++ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index 80fe24255c..e3fc761bcc 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -501,7 +501,6 @@ class ReportsController extends Controller $header[] = trans('general.zip'); } - if ($request->filled('assigned_to')) { $header[] = trans('admin/hardware/table.checkoutto'); $header[] = trans('general.type'); @@ -531,16 +530,6 @@ class ReportsController extends Controller $header[] = trans('general.status'); } - if ($request->filled('warranty')) { - $header[] = 'Warranty'; - $header[] = 'Warranty Expires'; - } - if ($request->filled('depreciation')) { - $header[] = 'Value'; - $header[] = 'Diff'; - $header[] = 'Fully Depreciated'; - } - if ($request->filled('checkout_date')) { $header[] = trans('admin/hardware/table.checkout_date'); } @@ -549,6 +538,17 @@ class ReportsController extends Controller $header[] = trans('admin/hardware/form.expected_checkin'); } + if ($request->filled('depreciation')) { + $header[] = trans('admin/hardware/table.book_value'); + $header[] = trans('admin/hardware/table.diff'); + $header[] = trans('admin/hardware/form.fully_depreciated'); + } + + if ($request->filled('warranty')) { + $header[] = trans('admin/hardware/form.warranty'); + $header[] = trans('admin/hardware/form.warranty_expires'); + } + if ($request->filled('created_at')) { $header[] = trans('general.created_at'); } diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index d431ec890d..e03e63973b 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -92,6 +92,7 @@ class AssetsTransformer 'checkout_counter' => (int) $asset->checkout_counter, 'requests_counter' => (int) $asset->requests_counter, 'user_can_checkout' => (bool) $asset->availableForCheckout(), + 'book_value' => Helper::formatCurrencyOutput($asset->getLinearDepreciatedValue()), ]; diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index ce476d082c..46019e7e27 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -154,6 +154,13 @@ class AssetPresenter extends Presenter 'footerFormatter' => 'sumFormatter', 'class' => 'text-right', ], [ + "field" => "book_value", + "searchable" => true, + "sortable" => true, + "title" => trans('admin/hardware/table.book_value'), + "footerFormatter" => 'sumFormatter', + "class" => "text-right", + ],[ 'field' => 'order_number', 'searchable' => true, 'sortable' => true, From 8df9db76bc6615e23f267cd1efe662f0de738163 Mon Sep 17 00:00:00 2001 From: akemidx Date: Thu, 22 Jun 2023 17:12:40 -0400 Subject: [PATCH 2/9] column ordering fix --- app/Http/Controllers/ReportsController.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php index e3fc761bcc..d440065212 100644 --- a/app/Http/Controllers/ReportsController.php +++ b/app/Http/Controllers/ReportsController.php @@ -530,12 +530,9 @@ class ReportsController extends Controller $header[] = trans('general.status'); } - if ($request->filled('checkout_date')) { - $header[] = trans('admin/hardware/table.checkout_date'); - } - - if ($request->filled('expected_checkin')) { - $header[] = trans('admin/hardware/form.expected_checkin'); + if ($request->filled('warranty')) { + $header[] = trans('admin/hardware/form.warranty'); + $header[] = trans('admin/hardware/form.warranty_expires'); } if ($request->filled('depreciation')) { @@ -544,9 +541,12 @@ class ReportsController extends Controller $header[] = trans('admin/hardware/form.fully_depreciated'); } - if ($request->filled('warranty')) { - $header[] = trans('admin/hardware/form.warranty'); - $header[] = trans('admin/hardware/form.warranty_expires'); + if ($request->filled('checkout_date')) { + $header[] = trans('admin/hardware/table.checkout_date'); + } + + if ($request->filled('expected_checkin')) { + $header[] = trans('admin/hardware/form.expected_checkin'); } if ($request->filled('created_at')) { From a4a676ef0b4362bcee2b0c3d4d15b564b7f53b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Pittet?= Date: Mon, 10 Jul 2023 11:19:54 -0700 Subject: [PATCH 3/9] Update league/oauth2-server for CVE-2023-3726 and lcobucci/clock to semver to allow dependencies to update --- composer.json | 2 +- composer.lock | 248 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 175 insertions(+), 75 deletions(-) diff --git a/composer.json b/composer.json index cf4a524376..d575d03fb9 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "laravel/tinker": "^2.6", "laravel/ui": "^3.3", "laravelcollective/html": "^6.2", - "lcobucci/clock": "1.2.0|2.0.0", + "lcobucci/clock": "^1.2.0|^2.0.0", "lcobucci/jwt": "^3.4.5|^4.0.4", "league/csv": "^9.7", "league/flysystem-aws-s3-v3": "^1.0", diff --git a/composer.lock b/composer.lock index 4e522d8a99..1e5afa7c86 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": "217a3619f0f4eebdb280299efdd7297e", + "content-hash": "0ea87c1711453bcc35abd866100c7668", "packages": [ { "name": "alek13/slack", @@ -657,16 +657,16 @@ }, { "name": "defuse/php-encryption", - "version": "v2.3.1", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/defuse/php-encryption.git", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/f53396c2d34225064647a05ca76c1da9d99e5828", + "reference": "f53396c2d34225064647a05ca76c1da9d99e5828", "shasum": "" }, "require": { @@ -675,7 +675,8 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" + "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", + "yoast/phpunit-polyfills": "^2.0.0" }, "bin": [ "bin/generate-defuse-key" @@ -717,9 +718,9 @@ ], "support": { "issues": "https://github.com/defuse/php-encryption/issues", - "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" + "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" }, - "time": "2021-04-09T23:57:26+00:00" + "time": "2023-06-19T06:10:36+00:00" }, { "name": "dflydev/dot-access-data", @@ -3878,31 +3879,34 @@ }, { "name": "lcobucci/clock", - "version": "2.0.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3" + "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/353d83fe2e6ae95745b16b3d911813df6a05bfb3", - "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", + "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "php": "~8.1.0 || ~8.2.0", + "stella-maris/clock": "^0.1.7" + }, + "provide": { + "psr/clock-implementation": "1.0" }, "require-dev": { - "infection/infection": "^0.17", - "lcobucci/coding-standard": "^6.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/php-code-coverage": "9.1.4", - "phpunit/phpunit": "9.3.7" + "infection/infection": "^0.26", + "lcobucci/coding-standard": "^9.0", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.27" }, "type": "library", "autoload": { @@ -3923,7 +3927,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.0.x" + "source": "https://github.com/lcobucci/clock/tree/2.3.0" }, "funding": [ { @@ -3935,20 +3939,20 @@ "type": "patreon" } ], - "time": "2020-08-27T18:56:02+00:00" + "time": "2022-12-19T14:38:11+00:00" }, { "name": "lcobucci/jwt", - "version": "4.1.5", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" + "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", - "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4", "shasum": "" }, "require": { @@ -3957,19 +3961,19 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-sodium": "*", - "lcobucci/clock": "^2.0", + "lcobucci/clock": "^2.0 || ^3.0", "php": "^7.4 || ^8.0" }, "require-dev": { "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.0", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-deprecation-rules": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, @@ -3997,7 +4001,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.1.5" + "source": "https://github.com/lcobucci/jwt/tree/4.3.0" }, "funding": [ { @@ -4009,7 +4013,7 @@ "type": "patreon" } ], - "time": "2021-09-28T19:34:56+00:00" + "time": "2023-01-02T13:28:00+00:00" }, { "name": "league/commonmark", @@ -4681,37 +4685,37 @@ }, { "name": "league/oauth2-server", - "version": "8.3.5", + "version": "8.5.3", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "7aeb7c42b463b1a6fe4d084d3145e2fa22436876" + "reference": "eb91b4190e7f6169053ebf8ffa352d47e756b2ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/7aeb7c42b463b1a6fe4d084d3145e2fa22436876", - "reference": "7aeb7c42b463b1a6fe4d084d3145e2fa22436876", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/eb91b4190e7f6169053ebf8ffa352d47e756b2ce", + "reference": "eb91b4190e7f6169053ebf8ffa352d47e756b2ce", "shasum": "" }, "require": { - "defuse/php-encryption": "^2.2.1", - "ext-json": "*", + "defuse/php-encryption": "^2.3", "ext-openssl": "*", - "lcobucci/jwt": "^3.4.6 || ^4.0.4", + "lcobucci/clock": "^2.2 || ^3.0", + "lcobucci/jwt": "^4.3 || ^5.0", "league/event": "^2.2", - "league/uri": "^6.4", - "php": "^7.2 || ^8.0", - "psr/http-message": "^1.0.1" + "league/uri": "^6.7", + "php": "^8.0", + "psr/http-message": "^1.0.1 || ^2.0" }, "replace": { "league/oauth2server": "*", "lncd/oauth2": "*" }, "require-dev": { - "laminas/laminas-diactoros": "^2.4.1", + "laminas/laminas-diactoros": "^3.0.0", "phpstan/phpstan": "^0.12.57", "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^8.5.13", + "phpunit/phpunit": "^9.6.6", "roave/security-advisories": "dev-master" }, "type": "library", @@ -4757,7 +4761,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.3.5" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.3" }, "funding": [ { @@ -4765,41 +4769,42 @@ "type": "github" } ], - "time": "2022-05-03T21:21:28+00:00" + "time": "2023-07-05T23:01:32+00:00" }, { "name": "league/uri", - "version": "6.7.1", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea" + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", - "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0" + "php": "^8.1", + "psr/http-message": "^1.0.1" }, "conflict": { "league/uri-schemes": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.3.2", - "nyholm/psr7": "^1.5", - "php-http/psr7-integration-tests": "^1.1", - "phpstan/phpstan": "^1.2.0", + "friendsofphp/php-cs-fixer": "^v3.9.5", + "nyholm/psr7": "^1.5.1", + "php-http/psr7-integration-tests": "^1.1.1", + "phpbench/phpbench": "^1.2.6", + "phpstan/phpstan": "^1.8.5", "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^9.5.10", - "psr/http-factory": "^1.0" + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.4.3", + "phpunit/phpunit": "^9.5.24", + "psr/http-factory": "^1.0.1" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -4856,7 +4861,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.7.1" + "source": "https://github.com/thephpleague/uri/tree/6.8.0" }, "funding": [ { @@ -4864,7 +4869,7 @@ "type": "github" } ], - "time": "2022-06-29T09:48:18+00:00" + "time": "2022-09-13T19:58:47+00:00" }, { "name": "league/uri-interfaces", @@ -7421,6 +7426,54 @@ }, "time": "2016-08-06T20:24:11+00:00" }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, { "name": "psr/container", "version": "1.1.2", @@ -7628,25 +7681,25 @@ }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -7675,9 +7728,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/log", @@ -8845,6 +8898,53 @@ }, "time": "2022-06-18T07:21:10+00:00" }, + { + "name": "stella-maris/clock", + "version": "0.1.7", + "source": { + "type": "git", + "url": "https://github.com/stella-maris-solutions/clock.git", + "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", + "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", + "shasum": "" + }, + "require": { + "php": "^7.0|^8.0", + "psr/clock": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "StellaMaris\\Clock\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Heigl", + "role": "Maintainer" + } + ], + "description": "A pre-release of the proposed PSR-20 Clock-Interface", + "homepage": "https://gitlab.com/stella-maris/clock", + "keywords": [ + "clock", + "datetime", + "point in time", + "psr20" + ], + "support": { + "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" + }, + "time": "2022-11-25T16:15:06+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.3.0", From 24adcdb586eac637db0283b261881093ca06c45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Pittet?= Date: Wed, 12 Jul 2023 17:58:52 -0700 Subject: [PATCH 4/9] Revert lock file changes for PHP 7 support --- composer.lock | 248 +++++++++++++++----------------------------------- 1 file changed, 74 insertions(+), 174 deletions(-) diff --git a/composer.lock b/composer.lock index 1e5afa7c86..4e522d8a99 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": "0ea87c1711453bcc35abd866100c7668", + "content-hash": "217a3619f0f4eebdb280299efdd7297e", "packages": [ { "name": "alek13/slack", @@ -657,16 +657,16 @@ }, { "name": "defuse/php-encryption", - "version": "v2.4.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/defuse/php-encryption.git", - "reference": "f53396c2d34225064647a05ca76c1da9d99e5828" + "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/f53396c2d34225064647a05ca76c1da9d99e5828", - "reference": "f53396c2d34225064647a05ca76c1da9d99e5828", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", + "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", "shasum": "" }, "require": { @@ -675,8 +675,7 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^5|^6|^7|^8|^9|^10", - "yoast/phpunit-polyfills": "^2.0.0" + "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" }, "bin": [ "bin/generate-defuse-key" @@ -718,9 +717,9 @@ ], "support": { "issues": "https://github.com/defuse/php-encryption/issues", - "source": "https://github.com/defuse/php-encryption/tree/v2.4.0" + "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" }, - "time": "2023-06-19T06:10:36+00:00" + "time": "2021-04-09T23:57:26+00:00" }, { "name": "dflydev/dot-access-data", @@ -3879,34 +3878,31 @@ }, { "name": "lcobucci/clock", - "version": "2.3.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876" + "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/c7aadcd6fd97ed9e199114269c0be3f335e38876", - "reference": "c7aadcd6fd97ed9e199114269c0be3f335e38876", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/353d83fe2e6ae95745b16b3d911813df6a05bfb3", + "reference": "353d83fe2e6ae95745b16b3d911813df6a05bfb3", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0", - "stella-maris/clock": "^0.1.7" - }, - "provide": { - "psr/clock-implementation": "1.0" + "php": "^7.4 || ^8.0" }, "require-dev": { - "infection/infection": "^0.26", - "lcobucci/coding-standard": "^9.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.27" + "infection/infection": "^0.17", + "lcobucci/coding-standard": "^6.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/php-code-coverage": "9.1.4", + "phpunit/phpunit": "9.3.7" }, "type": "library", "autoload": { @@ -3927,7 +3923,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.3.0" + "source": "https://github.com/lcobucci/clock/tree/2.0.x" }, "funding": [ { @@ -3939,20 +3935,20 @@ "type": "patreon" } ], - "time": "2022-12-19T14:38:11+00:00" + "time": "2020-08-27T18:56:02+00:00" }, { "name": "lcobucci/jwt", - "version": "4.3.0", + "version": "4.1.5", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4" + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4", - "reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", "shasum": "" }, "require": { @@ -3961,19 +3957,19 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-sodium": "*", - "lcobucci/clock": "^2.0 || ^3.0", + "lcobucci/clock": "^2.0", "php": "^7.4 || ^8.0" }, "require-dev": { "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.2", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-deprecation-rules": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", "phpunit/php-invoker": "^3.1", "phpunit/phpunit": "^9.5" }, @@ -4001,7 +3997,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.3.0" + "source": "https://github.com/lcobucci/jwt/tree/4.1.5" }, "funding": [ { @@ -4013,7 +4009,7 @@ "type": "patreon" } ], - "time": "2023-01-02T13:28:00+00:00" + "time": "2021-09-28T19:34:56+00:00" }, { "name": "league/commonmark", @@ -4685,37 +4681,37 @@ }, { "name": "league/oauth2-server", - "version": "8.5.3", + "version": "8.3.5", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "eb91b4190e7f6169053ebf8ffa352d47e756b2ce" + "reference": "7aeb7c42b463b1a6fe4d084d3145e2fa22436876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/eb91b4190e7f6169053ebf8ffa352d47e756b2ce", - "reference": "eb91b4190e7f6169053ebf8ffa352d47e756b2ce", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/7aeb7c42b463b1a6fe4d084d3145e2fa22436876", + "reference": "7aeb7c42b463b1a6fe4d084d3145e2fa22436876", "shasum": "" }, "require": { - "defuse/php-encryption": "^2.3", + "defuse/php-encryption": "^2.2.1", + "ext-json": "*", "ext-openssl": "*", - "lcobucci/clock": "^2.2 || ^3.0", - "lcobucci/jwt": "^4.3 || ^5.0", + "lcobucci/jwt": "^3.4.6 || ^4.0.4", "league/event": "^2.2", - "league/uri": "^6.7", - "php": "^8.0", - "psr/http-message": "^1.0.1 || ^2.0" + "league/uri": "^6.4", + "php": "^7.2 || ^8.0", + "psr/http-message": "^1.0.1" }, "replace": { "league/oauth2server": "*", "lncd/oauth2": "*" }, "require-dev": { - "laminas/laminas-diactoros": "^3.0.0", + "laminas/laminas-diactoros": "^2.4.1", "phpstan/phpstan": "^0.12.57", "phpstan/phpstan-phpunit": "^0.12.16", - "phpunit/phpunit": "^9.6.6", + "phpunit/phpunit": "^8.5.13", "roave/security-advisories": "dev-master" }, "type": "library", @@ -4761,7 +4757,7 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth2-server/issues", - "source": "https://github.com/thephpleague/oauth2-server/tree/8.5.3" + "source": "https://github.com/thephpleague/oauth2-server/tree/8.3.5" }, "funding": [ { @@ -4769,42 +4765,41 @@ "type": "github" } ], - "time": "2023-07-05T23:01:32+00:00" + "time": "2022-05-03T21:21:28+00:00" }, { "name": "league/uri", - "version": "6.8.0", + "version": "6.7.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" + "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", - "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", + "reference": "2d7c87a0860f3126a39f44a8a9bf2fed402dcfea", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^8.1", - "psr/http-message": "^1.0.1" + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" }, "conflict": { "league/uri-schemes": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.9.5", - "nyholm/psr7": "^1.5.1", - "php-http/psr7-integration-tests": "^1.1.1", - "phpbench/phpbench": "^1.2.6", - "phpstan/phpstan": "^1.8.5", + "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.1.1", - "phpstan/phpstan-strict-rules": "^1.4.3", - "phpunit/phpunit": "^9.5.24", - "psr/http-factory": "^1.0.1" + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -4861,7 +4856,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.8.0" + "source": "https://github.com/thephpleague/uri/tree/6.7.1" }, "funding": [ { @@ -4869,7 +4864,7 @@ "type": "github" } ], - "time": "2022-09-13T19:58:47+00:00" + "time": "2022-06-29T09:48:18+00:00" }, { "name": "league/uri-interfaces", @@ -7426,54 +7421,6 @@ }, "time": "2016-08-06T20:24:11+00:00" }, - { - "name": "psr/clock", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/clock.git", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Clock\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for reading the clock.", - "homepage": "https://github.com/php-fig/clock", - "keywords": [ - "clock", - "now", - "psr", - "psr-20", - "time" - ], - "support": { - "issues": "https://github.com/php-fig/clock/issues", - "source": "https://github.com/php-fig/clock/tree/1.0.0" - }, - "time": "2022-11-25T14:36:26+00:00" - }, { "name": "psr/container", "version": "1.1.2", @@ -7681,25 +7628,25 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -7728,9 +7675,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/master" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/log", @@ -8898,53 +8845,6 @@ }, "time": "2022-06-18T07:21:10+00:00" }, - { - "name": "stella-maris/clock", - "version": "0.1.7", - "source": { - "type": "git", - "url": "https://github.com/stella-maris-solutions/clock.git", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/stella-maris-solutions/clock/zipball/fa23ce16019289a18bb3446fdecd45befcdd94f8", - "reference": "fa23ce16019289a18bb3446fdecd45befcdd94f8", - "shasum": "" - }, - "require": { - "php": "^7.0|^8.0", - "psr/clock": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "StellaMaris\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Heigl", - "role": "Maintainer" - } - ], - "description": "A pre-release of the proposed PSR-20 Clock-Interface", - "homepage": "https://gitlab.com/stella-maris/clock", - "keywords": [ - "clock", - "datetime", - "point in time", - "psr20" - ], - "support": { - "source": "https://github.com/stella-maris-solutions/clock/tree/0.1.7" - }, - "time": "2022-11-25T16:15:06+00:00" - }, { "name": "swiftmailer/swiftmailer", "version": "v6.3.0", From 064e6965212cfc8413828a7eb083a488544af481 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 18 Jul 2023 15:33:33 -0400 Subject: [PATCH 5/9] merge users page typo fix --- resources/lang/en/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php index 328eb32090..be8361e4e0 100644 --- a/resources/lang/en/general.php +++ b/resources/lang/en/general.php @@ -412,7 +412,7 @@ return [ 'integration_option' => 'Integration Option', 'log_does_not_exist' => 'No matching log record exists.', 'merge_users' => 'Merge Users', - 'merge_information' => 'This will merge the :count users into a single user. Select the user you wish to merge the others into below, and the associated assets, licences, etc will be moved over to the selected user and the other users will be marked as deleted.', + 'merge_information' => 'This will merge the :count users into a single user. Select the user you wish to merge the others into below, and the associated assets, licenses, etc will be moved over to the selected user and the other users will be marked as deleted.', 'warning_merge_information' => 'This action CANNOT be undone and should ONLY be used when you need to merge users because of a bad import or sync. Be sure to run a backup first.', 'no_users_selected' => 'No users selected', 'not_enough_users_selected' => 'At least :count users must be selected', From 9e2987e680f29e11ceeba54d990a97db852c1d31 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 19 Jul 2023 13:44:31 -0400 Subject: [PATCH 6/9] changing book value to be NOT searchable or sortable --- app/Presenters/AssetPresenter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index 46019e7e27..7e07dbe019 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -155,8 +155,8 @@ class AssetPresenter extends Presenter 'class' => 'text-right', ], [ "field" => "book_value", - "searchable" => true, - "sortable" => true, + "searchable" => false, + "sortable" => false, "title" => trans('admin/hardware/table.book_value'), "footerFormatter" => 'sumFormatter', "class" => "text-right", From 90a344af0b59e7a211f2db4806fdbc34596a6d98 Mon Sep 17 00:00:00 2001 From: Tobias Franzius Date: Thu, 20 Jul 2023 13:26:42 +0200 Subject: [PATCH 7/9] Fixes #13341 Clean up correct seats on license delete Before this, we checked for the `id` collumn in the `license_seats` table, insteasd of using `license_id` for this. This way, we ensure that we only alter seats belonging to the correct license. --- app/Http/Controllers/Licenses/LicensesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Licenses/LicensesController.php b/app/Http/Controllers/Licenses/LicensesController.php index 26cba33281..02e2163207 100755 --- a/app/Http/Controllers/Licenses/LicensesController.php +++ b/app/Http/Controllers/Licenses/LicensesController.php @@ -207,7 +207,7 @@ class LicensesController extends Controller if ($license->assigned_seats_count == 0) { // Delete the license and the associated license seats DB::table('license_seats') - ->where('id', $license->id) + ->where('license_id', $license->id) ->update(['assigned_to' => null, 'asset_id' => null]); $licenseSeats = $license->licenseseats(); From 244e4ec11f389dd7e775a9a233255ef9b0b21e26 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 20 Jul 2023 13:48:51 +0100 Subject: [PATCH 8/9] Added manufacturer back into license importer Signed-off-by: snipe --- app/Http/Livewire/Importer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Livewire/Importer.php b/app/Http/Livewire/Importer.php index ff471adc4b..2e1137bcd2 100644 --- a/app/Http/Livewire/Importer.php +++ b/app/Http/Livewire/Importer.php @@ -286,6 +286,7 @@ class Importer extends Component 'serial' => trans('general.license_serial'), 'email' => trans('general.importer.checked_out_to_email'), 'username' => trans('general.importer.checked_out_to_username'), + 'manufacturer' => trans('general.manufacturer'), ]; $this->users_fields = [ From d7ac8ef61893e771fa98e364596da103aad15b19 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 20 Jul 2023 14:02:54 +0100 Subject: [PATCH 9/9] Added manufacturer to licenses Signed-off-by: snipe --- app/Importer/LicenseImporter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Importer/LicenseImporter.php b/app/Importer/LicenseImporter.php index 02ef05af5c..ce07585ab5 100644 --- a/app/Importer/LicenseImporter.php +++ b/app/Importer/LicenseImporter.php @@ -66,6 +66,8 @@ class LicenseImporter extends ItemImporter $this->item['maintained'] = $this->findCsvMatch($row, 'maintained'); $this->item['purchase_order'] = $this->findCsvMatch($row, 'purchase_order'); $this->item['reassignable'] = $this->findCsvMatch($row, 'reassignable'); + $this->item['manufacturer'] = $this->createOrFetchManufacturer($this->findCsvMatch($row, 'manufacturer')); + if($this->item['reassignable'] == "") { $this->item['reassignable'] = 1;