{"id":13473957,"url":"https://github.com/MilesChou/composer-action","last_synced_at":"2025-03-26T20:30:32.409Z","repository":{"id":45381453,"uuid":"179521323","full_name":"MilesChou/composer-action","owner":"MilesChou","description":"Docker and GitHub Actions for Composer","archived":false,"fork":false,"pushed_at":"2024-10-31T07:34:08.000Z","size":66,"stargazers_count":34,"open_issues_count":1,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T23:11:41.680Z","etag":null,"topics":["actions","composer","docker","php"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/composer-action","language":"Dockerfile","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/MilesChou.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-04-04T15:03:14.000Z","updated_at":"2024-11-26T16:52:57.000Z","dependencies_parsed_at":"2024-04-09T11:30:42.924Z","dependency_job_id":"fe0de9bd-0ac4-4a03-978e-0098adb35ec2","html_url":"https://github.com/MilesChou/composer-action","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.022727272727272707","last_synced_commit":"99fd6086a5a17e11788ef672317f7d21e4e9e35a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MilesChou%2Fcomposer-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MilesChou%2Fcomposer-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MilesChou%2Fcomposer-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MilesChou%2Fcomposer-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MilesChou","download_url":"https://codeload.github.com/MilesChou/composer-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245731116,"owners_count":20663123,"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":["actions","composer","docker","php"],"created_at":"2024-07-31T16:01:08.342Z","updated_at":"2025-03-26T20:30:32.402Z","avatar_url":"https://github.com/MilesChou.png","language":"Dockerfile","funding_links":[],"categories":["Community Resources","Dockerfile"],"sub_categories":["Collection of Actions"],"readme":"# Docker and GitHub Actions for Composer\n\n[![GitHub Release][ico-release]][link-github-release]\n[![License][ico-license]](LICENSE)\n\n![Testing](https://github.com/MilesChou/composer-action/workflows/Testing/badge.svg)\n![Publish Docker](https://github.com/MilesChou/composer-action/workflows/Publish%20Docker/badge.svg)\n\nGitHub Actions for [Composer](https://getcomposer.org). Base on Docker official [PHP](https://hub.docker.com/_/php) image, and installed [hirak/prestissimo](https://github.com/hirak/prestissimo) package. \n\n[ico-release]: https://img.shields.io/github/tag/MilesChou/composer-action.svg\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg\n[link-github-release]: https://github.com/MilesChou/composer-action/releases\n\n## Why build another one image?\n\nActually, I want to follow DRY principle and use official [Composer](https://hub.docker.com/_/composer) image. But see the following composer.json:\n\n```json\n{\n    \"require\": {\n        \"php\": \"\u003e=5.5.9\"\n    },\n    \"require-dev\": {\n        \"phpunit/phpunit\": \"^4 | ^5 | ^6\"\n    }\n}\n```\n\nAnd use the following workflow:\n\n```yaml\n- name: Composer install\n  uses: docker://composer:1.9.1\n  with:\n    args: install\n- name: PHPUnit testing\n  uses: docker://php:5.5\n  with:\n    args: php vendor/bin/phpunit\n```\n\nIt's expected to work on PHP 5.5 ~ 7.3, so we should test on every platform. However, Composer image will install on PHP 7.3 platform and it will install PHPUnit 6.x. It will failed on PHP 5.5 container for PHPUnit 6.x require [PHP ^7.0](https://packagist.org/packages/phpunit/phpunit#6.0.0).   \n\nOf course, we can use the `config.platform.php` config to force platform version on PHP 5.5 and it will install PHPUnit 4.x, but PHPUnit 4.x use too many deprecated functions, e.g. [each()](https://www.php.net/manual/en/function.each.php), so that cannot work on PHP \u003e=7.2.\n\nFinally, I think that build image on every version is the good idea.\n\n## Usage for GitHub Actions\n\nVia GitHub Workflow\n\n```yaml\n- uses: MilesChou/composer-action@master\n  with:\n    args: install\n```\n\nUse install image\n\n```yaml\n- uses: MilesChou/composer-action/install@master\n```\n\nWith specify PHP version\n\n```yaml\n- uses: MilesChou/composer-action/5.5/install@master\n```\n\n## Usage for Docker\n\nSee [Docker Hub](https://hub.docker.com/r/mileschou/composer/)\n\n## Usage for GitHub Container Registry\n\nSee [GitHub Container Registry](https://github.com/users/MilesChou/packages/container/package/composer)\n\n## Supported tags and respective `Dockerfile` links\n\n**Notice:** Default tags is using Composer v2.\n\n* [`latest`, `8.2` (8.2/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/8.2/Dockerfile)\n* [`8.1` (8.1/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/8.1/Dockerfile)\n* [`8.0` (8.0/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/8.0/Dockerfile)\n* [`7.4` (7.4/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.4/Dockerfile)\n* [`7.3` (7.3/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.3/Dockerfile)\n* [`7.2` (7.2/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.2/Dockerfile)\n* [`7.1` (7.1/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.1/Dockerfile)\n* [`7.0` (7.0/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.0/Dockerfile)\n* [`5.6` (5.6/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/5.6/Dockerfile)\n* [`5.5` (5.5/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/5.5/Dockerfile) - no longer update\n\nHere is tags for using Composer v1:\n\n* [`v1`, `8.2-v1` (8.2/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/8.2/Dockerfile)\n* [`8.1-v1` (8.1/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/8.1/Dockerfile)\n* [`8.0-v1` (8.0/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/8.0/Dockerfile)\n* [`7.4-v1` (7.4/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.4/Dockerfile)\n* [`7.3-v1` (7.3/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.3/Dockerfile)\n* [`7.2-v1` (7.2/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.2/Dockerfile)\n* [`7.1-v1` (7.1/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.1/Dockerfile)\n* [`7.0-v1` (7.0/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/7.0/Dockerfile)\n* [`5.6-v1` (5.6/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/5.6/Dockerfile)\n* [`5.5-v1` (5.5/Dockerfile)](https://github.com/MilesChou/composer-action/blob/master/5.5/Dockerfile) - no longer update\n\nThe following is built-in tools:\n\n* git\n* zip\n* [hirak/prestissimo](https://github.com/hirak/prestissimo) (Composer v1)\n\n## Credits\n\n* [MilesChou](https://github.com/MilesChou)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMilesChou%2Fcomposer-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMilesChou%2Fcomposer-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMilesChou%2Fcomposer-action/lists"}