-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[WIP] Documenting all options of the FrameworkBundle #4121
Conversation
.. tip:: | ||
|
||
The XSD schema is available at | ||
``http://symfony.com/schema/dic/symfony/symfony-1.0.xsd``. |
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.
this XSD schema is not the XSD schema of the FrameworkBundle config. It is the XSD schema of the DI component (not the same XML namespace)
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.
http://symfony.com/schema/dic/services is the DI component, isn't it?
https://github.com/symfony/FrameworkBundle/blob/master/Resources/config/schema/symfony-1.0.xsd is in http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
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.
ah right sorry
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 it a good idea to link to the schema file on symfony.com since we may have different versions of it in the branches on GitHub but only one version on symfony.com?
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.
The schema is not retrieved by requesting the url. Symfony's Xml parser replaces the configured extension namespace with the file path returned from getXsdValidationBasePath()
.
The FrameworkExtension looks like:
class FrameworkExtension // ...
{
// ...
/**
* Returns the base path for the XSD files.
*
* @return string The XSD base path
*/
public function getXsdValidationBasePath()
{
return __DIR__.'/../Resources/config/schema';
}.
public function getNamespace()
{
return 'http://symfony.com/schema/dic/symfony';
}
}
So http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
becomes path/to/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd
which is the right schema in the right version
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 know how the DependencyInjection handles schemas defined by a bundle. I was just referring to your tip. People might think that they can lookup the actual schema file under this url and that may confuse them.
Thanks for your time and feedback @stof! |
|
||
<framework:config trusted-proxies="192.0.0.1, 10.0.0.0/8"> | ||
<!-- ... --> | ||
</framework> |
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 would use a complete valid XML file here.
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.
What's the point of that?
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.
With complete I mean adding the "header". This way, you can copy the example without having to investigate the proper namespace and schema definition and so on.
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.
btw, this is broken. The closing tag should be </framework:config>
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.
and this is broken in all XML snippets
|
||
If set, the profiler will only be enabled when the current IP adres matches. | ||
|
||
path |
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.
Looking at Travis, this needs to get its own label to not be confused with fragments.path
.
@wouterj Is there anything left to do (besides rebasing)? |
@xabbuh not all options are documented. I'll work on this after I've done some big refactoring in the CmfMenuBundle. |
baa7579
to
cca3ab0
Compare
cca3ab0
to
ccfef77
Compare
Wrong rebase + messy PR = new PR: #4736 |
Let's give one of the most forgotten dark places of the documentation some love :)
It's quite a difficult job, since I have to document lots of things I'm normally not very interested in (and thus do not know much about). So I hope the core team can help me verify the documentation in this PR. (cc @stof @jakzal)