From: Vincent Vanwaelscappel Date: Fri, 10 Feb 2023 11:05:52 +0000 (+0100) Subject: wip #5718 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=05625f4f0f5690519807bee47369a948dbbfd4d8;p=fluidbook-toolbox.git wip #5718 @2 --- diff --git a/app/Http/Controllers/Admin/FileCrudController.php b/app/Http/Controllers/Admin/FileCrudController.php new file mode 100644 index 000000000..e7f5e9cf7 --- /dev/null +++ b/app/Http/Controllers/Admin/FileCrudController.php @@ -0,0 +1,29 @@ + $this->getFiles($id), 'id' => $id]); - } - - protected function getFiles($id = 'me') - { - if ($id === 'me' || !can('files:admin')) { - return $this->_getFiles(backpack_user()->id); - } - return $this->_getFiles($id); - } - - protected function _getFiles($id) - { - /** @var User $user */ - $user = User::withoutGlobalScopes()->find($id); - if (null === $user) { - abort(404); - } - $users = $user->getManagedUsers(); - $files = []; - foreach ($users as $user) { - $this->_listFilesOfUser($user, $files); - } - usort($files, function ($a, $b) { - return -($a['mtime'] - $b['mtime']); - }); - return $files; - } - - protected function _listFilesOfUser($id, &$files) - { - $uFiles = cache()->remember('files_list_user_' . $id, 86400, function () use ($id) { - return $this->___listFilesOfUser($id); - }); - - foreach ($uFiles as $path => $uFile) { - if (isset($files[$path])) { - continue; - } - $files[$path] = $uFile; - } - } - - protected function ___listFilesOfUser($id) - { - - $path = '/application/ftp/' . $id; - if (!file_exists($path) || !is_dir($path)) { - return []; - } - $res = []; - $userFiles = Files::getRecursiveDirectoryIterator($path); - foreach ($userFiles as $file) { - /** @var $file \SplFileInfo */ - if ($file->isDir()) { - continue; - } - - $pathname = $file->getPathname(); - if (isset($files[$pathname])) { - continue; - } - - if (preg_match('|\.in\/(\d)+\/|', $pathname, $matches)) { - $from = $matches[1]; - $to = $id; - } else { - $from = $id; - $to = false; - } - - $res[$pathname] = [ - 'path' => $pathname, - 'name' => $file->getFilename(), - 'ext' => mb_strtolower($file->getExtension()), - 'mtime' => $file->getMTime(), - 'date' => date('Y/m/d', $file->getMTime()), - 'size' => Files::humanReadableSize($file->getSize()), - 'from' => $from, - 'to' => $to, - ]; - } - - return $res; - } -} diff --git a/app/Http/Controllers/Admin/UsersCrudController.php b/app/Http/Controllers/Admin/UsersCrudController.php index 63ffb0d9f..c32f5f1a1 100644 --- a/app/Http/Controllers/Admin/UsersCrudController.php +++ b/app/Http/Controllers/Admin/UsersCrudController.php @@ -18,7 +18,7 @@ class UsersCrudController extends \Cubist\Backpack\Magic\Controllers\CubistMagic __('utilisateurs') */ - protected $_modelNamespace = 'App\Models\CubedesignersTeamMember'; + protected $_modelNamespace = 'App\Models\AuthUser'; protected $_routeURL = 'users'; protected $_singular = 'utilisateur'; protected $_plural = 'utilisateurs'; diff --git a/app/Models/File.php b/app/Models/File.php new file mode 100644 index 000000000..9266e74d9 --- /dev/null +++ b/app/Models/File.php @@ -0,0 +1,147 @@ + 'file', + 'singular' => 'file', + 'plural' => 'files']; + + protected $_syncDbSchema = false; + + protected static $_permissionBase = 'files'; + + public function setFields() + { + parent::setFields(); + + $this->addField('name', Text::class, __('Nom du fichier'), ['column' => true]); + $this->addField('path', Hidden::class, __('Chemin')); + $this->addField('ext', Text::class, __('Type'), ['column' => true]); + $this->addField('updated_at', Date::class, __('Date'), ['column' => true]); + $this->addField('size', Integer::class, __('Taille'), ['column' => true]); + $this->addField('from', \App\Fields\User::class, __('Envoyé par'), ['column' => true]); + $this->addField('to', \App\Fields\User::class, __('Destiné à'), ['column' => true]); + + $this->addOwnerField(['column' => false]); + } + + protected function getRows() + { + /** @var User $user */ + $users = User::withoutGlobalScopes()->get(); + $files = []; + foreach ($users as $user) { + $this->_listFilesOfUser($user->id, $files); + } + return array_values($files); + } + + protected function _listFilesOfUser($id, &$files) + { + $uFiles = cache()->remember('files_list__' . $id, 86400, function () use ($id) { + return $this->___listFilesOfUser($id); + }); + + foreach ($uFiles as $path => $uFile) { + if (isset($files[$path])) { + continue; + } + $uFile['id'] = count($files) + 1; + $files[$path] = $uFile; + } + } + + protected function ___listFilesOfUser($id) + { + + $path = '/application/ftp/' . $id; + if (!file_exists($path) || !is_dir($path)) { + return []; + } + $res = []; + $userFiles = Files::getRecursiveDirectoryIterator($path); + foreach ($userFiles as $file) { + /** @var $file \SplFileInfo */ + if ($file->isDir()) { + continue; + } + + $pathname = $file->getPathname(); + if (isset($files[$pathname])) { + continue; + } + + if (preg_match('|\.in\/(\d)+\/|', $pathname, $matches)) { + $from = $matches[1]; + $to = $id; + } else { + $from = $id; + $to = null; + } + + $date = new \DateTime(); + $date->setTimestamp($file->getMTime()); + + $res[$pathname] = [ + 'path' => $pathname, + 'name' => $file->getFilename(), + 'ext' => mb_strtolower($file->getExtension()), + 'created_at' => $date, + 'updated_at' => $date, + 'size' => $file->getSize(), + 'from' => $from, + 'to' => $to, + 'owner' => $id, + ]; + } + + return $res; + } + + protected function sushiShouldCache() + { + return true; + } + + protected function getSushiInsertChunkSize() + { + return 10; + } + + protected function sushiCacheReferencePath() + { + $file = '/application/ftp/__LAST_CHANGE'; + // touch($file); + return $file; + } + + public static function addOwnerClause(Builder $builder) + { + + if (null === backpack_user() || null === Auth::id()) { + return; + } + if (Auth::user()->hasPermissionTo(static::$_permissionBase . ':admin')) { + return; + } + if (null === static::$_ownerAttribute) { + return; + } + $builder->whereIn(static::$_ownerAttribute, backpack_user()->getManagedUsers()); + } +} diff --git a/app/Models/FluidbookDocument.php b/app/Models/FluidbookDocument.php index 5c73078fb..a5a664b6b 100644 --- a/app/Models/FluidbookDocument.php +++ b/app/Models/FluidbookDocument.php @@ -63,7 +63,7 @@ class FluidbookDocument extends ToolboxModel return $this->pdf_data['page'][$page]['size']; } - public function processUpload($uploadID, $sync = false) + public function processUpload($uploadID, $sync = false, $forceCheck = false, $forceProcess = false) { $this->processSync = $sync; $this->updateProgression($uploadID, __('Nettoyage du document'), 1.3); @@ -83,27 +83,23 @@ class FluidbookDocument extends ToolboxModel $files = [ // Thumbnail - ['jpg', 'thumb'], + ['jpg', 'thumb', true, true, ''], // Images - ['jpg', 150, false, true], + ['jpg', 150, false, true, 'html'], // Texts - ['svg', 150, true, false], + ['svg', 150, true, false, 'html'], ]; $nbfiles = count($files); - $delay = 0; for ($i = 1; $i <= $this->pages; $i++) { foreach ($files as $file) { - $job = new FluidbookDocumentFileProcess($this, $i, $file[0] ?? 'jpg', $file[1] ?? 150, $file[2] ?? true, $file[3] ?? true); + $job = new FluidbookDocumentFileProcess($this, $i, $file[0] ?? 'jpg', $file[1] ?? 150, $file[2] ?? true, $file[3] ?? true, $file[4] ?? 'html', true); if ($sync) { - dispatch_sync($job); + $job->handle(); } else { - dispatch($job)->delay($delay); + dispatch($job); } $jobs[] = $job; - if ($i % 20 === 0) { - $delay++; - } $this->_checkJobs($uploadID, $jobs, $nbfiles); } } @@ -210,11 +206,11 @@ class FluidbookDocument extends ToolboxModel return $res; } - public function hasFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html') + public function hasFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html', $forceCheck = false) { $this->_normalize($format, $resolution, $withText, $withGraphics, $version); $cacheKey = $this->fileCacheKey($page, $format, $resolution, $withText, $withGraphics, $version); - if (Cache::has($cacheKey)) { + if (!$forceCheck && Cache::has($cacheKey)) { return true; } else { $path = $this->_getPath($page, $format, $resolution, $withText, $withGraphics, $version); @@ -300,19 +296,23 @@ class FluidbookDocument extends ToolboxModel return 'FluidbookDocument_' . $this->id . '_' . $page . '_' . $format . '_' . $resolution . '_' . ($withText ? '1' : '0') . '_' . ($withGraphics ? '1' : '0') . '_' . $version; } - public function getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html', $force = false) + public function getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html', $forceCheck = false, $forceProcess = false) { $this->_normalize($format, $resolution, $withText, $withGraphics, $version); - if ($force) { + if ($forceProcess) { $this->removeFile($page, $format, $resolution, $withText, $withGraphics, $version); } $doc = $this; - $res = Cache::tags('fluidbook_document_' . $this->id)->rememberForever($this->fileCacheKey($page, $format, $resolution, $withText, $withGraphics, $version), function () use ($doc, $page, $format, $resolution, $withText, $withGraphics, $version) { + $cacheKey = $this->fileCacheKey($page, $format, $resolution, $withText, $withGraphics, $version); + if ($forceCheck) { + Cache::forget($cacheKey); + } + $res = Cache::tags('fluidbook_document_' . $this->id)->rememberForever($cacheKey, function () use ($doc, $page, $format, $resolution, $withText, $withGraphics, $version) { return $doc->_getFile($page, $format, $resolution, $withText, $withGraphics, $version); }); - if (!$res && !$force) { - return $this->getFile($page, $format, $resolution, $withText, $withGraphics, $version, true); + if (!$res && !$forceProcess) { + return $this->getFile($page, $format, $resolution, $withText, $withGraphics, $version, true, true); } return $res; } @@ -327,9 +327,9 @@ class FluidbookDocument extends ToolboxModel } - public function _getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html') + public function _getFile($page, $format = 'jpg', $resolution = 150, $withText = true, $withGraphics = true, $version = 'html', $forceCheck = true) { - if (!$this->hasFile($page, $format, $resolution, $withText, $withGraphics, $version)) { + if (!$this->hasFile($page, $format, $resolution, $withText, $withGraphics, $version, $forceCheck)) { return Farm::getFile($page, $format, $resolution, $withText, $withGraphics, $version, $this->getResolutionRatio(), $this->getMobileFirstRatio(), $this->path()); } @@ -543,7 +543,7 @@ class FluidbookDocument extends ToolboxModel protected function updateProgression($uploadID, $message, $progress) { - FluidbookDocumentUpload::updateProgression($uploadID, $message, $progress); + FluidbookDocumentUpload::updateProgression($uploadID, $this->id, $message, $progress); $this->echoStatus($uploadID); } diff --git a/composer.lock b/composer.lock index b95cd5301..3b3255bd2 100644 --- a/composer.lock +++ b/composer.lock @@ -1167,6 +1167,58 @@ ], "time": "2020-09-08T20:04:29+00:00" }, + { + "name": "calebporzio/sushi", + "version": "v2.4.4", + "source": { + "type": "git", + "url": "https://github.com/calebporzio/sushi.git", + "reference": "8eeafda290e9a09abe6b102c3925c9434d1c87a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/calebporzio/sushi/zipball/8eeafda290e9a09abe6b102c3925c9434d1c87a5", + "reference": "8eeafda290e9a09abe6b102c3925c9434d1c87a5", + "shasum": "" + }, + "require": { + "illuminate/database": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", + "illuminate/support": "^5.8 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", + "php": "^7.1.3|^8.0" + }, + "require-dev": { + "doctrine/dbal": "^2.9 || ^3.1.4", + "orchestra/testbench": "3.8.* || 3.9.* || ^4.0 || ^6.0 || ^7.0 || ^8.0", + "phpunit/phpunit": "^7.5 || ^8.4 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sushi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "Eloquent's missing \"array\" driver.", + "support": { + "source": "https://github.com/calebporzio/sushi/tree/v2.4.4" + }, + "funding": [ + { + "url": "https://github.com/calebporzio", + "type": "github" + } + ], + "time": "2023-01-11T16:19:01+00:00" + }, { "name": "chrisjean/php-ico", "version": "1.0.4", @@ -1505,25 +1557,25 @@ }, { "name": "creativeorange/gravatar", - "version": "v1.0.22", + "version": "v1.0.23", "source": { "type": "git", "url": "https://github.com/creativeorange/gravatar.git", - "reference": "0eed243a16bcd01e618036f9b8021526ea26f64a" + "reference": "3a1b227c48091b039b967265ec13c0800c70ac79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/creativeorange/gravatar/zipball/0eed243a16bcd01e618036f9b8021526ea26f64a", - "reference": "0eed243a16bcd01e618036f9b8021526ea26f64a", + "url": "https://api.github.com/repos/creativeorange/gravatar/zipball/3a1b227c48091b039b967265ec13c0800c70ac79", + "reference": "3a1b227c48091b039b967265ec13c0800c70ac79", "shasum": "" }, "require": { - "illuminate/support": "^5|^6|^7|^8|^9", + "illuminate/support": "^5|^6|^7|^8|^9|^10.0", "php": ">=5.4.0" }, "require-dev": { - "nunomaduro/larastan": "^0.6.2", - "orchestra/testbench": "^5.4", + "nunomaduro/larastan": "^0.6.2|^2.4", + "orchestra/testbench": "^5.4|^8.0", "php": ">=7.2" }, "type": "library", @@ -1562,9 +1614,9 @@ ], "support": { "issues": "https://github.com/creativeorange/gravatar/issues", - "source": "https://github.com/creativeorange/gravatar/tree/v1.0.22" + "source": "https://github.com/creativeorange/gravatar/tree/v1.0.23" }, - "time": "2022-03-23T09:46:07+00:00" + "time": "2023-02-06T07:57:20+00:00" }, { "name": "cubedesigners/userdatabase", @@ -1572,13 +1624,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubedesigners_userdatabase.git", - "reference": "8f9932092ab092c90320f76dd78693eacbd51417" + "reference": "53c3106198a4bb2f67c4652ea948c9efae21ac9f" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubedesigners/userdatabase/cubedesigners-userdatabase-dev-master-a4e81c.tar", - "reference": "8f9932092ab092c90320f76dd78693eacbd51417", - "shasum": "09b82998ddf5795609a0a954e32dbd440c2f259c" + "url": "https://composer.cubedesigners.com/dist/cubedesigners/userdatabase/cubedesigners-userdatabase-dev-master-7b3599.tar", + "reference": "53c3106198a4bb2f67c4652ea948c9efae21ac9f", + "shasum": "3b2c1f353ca0c7aabe1cadb5cf3c5bafa16397cf" }, "require": { "cubist/cms-back": "dev-master" @@ -1610,7 +1662,7 @@ } ], "description": "Cubedesigners common users database", - "time": "2022-12-06T11:16:02+00:00" + "time": "2023-02-08T10:43:52+00:00" }, { "name": "cubist/azuretts", @@ -1660,13 +1712,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_cms-back.git", - "reference": "f9a9f0aecb03d554bb74d8f72fc88d40c851be5b" + "reference": "b19acf0d942a68b260d0f4811e195d9d3769fc96" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-908c83.tar", - "reference": "f9a9f0aecb03d554bb74d8f72fc88d40c851be5b", - "shasum": "e485c2bcd745580aef91deb606795cfdf320abbf" + "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-99fcd5.tar", + "reference": "b19acf0d942a68b260d0f4811e195d9d3769fc96", + "shasum": "640fdfc450c66dc5893306dd5ceee9034ca81823" }, "require": { "backpack/backupmanager": "^3.0", @@ -1678,6 +1730,7 @@ "cache/filesystem-adapter": "^1.2", "cache/redis-adapter": "^1.0", "calebporzio/parental": "^v0.11", + "calebporzio/sushi": "^2.4", "chrisjean/php-ico": "^1.0", "cubist/cms-front": "dev-master", "cubist/laravel-backpack-dropzone-field": "dev-master", @@ -1747,7 +1800,7 @@ } ], "description": "Cubist Backpack extension", - "time": "2023-01-27T18:05:07+00:00" + "time": "2023-02-09T15:22:42+00:00" }, { "name": "cubist/cms-front", @@ -2170,13 +2223,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_util.git", - "reference": "ee5c93333942a0c69bcef25309732361b1522072" + "reference": "8ca0e77316c93612593605ede9b457208fe1ae1f" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-c719f9.tar", - "reference": "ee5c93333942a0c69bcef25309732361b1522072", - "shasum": "ef2ccff2a2389818d4e3eb339a78a4e0fd4ee214" + "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-dc542c.tar", + "reference": "8ca0e77316c93612593605ede9b457208fe1ae1f", + "shasum": "e61ff95f8167d578a732deeae83f8117cdbe11a6" }, "require": { "cubist/net": "dev-master", @@ -2208,7 +2261,7 @@ } ], "description": "Utilities class", - "time": "2023-01-27T14:43:13+00:00" + "time": "2023-01-30T10:26:43+00:00" }, { "name": "cviebrock/eloquent-sluggable", @@ -2519,16 +2572,16 @@ }, { "name": "doctrine/dbal", - "version": "3.5.3", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e" + "reference": "85b98cb23c8af471a67abfe14485da696bcabc2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/88fa7e5189fd5ec6682477044264dc0ed4e3aa1e", - "reference": "88fa7e5189fd5ec6682477044264dc0ed4e3aa1e", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/85b98cb23c8af471a67abfe14485da696bcabc2e", + "reference": "85b98cb23c8af471a67abfe14485da696bcabc2e", "shasum": "" }, "require": { @@ -2541,11 +2594,12 @@ "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "11.0.0", + "doctrine/coding-standard": "11.1.0", + "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.9.4", + "phpstan/phpstan": "1.9.14", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "9.5.27", + "phpunit/phpunit": "9.6.3", "psalm/plugin-phpunit": "0.18.4", "squizlabs/php_codesniffer": "3.7.1", "symfony/cache": "^5.4|^6.0", @@ -2610,7 +2664,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.5.3" + "source": "https://github.com/doctrine/dbal/tree/3.6.0" }, "funding": [ { @@ -2626,7 +2680,7 @@ "type": "tidelift" } ], - "time": "2023-01-12T10:21:44+00:00" + "time": "2023-02-07T22:52:03+00:00" }, { "name": "doctrine/deprecations", @@ -4448,16 +4502,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.112", + "version": "v1.2.113", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "2c555ce35a07a5c1c808cee7d5bb52c41a4c7b2f" + "reference": "6710b75871da2b718550c2bc33388315a3b20151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/2c555ce35a07a5c1c808cee7d5bb52c41a4c7b2f", - "reference": "2c555ce35a07a5c1c808cee7d5bb52c41a4c7b2f", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/6710b75871da2b718550c2bc33388315a3b20151", + "reference": "6710b75871da2b718550c2bc33388315a3b20151", "shasum": "" }, "require": { @@ -4494,9 +4548,9 @@ ], "support": { "issues": "https://github.com/JayBizzle/Crawler-Detect/issues", - "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.112" + "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.113" }, - "time": "2022-10-05T21:52:44+00:00" + "time": "2023-02-02T21:01:40+00:00" }, { "name": "jenssegers/agent", @@ -5127,16 +5181,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.2.2", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" + "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", - "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", + "reference": "f23fe9d4e95255dacee1bf3525e0810d1a1b0f37", "shasum": "" }, "require": { @@ -5183,7 +5237,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-09-08T13:45:54+00:00" + "time": "2023-01-30T18:31:20+00:00" }, { "name": "lavary/laravel-menu", @@ -5996,25 +6050,25 @@ }, { "name": "maximebf/debugbar", - "version": "v1.18.1", + "version": "v1.18.2", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9" + "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/ba0af68dd4316834701ecb30a00ce9604ced3ee9", - "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/17dcf3f6ed112bb85a37cf13538fd8de49f5c274", + "reference": "17dcf3f6ed112bb85a37cf13538fd8de49f5c274", "shasum": "" }, "require": { "php": "^7.1|^8", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^2.6|^3|^4|^5|^6" + "symfony/var-dumper": "^4|^5|^6" }, "require-dev": { - "phpunit/phpunit": "^7.5.20 || ^9.4.2", + "phpunit/phpunit": ">=7.5.20 <10.0", "twig/twig": "^1.38|^2.7|^3.0" }, "suggest": { @@ -6056,9 +6110,9 @@ ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.1" + "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.2" }, - "time": "2022-03-31T14:55:54+00:00" + "time": "2023-02-04T15:27:00+00:00" }, { "name": "maxmind-db/reader", @@ -6234,16 +6288,16 @@ }, { "name": "monolog/monolog", - "version": "2.8.0", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" + "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", "shasum": "" }, "require": { @@ -6258,7 +6312,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", + "graylog2/gelf-php": "^1.4.2 || ^2@dev", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -6320,7 +6374,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.8.0" + "source": "https://github.com/Seldaek/monolog/tree/2.9.1" }, "funding": [ { @@ -6332,7 +6386,7 @@ "type": "tidelift" } ], - "time": "2022-07-24T11:55:47+00:00" + "time": "2023-02-06T13:44:46+00:00" }, { "name": "mxl/laravel-job", @@ -6458,16 +6512,16 @@ }, { "name": "nesbot/carbon", - "version": "2.65.0", + "version": "2.66.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "09acf64155c16dc6f580f36569ae89344e9734a3" + "reference": "496712849902241f04902033b0441b269effe001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/09acf64155c16dc6f580f36569ae89344e9734a3", - "reference": "09acf64155c16dc6f580f36569ae89344e9734a3", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/496712849902241f04902033b0441b269effe001", + "reference": "496712849902241f04902033b0441b269effe001", "shasum": "" }, "require": { @@ -6556,7 +6610,7 @@ "type": "tidelift" } ], - "time": "2023-01-06T15:55:01+00:00" + "time": "2023-01-29T18:53:47+00:00" }, { "name": "neutron/temporary-filesystem", @@ -6984,38 +7038,43 @@ }, { "name": "php-http/discovery", - "version": "1.14.3", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735" + "reference": "ebf69e00f8c58c47bc1114e38d2cfd40b7fe9b1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/31d8ee46d0215108df16a8527c7438e96a4d7735", - "reference": "31d8ee46d0215108df16a8527c7438e96a4d7735", + "url": "https://api.github.com/repos/php-http/discovery/zipball/ebf69e00f8c58c47bc1114e38d2cfd40b7fe9b1e", + "reference": "ebf69e00f8c58c47bc1114e38d2cfd40b7fe9b1e", "shasum": "" }, "require": { + "composer-plugin-api": "^1.0|^2.0", "php": "^7.1 || ^8.0" }, "conflict": { "nyholm/psr7": "<1.0" }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "*", + "psr/http-factory-implementation": "*", + "psr/http-message-implementation": "*" + }, "require-dev": { + "composer/composer": "^1.0.2|^2.0", "graham-campbell/phpspec-skip-example-extension": "^5.0", "php-http/httplug": "^1.0 || ^2.0", "php-http/message-factory": "^1.0", - "phpspec/phpspec": "^5.1 || ^6.1" - }, - "suggest": { - "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories" + "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3", + "symfony/phpunit-bridge": "^6.2" }, - "type": "library", + "type": "composer-plugin", "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } + "class": "Http\\Discovery\\Composer\\Plugin" }, "autoload": { "psr-4": { @@ -7032,7 +7091,7 @@ "email": "mark.sagikazar@gmail.com" } ], - "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations", "homepage": "http://php-http.org", "keywords": [ "adapter", @@ -7041,13 +7100,14 @@ "factory", "http", "message", + "psr17", "psr7" ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.14.3" + "source": "https://github.com/php-http/discovery/tree/1.15.0" }, - "time": "2022-07-11T14:04:40+00:00" + "time": "2023-02-09T12:05:45+00:00" }, { "name": "php-http/httplug", @@ -7416,16 +7476,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.27.0", + "version": "1.27.1", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "eeb8582f9cabf5a7f4ef78015691163233a1834f" + "reference": "ef4e6ef74990239946d3983451a9bbed5ef1be5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/eeb8582f9cabf5a7f4ef78015691163233a1834f", - "reference": "eeb8582f9cabf5a7f4ef78015691163233a1834f", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/ef4e6ef74990239946d3983451a9bbed5ef1be5d", + "reference": "ef4e6ef74990239946d3983451a9bbed5ef1be5d", "shasum": "" }, "require": { @@ -7452,7 +7512,7 @@ "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", "mitoteam/jpgraph": "^10.2.4", @@ -7515,9 +7575,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.27.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.27.1" }, - "time": "2023-01-24T20:07:45+00:00" + "time": "2023-02-08T07:02:13+00:00" }, { "name": "phpoption/phpoption", @@ -9017,16 +9077,16 @@ }, { "name": "spatie/laravel-permission", - "version": "5.8.0", + "version": "5.9.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-permission.git", - "reference": "9f5a74f858d22ecefd9ee44a0ac64a95fd0bf755" + "reference": "a88ed98c8937442737e0c50163682e832d608f13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/9f5a74f858d22ecefd9ee44a0ac64a95fd0bf755", - "reference": "9f5a74f858d22ecefd9ee44a0ac64a95fd0bf755", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/a88ed98c8937442737e0c50163682e832d608f13", + "reference": "a88ed98c8937442737e0c50163682e832d608f13", "shasum": "" }, "require": { @@ -9034,7 +9094,7 @@ "illuminate/container": "^7.0|^8.0|^9.0|^10.0", "illuminate/contracts": "^7.0|^8.0|^9.0|^10.0", "illuminate/database": "^7.0|^8.0|^9.0|^10.0", - "php": "^7.3|^8.0|^8.1" + "php": "^7.3|^8.0" }, "require-dev": { "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", @@ -9087,7 +9147,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-permission/issues", - "source": "https://github.com/spatie/laravel-permission/tree/5.8.0" + "source": "https://github.com/spatie/laravel-permission/tree/5.9.1" }, "funding": [ { @@ -9095,7 +9155,7 @@ "type": "github" } ], - "time": "2023-01-14T05:16:37+00:00" + "time": "2023-02-06T21:37:02+00:00" }, { "name": "spatie/laravel-signal-aware-command", @@ -10113,16 +10173,16 @@ }, { "name": "symfony/http-client", - "version": "v6.2.5", + "version": "v6.2.6", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "c5e5b772033eae96ae82f2190546399ad18c1373" + "reference": "6efa9a7521ab7d031a82cf0a759484d1b02a6ad9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/c5e5b772033eae96ae82f2190546399ad18c1373", - "reference": "c5e5b772033eae96ae82f2190546399ad18c1373", + "url": "https://api.github.com/repos/symfony/http-client/zipball/6efa9a7521ab7d031a82cf0a759484d1b02a6ad9", + "reference": "6efa9a7521ab7d031a82cf0a759484d1b02a6ad9", "shasum": "" }, "require": { @@ -10178,7 +10238,7 @@ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-client/tree/v6.2.5" + "source": "https://github.com/symfony/http-client/tree/v6.2.6" }, "funding": [ { @@ -10194,7 +10254,7 @@ "type": "tidelift" } ], - "time": "2023-01-13T08:35:57+00:00" + "time": "2023-01-30T15:46:28+00:00" }, { "name": "symfony/http-client-contracts", @@ -10279,16 +10339,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.19", + "version": "v5.4.20", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "70fd0eb8a1570ba119d5e496c8ee79bf9f0b51b0" + "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/70fd0eb8a1570ba119d5e496c8ee79bf9f0b51b0", - "reference": "70fd0eb8a1570ba119d5e496c8ee79bf9f0b51b0", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0435363362a47c14e9cf50663cb8ffbf491875a", + "reference": "d0435363362a47c14e9cf50663cb8ffbf491875a", "shasum": "" }, "require": { @@ -10335,7 +10395,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.19" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.20" }, "funding": [ { @@ -10351,20 +10411,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:32:19+00:00" + "time": "2023-01-29T11:11:52+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.19", + "version": "v5.4.20", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "ee371cd7718c938d1bffdf868b665003aeeae69c" + "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ee371cd7718c938d1bffdf868b665003aeeae69c", - "reference": "ee371cd7718c938d1bffdf868b665003aeeae69c", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aaeec341582d3c160cc9ecfa8b2419ba6c69954e", + "reference": "aaeec341582d3c160cc9ecfa8b2419ba6c69954e", "shasum": "" }, "require": { @@ -10447,7 +10507,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.19" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.20" }, "funding": [ { @@ -10463,7 +10523,7 @@ "type": "tidelift" } ], - "time": "2023-01-24T13:37:42+00:00" + "time": "2023-02-01T08:18:48+00:00" }, { "name": "symfony/mime", @@ -12540,26 +12600,26 @@ "packages-dev": [ { "name": "barryvdh/laravel-ide-helper", - "version": "v2.12.3", + "version": "v2.13.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "3ba1e2573b38f72107b8aacc4ee177fcab30a550" + "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/3ba1e2573b38f72107b8aacc4ee177fcab30a550", - "reference": "3ba1e2573b38f72107b8aacc4ee177fcab30a550", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/81d5b223ff067a1f38e14c100997e153b837fe4a", + "reference": "81d5b223ff067a1f38e14c100997e153b837fe4a", "shasum": "" }, "require": { "barryvdh/reflection-docblock": "^2.0.6", - "composer/pcre": "^1 || ^2 || ^3", + "composer/class-map-generator": "^1.0", "doctrine/dbal": "^2.6 || ^3", "ext-json": "*", - "illuminate/console": "^8 || ^9", - "illuminate/filesystem": "^8 || ^9", - "illuminate/support": "^8 || ^9", + "illuminate/console": "^8 || ^9 || ^10", + "illuminate/filesystem": "^8 || ^9 || ^10", + "illuminate/support": "^8 || ^9 || ^10", "nikic/php-parser": "^4.7", "php": "^7.3 || ^8.0", "phpdocumentor/type-resolver": "^1.1.0" @@ -12567,16 +12627,16 @@ "require-dev": { "ext-pdo_sqlite": "*", "friendsofphp/php-cs-fixer": "^2", - "illuminate/config": "^8 || ^9", - "illuminate/view": "^8 || ^9", + "illuminate/config": "^8 || ^9 || ^10", + "illuminate/view": "^8 || ^9 || ^10", "mockery/mockery": "^1.4", - "orchestra/testbench": "^6 || ^7", + "orchestra/testbench": "^6 || ^7 || ^8", "phpunit/phpunit": "^8.5 || ^9", "spatie/phpunit-snapshot-assertions": "^3 || ^4", "vimeo/psalm": "^3.12" }, "suggest": { - "illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9)." + "illuminate/events": "Required for automatic helper generation (^6|^7|^8|^9|^10)." }, "type": "library", "extra": { @@ -12618,7 +12678,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", - "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.12.3" + "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.13.0" }, "funding": [ { @@ -12630,7 +12690,7 @@ "type": "github" } ], - "time": "2022-03-06T14:33:42+00:00" + "time": "2023-02-04T13:56:40+00:00" }, { "name": "barryvdh/reflection-docblock", @@ -12684,6 +12744,79 @@ }, "time": "2022-10-31T15:35:43+00:00" }, + { + "name": "composer/class-map-generator", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/class-map-generator.git", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513", + "reference": "1e1cb2b791facb2dfe32932a7718cf2571187513", + "shasum": "" + }, + "require": { + "composer/pcre": "^2 || ^3", + "php": "^7.2 || ^8.0", + "symfony/finder": "^4.4 || ^5.3 || ^6" + }, + "require-dev": { + "phpstan/phpstan": "^1.6", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/filesystem": "^5.4 || ^6", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\ClassMapGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Utilities to scan PHP code and generate class maps.", + "keywords": [ + "classmap" + ], + "support": { + "issues": "https://github.com/composer/class-map-generator/issues", + "source": "https://github.com/composer/class-map-generator/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-06-19T11:31:27+00:00" + }, { "name": "composer/pcre", "version": "3.1.0", @@ -14156,16 +14289,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.11", + "version": "v0.11.12", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "ba67f2d26278ec9266a5cfe0acba33a8ca1277ae" + "reference": "52cb7c47d403c31c0adc9bf7710fc355f93c20f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ba67f2d26278ec9266a5cfe0acba33a8ca1277ae", - "reference": "ba67f2d26278ec9266a5cfe0acba33a8ca1277ae", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/52cb7c47d403c31c0adc9bf7710fc355f93c20f7", + "reference": "52cb7c47d403c31c0adc9bf7710fc355f93c20f7", "shasum": "" }, "require": { @@ -14226,9 +14359,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.11" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.12" }, - "time": "2023-01-23T16:14:59+00:00" + "time": "2023-01-29T21:24:40+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", diff --git a/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php b/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php index c77642250..6338beda2 100644 --- a/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php +++ b/resources/views/vendor/backpack/base/inc/sidebar_content.blade.php @@ -33,7 +33,7 @@ @can('files:read') - @endcan diff --git a/routes/web.php b/routes/web.php index 270a37e4b..079110f27 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,7 +22,6 @@ Route::group([ Route::get('fluidbookthemepreview/{id}-burger.jpg', 'FluidbookThemePreviewController@previewBurger'); Route::get('fluidbookthemepreview/{id}-menu.jpg', 'FluidbookThemePreviewController@previewMenu'); Route::get('fluidbookthemepreview/{id}.jpg', 'FluidbookThemePreviewController@preview'); - Route::get('files/{id?}', 'FilesController@files'); }); Route::group([