{"id":19692348,"url":"https://github.com/ddrv/php-shell","last_synced_at":"2026-04-15T00:32:10.750Z","repository":{"id":56964314,"uuid":"207215793","full_name":"ddrv/php-shell","owner":"ddrv","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-13T08:55:31.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T18:04:42.112Z","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/ddrv.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-09-09T03:24:27.000Z","updated_at":"2019-09-13T08:55:19.000Z","dependencies_parsed_at":"2022-08-21T05:40:26.084Z","dependency_job_id":null,"html_url":"https://github.com/ddrv/php-shell","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ddrv/php-shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrv%2Fphp-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrv%2Fphp-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrv%2Fphp-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrv%2Fphp-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddrv","download_url":"https://codeload.github.com/ddrv/php-shell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddrv%2Fphp-shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31821496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"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":[],"created_at":"2024-11-11T19:13:03.662Z","updated_at":"2026-04-15T00:32:10.727Z","avatar_url":"https://github.com/ddrv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ddrv/shell\n\n# Install\n\n```text\ncomposer require ddrv/shell\n```\n\n# Usage\n\n## Local\n\n```php\n\u003c?php\n\n$shell = new Ddrv\\Shell\\LocalShell('/tmp', ['APP_ENV' =\u003e 'test', 'APP_SECRET' =\u003e '$3cr3t'], true);\n\n/* or\n$shell = new Ddrv\\Shell\\LocalShell();\n$shell\n    -\u003esetCwd('/tmp')\n    -\u003esetEnv('APP_ENV', 'test')\n    -\u003esetEnv('APP_SECRET', '$3cr3t')\n    -\u003emergeErrorsAndOutput();\n*/\n\n$result = $shell-\u003eexec('ls -l');\n\nvar_dump($result-\u003egetExitCode()); // 0\nvar_dump($result-\u003egetOutput()); // list directories in /tmp\nvar_dump($result-\u003egetErrors()); // null\n```\n\n## Descriptors\n\n```php\n\u003c?php\n\nuse Ddrv\\Shell\\Contract\\ShellInterface;\nuse Ddrv\\Shell\\Descriptor\\WritablePipe;\nuse Ddrv\\Shell\\Descriptor\\ReadablePipe;\nuse Ddrv\\Shell\\Descriptor\\File;\n\n/** @var ShellInterface $shell */\n$shell-\u003esetDescriptor(new WritablePipe(), ShellInterface::DESCRIPTOR_INPUT);\n$shell-\u003esetDescriptor(new File('/tmp/out.txt', 'a'), ShellInterface::DESCRIPTOR_OUTPUT);\n$shell-\u003esetDescriptor(new ReadablePipe(), ShellInterface::DESCRIPTOR_ERRORS);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddrv%2Fphp-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddrv%2Fphp-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddrv%2Fphp-shell/lists"}