{"id":24458549,"url":"https://github.com/leprephp/di","last_synced_at":"2025-12-28T18:04:28.511Z","repository":{"id":57014089,"uuid":"109005545","full_name":"leprephp/di","owner":"leprephp","description":"A simple Dependency Injection Container, PSR-11 compliant.","archived":false,"fork":false,"pushed_at":"2022-09-06T08:00:39.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T12:48:01.335Z","etag":null,"topics":["dependency-injection","php","php7","psr-11"],"latest_commit_sha":null,"homepage":null,"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/leprephp.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}},"created_at":"2017-10-31T14:14:17.000Z","updated_at":"2022-09-05T15:21:55.000Z","dependencies_parsed_at":"2022-08-21T13:40:56.955Z","dependency_job_id":null,"html_url":"https://github.com/leprephp/di","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprephp%2Fdi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprephp%2Fdi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprephp%2Fdi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leprephp%2Fdi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leprephp","download_url":"https://codeload.github.com/leprephp/di/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243551234,"owners_count":20309290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["dependency-injection","php","php7","psr-11"],"created_at":"2025-01-21T03:14:47.152Z","updated_at":"2025-12-28T18:04:28.462Z","avatar_url":"https://github.com/leprephp.png","language":"PHP","readme":"**🚧 This project is in early development stage and it could change significantly in the future.**\n\n# Lepre DI\n\n[![Test library](https://github.com/metaline/wp-api-client/actions/workflows/test-library.yml/badge.svg)](https://github.com/leprephp/di/actions)\n[![Coverage Status](https://coveralls.io/repos/github/leprephp/di/badge.svg?branch=master)](https://coveralls.io/github/leprephp/di?branch=master)\n\nA simple Dependency Injection Container, [PSR-11][psr11] compliant.\n\n## Installation\n\nInstall the latest version with [Composer][composer]:\n\n```\n$ composer require lepre/di:dev-master\n```\n\n### Requirements\n\nThis project works with PHP 7.4 or above.\n\n## Basic Usage\n\n```php\nuse Lepre\\DI\\Container;\n\n$container = new Container();\n\n// register a service:\n$container-\u003eset('my service', function () {\n    return new MyService();\n});\n\n// register a service with dependencies:\n$container-\u003eset('other service', function (Container $container) {\n    return new OtherService(\n        $container-\u003eget('my service')\n    );\n});\n```\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n[composer]: https://getcomposer.org/\n[psr11]: http://www.php-fig.org/psr/psr-11/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleprephp%2Fdi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleprephp%2Fdi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleprephp%2Fdi/lists"}