{"id":18929653,"url":"https://github.com/thecodingmachine/laravel-universal-service-provider","last_synced_at":"2026-02-12T21:02:04.047Z","repository":{"id":57067898,"uuid":"53278269","full_name":"thecodingmachine/laravel-universal-service-provider","owner":"thecodingmachine","description":"This bridge allows Laravel applications to use service providers as defined in container-interop/service-provider","archived":false,"fork":false,"pushed_at":"2017-09-21T13:30:10.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"1.0","last_synced_at":"2025-10-20T06:24:50.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-06T21:55:34.000Z","updated_at":"2025-02-07T11:13:37.000Z","dependencies_parsed_at":"2022-08-24T14:54:08.399Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/laravel-universal-service-provider","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/thecodingmachine/laravel-universal-service-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Flaravel-universal-service-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Flaravel-universal-service-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Flaravel-universal-service-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Flaravel-universal-service-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/laravel-universal-service-provider/tar.gz/refs/heads/1.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Flaravel-universal-service-provider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29381028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T20:34:40.886Z","status":"ssl_error","status_checked_at":"2026-02-12T20:23:00.490Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-11-08T11:34:12.735Z","updated_at":"2026-02-12T21:02:04.030Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# container-interop/service-provider bridge for Laravel\n\nImport `service-provider` as defined in `container-interop` into a Laravel application.\n\n## Usage\n\n### Installation\n\nAdd the package in composer:\n\n```sh\ncomposer require thecodingmachine/laravel-universal-service-provider ^1.0\n```\n\nAdd `\\TheCodingMachine\\Laravel\\ContainerInteropBridgeServiceProvider` in your `config/app.php` file.\n\n**config/app.php**\n```php\n\u003c?php\n\nreturn [\n    //...\n    'providers' =\u003e [\n        //...\n        TheCodingMachine\\Laravel\\ContainerInteropBridgeServiceProvider::class\n    ],\n    //...\n];      \n```\n\n### Usage using thecodingmachine/discovery\n\nThe bridge will use thecodingmachine/discovery to automatically discover the universal service providers of your project. If the service provider you are loading publishes itself\non thecodingmachine/discovery, then you are done. The services declared in the service provider are available in the Laravel container!\n\n### Usage using manual declaration\n\nIf the service provider you are using does not publishes itself using thecodingmachine/discovery, you will have to declare it manually in the `container-interop-service-providers` key of your `config/app.php' file.\n\nSet the service provider fully qualified class name in the parameter `container-interop-service-providers`:\n\n**config/app.php**\n```php\n\u003c?php\nuse \\GlideModule\\GlideServiceProvider;\n\nreturn [\n  ...\n  'container-interop-service-providers' =\u003e [\n    GlideServiceProvider::class\n  ]\n];\n```\n\nNow, you can do : `$app-\u003emake('glide')`\n\n## Disabling discovery\n\nYou can disable discovery using the `container-interop-service-provider-enable-discovery` setting:\n\n**config/app.php**\n```php\n\u003c?php\nuse \\GlideModule\\GlideServiceProvider;\n\nreturn [\n  ...\n  'container-interop-service-provider-enable-discovery' =\u003e false\n];\n```\n\n##Purging the cache\n\nThe Laravel service provider in this package is a **deferred provider**.\n\nLaravel compiles and stores a list of all of the services supplied by this provider. Then, only when you attempt to resolve one of these services does Laravel load the service provider.\n\nIf you add a new service to one of the universal service providers, you will need to purge the \"compiled\" services. You can do this with this command line:\n\n```php\nphp artisan clear-compiled\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Flaravel-universal-service-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Flaravel-universal-service-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Flaravel-universal-service-provider/lists"}