Skip to content

Add functions with conditional return types#73

Merged
szepeviktor merged 1 commit intophp-stubs:masterfrom
IanDelMar:conditional-return-types
Apr 15, 2023
Merged

Add functions with conditional return types#73
szepeviktor merged 1 commit intophp-stubs:masterfrom
IanDelMar:conditional-return-types

Conversation

@IanDelMar
Copy link
Copy Markdown
Contributor

Adds functions to the map using conditional return types that are currently handled via return type extensions in szepeviktor/phpstan-wordpress.

Also adds get_post_types() (szepeviktor/phpstan-wordpress#177).

Not thoroughly tested yet.

@szepeviktor
Copy link
Copy Markdown
Member

Thank you very much!

So should I remove all these extensions from phpstan-wordpress in the near future?

@IanDelMar
Copy link
Copy Markdown
Contributor Author

So should I remove all these extensions from phpstan-wordpress in the near future?

Depends on the supported versions of WP or wordpress-stubs respectively. Also, we should check if the extensions are fully covered by conditional return types.

@herndlm
Copy link
Copy Markdown
Contributor

herndlm commented Apr 15, 2023

I'd say if you remove them you should bump the required min version of the stubs package. Then it should be safe, right? But it essentially comes down to supported WP versions then as @IanDelMar said I guess

@szepeviktor
Copy link
Copy Markdown
Member

comes down to supported WP versions

I support WordPress versions < 0 and > 7000000.

@herndlm
Copy link
Copy Markdown
Contributor

herndlm commented Apr 15, 2023

You say that but secretly you try to be super backwards compatible. Like, ahem, WordPress xD

@IanDelMar IanDelMar deleted the conditional-return-types branch April 16, 2023 08:15
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.

3 participants