Skip to content

Commit 6c7a1e6

Browse files
committed
chore: Create CHANGELOG.md
1 parent 4386cdc commit 6c7a1e6

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2025-11-15
9+
10+
### Added
11+
12+
#### Core Features
13+
- **Promise/A+ Implementation** - Full compliance with the Promise/A+ specification for JavaScript-like promise handling in PHP
14+
- **Fiber-Based Execution** - Leverages PHP 8.1+ Fibers for true asynchronous, non-blocking operations
15+
- **Event Loop** - Built-in event loop for managing async operations, timers, and deferred tasks
16+
- **Type-Safe Generics** - Full PHP generics support with proper type annotations for better IDE support and type safety
17+
18+
#### Promise API
19+
- `Promise` class with `then()`, `catch()`, and `finally()` methods
20+
- `Deferred` class for manual promise resolution/rejection control
21+
- `PromiseInterface` for consistent promise behavior across the library
22+
- `PromiseState` enum (PENDING, FULFILLED, REJECTED) for state management
23+
24+
#### Static Factory Methods
25+
- `Async::resolve()` - Create immediately resolved promises
26+
- `Async::reject()` - Create immediately rejected promises
27+
- `Async::run()` - Execute functions asynchronously
28+
29+
#### Promise Combinators
30+
- `Async::all()` - Wait for all promises to complete successfully
31+
- `Async::race()` - Return the first settled promise result
32+
- `Async::any()` - Return the first successful promise, ignore failures
33+
- `Async::allSettled()` - Wait for all promises to settle, regardless of outcome
34+
35+
#### Timing and Control
36+
- `Async::delay()` - Create promises that resolve after a specified delay
37+
- `Async::timeout()` - Wrap operations with timeout constraints
38+
- `Async::setTimeout()` - Schedule callbacks for future execution
39+
- `Async::setInterval()` - Schedule recurring callbacks
40+
- `Async::clearTimer()` - Cancel timeouts and recurring intervals
41+
42+
#### Cancellation Support
43+
- `CancellationToken` and `CancellationTokenInterface` for cancellation propagation
44+
- `CancellationTokenSource` for creating and managing cancellation tokens
45+
- `CombinedCancellationToken` for linking multiple cancellation sources
46+
- `Async::createCancellationTokenSource()` - Factory for cancellation token sources
47+
- `Async::createTimeoutTokenSource()` - Auto-cancelling token source with timeout
48+
- `Async::combineCancellationTokens()` - Combine multiple cancellation tokens
49+
- Signal-based cancellation support via PCNTL extension (optional)
50+
51+
#### Concurrency Control
52+
- `Async::pool()` - Execute tasks with configurable concurrency limits
53+
- `Async::retry()` - Retry failed operations with exponential backoff
54+
- `Async::debounce()` - Debounce function calls to prevent excessive execution
55+
- `Async::throttle()` - Throttle function calls to limit execution frequency
56+
57+
#### Utility Functions
58+
- `Async::yield()` - Yield control to the event loop for cooperative multitasking
59+
- `Async::await()` - Wait for all pending async operations to complete
60+
- `Async::startEventLoop()` - Initialize and start the event loop
61+
- `Async::stopEventLoop()` - Gracefully stop the event loop
62+
- `Async::supportsPCNTL()` - Check for PCNTL extension availability
63+
64+
#### Exception Handling
65+
- `CancellationException` - Thrown when operations are cancelled
66+
- `AggregateException` - Container for multiple exceptions from parallel operations
67+
- Proper exception propagation through promise chains
68+
69+
#### Global Functions
70+
- `async()` - Alias for `Async::run()`
71+
- `await()` - Alias for `Async::await()`
72+
- `delay()` - Alias for `Async::delay()`
73+
- `all()` - Alias for `Async::all()`
74+
- `race()` - Alias for `Async::race()`
75+
- `any()` - Alias for `Async::any()`
76+
- `allSettled()` - Alias for `Async::allSettled()`
77+
78+
#### Developer Experience
79+
- Comprehensive PHPDoc annotations for IDE support
80+
- Full test coverage with Pest PHP testing framework
81+
- Static analysis support with PHPStan
82+
83+
[1.0.0]: https://github.com/ElementaryFramework/Async/releases/tag/v1.0.0

0 commit comments

Comments
 (0)