-
Notifications
You must be signed in to change notification settings - Fork 25
phpDocumentor Guides integration #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8e290fe
21ef959
78614b5
b4d3554
f1974c7
cbc1362
2f8a2c7
908a935
a051171
fb8c2e8
d0251f1
2c41ce3
74ff68b
91c3ded
262f58f
016b7fc
d4b9c30
d8b8547
e2a9ed5
388cc64
5cfd812
516d502
aebc39f
1682f32
b6730bd
5096197
fedc9d7
1bf4f75
060aa2a
a89dc29
b10f781
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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') | ||
| ) | ||
| ; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,33 +5,53 @@ | |
| "license": "MIT", | ||
| "autoload": { | ||
| "psr-4": { | ||
| "SymfonyTools\\DocsBuilder\\GuidesExtension\\": "src/GuidesExtension/src", | ||
| "SymfonyDocsBuilder\\": "src" | ||
| } | ||
| }, | ||
| "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", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would suggest moving away from this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use |
||
| "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" | ||
| ] | ||
| } | ||
| } | ||
| 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> |
| 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> |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this
SymfonyDocsBuildernamespace still used ?