Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com//workflow-mastery/discussions/new?category=q-a
url: https://github.com/solutionforest/workflow-engine-laravel/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com//workflow-mastery/discussions/new?category=ideas
url: https://github.com/solutionforest/workflow-engine-laravel/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com//workflow-mastery/security/policy
url: https://github.com/solutionforest/workflow-engine-laravel/security/policy
about: Learn how to notify us for sensitive bugs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ phpstan.neon
testbench.yaml
# /docs
/coverage

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `workflow-mastery` will be documented in this file.
All notable changes to `workflow-engine-laravel` will be documented in this file.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Laravel Workflow Engine

[![Latest Version on Packagist](https://img.shields.io/packagist/v/solution-forest/laravel-workflow-engine.svg?style=flat-square)](https://packagist.org/packages/solution-forest/laravel-workflow-engine)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/solution-forest/laravel-workflow-engine/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/solution-forest/laravel-workflow-engine/actions?query=workflow%3Arun-tests+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/solution-forest/laravel-workflow-engine.svg?style=flat-square)](https://packagist.org/packages/solution-forest/laravel-workflow-engine)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/solution-forest/workflow-engine-laravel.svg?style=flat-square)](https://packagist.org/packages/solution-forest/workflow-engine-laravel)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/solutionforest/workflow-engine-laravel/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/solutionforest/workflow-engine-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/solution-forest/workflow-engine-laravel.svg?style=flat-square)](https://packagist.org/packages/solution-forest/workflow-engine-laravel)

**A modern, type-safe workflow engine for Laravel built with PHP 8.3+ features**

Expand All @@ -23,7 +23,7 @@ Create powerful business workflows with a beautiful, fluent API. Turn complex pr
### Installation

```bash
composer require solution-forest/laravel-workflow-engine
composer require solution-forest/workflow-engine-laravel
php artisan vendor:publish --tag="workflow-engine-config"
php artisan migrate
```
Expand Down
27 changes: 14 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "solution-forest/workflow-mastery",
"description": "A powerful, framework-agnostic workflow engine for PHP with Laravel integration - enabling complex business process automation with state management, parallel execution, and extensible action system.",
"name": "solution-forest/workflow-engine-laravel",
"description": "Laravel integration for the Workflow Engine - providing Eloquent models, service providers, and artisan commands for seamless workflow management",
"keywords": [
"solutionforest",
"laravel",
"workflow-mastery",
"workflow-engine",
"workflow-laravel",
"business-process",
"automation",
"orchestration",
"state-machine"
"state-machine",
"laravel-package"
],
"homepage": "https://github.com/solution-forest/workflow-mastery",
"homepage": "https://github.com/solutionforest/workflow-engine-laravel",
"license": "MIT",
"authors": [
{
Expand All @@ -22,11 +23,12 @@
],
"require": {
"php": "^8.3",
"spatie/laravel-package-tools": "^1.16",
"illuminate/contracts": "^10.0||^11.0||^12.0",
"illuminate/support": "^10.0||^11.0||^12.0",
"illuminate/database": "^10.0||^11.0||^12.0",
"illuminate/events": "^10.0||^11.0||^12.0"
"illuminate/events": "^10.0||^11.0||^12.0",
"illuminate/support": "^10.0||^11.0||^12.0",
"solution-forest/workflow-engine-core": "^0.0.1-alpha",
"spatie/laravel-package-tools": "^1.16"
},
"conflict": {
"laravel/framework": "<11.0.0"
Expand All @@ -46,16 +48,15 @@
},
"autoload": {
"psr-4": {
"SolutionForest\\WorkflowMastery\\": "src/",
"SolutionForest\\WorkflowMastery\\Database\\Factories\\": "database/factories/"
"SolutionForest\\WorkflowEngine\\Laravel\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"SolutionForest\\WorkflowMastery\\Tests\\": "tests/",
"SolutionForest\\WorkflowEngine\\Laravel\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/"
}
},
Expand All @@ -77,10 +78,10 @@
"extra": {
"laravel": {
"providers": [
"SolutionForest\\WorkflowMastery\\LaravelWorkflowEngineServiceProvider"
"SolutionForest\\WorkflowEngine\\Laravel\\Providers\\WorkflowEngineServiceProvider"
],
"aliases": {
"WorkflowMastery": "SolutionForest\\WorkflowMastery\\Facades\\WorkflowMastery"
"WorkflowEngine": "SolutionForest\\WorkflowEngine\\Laravel\\Facades\\WorkflowEngine"
}
}
},
Expand Down
67 changes: 0 additions & 67 deletions config/workflow-mastery.php

This file was deleted.

6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For contributors and those interested in the internals:

## Quick Links

- [GitHub Repository](https://github.com/solution-forest/laravel-workflow-engine)
- [Packagist Package](https://packagist.org/packages/solution-forest/laravel-workflow-engine)
- [Issue Tracker](https://github.com/solution-forest/laravel-workflow-engine/issues)
- [GitHub Repository](https://github.com/solutionforest/workflow-engine-laravel)
- [Packagist Package](https://packagist.org/packages/solution-forest/workflow-engine-laravel)
- [Issue Tracker](https://github.com/solutionforest/workflow-engine-laravel/issues)
- [Contributing Guidelines](../CONTRIBUTING.md)
8 changes: 4 additions & 4 deletions docs/advanced-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,19 @@ Listen to workflow events:

```php
use SolutionForest\WorkflowEngine\Events\WorkflowStarted;
use SolutionForest\WorkflowEngine\Events\WorkflowCompleted;
use SolutionForest\WorkflowEngine\Events\WorkflowFailed;
use SolutionForest\WorkflowEngine\Events\WorkflowCompletedEvent;
use SolutionForest\WorkflowEngine\Events\WorkflowFailedEvent;

// In your EventServiceProvider
protected $listen = [
WorkflowStarted::class => [
LogWorkflowStarted::class,
],
WorkflowCompleted::class => [
WorkflowCompletedEvent::class => [
LogWorkflowCompleted::class,
SendCompletionNotification::class,
],
WorkflowFailed::class => [
WorkflowFailedEvent::class => [
LogWorkflowFailure::class,
AlertAdministrators::class,
],
Expand Down
6 changes: 3 additions & 3 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ Alert on workflow failures and performance issues:

```php
// In your EventServiceProvider
use SolutionForest\WorkflowEngine\Events\WorkflowFailed;
use SolutionForest\WorkflowEngine\Events\WorkflowFailedEvent;

protected $listen = [
WorkflowFailed::class => [
function (WorkflowFailed $event) {
WorkflowFailedEvent::class => [
function (WorkflowFailedEvent $event) {
// Alert if critical workflow fails
if (in_array($event->workflowName, ['payment-processing', 'order-fulfillment'])) {
Alert::critical("Critical workflow failed: {$event->workflowName}", [
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
### Install the Package

```bash
composer require solution-forest/laravel-workflow-engine
composer require solution-forest/workflow-engine-laravel
```

### Publish Configuration
Expand Down
4 changes: 2 additions & 2 deletions docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This guide helps you migrate from the array-based workflow configuration to the
#### 1. Update Composer Dependencies

```bash
composer update solution-forest/laravel-workflow-engine
composer update solution-forest/workflow-engine-laravel
```

#### 2. Publish New Configuration
Expand Down Expand Up @@ -376,5 +376,5 @@ If you encounter issues during migration:

1. Check the [troubleshooting guide](troubleshooting.md)
2. Review the [examples](../src/Examples/ModernWorkflowExamples.php)
3. Open an issue on [GitHub](https://github.com/solution-forest/laravel-workflow-engine/issues)
3. Open an issue on [GitHub](https://github.com/solutionforest/workflow-engine-laravel/issues)
4. Join our [Discord community](https://discord.gg/workflow-engine)
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<?php

namespace SolutionForest\WorkflowMastery\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
namespace SolutionForest\WorkflowEngine\Events;

class WorkflowCancelled
{
use Dispatchable, SerializesModels;

public function __construct(
public readonly string $workflowId,
public readonly string $name,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace SolutionForest\WorkflowEngine\Events;

use SolutionForest\WorkflowEngine\Core\WorkflowInstance;

class WorkflowCompletedEvent
{
public WorkflowInstance $instance;

public function __construct(WorkflowInstance $instance)
{
$this->instance = $instance;
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<?php

namespace SolutionForest\WorkflowMastery\Events;
namespace SolutionForest\WorkflowEngine\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use SolutionForest\WorkflowMastery\Core\WorkflowInstance;
use SolutionForest\WorkflowEngine\Core\WorkflowInstance;

class WorkflowFailedEvent
{
use Dispatchable, SerializesModels;

public WorkflowInstance $instance;

public \Exception $exception;
Expand Down
18 changes: 0 additions & 18 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,3 @@ parameters:
identifier: larastan.noEnvCallsOutsideOfConfig
count: 11
path: config/workflow-engine.php

-
message: '#^Called ''env'' outside of the config directory which returns null when the config is cached, use ''config''\.$#'
identifier: larastan.noEnvCallsOutsideOfConfig
count: 11
path: config/workflow-mastery.php

-
message: '#^Match arm comparison between ''\<\='' and ''\<\='' is always true\.$#'
identifier: match.alwaysTrue
count: 1
path: src/Core/Step.php

-
message: '#^Match arm comparison between ''\<\='' and ''\<\='' is always true\.$#'
identifier: match.alwaysTrue
count: 1
path: src/Core/WorkflowDefinition.php
Loading
Loading