Skip to content

Conversation

mr-feek
Copy link
Collaborator

@mr-feek mr-feek commented Jun 17, 2022

This PR should tighten the return types of the config helper to be the actual resolved type at runtime, rather than Repository|mixed.

This should result in proper types being returned, and reducing the number of PossiblyInvalidCast that psalm emits after using the config helper

@mr-feek mr-feek added the enhancement New feature or request label Jun 17, 2022
@mr-feek mr-feek force-pushed the config-dynamic-analysis branch from 3ecb761 to cc5203b Compare June 17, 2022 17:48
@mr-feek
Copy link
Collaborator Author

mr-feek commented Jun 17, 2022

Going to leave this open while i ponder how types might change depending on environment configuration

@mr-feek mr-feek changed the base branch from master to 1.x June 17, 2022 18:16
@mr-feek mr-feek changed the base branch from 1.x to master June 17, 2022 18:16
@mr-feek
Copy link
Collaborator Author

mr-feek commented Jun 17, 2022

note: always add the type of the default value to the return union type

@mr-feek
Copy link
Collaborator Author

mr-feek commented Jun 21, 2022

I made a preliminary PR to at least correct the basic typehint of config which i will ship first #230

@alies-dev alies-dev added release:feature for PRs only (used by release-drafter) release:minor for PRs only (used by release-drafter) and removed enhancement New feature or request labels Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:feature for PRs only (used by release-drafter) release:minor for PRs only (used by release-drafter)

2 participants