{"id":15021395,"url":"https://github.com/php/setup-php-sdk","last_synced_at":"2025-10-19T22:31:36.195Z","repository":{"id":209935692,"uuid":"725014551","full_name":"php/setup-php-sdk","owner":"php","description":"Setup Windows build environment for PHP extensions","archived":false,"fork":false,"pushed_at":"2025-09-19T07:22:40.000Z","size":40,"stargazers_count":13,"open_issues_count":1,"forks_count":9,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-09-19T09:34:01.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/php.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":"2023-11-29T09:05:28.000Z","updated_at":"2025-09-19T07:22:43.000Z","dependencies_parsed_at":"2024-11-07T01:27:21.217Z","dependency_job_id":null,"html_url":"https://github.com/php/setup-php-sdk","commit_stats":{"total_commits":26,"total_committers":8,"mean_commits":3.25,"dds":"0.42307692307692313","last_synced_commit":"60426a7780769ff9f08edcc9a8e47302f790dc0b"},"previous_names":["php/setup-php-sdk"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/php/setup-php-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fsetup-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fsetup-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fsetup-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fsetup-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php","download_url":"https://codeload.github.com/php/setup-php-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fsetup-php-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279906279,"owners_count":26241985,"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","status":"online","status_checked_at":"2025-10-19T02:00:07.647Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-09-24T19:56:31.883Z","updated_at":"2025-10-19T22:31:36.188Z","avatar_url":"https://github.com/php.png","language":"PowerShell","readme":"# Setup PHP-SDK Action\n\n[Github Action](https://github.com/features/actions) to set up an environment\nfor building and testing PHP extensions on Windows.\n\n## Example Usage\n\n````.yml\n- id: setup-php-sdk\n  uses: php/setup-php-sdk@v0.11\n  with:\n    version: 8.0\n    arch: x64\n    ts: nts\n- uses: ilammy/msvc-dev-cmd@v1\n  with:\n    arch: x64\n    toolset: ${{steps.setup-php-sdk.outputs.toolset}}\n- run: phpize\n- run: configure --enable-dbase --with-prefix=${{steps.setup-php-sdk.outputs.prefix}}\n- run: nmake\n- run: nmake test TESTS=tests\n````\n\n## Inputs\n\n- `version`: the PHP version to build for\n  (`7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, `8.4`, or `8.5`)\n- `arch`: the architecture to build for (`x64` or `x86`)\n- `ts`: thread-safety (`nts` or `ts`)\n- `deps`: dependency libraries to install; for now, only\n  [core dependencies](https://windows.php.net/downloads/php-sdk/deps/) are available\n- `cache`: whether to cache the PHP SDK, PHP and development pack\n\nNote that for PHP versions 7.4 and below, `runs-on: windows-2022` will not work\nas the correct toolset is not available. For these versions, you should use\n`runs-on: windows-2019`. For example:\n\n```yml\nstrategy:\n  matrix:\n    os: [ windows-2019, windows-2022 ]\n    php: [ \"8.1\", \"8.0\", \"7.4\", \"7.3\", \"7.2\", \"7.1\" ]\n    arch: [ x64, x86 ]\n    ts: [ ts, nts ]\n    exclude:\n      - { os: windows-2019, php: \"8.1\" }\n      - { os: windows-2019, php: \"8.0\" }\n      - { os: windows-2022, php: \"7.4\" }\n      - { os: windows-2022, php: \"7.3\" }\n      - { os: windows-2022, php: \"7.2\" }\n      - { os: windows-2022, php: \"7.1\" }\n```\n\nCurrently, windows-2019 may be used for all PHP versions up to PHP 8.3.\nPHP 8.4 requires a newer image such as windows-2022.\n\n### Manually Installing Toolsets\n\nIt is possible to manually install older toolsets on `windows-2022` using an\napproach suggested in [actions/runner-images#9701](https://github.com/actions/runner-images/issues/9701).\nThe following example installs VC15 by its\n[Component ID](https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022)\nto allow building PHP 7.2, 7.3, and 7.4 on a `windows-2022` image:\n\n```yml\nrun:\n  steps:\n    - name: Install VC15 component\n      if: ${{ matrix.php == '7.4' || matrix.php == '7.3' || matrix.php == '7.2' }}\n      shell: pwsh\n      run: |\n              Set-Location \"C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\\"\n              $installPath = \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\"\n              $component = \"Microsoft.VisualStudio.Component.VC.v141.x86.x64\"\n              $args = ('/c', \"vs_installer.exe\", 'modify', '--installPath', \"`\"$installPath`\"\", '--add', $component, '--quiet', '--norestart', '--nocache')\n              $process = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru -WindowStyle Hidden\n```\n\nThis step should be executed _before_ invoking the `setup-php-sdk` action.\n\n## Outputs\n\n- `toolset`: the required toolset version;\n  needs to be passed to the ilammy/msvc-dev-cmd action\n- `prefix`: the prefix of the PHP installation;\n  needs to be passed to configure\n- `vs`: the Visual Studio version\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp%2Fsetup-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp%2Fsetup-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp%2Fsetup-php-sdk/lists"}