1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-09 14:46:53 +02:00

feat(core): Symfony Finder Integration #443

This commit is contained in:
Awilum
2020-07-31 21:44:24 +03:00
parent 4fc4c42cab
commit bc0c636a96
2 changed files with 13 additions and 1 deletions

View File

@@ -47,6 +47,7 @@
"cocur/slugify": "~4.0.0",
"ramsey/uuid": "~4.0.1",
"symfony/yaml": "~4.4.4",
"symfony/finder": "5.1.3",
"bnf/slim3-psr15": "~1.1.1",
@@ -81,7 +82,7 @@
"require-dev": {
"doctrine/coding-standard": "7.0.2",
"victorjonsson/markdowndocs": "^1.3",
"phpstan/phpstan": "^0.11.19",
"phpstan/phpstan": "^0.12.34",
"symfony/var-dumper": "^4.4"
}
}

View File

@@ -8,6 +8,7 @@ declare(strict_types=1);
*/
use Flextype\App\Support\Collection;
use Symfony\Component\Finder\Finder;
if (! function_exists('collect')) {
/**
@@ -155,3 +156,13 @@ if (! function_exists('collect_filter')) {
return $items;
}
}
if (! function_exists('find')) {
/**
* Create a Finder instance.
*/
function find() : Finder
{
return new Finder();
}
}