Skip to content
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

Complete rewrote FrameworkBundle config reference #4736

Closed
wants to merge 8 commits into from

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jan 2, 2015

Replaces #4121

Original PR body:

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.

Q A
Doc fix? yes
New docs? yes
Applies to 2.3+
Fixed tickets #4439, #3586

.. tip::

The XSD schema is available at
``http://symfony.com/schema/dic/symfony/symfony-1.0.xsd``.
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that this file is up-to-date?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure about the uploaded file, but this is meant as a reference for when people want to use XML schema validation in Symfony (the local file is used for xsv in Symfony). That's also why it's a literal and not a link.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I missed that you didn't link it.

@xabbuh
Copy link
Member

xabbuh commented Jan 2, 2015

@wouterj Could you split up the removal of the full config reference in a second commit? That would make it easier to review. Thanks.

// app/config/config.php
$container->loadFromExtension('framework', array(
'trusted_proxies' => array('192.0.0.1', '10.0.0.0/8'),
));
Copy link
Member

Choose a reason for hiding this comment

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

We have a challenge to not create any duplication. Since this is documented elsewhere, I would include the link (you have this) and not the code-block. Let's make the one place we have this documented really great. I would probably do the same with the CIDR notation, though I think if we just mentioned that in the description, it feels ok (e.g. ... configures the IP addresses (e.g. 192.0.0.1, 10.0.0.0/8)...). It's not a hard rule, just trying to have less.

@wouterj
Copy link
Member Author

wouterj commented Jan 4, 2015

Note to self: rebase to include #4711 and remove my own description

@wouterj
Copy link
Member Author

wouterj commented Jan 4, 2015

@xabbuh done

));

Hosts can also be configured using regular expressions, which make it easier to
respond to any subdomain:
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 almost rather save us some space with code blocks and include the examples inline in the sentence:

Hosts can also be configured using regular expressions (e.g. ``.*\.?acme.com$`` or ``.*\.?acme.org$``), which make it ...

`assets_version`_ option to construct an asset's path. By default, the pattern
adds the asset's version as a query string. For example, if
``assets_version_format`` is set to ``%%s?version=%%s`` and ``assets_version``
is set to ``5``, the asset's path would be ``/images/logo.png?version=5``.
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Member

Choose a reason for hiding this comment

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

They're all correct - it's a possessive apostrophe - the path belongs to the asset :)

@javiereguiluz
Copy link
Member

Any news on this PR? Can I help you with anything? I'd love to see merged soon the great work done by @wouterj to document all this.

@wouterj
Copy link
Member Author

wouterj commented Feb 18, 2015

@javiereguiluz time (and motivation to start fixing all these comments...). It's on my list for this week though, so I'll let you know if I need help if I don't get it finished this week.

@wouterj
Copy link
Member Author

wouterj commented Mar 26, 2015

I've applied all comments. There is only one drawback: I'm unable to make any sense of rebasing this PR. The config simply has too many changes and git isn't really able to know where to merge things, resulting in wrongly placed sections without a conflict (e.g. the csrf enabled setting under the routing setting).

@weaverryan what do you think about splitting this PR up into a lot of small PRs, all adding one thing, slowly moving towards merging this complete PR? It will also be easier to take new settings into account in newer versions. If you agree with this approach, I'm willing to handle the opening and merging. (I need to be sure this PR is ready to merge in that case)

@wouterj
Copy link
Member Author

wouterj commented May 21, 2015

@weaverryan can you please share your opinion about what I said above?

@xabbuh
Copy link
Member

xabbuh commented May 23, 2015

I would prefer splitting this instead of throwing away all the work you did @wouterj.


.. note::

This will automatically enable the validation.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe make validation link to the validation section below?

@weaverryan
Copy link
Member

👍 for the plan! I've just added some last comments, but unless you disagree with any of them (in that case, ping me), I have full confidence that you can make those tweaks in the new PR's and merge them without needing to wait for my review. Apologies if any delays from me made this too crazy to keep up to date.

So yea, let's go with the plan! This is really great stuff!

@wouterj
Copy link
Member Author

wouterj commented May 23, 2015

Continued in #5298

@wouterj wouterj closed this May 23, 2015
@wouterj wouterj deleted the framework_config branch May 24, 2015 20:48
wouterj added a commit that referenced this pull request May 24, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

Completed framework config

This PR only changes and adds new configuration, without moving all things around. This will things a lot easier to diff and see where things have gone wrong. I'll thouroughly review this PR and merge then.

Replaces #4736

| Q | A
| --- | ---
| Doc fix? | yes
| New docs? | yes
| Applies to | 2.3+
| Fixed tickets | #4439, #3586

Commits
-------

54e8b0a Let docbot review reference
f223643 Apply some of Ryan's suggestions
7e45e8f Completed framework config reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants