{"id":25217701,"url":"https://github.com/dnunez24/platformsh-deploy-php","last_synced_at":"2025-04-05T09:42:58.240Z","repository":{"id":56970489,"uuid":"84404903","full_name":"dnunez24/platformsh-deploy-php","owner":"dnunez24","description":"A library for creating build and deployment processes for PHP applications hosted on Platform.sh","archived":false,"fork":false,"pushed_at":"2017-03-09T06:12:21.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T20:52:12.107Z","etag":null,"topics":["deploy","deployment","php","platformsh"],"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/dnunez24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T06:10:17.000Z","updated_at":"2017-03-10T19:52:44.000Z","dependencies_parsed_at":"2022-08-21T07:10:23.376Z","dependency_job_id":null,"html_url":"https://github.com/dnunez24/platformsh-deploy-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnunez24%2Fplatformsh-deploy-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnunez24%2Fplatformsh-deploy-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnunez24%2Fplatformsh-deploy-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnunez24%2Fplatformsh-deploy-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnunez24","download_url":"https://codeload.github.com/dnunez24/platformsh-deploy-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318726,"owners_count":20919483,"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":["deploy","deployment","php","platformsh"],"created_at":"2025-02-10T20:52:16.172Z","updated_at":"2025-04-05T09:42:58.216Z","avatar_url":"https://github.com/dnunez24.png","language":"PHP","readme":"# Platform.sh PHP Deploy\n\nThis is a foundational library to create build and deployment processes for PHP applications hosted on Platform.sh.\n\n## Getting Started\n\nImplement your concrete build strategy by extending the abstract class from this library:\n\n```php\n\u003c?php\n\nnamespace MyVendor\\MyApp\\Strategy;\n\nuse Dnunez24\\Platformsh\\Strategy\\AbstractBuildStrategy;\n\nclass BuildStrategy extends AbstractBuildStrategy\n{\n    public function build()\n    {\n        // add your build steps here\n    }\n}\n```\n\nYou can also implement the strategy interfaces directly:\n\n```php\n\u003c?php\n\nnamespace MyVendor\\MyApp\\Strategy;\n\nuse Dnunez24\\Platformsh\\Strategy\\BuildStrategyInterface;\n\nclass BuildStrategy implements BuildStrategyInterface\n{\n    public function build()\n    {\n        // add your build steps here\n    }\n\n}\n```\n\nCreate your build command\n\n```php\n\u003c?php\n\nnamespace MyVendor\\MyApp\\Command;\n\nuse Dnunez24\\Platformsh\\Command\\AbstractBuildCommand;\n\nclass MyBuildCommand extends AbstractBuildCommand\n{\n    protected function configure()\n    {\n        // Add Symfony Console configuration steps here\n        // See: http://symfony.com/doc/current/console.html#configuring-the-command\n    }\n}\n```\n\nThen create the Symfony Console application in your project, someplace like `bin/myapp`:\n\n```php\n#!/usr/bin/env php\n\n\u003c?php\n\nuse Symfony\\Component\\Console\\Application;\nuse MyVendor\\MyApp\\Strategy\\BuildStrategy;\nuse MyVendor\\MyApp\\Strategy\\DeployStrategy;\nuse MyVendor\\MyApp\\Command\\BuildCommand;\nuse MyVendor\\MyApp\\Command\\DeployCommand;\n\n$buildStrategy = new BuildStrategy();\n$buildCommand = new BuildCommand($buildStrategy);\n\n$deployStrategy = new DeployStrategy();\n$deployCommand = new DeployCommand($deployStrategy)\n\n$application = new Application();\n$application-\u003eadd($buildCommand);\n$application-\u003eadd($deployCommand);\n$application-\u003erun();\n```\n\nFinally, run your scripts to build and deploy the app:\n\n```bash\ncomposer exec bin/myapp build\ncomposer exec bin/myapp deploy\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnunez24%2Fplatformsh-deploy-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnunez24%2Fplatformsh-deploy-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnunez24%2Fplatformsh-deploy-php/lists"}