All notable changes to the linebreaks4imagettftext project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v2.0.0 (August 5, 2026)
linebreaks4imagettftext is now part of AgjGd. The implementation has moved to the \AndrewGJohnson\AgjGd class and this package is now a thin reverse-compatibility wrapper around it.
- Breaking: raised the minimum PHP version from 5.3 to 8.0
- Breaking: added a dependency on
andrewgjohnson/agjgd; thelinebreaks4imagettftext()implementation now lives in the\AndrewGJohnson\AgjGdclass - Changed the namespaced
\AndrewGJohnson\AgjGd\linebreaks4imagettftext()function into a deprecated reverse-compatibility wrapper that forwards to\AndrewGJohnson\AgjGd::linebreaks4imagettftext(); please use the class in new code - Changed the legacy
\andrewgjohnson\linebreaks4imagettftext()function to forward to the class directly rather than through the\AndrewGJohnson\AgjGdnamespaced function; it remains deprecated - Updated the examples and documentation to load the class through Composer’s autoloader
v1.1.2 (May 13, 2026)
- Changed the font in the examples from Arial to Noto Sans which uses the SIL OFL 1.1
- Updated documentation website to replace deprecated
hljs.initHighlighting()call withhljs.highlightAll()and removed obsolete Google Analytics script - Fixed broken link in examples/README.md that was pointing to the wrong domain for the examples page
- Fixed source file path for non-Composer usage in README.md and moved the Example section above the Usage section
- Fixed grammar errors and typos in comments across README.md, linebreaks4imagettftext.php and reverseCompatibility.php
- Updated 02-using-the-parameters.php with adjusted image dimensions and improved example strings
- Added unit tests to Linebreaks4imagettftextTest.php covering return type, empty input, single word, line-break insertion, custom break characters, word preservation,
$forceBreakOnSingleWords,$attemptToBreakOnHyphensand$preventWidows
v1.1.1 (May 9, 2026)
- Added .gitattributes file to help manage end-of-line characters
- Added a
version_compare()check before allimagedestroy()calls; the imagedestroy() function became an optional step that did nothing as of PHP 8.0 but as of PHP 8.5 when invoked it produces a deprecated notice
v1.1.0 (May 5, 2026)
- Added Contribute page and updated contributing guidelines
- Added PHP_CodeSniffer support to enforce PSR-12 and PHP 5.0 compatibility
- Added PHPUnit support for unit tests
- Added
lint,lint:fix,phpunitandtestcomposer scripts - Added
$attemptToBreakOnHyphens,$forceBreakOnSingleWordsand$preventWidowsparameters to support additional options when rendering text - Fixed support for older PHP versions; this project now truly supports PHP 5.0
- Fixed a number of broken links
- Changed to the
AndrewGJohnson\AgjGdnamespace but added reverse compatibility to support the originalandrewgjohnsonnamespace
v1.0.3 (November 22, 2022)
- Signed up for Patreon and added links to README.md
- Added
.githubfolder to unclutter the root directory - Added
CODEOWNERSfile - Added
FUNDING.ymlfile - Added
SECURITY.mdfile - Added
SUPPORT.mdfile - Updated shields.io badge aesthetics on README.md
- Removed the MIT logo from the shields.io badge for linebreaks4imagettftext's license
- Added Patrons shields.io badge to README.md
- Enabled GitHub discussions area and now recommending it over StackOverflow
- Removed
ISSUE_TEMPLATE.mdfile for our single issue template and replaced withISSUE_TEMPLATEfolder to separate bug reports & feature requests within GitHub issues - Updated avatar image
- Moved all Twitter activity for all agjgd projects (including linebreaks4imagettftext) to the @agjgdphp Twitter account as there were issues with the individual accounts being frozen
- Changed documentation website to linebreaks4imagettftext.agjgd.org
- Updated copyright years to 2022
v1.0.2 (December 15, 2018)
- Fixed bug that would sometimes exclude a space when doing calculations
- Added return type for PHPDoc
- Cosmetic updates to https://linebreaks4imagettftext.agjgd.org/
v1.0.1 (June 4, 2018)
- Enabled HTTPS on https://linebreaks4imagettftext.agjgd.org/
- Switched YUI reset CSS from Yahoo hosted to inline
- Switched to DIR constant in examples to get current directory
- Refactored example with more comments & better naming
- Refactored source to pass phpcs line length limit of 85 characters
v1.0.0 (June 3, 2018)
- Initial release of linebreaks4imagettftext