Skip to content

Commit 277ce00

Browse files
authored
Merge pull request #140 from butschster/master
Complete package refactoring
2 parents d7f1174 + 68524aa commit 277ce00

File tree

193 files changed

+2264
-8183
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

+2264
-8183
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: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,14 @@
33

44
declare(strict_types=1);
55

6+
use Composer\InstalledVersions;
7+
use Spiral\RoadRunnerLaravel\Console\Commands\StartCommand;
8+
use Symfony\Component\Console\Application as ApplicationAlias;
9+
610
\define('RR_WORKER_START', \microtime(true));
711

812
\ini_set('display_errors', 'stderr');
913

10-
/*
11-
|--------------------------------------------------------------------------
12-
| Setup Application Running Mode
13-
|--------------------------------------------------------------------------
14-
|
15-
| Saying to the Laravel "We are NOT running in the console"
16-
| (https://bit.ly/3GPJTNL).
17-
|
18-
*/
19-
20-
$_ENV['APP_RUNNING_IN_CONSOLE'] = false;
21-
\putenv('APP_RUNNING_IN_CONSOLE=false');
22-
2314
/*
2415
|--------------------------------------------------------------------------
2516
| Register The Auto Loader
@@ -58,12 +49,12 @@ if ($loaded !== true) {
5849
|
5950
*/
6051

61-
/** @var string|null $base_path */
62-
$base_path = null;
52+
/** @var string|null $basePath */
53+
$basePath = null;
6354

6455
foreach (['../../../..', '../../..', '../..', '..', '../vendor/laravel/laravel'] as $path) {
6556
if (\is_file(__DIR__ . '/' . $path . '/bootstrap/app.php')) {
66-
$base_path = (string) \realpath(__DIR__ . '/' . $path);
57+
$basePath = (string) \realpath(__DIR__ . '/' . $path);
6758
break;
6859
}
6960
}
@@ -76,12 +67,11 @@ foreach (['../../../..', '../../..', '../..', '..', '../vendor/laravel/laravel']
7667
| Symfony console component is a nice wrapper around worker CLI options.
7768
|
7869
*/
79-
80-
$app = new \Symfony\Component\Console\Application(
70+
$app = new ApplicationAlias(
8171
'RoadRunner worker',
82-
\Composer\InstalledVersions::getPrettyVersion('spiral/roadrunner-laravel') ?? 'unknown'
72+
InstalledVersions::getPrettyVersion('roadrunner-php/laravel-bridge') ?? 'unknown',
8373
);
8474

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

8777
$app->run();

composer.json

Lines changed: 88 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,94 @@
11
{
2-
"name": "spiral/roadrunner-laravel",
3-
"type": "library",
4-
"description": "RoadRunner: Bridge for Laravel applications",
5-
"keywords": [
6-
"laravel",
7-
"bridge",
8-
"roadrunner"
9-
],
10-
"license": "MIT",
11-
"authors": [
12-
{
13-
"name": "tarampampam",
14-
"homepage": "https://github.com/tarampampam"
15-
}
16-
],
17-
"require": {
18-
"php": "^8.0",
19-
"composer-runtime-api": "^2.0",
20-
"laravel/framework": "~9.33 || ~10.0",
21-
"nyholm/psr7": "^1.5",
22-
"spiral/roadrunner-http": "^2.2 || ^3.0",
23-
"spiral/roadrunner-worker": "^2.2 || ^3.0",
24-
"symfony/psr-http-message-bridge": "^2.1"
25-
},
26-
"require-dev": {
27-
"guzzlehttp/guzzle": "^6.3 || ~7.0",
28-
"inertiajs/inertia-laravel": "^0.6",
29-
"tightenco/ziggy": "^1.4.0",
30-
"laravel/laravel": "~9.1 || ~10.0",
31-
"laravel/scout": "~9.0 || ~10.0",
32-
"laravel/socialite": "^5.0",
33-
"laravel/telescope": "^4.5",
34-
"livewire/livewire": "^2.7",
35-
"mockery/mockery": "^1.4.4",
36-
"phpstan/phpstan": "~1.6",
37-
"phpunit/phpunit": "^9.5.10",
38-
"brick/math": "^0.10"
2+
"name": "roadrunner-php/laravel-bridge",
3+
"type": "library",
4+
"description": "RoadRunner: Bridge for Laravel applications",
5+
"keywords": [
6+
"laravel",
7+
"bridge",
8+
"roadrunner",
9+
"temporal",
10+
"grpc",
11+
"queue",
12+
"cache",
13+
"http"
14+
],
15+
"license": "MIT",
16+
"authors": [
17+
{
18+
"name": "butschster",
19+
"homepage": "https://github.com/butschster"
3920
},
40-
"autoload": {
41-
"psr-4": {
42-
"Spiral\\RoadRunnerLaravel\\": "src/"
43-
},
44-
"files": [
45-
"helpers/helpers.php"
46-
]
21+
{
22+
"name": "roxblnfk",
23+
"homepage": "https://github.com/roxblnfk"
4724
},
48-
"autoload-dev": {
49-
"psr-4": {
50-
"Spiral\\RoadRunnerLaravel\\Tests\\": "tests/"
51-
}
52-
},
53-
"bin": [
54-
"bin/rr-worker"
25+
{
26+
"name": "tarampampam",
27+
"homepage": "https://github.com/tarampampam"
28+
}
29+
],
30+
"require": {
31+
"php": "^8.2",
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",
37+
"spiral/roadrunner-http": "^3.0",
38+
"spiral/roadrunner-worker": "^3.0",
39+
"temporal/sdk": "^2.0"
40+
},
41+
"require-dev": {
42+
"laravel/framework": "^12.0",
43+
"spiral/code-style": "^2.2.2",
44+
"rector/rector": "^2.0",
45+
"guzzlehttp/guzzle": "^7.0",
46+
"mockery/mockery": "^1.6",
47+
"phpstan/phpstan": "^2.1",
48+
"phpunit/phpunit": "^10.0"
49+
},
50+
"autoload": {
51+
"psr-4": {
52+
"Spiral\\RoadRunnerLaravel\\": "src/"
53+
}
54+
},
55+
"autoload-dev": {
56+
"psr-4": {
57+
"Spiral\\RoadRunnerLaravel\\Tests\\": "tests/"
58+
}
59+
},
60+
"bin": [
61+
"bin/rr-worker"
62+
],
63+
"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",
68+
"phpunit": "@php ./vendor/bin/phpunit --no-coverage",
69+
"phpunit-cover": "@php ./vendor/bin/phpunit",
70+
"phpstan": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi",
71+
"test": [
72+
"@phpstan",
73+
"@phpunit"
5574
],
56-
"scripts": {
57-
"phpunit": "@php ./vendor/bin/phpunit --no-coverage",
58-
"phpunit-cover": "@php ./vendor/bin/phpunit",
59-
"phpstan": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi",
60-
"test": [
61-
"@phpstan",
62-
"@phpunit"
63-
],
64-
"test-cover": [
65-
"@phpstan",
66-
"@phpunit-cover"
67-
]
68-
},
69-
"extra": {
70-
"laravel": {
71-
"providers": [
72-
"Spiral\\RoadRunnerLaravel\\ServiceProvider"
73-
]
74-
}
75-
},
76-
"support": {
77-
"issues": "https://github.com/roadrunner-php/laravel-bridge/issues",
78-
"source": "https://github.com/roadrunner-php/laravel-bridge"
75+
"test-cover": [
76+
"@phpstan",
77+
"@phpunit-cover"
78+
]
79+
},
80+
"extra": {
81+
"laravel": {
82+
"providers": [
83+
"Spiral\\RoadRunnerLaravel\\ServiceProvider",
84+
"Spiral\\RoadRunnerLaravel\\Queue\\QueueServiceProvider",
85+
"Spiral\\RoadRunnerLaravel\\Cache\\CacheServiceProvider",
86+
"Spiral\\RoadRunnerLaravel\\Temporal\\TemporalServiceProvider"
87+
]
7988
}
89+
},
90+
"support": {
91+
"issues": "https://github.com/roadrunner-php/laravel-bridge/issues",
92+
"source": "https://github.com/roadrunner-php/laravel-bridge"
93+
}
8094
}

0 commit comments

Comments
 (0)