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

Update forms.rst #4782

Closed
wants to merge 2 commits into from
Closed

Update forms.rst #4782

wants to merge 2 commits into from

Conversation

ifdattic
Copy link
Contributor

@ifdattic ifdattic commented Jan 6, 2015

Q A
Doc fix? yes
New docs? no
Applies to 2.3
Fixed tickets

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |
use AppBundle\Entity\Task;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what is the convention, but I personally try to sort alphabetically (groups included if needed) when possible.

Copy link
Member

Choose a reason for hiding this comment

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

We don't have a convention I think (the code doesn't have one either, does it? /cc @stof )

I always sort on length of the seperate namespace items, but I don't care much :)

Copy link
Member

Choose a reason for hiding this comment

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

IIRC PHP-CS-Fixer sorts them alphabetically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From that I saw in others code I think most/all the time it's sorted alphabetically, just sometimes they are grouped adding the empty line between namespaces, but the groups are still sorted.

And when I use sublime editor it's not a lot of problems to do that, just add use statement anywhere, select a block and press F5, no need to process anything.

Copy link
Member

Choose a reason for hiding this comment

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

We don't separate use statements in several blocks in the code.

And we usually keep them sorted in new code, but we don't sort them in existing code when refactoring if there are not sorted properly to avoid useless conflicts when merging branches

@xabbuh
Copy link
Member

xabbuh commented May 23, 2015

ping @ifdattic :)

@ifdattic
Copy link
Contributor Author

@xabbuh Yes, how can I help?

@xabbuh
Copy link
Member

xabbuh commented May 25, 2015

Can you rebase here?

@ifdattic
Copy link
Contributor Author

Maybe someone else could rebase?

@xabbuh
Copy link
Member

xabbuh commented May 31, 2015

Closing in favor of #5344. Thank you for starting this @ifdattic.

@xabbuh xabbuh closed this May 31, 2015
@ifdattic
Copy link
Contributor Author

ifdattic commented Jun 1, 2015

Glad to help!

wouterj added a commit that referenced this pull request Jun 6, 2015
This PR was merged into the 2.3 branch.

Discussion
----------

[Book] Finish #4776 and #4782

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | #4776, #4782

Commits
-------

88bd859 Update form.rst and templating.rst
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.

4 participants