Skip to content

Commit 68524aa

Browse files
committed
Complete package refactoring.
1. Add support for HTTP plugin 2. Add support for GRPC plugin 3. Add support for Jobs plugin 4. Add support for Temporal Plugin
1 parent 77342bf commit 68524aa

File tree

193 files changed

+2179
-8129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+2179
-8129
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# @link <https://help.github.com/en/articles/about-code-owners>
22

3-
* @tarampampam
3+
* @roxblnfk
4+
* @butschster

.github/dependabot.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 0 additions & 86 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ composer.lock
1515
/coverage
1616
.DS_Store
1717
*.cache
18+
/runtime

.php-cs-fixer.dist.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
require_once 'vendor/autoload.php';
6+
7+
return \Spiral\CodeStyle\Builder::create()
8+
->include(__DIR__ . '/src')
9+
->include(__DIR__ . '/bin')
10+
->include(__DIR__ . '/config')
11+
->include(__DIR__ . '/tests')
12+
->include(__DIR__ . '/rector.php')
13+
->build();

bin/rr-worker

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,13 @@
44
declare(strict_types=1);
55

66
use Composer\InstalledVersions;
7+
use Spiral\RoadRunnerLaravel\Console\Commands\StartCommand;
8+
use Symfony\Component\Console\Application as ApplicationAlias;
79

810
\define('RR_WORKER_START', \microtime(true));
911

1012
\ini_set('display_errors', 'stderr');
1113

12-
/*
13-
|--------------------------------------------------------------------------
14-
| Setup Application Running Mode
15-
|--------------------------------------------------------------------------
16-
|
17-
| Saying to the Laravel "We are NOT running in the console"
18-
| (https://bit.ly/3GPJTNL).
19-
|
20-
*/
21-
22-
$_ENV['APP_RUNNING_IN_CONSOLE'] = false;
23-
\putenv('APP_RUNNING_IN_CONSOLE=false');
24-
2514
/*
2615
|--------------------------------------------------------------------------
2716
| Register The Auto Loader
@@ -60,12 +49,12 @@ if ($loaded !== true) {
6049
|
6150
*/
6251

63-
/** @var string|null $base_path */
64-
$base_path = null;
52+
/** @var string|null $basePath */
53+
$basePath = null;
6554

6655
foreach (['../../../..', '../../..', '../..', '..', '../vendor/laravel/laravel'] as $path) {
6756
if (\is_file(__DIR__ . '/' . $path . '/bootstrap/app.php')) {
68-
$base_path = (string) \realpath(__DIR__ . '/' . $path);
57+
$basePath = (string) \realpath(__DIR__ . '/' . $path);
6958
break;
7059
}
7160
}
@@ -78,12 +67,11 @@ foreach (['../../../..', '../../..', '../..', '..', '../vendor/laravel/laravel']
7867
| Symfony console component is a nice wrapper around worker CLI options.
7968
|
8069
*/
81-
82-
$app = new \Symfony\Component\Console\Application(
70+
$app = new ApplicationAlias(
8371
'RoadRunner worker',
84-
InstalledVersions::getPrettyVersion('spiral/roadrunner-laravel') ?? 'unknown',
72+
InstalledVersions::getPrettyVersion('roadrunner-php/laravel-bridge') ?? 'unknown',
8573
);
8674

87-
$app->add(new \Spiral\RoadRunnerLaravel\Console\Commands\StartCommand($base_path));
75+
$app->add(new StartCommand($basePath));
8876

8977
$app->run();

composer.json

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
{
2-
"name": "spiral/roadrunner-laravel",
2+
"name": "roadrunner-php/laravel-bridge",
33
"type": "library",
44
"description": "RoadRunner: Bridge for Laravel applications",
55
"keywords": [
66
"laravel",
77
"bridge",
8-
"roadrunner"
8+
"roadrunner",
9+
"temporal",
10+
"grpc",
11+
"queue",
12+
"cache",
13+
"http"
914
],
1015
"license": "MIT",
1116
"authors": [
17+
{
18+
"name": "butschster",
19+
"homepage": "https://github.com/butschster"
20+
},
21+
{
22+
"name": "roxblnfk",
23+
"homepage": "https://github.com/roxblnfk"
24+
},
1225
{
1326
"name": "tarampampam",
1427
"homepage": "https://github.com/tarampampam"
1528
}
1629
],
1730
"require": {
1831
"php": "^8.2",
19-
"composer-runtime-api": "^2.0",
20-
"laravel/framework": "~11.0 || ~12.0",
21-
"nyholm/psr7": "^1.5",
32+
"spiral/roadrunner-cli": "^2.7",
33+
"spiral/roadrunner-kv": "^4.0",
34+
"spiral/roadrunner-jobs": "^4.0",
35+
"spiral/roadrunner-grpc": "^3.5",
36+
"laravel/octane": "^2.9",
2237
"spiral/roadrunner-http": "^3.0",
2338
"spiral/roadrunner-worker": "^3.0",
24-
"symfony/psr-http-message-bridge": "~6.0 || ~7.0"
39+
"temporal/sdk": "^2.0"
2540
},
2641
"require-dev": {
42+
"laravel/framework": "^12.0",
2743
"spiral/code-style": "^2.2.2",
2844
"rector/rector": "^2.0",
2945
"guzzlehttp/guzzle": "^7.0",
30-
"inertiajs/inertia-laravel": "^2.0",
31-
"tightenco/ziggy": "^1.4.0",
32-
"laravel/laravel": "^12.0",
33-
"laravel/scout": "^10.0",
34-
"laravel/socialite": "^5.0",
35-
"laravel/telescope": "^v5.0",
36-
"livewire/livewire": "^v3.6",
3746
"mockery/mockery": "^1.6",
3847
"phpstan/phpstan": "^2.1",
39-
"phpunit/phpunit": "^10.0",
40-
"brick/math": "^0.12"
48+
"phpunit/phpunit": "^10.0"
4149
},
4250
"autoload": {
4351
"psr-4": {
4452
"Spiral\\RoadRunnerLaravel\\": "src/"
45-
},
46-
"files": [
47-
"helpers/helpers.php"
48-
]
53+
}
4954
},
5055
"autoload-dev": {
5156
"psr-4": {
@@ -56,6 +61,10 @@
5661
"bin/rr-worker"
5762
],
5863
"scripts": {
64+
"cs-check": "vendor/bin/php-cs-fixer fix --dry-run",
65+
"cs-fix": "vendor/bin/php-cs-fixer fix",
66+
"refactor": "rector process --config=rector.php",
67+
"refactor:ci": "rector process --config=rector.php --dry-run --ansi",
5968
"phpunit": "@php ./vendor/bin/phpunit --no-coverage",
6069
"phpunit-cover": "@php ./vendor/bin/phpunit",
6170
"phpstan": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi",
@@ -71,7 +80,10 @@
7180
"extra": {
7281
"laravel": {
7382
"providers": [
74-
"Spiral\\RoadRunnerLaravel\\ServiceProvider"
83+
"Spiral\\RoadRunnerLaravel\\ServiceProvider",
84+
"Spiral\\RoadRunnerLaravel\\Queue\\QueueServiceProvider",
85+
"Spiral\\RoadRunnerLaravel\\Cache\\CacheServiceProvider",
86+
"Spiral\\RoadRunnerLaravel\\Temporal\\TemporalServiceProvider"
7587
]
7688
}
7789
},

0 commit comments

Comments
 (0)