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

Add ZendPHP support #671

Merged
merged 1 commit into from
Feb 5, 2023
Merged

Add ZendPHP support #671

merged 1 commit into from
Feb 5, 2023

Conversation

jbh
Copy link
Contributor

@jbh jbh commented Oct 25, 2022

Description

This PR adds support for ZendPHP on its supported platforms.

This is accomplished by adding two parameters to php::globals:

  • Optional[Enum['community', 'zend']] $flavor
  • Optional[Hash] $zend_creds

Usage examples

class { '::php::globals':
  php_version => '8.1',
  flavor      => 'zend',
}->
class { '::php':
  fpm       => true,
  fpm_pools => {
    www => {
      listen => "127.0.0.1:9000",
    },
  }
}
class { '::php::globals':
  php_version => '5.6',
  flavor      => 'zend',
  zend_creds  => {
    'username' => '<USERNAME>',
    'password' => '<PASSWORD>',
  },
}->
class { '::php':
  fpm       => true,
  fpm_pools => {
    www => {
      listen => "127.0.0.1:9000",
    },
  }
}

@jbh
Copy link
Contributor Author

jbh commented Oct 27, 2022

I'd like to expand the tests to include tests for this PR, but I can't seem to get the tests to run.

I've followed the instructions in the README:

bundle install --path vendor/bundle
bundle exec rake

but I keep getting this error about an undefined constant:

NameError: uninitialized constant PuppetStrings

module PuppetStrings::Tasks

Seems to be an issue within the puppet-strings gem. Any tips?

@root-expert root-expert added the enhancement New feature or request label Dec 12, 2022
@root-expert
Copy link
Member

Hello @jbh and thanks for the PR. You can read this document on how to run the spec suite

@jbh
Copy link
Contributor Author

jbh commented Dec 12, 2022

Thanks. I've figured out how to get tests running. Just trying to find the time to write them now! Should have tests up by the end of the week.

@jbh
Copy link
Contributor Author

jbh commented Jan 9, 2023

Sorry it took so long. I've added a few tests for the zend flavor.

@jbh
Copy link
Contributor Author

jbh commented Jan 30, 2023

Just wanted to check in and see if there is any sort of ETA for peer review and acceptance? This has been sitting for awhile.

README.md Outdated Show resolved Hide resolved
manifests/globals.pp Outdated Show resolved Hide resolved
manifests/globals.pp Outdated Show resolved Hide resolved
spec/classes/php_spec.rb Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the commits should be rebased on current master and squashed into one commit.

@jbh
Copy link
Contributor Author

jbh commented Feb 1, 2023

Thanks for the review @kenyon. I'll get these sorted ASAP.

@jbh jbh force-pushed the zendphp-support branch from 1c2cefd to 93aacc7 Compare February 2, 2023 20:34
@jbh
Copy link
Contributor Author

jbh commented Feb 2, 2023

I can't seem to get it to squash properly WITH a rebase... But your requested changes have been completed.

Now there are five of the exact same commit... Lol... Squashing is a lot harder than I remember.

@jbh jbh force-pushed the zendphp-support branch from bcf5c7b to b193a01 Compare February 2, 2023 20:46
@jbh
Copy link
Contributor Author

jbh commented Feb 2, 2023

Okay! I finally got it squashed into one commit.

Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog update shouldn't be part of this PR.

@jbh jbh force-pushed the zendphp-support branch from b193a01 to 03a3c76 Compare February 2, 2023 21:50
@jbh
Copy link
Contributor Author

jbh commented Feb 2, 2023

Not sure how they got in there, but I've gotten CHANGELOG and REFERENCE taken out.

@jbh jbh force-pushed the zendphp-support branch 2 times, most recently from a7128d2 to bbbd855 Compare February 2, 2023 21:54
metadata.json Outdated Show resolved Hide resolved
metadata.json Outdated
Comment on lines 31 to 34
},
{
"name": "zend/zend_common",
"version_requirement": ">= 1.1.1 < 8.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave this out of metadata.json since it makes zend/zend_common a hard requirement even when ZendPHP is not being used. Instead you can explain that zend/zend_common is needed for ZendPHP.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. In that case, I can just remove metadata.json from the commit, which makes it easy!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some lines on README explaining that in order to use ZendPHP they need zend/zend_common puppet module, else people will be confused why their catalog is not compiling 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, @root-expert 😄

@jbh jbh force-pushed the zendphp-support branch from bbbd855 to af47e64 Compare February 2, 2023 23:52
manifests/params.pp Outdated Show resolved Hide resolved
@jbh jbh force-pushed the zendphp-support branch from af47e64 to dcbfd37 Compare February 3, 2023 00:05
@jbh jbh force-pushed the zendphp-support branch from dcbfd37 to 30abe14 Compare February 3, 2023 19:51
Copy link
Member

@root-expert root-expert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work!

@root-expert root-expert changed the title ZendPHP support Add ZendPHP support Feb 5, 2023
@root-expert root-expert merged commit e35d454 into voxpupuli:master Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants