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

Use stubs instead handlers #284

Merged
merged 1 commit into from
Jan 23, 2023
Merged

Conversation

alies-dev
Copy link
Collaborator

@alies-dev alies-dev commented Jan 22, 2023

Hey @mr-feek

I was working on improving stubs for helpers, adding missing and then realised we already have custom handlers for some helper functions. I found that you are an author of these handlers. I really respect your work and contribution to the project, this is why it's totally up to you what to use: handlers or stubs. Of course, handlers are more powerful and customisable, but we don't always need it. Some benefits of stubs:

  • more friendly for new contributors
  • single place of changes
  • less code to maintain (good in case of Psalm API change; good for new comers)

Additionally:

  • I've grouped tests by helper, so CI wii run Psalm only once per helper that should have a positive effect performance-wise.
  • Added more constraints to to status codes

@alies-dev alies-dev self-assigned this Jan 22, 2023
@mr-feek
Copy link
Collaborator

mr-feek commented Jan 23, 2023

If something can be fully expressed in stubs, let's do it! Less code to maintain, the better 👍

@alies-dev alies-dev merged commit dcf53cc into psalm:master Jan 23, 2023
@alies-dev alies-dev deleted the stubs_instead_handlers branch January 23, 2023 15:56
@alies-dev alies-dev added the release:internal for PRs only (used by release-drafter) label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:internal for PRs only (used by release-drafter)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants