Increase minimal PHP version? #302
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha#302
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, we document the minimal PHP version at 5.6. However, newer PHP version have interesting features that we might want to use. Also, 5.6 is already six years old, and e.g. 7.0 was released 5 years ago already. PHP7.0 is also the default version in Debian stretch (oldstable), Debian stable already has PHP7.3.
So, upgrading would probably be feasible. What are interesting things we would gain?
int,string, etc since PHP7) anditerablefrom 7.1: https://www.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration??which allows simplifying things likereturn isset($array[$key]) ? $array[$key] : $defaultsince 7.0.[], simplifies handling multiple return values from a function, e.g.[$a, $b] = someFunc();. This was already possible withlist($a, $b) = someFunc();, but since 7.0 this supports[]as well, and since 7.1 this supports associative arrays as well (but that is probably less readable).@laurensmartina, @RoukePouw, Anything else to add to this list?
One more thing: Upgrading to 7.1 allows updating php-dom-wrapper to the latest version (since a while, we've only been backporting fixes, rather than just updating to complete new versions).
PHP 7.4 also adds type annotations to class attributes, but that is only released a few months ago, so probably too new.