{"id":18285495,"url":"https://github.com/bemit/satellite","last_synced_at":"2025-04-09T06:16:51.230Z","repository":{"id":36254786,"uuid":"222774841","full_name":"bemit/satellite","owner":"bemit","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-19T19:27:46.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T00:32:55.349Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bemit.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":"2019-11-19T19:38:09.000Z","updated_at":"2022-10-19T19:26:00.000Z","dependencies_parsed_at":"2022-08-17T22:31:15.205Z","dependency_job_id":null,"html_url":"https://github.com/bemit/satellite","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bemit%2Fsatellite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bemit","download_url":"https://codeload.github.com/bemit/satellite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":[],"created_at":"2024-11-05T13:16:52.261Z","updated_at":"2025-04-09T06:16:51.185Z","avatar_url":"https://github.com/bemit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orbiter\\Satellite\n\n[![Latest Stable Version](https://poser.pugx.org/orbiter/satellite/version.svg)](https://packagist.org/packages/orbiter/satellite)\n[![Latest Unstable Version](https://poser.pugx.org/orbiter/satellite/v/unstable.svg)](https://packagist.org/packages/orbiter/satellite)\n[![codecov](https://codecov.io/gh/bemit/satellite/branch/master/graph/badge.svg?token=N376EQ2T5O)](https://codecov.io/gh/bemit/satellite)\n[![Total Downloads](https://poser.pugx.org/orbiter/satellite/downloads.svg)](https://packagist.org/packages/orbiter/satellite)\n[![Github actions Build](https://github.com/bemit/satellite/actions/workflows/blank.yml/badge.svg)](https://github.com/bemit/satellite/actions)\n[![PHP Version Require](http://poser.pugx.org/orbiter/satellite/require/php)](https://packagist.org/packages/orbiter/satellite)\n\n- **PSR-14** Event Dispatcher and Listener\n- using [`InvokerInterface`](https://github.com/PHP-DI/Invoker/blob/2.0.0/src/InvokerInterface.php) to execute anything, **PSR-11** compatible\n\nCheck [satellite-app](https://github.com/bemit/satellite-app) for a ready to use template, or install just this event library:\n\n```shell\ncomposer require orbiter/satellite\n```\n\nDependencies, using [`PHP-DI`](https://php-di.org/) here, but possible with any PSR-11 container and any implementation of [`InvokerInterface`](https://github.com/PHP-DI/Invoker):\n\n```injectablephp\nuse function DI\\autowire;\nuse function DI\\get;\n\n$dependencies = [\n    Satellite\\Event\\EventListenerInterface::class =\u003e autowire(Satellite\\Event\\EventListener::class),\n    Psr\\EventDispatcher\\ListenerProviderInterface::class =\u003e get(Satellite\\Event\\EventListenerInterface::class),\n    Satellite\\Event\\EventDispatcher::class =\u003e autowire()\n        -\u003econstructorParameter('listener', get(Psr\\EventDispatcher\\ListenerProviderInterface::class))\n        -\u003econstructorParameter('invoker', get(Invoker\\InvokerInterface::class)),\n    Psr\\EventDispatcher\\EventDispatcherInterface::class =\u003e get(Satellite\\Event\\EventDispatcher::class),\n];\n```\n\nFor full invocation PSR-11 injection based on `Reflection`, set up the `Invoker` with the included `InvokerTypeHintContainerResolver`:\n\n```injectablephp\n/**\n * @var $invoker \\Invoker\\Invoker\n */\n$invoker = $container-\u003eget(\\Invoker\\Invoker::class);\n$invoker-\u003egetParameterResolver()-\u003eprependResolver(\n    new Satellite\\InvokerTypeHintContainerResolver($container)\n);\n```\n\n## Dev Notices\n\nCommands to set up and run e.g. tests:\n\n```bash\n# on windows:\ndocker run -it --rm -v %cd%:/app composer install\n\ndocker run -it --rm -v %cd%:/var/www/html php:8.1-cli-alpine sh\n\ndocker run --rm -v %cd%:/var/www/html php:8.1-cli-alpine sh -c \"cd /var/www/html \u0026\u0026 ./vendor/bin/phpunit --testdox -c phpunit-ci.xml --bootstrap vendor/autoload.php\"\n\n# on unix:\ndocker run -it --rm -v `pwd`:/app composer install\n\ndocker run -it --rm -v `pwd`:/var/www/html php:8.1-cli-alpine sh\n\ndocker run --rm -v `pwd`:/var/www/html php:8.1-cli-alpine sh -c \"cd /var/www/html \u0026\u0026 ./vendor/bin/phpunit --testdox -c phpunit-ci.xml --bootstrap vendor/autoload.php\"\n```\n\n## Versions\n\nThis project adheres to [semver](https://semver.org/), **until `1.0.0`** and beginning with `0.1.0`: all `0.x.0` releases are like MAJOR releases and all `0.0.x` like MINOR or PATCH, modules below `0.1.0` should be considered experimental.\n\n## License\n\nThis project is free software distributed under the [**MIT LICENSE**](LICENSE).\n\n### Contributors\n\nBy committing your code to the code repository you agree to release the code under the MIT License attached to the repository.\n\n***\n\nMaintained by [Michael Becker](https://i-am-digital.eu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fsatellite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbemit%2Fsatellite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbemit%2Fsatellite/lists"}