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

Upgrade handwritten libraries with PHP 7.4+ features #6213

Open
6 tasks
bshaffer opened this issue May 11, 2023 · 1 comment
Open
6 tasks

Upgrade handwritten libraries with PHP 7.4+ features #6213

bshaffer opened this issue May 11, 2023 · 1 comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bshaffer
Copy link
Contributor

bshaffer commented May 11, 2023

  • Use null-coalescing operator (??) instead of isset and ternary operators.
    // PHP 5.6
    $var = isset($array['key']) ? $array['key'] : 'default';
    // PHP 7.4
    $var = $array['key'] ?? 'default';
  • Add typed properties
  • use PHP Arrow Functions
  • replace calls to call_user_func_array with the spread operator
  • Add return typehints
  • Add primitive type hints
@yash30201 yash30201 added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 18, 2023
@yash30201
Copy link
Contributor

@bshaffer , Should #6049 should mark the first task as complete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants