September Project Updates

Composer Update

This month I released updates for a few of my open-source PHP libraries including league/commonmark, league/html-to-markdown, and colinodell/json5. Here's a quick summary with release notes:

league/commonmark v0.18

No breaking changes were introduced to the League's PHP Markdown library, but we did add a new interface: ConverterInface. Consider depending on this interface in your code instead of the concrete implementation.

Other changes include:

Added

  • Added ListItem::getListData() method (#329)

Changed

  • Links with target="_blank" will also get rel="noopener noreferrer" by default (#331)
  • Implemented several performance optimizations (#324)

league/html-to-markdown v4.8.0

The League's HTML to Markdown converter received several bug fixes, as well as a new interface and the ability to convert email auto-links!

Added

  • Added support for email auto-linking
  • Added a new interface (HtmlConverterInterface) for the main HtmlConverter class
  • Added additional test cases (#14)

Changed

  • The italic_style option now defaults to '*' so that in-word emphasis is handled properly (#75)

Fixed

  • Fixed several issues of <code> and <pre> tags not converting to blocks or inlines properly (#26, #70, #102, #140, #161, #162)
  • Fixed in-word emphasis using underscores as delimiter (#75)
  • Fixed character escaping inside of <div> elements
  • Fixed header edge cases

Deprecated

  • The bold_style and italic_style options have been deprecated (#75)

colinodell/json v1.0.5

This was a really small bug fix release. Trying to parse malformed JSON like { or [ (without the closer) now results in a SyntaxError as expected.

Fixed

  • Fixed exceptions not being thrown for incomplete objects/arrays

colinodell/json v2.0.0

No parsing functionality changed in the version 2 major release, but we did improve drop-in replacement for PHP 7.3.

Our SyntaxError exception now extends the new core \JsonException! Any PHP 7.3 code expecting this exception will continue to work flawlessly when you swap out json_decode() for json5_decode(). And for older versions of PHP we also include a polyfill so that you can reference the new JsonException class and JSON_THROW_ON_ERROR constant in your code.

Added

  • Added a polyfill for class \JsonException (added in PHP 7.3)
  • Added a polyfill for constant JSON_THROW_ON_ERROR

Changed

  • The SyntaxError class now extends from \JsonException

Keep In Touch!

About Colin O'Dell

Colin O'Dell

Colin O'Dell is a Senior Software Engineer at SeatGeek. In addition to being an active member of the PHP League and maintainer of the league/commonmark project, Colin is also a PHP docs contributor, conference speaker, and author of the PHP 7 Migration Guide.