oleksyuk/apaleo-bundle
A Symfony bundle for integrating the Apaleo hospitality API into PHP applications. It provides bundle configuration, service container wiring, and convenient clients/services to connect your app with Apaleo property, booking, and rate data.
Architecture fit
apaleo-bundle is a Symfony bundle, not a Laravel package. Laravel does not host bundles — there is no config/bundles.php, no FrameworkBundle config tree, no autowiring container compilation. The bundle cannot be dropped into a Laravel app as shipped.apaleo-php ^0.1, which is framework-agnostic. The bundle is best treated as a reference architecture: its decisions (dedicated PSR-18 HTTP client, PSR-6 token pool, ApaleoRateLimitException taxonomy, 10 s timeout, GET/HEAD-only retries) are a de facto spec we should mirror in a Laravel service provider.apaleo-php as the integration layer while confirming we must build the Laravel glue ourselves.Integration feasibility
composer require oleksyuk/apaleo-bundle in a Laravel app will likely fail dependency resolution: the bundle requires Symfony 8 and PHP 8.4+, while current Laravel releases pin Symfony components to the 7.x line. The "FrameworkBundle optional" note reduces runtime coupling but does not fix composer version constraints — this needs verification of the actual require vs require-dev split before we rule it out definitively.apaleo-php: singleton binding for ApaleoClient, config/apaleo.php, env-driven credentials, and a cache-backed token store. This is small, well-understood work — roughly a few days for a competent Laravel developer.Technical risk
v0.1.0) with no stated BC policy. Breaking changes to namespace, config keys, or the token-cache contract are likely and should be assumed.apaleo-php itself may or may not be installable — must confirm.POST reservation creation, folio charges) are never retried. Any write path must be idempotent on our side or we risk duplicates on transport failure.429 throws instead of backing off. Rate-limit handling becomes our responsibility: job release/backoff, concurrency caps, and dead-letter behaviour. This is a real design decision, not a papercut — a naive queue worker will burn retries fast.oleksyuk/*) with no visible support commitments.Key questions
symfony/framework-bundle in require or require-dev? Determines whether the bundle can coexist with Laravel's Symfony 7.x pins at all.apaleo-php require PHP 8.4, or only the bundle? If the SDK floor is lower we can adopt sooner.ApaleoRateLimitException — do transport vs 4xx vs 5xx map to distinct types we can branch on?apaleo-php expose pagination and rate-limit headers (X-RateLimit-Remaining, Retry-After) so we can implement backoff correctly?0.1 and 1.0?Stack fit
apaleo-bundle. Install apaleo-php only and build App\Apaleo\ApaleoServiceProvider:
ApaleoClient as a singleton constructed from config('apaleo').config/apaleo.php reading APALEO_CLIENT_ID, APALEO_CLIENT_SECRET, APALEO_BASE_URI, APALEO_TIMEOUT, APALEO_TOKEN_CACHE_STORE.apaleo-tokens, Redis) with a TTL slightly shorter than the token's stated expiry — mirroring the bundle's token_cache option.Http client, exactly as the bundle's apaleo.http_client does.Migration path
Compatibility
symfony/cache is already in the Laravel dependency graph in most installations, or use a small CacheItemPoolInterface adapter over Illuminate\Contracts\Cache\Repository. Prefer the adapter — fewer moving parts than adding a cache library.apaleo-php to an exact version (0.1.x) and treat upgrades as planned work, not composer update drift.Sequencing
apaleo-php in a scratch Laravel app on PHP 8.4, authenticate against sandbox, confirm client constructability and token caching.apaleo queue, low concurrency), dashboards on 429/5xx rates and p95 latency, alerting on token-refresh failures.Maintenance
apaleo-php bump is a review item.Support
apaleo-php with hand-written HTTP calls is a contained effort (days, not weeks). Do not let apaleo-specific types leak into domain code — map to our own DTOs at the boundary.Scaling
apaleo queue and use a rate limiter so 429s are exceptions rather than the steady state.Failure modes
429 thrown, not retried by the client → job failure if unhandled. Must implement release-with-backoff honouring Retry-After, plus a circuit breaker so a sustained limit doesn't thrash the queue.Ramp-up
apaleo-bundle purely as design input and as an early signal of upstream direction.How can I help you explore Laravel packages today?