You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,29 +8,28 @@ Reporting only new issues for specific revision migth be important in case the P
8
8
9
9
## Pre-requisities
10
10
11
-
This project is dependant on a [WordPress](wordpress.org) installation and is meant to be installed as a [WP CLI](wp-cli.org)command.
11
+
Along a working [WordPress](wordpress.org) installation you'll need a [WP CLI](wp-cli.org)installed since you can interact with the plugin via WP CLI only for now.
12
12
13
13
You also will need to have the [PHP CodeSniffer installed on your server](https://github.com/squizlabs/PHP_CodeSniffer#installation).
14
14
15
15
## Installation steps for this project
16
16
17
-
Checkout this project to your theme or a plugin and include the `wp-cli-command.php` file for introducing a new command to your WP CLI.
18
-
19
-
You might want to conditionally include the file only in case the WordPress is loaded as part of WP CLI:
20
-
21
-
```
22
-
if ( defined( 'WP_CLI' ) && WP_CLI ) {
23
-
require_once( './wp-cli-command.php' );
24
-
}
25
-
```
17
+
Checkout this repository to your plugins directory and activate the plugin via standard WordPress administration.
26
18
27
19
# Configuration
28
20
29
-
This project requires some manual updates to the code in order to make it working.
21
+
In order to be able to properly use this plugin you'll have to add some constants to your wp-config.php file.
30
22
31
23
## PHPCS
32
24
33
-
If default values for running PHPCS command does not match your environment (see https://github.com/Automattic/phpcs-diff/blob/master/class-phpcs-diff.php#L5 ), you either need to hardcode them to the `PHPCS_Diff` class, or pass those in the `(array) $options` param to class' constructor from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
25
+
If default values for running PHPCS command does not match your environment (see https://github.com/Automattic/phpcs-diff/blob/master/class-phpcs-diff.php#L5 ), you need to override those via constants located in wp-config.php of your WordPress installation:
Alternatively, if you are using the PHPCS_Diff class outside of this plugin, you can pass those in the `(array) $options` param to class' constructor from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
34
33
35
34
```
36
35
new PHPCS_Diff( new PHPCS_Diff_SVN( $repo ), array( 'phpcs_command' => 'my_phpcs_command', 'standards_location' => 'my/standards/location' ) );
@@ -40,7 +39,14 @@ new PHPCS_Diff( new PHPCS_Diff_SVN( $repo ), array( 'phpcs_command' => 'my_phpcs
40
39
41
40
### Credentials
42
41
43
-
You either need to hardcode SVN credentials to `PHPCS_Diff_SVN` class ( related code: https://github.com/Automattic/phpcs-diff/blob/master/class-phpcs-diff-svn.php#L5 ) or pass those via the `(array) $options` param to class' constructor from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
42
+
You need to provide the plugin SVN credentials. This can be done using following constants put into wp-config.php file of your WordPress installation:
Alternatively, if you are using the `PHPCS_Diff` and `PHPCS_Diff_SVN` classes outside of this plugin, you can pass those via the `(array) $options` param to class' constructor from the WP CLI command - https://github.com/Automattic/phpcs-diff/blob/master/wp-cli-command.php#L64
@@ -66,7 +72,6 @@ For more params of the command, please, see the code directly: https://github.co
66
72
67
73
# TODO:
68
74
69
-
-[ ]Make configuration of the environment (phpcs command, standard's location, more repositories registration and svn credentials) easier than manual modification of the code
75
+
-[ ]Create an easy way to register custom repositories
70
76
-[ ] Create GitHub version control backend
71
77
-[ ] Make the WP CLI command version control backend agnostic
72
-
-[ ] Turn this into a proper WordPress plugin for easy installation
0 commit comments