What is Psalm?
Psalm is a static analysis tool for PHP that helps you identify problems with your code. If you use it, you’ll become a better coder. I promise.
Learn more about Psalm
Here’s a great read – the story of the origins of Psalm at Vimeo and the value it provided the team.
https://psalm.dev/articles/fixing-code-that-aint-broken
In this post, I’ll show a basic setup for static analysis with Psalm in Mezzio applications.
Configuration
psalm.xml
|
|
Changes Required for Psalm Error Level 1
It’s probably easiest to read the diff here:
What’s Next?
The next post in this series adds Doctrine Entity classes and tests. We’ll create only those models necessary for a baseline OAuth2 implementation.
Series: Mezzio Example
- Mezzio Example: Introduction
- Mezzio Example: Functional and Unit Testing
- Mezzio Example: Psalm Introduction
- Mezzio Example: Doctrine Entities and Repositories