Skip to content

Commit eca3d7f

Browse files
committed
feat(package): prepare for Packagist publication
1 parent 9e1c6d3 commit eca3d7f

6 files changed

Lines changed: 67 additions & 24 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contribution Guide
22

3-
Contributions to HorizonXFlow are welcome through issues and pull requests in this repository.
3+
Contributions to HorizonFlow are welcome through issues and pull requests in this repository.
44

55
Before submitting a pull request:
66

.github/SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Please do not disclose security vulnerabilities in public issues.
44

55
## Supported Versions
66

7-
Security fixes are provided for the latest release of HorizonXFlow.
7+
Security fixes are provided for the latest release of HorizonFlow.
88

99
## Reporting a Vulnerability
1010

11-
Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/nsumbadze/horizonxflow/security/advisories/new). Include reproduction steps, affected versions, and any known mitigations.
11+
Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/nsumbadze/horizonflow/security/advisories/new). Include reproduction steps, affected versions, and any known mitigations.
1212

1313
For vulnerabilities that also affect unmodified Laravel Horizon behaviour, consult the [upstream security policy](https://github.com/laravel/horizon/security/policy).

README.md

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,58 @@
1-
<h1 align="center">HorizonXFlow</h1>
1+
<h1 align="center">HorizonFlow</h1>
22

33
<p align="center">Live queue-flow visibility and operational insights for Laravel Horizon.</p>
44

55
<p align="center">
6-
<a href="https://github.com/nsumbadze/horizonxflow/actions/workflows/tests.yml"><img src="https://github.com/nsumbadze/horizonxflow/actions/workflows/tests.yml/badge.svg?branch=main" alt="Build Status"></a>
6+
<a href="https://github.com/nsumbadze/horizonflow/actions/workflows/tests.yml"><img src="https://github.com/nsumbadze/horizonflow/actions/workflows/tests.yml/badge.svg?branch=main" alt="Build Status"></a>
77
<a href="LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-green" alt="License"></a>
88
</p>
99

10-
HorizonXFlow is an independently maintained project based on [Laravel Horizon](https://github.com/laravel/horizon). It retains Horizon's dashboard and code-driven worker configuration while adding a live operational workspace for understanding how jobs move through queues. It is not an official Laravel product.
10+
HorizonFlow is an independently maintained fork of [Laravel Horizon](https://github.com/laravel/horizon). It retains Horizon's dashboard and code-driven worker configuration while adding a live operational workspace for understanding how jobs move through queues. HorizonFlow is not an official Laravel product.
11+
12+
## Installation
13+
14+
HorizonFlow is installed instead of `laravel/horizon`; the two packages must not be installed together.
15+
16+
For a new installation, require HorizonFlow and publish Horizon's application service provider and configuration:
17+
18+
```bash
19+
composer require nsumbadze/horizonflow
20+
php artisan horizon:install
21+
```
22+
23+
Laravel package discovery registers `Laravel\Horizon\HorizonServiceProvider`. The install command publishes `config/horizon.php` and creates `app/Providers/HorizonServiceProvider.php`, where dashboard authorization is configured. HorizonFlow's additional settings have working defaults; publish them only when you need to customize Live Flow:
24+
25+
```bash
26+
php artisan vendor:publish --tag=horizonxflow-config
27+
```
28+
29+
Run Horizon as you would the upstream package:
30+
31+
```bash
32+
php artisan horizon
33+
```
34+
35+
### Replacing Laravel Horizon
36+
37+
Applications already using `laravel/horizon` should preserve their `config/horizon.php` and `app/Providers/HorizonServiceProvider.php`, remove the upstream package requirement, and then install HorizonFlow with dependency updates allowed:
38+
39+
```bash
40+
composer remove laravel/horizon --no-update
41+
composer require nsumbadze/horizonflow --with-all-dependencies
42+
```
43+
44+
The fork intentionally retains the `Laravel\Horizon` PHP namespace, service providers, Artisan commands, configuration shape, dashboard routes, and Redis data conventions. Composer declares that HorizonFlow replaces `laravel/horizon`, preventing both implementations from being installed together. Review [UPGRADE.md](UPGRADE.md) and test the change in a non-production environment before deployment; HorizonFlow uses its own versioning and does not claim the same version numbers as upstream Horizon.
45+
46+
### Compatibility
47+
48+
HorizonFlow requires PHP 8.0 or later, Laravel 9.21 through 13, the JSON, PCNTL, and POSIX PHP extensions, and a Redis connection supported by Laravel. Install either the PhpRedis extension or `predis/predis`. PCNTL and POSIX are not available on Windows, so HorizonFlow should run in a Linux environment or a compatible container/virtual machine.
1149

1250
## Live Flow
1351

1452
**Live Flow** is available at `/horizon/live-flow`. It visualises producers, queues, jobs, workers, and results in real time across Redis and database queue drivers.
1553

1654
<p align="center">
17-
<img src="art/live-flow.png" alt="HorizonXFlow Live Flow workspace">
55+
<img src="art/live-flow.png" alt="HorizonFlow Live Flow workspace">
1856
</p>
1957

2058
Under a row of queue KPIs, the workspace is organised into four areas:
@@ -80,8 +118,8 @@ Live-flow behaviour is configured via `config/horizonxflow.php`:
80118
The Live Flow Inspector can pause an individual Redis queue and cancel one pending or running job. These controls deliberately preserve Laravel's queue safety boundaries:
81119

82120
- Pausing a queue does not reject dispatches or kill workers. A job already running finishes, while pending and newly dispatched jobs remain queued until the queue is resumed.
83-
- Cancelling a pending job atomically removes its exact payload from the ready list or delayed set. If a worker reserves it first, HorizonXFlow records a cooperative cancellation request instead of reporting a false success.
84-
- A running worker process is never force-killed. Side effects already performed by a job cannot be rolled back by HorizonXFlow.
121+
- Cancelling a pending job atomically removes its exact payload from the ready list or delayed set. If a worker reserves it first, HorizonFlow records a cooperative cancellation request instead of reporting a false success.
122+
- A running worker process is never force-killed. Side effects already performed by a job cannot be rolled back by HorizonFlow.
85123
- Cancelled jobs remain visible in the Inspector with their cancellation time and operator identifier. Repeated requests are idempotent, and completed or failed jobs return `409 Conflict`.
86124

87125
Mutation routes use the `controlHorizon` ability described above. Queue connection and queue names are validated server-side, raw job payloads are never accepted from or returned to the control UI, and every destructive action has an explicit confirmation step.
@@ -121,9 +159,9 @@ When `flow.source` is `mock`, the Inspector exposes the same controls as a sessi
121159

122160
## Retry With Parameters
123161

124-
A failed job usually fails because of what it was handed: a wrong path, a batch size that was too large, a flag left on. Horizon can only push that same job back onto the queue unchanged, so the normal fix is a tinker session or a one-off command. HorizonXFlow lets you change the arguments and retry from the dashboard instead.
162+
A failed job usually fails because of what it was handed: a wrong path, a batch size that was too large, a flag left on. Horizon can only push that same job back onto the queue unchanged, so the normal fix is a tinker session or a one-off command. HorizonFlow lets you change the arguments and retry from the dashboard instead.
125163

126-
Open a failed job and press **Edit Parameters**. HorizonXFlow reads the job class constructor and lists every parameter it accepts, prefilled with the values the failed job was queued with:
164+
Open a failed job and press **Edit Parameters**. HorizonFlow reads the job class constructor and lists every parameter it accepts, prefilled with the values the failed job was queued with:
127165

128166
<p align="center">
129167
<img src="art/retry-parameters.png" alt="Editing a failed job's parameters before retrying it">
@@ -160,9 +198,9 @@ php artisan horizonxflow:demo-jobs --clear
160198

161199
## Upstream Horizon
162200

163-
HorizonXFlow is based on Laravel Horizon and keeps its existing dashboard, queue supervision, metrics, and worker configuration. Refer to the [Laravel Horizon documentation](https://laravel.com/docs/horizon) for inherited Horizon behaviour.
201+
HorizonFlow is derived from Laravel Horizon and keeps its existing dashboard, queue supervision, metrics, and worker configuration. Refer to the [Laravel Horizon documentation](https://laravel.com/docs/horizon) for inherited Horizon behaviour.
164202

165-
Issues caused by HorizonXFlow changes should be reported in this repository. Upstream Laravel Horizon maintains its own issue tracker and release process.
203+
Laravel Horizon was created by Taylor Otwell and is maintained by Laravel and its contributors. HorizonFlow retains Laravel Horizon's original copyright and license notices. Issues caused by HorizonFlow changes should be reported in this repository; upstream Laravel Horizon has its own issue tracker and release process.
166204

167205
## Contributing
168206

@@ -174,4 +212,4 @@ Do not disclose security vulnerabilities in public issues. Follow this repositor
174212

175213
## License
176214

177-
HorizonXFlow is released under the [MIT license](LICENSE.md). The original Laravel Horizon copyright and license notice are retained.
215+
HorizonFlow is released under the [MIT license](LICENSE.md). The original Laravel Horizon copyright and license notice are retained.

composer.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{
2-
"name": "horizonxflow/horizonxflow",
3-
"description": "Live queue-flow visualization and operational insights for Laravel Horizon.",
4-
"keywords": ["horizon", "laravel", "monitoring", "queue", "redis"],
5-
"homepage": "https://github.com/nsumbadze/horizonxflow",
2+
"name": "nsumbadze/horizonflow",
3+
"description": "An independently maintained Laravel Horizon fork with live queue-flow visualization and operational controls.",
4+
"keywords": ["dashboard", "horizon", "laravel", "monitoring", "queue", "redis", "workers"],
5+
"type": "library",
6+
"homepage": "https://github.com/nsumbadze/horizonflow",
67
"license": "MIT",
78
"authors": [
89
{
@@ -11,8 +12,9 @@
1112
}
1213
],
1314
"support": {
14-
"issues": "https://github.com/nsumbadze/horizonxflow/issues",
15-
"source": "https://github.com/nsumbadze/horizonxflow"
15+
"issues": "https://github.com/nsumbadze/horizonflow/issues",
16+
"security": "https://github.com/nsumbadze/horizonflow/security/advisories/new",
17+
"source": "https://github.com/nsumbadze/horizonflow"
1618
},
1719
"require": {
1820
"php": "^8.0",
@@ -36,6 +38,9 @@
3638
"phpstan/phpstan": "^1.10|^2.0",
3739
"predis/predis": "^1.1|^2.0|^3.0"
3840
},
41+
"replace": {
42+
"laravel/horizon": "self.version"
43+
},
3944
"suggest": {
4045
"ext-redis": "Required to use the Redis PHP driver.",
4146
"predis/predis": "Required when not using the Redis PHP driver (^1.1|^2.0|^3.0)."
@@ -55,7 +60,7 @@
5560
},
5661
"extra": {
5762
"branch-alias": {
58-
"dev-master": "6.x-dev"
63+
"dev-main": "0.x-dev"
5964
},
6065
"laravel": {
6166
"providers": [

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "horizonxflow",
2+
"name": "horizonflow",
33
"private": true,
44
"type": "module",
55
"scripts": {

0 commit comments

Comments
 (0)