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

Stricter typehints matching doc block hints #32

Open
wants to merge 4 commits into
base: 3.7.x
Choose a base branch
from

Conversation

carnage
Copy link

@carnage carnage commented Jul 24, 2021

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

Similar PR to: https://github.com/laminas/laminas-escaper/pull/23/files I started with the string wrapper namespace as an issue was raised against it.

Progressively adding more classes to this PR as time permits I've added typehints to every class where it seems sensible to do so, there are some which inherit/implement built-ins which don't declare the type hint and so opens up a bit of an issue to then add them, you may wish to merge some parts and not others so splitting allows for easier cherry-picking.

Only typehints which don't break bc have been added; eg ones which PHP will silently cast to when strict types = 0; notably callable type hints have not been added and some instances of iterable have been skipped where the previous behaviour was to throw an exception if it wasn't an iterable.

@carnage
Copy link
Author

carnage commented Jul 25, 2021

The test failures are indicating that some of these changes are in fact BC breaks; suggest I revert the changes that cause the tests to fail and we decide if they are wanted to go into a 4.0.x release at some point?

…espace

Signed-off-by: Carnage <t.carnage@gmail.com>
Signed-off-by: Carnage <t.carnage@gmail.com>
@carnage carnage changed the base branch from 3.5.x to 3.7.x September 11, 2021 09:31
Signed-off-by: Carnage <t.carnage@gmail.com>
@carnage
Copy link
Author

carnage commented Sep 11, 2021

Have reverted the changes to the files which failed tests, rebased onto latest branch and retargeted against 3.7.x

Should be ready to go now

@weierophinney weierophinney added this to the 4.0.0 milestone Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants