-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Add cli_settings parameter to php class #491
Conversation
Allow specific settings for PHP CLI's php.ini file.
Hi @sunnz. Can you add a unit or acceptance test to verify that the php.ini for the CLI really contains the required content? |
Hi @bastelfreak, I would be very happy to but I haven't written any unit or acceptance test for Puppet... would you be able to point me to what tool do you use run the tests and the existing tests for this repository? |
Ok I am going through the test part of documentation now: https://github.com/voxpupuli/puppet-php/blob/master/.github/CONTRIBUTING.md I am trying to run the unit test of my end now. ( I am guessing unit tests are written in rspec-puppet? |
yes, the tests are written in rspec-puppet. The current unit tests are at https://github.com/voxpupuli/puppet-php/tree/master/spec/classes |
Hey @sunnz, any update here? Let us know if you need some help. You can reach us in the IRC channel #voxpupuli on freenode or the #voxpupuli channel on https://puppetcommunity.slack.com (signup at https://slack.puppet.com ) |
Hey @bastelfreak thanks for the follow up. Yes I am stuck on something but then I went overseas so didn't have a lot of access to update! I will try to give you an update and if you can help me that would be great! |
So... I was adding some test to
So I was actually trying to write a simply test for an existing parameter "settings" and thought that if I can get that to work before I try to do the same to "cli_settings". But then I got:
But it should pass right? I am expecting the init_setting and class to be there for each setting in settings declared from: https://github.com/voxpupuli/puppet-php/blob/master/manifests/config/setting.pp So I am stuck with this... please let me know if I can provide anything else. |
I'd like to +1 this PR generally speaking because in the scenario that I was looking at today ... I would like to have display_errors=on in CLI but not in FPM. Thanks for the work on this. Looking forward to seeing where this goes. |
Thanks for the +1 @jackdpeterson, I should keep trying to get unit test working! The fork does work though I have it running it my environment, feel free to try it out. |
…le guide. Caught by RuboCop, Style/TrailingCommaInLiteral. See: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
thanks @sunnz ! |
Thanks for the help and accepting the pull request @bastelfreak! :)))) |
Pull Request (PR) description
Adds
cli_settings
parameter to::php
class to allow specific settings for PHP CLI's php.ini file.For example this allows you to specific 256M memory_limit for PHP and PHP-FPM but increase the limit for PHP CLI, ie, PHP scripts running detached from the a web browser, like:
Then the
memory_limit
would be set to256M
in/etc/php.ini
and/etc/php-fpm.ini
and1000M
in/etc/php-cli.ini
on CentOS 7.This Pull Request (PR) fixes the following issues
Fixes #489