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

Do not truncate offset key #3437

Merged
merged 1 commit into from
Sep 14, 2024
Merged

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Sep 13, 2024

When you have an array with long key names, it becomes hard / impossible to see which one errors:

💡 Offset 'lockedPersonalizati…' (F\Q\C\N) does not accept type F\Q\C\N|null.

I think it would be better to be precise here.

@ondrejmirtes curious if you agree 😊

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 2.0.x. PHPStan 2.0 is not going to be released for months. If your code is relevant on 1.12.x and you want it to be released sooner, please rebase your pull request and change its target to 1.12.x.

@ruudk ruudk changed the base branch from 2.0.x to 1.12.x September 13, 2024 07:47
When you have an array with long key names, it becomes hard / impossible to see which one errors.

I think it would be better to be precise here.
@voku
Copy link
Contributor

voku commented Sep 14, 2024

Maybe it would be an idea to make this decision available in the configuration, because every project is different and it might be useful sometimes and sometimes not? 🤔

@ondrejmirtes ondrejmirtes merged commit 2507e38 into phpstan:1.12.x Sep 14, 2024
476 of 499 checks passed
@ondrejmirtes
Copy link
Member

This is just abou an error tip so it should always be precise and informative. Thank you!

@ruudk ruudk deleted the precise-offset-key branch September 14, 2024 14:44
This pull request was closed.
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.

4 participants