Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs generation command #7670

Merged
merged 4 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ updates:
time: "17:00"
timezone: America/Los_Angeles
open-pull-requests-limit: 10
groups:
wp-cli-packages:
patterns:
- "wp-cli/*"
ignore:
# @see <https://github.com/ampproject/amp-wp/issues/7501#issuecomment-1656231088>.
- dependency-name: phpdocumentor/reflection

- package-ecosystem: npm
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Cli/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class GenerateCommand {
public function __invoke( $args, $assoc_args ) {
// Bail if current PHP version is not supported.
// Current combination of phpDocumentor and nikic/php-parser supports 7.4 or less.
if ( ! version_compare( phpversion(), '7.4', '<=' ) ) {
if ( version_compare( phpversion(), '8.0', '>=' ) ) {
WP_CLI::error( 'This command requires PHP 7.4 or less.' );
}

Expand Down
2 changes: 1 addition & 1 deletion includes/embeds/class-amp-core-block-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function ampify_navigation_block( $block_content, $block ) {

$is_interactive_block = str_contains(
preg_match( '/(?<=<nav)\s[^>]+/', $block_content, $matches ) ? $matches[0] : '',
'data-wp-interactive',
'data-wp-interactive'
);

$this->navigation_block_count++;
Expand Down
Loading