Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Does not work on MAC having php 7.0.21 #201

Open
postmagthemes opened this issue May 29, 2020 · 12 comments
Open

Does not work on MAC having php 7.0.21 #201

postmagthemes opened this issue May 29, 2020 · 12 comments
Labels
Type: Bug There is a bug in the plugin.

Comments

@postmagthemes
Copy link

I am using Mac having php version 7.0.21 and wp 5.4.1 . But i never success to run theme sniffer.
it does not give any report. Why is that.

@postmagthemes postmagthemes added the Type: Bug There is a bug in the plugin. label May 29, 2020
@dingo-d
Copy link
Member

dingo-d commented May 29, 2020

You'll need to add some more details. Is there any debug log or console screenshot so that we can see why it's not working?

@postmagthemes
Copy link
Author

postmagthemes commented May 29, 2020 via email

@dingo-d
Copy link
Member

dingo-d commented May 29, 2020

You didn't attach any screenshot 🙈

@postmagthemes
Copy link
Author

postmagthemes commented May 29, 2020 via email

@dingo-d
Copy link
Member

dingo-d commented May 29, 2020

Screenshot 2020-05-29 at 12 29 54

You are answering from email. You cannot attach images on GH issues from email...

@postmagthemes
Copy link
Author

postmagthemes commented May 29, 2020 via email

@dingo-d
Copy link
Member

dingo-d commented May 30, 2020

Do you have errors when debug mode is enabled? Are there any errors in the browser dev console? It could be that it got to the minified JS file (looks like this is the older version that checks the JS) and it ran out of memory (sniffer cannot process minified files).

@postmagthemes
Copy link
Author

postmagthemes commented May 31, 2020 via email

@dingo-d
Copy link
Member

dingo-d commented May 31, 2020

Try running it, but check the sniff only PHP files and it should work. Otherwise try using the latest release: https://github.com/WPTRT/theme-sniffer/releases/download/1.1.2/theme-sniffer.zip

@postmagthemes
Copy link
Author

postmagthemes commented May 31, 2020 via email

@postmagthemes
Copy link
Author

postmagthemes commented May 31, 2020 via email

@dingo-d
Copy link
Member

dingo-d commented May 31, 2020

To me, it looks like out of memory issue that happens when you have some huge file that phpcs will try to tokenize and fail.

There was a case where there was a theme that had tests inside with WooCommerce mocks that had over 30k lines of code. This chocked the phpcs and caused it to fail. So my guess is that you must have some kind of file that is just too big for phpcs to tokenize properly, which causes PHP out of memory issues.

Do you have a repo that I could check to see what is happening?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug There is a bug in the plugin.
Projects
None yet
Development

No branches or pull requests

2 participants