-
-
Notifications
You must be signed in to change notification settings - Fork 28
refactor: enforce strict typing #143
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
Conversation
|
This is potentially problematic due to no constraints on swoole versions. We test with a single swoole version while there are several major releases. This might be broken and we wouldn't even know it. |
|
Wait, |
|
@Ocramius what is worse it can be swoole or openswoole, which diverged and later is pretty much in maintenance only state for a while. I did bring this up in TSC meeting last year although discussion went nowhere at the time iirc |
|
We need to drop support for OpenSwoole IMO and require I don't think we need a TSC vote to do that do we? |
|
The worst that can happen is blocking off an upgrade path: constraint reduction can always be done, while widening is more "definitive" |
0ea459d to
61443a4
Compare
Signed-off-by: mmalac <[email protected]>
61443a4 to
94aa72a
Compare
Signed-off-by: mmalac <[email protected]>
4004574 to
62608f5
Compare
|
Thanks everyone for the feedback. I’ve updated this in #144 to use Swoole v6, which is now installed and tested in CI. Everything passes and the typing changes work correctly. Let me know if there’s anything else needed to move this forward. |
|
@mairo744 I'd say that a rebase of this one is needed then :-) |
|
It was rebased. For the record, I do not like addition of QA tooling to composer.json and to package workflows like here. It is something that needs to be done organization wide via shared CI workflows and actions to be consistent everywhere. |
|
I automated this using Rector and added it to the CI workflow to prevent newly added code from violating these rules. I think this is important to maintain code quality. That said, I agree it would be better to handle this organization-wide through shared CI workflows for consistency. Would you be able to bring this up with the Laminas TSC, or let me know how I can help move it forward? I’d really like to contribute, but I’m not sure what the best next step is. |
|
I'm fine with adding tooling that is locked here: the maintainers of Introducing it in a more generalized way would be nice, and can be proposed for the Laminas CI Matrix Action, IMO: I'd love to see it happen, and I never found the time to do it. |
|
Psalm is not swoole aware so I do not have high confidence. I will need to carefully review this manually. @mairo744 is this blocking any more work you want to do on this component? |
|
Thanks for taking the time to review this. I can hold off on the Rector improvements for now and move to dependency analysis or other work. I think Psalm should be able to check most of the Swoole code with Looking forward to your feedback |
Ocramius
left a comment
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.
This is a lot of tiny BC breaks all over the place, but IMO should be go in as-is.
@Xerkus I think you should press the merge button, when happy about it.
Signed-off-by: Aleksei Khudiakov <[email protected]>
|
Added couple more type declarations in tests and other minor QA improvements. |
|
@mairo744 thank you |
Description
This PR introduces strict typing enforcement using Rector.
readonlyproperties where applicable.psalm-baseline.xmlto remove ignored issues that are now resolved through typing improvements.