fix: prefer openssl@3 over deprecated openssl@1.1 on macOS#20
Open
yutoigarashi-stack wants to merge 1 commit intoversion-fox:mainfrom
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openssl@3overopenssl@1.1when building PHP on macOSopenssl@1.1ifopenssl@3is not installedProblem
bin/installhardcodesopenssl@1.1in two places (L23, L193). Sinceopenssl@1.1reached EOL in September 2023 and is deprecated in Homebrew, most users only haveopenssl@3installed. This causes PHP to be built without SSL support, resulting in:Composer installation also fails as a result.
Changes
Both occurrences of
homebrew_package_path openssl@1.1now tryopenssl@3first, falling back toopenssl@1.1for backward compatibility.Notes
asdf-phpplugin (from which this code was adapted) has already addressed this issue