Skip to content

Changes for release v4.0#1175

Merged
mike42 merged 16 commits intomasterfrom
development
May 23, 2022
Merged

Changes for release v4.0#1175
mike42 merged 16 commits intomasterfrom
development

Conversation

@mike42
Copy link
Owner

@mike42 mike42 commented May 23, 2022

This change updates the supported PHP versions, and contains some breaking changes to improve compatibility with newer PHP installs.

Breaking changes to users who are upgrading:

  • Support for PHP 7.0. 7.1 and 7.2 has been removed been removed. PHP 7.3 or higher is required from this version.
  • Source files now use declare(strict_types=1), which will cause errors for callers which are not using the correct scalar types.

Bug fixes:

  • Using the GD library to load images would result in an error on PHP 8. This was due to a change to the GD interface from PHP 8.0.
  • The example scripts now refer to vendor/autoload.php, so they will work if this repository is checked out and used standalone.
  • PHPUnit has been updated to version 9.0.

mike42 and others added 16 commits November 3, 2019 10:49
- the first arg UConverter->convert() has to be a string.
- as proved during tests, UConverter->convert() can return boolean sometimes.
    - thus $utf8 can be boolean sometimes, not only string.
    - but the full documentation of UConverter->convert() is currently missing on php docs.
- On strict_types, PHP cannot convert float to int.
- That's the behavior with strict_types when we call chr() passing a float:
    - PHP 7.0 passes 0 instead -- this can be a silent error, not good.
    - PHP 7.4 returns Fatal Error, which is better.
- This commit cast it to int before calling chr() to keep the previous behavior.
Change supported php versions, apply 8.0 fixes and build environment changes
@mike42 mike42 merged commit 74fd89a into master May 23, 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.

3 participants