Or, if you only want a subset of GFM extensions, you can add them individually like this instead:

useLeague\CommonMark\CommonMarkConverter;useLeague\CommonMark\Environment;useLeague\CommonMark\Extension\Autolink\AutolinkExtension;useLeague\CommonMark\Extension\DisallowedRawHtml\DisallowedRawHtmlExtension;useLeague\CommonMark\Extension\Strikethrough\StrikethroughExtension;useLeague\CommonMark\Extension\Table\TableExtension;useLeague\CommonMark\Extension\TaskList\TaskListExtension;$environment=Environment::createCommonMarkEnvironment();// Remove any of the lines below if you don't want a particular feature$environment->addExtension(newAutolinkExtension());$environment->addExtension(newDisallowedRawHtmlExtension());$environment->addExtension(newStrikethroughExtension());$environment->addExtension(newTableExtension());$environment->addExtension(newTaskListExtension());$converter=newCommonMarkConverter([],$environment);echo$converter->convertToHtml('Hello GFM!');