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

Remove Compatibility for PHP 7.3 and Below #6011

Closed
4 of 10 tasks
bshaffer opened this issue Mar 28, 2023 · 1 comment
Closed
4 of 10 tasks

Remove Compatibility for PHP 7.3 and Below #6011

bshaffer opened this issue Mar 28, 2023 · 1 comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bshaffer
Copy link
Contributor

bshaffer commented Mar 28, 2023

Remove compatibility for PHP 7.3 and below by making the following change:

Requirements

  • Remove tests for PHP 7.3 and below
  • Update require.php in composer.json
  • Remove support older versions of dependent libraries (Guzzle 5, monolog/monolog:1, ramsey/uuid, google/common-protos)
  • Remove phpunit 4/5 and roave phpunit-polyfill

Enhancements

  • 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 return typehints
  • Add primitive type hints
  • Add typed properties
  • use PHP Arrow Functions
  • replace calls to call_user_func_array with the spread operator
@bshaffer bshaffer added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Apr 7, 2023
@bshaffer
Copy link
Contributor Author

Closing this as all required tasks are complete. Opened #6213 so we can track the enhancements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant