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

Don't use features only available since PHP 7.3 #126

Closed
yhabteab opened this issue Sep 25, 2023 · 5 comments · Fixed by #232
Closed

Don't use features only available since PHP 7.3 #126

yhabteab opened this issue Sep 25, 2023 · 5 comments · Fixed by #232
Assignees

Comments

@yhabteab
Copy link
Member

I noticed in several places where array_key_last() is used, which is available since PHP 7.3.

$key = array_key_last($this->options);

$key = array_key_last($this->options);

$newPosition = (int) array_key_last($escalations) + 1;

@yhabteab yhabteab changed the title Don't use features only available sind PHP 7.3 Don't use features only available since PHP 7.3 Sep 25, 2023
@nilmerg
Copy link
Member

nilmerg commented Sep 26, 2023

Or we consider changing the minimum requirement. To my knowledge, no distribution we support still uses PHP 7.2

@Al2Klimov
Copy link
Member

PHP
Debian 11 7.4
Ubuntu 20.04 7.4
SLES 12.5 7.4
RHEL 8 7.2*

* https://git.icinga.com/packages/icingaweb/-/jobs/534638

@nilmerg
Copy link
Member

nilmerg commented Jul 16, 2024

Well, seems we have to support 7.2 still.

@Al2Klimov
Copy link
Member

@lippserd FWIW:

PHP
Debian x, 11/12 7.4/8.2
Ubuntu x.04, 20/22/24 7.4/8.1/8.3
SLES 12.5 7.4
openSUSE 15.x, 3/4/5/6 7.4/8/8/8.2
Rocky x, 8/9 7.2/8
Amazon Linux It's complicated 😅

@Al2Klimov
Copy link
Member

@lippserd FWIW 2.0:

OS PHP EOL
Debian x, 11/12 7.4/8.2 2026-08-31/2028-06-30
Ubuntu x.04, 20/22/24 7.4/8.1/8.3 April 2025/June 2027/June 2029
SUSE 15.x, 5/6 8/8.2 It's complicated 😅
RHEL x, 8/9 8.2/8.2 May 31, 2029/May 31, 2032
Amazon Linux x, 2/2023 8.2/8.3 It's complicated 😅
  • I consider our current minimum of PHP 7.2 not too bad. At least far better than v5.3.
  • If we apply the stuff noted below, we can upgrade to PHP 7.4 without any delay.
  • In addition, if we wait 1.5y for some .deb OSes, we get PHP 8.

Notes

RHEL

  • yum module enable php:8.2
  • yum install php

Otherwise, it's PHP 7.2/8.

Amazon Linux 2

  • yum install amazon-linux-extras
  • amazon-linux-extras install php8.2

Otherwise, it's PHP 5.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants