Skip to content

Commit edaac12

Browse files
authored
[11.x] Use Illuminate\Filesystem\join_paths to avoid hard dependencies to (#49508)
`Illuminate\Foundation\Application` Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 0aff411 commit edaac12

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/Illuminate/Queue/Console/FailedTableCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use Illuminate\Console\MigrationGeneratorCommand;
66
use Symfony\Component\Console\Attribute\AsCommand;
77

8+
use function Illuminate\Filesystem\join_paths;
9+
810
#[AsCommand(name: 'make:queue-failed-table')]
911
class FailedTableCommand extends MigrationGeneratorCommand
1012
{
@@ -63,8 +65,8 @@ protected function migrationExists($table)
6365

6466
return count($this->files->glob(sprintf(
6567
'{%s,%s}',
66-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'),
67-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'),
68+
join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'),
69+
join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'),
6870
))) !== 0;
6971
}
7072
}

src/Illuminate/Queue/Console/TableCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use Illuminate\Console\MigrationGeneratorCommand;
66
use Symfony\Component\Console\Attribute\AsCommand;
77

8+
use function Illuminate\Filesystem\join_paths;
9+
810
#[AsCommand(name: 'make:queue-table')]
911
class TableCommand extends MigrationGeneratorCommand
1012
{
@@ -63,8 +65,8 @@ protected function migrationExists($table)
6365

6466
return count($this->files->glob(sprintf(
6567
'{%s,%s}',
66-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'),
67-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'),
68+
join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'),
69+
join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000002_create_jobs_table.php'),
6870
))) !== 0;
6971
}
7072
}

src/Illuminate/Session/Console/SessionTableCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
use Illuminate\Console\MigrationGeneratorCommand;
66
use Symfony\Component\Console\Attribute\AsCommand;
77

8+
use function Illuminate\Filesystem\join_paths;
9+
810
#[AsCommand(name: 'make:session-table')]
911
class SessionTableCommand extends MigrationGeneratorCommand
1012
{
@@ -59,8 +61,8 @@ protected function migrationExists($table)
5961
{
6062
return count($this->files->glob(sprintf(
6163
'{%s,%s}',
62-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'),
63-
$this->laravel->joinPaths($this->laravel->databasePath('migrations'), '0001_01_01_000000_create_users_table.php'),
64+
join_paths($this->laravel->databasePath('migrations'), '*_*_*_*_create_'.$table.'_table.php'),
65+
join_paths($this->laravel->databasePath('migrations'), '0001_01_01_000000_create_users_table.php'),
6466
))) !== 0;
6567
}
6668
}

0 commit comments

Comments
 (0)