{"id":27182787,"url":"https://github.com/domainflow/core","last_synced_at":"2026-02-16T15:03:16.434Z","repository":{"id":286792899,"uuid":"962572850","full_name":"domainflow/core","owner":"domainflow","description":"Lightweight PHP application core with service providers, boot phases, middleware, and event dispatching.","archived":false,"fork":false,"pushed_at":"2025-04-08T11:08:18.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-21T04:27:24.434Z","etag":null,"topics":["bootstrap","container","dependencyinjection","di","domainflow","kernel","modular","php","provider"],"latest_commit_sha":null,"homepage":"https://www.domainflow.dev/docs/core","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/domainflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-08T11:02:25.000Z","updated_at":"2025-04-08T11:15:21.000Z","dependencies_parsed_at":"2025-04-09T15:17:09.097Z","dependency_job_id":null,"html_url":"https://github.com/domainflow/core","commit_stats":null,"previous_names":["domainflow/core"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/domainflow/core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domainflow%2Fcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domainflow%2Fcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domainflow%2Fcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domainflow%2Fcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/domainflow","download_url":"https://codeload.github.com/domainflow/core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domainflow%2Fcore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29510525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","container","dependencyinjection","di","domainflow","kernel","modular","php","provider"],"created_at":"2025-04-09T15:17:01.678Z","updated_at":"2026-02-16T15:03:16.414Z","avatar_url":"https://github.com/domainflow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DomainFlow Core\n\n[![Tests](https://github.com/domainflow/core/actions/workflows/tests.yml/badge.svg)](https://github.com/domainflow/core/actions/workflows/tests.yml)\n![Packagist Version](https://img.shields.io/packagist/v/domainflow/core)\n![PHP Version](https://img.shields.io/packagist/php-v/domainflow/core)\n![License](https://img.shields.io/github/license/domainflow/core)\n![PHPStan](https://img.shields.io/badge/PHPStan-Level%209-brightgreen.svg)\n\nThe **DomainFlow Core** package is a **Lightweight Application Bootstrapper** with features like **Service Providers**, **Application Bootstrapping**, **Middleware**, **Event Management**, and **Configuration Management** to help structure and maintain PHP back-end applications and microservices.\n\n---\n\n## ✨ Core Functionality\n\n- **Application Container**  \n  Inherits all DI capabilities from [DomainFlow Container](https://www.github.com/domainflow/container), including class auto-wiring, singleton bindings, and contextual bindings.\n\n- **Service Providers**  \n  Register and configure your services, including deferred loading for improved performance (load services only when first requested).\n\n- **Bootstrapping \u0026 Lifecycle Management**  \n  Built-in support for structured boot phases and graceful termination.\n\n- **Event Management**  \n  A basic but extendable event dispatcher to publish and subscribe to application events.\n\n- **Configuration \u0026 Environment Management**  \n  Manage environment variables, base paths, and config paths out of the box.\n\n- **Caching**  \n  Optionally cache resolved service instances (and deferred providers) for faster subsequent loads.\n\n---\n\n## 📦 Installation\n\nInstall **DomainFlow Core** with Composer:\n\n```sh\ncomposer require domainflow/core\n```\n\n---\n\n## 🧪 Example Usage\n\nBelow is a minimal example demonstrating how to set up an application, register a service provider, and retrieve a service:\n\n```php\n\u003c?php\n\nuse DomainFlow\\Application;\nuse DomainFlow\\Service\\AbstractServiceProvider;\n\n// 1. Define your own service provider.\nclass MyServiceProvider extends AbstractServiceProvider\n{\n    protected array $providedServices = [MyService::class];\n    public bool $defer = true; // Lazy loading, only load on first use\n\n    public function register(Application $app): void\n    {\n        // Bind a service...\n        $app-\u003ebind(MyService::class, fn() =\u003e new MyService(), true);\n    }\n}\n\n// 2. Create a new application.\n$app = new Application();\n\n// 3. Register your provider.\n$app-\u003eregisterProvider(new MyServiceProvider());\n\n// 4. Boot the application (register event listeners, run boot callbacks, etc.).\n$app-\u003eboot();\n\n// 5. Get your service.\n$service = $app-\u003eget(MyService::class);\n$service-\u003edoSomething();\n```\n\n---\n\nMore details and usage examples can be found in our [DomainFlow Core documentation](https://www.domainflow.dev/docs/core).\n\n---\n\n## 🛡 License\n\n**DomainFlow Core** is open-sourced software licensed under the [MIT license](https://opensource.org/license/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomainflow%2Fcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomainflow%2Fcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomainflow%2Fcore/lists"}