-
Notifications
You must be signed in to change notification settings - Fork 25
Use doctrine/rst-parser 0.6 #148
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
Conversation
Happy to see this |
I must admit that I'm surprised by the green builds here, as the test suite breaks (in weird ways) locally 😄 PHPunit output locally
|
Ooh nevermind, this apparently has something to do with PHP 8.1: #147 |
@wouterj if you have some time for this, let's try to change this from draft to a real PR. It looks OK and it would fix the current failing tests in PHP 8.2. Thanks a lot! |
@javiereguiluz I still have one major breaking change for v. 0.6 pending before we can release and only do Bugfixes thereafter. If you and or@wouterj could review that would be helpful. I would not suggest to use v 0.6 in productive before that or is merged. |
After the changes in 0.6 in the past 2 months, there is quite some more work to do on this library in order to be compatible. I've done the first big part of the work, with 14 failing tests left (in some cases, the tests are wrong, in others our implementation and for some I believe there might be a bug on rst-parser). |
This PR is now nearly ready. Lots of code removed and two regressions left in RST Parser (doctrine/rst-parser#265 & doctrine/rst-parser#266). |
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.
I reviewed this and it looks correct to me. I love how many code we can remove thanks to the directives added upstream.
You also kept all the directives/roles specific for Symfony Docs, so I think we're good.
By the way, in symfony.com we build docs like this:
$buildConfig = (new BuildConfig())
->setContentDir($buildDir)
->setOutputDir($tempBuildDir)
// ...
$result = $this->docBuilder->build($buildConfig);
Can you see any possible changes that we might need to do because of this PR? Thanks!
No, the public APIs of those 2 classes you show in the example ( You might want to check templates/themes though. Does symfony.com use the theme provided in this repository, or does it have custom Twig templates? If it's the latter, those might need some updates |
Thanks for verifying this. No, we don't use custom templates because we rely on the default theme. Thanks! |
TYPO3 documention team member @linawolf is doing lots of great work over on the doctrine/rst-parser to (a) fix bugs in the current parser and (b) move some of the features that we wrote in this library over to the parser.
This PR is just a draft to see if these changes broke something for us. I'm planning on also removing some of the features implemented on the parser in this PR before 0.6 is stable (e.g. most admonition directives are now integrated in rst-parser).BuilderFactory
. The Kernel no longer serves a purpose with the introduction of theSymfonyDirectiveFactory
.