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

Quality Assurance tools integration. #30

Open
2 of 10 tasks
azjezz opened this issue Jul 10, 2020 · 5 comments
Open
2 of 10 tasks

Quality Assurance tools integration. #30

azjezz opened this issue Jul 10, 2020 · 5 comments
Assignees
Labels
Status: In Progress This issue is being worked on, and has someone assigned. Type: Enhancement Most issues will probably ask for additions or changes. Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity
Projects

Comments

@azjezz
Copy link
Owner

azjezz commented Jul 10, 2020

This is a meta issue to keep track of which QA tools are being used in PSL, the end goal is to have all these tools ( and more hopefully ) integrated with PSL and as part of our CI. ( PRs welcome! )

Coding Standards

Tool Description Integrated
php-cs-fixer PHP Coding Standards Fixer
php_codesniffer ✔️

There's a lot of rules we have that are currently not enforced by CI:

  • a file can only contain 1 function declaration
  • Psl\Foo\Bar\Baz\qux function must be declared in src/Psl/Foo/Bar/Baz/qux.php
  • function name must be in snake_case
  • argument name must be in snake_case
  • constant Psl\Foo\Bar\BAZ_QUX must be declared in src/Psl/Foo/Bar/constants.php
  • all classes should be declared either final or abstract ( unless its an exception )
  • interface names should end with Interface suffix
  • abstract classes should have the Abstract prefix
  • traits should end with Trait suffix
  • closure should always be declared static, even within functions, when $this is not used.

Static Analysis

Tool Description Integrated Coverage
PSalm Static Analysis tool. 100%
PHPStan Static Analysis tool. 0%
SymfonyInsight PHP project quality, done right. n/a
php-assumptions Tool to detect assumptions n/a?
phpmd n/a?

Testing

Tool Description Integrated Coverage
PHPUnit Unit Testing framework. 100%

Security

Tool Description Integrated
RoaveSecurityAdvisories Security advisories as a simple composer exclusion list.
SymfonoySecurity PHP security vulnerabilities monitoring.
Psalm ( taint analysis ) Static Analysis tool.
@azjezz azjezz added Status: In Progress This issue is being worked on, and has someone assigned. Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity Type: Enhancement Most issues will probably ask for additions or changes. labels Jul 10, 2020
@azjezz azjezz self-assigned this Jul 10, 2020
@azjezz
Copy link
Owner Author

azjezz commented Jul 10, 2020

cc @fmasa :)

@azjezz azjezz pinned this issue Jul 10, 2020
@azjezz azjezz added this to In progress in v1.0.0 Jul 10, 2020
@azjezz
Copy link
Owner Author

azjezz commented Jul 11, 2020

related #31

@azjezz azjezz added this to the v1.0.0 milestone Jul 12, 2020
@fmasa
Copy link

fmasa commented Jul 15, 2020

@azjezz I have looked into PHPStan here. There is sadly nothing similar to type coverage as it is reported by Psalm (closest thing is probably phpstan/phpstan#845). What I can do is adding relevant @phpstan- annotations and add PHPStan to CI (for code itself and maybe for tests?).

If that makes sense to you, then I'll try to do some groundwork this weekend 🙂)

@azjezz
Copy link
Owner Author

azjezz commented Jul 15, 2020

Sure! That would be a great addition

@BackEndTea
Copy link
Contributor

Infection may be able to mutate functions in the future: infection/infection#1483 It may be a nice addition to the toolchain, once that is possible

@azjezz azjezz removed this from the 2.0.0 milestone May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress This issue is being worked on, and has someone assigned. Type: Enhancement Most issues will probably ask for additions or changes. Type: Maintenance Updating phrasing or wording to make things clearer or removing ambiguity
Projects
No open projects
v1.0.0
  
In progress
Development

No branches or pull requests

3 participants