cookbook 'codenamephp_php', '= 2.0.0'
The codenamephp_php cookbook has been deprecated
Author provided reason for deprecation:
The codenamephp_php cookbook has been deprecated and is no longer being maintained by its authors. Use of the codenamephp_php cookbook is no longer recommended.
codenamephp_php (12) Versions 2.0.0 Follow0
Cookbook to install php
cookbook 'codenamephp_php', '= 2.0.0', :supermarket
knife supermarket install codenamephp_php
knife supermarket download codenamephp_php
Chef Cookbook PHP
Cookbook to install php and apache2
Requirements
Supported Platforms
- Debian Stretch
Supported PHP versions
- 5.6
- 7.1
- 7.2
Chef
- Chef 13.0+
Cookbook Depdendencies
Usage
Add the cookbook to your Berksfile:
cookbook 'codename_php'
Don't forget to add the version constraint for the latest version, e.g. "~> 2.0"
Add the cookbook to your runlist. Since the default recipe is a No-Op, you need to add the version you want as recipe.
This example will install php5.6 and php7.1 where php7.1 will be used for apache since it is the last package to install the apache package.
{ "name": "default", "chef_type": "role", "json_class": "Chef::Role", "run_list": [ "recipe[codename_php::5.6]" "recipe[codename_php::7.1]" ] }
Attributes
Overwrites
Common
-
default['codename_php']['install_apache'] = true
Set to false if you only want php as cli -
default['codename_php']['install_composer'] = true
Set to false if you don't want composer installed -
default['codename_php']['install_xdebug'] = true
Set to false if you don't want xdebug installed
Sury Repository
By default, the repository from Ondřej Surý is used as it provides the most recent and some older versions.
-
default['codename_php']['add_sury_repository'] = true
Set to false if you want to use the OS default channels. Be aware that not all PHP versions might be available.
Recipes
5.6
Includes the add_sury_repository add the APT repo if the attribute is set to true (which it is by default). The installs the CLI package and if install_apache is set to true (which it is by default) the apache package is installed as well. Then the additional packages from the attributes are installed one by one. Then, composer.phar is downloaded and placed in the path if the install attribute is set to true so composer is available globally. Finally, xdebug will be installed from package if the attribute is still set to true.
7.1
Includes the add_sury_repository add the APT repo if the attribute is set to true (which it is by default). The installs the CLI package and if install_apache is set to true (which it is by default) the apache package is installed as well. Then the additional packages from the attributes are installed one by one. Then, composer.phar is downloaded and placed in the path if the install attribute is set to true so composer is available globally. Finally, xdebug will be installed from package if the attribute is still set to true.
7.2
Includes the add_sury_repository add the APT repo if the attribute is set to true (which it is by default). The installs the CLI package and if install_apache is set to true (which it is by default) the apache package is installed as well. Then the additional packages from the attributes are installed one by one. Then, composer.phar is downloaded and placed in the path if the install attribute is set to true so composer is available globally. Finally, xdebug will be installed from package if the attribute is still set to true.
add_sury_repositroy
Adds the repository from Ondřej Surý to apt.
Composer
Downloads the composer.phar directly from composer and places it in /usr/bin/composer so composer will be available globally. This is skipped if the file already exists.
Default
The default cookbook is a No-Op since you want to choose your PHP version and stick to it. Having the default cookbook to install some "random" version could lead
to unexpected updates and would cause more breaking changes.
XDebug
Installs xdebug from package.
Change Log
1.1.0 (2018-02-11)
Implemented enhancements:
- Change apache dependency #4
v1.0.0 (2018-02-10)
Implemented enhancements:
- Add PHP5.6 support #1
Merged pull requests:
- Release 1.0.0 #3 (bastianschwarz)
- Release 0.3.0 #2 (bastianschwarz)
* This Change Log was automatically generated by github_changelog_generator
Collaborator Number Metric
2.0.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.0.0 passed this metric
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.0 failed this metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.0.0 passed this metric
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.0 passed this metric
2.0.0 passed this metric
Testing File Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.0 failed this metric
2.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number