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

Add PHPStan support #315

Open
wants to merge 3 commits into
base: 2.21.x
Choose a base branch
from
Open

Conversation

settermjd
Copy link

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA yes

Description

This PR adds support for PHPStan, including adding a Composer script to simplify using it. In addition, it makes a few small fixes, removing/replacing references to deprecated code.

@settermjd settermjd added Enhancement QA Quality assurance tasks such as static analysis improvements labels Dec 3, 2024
@settermjd settermjd self-assigned this Dec 3, 2024
After some discussion with @tyrsson, we decided to use PHPStan instead
of Psalm for static analysis on the project. This change both adds
support for it and adds a small Composer script to simplify using it.

Signed-off-by: Matthew Setter <[email protected]>
This change makes it easier to add extensions to PHPStan in the future,
such as the deprecated code extension that checks for deprecated code.

Signed-off-by: Matthew Setter <[email protected]>
This is a small code clean up after adding PHPStan support. There are a
number of other recommendations from PHPStan, but at this stage, the
test suite needs to be fixed before they can be attended to. But, this
small list is workable.

Signed-off-by: Matthew Setter <[email protected]>
@settermjd settermjd force-pushed the add-phpstan-support branch from 366ffa2 to ae806f7 Compare December 3, 2024 05:00
@froschdesign
Copy link
Member

@settermjd
Please remember this component is in security-only maintenance-mode and we use Psalm instead of PHPStan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement QA Quality assurance tasks such as static analysis improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants