Skip to content

PHPC-2661: Use php-windows-builder for Windows extension builds#1907

Merged
alcaeus merged 6 commits intomongodb:v1.21from
alcaeus:update-setup-php-sdk
Jan 21, 2026
Merged

PHPC-2661: Use php-windows-builder for Windows extension builds#1907
alcaeus merged 6 commits intomongodb:v1.21from
alcaeus:update-setup-php-sdk

Conversation

@alcaeus
Copy link
Member

@alcaeus alcaeus commented Jan 9, 2026

PHPC-2661

This PR changes the build and release process to use php-windows-builder for Windows extension builds. Since php-windows-builder provides fully built zip packages for Windows extensions, this also changes the release process slightly: instead of packaging a detached signature file for the DLL in the package, we're now uploading a detached signature file for the entire package to the release, as we already do for the pecl package.

@alcaeus alcaeus requested a review from jmikola January 9, 2026 13:00
@alcaeus alcaeus requested a review from a team as a code owner January 9, 2026 13:00
Copilot AI review requested due to automatic review settings January 9, 2026 13:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the setup-php-sdk action version to fix Windows build pipeline failures caused by a NullReferenceException in the upstream action.

Key Changes:

  • Bumps setup-php-sdk action from v0.10 to v0.12

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

GromNaN
GromNaN previously approved these changes Jan 9, 2026
@alcaeus alcaeus marked this pull request as draft January 9, 2026 13:11
@alcaeus alcaeus dismissed GromNaN’s stale review January 9, 2026 13:12

Not actually fixed

@alcaeus alcaeus force-pushed the update-setup-php-sdk branch 5 times, most recently from ecd9996 to 70406f7 Compare January 15, 2026 13:20
@alcaeus alcaeus force-pushed the update-setup-php-sdk branch from 33e8fa1 to dc177a4 Compare January 15, 2026 14:24
@alcaeus alcaeus marked this pull request as ready for review January 20, 2026 12:30
Copy link
Contributor

@jmikola jmikola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions on the bool option being passed around, but this looks fine otherwise.

run-tests:
description: "Whether to run tests after building"
required: false
default: "false"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a string value instead of a bool?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inputs for composite actions are always strings, I wanted to make this explicit here.

- name: Build driver
shell: cmd
run: nmake /nologo
run-tests: ${{ inputs.run-tests == 'true' && true || false }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted that you just look for a string value here. What is && true || false accomplishing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a ternary since I don't trust type coercion in YAML. Could potentially be simplified but I didn't want to run the risk of it misbehaving

php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
run-tests: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are passing a bool and overriding the default string value ("false").

- name: "Upload assets to release"
if: ${{ inputs.upload_release_assets }}
run: |
gh release upload ${{ inputs.version }} artifacts/php_mongodb* --clobber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not necessary but you could restrict the extension to "zip" and "sig". I assume the directory starts empty, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does :)

@alcaeus alcaeus changed the title Require latest setup-php-sdk action to fix Windows builds PHPC-2661: Use php-windows-builder for Windows extension builds Jan 21, 2026
@alcaeus alcaeus enabled auto-merge (squash) January 21, 2026 09:29
@alcaeus alcaeus merged commit eb25263 into mongodb:v1.21 Jan 21, 2026
45 checks passed
@alcaeus alcaeus deleted the update-setup-php-sdk branch January 21, 2026 10:06
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 11, 2026
1.21.1 (2025-06-13)

What's Changed

* PHPC-2558: Update to libmongoc 1.30.3 by @alcaeus in mongodb/mongo-php-driver#1806

* Add CODEOWNERS for 1.21+ by @alcaeus in
  mongodb/mongo-php-driver#1810

* PHPC-2537 Update to newer Ubuntu version in GitHub Actions workflows by
  @GromNaN in mongodb/mongo-php-driver#1814

* PHPLIB-1678: Use assume_role command before accessing secrets by @alcaeus
  in mongodb/mongo-php-driver#1832

* Ignore branches that are no longer maintained when merging up by @alcaeus
  in mongodb/mongo-php-driver#1838

* PHPC-2593: Update libmongoc to 1.30.5 by @alcaeus in
  mongodb/mongo-php-driver#1841


1.21.2 (2025-10-07)

 What's Changed

* Fix wrong PHP version constraint for pie by @alcaeus in
  mongodb/mongo-php-driver#1874

* PHPC-2635: Remove serverless URIs from Atlas connectivity tests by
  @jmikola in mongodb/mongo-php-driver#1879

* PHPC-2637: Update to libmongoc 1.30.6 by @alcaeus in
  mongodb/mongo-php-driver#1882


1.21.3 (seems not be released)


1.21.4 (2026-01-28)

What's Changed

* PHPC-2661: Use php-windows-builder for Windows extension builds by
  @alcaeus in mongodb/mongo-php-driver#1907

* Refactor release process to support php-windows-builder by @alcaeus in
  mongodb/mongo-php-driver#1916

* Fix broken release workflow by @alcaeus in
  mongodb/mongo-php-driver#1919

1.21.5 (2026-02-04)

What's Changed

* Fix artifact signing by @alcaeus in
  mongodb/mongo-php-driver#1923

* PHPC-2670: Upgrade libmongoc to 1.30.7 by @alcaeus in
  mongodb/mongo-php-driver#1930

* PHPC-2636: Respect libbson nesting limit when parsing PHP objects by
  @alcaeus in mongodb/mongo-php-driver#1934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants