diff --git a/composer.json b/composer.json index c08d406..547d0df 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "danielescherzer/commonmark-ext-pygments-highlighter": "0.2.0", "danielescherzer/html-builder": "0.0.2", "nikic/fast-route": "1.3.0", - "league/commonmark": "2.9.1", + "league/commonmark": "2.10.1", "ramsey/pygments": "3.0.0", "symfony/yaml": "7.4.12" }, diff --git a/tests/data/blog-highlighting.html b/tests/data/blog-highlighting.html index 50d63bd..df63d6a 100644 --- a/tests/data/blog-highlighting.html +++ b/tests/data/blog-highlighting.html @@ -17,14 +17,14 @@
Earlier today, the attributes-on-constants RFC implementation was finally merged. This was a project I worked on for months and a significant reason I became more active as a PHP core developer. The initial motivation was to add a way for constants to be marked as deprecated, so that MediaWiki could use that feature to signal deprecated constants instead of relying solely on documentation.
-PHP 8 introduced support for attributes, which allowed recording metadata for classes, functions, methods, class properties, class constants, and function parameters. In my presentation at the Fall 2024 edition of the @@ -56,7 +56,7 @@
The feature presented in the RFC is to allow using attributes on compile-time non-class constants. By "compile-time", I meant constants that were declared like
@@ -77,7 +77,7 @@const-defined constants.
-The line between compile-time and run-time constants is not as straightforward
as just the use of const or the use of define().
Consider the following PHP file (include_class.php):
define()define()The line gets even blurrier when looking at PHP's built-in optimizer. As part of "pass 1" with simple local optimizations (pass1.c as of merge), for any function call where
@@ -165,7 +165,7 @@If you want to take a look at the actual code, the implementing PR is available on GitHub. I'm not going to explain it in depth here, just with broad strokes. The first three parts are for general attribute support, the last @@ -189,7 +189,7 @@
Now that constants support attributes, developers can apply userland attributes to their constants to add various metadata. But, for me, the real power is in the attributes that PHP itself provides, since those are able to hook into parts @@ -214,7 +214,7 @@
However, using this attribute in MediaWiki, and more generally, in any tool that supports versions of PHP before 8.5 (which isn't even out yet!) presents a problem: because using attributes on constants requires syntax that was invalid @@ -256,7 +256,7 @@
Now that constants can be deprecated with attributes, the various constants that PHP provides can be updated with more informative error messages by adding the attribute to those internal constants. This would mirror the addition of the @@ -283,7 +283,7 @@
Now that it is possible to have the engine trigger deprecation notices for
global constants, I've started looking into the other places where
#[\Deprecated] support would be useful, either for MediaWiki or for libraries