From 788865be44225d9c004b77668f532292ba5e4a03 Mon Sep 17 00:00:00 2001 From: Gaetan <72258504+gaetan-hexadog@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:47:17 +0200 Subject: [PATCH 1/2] fix: check glob result before foreach --- src/Theme.php | 6 ++++-- src/Traits/HasViews.php | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Theme.php b/src/Theme.php index 64e5317..de595b1 100644 --- a/src/Theme.php +++ b/src/Theme.php @@ -368,8 +368,10 @@ public function listLayouts() $layoutDirs = $this->getViewPaths('layouts'); foreach ($layoutDirs as $layoutDir) { - foreach (glob($layoutDir . '/{**/*,*}.php', GLOB_BRACE) as $layout) { - $layouts->put($layout, basename($layout, '.blade.php')); + if ($layoutFiles = glob($layoutDir . '/{**/*,*}.php', GLOB_BRACE)) { + foreach ($layoutFiles as $layout) { + $layouts->put($layout, basename($layout, '.blade.php')); + } } } diff --git a/src/Traits/HasViews.php b/src/Traits/HasViews.php index fc57122..afa4537 100644 --- a/src/Traits/HasViews.php +++ b/src/Traits/HasViews.php @@ -38,10 +38,10 @@ protected function loadVendorViews(): void $vendorViewsPath = $this->getPath('resources/views/vendor'); if (file_exists($vendorViewsPath)) { - $directories = glob($vendorViewsPath . '/*', GLOB_ONLYDIR); - - foreach ($directories as $path) { - View::prependNamespace(basename($path), $path); + if ($directories = glob($vendorViewsPath . '/*', GLOB_ONLYDIR)) { + foreach ($directories as $path) { + View::prependNamespace(basename($path), $path); + } } } } From 5a0724895596dc5bf1fed1c547d8bd81991108f0 Mon Sep 17 00:00:00 2001 From: Gaetan <72258504+gaetan-hexadog@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:47:51 +0200 Subject: [PATCH 2/2] security: update dependencies --- composer.lock | 182 ++++++++++++++++++++++++++------------------------ 1 file changed, 95 insertions(+), 87 deletions(-) diff --git a/composer.lock b/composer.lock index d0dd778..bda1603 100644 --- a/composer.lock +++ b/composer.lock @@ -150,16 +150,16 @@ }, { "name": "illuminate/bus", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", - "reference": "e5dcbd15256362c28f9003d5be6221ed32bc2a72" + "reference": "ddedb2e6cc16b910f95b8dbd140c908e453635b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/e5dcbd15256362c28f9003d5be6221ed32bc2a72", - "reference": "e5dcbd15256362c28f9003d5be6221ed32bc2a72", + "url": "https://api.github.com/repos/illuminate/bus/zipball/ddedb2e6cc16b910f95b8dbd140c908e453635b7", + "reference": "ddedb2e6cc16b910f95b8dbd140c908e453635b7", "shasum": "" }, "require": { @@ -199,11 +199,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-03-02T14:44:34+00:00" + "time": "2023-03-25T11:52:13+00:00" }, { "name": "illuminate/collections", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", @@ -258,7 +258,7 @@ }, { "name": "illuminate/conditionable", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -304,7 +304,7 @@ }, { "name": "illuminate/container", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", @@ -355,7 +355,7 @@ }, { "name": "illuminate/contracts", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -403,7 +403,7 @@ }, { "name": "illuminate/events", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", @@ -458,16 +458,16 @@ }, { "name": "illuminate/filesystem", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "8b30bb144c09e66070367965bf2b8da0515b5f3a" + "reference": "53a46fed9b31617ce3a786690b2294f0a54559ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/8b30bb144c09e66070367965bf2b8da0515b5f3a", - "reference": "8b30bb144c09e66070367965bf2b8da0515b5f3a", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/53a46fed9b31617ce3a786690b2294f0a54559ea", + "reference": "53a46fed9b31617ce3a786690b2294f0a54559ea", "shasum": "" }, "require": { @@ -518,20 +518,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-16T15:35:09+00:00" + "time": "2023-03-22T21:14:41+00:00" }, { "name": "illuminate/macroable", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "7686fe9dba1e236e6f695a148b551264b9fd479e" + "reference": "6b80109438161d45a5f2bdf7ecdd56cbd0096c3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/7686fe9dba1e236e6f695a148b551264b9fd479e", - "reference": "7686fe9dba1e236e6f695a148b551264b9fd479e", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/6b80109438161d45a5f2bdf7ecdd56cbd0096c3d", + "reference": "6b80109438161d45a5f2bdf7ecdd56cbd0096c3d", "shasum": "" }, "require": { @@ -564,11 +564,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-01-30T23:18:36+00:00" + "time": "2023-03-17T13:33:11+00:00" }, { "name": "illuminate/pipeline", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -616,16 +616,16 @@ }, { "name": "illuminate/support", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "d64c44a2960742ddff150f9a8b22dd64236bc057" + "reference": "646bfb9e8485e5f82921512a19643f26bbb778d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/d64c44a2960742ddff150f9a8b22dd64236bc057", - "reference": "d64c44a2960742ddff150f9a8b22dd64236bc057", + "url": "https://api.github.com/repos/illuminate/support/zipball/646bfb9e8485e5f82921512a19643f26bbb778d3", + "reference": "646bfb9e8485e5f82921512a19643f26bbb778d3", "shasum": "" }, "require": { @@ -683,20 +683,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-03-06T01:15:38+00:00" + "time": "2023-03-29T13:12:38+00:00" }, { "name": "illuminate/view", - "version": "v10.3.1", + "version": "v10.5.1", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "8b3629f101d1d5445cd19603a5031073940da46a" + "reference": "a003192eee0b05cd14718475adf5294ebb084d96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/8b3629f101d1d5445cd19603a5031073940da46a", - "reference": "8b3629f101d1d5445cd19603a5031073940da46a", + "url": "https://api.github.com/repos/illuminate/view/zipball/a003192eee0b05cd14718475adf5294ebb084d96", + "reference": "a003192eee0b05cd14718475adf5294ebb084d96", "shasum": "" }, "require": { @@ -737,7 +737,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-02-16T18:46:24+00:00" + "time": "2023-03-13T01:22:02+00:00" }, { "name": "nesbot/carbon", @@ -1177,16 +1177,16 @@ }, { "name": "symfony/translation", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73" + "reference": "817535dbb1721df8b3a8f2489dc7e50bcd6209b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/90db1c6138c90527917671cd9ffa9e8b359e3a73", - "reference": "90db1c6138c90527917671cd9ffa9e8b359e3a73", + "url": "https://api.github.com/repos/symfony/translation/zipball/817535dbb1721df8b3a8f2489dc7e50bcd6209b5", + "reference": "817535dbb1721df8b3a8f2489dc7e50bcd6209b5", "shasum": "" }, "require": { @@ -1255,7 +1255,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.2.7" + "source": "https://github.com/symfony/translation/tree/v6.2.8" }, "funding": [ { @@ -1271,7 +1271,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-31T09:14:44+00:00" }, { "name": "symfony/translation-contracts", @@ -1803,16 +1803,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.14.4", + "version": "v3.16.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b" + "reference": "d40f9436e1c448d309fa995ab9c14c5c7a96f2dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/1b3d9dba63d93b8a202c31e824748218781eae6b", - "reference": "1b3d9dba63d93b8a202c31e824748218781eae6b", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d40f9436e1c448d309fa995ab9c14c5c7a96f2dc", + "reference": "d40f9436e1c448d309fa995ab9c14c5c7a96f2dc", "shasum": "" }, "require": { @@ -1879,9 +1879,15 @@ } ], "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.14.4" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.16.0" }, "funding": [ { @@ -1889,20 +1895,20 @@ "type": "github" } ], - "time": "2023-02-09T21:49:13+00:00" + "time": "2023-04-02T19:30:06+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -1940,7 +1946,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1948,7 +1954,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", @@ -2437,16 +2443,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.0.14", + "version": "10.0.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "7065dbebcb0f66cf16a45fc9cfc28c2351e06169" + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7065dbebcb0f66cf16a45fc9cfc28c2351e06169", - "reference": "7065dbebcb0f66cf16a45fc9cfc28c2351e06169", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/20c23e85c86e5c06d63538ba464e8054f4744e62", + "reference": "20c23e85c86e5c06d63538ba464e8054f4744e62", "shasum": "" }, "require": { @@ -2478,7 +2484,7 @@ "sebastian/version": "^4.0" }, "suggest": { - "ext-soap": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -2517,7 +2523,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.14" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.19" }, "funding": [ { @@ -2533,7 +2540,7 @@ "type": "tidelift" } ], - "time": "2023-03-01T05:37:49+00:00" + "time": "2023-03-27T11:46:33+00:00" }, { "name": "psr/cache", @@ -2986,16 +2993,16 @@ }, { "name": "sebastian/diff", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f" + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/70dd1b20bc198da394ad542e988381b44e64e39f", - "reference": "70dd1b20bc198da394ad542e988381b44e64e39f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", "shasum": "" }, "require": { @@ -3040,7 +3047,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" }, "funding": [ { @@ -3048,7 +3056,7 @@ "type": "github" } ], - "time": "2023-02-03T07:00:31+00:00" + "time": "2023-03-23T05:12:41+00:00" }, { "name": "sebastian/environment", @@ -3594,16 +3602,16 @@ }, { "name": "symfony/console", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45" + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/cbad09eb8925b6ad4fb721c7a179344dc4a19d45", - "reference": "cbad09eb8925b6ad4fb721c7a179344dc4a19d45", + "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", "shasum": "" }, "require": { @@ -3665,12 +3673,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.7" + "source": "https://github.com/symfony/console/tree/v6.2.8" }, "funding": [ { @@ -3686,7 +3694,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T17:00:03+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3757,16 +3765,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "404b307de426c1c488e5afad64403e5f145e82a5" + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/404b307de426c1c488e5afad64403e5f145e82a5", - "reference": "404b307de426c1c488e5afad64403e5f145e82a5", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/04046f35fd7d72f9646e721fc2ecb8f9c67d3339", + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339", "shasum": "" }, "require": { @@ -3820,7 +3828,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.7" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.8" }, "funding": [ { @@ -3836,7 +3844,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4375,16 +4383,16 @@ }, { "name": "symfony/process", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902" + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/680e8a2ea6b3f87aecc07a6a65a203ae573d1902", - "reference": "680e8a2ea6b3f87aecc07a6a65a203ae573d1902", + "url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416", "shasum": "" }, "require": { @@ -4416,7 +4424,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.7" + "source": "https://github.com/symfony/process/tree/v6.2.8" }, "funding": [ { @@ -4432,7 +4440,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-09T16:20:02+00:00" }, { "name": "symfony/service-contracts", @@ -4583,16 +4591,16 @@ }, { "name": "symfony/string", - "version": "v6.2.7", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "67b8c1eec78296b85dc1c7d9743830160218993d" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/67b8c1eec78296b85dc1c7d9743830160218993d", - "reference": "67b8c1eec78296b85dc1c7d9743830160218993d", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { @@ -4649,7 +4657,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.7" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -4665,7 +4673,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "theseer/tokenizer",