Skip to content

Releases: nicoverbruggen/image-generator

v3.0.0

07 Aug 09:22
Compare
Choose a tag to compare
  • Requires PHP 8.1 or newer
  • Added a simple test to verify image generation is not broken
  • Added GitHub Actions for running the test(s)
  • Removed the deprecated makePlaceholderImage function (hence the bump to v3)

Full Changelog: v2.2.0...v3.0.0

v2.2.0

07 Aug 08:28
Compare
Choose a tag to compare

What's Changed

  • Fix deprecated method calling itself (makePlaceholderImage() now correctly calls generate(), although this deprecated function will be removed in v3)
  • When outputting the image to the output buffer, the output buffer is now erased beforehand using ob_clean()
  • Fix warnings for upcoming PHP 8.1 by @mjot in #4

New Contributors

  • @mjot made their first contribution in #4

Full Changelog: v2.1.0...v2.2.0

v2.1

16 Nov 20:14
Compare
Choose a tag to compare

The package has been updated for the upcoming release of PHP 8.1!

This is a simple maintenance release so that there are no more warnings about the following:

  • the loss of precision from implicit casts (float to int)
  • passing null to the third parameter of str_replace is deprecated

v2.0.1

14 Mar 22:43
Compare
Choose a tag to compare

The package has been updated for PHP 8!

What's new

With named parameter support, now you can do this:

(new ImageGenerator(
    targetSize: "150x150",
    fontPath: "/System/Library/Fonts/Supplemental/Arial.ttf",
    fontSize: 20
))->generate(text: "Hello world");

Upgrade instructions

  • The constructor of ImageGenerator has changed, so you will want to adopt named parameters.
  • The method makePlaceholderImage still exists (because it was still in v2.0.0), but it is deprecated in favor of generate.