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

Upgrade some WPPrinter methods to protected #95

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

jweston491
Copy link
Contributor

When running php ayuco add, the following errors were getting thrown for me:

PHP Fatal error: Access level to WPMVC\Commands\Parser\WPPrinter::hasNodeWithComments() must be protected (as in class PhpParser\PrettyPrinter\Standard) or weaker in /srv/www/wordpress-mvc/public_html/wp-content/plugins/my-plugin/vendor/10quality/wpmvc-commands/src/Parser/WPPrinter.php on line 25

and

PHP Fatal error: Access level to WPMVC\Commands\Parser\WPPrinter::pMaybeMultiline() must be protected (as in class PhpParser\PrettyPrinter\Standard) or weaker in /srv/www/wordpress-mvc/public_html/wp-content/plugins/my-project/vendor/10quality/wpmvc-commands/src/Parser/WPPrinter.php on line 25

I updated the methods to protected in my project and now they work as expected.

Looks like the PHP-Parser dependency updated the parent methods to protected a couple months ago in nikic/PHP-Parser@1d1bc8a#diff-d9d234fe7bea15ea81db29f63acb50bfe9c8e09bbb3ff7267bb319945fb8fc01

When running `php ayuco add`, the following errors were getting thrown:

```
PHP Fatal error:  Access level to WPMVC\Commands\Parser\WPPrinter::hasNodeWithComments() must be protected (as in class PhpParser\PrettyPrinter\Standard) or weaker in /srv/www/wordpress-mvc/public_html/wp-content/plugins/my-plugin/vendor/10quality/wpmvc-commands/src/Parser/WPPrinter.php on line 25
```

and 

```
PHP Fatal error:  Access level to WPMVC\Commands\Parser\WPPrinter::pMaybeMultiline() must be protected (as in class PhpParser\PrettyPrinter\Standard) or weaker in /srv/www/wordpress-mvc/public_html/wp-content/plugins/my-project/vendor/10quality/wpmvc-commands/src/Parser/WPPrinter.php on line 25
```

I updated the methods to protected in my project now they work as expected.

Looks like the PHP-Parser dependency updated the parent methods to protected a couple months ago in nikic/PHP-Parser@1d1bc8a#diff-d9d234fe7bea15ea81db29f63acb50bfe9c8e09bbb3ff7267bb319945fb8fc01
@amostajo amostajo merged commit 1be04c5 into 10quality:v1.0 Feb 12, 2021
@amostajo amostajo added this to the v1.1.13 milestone Feb 12, 2021
@amostajo amostajo self-requested a review February 12, 2021 04:05
@amostajo amostajo added the bug label Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants