The start of something beautiful

This commit is contained in:
2024-09-11 22:48:07 -06:00
parent 45acea47f3
commit f5997ee5ec
5614 changed files with 630696 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Doctrine\Migrations\Finder;
use function glob;
use function rtrim;
/**
* The GlobFinder class finds migrations in a directory using the PHP glob() function.
*/
final class GlobFinder extends Finder
{
/**
* {@inheritDoc}
*/
public function findMigrations(string $directory, string|null $namespace = null): array
{
$dir = $this->getRealPath($directory);
$files = glob(rtrim($dir, '/') . '/Version*.php');
if ($files === false) {
$files = [];
}
return $this->loadMigrations($files, $namespace);
}
}