Skip to content

Introduce Type::getConstantArrays as successor for TypeUtils::getOldContantArrays #1684

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

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Sep 1, 2022

and deprecate the now both unused TypeUtils::getOldContantArrays() and TypeUtils::getConstantArrays()

@herndlm herndlm marked this pull request as ready for review September 1, 2022 13:21
@herndlm
Copy link
Contributor Author

herndlm commented Sep 1, 2022

Not sure how and why but it reports https://github.com/phpstan/phpstan-src/blob/0645439ef3ebebc87a85ed8046e73302cbca5bd0/tests/PHPStan/Levels/data/arrayDimFetches.php#L28 now as non-existant offset, additionally to L21 which was already reported and I think it is legit. Updated the levels json file.

@herndlm herndlm force-pushed the get-constant-arrays branch from 0645439 to 1fdb846 Compare September 1, 2022 14:07
@herndlm herndlm marked this pull request as draft September 1, 2022 14:22
@herndlm herndlm force-pushed the get-constant-arrays branch 2 times, most recently from 45128c3 to a89666f Compare September 1, 2022 14:55
@herndlm herndlm marked this pull request as ready for review September 1, 2022 15:06
@herndlm herndlm force-pushed the get-constant-arrays branch 3 times, most recently from 5ad50a3 to 5e2370f Compare September 3, 2022 17:43
@herndlm herndlm marked this pull request as draft September 3, 2022 17:57
@herndlm herndlm requested a review from ondrejmirtes September 3, 2022 18:01
@herndlm herndlm marked this pull request as ready for review September 3, 2022 18:01
@herndlm herndlm force-pushed the get-constant-arrays branch from 5e2370f to 23b05e5 Compare September 6, 2022 12:04
@herndlm herndlm marked this pull request as draft September 9, 2022 11:33
@herndlm herndlm force-pushed the get-constant-arrays branch from 23b05e5 to c201e57 Compare October 5, 2022 14:41
@herndlm herndlm changed the base branch from 1.8.x to 1.9.x October 5, 2022 14:41
@herndlm herndlm force-pushed the get-constant-arrays branch 3 times, most recently from 64f30f5 to dff05a5 Compare October 5, 2022 14:49

Verified

This commit was signed with the committer’s verified signature. The key has expired.
ondrejmirtes Ondřej Mirtes
…onstantArrays
@herndlm herndlm force-pushed the get-constant-arrays branch from dff05a5 to e4a3696 Compare October 5, 2022 15:04
@ondrejmirtes
Copy link
Member

I'm eager to merge this :)

@herndlm
Copy link
Contributor Author

herndlm commented Oct 5, 2022

great, 1.9.x might also be a good chance to deprecate those methods :) we just have to be careful with every new usage of deprecated methods that gets added in 1.8.x which could cause phpstan errors on 1.9.x then I guess.

that should not happen often but e.g. #1795 for example. I can rebase after that one got merged up. or just fix it afterwards, it's not a big deal I guess..

@herndlm herndlm marked this pull request as ready for review October 5, 2022 15:38
@ondrejmirtes
Copy link
Member

Yes, that will definitely happen :)

@ondrejmirtes ondrejmirtes merged commit e05a659 into phpstan:1.9.x Oct 5, 2022
@ondrejmirtes
Copy link
Member

Thank you.

@herndlm herndlm deleted the get-constant-arrays branch October 5, 2022 15:39
@herndlm
Copy link
Contributor Author

herndlm commented Oct 5, 2022

I'll deprecate TypeUtils::getArrays() and TypeUtils::getAnyArrays() via #1687 a bit later today

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.

None yet

2 participants