Skip to content

fix: prefer openssl@3 over deprecated openssl@1.1 on macOS#20

Open
yutoigarashi-stack wants to merge 1 commit intoversion-fox:mainfrom
yutoigarashi-stack:fix/prefer-openssl3-over-deprecated-1.1
Open

fix: prefer openssl@3 over deprecated openssl@1.1 on macOS#20
yutoigarashi-stack wants to merge 1 commit intoversion-fox:mainfrom
yutoigarashi-stack:fix/prefer-openssl3-over-deprecated-1.1

Conversation

@yutoigarashi-stack
Copy link

Summary

  • Prefer openssl@3 over openssl@1.1 when building PHP on macOS
  • Fall back to openssl@1.1 if openssl@3 is not installed

Problem

bin/install hardcodes openssl@1.1 in two places (L23, L193). Since openssl@1.1 reached EOL in September 2023 and is deprecated in Homebrew, most users only have openssl@3 installed. This causes PHP to be built without SSL support, resulting in:

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

Composer installation also fails as a result.

Changes

Both occurrences of homebrew_package_path openssl@1.1 now try openssl@3 first, falling back to openssl@1.1 for backward compatibility.

Notes

  • PHP 8.1+ officially supports OpenSSL 3.x
  • The upstream asdf-php plugin (from which this code was adapted) has already addressed this issue

openssl@1.1 reached EOL in September 2023 and is deprecated in
Homebrew. PHP 8.1+ officially supports OpenSSL 3.x.

This change makes the build prefer openssl@3, falling back to
openssl@1.1 if openssl@3 is not installed. Without this fix,
PHP is built without SSL support on systems that only have
openssl@3, causing https:// wrapper failures.
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.

1 participant