Merge branch '3.x' into 4.x

* 3.x:
  Fix wrong rounding_mode values
  #4677: Add use statements for classes referenced in the getOperators @psalm-return doc
  Update LeagueMarkdown.php
This commit is contained in:
Fabien Potencier
2025-08-17 19:19:20 +02:00
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -60,9 +60,9 @@ The list of supported options:
* ``floor``: Floor rounding
* ``down``: Rounding towards zero
* ``up``: Rounding away from zero
* ``half_even``: Round halves to the nearest even integer
* ``half_up``: Round halves up
* ``half_down``: Round halves down
* ``halfeven``: Round halves to the nearest even integer
* ``halfup``: Round halves up
* ``halfdown``: Round halves down
.. code-block:: twig
+2 -1
View File
@@ -12,13 +12,14 @@
namespace Twig\Extra\Markdown;
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\MarkdownConverter;
class LeagueMarkdown implements MarkdownInterface
{
private $converter;
private $legacySupport;
public function __construct(?CommonMarkConverter $converter = null)
public function __construct(?MarkdownConverter $converter = null)
{
$this->converter = $converter ?: new CommonMarkConverter();
$this->legacySupport = !method_exists($this->converter, 'convert');