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

Implement a mechanism to shrink the vimeo/psalm baseline, when possible #159

Open
Ocramius opened this issue Dec 8, 2022 · 1 comment
Open

Comments

@Ocramius
Copy link
Member

Ocramius commented Dec 8, 2022

Feature Request

Q A
New Feature yes
RFC yes
BC Break no

Summary

Whenever we make small adjustments to our codebase, we may improve type information.

It may be a good idea to reduce our psalm-baseline.xml accordingly, when possible.

The rough idea is that:

  1. a new change is pushed to the main configured branch (to be detected by CI)
  2. the change removed one type error somewhere
  3. we run vendor/bin/psalm --update-baseline, which should reduce the contents of psalm-baseline.xml (if it exists)
  4. if changes are produced by this pipeline, commit them
  5. push these changes to a reserved branch
  6. run CI on that branch
  7. auto-merge to main branch

This is extremely elaborate, compared to our current CI tasks, so it requires a lot of added engineering work around the pipeline, but it can probably be done :-)

@boesing
Copy link
Member

boesing commented Feb 23, 2023

With psalm having the new feature findUnusedBaselineEntry, I'd rather have this being done by the developer who improves types.

Not sure if the CI pipeline is the right place to run code improvements tho. We do require developers to run composer cs-fix, why not add composer baseline-update and let devs run this as well (once we enabled findUnusedBaselineEntry)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants