[wp-trac] [WordPress Trac] #41057: Update PHP codebase per WordPress PHP Coding Standards

WordPress Trac noreply at wordpress.org
Thu Jun 15 09:20:11 UTC 2017


#41057: Update PHP codebase per WordPress PHP Coding Standards
----------------------------+-----------------------
 Reporter:  netweb          |       Owner:  pento
     Type:  task (blessed)  |      Status:  accepted
 Priority:  normal          |   Milestone:  4.9
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------
Changes (by pento):

 * owner:   => pento
 * status:  new => accepted


Old description:

> > https://make.wordpress.org/core/handbook/contribute/code-refactoring/
> >> ''"That said, we want to be internally consistent and follow our own
> rules. Code is poetry, and our code should be beautiful."''
>
> > https://make.wordpress.org/core/handbook/best-practices/coding-
> standards/php/
>
> As a first pass there are 8 files to this ticket for the initial patch, 4
> patches, and 4 file lists of the files to be patched, these files lists
> exclude and 3rd party external PHP libraries so that the only files
> changed are WordPress' PHP files
>
> * `41057-src-root.diff` generated from the `41057-filelist-src-root.txt`
> PHP file list
> * `41057-src-wp-admin.diff` generated from the `41057-filelist-src-wp-
> admin.txt` PHP file list
> * `41057-src-wp-content.diff` generated from the `41057-filelist-src-wp-
> content.txt` PHP file list
> * `41057-src-wp-includes.diff` generated from the `41057-filelist-src-wp-
> includes.txt` PHP file list
>
> Each of the above diff/patches are generated programmatically by `phpcbf`
> part of `phpcs` using the `WordPress-Core` version `0.11.0` PHP
> Codesniffer ruleset from ttps://github.com/WordPress-Coding-Standards
> /WordPress-Coding-Standards
>
> * `phpcbf --file-list=41057-filelist-src-root.txt --standard=WordPress-
> Core --extensions=php`
>
> * `phpcbf --file-list=41057-filelist-src-wp-admin.txt --standard
> =WordPress-Core --extensions=php`
>
> * `phpcbf --file-list=41057-filelist-src-wp-content.txt --standard
> =WordPress-Core --extensions=php`
>
> * `phpcbf --file-list=41057-filelist-src-wp-includes.txt --standard
> =WordPress-Core --extensions=php`

New description:

 > https://make.wordpress.org/core/handbook/contribute/code-refactoring/
 >> ''"That said, we want to be internally consistent and follow our own
 rules. Code is poetry, and our code should be beautiful."''

 > https://make.wordpress.org/core/handbook/best-practices/coding-
 standards/php/

 As a first pass there are 8 files to this ticket for the initial patch, 4
 patches, and 4 file lists of the files to be patched, these files lists
 exclude and 3rd party external PHP libraries so that the only files
 changed are WordPress' PHP files

 * `41057-src-root.diff` generated from the `41057-filelist-src-root.txt`
 PHP file list
 * `41057-src-wp-admin.diff` generated from the `41057-filelist-src-wp-
 admin.txt` PHP file list
 * `41057-src-wp-content.diff` generated from the `41057-filelist-src-wp-
 content.txt` PHP file list
 * `41057-src-wp-includes.diff` generated from the `41057-filelist-src-wp-
 includes.txt` PHP file list

 Each of the above diff/patches are generated programmatically by `phpcbf`
 part of `phpcs` using the `WordPress-Core` version `0.11.0` PHP
 Codesniffer ruleset from https://github.com/WordPress-Coding-Standards
 /WordPress-Coding-Standards

 * `phpcbf --file-list=41057-filelist-src-root.txt --standard=WordPress-
 Core --extensions=php`

 * `phpcbf --file-list=41057-filelist-src-wp-admin.txt --standard
 =WordPress-Core --extensions=php`

 * `phpcbf --file-list=41057-filelist-src-wp-content.txt --standard
 =WordPress-Core --extensions=php`

 * `phpcbf --file-list=41057-filelist-src-wp-includes.txt --standard
 =WordPress-Core --extensions=php`

--

Comment:

 Before we do this, I would like us to take a moment and review the Coding
 Standards. Is there anything we'd like to change? I don't want to make
 such a huge commit if we're going to follow it up with another huge commit
 for some standards tweak.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41057#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list