-
-
Notifications
You must be signed in to change notification settings - Fork 15
Add support for extension configuration #482
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
I think the XML snippet in the PR description could be used in https://github.com/phpDocumentor/guides/blob/main/docs/configuration.rst |
@linawolf I don't understand the question. Are you saying it does not work? |
@greg0ire Some tests are still red and it needs to be rebased so we can merge it |
Ok: what needs IMO to be done for this to be mergeable:
|
114e81a
to
57b901e
Compare
This PR allows to build a configurable highlighter, but does not build it itself, that's part of what #475 is for. |
@greg0ire is there anything that we can already test with an integration test? I still don't understand how this works or how to use the configuration. Not even if my example file is named correctly and in the correct place |
The second snippet with Each extension defines its configuration in the The Config component parses the XML and finds the nested nodes from the config tree based on this. So for a This is then processed by the Config component (https://github.com/phpDocumentor/guides/pull/482/files#diff-a98cf5815ab9d23df43257abd002a77c5792f02cff4ef0ee5add504533a9d8cbR71-R72) and transformed into one merged associative array like so: [
'project' => [
'title' => '...',
]
] This doc is useful if you want to learn more about this processing: https://symfony.com/doc/current/components/config/definition.html Finally, you can use |
@wouterj, I updated the integration test accordingly, unfortunate it does not seem to work |
@linawolf it looks like this is the first time a guides/packages/guides-cli/bin/guides Lines 33 to 35 in a824e13
but the CLI does not get run when in tests, right? So I don't think the |
@greg0ire so I am loading the guides.xml in a test now if it is present, however it still does not seem to do anything... |
Fyi: I'm taking a look now |
905ca5a
to
ad1d217
Compare
Fixed the tests, added some docs, added the XML schema and did some other minor improvements to the project settings flow. I think this is ready now. |
Looks good to me, thanks a lot for these changes |
I did not manage to fix the one error so I put it in the baseline for now
Allows per-extension configuration:
And global configuration (which underneeds gets automatically applied to the
GuidesExtension
):