{"id":26796048,"url":"https://github.com/typisttech/php-matrix","last_synced_at":"2026-01-21T22:16:28.877Z","repository":{"id":268779799,"uuid":"903254209","full_name":"typisttech/php-matrix","owner":"typisttech","description":"List PHP versions that satisfy the required PHP constraint in composer.json","archived":false,"fork":false,"pushed_at":"2026-01-16T18:41:59.000Z","size":589,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T08:25:34.290Z","etag":null,"topics":["cli","composer","php","version"],"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/typisttech.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tangrufus"],"custom":["https://typist.tech/donation/"]}},"created_at":"2024-12-14T05:39:42.000Z","updated_at":"2026-01-16T18:42:02.000Z","dependencies_parsed_at":"2025-02-17T04:24:09.546Z","dependency_job_id":"fc7e84ab-57e8-48ff-bd8a-692f2b183df1","html_url":"https://github.com/typisttech/php-matrix","commit_stats":null,"previous_names":["typisttech/php-matrix"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/typisttech/php-matrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typisttech%2Fphp-matrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typisttech%2Fphp-matrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typisttech%2Fphp-matrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typisttech%2Fphp-matrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typisttech","download_url":"https://codeload.github.com/typisttech/php-matrix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typisttech%2Fphp-matrix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28645546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cli","composer","php","version"],"created_at":"2025-03-29T18:17:07.476Z","updated_at":"2026-01-21T22:16:28.858Z","avatar_url":"https://github.com/typisttech.png","language":"PHP","funding_links":["https://github.com/sponsors/tangrufus","https://typist.tech/donation/"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# PHP Matrix\n\n[![GitHub Release](https://img.shields.io/github/v/release/typisttech/php-matrix)](https://github.com/typisttech/php-matrix/releases)\n[![Test](https://github.com/typisttech/php-matrix/actions/workflows/test.yml/badge.svg)](https://github.com/typisttech/php-matrix/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/typisttech/php-matrix/graph/badge.svg?token=HV5UDLPMMQ)](https://codecov.io/gh/typisttech/php-matrix)\n[![License](https://img.shields.io/github/license/typisttech/php-matrix.svg)](https://github.com/typisttech/php-matrix/blob/master/LICENSE)\n[![Follow @TangRufus on X](https://img.shields.io/badge/Follow-TangRufus-15202B?logo=x\u0026logoColor=white)](https://x.com/tangrufus)\n[![Follow @TangRufus.com on Bluesky](https://img.shields.io/badge/Bluesky-TangRufus.com-blue?logo=bluesky)](https://bsky.app/profile/tangrufus.com)\n[![Sponsor @TangRufus via GitHub](https://img.shields.io/badge/Sponsor-TangRufus-EA4AAA?logo=githubsponsors)](https://github.com/sponsors/tangrufus)\n[![Hire Typist Tech](https://img.shields.io/badge/Hire-Typist%20Tech-778899)](https://typist.tech/contact/)\n\n\u003cp\u003e\n  \u003cstrong\u003eList PHP versions that satisfy the required PHP constraint in \u003ccode\u003ecomposer.json\u003c/code\u003e.\u003c/strong\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  Built with ♥ by \u003ca href=\"https://typist.tech/\"\u003eTypist Tech\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n---\n\n\u003e [!TIP]\n\u003e **Hire Tang Rufus!**\n\u003e\n\u003e I am looking for my next role, freelance or full-time.\n\u003e If you find this tool useful, I can build you more weird stuff like this.\n\u003e Let's talk if you are hiring PHP / Ruby / Go developers.\n\u003e\n\u003e Contact me at https://typist.tech/contact/\n\n---\n\n## Usage\n\n### GitHub Actions\n\nFor generating PHP version matrix in GitHub Actions, use [PHP Matrix Action](https://github.com/marketplace/actions/php-matrix).\n\n\u003cdetails\u003e\n\n\u003csummary\u003eExample\u003c/summary\u003e\n\n```yml\nname: Test\n\non:\n  push:\n\njobs:\n  php-matrix:\n    runs-on: ubuntu-latest\n    outputs:\n      versions: ${{ steps.php-matrix.outputs.versions }}\n    steps:\n      - uses: actions/checkout@v5\n        with:\n          sparse-checkout: composer.json\n          sparse-checkout-cone-mode: false\n\n      - uses: typisttech/php-matrix-action@v2\n        id: php-matrix\n\n  test:\n    runs-on: ubuntu-latest\n    needs: php-matrix\n    strategy:\n      matrix:\n        php-version: ${{ fromJSON(needs.php-matrix.outputs.versions) }}\n    steps:\n      - uses: actions/checkout@v5\n      - uses: shivammathur/setup-php@v2\n        with:\n          php-version: ${{ matrix.php-version }}\n      - run: composer install\n      - run: composer test\n```\n\u003c/details\u003e\n\n### List PHP versions that satisfy the required PHP constraint in `composer.json`\n\n```console\n$ cat ./composer.json\n{\"require\":{\"php\":\"^7 || ^8\"}}\n\n$ php-matrix composer\n{\n    \"constraint\": \"^7 || ^8\",\n    \"versions\": [\n        \"7.0\",\n        \"7.1\",\n        \"7.2\",\n        \"7.3\",\n        \"7.4\",\n        \"8.0\",\n        \"8.1\",\n        \"8.2\",\n        \"8.3\",\n        \"8.4\"\n    ],\n    \"lowest\": \"7.0\",\n    \"highest\": \"8.4\"\n}\n```\n\n```console\n$ cat ./some/path/to/the.json\n{\"require\":{\"php\":\"~7.4.29 || ~8.1.29\"}}\n\n$ php-matrix composer --source=php.net --mode=full ./some/path/to/the.json\n{\n    \"constraint\": \"~7.4.29 || ~8.1.29\",\n    \"versions\": [\n        \"7.4.29\",\n        \"7.4.30\",\n        \"7.4.32\",\n        \"7.4.33\",\n        \"8.1.29\",\n        \"8.1.30\",\n        \"8.1.31\",\n        \"8.1.32\",\n        \"8.1.33\"\n    ],\n    \"lowest\": \"7.4.29\",\n    \"highest\": \"8.1.33\"\n}\n```\n\n```console\n$ php-matrix composer --help\nDescription:\n  List PHP versions that satisfy the required PHP constraint in composer.json\n\nUsage:\n  composer [options] [--] [\u003cpath\u003e]\n\nArguments:\n  path                  Path to composer.json file. [default: \"./composer.json\"]\n\nOptions:\n      --source=SOURCE   Available sources:\n                        - auto: Use offline in minor-only mode. Otherwise, fetch from php.net\n                        - php.net: Fetch releases information from php.net\n                        - offline: Use hardcoded releases information\n                         [default: \"auto\"]\n      --mode=MODE       Available modes:\n                        - full: Report all satisfying versions in MAJOR.MINOR.PATCH format\n                        - minor-only: Report MAJOR.MINOR versions only\n                         [default: \"minor-only\"]\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n```\n\n### List PHP versions that satisfy the given constraint\n\n```console\n$ php-matrix constraint '^7 || ^8'\n{\n    \"constraint\": \"^7 || ^8\",\n    \"versions\": [\n        \"7.0\",\n        \"7.1\",\n        \"7.2\",\n        \"7.3\",\n        \"7.4\",\n        \"8.0\",\n        \"8.1\",\n        \"8.2\",\n        \"8.3\",\n        \"8.4\"\n    ],\n    \"lowest\": \"7.0\",\n    \"highest\": \"8.4\"\n}\n```\n\n```console\n$ php-matrix constraint --source=php.net --mode=full '~7.4.29 || ~8.1.29'\n{\n    \"constraint\": \"~7.4.29 || ~8.1.29\",\n    \"versions\": [\n        \"7.4.29\",\n        \"7.4.30\",\n        \"7.4.32\",\n        \"7.4.33\",\n        \"8.1.29\",\n        \"8.1.30\",\n        \"8.1.31\",\n        \"8.1.32\",\n        \"8.1.33\"\n    ],\n    \"lowest\": \"7.4.29\",\n    \"highest\": \"8.1.33\"\n}\n```\n\n```console\n$ php-matrix constraint --help\nDescription:\n  List PHP versions that satisfy the given constraint\n\nUsage:\n  constraint [options] [--] \u003cconstraint\u003e\n\nArguments:\n  constraint            The version constraint.\n\nOptions:\n      --source=SOURCE   Available sources:\n                        - auto: Use offline in minor-only mode. Otherwise, fetch from php.net\n                        - php.net: Fetch releases information from php.net\n                        - offline: Use hardcoded releases information\n                         [default: \"auto\"]\n      --mode=MODE       Available modes:\n                        - full: Report all satisfying versions in MAJOR.MINOR.PATCH format\n                        - minor-only: Report MAJOR.MINOR versions only\n                         [default: \"minor-only\"]\n  -h, --help            Display help for the given command. When no command is given display help for the list command\n      --silent          Do not output any message\n  -q, --quiet           Only errors are displayed. All other output is suppressed\n  -V, --version         Display this application version\n      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug\n```\n\n### Options\n\n#### `--mode`\n\nAvailable modes:\n\n- `minor-only` *(default)*: Report `MAJOR.MINOR` versions only\n- `full`: Report all satisfying versions in `MAJOR.MINOR.PATCH` format\n\n#### `--source`\n\nAvailable sources:\n\n- `auto` *(default)*: Use `offline` in\n  `minor-only` mode. Otherwise, fetch from [php.net](https://www.php.net/releases/index.php)\n- `php.net`: Fetch releases information from [php.net](https://www.php.net/releases/index.php)\n- `offline`: Use [hardcoded releases](./data/all-versions.json) information\n\n\u003e [!TIP]\n\u003e **Hire Tang Rufus!**\n\u003e\n\u003e There is no need to understand any of these quirks.\n\u003e Let me handle them for you.\n\u003e I am seeking my next job, freelance or full-time.\n\u003e\n\u003e If you are hiring PHP / Ruby / Go developers,\n\u003e contact me at https://typist.tech/contact/\n\n### Dump Shell Completion Scripts\n\nFor shell completions, follow the instructions from:\n\n```console\n$ php-matrix completion --help\n```\n\nIf you installed `PHP Matrix` [via Homebrew](#homebrew-macos--linux-recommended), completion scripts are managed by Homebrew.\nRead more at https://docs.brew.sh/Shell-Completion\n\n## Installation\n\n### Homebrew (macOS / Linux) (Recommended)\n\n```sh\nbrew tap typisttech/tap\nbrew install typisttech/tap/php-matrix\n```\n\n### `apt-get` (Debian based distributions, for example: Ubuntu)\n\n```sh\ncurl -1sLf 'https://dl.cloudsmith.io/public/typisttech/oss/setup.deb.sh' | sudo -E bash\nsudo apt-get install php-matrix\n```\n\nInstead of the automatic setup script, you can manually configure the repository with the instructions on [Cloudsmith](https://cloudsmith.io/~typisttech/repos/oss/setup/#formats-deb).\n\n### Manual `.deb` (Debian based distributions, for example: Ubuntu)\n\n\u003e [!WARNING]\n\u003e If you install the `.deb` file manually, you have to take care of updating it by yourself.\n\nDownload the latest `.deb` file from [GitHub Releases](https://github.com/typisttech/php-matrix/releases/latest), or via [`gh`](https://cli.github.com/):\n\n```sh\n# Both arm64 (aarch64) and amd64 (x86_64) architectures are available.\ngh release download --repo 'typisttech/php-matrix' --pattern 'php-matrix_linux_arm64.deb'\n```\n\n**Optionally**, verify the `.deb` file:\n\n```sh\ngh attestation verify --repo 'typisttech/php-matrix' 'php-matrix_linux_arm64.deb'\n```\n\nFinally, install the package:\n\n```sh\nsudo dpkg -i php-matrix_linux_arm64.deb\n```\n\n## Manual Binary\n\n\u003e [!WARNING]\n\u003e If you install the binary manually, you have to take care of updating it by yourself.\n\nDownload the latest `.tar.gz` file from [GitHub Releases](https://github.com/typisttech/php-matrix/releases/latest), or via [`gh`](https://cli.github.com/):\n\n```sh\n# Both darwin (macOS) and linux operating systems are available.\n# Both arm64 (aarch64) and amd64 (x86_64) architectures are available.\ngh release download --repo 'typisttech/php-matrix' --pattern 'php-matrix_darwin_arm64.tar.gz'\n```\n\n**Optionally**, verify the `.tar.gz` file:\n\n```sh\ngh attestation verify --repo 'typisttech/php-matrix' 'php-matrix_darwin_arm64.tar.gz'\n```\n\nFinally, unarchive and move the binary into `$PATH`:\n\n```sh\ntar -xvf 'php-matrix_darwin_arm64.tar.gz'\n\n# Or, move it to any directory under `$PATH`\nmv php-matrix /usr/local/bin\n```\n\n## Credits\n\n[`PHP Matrix`](https://github.com/typisttech/php-matrix) is a [Typist Tech](https://typist.tech) project and maintained by [Tang Rufus](https://x.com/TangRufus), freelance developer [for hire](https://typist.tech/contact/).\n\nFull list of contributors can be found [on GitHub](https://github.com/typisttech/php-matrix/graphs/contributors).\n\n## Copyright and License\n\nThis project is a [free software](https://www.gnu.org/philosophy/free-sw.en.html) distributed under the terms of the MIT license.\nFor the full license, see [LICENSE](./LICENSE).\n\n## Contribute\n\nFeedbacks / bug reports / pull requests are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypisttech%2Fphp-matrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypisttech%2Fphp-matrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypisttech%2Fphp-matrix/lists"}