Skip to content

Commit 70593b4

Browse files
committed
wip
1 parent 6ac8d6b commit 70593b4

Some content is hidden

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

43 files changed

+512
-421
lines changed

.github/workflows/run-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,11 @@ jobs:
4444
- name: List Installed Dependencies
4545
run: composer show -D
4646

47+
- name: Check code formatting
48+
run: composer pint:test
49+
50+
- name: Run static analysis
51+
run: composer analyze
52+
4753
- name: Execute tests
4854
run: vendor/bin/pest --ci

README.md

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# Workflow Engine Core
22

3-
[![Tests](https://github.com/solution-forest/workflow-engine-core/workflows/run-tests/badge.svg)](https://github.com/solution-forest/workflow-engine-core/actions)
4-
[![PHPStan](https://github.com/solution-forest/workflow-engine-core/workflows/phpstan/badge.svg)](https://github.com/solution-forest/workflow-engine-core/actions)
3+
[![Tests](https://github.com/solutionforest/workflow-engine-core/workflows/run-tests/badge.svg)](https://github.com/solution-forest/workflow-engine-core/actions)
4+
[![PHPStan](https://github.com/solutionforest/workflow-engine-core/workflows/phpstan/badge.svg)](https://github.com/solution-forest/workflow-engine-core/actions)
55
[![Latest Stable Version](https://poser.pugx.org/solution-forest/workflow-engine-core/v/stable)](https://packagist.org/packages/solution-forest/workflow-engine-core)
66
[![Total Downloads](https://poser.pugx.org/solution-forest/workflow-engine-core/downloads)](https://packagist.org/packages/solution-forest/workflow-engine-core)
77
[![License](https://poser.pugx.org/solution-forest/workflow-engine-core/license)](https://packagist.org/packages/solution-forest/workflow-engine-core)
88

99
A powerful, framework-agnostic workflow engine for PHP applications. This core library provides comprehensive workflow definition, execution, and state management capabilities without any framework dependencies.
1010

11+
## 📋 Requirements
12+
13+
- **PHP 8.3+** - Leverages modern PHP features for type safety and performance
14+
- **Composer** - For dependency management
15+
- **No framework dependencies** - Works with any PHP project
16+
1117
## ✨ Features
1218

1319
- **🚀 Framework Agnostic**: Works with any PHP framework or standalone applications
@@ -20,13 +26,30 @@ A powerful, framework-agnostic workflow engine for PHP applications. This core l
2026
- **⏱️ Timeouts**: Step-level timeout controls for reliable execution
2127
- **📋 Conditions**: Conditional workflow execution based on runtime data
2228
- **🎯 Events**: Rich event system for monitoring and integration
29+
- **🧪 Well Tested**: Comprehensive test suite with 160+ assertions
2330

2431
## 📦 Installation
2532

33+
### For Production Use
34+
2635
```bash
2736
composer require solution-forest/workflow-engine-core
2837
```
2938

39+
### For Development
40+
41+
```bash
42+
# Clone the repository
43+
git clone https://github.com/solution-forest/workflow-engine-core.git
44+
cd workflow-engine-core
45+
46+
# Install dependencies
47+
composer install
48+
49+
# Run quality checks
50+
composer ci
51+
```
52+
3053
## 🚀 Quick Start
3154

3255
### Basic Workflow Definition
@@ -226,7 +249,9 @@ class CustomLogger implements Logger
226249
}
227250
```
228251

229-
## 🧪 Testing
252+
## 🧪 Development
253+
254+
### Testing
230255

231256
Run the test suite:
232257

@@ -237,10 +262,55 @@ composer test
237262
# Run tests with coverage
238263
composer test:coverage
239264

240-
# Run static analysis
265+
# Run specific test file
266+
vendor/bin/pest tests/Unit/WorkflowEngineTest.php
267+
268+
# Run tests with detailed output
269+
vendor/bin/pest --verbose
270+
```
271+
272+
### Code Quality
273+
274+
We use several tools to maintain high code quality:
275+
276+
```bash
277+
# Static analysis with PHPStan
241278
composer analyze
279+
280+
# Code formatting with Laravel Pint
281+
composer pint
282+
283+
# Check code formatting without making changes
284+
composer pint --test
285+
286+
# Run all quality checks
287+
composer pint && composer analyze && composer test
242288
```
243289

290+
### Development Tools
291+
292+
- **[Pest](https://pestphp.com/)** - Testing framework with expressive syntax
293+
- **[PHPStan](https://phpstan.org/)** - Static analysis tool for catching bugs
294+
- **[Laravel Pint](https://laravel.com/docs/pint)** - Code style fixer built on PHP-CS-Fixer
295+
- **Framework-agnostic** - No Laravel dependencies in the core library
296+
297+
### Configuration Files
298+
299+
- `phpstan.neon.dist` - PHPStan configuration for static analysis
300+
- `pint.json` - Laravel Pint configuration for code formatting
301+
- `phpunit.xml.dist` - PHPUnit configuration for testing
302+
- `.github/workflows/run-tests.yml` - CI/CD pipeline configuration
303+
304+
### Quality Standards
305+
306+
We maintain high code quality through:
307+
308+
- **100% PHPStan Level 6** - Static analysis with no errors
309+
- **Laravel Pint** - Consistent code formatting following Laravel standards
310+
- **Comprehensive Testing** - 40 tests with 160+ assertions covering all core functionality
311+
- **Type Safety** - Full PHP 8.3+ type declarations and documentation
312+
- **Continuous Integration** - Automated quality checks on every commit
313+
244314
## 📚 Framework Integrations
245315

246316
This core library is framework-agnostic. For specific framework integrations:

0 commit comments

Comments
 (0)