mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-29 08:40:42 +02:00
Updated phlak/splat to v4.0
This commit is contained in:
@@ -8,6 +8,7 @@ use App\HiddenFiles;
|
||||
use Closure;
|
||||
use DI\Container;
|
||||
use PHLAK\Splat\Glob;
|
||||
use PHLAK\Splat\Pattern;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
|
||||
@@ -19,7 +20,7 @@ class FinderFactory
|
||||
/** @var HiddenFiles Collection of hidden files */
|
||||
protected $hiddenFiles;
|
||||
|
||||
/** @var Glob|null Hidden files pattern cache */
|
||||
/** @var Pattern|null Hidden files pattern cache */
|
||||
protected $pattern;
|
||||
|
||||
/** @var Config The application configuration */
|
||||
@@ -69,12 +70,12 @@ class FinderFactory
|
||||
/** Determine if a file should be hidden. */
|
||||
protected function isHidden(SplFileInfo $file): bool
|
||||
{
|
||||
if (! isset($this->pattern)) {
|
||||
$this->pattern = Glob::pattern(sprintf('%s{%s}', Glob::escape(
|
||||
if (! $this->pattern instanceof Pattern) {
|
||||
$this->pattern = Pattern::make(sprintf('%s{%s}', Pattern::escape(
|
||||
$this->config->get('base_path') . DIRECTORY_SEPARATOR
|
||||
), $this->hiddenFiles->implode(',')));
|
||||
}
|
||||
|
||||
return $this->pattern->matchStart($file->getRealPath());
|
||||
return Glob::matchStart($this->pattern, $file->getRealPath());
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
"erusev/parsedown-extra": "^0.8.1",
|
||||
"filp/whoops": "^2.7",
|
||||
"middlewares/cache": "^2.0",
|
||||
"phlak/splat": "^3.0",
|
||||
"phlak/splat": "^4.0",
|
||||
"php-di/php-di": "^6.0",
|
||||
"php-di/slim-bridge": "^3.0",
|
||||
"psr/http-message": "^1.0.1",
|
||||
|
18
composer.lock
generated
18
composer.lock
generated
@@ -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": "44a453ef59a78a7e969be445b1e561f3",
|
||||
"content-hash": "c135cb50c4c9716cdaa6d47f57f861f6",
|
||||
"packages": [
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
@@ -585,16 +585,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phlak/splat",
|
||||
"version": "3.1.0",
|
||||
"version": "4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHLAK/Splat.git",
|
||||
"reference": "a57702eec01b9da631e39f936a6341edce2eb103"
|
||||
"reference": "a3da691298336dfd541aded61d4612170652ddf1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHLAK/Splat/zipball/a57702eec01b9da631e39f936a6341edce2eb103",
|
||||
"reference": "a57702eec01b9da631e39f936a6341edce2eb103",
|
||||
"url": "https://api.github.com/repos/PHLAK/Splat/zipball/a3da691298336dfd541aded61d4612170652ddf1",
|
||||
"reference": "a3da691298336dfd541aded61d4612170652ddf1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -603,11 +603,13 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.10",
|
||||
"phlak/coding-standards": "^1.2",
|
||||
"php": ">=7.2",
|
||||
"phpunit/phpunit": "^8.0 || ^9.0",
|
||||
"psy/psysh": "^0.10",
|
||||
"symfony/var-dumper": "^5.0",
|
||||
"vimeo/psalm": "^3.8"
|
||||
"vimeo/psalm": "^4.7",
|
||||
"yoast/phpunit-polyfills": "^0.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@@ -628,7 +630,7 @@
|
||||
"description": "Glob-like pattern matching and utilities",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHLAK/Splat/issues",
|
||||
"source": "https://github.com/PHLAK/Splat/tree/3.1.0"
|
||||
"source": "https://github.com/PHLAK/Splat/tree/4.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -640,7 +642,7 @@
|
||||
"type": "paypal"
|
||||
}
|
||||
],
|
||||
"time": "2020-10-10T06:24:40+00:00"
|
||||
"time": "2021-05-17T00:50:22+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-di/invoker",
|
||||
|
Reference in New Issue
Block a user