DDC-585: Create a coding standards document #719

Closed
opened 2026-01-22 12:47:51 +01:00 by admin · 16 comments
Owner

Originally created by @doctrinebot on GitHub (May 13, 2010).

Originally assigned to: @jwage, @Majkl578 on GitHub.

Jira issue originally created by user romanb:

We need a new coding standards document for Doctrine 2.

Originally created by @doctrinebot on GitHub (May 13, 2010). Originally assigned to: @jwage, @Majkl578 on GitHub. Jira issue originally created by user romanb: We need a new coding standards document for Doctrine 2.
admin added the Documentation label 2026-01-22 12:47:51 +01:00
admin closed this issue 2026-01-22 12:47:51 +01:00
Author
Owner

@doctrinebot commented on GitHub (May 13, 2010):

@doctrinebot commented on GitHub (May 13, 2010): - is referenced by [DDC-3841: [GH-1470] [CI] Added dev requirement for "doctrine/coding-standard"](http://www.doctrine-project.org/jira/browse/DDC-3841) - is referenced by [DDC-2408: [GH-649] Update coding standards](http://www.doctrine-project.org/jira/browse/DDC-2408)
Author
Owner

@doctrinebot commented on GitHub (Jan 29, 2013):

Comment created by benjamin:

Has there been any work on a coding standards document yet?
I'm currently working on fixing documentation on this project, and it might be a good time to define a standard.
I've started compiling a few recommendations based on various feedbacks I've got in my pull requests, and I can post them here.
Please let me know if there have been previous attempts so far!

@doctrinebot commented on GitHub (Jan 29, 2013): Comment created by benjamin: Has there been any work on a coding standards document yet? I'm currently working on fixing documentation on this project, and it might be a good time to define a standard. I've started compiling a few recommendations based on various feedbacks I've got in my pull requests, and I can post them here. Please let me know if there have been previous attempts so far!
Author
Owner

@doctrinebot commented on GitHub (Jan 29, 2013):

Comment created by @ocramius:

[benjamin] [guiblanco] may have a CS ruleset, but it's not ready yet. Perfect timing btw, we really need to automate this to avoid having all these useless CS fix comments in pull requests

@doctrinebot commented on GitHub (Jan 29, 2013): Comment created by @ocramius: [<sub>benjamin] [</sub>guiblanco] may have a CS ruleset, but it's not ready yet. Perfect timing btw, we really need to automate this to avoid having all these useless CS fix comments in pull requests
Author
Owner

@doctrinebot commented on GitHub (Jan 29, 2013):

Comment created by benjamin:

Ok, I'll post my document here once ready, and [~guiblanco] will be able to compare it with his ruleset!

@doctrinebot commented on GitHub (Jan 29, 2013): Comment created by benjamin: Ok, I'll post my document here once ready, and [~guiblanco] will be able to compare it with his ruleset!
Author
Owner

@doctrinebot commented on GitHub (Jan 30, 2013):

Comment created by benjamin:

Here is a first draft: https://gist.github.com/4676670

Please comment!

@doctrinebot commented on GitHub (Jan 30, 2013): Comment created by benjamin: Here is a first draft: https://gist.github.com/4676670 Please comment!
Author
Owner

@doctrinebot commented on GitHub (Feb 11, 2013):

Comment created by benjamin:

[~guiblanco], if you don't have time to compare your ruleset with my draft, maybe you could publish your current ruleset so that others can have a look?

@doctrinebot commented on GitHub (Feb 11, 2013): Comment created by benjamin: [~guiblanco], if you don't have time to compare your ruleset with my draft, maybe you could publish your current ruleset so that others can have a look?
Author
Owner

@doctrinebot commented on GitHub (Aug 2, 2013):

Comment created by benjamin:

Any update guys? I'm willing to spend some time on this work, but if no one answers, we won't be going forward :(

@doctrinebot commented on GitHub (Aug 2, 2013): Comment created by benjamin: Any update guys? I'm willing to spend some time on this work, but if no one answers, we won't be going forward :(
Author
Owner

@doctrinebot commented on GitHub (Aug 2, 2013):

Comment created by @ocramius:

[~benjamin] I think a pull request against the doctrine website (https://github.com/doctrine/doctrine-website-sphinx) would be fine...

@doctrinebot commented on GitHub (Aug 2, 2013): Comment created by @ocramius: [~benjamin] I think a pull request against the doctrine website (https://github.com/doctrine/doctrine-website-sphinx) would be fine...
Author
Owner

@doctrinebot commented on GitHub (Apr 17, 2014):

Comment created by @deeky666:

This should go into https://github.com/doctrine/coding-standard repo (long term).

@doctrinebot commented on GitHub (Apr 17, 2014): Comment created by @deeky666: This should go into https://github.com/doctrine/coding-standard repo (long term).
Author
Owner

@doctrinebot commented on GitHub (Jul 14, 2015):

Comment created by phansys:

Could we define PSR-2 as base?

@doctrinebot commented on GitHub (Jul 14, 2015): Comment created by phansys: Could we define PSR-2 as base?
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2015):

Comment created by @ocramius:

Please just refer to https://github.com/doctrine/coding-standard, which is already PSR-2 based (with variations and more strictness)

@doctrinebot commented on GitHub (Jul 15, 2015): Comment created by @ocramius: Please just refer to https://github.com/doctrine/coding-standard, which is already PSR-2 based (with variations and more strictness)
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2015):

Comment created by phansys:

@ocramius, Is there a rule for spaces arround ! operator? https://github.com/doctrine/doctrine2/pull/1133#discussion_r17459791

@doctrinebot commented on GitHub (Jul 15, 2015): Comment created by phansys: @ocramius, Is there a rule for spaces arround `!` operator? https://github.com/doctrine/doctrine2/pull/1133#discussion_r17459791
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2015):

Comment created by phansys:

I just found another set of rules inside 14ff7f50cf/CONTRIBUTING.md (coding-standard). Which is the current valid standard?

@doctrinebot commented on GitHub (Jul 15, 2015): Comment created by phansys: I just found another set of rules inside https://github.com/doctrine/doctrine2/blob/14ff7f50cfea67d8a4dca37b8ca364d2a83b9864/CONTRIBUTING.md#coding-standard. Which is the current valid standard?
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2015):

Comment created by @ocramius:

[~phansys] yes, that's doctrine specific (spaces around ! )

@doctrinebot commented on GitHub (Jul 15, 2015): Comment created by @ocramius: [~phansys] yes, that's doctrine specific (spaces around `!` )
Author
Owner

@doctrinebot commented on GitHub (Jul 15, 2015):

Comment created by phansys:

Perfect! https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1303
What about the disambiguation between the CS? https://github.com/doctrine/coding-standard/tree/master/Docs#doctrine-coding-standard vs 14ff7f50cf/CONTRIBUTING.md (coding-standard)

@doctrinebot commented on GitHub (Jul 15, 2015): Comment created by phansys: Perfect! https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1303 What about the disambiguation between the CS? https://github.com/doctrine/coding-standard/tree/master/Docs#doctrine-coding-standard vs https://github.com/doctrine/doctrine2/blob/14ff7f50cfea67d8a4dca37b8ca364d2a83b9864/CONTRIBUTING.md#coding-standard
Author
Owner

@Majkl578 commented on GitHub (Jun 14, 2018):

I think we can safely close this as Doctrine Coding Standard is now adopted by (almost all) Doctrine projects and also documented in README and (soon) on the website too. ☺️

@Majkl578 commented on GitHub (Jun 14, 2018): I think we can safely close this as [Doctrine Coding Standard](https://github.com/doctrine/coding-standard) is now adopted by (almost all) Doctrine projects and also documented in README and (soon) on [the website](https://github.com/doctrine/coding-standard/pull/66) too. :relaxed:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#719