Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

gwleuverink
Copy link
Contributor

When using custom PHP binaries the CopiesCertificateAuthority trait would look for the cacert.pem file relative to the custom binary path.

It's not documented that users should provider their own certificate bundle in this case. I see no reason why we should not use the default certs used by php-bin. Since we include the repo by default it should always be there & be updated.

This PR removes the conditional & makes sure the certs in vendor/nativephp/php-bin/cacert.pem are always used.

Fixes: NativePHP/laravel#655

@gwleuverink gwleuverink changed the title always use php-bin cacert.pem - even for custom binaries use vendor cacert.pem for custom binaries Jul 29, 2025
@gwleuverink gwleuverink requested a review from a team July 29, 2025 08:32
@gwleuverink gwleuverink self-assigned this Jul 29, 2025
@gwleuverink gwleuverink added the bug Something isn't working label Jul 29, 2025
@gwleuverink
Copy link
Contributor Author

Alternatively we could search both locations for a cacert.pem file. But thinking about this I'm not sure about the benefits.

Copy link
Member

@SRWieZ SRWieZ left a comment

Choose a reason for hiding this comment

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

I agree

@gwleuverink
Copy link
Contributor Author

@NativePHP/contributors one more review to push this through 👀

@simonhamp simonhamp merged commit f924edc into main Aug 4, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cacert.pem not detected using custom PHP binaries
3 participants