geerlingguy / ansible-role-php

Ansible Role - PHP
https://galaxy.ansible.com/geerlingguy/php/
MIT License
496 stars 442 forks source link

Issue when using PHP<8 and specifying the version as a float (and not str) #411

Closed yzoug closed 7 months ago

yzoug commented 1 year ago

The commit 73c526d073dfd277eba3d6897806a2c430e017d8 introduced the following bug, when passing php_default_version_debian as a float and not a string:

fatal: [my-server]: FAILED! =>
  msg: 'Unexpected templating type error occurred on ({{ ''php'' + php_default_version_debian + ''-json'' }}): can only concatenate str (not "float") to str. can only concatenate str (not "float") to str'

You can bypass this by specifying your php_default_version_debian as a string:

+php_default_version_debian: "7.0"
-php_default_version_debian: 7.0

Should probably be fixed though. The way the variable is constructed makes it hard to do a simple fix (didn't look very much into it since the workaround works for me).

github-actions[bot] commented 9 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] commented 7 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.