appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

🔎 Add Code Analyzer To ‘utopia-php/swoole’

Open christyjacob4 opened this issue 3 years ago • 8 comments

💭 Introduction

Code analyzer is one of the most valuable tools in the open source world. It not only ensures every high quality of the code but also allows CI/CD to ensure this. A code analyzer can find a potential bug, unexpected null value, or type mismatch. Having a code analyzer set up should be a high priority for every project as it makes the project more stable and bug-proof.

Your task is to update our library utopia-php/swoole and implement a code analyzer. We would like to use PHPStan as our analyzer.

To make this task easy, we created a sample pull request showing what exactly needs to be done to implement the analyzer into the Utopia PHP library: https://github.com/utopia-php/ab/pull/8

🎯 Requirements

  • Experience with GitHub Actions.
  • Experience with Composer.
  • Experience with PHP.

✅ Task Summary

Please configure PHPStan to max level (9). If that gives you too many problems that you cannot solve, please drop to level 8. If you have trouble with level 8 as well, let us know, and we can consider a lower level on some repositories.

If you have questions, need any help, or just want to hang out, make sure to join us on our Discord server.

Happy Appwriting!

christyjacob4 avatar Oct 10 '22 09:10 christyjacob4

Done with previous Author remove task. Interested in this issue. Please assign me. Thanks

nooras avatar Oct 11 '22 08:10 nooras

@nooras Eyyyyy love to see you submit PR for your last issue 🤩 thanks for more interest! 🔥 Happy hacking! 🎃

Meldiron avatar Oct 11 '22 08:10 Meldiron

HI @Meldiron Need help I made changes in below files image

on running composer check i am getting lots of error

image

Can you please help me how to resolve that ? Do i need to resolved each error manually or there is some direct command?? Thanks

nooras avatar Oct 15 '22 10:10 nooras

HI can anyone please help me @Meldiron @stnguyen90 @christyjacob4 in above issues.

nooras avatar Oct 16 '22 08:10 nooras

HI can anyone please help me @Meldiron @stnguyen90 @christyjacob4 in above issues.

You can drop PHPstan to level 8 if you cannot solve so many errors.

devmike123 avatar Oct 16 '22 10:10 devmike123

HI can anyone please help me @Meldiron @stnguyen90 @christyjacob4 in above issues.

How many errors are there?

Total 53 image image image

nooras avatar Oct 16 '22 10:10 nooras

HI can anyone please help me @Meldiron @stnguyen90 @christyjacob4 in above issues.

You can drop PHPstan to level 8 if you cannot solve so many errors.

How to do that @DevMike123 ?

nooras avatar Oct 16 '22 10:10 nooras

@nooras PHPStan level can be configured in composer.json. The command you added mentions --level max, so that would become --level 8

Meldiron avatar Oct 17 '22 06:10 Meldiron