Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions enabled by default? #214

Closed
ondrejmirtes opened this issue Apr 18, 2020 · 2 comments · Fixed by #219
Closed

Extensions enabled by default? #214

ondrejmirtes opened this issue Apr 18, 2020 · 2 comments · Fixed by #219

Comments

@ondrejmirtes
Copy link

Is your feature request related to a problem? Please describe.

Hi, I'd like to test PHPStan with various PHP extensions enabled or disabled. So I'd like to know, are there some PHP extensions that are enabled by default? I suspect it might be the case for the SOAP extensions, which can be enabled during PHP compilation with --enable-soap.

I'd like to test PHPStan behaviour with SOAP extension disabled.

Describe the solution you'd like

Ship PHP without any extensions enabled by default.

Describe alternatives you've considered

Include extensions_disable argument to be able to disable some built-in extensions like SOAP.

Additional context

This is my favourite GitHub action! Really well thought-out, a great piece of engineering. Thank you.

@shivammathur
Copy link
Owner

shivammathur commented Apr 18, 2020

@ondrejmirtes
Thanks!

php-soap package is pre-installed on the GitHub actions runner on ubuntu and macos builds are compiled with --enable-soap.

Disabling extensions using the action is not supported currently.
You can disable soap for example by adding these steps as per the OS after the setup-php step

name: Disable soap on ubuntu
if: matrix.operating-system == 'ubuntu-latest'
run: sudo phpdismod -v ${{ matrix.php-version }} soap

name: Disable soap on windows
if: matrix.operating-system == 'windows-latest'
run: Disable-PhpExtension soap C:\tools\php

name: Disable soap on macos
if: matrix.operating-system == 'macos-latest'
run: sudo sed -i '' "/soap/d" "$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")"

@ondrejmirtes
Copy link
Author

Thank you!

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 a pull request may close this issue.

2 participants