Skip to content

Conversation

rvanvelzen
Copy link
Contributor

This should help getting #1244 over the finish line

@rvanvelzen rvanvelzen force-pushed the default-values-for-native branch from e992f3c to 570e366 Compare April 28, 2022 08:47
use function PHPStan\Testing\assertType;

function () {
assertType('ArrayObject<*NEVER*, *NEVER*>', new \ArrayObject());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't ideal but matches the behavior with the actual default value passed (which is the next line)

@rvanvelzen rvanvelzen changed the title Default values for native Expose default values for native functions/methods Apr 28, 2022
@rvanvelzen
Copy link
Contributor Author

Hmm, obviously this won't work for PHP<8 :/

@ondrejmirtes
Copy link
Member

Oh, you have no idea what you’ve signed up for 😊 This will unblock multiple nice things but I have to do sime preliminary work first and then I’ll get back to you 😊

@ondrejmirtes
Copy link
Member

FYI @rvanvelzen I'm aware of your many PRs you sent in the last 24 hours, but I first want to finish my promise of the work needed for this area, and then I'll look at the other PRs :)

@rvanvelzen
Copy link
Contributor Author

@ondrejmirtes no worries, it gives me enough time to work on implementing assert tags :)

@ondrejmirtes
Copy link
Member

Alright, doing as promised, here's the description of what I want from you: #1276 (comment) Thanks :)

@ondrejmirtes
Copy link
Member

Superseded by #1300

@rvanvelzen rvanvelzen deleted the default-values-for-native branch May 17, 2022 09:51
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.

2 participants