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

Additional auto fixables #5

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

kkmuffme
Copy link
Contributor

  • extends list of auto-fixable array/object types
  • auto-fix Unions where one side is string/union of strings
  • add generic equal class auto-fixables
  • auto-fix Unions where both sides contain only 1 atomic (sub)type
  • make docblock usage configurable via psalm config

Fix: #3

@kkmuffme
Copy link
Contributor Author

Fix #6 now too (except for lists? since we kind of expect lists to have the same ordering, that's the whole reason why list is used, isn't it?)

@kkmuffme
Copy link
Contributor Author

@orklah if you have a few mins I'd really appreciate some feedback on this

@orklah
Copy link
Owner

orklah commented Sep 19, 2022

Yeah sorry, it's on my list, I'll get to it soon

@orklah
Copy link
Owner

orklah commented Sep 20, 2022

Oh. I just realized you didn't see my first round of comments because I didn't publish them :( sorry. I thought you responded to it earlier but it was just a response to my new issue.

You'll see duplicate comments or outdated comments, you can resolve them directly

src/Hooks/StrictEqualityHooks.php Outdated Show resolved Hide resolved
src/Hooks/StrictEqualityHooks.php Show resolved Hide resolved
src/Hooks/StrictEqualityHooks.php Show resolved Hide resolved
src/Hooks/StrictEqualityHooks.php Show resolved Hide resolved
src/Hooks/StrictEqualityHooks.php Show resolved Hide resolved
src/Hooks/StrictEqualityHooks.php Outdated Show resolved Hide resolved
@kkmuffme
Copy link
Contributor Author

kkmuffme commented Dec 1, 2022

Changed various things to handle more common cases and excluded things that won't work.

Overall works quite well, feedback appreciated so this can get merged eventually

@orklah
Copy link
Owner

orklah commented Dec 5, 2022

It's really became a complex piece of code. I'd be way more at ease if we could make some kind of automated check that everything is correct. Not necessarily a whole test suite, but some script we can run to check whether the plugin is doing its job

@kkmuffme
Copy link
Contributor Author

kkmuffme commented Dec 5, 2022

I can add that eventually and merge it then, for now could you please merge #7 and release so the existing plugin can be used as is with psalm v5 at least?

@orklah
Copy link
Owner

orklah commented Dec 5, 2022

Done! Make sure to report any error while running it, the lack of tests on those plugins makes this kind of change random :p

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

Successfully merging this pull request may close these issues.

Many auto-fixable things do not get auto-fixed?
2 participants