tag:github.com,2008:https://github.com/symfony-tools/docs-builder/releases Tags from docs-builder 2025-04-07T11:02:32Z tag:github.com,2008:Repository/162855353/0.27.1 2025-04-07T11:02:50Z 0.27.1 OskarStark tag:github.com,2008:Repository/162855353/0.27.0 2025-03-21T13:11:08Z 0.27.0 <p>feature <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/190">#190</a> Add support for phpclass reference with namespace (alami…</p> <p>…rault)</p> <p>This PR was merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Add support for phpclass reference with namespace</p> <p>PHP have now classes with namespaces but it is not supported by `:phpclass:` reference yet</p> <p><a href="https://www.php.net/manual/en/class.bcmath-number.php">https://www.php.net/manual/en/class.bcmath-number.php</a></p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/9a75cd7ebc7b195831b1a9f218e34c3da6d8fa24"><tt>9a75cd7</tt></a> Add support for phpclass reference with namespace</p> OskarStark tag:github.com,2008:Repository/162855353/v0.26.5 2024-12-31T15:01:39Z 0.26.5 <p>bug <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/180">#180</a> Highlight nested PHP comments (javiereguiluz, wouterj)</p> <p>This PR was merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Highlight nested PHP comments</p> <p>Related to <a class="issue-link js-issue-link" href="https://github.com/symfony/symfony-docs/pull/20121">symfony/symfony-docs#20121</a></p> <p>This PR adds a failing test that shows the issue. This is the output change that would make test pass:</p> <p>```diff <br />- ), [ // wait <br />- &lt;span class="hljs-number"&gt;5&lt;/span&gt; <br />- seconds before processing <br />+ ), [ <br />+ &lt;span class="hljs-comment"&gt;// wait 5 seconds before processing&lt;/span&gt; <br />```</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/af7ee47654250144e2c41b7ee9f869d50a7196a1"><tt>af7ee47</tt></a> Allow one line comments in argument list <br /><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/8f09af6ad644414af3ed60f40a473ae4d8340f4f"><tt>8f09af6</tt></a> Highlight nested PHP comments</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.26.4 2024-09-30T06:13:15Z 0.26.4 <p>feature <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/184">#184</a> Add support for inline Twig comments (javiereguiluz)</p> <p>This PR was merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Add support for inline Twig comments</p> <p>Twig added inline comments (<a class="issue-link js-issue-link" href="https://github.com/twigphp/Twig/pull/4349">twigphp/Twig#4349</a>) so I tried to add support for them here. But, it's not working. Anyone knows if this could be easy to fix or if it's too complex to do it? Thanks!</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/126cfbff31822a56f39935f64d8da06265804a2b"><tt>126cfbf</tt></a> Add support for inline Twig comments</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.26.3 2024-09-12T10:23:39Z 0.26.3 <p>minor <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/182">#182</a> Don't use the deprecated spaceless filter (javiereguiluz)</p> <p>This PR was merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Don't use the deprecated spaceless filter</p> <p>This fixes the following deprecations that are making CI to fail:</p> <p>``` <br />Remaining indirect deprecation notices (3)</p> <p> 1x: Since twig/twig 3.12: Twig Filter "spaceless" is deprecated in /home/runner/work/docs-builder/docs-builder/src/Templates/default/html/toc.html.twig at line 1. <br /> 1x in BuildDocsCommandTest::testBuildDocsDefault from App\Tests\Command</p> <p> 1x: Since twig/twig 3.12: Twig Filter "spaceless" is deprecated in /home/runner/work/docs-builder/docs-builder/src/Templates/default/html/link.html.twig at line 1. <br /> 1x in BuildDocsCommandTest::testBuildDocsDefault from App\Tests\Command</p> <p> 1x: Since twig/twig 3.12: Twig Filter "spaceless" is deprecated in /home/runner/work/docs-builder/docs-builder/src/Templates/default/html/figure.html.twig at line 4. <br /> 1x in IntegrationTest::testParseUnitBlock from SymfonyDocsBuilder\Tests <br />```</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/f34b7a73d98a77db5b492c9a53fe8d520cda8279"><tt>f34b7a7</tt></a> Don't use the deprecated spaceless filter</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.26.2 2024-09-06T13:52:29Z 0.26.2 <p>bug <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/179">#179</a> 🐛 Fix yaml number rendering (homersimpsons)</p> <p>This PR was squashed before being merged into the main branch.</p> <p>Discussion <br />----------</p> <p>:bug: Fix yaml number rendering</p> <p><span class="issue-keyword tooltipped tooltipped-se">Fixes</span> <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/issues/177">#177</a></p> <p>I copied the yaml.json file from <a href="https://github.com/scrivo/highlight.php/blob/d1c6b0956a2b0d3efc137e4d8c5bf5c5e220bac1/src/Highlight/languages/yaml.json#L84">https://github.com/scrivo/highlight.php/blob/d1c6b0956a2b0d3efc137e4d8c5bf5c5e220bac1/src/Highlight/languages/yaml.json#L84</a> and updated the "number" regex to add `_` where I think the symfony parser allow them: <br />```diff <br />- "begin": "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)\\b" <br />+ "begin": "(-?)(\\b0[xX][a-fA-F0-9_]+|(\\b\\d[\\d_]*(\\.[\\d_]*)?|\\.\\d[\\d_]*)([eE][-+]?\\d[\\d_]*)?)\\b" <br />```</p> <p>There may be additional places where the symfony parser allow the `_` for numbers.</p> <p>I also updated the tests to add the example from the documentation.</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/e7c0a063f5eba8f3a5a279cf1a6b9305078c59ff"><tt>e7c0a06</tt></a> 🐛 Fix yaml number rendering</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.26.1 2024-08-02T15:37:09Z 0.26.1 <p>bug <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/178">#178</a> Fix attribute arguments highlighting and better support CPP …</p> <p>…(wouterj)</p> <p>This PR was merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Fix attribute arguments highlighting and better support CPP</p> <p>`@javiereguiluz` after seeing my changes online, I discovered 2 minor bugs that are fixed with this PR: <br />- Highlight `public`/`protected`/`private` when using constructor property promotion <br />- Fix highlighting attribute arguments (these were now parsed as function definition parameters instead of invocation arguments, e.g. lacking named argument support)</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/a467bd93dfa28f02f5dc04bb7bfd7076cf0648a1"><tt>a467bd9</tt></a> Fix attribute arguments highlighting and better support CPP</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.26.0 2024-08-02T15:34:52Z 0.26.0 <p>feature <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/176">#176</a> Add more modern PHP syntax highlighting (wouterj)</p> <p>This PR was squashed before being merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Add more modern PHP syntax highlighting</p> <p>Because I had fun playing around with this, I've added more changes to the PHP syntax file, bringing it more or less up to date with Highlight.js' syntax file.</p> <p>Noteworthy changes: <br />* Support arrow functions, enums, match statement, named arguments and more constants <br />* Updated the full list of supported PHP types <br />* Identify function class/class instantiations (this improves highlighting function arguments)</p> <p>`@javiereguiluz` please test this out locally. This patch will generally add more color to the code blocks. You might want to tweak the CSS a bit depending on your favor (we seem to have relatively little coloring in our code examples). <br />E.g. function calls now get `hljs-title` as well (you can use `.invoke__` to differentiate them from other titles), and named arguments will be labelled as `hljs-attr` (which is currently colored similar to `hljs-meta` used for PHP attributes).</p> <p>| Before | After <br />| --- | --- <br />| ![image](<a href="https://github.com/symfony-tools/docs-builder/assets/749025/f38b5b93-f7e7-4bde-9be7-4b8f07adf961">https://github.com/symfony-tools/docs-builder/assets/749025/f38b5b93-f7e7-4bde-9be7-4b8f07adf961</a>) | ![image](<a href="https://github.com/symfony-tools/docs-builder/assets/749025/cc2b36d7-73d0-4bc9-a151-6b1aaf699d7c">https://github.com/symfony-tools/docs-builder/assets/749025/cc2b36d7-73d0-4bc9-a151-6b1aaf699d7c</a>) <br />| ![image](<a href="https://github.com/symfony-tools/docs-builder/assets/749025/5d0054ed-f3cf-459f-b079-1ace730dadea">https://github.com/symfony-tools/docs-builder/assets/749025/5d0054ed-f3cf-459f-b079-1ace730dadea</a>) | ![image](<a href="https://github.com/symfony-tools/docs-builder/assets/749025/c57facf0-101c-414d-92cd-c2f3c514d2f8">https://github.com/symfony-tools/docs-builder/assets/749025/c57facf0-101c-414d-92cd-c2f3c514d2f8</a>) <br />| ![image](<a href="https://github.com/symfony-tools/docs-builder/assets/749025/89fc8e5f-a513-4c37-8ae1-8015a2960e55">https://github.com/symfony-tools/docs-builder/assets/749025/89fc8e5f-a513-4c37-8ae1-8015a2960e55</a>) | ![image](<a href="https://github.com/symfony-tools/docs-builder/assets/749025/5c772837-027c-4ae8-929e-9aaab12fc05f">https://github.com/symfony-tools/docs-builder/assets/749025/5c772837-027c-4ae8-929e-9aaab12fc05f</a>)</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/0642507c99fb18751ce7c1143a64ff9948c4e3f1"><tt>0642507</tt></a> Add more modern PHP syntax highlighting</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.25.0 2024-05-27T08:47:18Z 0.25.0 <p>bug <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/175">#175</a> Fixes for PHP attribute parsing (wouterj)</p> <p>This PR was squashed before being merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Fixes for PHP attribute parsing</p> <p>- No longer wrap the entire attribute in a span, but only wrap `#[Route` and `]` in spans (<span class="issue-keyword tooltipped tooltipped-se">fixes</span> <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/issues/174">#174</a>) <br />- `@javiereguiluz` for consistency with the real PHP highlight.js file, I've renamed `php-attributes` to `meta`. Is it OK for you to update the CSS on symfony.com to style `.hljs-meta` instead of `.hljs-php-attributes`? <br />- Fixed not parsing attributes in parameters, see e.g. <a href="https://symfony.com/doc/current/controller.html#mapping-the-whole-query-string">https://symfony.com/doc/current/controller.html#mapping-the-whole-query-string</a></p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/de706b5ad7bd7f9ee79b945ed87375e1b7aec970"><tt>de706b5</tt></a> Fixes for PHP attribute parsing</p> javiereguiluz tag:github.com,2008:Repository/162855353/v0.24.0 2024-05-20T10:57:54Z 0.24.0 <p>feature <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/173">#173</a> Update the php syntax file to highlight attributes (javi…</p> <p>…ereguiluz, wouterj)</p> <p>This PR was merged into the main branch.</p> <p>Discussion <br />----------</p> <p>Update the php syntax file to highlight attributes</p> <p>Alternative to <a class="issue-link js-issue-link" href="https://github.com/symfony-tools/docs-builder/pull/172">#172</a> (as per my suggestion).</p> <p>`@javiereguiluz` what do you think of this? The output is slightly different from yours, but that's how highlight.js works :)</p> <p>I tried my suggestion of converting the latest highlight.js syntax file, this unfortunately didn't work (there are too many BC breaks in v10). So I've copy pasted their regex and used it to what is available in our syntax file already.</p> <p>If we want to go this way, I can also follow up with a PR adding more support for PHP features (e.g. arrow functions). For now, I've just added a couple keywords that plainly were missing (such as trait and enum).</p> <p>Commits <br />-------</p> <p><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/020a28109d304ee7f34ba65eb1ed6658dda54eba"><tt>020a281</tt></a> Add support for PHP attributes <br /><a class="commit-link" href="https://github.com/symfony-tools/docs-builder/commit/9764478dba87e81a0bde9b16677a9c2c2c73089c"><tt>9764478</tt></a> Add tests for highlighting PHP attributes</p> javiereguiluz