• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set CodeIgniter 4 coding standard in a phpcs.xml file ?

#1
Hello,

I'm working on IonAuth for CI4 : https://github.com/bvrignaud/CodeIgniter...uth/tree/4

I'm trying to set travis jobs.

I have problems with the CodeIgniter coding standard implementation (https://github.com/bcit-ci/CodeIgniter4-Standard).

If I run on command line :
Code:
$ vendor/bin/phpcs --standard=vendor/codeigniter4/codeigniter4-standard/CodeIgniter4 .
It's OK.

But if I set a phpcs.xml.dist with :
Code:
<rule ref="vendor/codeigniter4/codeigniter4-standard/CodeIgniter4/" />
And run it with :
Code:
$ vendor/bin/phpcs

I have this error : PHP Fatal error:  Class 'CodeIgniter4\Sniffs\PHP\ForbiddenFunctionsSniff' not found in /home/benoit/MesProjets/Lab/ci4/src/CodeIgniter-Ion-Auth/vendor/codeigniter4/codeigniter4-standard/CodeIgniter4/Sniffs/PHP/DiscouragedFunctionsSniff.php on line 24

Any ideas ?

Thanks
Reply


Messages In This Thread
How to set CodeIgniter 4 coding standard in a phpcs.xml file ? - by bvrignaud - 10-24-2018, 02:05 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme ¬© 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.