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

Add third column to specific emplacements table describing relationship #5559

Closed
wants to merge 3 commits into from
Closed

Conversation

rcousens
Copy link
Contributor

The standard Symfony2 framework has mandatory requirements about specific emplacements, and then others that are considered best practice by convention. This commit makes the documentation clearer in order to provide a developer with reasonable expectations about the consequences of altering the default directory structure. Additionally, newer developers may be less intimidated and concerned by whether they are compromising any auto-wiring functionality by deviating from the information provided.

Fixes #5502

The standard Symfony2 framework has mandatory requirements about specific emplacements, and then others that are considered best practice by convention. This commit makes the documentation clearer in order to provide a developer with reasonable expectations about the consequences of altering the default directory structure. Additionally, newer developers may be less intimidated and concerned by whether they are compromising any auto-wiring functionality by deviating from the information provided.
@javiereguiluz
Copy link
Member

👍 thank you @rcousens.

The only thing that I don't like is the column title (Relationship). I propose to change it by Location Type or something like that. But before doing any change, let's see what do doc managers think about this.

@rcousens
Copy link
Contributor Author

Sure thing, I also think it could use a little extra padding as it looks a bit cramped! Will wait for feedback and make the final changes then.

Quick question, presume max line length is 80? Table is currently @ 79.

Web Resources (CSS, JS, images) ``Resources/public/`` Mandatory
Translation files ``Resources/translations/`` Mandatory
Templates ``Resources/views/`` Mandatory
Unit and Functional Tests ``Tests/`` Convention
Copy link
Member

Choose a reason for hiding this comment

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

in some degree, this is mandatory too (as it's configured in the phpunit config file).

Renamed Relationship column to Location and updated value for Tests to Mandatory due to default phpunit config.
@rcousens
Copy link
Contributor Author

Updated as per feedback

@javiereguiluz
Copy link
Member

👍 @rcousens thanks for your patience and for making all the asked changes! This is ready to be merged :)

PS: @wouterj when merging this, please add two whitespaces as separation between the second and the new third column. Thanks!

@rcousens
Copy link
Contributor Author

@wouterj I fixed up the spacing :) All good!

Thank you for letting me improve the documentation, I remember starting with Symfony2 almost three years ago now and the amount of internal anxiety I had over "specific emplacements" made me hesitant to structure bundles in a way that best expressed the domain. Knowing what is mandatory and what is optional is somewhat liberating when you finally work it out.

Cheers 👍

@xabbuh
Copy link
Member

xabbuh commented Aug 1, 2015

Hm, thinking about this using only "Location" sounds weird to me. I would prefer "Location Type" or something like that instead.

Web Resources (CSS, JS, images) ``Resources/public/`` Mandatory
Translation files ``Resources/translations/`` Mandatory
Templates ``Resources/views/`` Mandatory
Unit and Functional Tests ``Tests/`` Mandatory
Copy link
Member

Choose a reason for hiding this comment

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

this is not really mandatory. It is perfectly fine to put them elsewhere (even outside the prod code of your bundle) as long as you configure your testing tool accordingly (and it is perfectly fine to use another tool than PHPUnit, in which case tests would be elsewhere)

@rcousens
Copy link
Contributor Author

I will get this fixed up again this weekend. Cheers. Any preference on the third column header name?

Location vs Location Type?

@wouterj
Copy link
Member

wouterj commented Sep 6, 2015

Personally, I find the values of the last column too long. I propose to change it to use Yes/No as value:

sf-best-practices-mandatory

Or leave the column empty, unless it is a convention:

sf-best-practices-mandatory

Maybe even removing the complete column and adding a new footnote for the conventions (like the [1] that's already in the table).

@javiereguiluz
Copy link
Member

@rcousens I've created #6616 to fix your work applying the comments made by @wouter. I've reused your original commits, so you'll get full credit for your work. Thanks!

@xabbuh
Copy link
Member

xabbuh commented May 29, 2016

I am closing here in favour of #6616. Thank you for starting this change @rcousens!

@xabbuh xabbuh closed this May 29, 2016
wouterj added a commit that referenced this pull request Jun 21, 2016
…elements (rcousens, javiereguiluz)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #6616).

Discussion
----------

Better explain the mandatory/convention location of some elements

This finishes #5559 by implementing the comments made by @wouterj

Commits
-------

eee4750 Fixed some wrong explanations
4a2c92f Tweaked the table contents
cd0b889 Fix spacing on third column
b853e52 Fix as per comments
99da972 Add third column to specific emplacements table describing relationship
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.

5 participants