Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require-dev": {
"mockery/mockery": "^1.6",
"phpunit/phpunit": "^12.1.5",
"doppar/framework": "3.*"
"phpunit/phpunit": "^13.3",
"doppar/framework": "4.*"
},
"autoload": {
"psr-4": {
Expand All @@ -31,7 +31,7 @@
"extra": {
"doppar": {
"providers": [
"Doppar\\Queue\\QueueServiceProvider"
"Doppar\\Queue\\QueueLauncher"
]
}
},
Expand All @@ -40,7 +40,7 @@
},
"minimum-stability": "dev",
"require": {
"opis/closure": "^4.4"
"opis/closure": "^4.5"
},
"prefer-stable": true
}
2 changes: 1 addition & 1 deletion src/Commands/MakeJobCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function handle(): int

$namespace = 'App\\Jobs' . (count($parts) > 0 ? '\\' . implode('\\', $parts) : '');
$fileName = count($parts) > 0 ? implode('/', $parts) . '/' . $className : $className;
$filePath = $this->generatedFilePath('app/Jobs', $fileName);
$filePath = $this->generatedFilePath('src/Jobs', $fileName);

// Check if Job already exists
if (file_exists($filePath)) {
Expand Down
10 changes: 5 additions & 5 deletions src/QueueServiceProvider.php → src/QueueLauncher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
namespace Doppar\Queue;

use Doppar\Queue\Commands\MakeJobCommand;
use Phaseolies\Providers\GhostableProvider;
use Phaseolies\Providers\ServiceProvider;
use Phaseolies\Launchers\GhostableLauncher;
use Phaseolies\Launchers\ServiceLauncher;
use Doppar\Queue\QueueManager;
use Doppar\Queue\Commands\QueueRunCommand;
use Doppar\Queue\Commands\QueueRetryCommand;
use Doppar\Queue\Commands\QueueFlushCommand;
use Doppar\Queue\Commands\QueueFailedCommand;
use Doppar\Queue\Commands\QueueMonitorCommand;

class QueueServiceProvider extends ServiceProvider implements GhostableProvider
class QueueLauncher extends ServiceLauncher implements GhostableLauncher
{
/**
* Register any application services.
Expand All @@ -29,12 +29,12 @@ public function register(): void
*
* @return void
*/
public function boot(): void
public function launch(): void
{
$this->loadMigrations(__DIR__ . '/database/migrations');

$this->publishes([
__DIR__ . '/database/migrations' => database_path('migrations'),
__DIR__ . '/database/migrations' => schema_path('migrations'),
], 'migrations');

$this->commands([
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/MakeJobCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function relativePath(string $path, ?string $basePath = null): string
};

$result = $command->handle();
$file = $this->tempRoot . '/app/Jobs/Reports/GenerateDailyJob.php';
$file = $this->tempRoot . '/src/Jobs/Reports/GenerateDailyJob.php';
$contents = (string) file_get_contents($file);

$this->assertSame(0, $result);
Expand All @@ -95,7 +95,7 @@ protected function relativePath(string $path, ?string $basePath = null): string
$this->assertStringContainsString('class GenerateDailyJob extends Job', $contents);
$this->assertContains('Job created successfully', $command->capturedSuccesses);
$this->assertContains(
'<fg=yellow>📦 File:</> <fg=white>app/Jobs/Reports/GenerateDailyJob.php</>',
'<fg=yellow>📦 File:</> <fg=white>src/Jobs/Reports/GenerateDailyJob.php</>',
$command->capturedLines
);
}
Expand Down
Loading