-
Notifications
You must be signed in to change notification settings - Fork 109
feat(psalm): Treat deprecated code as error #7241
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| <?xml version="1.0"?> | ||
| <psalm | ||
| errorLevel="2" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="https://getpsalm.org/schema/config" | ||
| xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
| errorBaseline="tests/psalm-baseline.xml" | ||
| findUnusedCode="false" | ||
| phpVersion="8.1" | ||
| errorLevel="2" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="https://getpsalm.org/schema/config" | ||
| xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
| errorBaseline="tests/psalm-baseline.xml" | ||
| findUnusedCode="false" | ||
| phpVersion="8.1" | ||
| > | ||
| <stubs> | ||
| <file name="tests/stub.php" preloadClasses="true"/> | ||
| </stubs> | ||
| <projectFiles> | ||
| <directory name="lib" /> | ||
| <ignoreFiles> | ||
| <directory name="vendor" /> | ||
| </ignoreFiles> | ||
| </projectFiles> | ||
| <extraFiles> | ||
| <directory name="vendor/nextcloud/ocp" /> | ||
| </extraFiles> | ||
| <projectFiles> | ||
| <directory name="lib" /> | ||
| <ignoreFiles> | ||
| <directory name="vendor" /> | ||
| </ignoreFiles> | ||
| </projectFiles> | ||
| <extraFiles> | ||
| <directory name="vendor/nextcloud/ocp" /> | ||
| </extraFiles> | ||
| <issueHandlers> | ||
| <UndefinedClass> | ||
| <errorLevel type="suppress"> | ||
|
|
@@ -37,5 +37,40 @@ | |
| <referencedClass name="Doctrine\DBAL\Statement" /> | ||
| </errorLevel> | ||
| </UndefinedDocblockClass> | ||
| <DeprecatedClass> | ||
| <errorLevel type="suppress"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure i get this right, but wouldn't this suppress all of them directly? If we have any we should rather add to the baseline, right?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, I should have checked more thoroughly. Thanks for catching this. |
||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedClass> | ||
| <DeprecatedConstant> | ||
| <errorLevel type="suppress"> | ||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedConstant> | ||
| <DeprecatedFunction> | ||
| <errorLevel type="suppress"> | ||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedFunction> | ||
| <DeprecatedInterface> | ||
| <errorLevel type="suppress"> | ||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedInterface> | ||
| <DeprecatedMethod> | ||
| <errorLevel type="suppress"> | ||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedMethod> | ||
| <DeprecatedProperty> | ||
| <errorLevel type="suppress"> | ||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedProperty> | ||
| <DeprecatedTrait> | ||
| <errorLevel type="suppress"> | ||
| <directory name="lib" /> | ||
| </errorLevel> | ||
| </DeprecatedTrait> | ||
| </issueHandlers> | ||
| </psalm> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are at error level 2 which should already throw errors if we have deprecations in use:
https://psalm.dev/docs/running_psalm/error_levels/