-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Disable disabling of loading defaults php.ini. #290
Comments
The Time to time, as users open issues, I'm thinking about option to disable it. Because the environment can be prepared for testing purpose only (e.g. your Docker). |
Yeah, as you have tagged, it's "friendliness", something like |
Actually -c does not load extension configs fron php -n -c $(php -r "echo php_ini_loaded_file();") --ini
Configuration File (php.ini) Path: /usr/local/etc/php/7.0
Loaded Configuration File: /usr/local/etc/php/7.0/php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none) |
I've found a workaround using a nasty hack: cat $(php -r 'echo php_ini_loaded_file() . " " . str_replace("\n", " ", str_replace(",", "", php_ini_scanned_files()));') > php-tests.ini
php $dir/../vendor/bin/tester -p php -c php-tests.ini $@ It would be definitely nice not to have to do that :) |
In time of CI tools, containers and VMs used for development the reason behind disabling default php.ini gets weaker. What if the current scenario was replaced with -n flag in tester itself? Run tests with default php.ini vendor/bin/tester tests Run tests without php.ini vendor/bin/tester tests -n Run tests with /my/php.ini vendor/bin/tester tests -c /my/php.ini |
As I wrote above, the I'm plannig to open PR with support "running without |
What about reuse |
I just found that PHP allows you to load additional New fact in a game :) |
What about vendor/bin/tester tests # Run without php.ini
vendor/bin/tester tests -c # Run with default *.ini
vendor/bin/tester tests -c my-php.ini # Run with specific *.ini |
@fmasa Setting (adding) own php.ini should work even with default system INI. I'm thinking about |
@milo I see. +1 for |
The current approach is quite obvious - tests should be indenpendent of your current development settings/environment.
However, in the context of docker, containers etc. it complicates things. You have to specifiy the php dependencies & configuration in Dockerfile. Then you have to either wire you tests to dockers' php.ini and tight it up with the php version in the path (/etc/php7.0/php.ini) , or you have to redefine you php.ini settings once again.
The most elegant solution would be an option do disable the
-n
. What do you think?The text was updated successfully, but these errors were encountered: