themehybrid/mythic

PHP version compatibilty check does not work.

nextgenthemes opened this issue · 3 comments

When I run ./vendor/bin/phpcs . I get all kinds of errors like this despite the setting in the config. Same in Atom where I use a plugin to run phpcs on files I edit.

ERROR | "namespace" keyword is not present in PHP version 5.2 or earlier

Are you running this with the latest Mythic? The version is configured in the lint:php command script in package.json.

That's unless something's changed since then.

Configuring it in the XML file doesn't work.

Ah OK thanks, maybe you should remove it from the xml config then when its not working that way.

I am using code based on the latest, did not know about the npm command line though. Problem is I am using this to live lint my code in Atom with the Linter phpcs plugin (way superior IMO) that does seem to have the option to run phpcs with that custom switch. But I can exclude specific sniffs in there so I guess I use that or not use that rule at all and maybe ask the author of the plugin to have some custom switch option I can use.

Closing this for now since there doesn't seem to be anything actionable that we need to do in the theme.