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

Updates and PHP 8.1 compatibility #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

soundslocke
Copy link

@soundslocke soundslocke commented Sep 4, 2022

First of all, thank you for publishing this library! It is helpful for handling SMS text content.

We created a fork and made some updates as a result of upgrading to PHP 8.1+ and seeing that this library dependency causes deprecation notices.

The following has been done:

  • Switch to PHP 8.1 method signatures.
  • Update required PHP version in composer.json file.
  • Update from switch to match expressions.
  • Replace array "get" methods with const arrays.
  • Add visibility to const values.
  • Remove redundant Gsm7bitExMap array.
  • Avoid juggling null in replaceNonGsmChars().

Additionally, we've pulled in the commits from PR #20 which seems like a worthwhile improvement to the library that we wanted for our fork. If you would rather merge that PR separately we can drop those commits from here.

If this PR gets merged you'll probably want to make a new major version release of the library since this does break backwards compatibility. Given this discussion about semver we would suggest a 1.0.0 release.

Resolves #23

gabsource and others added 3 commits September 2, 2022 21:18
- Switch to PHP 8.1 method signatures.
- Update required PHP version in composer.json.
- Update from `switch` to `match` expression.
- Replace array "get" methods with const arrays.
- Add visibility to const values.
- Remove redundant `Gsm7bitExMap` array.
- Avoid juggling `null` in `replaceNonGsmChars()`.
@soundslocke soundslocke changed the title Library updates and PHP 8.1 compatibility Updates and PHP 8.1 compatibility Sep 4, 2022
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 this pull request may close these issues.

PHP 8 deprecations
2 participants