Merge pull request #171 from wojsmol/fix/php81-compat

This commit is contained in:
Alain Schlesser 2022-01-06 19:49:34 -05:00 committed by GitHub
commit 343063dcc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View file

@ -10,11 +10,14 @@
"wp-cli/wp-cli": "^2.5"
},
"require-dev": {
"wp-cli/wp-cli-tests": "^3"
"wp-cli/wp-cli-tests": "^3.1"
},
"config": {
"process-timeout": 7200,
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"branch-alias": {

View file

@ -18,10 +18,10 @@ Feature: Profile a specific hook
When I run `wp profile hook --all --fields=callback,cache_hits,cache_misses`
Then STDOUT should be a table containing rows:
| callback | cache_hits | cache_misses |
| sanitize_comment_cookies() | 0 | 0 |
| smilies_init() | 2 | 0 |
| feed_links() | 8 | 0 |
| callback | cache_hits | cache_misses |
| sanitize_comment_cookies() | 0 | 0 |
| smilies_init() | 2 | 0 |
| feed_links() | 12 | 0 |
@less-than-php-7 @require-wp-4.0
Scenario: Profile an intermediate stage hook
@ -29,9 +29,9 @@ Feature: Profile a specific hook
When I run `wp profile hook wp_head:before --fields=callback,cache_hits,cache_misses`
Then STDOUT should be a table containing rows:
| callback | cache_hits | cache_misses |
| locate_template() | 0 | 0 |
| load_template() | 0 | 0 |
| callback | cache_hits | cache_misses |
| parse_blocks() | 0 | 0 |
| _get_wptexturize_split_regex() | 0 | 0 |
And STDOUT should not contain:
"""
WP_CLI\Profile\Profiler->wp_tick_profile_begin()