1# Change Log
2All notable changes to this project will be documented in this file.
3Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
4
5**Upgrading from 1.x?** See <https://commonmark.thephpleague.com/2.0/upgrading/> for additional information.
6
7## [Unreleased][unreleased]
8
9## [2.4.1] - 2023-08-30
10
11### Fixed
12
13- Fixed `ExternalLinkProcessor` not fully disabling the `rel` attribute when configured to do so (#992)
14
15## [2.4.0] - 2023-03-24
16
17### Added
18
19- Added generic `CommonMarkException` marker interface for all exceptions thrown by the library
20- Added several new specific exception types implementing that marker interface:
21    - `AlreadyInitializedException`
22    - `InvalidArgumentException`
23    - `IOException`
24    - `LogicException`
25    - `MissingDependencyException`
26    - `NoMatchingRendererException`
27    - `ParserLogicException`
28- Added more configuration options to the Heading Permalinks extension (#939):
29    - `heading_permalink/apply_id_to_heading` - When `true`, the `id` attribute will be applied to the heading element itself instead of the `<a>` tag
30    - `heading_permalink/heading_class` - class to apply to the heading element
31    - `heading_permalink/insert` - now accepts `none` to prevent the creation of the `<a>` link
32- Added new `table/alignment_attributes` configuration option to control how table cell alignment is rendered (#959)
33
34### Changed
35
36- Change several thrown exceptions from `RuntimeException` to `LogicException` (or something extending it), including:
37    - `CallbackGenerator`s that fail to set a URL or return an expected value
38    - `MarkdownParser` when deactivating the last block parser or attempting to get an active block parser when they've all been closed
39    - Adding items to an already-initialized `Environment`
40    - Rendering a `Node` when no renderer has been registered for it
41- `HeadingPermalinkProcessor` now throws `InvalidConfigurationException` instead of `RuntimeException` when invalid config values are given.
42- `HtmlElement::setAttribute()` no longer requires the second parameter for boolean attributes
43- Several small micro-optimizations
44- Changed Strikethrough to only allow 1 or 2 tildes per the updated GFM spec
45
46### Fixed
47
48- Fixed inaccurate `@throws` docblocks throughout the codebase, including `ConverterInterface`, `MarkdownConverter`, and `MarkdownConverterInterface`.
49    - These previously suggested that only `\RuntimeException`s were thrown, which was inaccurate as `\LogicException`s were also possible.
50
51## [2.3.9] - 2023-02-15
52
53### Fixed
54
55- Fixed autolink extension not detecting some URIs with underscores (#956)
56
57## [2.3.8] - 2022-12-10
58
59### Fixed
60
61- Fixed parsing issues when `mb_internal_encoding()` is set to something other than `UTF-8` (#951)
62
63## [2.3.7] - 2022-11-03
64
65### Fixed
66
67- Fixed `TaskListItemMarkerRenderer` not including HTML attributes set on the node by other extensions (#947)
68
69## [2.3.6] - 2022-10-30
70
71### Fixed
72
73- Fixed unquoted attribute parsing when closing curly brace is followed by certain characters (like a `.`) (#943)
74
75## [2.3.5] - 2022-07-29
76
77### Fixed
78
79- Fixed error using `InlineParserEngine` when no inline parsers are registered in the `Environment` (#908)
80
81## [2.3.4] - 2022-07-17
82
83### Changed
84
85- Made a number of small tweaks to the embed extension's parsing behavior to fix #898:
86    - Changed `EmbedStartParser` to always capture embed-like lines in container blocks, regardless of parent block type
87    - Changed `EmbedProcessor` to also remove `Embed` blocks that aren't direct children of the `Document`
88    - Increased the priority of `EmbedProcessor` to `1010`
89
90### Fixed
91
92- Fixed `EmbedExtension` not parsing embeds following a list block (#898)
93
94## [2.3.3] - 2022-06-07
95
96### Fixed
97
98- Fixed `DomainFilteringAdapter` not reindexing the embed list (#884, #885)
99
100## [2.3.2] - 2022-06-03
101
102### Fixed
103
104- Fixed FootnoteExtension stripping extra characters from tab-indented footnotes (#881)
105
106## [2.2.5] - 2022-06-03
107
108### Fixed
109
110- Fixed FootnoteExtension stripping extra characters from tab-indented footnotes (#881)
111
112## [2.3.1] - 2022-05-14
113
114### Fixed
115
116- Fixed AutolinkExtension not ignoring trailing strikethrough syntax (#867)
117
118## [2.2.4] - 2022-05-14
119
120### Fixed
121
122- Fixed AutolinkExtension not ignoring trailing strikethrough syntax (#867)
123
124## [2.3.0] - 2022-04-07
125
126### Added
127
128- Added new `EmbedExtension` (#805)
129- Added `DocumentRendererInterface` as a replacement for the now-deprecated `MarkdownRendererInterface`
130
131### Deprecated
132
133- Deprecated `MarkdownRendererInterface`; use `DocumentRendererInterface` instead
134
135## [2.2.3] - 2022-02-26
136
137### Fixed
138
139- Fixed front matter parsing with Windows line endings (#821)
140
141## [2.1.3] - 2022-02-26
142
143### Fixed
144
145- Fixed front matter parsing with Windows line endings (#821)
146
147## [2.0.4] - 2022-02-26
148
149### Fixed
150
151- Fixed front matter parsing with Windows line endings (#821)
152
153## [2.2.2] - 2022-02-13
154
155### Fixed
156
157- Fixed double-escaping of image alt text (#806, #810)
158- Fixed Psalm typehints for event class names
159
160## [2.2.1] - 2022-01-25
161
162### Fixed
163
164 - Fixed `symfony/deprecation-contracts` constraint
165
166### Removed
167
168 - Removed deprecation trigger from `MarkdownConverterInterface` to reduce noise
169
170## [2.2.0] - 2022-01-22
171
172### Added
173
174 - Added new `ConverterInterface`
175 - Added new `MarkdownToXmlConverter` class
176 - Added new `HtmlDecorator` class which can wrap existing renderers with additional HTML tags
177 - Added new `table/wrap` config to apply an optional wrapping/container element around a table (#780)
178
179### Changed
180
181 - `HtmlElement` contents can now consist of any `Stringable`, not just `HtmlElement` and `string`
182
183### Deprecated
184
185 - Deprecated `MarkdownConverterInterface` and its `convertToHtml()` method; use `ConverterInterface` and `convert()` instead
186
187## [2.1.2] - 2022-02-13
188
189### Fixed
190
191- Fixed double-escaping of image alt text (#806, #810)
192- Fixed Psalm typehints for event class names
193
194## [2.1.1] - 2022-01-02
195
196### Added
197
198 - Added missing return type to `Environment::dispatch()` to fix deprecation warning (#778)
199
200## [2.1.0] - 2021-12-05
201
202### Added
203
204- Added support for ext-yaml in FrontMatterExtension (#715)
205- Added support for symfony/yaml v6.0 in FrontMatterExtension (#739)
206- Added new `heading_permalink/aria_hidden` config option (#741)
207
208### Fixed
209
210 - Fixed PHP 8.1 deprecation warning (#759, #762)
211
212## [2.0.3] - 2022-02-13
213
214### Fixed
215
216- Fixed double-escaping of image alt text (#806, #810)
217- Fixed Psalm typehints for event class names
218
219## [2.0.2] - 2021-08-14
220
221### Changed
222
223- Bumped minimum version of league/config to support PHP 8.1
224
225### Fixed
226
227- Fixed ability to register block parsers that identify lines starting with letters (#706)
228
229## [2.0.1] - 2021-07-31
230
231### Fixed
232
233- Fixed nested autolinks (#689)
234- Fixed description lists being parsed incorrectly (#692)
235- Fixed Table of Contents not respecting Heading Permalink prefixes (#690)
236
237## [2.0.0] - 2021-07-24
238
239No changes were introduced since the previous RC2 release.
240See all entries below for a list of changes between 1.x and 2.0.
241
242## [2.0.0-rc2] - 2021-07-17
243
244### Fixed
245
246- Fixed Mentions inside of links creating nested links against the spec's rules (#688)
247
248## [2.0.0-rc1] - 2021-07-10
249
250No changes were introduced since the previous release.
251
252## [2.0.0-beta3] - 2021-07-03
253
254### Changed
255
256 - Any leading UTF-8 BOM will be stripped from the input
257 - The `getEnvironment()` method of `CommonMarkConverter` and `GithubFlavoredMarkdownConverter` will always return the concrete, configurable `Environment` for upgrading convenience
258 - Optimized AST iteration
259 - Lots of small micro-optimizations
260
261## [2.0.0-beta2] - 2021-06-27
262
263### Added
264
265- Added new `Node::iterator()` method and `NodeIterator` class for faster AST iteration (#683, #684)
266
267### Changed
268
269- Made compatible with CommonMark spec 0.30.0
270- Optimized link label parsing
271- Optimized AST iteration for a 50% performance boost in some event listeners (#683, #684)
272
273### Fixed
274
275- Fixed processing instructions with EOLs
276- Fixed case-insensitive matching for HTML tag types
277- Fixed type 7 HTML blocks incorrectly interrupting lazy paragraphs
278- Fixed newlines in reference labels not collapsing into spaces
279- Fixed link label normalization with escaped newlines
280- Fixed unnecessary AST iteration when no default attributes are configured
281
282## [2.0.0-beta1] - 2021-06-20
283
284### Added
285
286 - **Added three new extensions:**
287   - `FrontMatterExtension` ([see documentation](https://commonmark.thephpleague.com/extensions/front-matter/))
288   - `DescriptionListExtension` ([see documentation](https://commonmark.thephpleague.com/extensions/description-lists/))
289   - `DefaultAttributesExtension` ([see documentation](https://commonmark.thephpleague.com/extensions/default-attributes/))
290 - **Added new `XmlRenderer` to simplify AST debugging** ([see documentation](https://commonmark.thephpleague.com/xml/)) (#431)
291 - **Added the ability to configure disallowed raw HTML tags** (#507)
292 - **Added the ability for Mentions to use multiple characters for their symbol** (#514, #550)
293 - **Added the ability to delegate event dispatching to PSR-14 compliant event dispatcher libraries**
294 - **Added new configuration options:**
295   - Added `heading_permalink/min_heading_level` and `heading_permalink/max_heading_level` options to control which headings get permalinks (#519)
296   - Added `heading_permalink/fragment_prefix` to allow customizing the URL fragment prefix (#602)
297   - Added `footnote/backref_symbol` option for customizing backreference link appearance (#522)
298   - Added `slug_normalizer/max_length` option to control the maximum length of generated URL slugs
299   - Added `slug_normalizer/unique` option to control whether unique slugs should be generated per-document or per-environment
300 - **Added purity markers throughout the codebase** (verified with Psalm)
301 - Added `Query` class to simplify Node traversal when looking to take action on certain Nodes
302 - Added new `HtmlFilter` and `StringContainerHelper` utility classes
303 - Added new `AbstractBlockContinueParser` class to simplify the creation of custom block parsers
304 - Added several new classes and interfaces:
305   - `BlockContinue`
306   - `BlockContinueParserInterface`
307   - `BlockContinueParserWithInlinesInterface`
308   - `BlockStart`
309   - `BlockStartParserInterface`
310   - `ChildNodeRendererInterface`
311   - `ConfigurableExtensionInterface`
312   - `CursorState`
313   - `DashParser` (extracted from `PunctuationParser`)
314   - `DelimiterParser`
315   - `DocumentBlockParser`
316   - `DocumentPreRenderEvent`
317   - `DocumentRenderedEvent`
318   - `EllipsesParser` (extracted from `PunctuationParser`)
319   - `ExpressionInterface`
320   - `FallbackNodeXmlRenderer`
321   - `InlineParserEngineInterface`
322   - `InlineParserMatch`
323   - `MarkdownParserState`
324   - `MarkdownParserStateInterface`
325   - `MarkdownRendererInterface`
326   - `Query`
327   - `RawMarkupContainerInterface`
328   - `ReferenceableInterface`
329   - `RenderedContent`
330   - `RenderedContentInterface`
331   - `ReplaceUnpairedQuotesListener`
332   - `SpecReader`
333   - `TableOfContentsRenderer`
334   - `UniqueSlugNormalizer`
335   - `UniqueSlugNormalizerInterface`
336   - `XmlRenderer`
337   - `XmlNodeRendererInterface`
338 - Added several new methods:
339   - `Cursor::getCurrentCharacter()`
340   - `Environment::createDefaultConfiguration()`
341   - `Environment::setEventDispatcher()`
342   - `EnvironmentInterface::getExtensions()`
343   - `EnvironmentInterface::getInlineParsers()`
344   - `EnvironmentInterface::getSlugNormalizer()`
345   - `FencedCode::setInfo()`
346   - `Heading::setLevel()`
347   - `HtmlRenderer::renderDocument()`
348   - `InlineParserContext::getFullMatch()`
349   - `InlineParserContext::getFullMatchLength()`
350   - `InlineParserContext::getMatches()`
351   - `InlineParserContext::getSubMatches()`
352   - `LinkParserHelper::parsePartialLinkLabel()`
353   - `LinkParserHelper::parsePartialLinkTitle()`
354   - `Node::assertInstanceOf()`
355   - `RegexHelper::isLetter()`
356   - `StringContainerInterface::setLiteral()`
357   - `TableCell::getType()`
358   - `TableCell::setType()`
359   - `TableCell::getAlign()`
360   - `TableCell::setAlign()`
361
362### Changed
363
364 - **Changed the converter return type**
365   - `CommonMarkConverter::convertToHtml()` now returns an instance of `RenderedContentInterface`. This can be cast to a string for backward compatibility with 1.x.
366 - **Table of Contents items are no longer wrapped with `<p>` tags** (#613)
367 - **Heading Permalinks now link to element IDs instead of using `name` attributes** (#602)
368 - **Heading Permalink IDs and URL fragments now have a `content` prefix by default** (#602)
369 - **Changes to configuration options:**
370     - `enable_em` has been renamed to `commonmark/enable_em`
371     - `enable_strong` has been renamed to `commonmark/enable_strong`
372     - `use_asterisk` has been renamed to `commonmark/use_asterisk`
373     - `use_underscore` has been renamed to `commonmark/use_underscore`
374     - `unordered_list_markers` has been renamed to `commonmark/unordered_list_markers`
375     - `mentions/*/symbol` has been renamed to `mentions/*/prefix`
376     - `mentions/*/regex` has been renamed to `mentions/*/pattern` and requires partial regular expressions (without delimiters or flags)
377     - `max_nesting_level` now defaults to `PHP_INT_MAX` and no longer supports floats
378     - `heading_permalink/slug_normalizer` has been renamed to `slug_normalizer/instance`
379 - **Event dispatching is now fully PSR-14 compliant**
380 - **Moved and renamed several classes** - [see the full list here](https://commonmark.thephpleague.com/2.0/upgrading/#classesnamespaces-renamed)
381 - The `HeadingPermalinkExtension` and `FootnoteExtension` were modified to ensure they never produce a slug which conflicts with slugs created by the other extension
382 - `SlugNormalizer::normalizer()` now supports optional prefixes and max length options passed in via the `$context` argument
383 - The `AbstractBlock::$data` and `AbstractInline::$data` arrays were replaced with a `Data` array-like object on the base `Node` class
384 - **Implemented a new approach to block parsing.** This was a massive change, so here are the highlights:
385   - Functionality previously found in block parsers and node elements has moved to block parser factories and block parsers, respectively ([more details](https://commonmark.thephpleague.com/2.0/upgrading/#new-block-parsing-approach))
386   - `ConfigurableEnvironmentInterface::addBlockParser()` is now `EnvironmentBuilderInterface::addBlockParserFactory()`
387   - `ReferenceParser` was re-implemented and works completely different than before
388   - The paragraph parser no longer needs to be added manually to the environment
389 - **Implemented a new approach to inline parsing** where parsers can now specify longer strings or regular expressions they want to parse (instead of just single characters):
390   - `InlineParserInterface::getCharacters()` is now `getMatchDefinition()` and returns an instance of `InlineParserMatch`
391   - `InlineParserContext::__construct()` now requires the contents to be provided as a `Cursor` instead of a `string`
392 - **Implemented delimiter parsing as a special type of inline parser** (via the new `DelimiterParser` class)
393 - **Changed block and inline rendering to use common methods and interfaces**
394   - `BlockRendererInterface` and `InlineRendererInterface` were replaced by `NodeRendererInterface` with slightly different parameters. All core renderers now implement this interface.
395   - `ConfigurableEnvironmentInterface::addBlockRenderer()` and `addInlineRenderer()` were combined into `EnvironmentBuilderInterface::addRenderer()`
396   - `EnvironmentInterface::getBlockRenderersForClass()` and `getInlineRenderersForClass()` are now just `getRenderersForClass()`
397 - **Completely refactored the Configuration implementation**
398   - All configuration-specific classes have been moved into a new `league/config` package with a new namespace
399   - `Configuration` objects must now be configured with a schema and all options must match that schema - arbitrary keys are no longer permitted
400   - `Configuration::__construct()` no longer accepts the default configuration values - use `Configuration::merge()` instead
401   - `ConfigurationInterface` now only contains a `get(string $key)`; this method no longer allows arbitrary default values to be returned if the option is missing
402   - `ConfigurableEnvironmentInterface` was renamed to `EnvironmentBuilderInterface`
403   - `ExtensionInterface::register()` now requires an `EnvironmentBuilderInterface` param instead of `ConfigurableEnvironmentInterface`
404 - **Added missing return types to virtually every class and interface method**
405 - Re-implemented the GFM Autolink extension using the new inline parser approach instead of document processors
406   - `EmailAutolinkProcessor` is now `EmailAutolinkParser`
407   - `UrlAutolinkProcessor` is now `UrlAutolinkParser`
408 - `HtmlElement` can now properly handle array (i.e. `class`) and boolean (i.e. `checked`) attribute values
409 - `HtmlElement` automatically flattens any attributes with array values into space-separated strings, removing duplicate entries
410 - Combined separate classes/interfaces into one:
411   - `DisallowedRawHtmlRenderer` replaces `DisallowedRawHtmlBlockRenderer` and `DisallowedRawHtmlInlineRenderer`
412   - `NodeRendererInterface` replaces `BlockRendererInterface` and `InlineRendererInterface`
413 - Renamed the following methods:
414   - `Environment` and `ConfigurableEnvironmentInterface`:
415     - `addBlockParser()` is now `addBlockStartParser()`
416   - `ReferenceMap` and `ReferenceMapInterface`:
417     - `addReference()` is now `add()`
418     - `getReference()` is now `get()`
419     - `listReferences()` is now `getIterator()`
420   - Various node (block/inline) classes:
421     - `getContent()` is now `getLiteral()`
422     - `setContent()` is now `setLiteral()`
423 - Moved and renamed the following constants:
424   - `EnvironmentInterface::HTML_INPUT_ALLOW` is now `HtmlFilter::ALLOW`
425   - `EnvironmentInterface::HTML_INPUT_ESCAPE` is now `HtmlFilter::ESCAPE`
426   - `EnvironmentInterface::HTML_INPUT_STRIP` is now `HtmlFilter::STRIP`
427   - `TableCell::TYPE_HEAD` is now `TableCell::TYPE_HEADER`
428   - `TableCell::TYPE_BODY` is now `TableCell::TYPE_DATA`
429 - Changed the visibility of the following properties:
430   - `AttributesInline::$attributes` is now `private`
431   - `AttributesInline::$block` is now `private`
432   - `TableCell::$align` is now `private`
433   - `TableCell::$type` is now `private`
434   - `TableSection::$type` is now `private`
435 - Several methods which previously returned `$this` now return `void`
436   - `Delimiter::setPrevious()`
437   - `Node::replaceChildren()`
438   - `Context::setTip()`
439   - `Context::setContainer()`
440   - `Context::setBlocksParsed()`
441   - `AbstractStringContainer::setContent()`
442   - `AbstractWebResource::setUrl()`
443 - Several classes are now marked `final`:
444   - `ArrayCollection`
445   - `Emphasis`
446   - `FencedCode`
447   - `Heading`
448   - `HtmlBlock`
449   - `HtmlElement`
450   - `HtmlInline`
451   - `IndentedCode`
452   - `Newline`
453   - `Strikethrough`
454   - `Strong`
455   - `Text`
456 - `Heading` nodes no longer directly contain a copy of their inner text
457 - `StringContainerInterface` can now be used for inlines, not just blocks
458 - `ArrayCollection` only supports integer keys
459 - `HtmlElement` now implements `Stringable`
460 - `Cursor::saveState()` and `Cursor::restoreState()` now use `CursorState` objects instead of arrays
461 - `NodeWalker::next()` now enters, traverses any children, and leaves all elements which may have children (basically all blocks plus any inlines with children). Previously, it only did this for elements explicitly marked as "containers".
462 - `InvalidOptionException` was removed
463 - Anything with a `getReference(): ReferenceInterface` method now implements `ReferencableInterface`
464 - The `SmartPunct` extension now replaces all unpaired `Quote` elements with `Text` elements towards the end of parsing, making the `QuoteRenderer` unnecessary
465 - Several changes made to the Footnote extension:
466   - Footnote identifiers can no longer contain spaces
467   - Anonymous footnotes can now span subsequent lines
468   - Footnotes can now contain multiple lines of content, including sub-blocks, by indenting them
469   - Footnote event listeners now have numbered priorities (but still execute in the same order)
470   - Footnotes must now be separated from previous content by a blank line
471 - The line numbers (keys) returned via `MarkdownInput::getLines()` now start at 1 instead of 0
472 - `DelimiterProcessorCollectionInterface` now extends `Countable`
473 - `RegexHelper::PARTIAL_` constants must always be used in case-insensitive contexts
474 - `HeadingPermalinkProcessor` no longer accepts text normalizers via the constructor - these must be provided via configuration instead
475 - Blocks which can't contain inlines will no longer be asked to render inlines
476 - `AnonymousFootnoteRefParser` and `HeadingPermalinkProcessor` now implement `EnvironmentAwareInterface` instead of `ConfigurationAwareInterface`
477 - The second argument to `TextNormalizerInterface::normalize()` must now be an array
478 - The `title` attribute for `Link` and `Image` nodes is now stored using a dedicated property instead of stashing it in `$data`
479 - `ListData::$delimiter` now returns either `ListBlock::DELIM_PERIOD` or `ListBlock::DELIM_PAREN` instead of the literal delimiter
480
481### Fixed
482
483 - **Fixed parsing of footnotes without content**
484 - **Fixed rendering of orphaned footnotes and footnote refs**
485 - **Fixed some URL autolinks breaking too early** (#492)
486 - Fixed `AbstractStringContainer` not actually being `abstract`
487
488### Removed
489
490 - **Removed support for PHP 7.1, 7.2, and 7.3** (#625, #671)
491 - **Removed all previously-deprecated functionality:**
492   - Removed the ability to pass custom `Environment` instances into the `CommonMarkConverter` and `GithubFlavoredMarkdownConverter` constructors
493   - Removed the `Converter` class and `ConverterInterface`
494   - Removed the `bin/commonmark` script
495   - Removed the `Html5Entities` utility class
496   - Removed the `InlineMentionParser` (use `MentionParser` instead)
497   - Removed `DefaultSlugGenerator` and `SlugGeneratorInterface` from the `Extension/HeadingPermalink/Slug` sub-namespace (use the new ones under `./SlugGenerator` instead)
498   - Removed the following `ArrayCollection` methods:
499     - `add()`
500     - `set()`
501     - `get()`
502     - `remove()`
503     - `isEmpty()`
504     - `contains()`
505     - `indexOf()`
506     - `containsKey()`
507     - `replaceWith()`
508     - `removeGaps()`
509   - Removed the `ConfigurableEnvironmentInterface::setConfig()` method
510   - Removed the `ListBlock::TYPE_UNORDERED` constant
511   - Removed the `CommonMarkConverter::VERSION` constant
512   - Removed the `HeadingPermalinkRenderer::DEFAULT_INNER_CONTENTS` constant
513   - Removed the `heading_permalink/inner_contents` configuration option
514 - **Removed now-unused classes:**
515   - `AbstractStringContainerBlock`
516   - `BlockRendererInterface`
517   - `Context`
518   - `ContextInterface`
519   - `Converter`
520   - `ConverterInterface`
521   - `InlineRendererInterface`
522   - `PunctuationParser` (was split into two classes: `DashParser` and `EllipsesParser`)
523   - `QuoteRenderer`
524   - `UnmatchedBlockCloser`
525 - Removed the following methods, properties, and constants:
526   - `AbstractBlock::$open`
527   - `AbstractBlock::$lastLineBlank`
528   - `AbstractBlock::isContainer()`
529   - `AbstractBlock::canContain()`
530   - `AbstractBlock::isCode()`
531   - `AbstractBlock::matchesNextLine()`
532   - `AbstractBlock::endsWithBlankLine()`
533   - `AbstractBlock::setLastLineBlank()`
534   - `AbstractBlock::shouldLastLineBeBlank()`
535   - `AbstractBlock::isOpen()`
536   - `AbstractBlock::finalize()`
537   - `AbstractBlock::getData()`
538   - `AbstractInline::getData()`
539   - `ConfigurableEnvironmentInterface::addBlockParser()`
540   - `ConfigurableEnvironmentInterface::mergeConfig()`
541   - `Delimiter::setCanClose()`
542   - `EnvironmentInterface::getConfig()`
543   - `EnvironmentInterface::getInlineParsersForCharacter()`
544   - `EnvironmentInterface::getInlineParserCharacterRegex()`
545   - `HtmlRenderer::renderBlock()`
546   - `HtmlRenderer::renderBlocks()`
547   - `HtmlRenderer::renderInline()`
548   - `HtmlRenderer::renderInlines()`
549   - `Node::isContainer()`
550   - `RegexHelper::matchAll()` (use the new `matchFirst()` method instead)
551   - `RegexHelper::REGEX_WHITESPACE`
552 - Removed the second `$contents` argument from the `Heading` constructor
553
554### Deprecated
555
556**The following things have been deprecated and will not be supported in v3.0:**
557
558 - `Environment::mergeConfig()` (set configuration before instantiation instead)
559 - `Environment::createCommonMarkEnvironment()` and `Environment::createGFMEnvironment()`
560    - Alternative 1: Use `CommonMarkConverter` or `GithubFlavoredMarkdownConverter` if you don't need to customize the environment
561    - Alternative 2: Instantiate a new `Environment` and add the necessary extensions yourself
562
563[unreleased]: https://github.com/thephpleague/commonmark/compare/2.4.1...main
564[2.4.1]: https://github.com/thephpleague/commonmark/compare/2.4.0...2.4.1
565[2.4.0]: https://github.com/thephpleague/commonmark/compare/2.3.9...2.4.0
566[2.3.9]: https://github.com/thephpleague/commonmark/compare/2.3.8...2.3.9
567[2.3.8]: https://github.com/thephpleague/commonmark/compare/2.3.7...2.3.8
568[2.3.7]: https://github.com/thephpleague/commonmark/compare/2.3.6...2.3.7
569[2.3.6]: https://github.com/thephpleague/commonmark/compare/2.3.5...2.3.6
570[2.3.5]: https://github.com/thephpleague/commonmark/compare/2.3.4...2.3.5
571[2.3.4]: https://github.com/thephpleague/commonmark/compare/2.3.3...2.3.4
572[2.3.3]: https://github.com/thephpleague/commonmark/compare/2.3.2...2.3.3
573[2.3.2]: https://github.com/thephpleague/commonmark/compare/2.3.2...main
574[2.3.1]: https://github.com/thephpleague/commonmark/compare/2.3.0...2.3.1
575[2.3.0]: https://github.com/thephpleague/commonmark/compare/2.2.3...2.3.0
576[2.2.5]: https://github.com/thephpleague/commonmark/compare/2.2.4...2.2.5
577[2.2.4]: https://github.com/thephpleague/commonmark/compare/2.2.3...2.2.4
578[2.2.3]: https://github.com/thephpleague/commonmark/compare/2.2.2...2.2.3
579[2.2.2]: https://github.com/thephpleague/commonmark/compare/2.2.1...2.2.2
580[2.2.1]: https://github.com/thephpleague/commonmark/compare/2.2.0...2.2.1
581[2.2.0]: https://github.com/thephpleague/commonmark/compare/2.1.1...2.2.0
582[2.1.3]: https://github.com/thephpleague/commonmark/compare/2.1.2...2.1.3
583[2.1.2]: https://github.com/thephpleague/commonmark/compare/2.1.1...2.1.2
584[2.1.1]: https://github.com/thephpleague/commonmark/compare/2.0.2...2.1.1
585[2.1.0]: https://github.com/thephpleague/commonmark/compare/2.0.2...2.1.0
586[2.0.4]: https://github.com/thephpleague/commonmark/compare/2.0.3...2.0.4
587[2.0.3]: https://github.com/thephpleague/commonmark/compare/2.0.2...2.0.3
588[2.0.2]: https://github.com/thephpleague/commonmark/compare/2.0.1...2.0.2
589[2.0.1]: https://github.com/thephpleague/commonmark/compare/2.0.0...2.0.1
590[2.0.0]: https://github.com/thephpleague/commonmark/compare/2.0.0-rc2...2.0.0
591[2.0.0-rc2]: https://github.com/thephpleague/commonmark/compare/2.0.0-rc1...2.0.0-rc2
592[2.0.0-rc1]: https://github.com/thephpleague/commonmark/compare/2.0.0-beta3...2.0.0-rc1
593[2.0.0-beta3]: https://github.com/thephpleague/commonmark/compare/2.0.0-beta2...2.0.0-beta3
594[2.0.0-beta2]: https://github.com/thephpleague/commonmark/compare/2.0.0-beta1...2.0.0-beta2
595[2.0.0-beta1]: https://github.com/thephpleague/commonmark/compare/1.6...2.0.0-beta1
596