- Does ppokatilo/services-loader work with Laravel 9, 10, and 11?
- There is no verified Laravel 9, 10, or 11 support. The package has no release since January 2016, and PHP 8.x, Composer 2, and modern Laravel compatibility are unconfirmed. Treat it as incompatible until a short compatibility spike proves otherwise. A custom service provider wrapper may be required even if the core classes load.
- How do I install ppokatilo/services-loader in a Laravel application?
- You would normally require the package with Composer and register a custom Laravel service provider, because there is no evidence of Laravel package auto-discovery. Configure a non-public services.d path and bind discovered services into the Laravel container from that provider. Pin any fork or install to a specific commit and keep package classes out of application code. Do not adopt it as a production runtime dependency without a timeboxed compatibility spike.
- What is the services.d directory and how does ppokatilo/services-loader use it?
- The package is intended to load service definitions from a services.d directory, but the exact file format is not documented in the provided context. It could contain class names, callables, PSR-11 definitions, or custom arrays, and ordering, duplicate detection, caching, and error handling are unverified. Inventory your existing services.d files and required semantics before attempting integration. The package description also points to Symfony2 bundle extension loading, not a Laravel-native convention.
- Is ppokatilo/services-loader maintained and safe for production?
- No, it appears unmaintained, with no release since 2016-01-11, one star, zero dependents, and no ecosystem validation. Test coverage, security posture, and PHP and Laravel version support are unknown. Boot-time directory loading can turn a malformed service file into an application startup failure. The MIT license allows a fork, but it does not provide maintenance capacity or vendor support.
- Can I use ppokatilo/services-loader with Laravel's service container and package discovery?
- There is no first-class Laravel integration, PSR-11 interoperability, config publishing, or lifecycle hook support evident in the package metadata. Do not rely on Laravel package auto-discovery. If you must evaluate it, wrap the loader in a custom service provider, pass a configured services.d path, and bind results into Laravel's container. Keep the adapter thin and isolate the package behind an internal interface.
- How should I test ppokatilo/services-loader before adopting it?
- Run a one-to-two-day compatibility spike with fixture services.d directories and a Laravel feature test that boots the application. Verify Composer constraints, PHP 8.x behavior, PSR-4 and PSR-11 behavior, opcache interactions, ordering, duplicate detection, caching, and error handling. Add static analysis and unit tests around malformed and partially deployed files. Only fork or pin the package if the spike passes and the behavior is clearly understood.
- What are alternatives to ppokatilo/services-loader for organizing Laravel service providers?
- Use Laravel's native service providers, package discovery, container bindings, and config and container caching first. For a modular monolith, define an internal ServiceDefinitionLoader interface and implement a small loader with clear ownership. This usually replicates the useful behavior with better Laravel fit and lower maintenance risk. Keep the existing config-based provider list as a rollback path.
- Does ppokatilo/services-loader support config publishing, lifecycle hooks, or PSR-11?
- There is no evidence of Laravel config publishing, lifecycle hooks, or PSR-11 interoperability. The package metadata is sparse, and the services.d file format is not documented in the provided context. Assume minimal behavior and verify every assumption in a spike. If you need these features, an internal loader or Laravel-native providers are safer choices.
- How do I migrate away from ppokatilo/services-loader if I already use it?
- Use a dependency-to-adapter-to-internal-implementation path. Define an internal ServiceDefinitionLoader interface, wrap the package in a thin adapter, and keep package types out of domain code. Roll out behind a feature flag, canary in staging and production, then replace the adapter with an internal loader. Remove the dependency once the internal loader covers the required service-definition semantics.
- What are the risks of loading services.d at Laravel bootstrap?
- Directory scanning at bootstrap adds filesystem I/O and can slow cold starts. A malformed or partially deployed service file can cause application startup failure, and duplicate detection, caching, and error handling are unverified. Cache parsed service definitions and keep the directory non-public and controlled by deployment. Because the package is unmaintained, record the risk in a vendor register and prefer an internal loader for production.