com-company/yousign-bundle
Bundle Symfony pour intégrer Yousign (API v3, compat v2) : configuration via variables d’environnement, envoi de demandes de signature et gestion des webhooks (routes, listeners/handlers, payloads) avec binding d’événements.
YousignClient or a related service, maintaining Laravel’s ability to wrap it via adapters.SignatureDatePositioned), Laravel’s event system can handle it without changes.date_signature_position) can be passed via Laravel’s Http client or the bundle’s adapter:
$client->sendDocument([
'date_signature_position' => ['x' => 100, 'y' => 200],
]);
config/yousign.php remains unchanged.| Risk Area | Mitigation Strategy |
|---|---|
| API Schema Changes | Validate the new field in Laravel’s request DTOs or middleware before sending. |
| Undocumented Events | Assume no new events unless explicitly stated in future releases. |
| Laravel-Specific Wrappers | If the bundle adds Symfony-specific logic for the new field, abstract it in a Laravel service. |
Http client logs for unexpected throttling.| Laravel Component | Bundle Change Impact | Integration Strategy |
|---|---|---|
| Service Container | No change | Existing YousignClient bindings remain valid; new field can be injected as needed. |
| HTTP Client | New payload field | Update Laravel’s API client calls to include date_signature_position. |
| Configuration | No new keys | No changes required to config/yousign.php. |
| Events | Unlikely (per release notes) | Monitor for future releases; no action needed now. |
Phase 0: Validation (1 day)
$response = $client->sendDocument([
'date_signature_position' => ['x' => 100, 'y' => 200],
]);
assert($response->success());
Phase 1: Feature Adoption (1 day)
// Before
$client->sendDocument(['title' => 'Contract']);
// After
$client->sendDocument([
'title' => 'Contract',
'date_signature_position' => ['x' => 100, 'y' => 200],
]);
1.0.10 via Composer.config/yousign.php remains stable.\Log::debug('Yousign document sent with date position', [
'position' => $request->date_signature_position,
]);
| Scenario | Impact | Mitigation |
|---|---|---|
| Invalid Field Format | API rejection | Validate date_signature_position in Laravel’s request pipeline. |
| Field Required Unexpectedly | Breaking changes in future releases | Use Laravel’s config('yousign.api_version') to guard against mandatory fields. |
## Using `date_signature_position` in Laravel
```php
use App\Services\YousignClient;
$client = app(YousignClient::class);
$response = $client->sendDocument([
'signers' => [...],
'date_signature_position' => ['x' => 100, 'y' => 200], // New in v1.0.10
]);
How can I help you explore Laravel packages today?