{"id":15021946,"url":"https://github.com/eugenganshorn/guzzlebundleretryplugin","last_synced_at":"2025-04-10T20:33:39.915Z","repository":{"id":34924621,"uuid":"190251763","full_name":"EugenGanshorn/GuzzleBundleRetryPlugin","owner":"EugenGanshorn","description":"Retry Plugin for EightPointsGuzzleBundle","archived":false,"fork":false,"pushed_at":"2023-10-20T13:39:33.000Z","size":49,"stargazers_count":5,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-23T06:25:40.359Z","etag":null,"topics":["bundle","curl","guzzle","guzzle-bundle-plugin","guzzle-middleware","http","http-client","middleware","plugin","retry","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","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/EugenGanshorn.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":"2019-06-04T17:49:00.000Z","updated_at":"2023-09-13T16:36:27.000Z","dependencies_parsed_at":"2024-04-25T23:00:18.596Z","dependency_job_id":null,"html_url":"https://github.com/EugenGanshorn/GuzzleBundleRetryPlugin","commit_stats":{"total_commits":23,"total_committers":6,"mean_commits":"3.8333333333333335","dds":0.3913043478260869,"last_synced_commit":"96fdce2a4a926321dca3e7ef5cf971c8f242787f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenGanshorn%2FGuzzleBundleRetryPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenGanshorn%2FGuzzleBundleRetryPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenGanshorn%2FGuzzleBundleRetryPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EugenGanshorn%2FGuzzleBundleRetryPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EugenGanshorn","download_url":"https://codeload.github.com/EugenGanshorn/GuzzleBundleRetryPlugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290044,"owners_count":21078923,"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":["bundle","curl","guzzle","guzzle-bundle-plugin","guzzle-middleware","http","http-client","middleware","plugin","retry","symfony","symfony-bundle"],"created_at":"2024-09-24T19:57:14.960Z","updated_at":"2025-04-10T20:33:39.887Z","avatar_url":"https://github.com/EugenGanshorn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GuzzleBundleRetryPlugin\n[![Build Status](https://travis-ci.org/EugenGanshorn/GuzzleBundleRetryPlugin.svg?branch=master)](https://travis-ci.org/EugenGanshorn/GuzzleBundleRetryPlugin)\n[![Coverage Status](https://coveralls.io/repos/github/EugenGanshorn/GuzzleBundleRetryPlugin/badge.svg?branch=master)](https://coveralls.io/github/EugenGanshorn/GuzzleBundleRetryPlugin?branch=master)\n\n## Requirements\n - PHP 8.0 or above\n - [Guzzle Bundle][1]\n - [Guzzle Retry middleware][2]\n\n## Installation\nUsing [composer][3]:\n\n##### composer.json\n``` json\n{\n    \"require\": {\n        \"eugenganshorn/guzzle-bundle-retry-plugin\": \"^1.0\"\n    }\n}\n```\n\n##### command line\n``` bash\n$ composer require eugenganshorn/guzzle-bundle-retry-plugin\n```\n## Usage\n### Enable bundle\n\n#### Symfony 4\nPlugin will be activated/connected through bundle constructor in `app/AppKernel.php`, like this:\nFind next lines:\n\n```php\nforeach ($contents as $class =\u003e $envs) {\n    if (isset($envs['all']) || isset($envs[$this-\u003eenvironment])) {\n        yield new $class();\n    }\n}\n```\n\nand replace them by:\n\n```php\nforeach ($contents as $class =\u003e $envs) {\n    if (isset($envs['all']) || isset($envs[$this-\u003eenvironment])) {\n        if ($class === \\EightPoints\\Bundle\\GuzzleBundle\\EightPointsGuzzleBundle::class) {\n            yield new $class([\n                new \\EugenGanshorn\\Bundle\\GuzzleBundleRetryPlugin\\GuzzleBundleRetryPlugin(),\n            ]);\n        } else {\n            yield new $class();\n        }\n    }\n}\n```\n#### Symfony 5 \u0026 6\nOverride the `registerBundles` method in `src/Kernel.php` to connect the plugin to the bundle:\n\n```php\npublic function registerBundles(): iterable\n{\n    $contents = require $this-\u003egetBundlesPath();\n    foreach ($contents as $class =\u003e $envs) {\n        if ($envs[$this-\u003eenvironment] ?? $envs['all'] ?? false) {\n            if ($class === EightPointsGuzzleBundle::class) {\n                yield new $class([\n                    new GuzzleBundleRetryPlugin(),\n                ]);\n            } else {\n                yield new $class();\n            }\n        }\n    }\n}\n```\n\n### Basic configuration\n``` yaml\n# app/config/config.yml // config/packages/eight_points_guzzle.yaml\n\neight_points_guzzle:\n    clients:\n        your_client:\n            base_url: \"http://api.domain.tld\"\n\n            # plugin settings\n            plugin:\n                retry:\n                    ~\n```\n### Advanced configuration\nSee middleware options:\nhttps://github.com/caseyamcl/guzzle_retry_middleware#options\n\n## License\nThis middleware is licensed under the MIT License - see the LICENSE file for details\n\n[1]: https://github.com/8p/EightPointsGuzzleBundle\n[2]: https://github.com/caseyamcl/guzzle_retry_middleware\n[3]: https://getcomposer.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenganshorn%2Fguzzlebundleretryplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugenganshorn%2Fguzzlebundleretryplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenganshorn%2Fguzzlebundleretryplugin/lists"}