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

TGMPA with composer causes phpcs error #648

Open
AdsonCicilioti opened this issue Jul 24, 2020 · 0 comments
Open

TGMPA with composer causes phpcs error #648

AdsonCicilioti opened this issue Jul 24, 2020 · 0 comments

Comments

@AdsonCicilioti
Copy link

Issue Overview

Basically the phpcs binary (in vendor/bin/phpcs) stop working after instal the tgmpa/tgm-plugin-activation with composer.
TGM allow define the recommendeds or requireds plugins for your theme, and i desire this.

Describe your environment

OS: Windows 10 20H1 - WSL2 with Ubuntu 20.04
PHP: 7.4.6 CLI Non-Thread-Safe
Mysql: 5.7
WP: 5.4.2
WP-Rig: 2.0.1
Code Editor: Visual Studio Code 1.48.0 (Insider)

Steps to Reproduce

  1. git clone https://github.com/wprig/wprig.git' inside wp/.../themes/`
  2. Configure the config/config.json for my env.
  3. npm rig-init and npm dev and check all work fine. Ok.
  4. Instal TGMPA with composer - composer require tgmpa/tgm-plugin-activation.
  5. phpcs stop works.

Expected Behavior

phpcs local cli and integrated VS Code Extension Lint and Format all php code normally.

Current Behavior

After install TGMPA log this on lastest line:
image

Running ./vendor/bin/phpcs -i output:

Fatal error: Uncaught Error: Call to undefined function did_action() in /home/adson/Dev/wp-cestank/wprig/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php:2109
Stack trace:
#0 /home/adson/Dev/wp-cestank/wprig/vendor/composer/autoload_real.php(69): require()
#1 /home/adson/Dev/wp-cestank/wprig/vendor/composer/autoload_real.php(59): composerRequire698e63a4d60b74c289b05c7cd18465f0('a5f882d89ab791a...', '/home/adson/Dev...')
#2 /home/adson/Dev/wp-cestank/wprig/vendor/autoload.php(7): ComposerAutoloaderInit698e63a4d60b74c289b05c7cd18465f0::getLoader()
#3 /home/adson/Dev/wp-cestank/wprig/vendor/squizlabs/php_codesniffer/autoload.php(79): include('/home/adson/Dev...')
#4 [internal function]: PHP_CodeSniffer\Autoload::load('PHP_CodeSniffer...')
#5 /home/adson/Dev/wp-cestank/wprig/vendor/squizlabs/php_codesniffer/bin/phpcs(17): spl_autoload_call('PHP_CodeSniffer...')
#6 {main}
  thrown in /home/adson/Dev/wp-cestank/wprig/vendor/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php on line 2109

Notice on VS Code when open a PHP File:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant