Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8e290fe
Convert docs builder into an extension
wouterj Jul 3, 2023
21ef959
Cleanup
wouterj Jul 3, 2023
78614b5
Update to latest Guides
wouterj Oct 24, 2023
b4d3554
Upgrade to latest guides and use guides-code's highlighter
wouterj Dec 16, 2023
f1974c7
Fix SymfonyExtension build
wouterj Dec 17, 2023
cbc1362
Set-up Psalm CI
wouterj Dec 19, 2023
2f8a2c7
Set-up PHP CS Fixer CI
wouterj Dec 19, 2023
908a935
Use guides-code from Packagist
wouterj Dec 19, 2023
a051171
Upgrade to Sphinx RTD Theme 2.0.0
wouterj Dec 27, 2023
fb8c2e8
Unskip fixed test cases
wouterj Dec 27, 2023
d0251f1
Upgrade Guides and split RTD theme
wouterj Jan 21, 2024
2c41ce3
Do not use anchors for document links in toctree
wouterj Jan 22, 2024
74ff68b
Enable toctree project test
wouterj Jan 22, 2024
91c3ded
Fix CI
wouterj Jan 22, 2024
262f58f
Fix CS
wouterj Jan 22, 2024
016b7fc
Upgrade to Guides 1.0
wouterj Mar 7, 2024
d4b9c30
Made last skipped test green
wouterj Mar 7, 2024
d8b8547
Upgrade to latest Guides
wouterj Nov 14, 2025
e2a9ed5
Upgrade other dependencies
wouterj Nov 15, 2025
388cc64
Apply recent changes to DocsBuilder in new code
wouterj Mar 14, 2026
5cfd812
Move GuidesExtension code into a subdirectory
wouterj Mar 14, 2026
516d502
Merge integration tests
wouterj Mar 15, 2026
aebc39f
Replace version placeholder with Symfony version in URLs
wouterj Mar 15, 2026
1682f32
Use newer PHPUnit version in GitHub Workflow
wouterj Mar 15, 2026
b6730bd
Fix php class role with namespaced FQCN
wouterj Mar 15, 2026
5096197
Skip non-html integration tests
wouterj Mar 15, 2026
fedc9d7
Update caution icon
wouterj Mar 17, 2026
1bf4f75
Fix highlightphp tests
wouterj Mar 17, 2026
060aa2a
Add fjson renderer
wouterj Mar 17, 2026
a89dc29
Upgrade to Symfony 8
wouterj Mar 20, 2026
b10f781
Add support for tabs directive
wouterj Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: 8.3
php-version: 8.4
tools: composer:v2
ini-values: date.timezone=UTC

Expand All @@ -37,7 +37,7 @@ jobs:
# add here only the PHP versions and OS used in GitHub CI (for tests)
# and on the symfony.com server (where the Symfony Docs are built)
operating-system: ['ubuntu-latest']
php-version: ['8.3', '8.4']
php-version: ['8.4', '8.5']

steps:
- name: 'Checkout code'
Expand All @@ -51,8 +51,8 @@ jobs:
tools: composer:v2
ini-values: date.timezone=UTC

- name: Install Composer Dependencies
run: composer install --no-progress
- name: Install Composer Dependencies
run: composer install --no-progress

- name: PHPUnit
run: vendor/bin/simple-phpunit
- name: PHPUnit
run: composer test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
!tools/*/composer.lock
/vendor/
/tests/_output
/tests/_cache
/var/
/docs.phar
/.env
/.php-cs-fixer.cache
/.phpunit.result.cache
/.phpunit.cache
/composer.lock
34 changes: 34 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

$fileHeaderComment = <<<EOT
This file is part of the Guides SymfonyExtension package.

(c) Wouter de Jong

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOT;

return (new PhpCsFixer\Config())
->setRules([
'@PHP71Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'protected_to_private' => false,
'native_constant_invocation' => ['strict' => false],
'no_superfluous_phpdoc_tags' => [
'remove_inheritdoc' => true,
'allow_unused_params' => true, // for future-ready params, to be replaced with https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7377
],
'header_comment' => ['header' => $fileHeaderComment],
'modernize_strpos' => true,
'get_class_to_class_keyword' => true,
'nullable_type_declaration' => true,
])
->setRiskyAllowed(true)
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__.'/src')
)
;
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT license

Copyright (c) 2018-present Ryan Weaver
Copyright (c) 2023-present Wouter de Jong

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
27 changes: 0 additions & 27 deletions bin/docs-builder

This file was deleted.

50 changes: 35 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,53 @@
"license": "MIT",
"autoload": {
"psr-4": {
"SymfonyTools\\DocsBuilder\\GuidesExtension\\": "src/GuidesExtension/src",
"SymfonyDocsBuilder\\": "src"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this SymfonyDocsBuilder namespace still used ?

}
},
"autoload-dev": {
"psr-4": {
"SymfonyTools\\DocsBuilder\\Tests\\": "tests",
"SymfonyDocsBuilder\\Tests\\": "tests"
}
},
"require": {
"php": ">=8.3",
"php": ">=8.4",
"ext-json": "*",
"ext-curl": "*",
"doctrine/rst-parser": "^0.5",
"scrivo/highlight.php": "^9.18.1",
"symfony/filesystem": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/finder": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/dom-crawler": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/css-selector": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/console": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/http-client": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"twig/twig": "^2.14 || ^3.3"
"phpdocumentor/guides": "^1.9",
"phpdocumentor/guides-cli": "^1.9",
"phpdocumentor/guides-code": "^1.7",
"phpdocumentor/guides-restructured-text": "^1.10@dev",
"scrivo/highlight.php": "^9.12.0",
"symfony/config": "^8.0",
"symfony/filesystem": "^8.0",
"symfony/finder": "^8.0",
"symfony/event-dispatcher": "^8.0",
"symfony/dependency-injection": "^8.0",
"symfony/dom-crawler": "^8.0",
"symfony/css-selector": "^8.0",
"symfony/console": "^8.0",
"symfony/http-client": "^8.0",
"symfony/string": "^8.0",
"twig/twig": "^3.3",
"twig/string-extra": "^3.6"
},
"require-dev": {
"gajus/dindent": "^2.0",
"symfony/phpunit-bridge": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/process": "^5.2 || ^6.0 || ^7.0 || ^8.0",
"masterminds/html5": "^2.7"
"league/flysystem-memory": "^3.0",
"symfony/phpunit-bridge": "^8.0",
"symfony/process": "^8.0",
"symfony/var-dumper": "^8.0"
},
"bin": ["bin/docs-builder"]
"scripts": {
"test": "SYMFONY_PHPUNIT_VERSION=12 simple-phpunit",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest moving away from this simple-phpunit in favor of installing phpunit/phpunit as a dev requirement, which is the recommended approach for modern Symfony projects now.
It only involves registering the SymfonyExtension explicitly in the phpunit.xml file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I thought we wanted to keep using simple-phpunit for libraries (especially by the Symfony team itself). But I see UX is using simple-phpunit, whereas AI is using phpunit. So we probably do not have a strict guideline on this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use simple-phpunit in the main mono-repo because of its built-in parallelization of tests per sub-package, that is quite specific to the structure of the main mono-repo.
For other projects, the simple-phpunit script does not provide much benefit anymore. It only makes it harder to control which version of PHPUnit is used and to ensure you don't have conflicting versions of dependencies installed (reduced risk as phpunit reduced its dependencies outside phpunit/* and sebastian/*, but not void as some other packages also reuse sebastian/*).
For this case, installing phpunit as a dev requirement is simpler.

"psalm": [
"composer update --no-scripts --working-dir=tools/psalm",
"./tools/psalm/vendor/bin/psalm"
],
"cs": [
"composer update --no-scripts --working-dir=tools/php-cs-fixer",
"./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix"
]
}
}
31 changes: 31 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.4/phpunit.xsd"
bootstrap="vendor/autoload.php"
beStrictAboutOutputDuringTests="true"
failOnDeprecation="true"
failOnRisky="true"
failOnWarning="true"
cacheDirectory=".phpunit.cache"
beStrictAboutCoverageMetadata="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<source ignoreSuppressionOfDeprecations="true"
ignoreIndirectDeprecations="true"
restrictNotices="true"
restrictWarnings="true">
<include>
<directory>src</directory>
</include>

<deprecationTrigger>
<function>trigger_deprecation</function>
<method>Doctrine\Deprecations\Deprecation::trigger</method>
<method>Doctrine\Deprecations\Deprecation::delegateTriggerToBackend</method>
</deprecationTrigger>
</source>
</phpunit>
22 changes: 22 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedCode="false"
findUnusedBaselineEntry="true"
>
<projectFiles>
<directory name="src" />
<directory name="config" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<ImplicitToStringCast errorLevel="suppress" />
</issueHandlers>
</psalm>
42 changes: 0 additions & 42 deletions src/Application.php

This file was deleted.

Loading
Loading