File tree 6 files changed +81
-33
lines changed
6 files changed +81
-33
lines changed Original file line number Diff line number Diff line change @@ -26,37 +26,30 @@ jobs:
26
26
strategy :
27
27
fail-fast : false
28
28
matrix :
29
- php : ['7.4', '8.0 ', '8.1 ']
29
+ php : ['8.1 ', '8.2 ']
30
30
wp : ['latest']
31
31
multisite : ['0', '1']
32
32
extensions : ['gd']
33
33
experimental : [false]
34
34
include :
35
- # WP Trunk
36
- - php : ' 7.4 '
35
+ # PHP 8.2 / experimental
36
+ - php : ' 8.2 '
37
37
wp : ' trunk'
38
+ dependency-version : ' highest'
38
39
multisite : ' 0'
39
40
experimental : true
40
- # PHP 8.0
41
- - php : ' 8.0'
42
- wp : ' latest'
41
+ # PHP 8.3 / experimental
42
+ - php : ' 8.3'
43
+ wp : ' trunk'
44
+ dependency-version : ' highest'
43
45
multisite : ' 0'
44
- experimental : false
45
- # PHP 8.1
46
+ experimental : true
47
+ # Coverage
46
48
- php : ' 8.1'
47
49
wp : ' latest'
50
+ dependency-version : ' highest'
48
51
multisite : ' 0'
49
52
experimental : false
50
- # PHP 8.1 / experimental
51
- - php : ' 8.1'
52
- wp : ' trunk'
53
- multisite : ' 0'
54
- experimental : true
55
- # PHP 8.2 / experimental
56
- - php : ' 8.2'
57
- wp : ' trunk'
58
- multisite : ' 0'
59
- experimental : true
60
53
61
54
steps :
62
55
- name : Checkout
Original file line number Diff line number Diff line change 40
40
},
41
41
"require-dev" : {
42
42
"automattic/wordbless" : " ^0.4.2" ,
43
- "yoast/wp-test-utils" : " ^1.0"
43
+ "yoast/wp-test-utils" : " ^1.0" ,
44
+ "wp-coding-standards/wpcs" : " ^3.1" ,
45
+ "phpcompatibility/php-compatibility" : " ^9" ,
46
+ "szepeviktor/phpstan-wordpress" : " ^1.3" ,
47
+ "10up/phpcs-composer" : " ^3.0"
44
48
},
45
49
"extra" : {
46
50
"installer-paths" : {
53
57
"config" : {
54
58
"allow-plugins" : {
55
59
"roots/wordpress-core-installer" : true ,
56
- "composer/installers" : true
60
+ "composer/installers" : true ,
61
+ "dealerdirect/phpcodesniffer-composer-installer" : true
57
62
}
58
63
},
59
64
"scripts" : {
60
- "test" : " phpunit"
65
+ "test" : " phpunit" ,
66
+ "cs" : " @php ./vendor/bin/phpcs" ,
67
+ "cs:fix" : " @php ./vendor/bin/phpcbf" ,
68
+ "phpstan" : " @php ./vendor/bin/phpstan analyse"
61
69
}
62
70
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <ruleset >
3
+ <!-- Files or directories to check -->
4
+ <file >.</file >
5
+
6
+ <exclude-pattern >*/node_modules/*</exclude-pattern >
7
+ <exclude-pattern >*/wordpress/*</exclude-pattern >
8
+ <exclude-pattern >*/vendor/*</exclude-pattern >
9
+ <exclude-pattern >*/resources/*</exclude-pattern >
10
+ <exclude-pattern >*/dist/*</exclude-pattern >
11
+ <exclude-pattern >*/tests/*</exclude-pattern >
12
+
13
+ <!-- Path to strip from the front of file paths inside reports (displays shorter paths) -->
14
+ <arg name =" basepath" value =" ." />
15
+
16
+ <!-- Set a minimum PHP version for PHPCompatibility -->
17
+ <config name =" testVersion" value =" 8.1-" />
18
+
19
+ <rule ref =" 10up-Default" />
20
+ <rule ref =" WordPress-Core" />
21
+ <rule ref =" WordPress-Docs" />
22
+ <rule ref =" WordPress-Extra" />
23
+ <!-- Add VIP-specific rules -->
24
+ <config name =" minimum_supported_wp_version" value =" 6.1" />
25
+
26
+ <rule ref =" WordPress.WP.I18n" >
27
+ <properties >
28
+ <property name =" text_domain" type =" array" value =" timber-starter" />
29
+ </properties >
30
+ </rule >
31
+
32
+ </ruleset >
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ editorUrl : ' vscode://file/%%file%%:%%line%%'
3
+ level : 5 # Increase until "max"
4
+ paths :
5
+ - src/
6
+ - %currentWorkingDirectory%/
7
+ excludePaths :
8
+ - tests/*
9
+ - docs/*
10
+ - vendor/*
11
+ - wordpress/*
12
+ ignoreErrors :
13
+
14
+ includes :
15
+ - vendor/szepeviktor/phpstan-wordpress/extension.neon
Original file line number Diff line number Diff line change 6
6
class TestTimberStarterTheme extends BaseTestCase {
7
7
8
8
public function set_up () {
9
- switch_theme ( basename ( dirname ( __DIR__ ) ) . '/theme ' );
9
+ switch_theme (basename (dirname (__DIR__ ) ) . '/theme ' );
10
10
11
- require dirname ( __DIR__ ) . '/functions.php ' ;
11
+ require dirname (__DIR__ ) . '/functions.php ' ;
12
12
13
- Timber::$ dirname = array_merge ( (array ) Timber::$ dirname , [ '../views ' ] );
14
- Timber::$ dirname = array_unique ( Timber::$ dirname );
13
+ Timber::$ dirname = array_merge ((array ) Timber::$ dirname , [ '../views ' ]);
14
+ Timber::$ dirname = array_unique (Timber::$ dirname );
15
15
16
16
// WorDBless includes wp-settings.php
17
- do_action ( 'after_setup_theme ' );
17
+ do_action ('after_setup_theme ' );
18
18
19
19
parent ::set_up ();
20
20
}
Original file line number Diff line number Diff line change 2
2
3
3
use WorDBless \Load ;
4
4
5
- if (! file_exists ( dirname (__DIR__ ) . '/wordpress/wp-content ' )) {
5
+ if (! file_exists (dirname (__DIR__ ) . '/wordpress/wp-content ' )) {
6
6
mkdir (dirname (__DIR__ ) . '/wordpress/wp-content ' );
7
7
}
8
8
11
11
}
12
12
13
13
copy (
14
- dirname ( __DIR__ ) . '/vendor/automattic/wordbless/src/dbless-wpdb.php ' ,
15
- dirname ( __DIR__ ) . '/wordpress/wp-content/db.php '
14
+ dirname (__DIR__ ) . '/vendor/automattic/wordbless/src/dbless-wpdb.php ' ,
15
+ dirname (__DIR__ ) . '/wordpress/wp-content/db.php '
16
16
);
17
17
18
- $ theme_base_name = basename ( dirname ( __DIR__ ) );
19
- $ src = realpath ( dirname ( dirname ( __DIR__ ) ) . '/ ' . $ theme_base_name );
20
- $ dest = dirname ( __DIR__ ) . '/wordpress/wp-content/themes/ ' . $ theme_base_name ;
18
+ $ theme_base_name = basename (dirname (__DIR__ ) );
19
+ $ src = realpath (dirname (dirname (__DIR__ ) ) . '/ ' . $ theme_base_name );
20
+ $ dest = dirname (__DIR__ ) . '/wordpress/wp-content/themes/ ' . $ theme_base_name ;
21
21
22
22
if ( is_dir ($ src ) && ! file_exists ($ dest ) ) {
23
23
symlink ($ src , $ dest );
24
24
}
25
25
26
- require_once dirname ( __DIR__ ) . '/vendor/autoload.php ' ;
26
+ require_once dirname (__DIR__ ) . '/vendor/autoload.php ' ;
27
27
28
28
Load::load ();
You can’t perform that action at this time.
0 commit comments