Skip to content

Commit 0998877

Browse files
authored
Merge pull request #1 from ray-di/release/1.0.0-rc1
Release 1.0.0-rc1
2 parents 801072c + eab5bb0 commit 0998877

File tree

2 files changed

+92
-1
lines changed

2 files changed

+92
-1
lines changed

RELEASE-NOTES-1.0.0-rc1.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Release Notes - Ray.WebQuery 1.0.0-rc1
2+
3+
## 🚀 Initial Release
4+
5+
Ray.WebQuery 1.0.0-rc1 is the first release candidate of our new web API access mapping framework, extracted from Ray.MediaQuery to provide dedicated HTTP client functionality.
6+
7+
## ✨ Key Features
8+
9+
### Web API Query System
10+
- **`#[WebQuery]` Annotation**: Mark interface methods for automatic HTTP request mapping
11+
- **Multiple Response Types**: Support for JSON arrays, raw strings, and PSR-7 MessageInterface
12+
- **URI Template Support**: Dynamic URL parameter binding using `{param}` syntax
13+
- **AOP Integration**: Seamless method interception using Ray.Aop
14+
15+
### Configuration Management
16+
- **JSON Configuration**: Define web APIs in structured JSON files
17+
- **Schema Validation**: Complete JSON schema for web query definitions
18+
- **Template Bindings**: Support for global URI template parameter bindings
19+
20+
### HTTP Client Integration
21+
- **Guzzle HTTP Client**: Built on the reliable Guzzle HTTP library
22+
- **PSR-7 Compatibility**: Full support for PSR-7 HTTP message interfaces
23+
- **Parameter Injection**: Automatic parameter conversion and injection
24+
25+
## 🏗️ Architecture
26+
27+
The framework follows a clean separation of concerns:
28+
29+
- **MediaQueryWebModule**: Dependency injection configuration
30+
- **WebQueryInterceptor**: AOP-based method interception
31+
- **WebQueryConfig**: Configuration loading and validation
32+
- **WebApiQuery**: HTTP request execution
33+
34+
## 📋 Requirements
35+
36+
- PHP 8.1+
37+
- Ray.MediaQuery 1.0.0-rc1
38+
- Guzzle HTTP 7.2+
39+
40+
## 🔧 Installation
41+
42+
```bash
43+
composer require ray/web-query
44+
```
45+
46+
## 📝 Basic Usage
47+
48+
```php
49+
<?php
50+
use Ray\MediaQuery\Annotation\WebQuery;
51+
52+
interface ApiInterface
53+
{
54+
#[WebQuery('user.get')]
55+
public function getUser(string $id): array;
56+
}
57+
```
58+
59+
```json
60+
{
61+
"webQuery": [
62+
{
63+
"id": "user.get",
64+
"method": "GET",
65+
"path": "https://api.example.com/users/{id}"
66+
}
67+
]
68+
}
69+
```
70+
71+
## 🧪 Testing
72+
73+
This release includes comprehensive test coverage for all major functionality, ensuring reliability and stability for production use.
74+
75+
## 🔗 Dependencies
76+
77+
This package builds upon:
78+
- ray/media-query 1.0.0-rc1 for core query functionality
79+
- ray/di and ray/aop for dependency injection and AOP
80+
- guzzlehttp/guzzle for HTTP client capabilities
81+
- rize/uri-template for URI template processing
82+
83+
## 🎯 Next Steps
84+
85+
As a release candidate, we welcome feedback and testing from the community. The API is considered stable, but we may make minor adjustments based on user feedback before the final 1.0.0 release.

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"psr/http-message": "^2.0",
1515
"ray/aop": "^2.18",
1616
"ray/di": "^2.18",
17-
"ray/media-query": "1.0.0-rc1",
17+
"ray/media-query": "^1.0.0-rc1",
1818
"rize/uri-template": "^0.3"
1919
},
2020
"require-dev": {
@@ -74,5 +74,11 @@
7474
"dealerdirect/phpcodesniffer-composer-installer": true,
7575
"bamarni/composer-bin-plugin": true
7676
}
77+
},
78+
"extra": {
79+
"bamarni-bin": {
80+
"bin-links": true,
81+
"forward-command": false
82+
}
7783
}
7884
}

0 commit comments

Comments
 (0)