-
Notifications
You must be signed in to change notification settings - Fork 230
[php/ng] support the use of a list of php versions #167
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
Conversation
the approach here is to "post-process the map dictionnary" when the php version is a list |
@@ -10,5 +10,5 @@ | |||
- source: salt://php/ng/files/php.ini | |||
- template: jinja | |||
- context: | |||
config: {{ serialize(settings) }} | |||
config: {{ serialize(odict(settings)) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure this is needed
{% endif %} | ||
{% endfor %} | ||
{% do conf_settings.global.update({'pid': '/var/run/php' + version + '-fpm.pid' }) %} | ||
{% do conf_settings.global.update({'error_log': '/var/log/php' + version + '-fpm.log' }) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not very satisfied with this part, I would want the loop above to be more generic but for some reason I couldn't get it to change the subdictionnary
extend: | ||
php_fpm_service: | ||
service: | ||
- watch: | ||
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now I'm not sure how this handles when 7.3 as a float is used. Is setting the version without quotes supported by the existing version of the formula ?
I currently see the issue, that you cannot remove the default www.conf with multi version use. |
@pather87 can you explain your use case so I can test it out ? |
To remove the default www.conf pool, you can add:
With the multiphp extension, this is not possible anymore, since to remove both pools of each version:
This is obviously a duplicate key error. Maybe should add a switch in pillars to remove the default pool of both PHP versions. I will provide a patch. |
I've just tested it (in production) : great work 👍 |
@n-rodriguez great news, let's try to get this merged. @philpep should take a look at this merge request today to give us an extra opinion. |
@arthurlogilab Since starting this PR, this formula has been updated to use A few converted examples from this PR:
Note, if you rebase this PR against the latest upstream, you'll get the Travis checks running in this PR. That will also run |
@myii great news, I'm eager to work with this tool. Does that mean I should do some |
@arthurlogilab Effectively, yes. When there are a number of commits needing their messages modified, I prefer to use |
@myii done, lets see what travis says. |
You cracked it the first time, great job @arthurlogilab! |
@n-rodriguez Doesn't this need to be merged before #183? |
@myii not waiting for a specific reviewer, no. Thanks ! |
Merged, thanks @arthurlogilab and to all others for their comments and reviews. |
🎉 This PR is included in version 0.39.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Related to #138