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

Fix enable extension when there is no module associated #479

Merged
merged 2 commits into from
Oct 1, 2018
Merged

Fix enable extension when there is no module associated #479

merged 2 commits into from
Oct 1, 2018

Conversation

amateo
Copy link
Contributor

@amateo amateo commented Sep 25, 2018

When the extension has no module associated (e.g. with net-curl), the
module always run phpenmod command (because phpquery always report that
the module is not matched).
This commit tries to fix this problem

When the extension has no module associated (e.g. with net-curl), the
module always run phpenmod command (because phpquery always report that
the module is not matched).
This commit tries to fix this problem
@bastelfreak bastelfreak added bug Something isn't working needs-tests labels Sep 25, 2018
@bastelfreak
Copy link
Member

Hi @amateo, thanks for the patch! Could you add an acceptance test to https://github.com/voxpupuli/puppet-php/tree/master/spec/acceptance to verify that this now works? Probably just install net-curl?

@amateo
Copy link
Contributor Author

amateo commented Sep 27, 2018

Hi @bastelfreak.
The error of last push I think it is not directly related with my changes, because it fails with:

An error occurred while loading ./spec/acceptance/php56_spec.rb.
Failure/Error: require 'beaker-rspec'
Docker::Error::UnexpectedResponseError:

Anyway, I'm not really sure the test added to acceptance has any sense. The problem for this PR is that there are some php extensions that don't have any .so file. In these cases, the module always tries to execute the phpenmod en every puppet run. This PR fixes this problem.

The problem with the acceptance test is that I haven't found any of these extension in centos servers.
I previously added the instalation of url extension (which is the one I'm having problem in my systems), but this extension didn't exists in centos, so it fails. Then I changed it for curl, but this extension do have a .so file, so it is not the real test I wanted.

@bastelfreak
Copy link
Member

Hey @amateo, you can create a new spec file and only execute it on debian. The testsetup takes a minute or two to read. It is defined in: https://github.com/voxpupuli/puppet-php/blob/master/.travis.yml

basically we execute each spec file for each OS for puppet 5 and puppet 6. You would also need to adjust https://github.com/voxpupuli/puppet-php/blob/master/.sync.yml, which is source for generating the .travis.yml from time to time.

@amateo
Copy link
Contributor Author

amateo commented Oct 1, 2018

I have modified directly the php_spec.rb test, installing the package only in ubuntu systems. I think it is now fine.

@bastelfreak
Copy link
Member

thanks!

@bastelfreak bastelfreak merged commit 8a567f4 into voxpupuli:master Oct 1, 2018
mpdude added a commit to mpdude/puppet-php that referenced this pull request Nov 16, 2018
Fixes a glitch introduced in voxpupuli#479.

When an extension is `zend = true`, there is no `extension` entry in the `$final_settings` hash, but a `zend_extension` one.

/cc @amateo
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.

2 participants