Skip to content

Promote native types#1943

Merged
ondrejmirtes merged 15 commits into1.10.xfrom
promote-native-types
Jan 13, 2023
Merged

Promote native types#1943
ondrejmirtes merged 15 commits into1.10.xfrom
promote-native-types

Conversation

@ondrejmirtes
Copy link
Copy Markdown
Member

No description provided.

This was referenced Oct 31, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member Author

/cc @rajyan I feel like we need these fixes but judging from the results in the pipeline it's too soon for them and we need other fixes before that :)

@ondrejmirtes ondrejmirtes force-pushed the promote-native-types branch 5 times, most recently from d583dc7 to c5f39aa Compare October 31, 2022 20:43
@rajyan
Copy link
Copy Markdown
Contributor

rajyan commented Nov 1, 2022

I checked
Rector, composer, phpstan-webmozart-assert test failures looks like caused from improvement of native types, so valid.

not sure enough with nextras/orm
https://github.com/phpstan/phpstan-src/actions/runs/3364624981/jobs/5579240300
but basically look correct.

The first failure of phpstan-phpunit is wrong.
https://github.com/phpstan/phpstan-src/actions/runs/3364624981/jobs/5579231181

@rajyan
Copy link
Copy Markdown
Contributor

rajyan commented Nov 1, 2022

Looks like we are almost there!

@ondrejmirtes
Copy link
Copy Markdown
Member Author

Some of the existing errors are because getNativeType() for MethodCall should only read native typehints. I'm already working on it locally 😊

And the todos in that issue will help with various little bugs...

I think we can release 1.9.0 at any time and leave this for a future version, it's already feature-packed and 1.9.x branch is stable enough now 😊

Another problem in this PR is performance, calling TypeSpecifier twice slows PHPStan down, I'd love to see some ideas for optimizations.

@rajyan
Copy link
Copy Markdown
Contributor

rajyan commented Nov 1, 2022

I think we can release 1.9.0 at any time and leave this for a future version, it's already feature-packed and 1.9.x branch is stable enough now 😊

Looking forward for the release!!

Another problem in this PR is performance, calling TypeSpecifier twice slows PHPStan down, I'd love to see some ideas for optimizations.

Yeah, performance was one problem I was worried about when thinking about native types.
I would look for optimizations too.

@ondrejmirtes ondrejmirtes marked this pull request as ready for review January 13, 2023 10:51
@ondrejmirtes ondrejmirtes merged commit 1a855bc into 1.10.x Jan 13, 2023
@ondrejmirtes ondrejmirtes deleted the promote-native-types branch January 13, 2023 10:51
@ondrejmirtes
Copy link
Copy Markdown
Member Author

It's not perfect but it's fine :)

@phpstan-bot
Copy link
Copy Markdown
Collaborator

This pull request has been marked as ready for review.

@rajyan
Copy link
Copy Markdown
Contributor

rajyan commented Jan 14, 2023

I'm glad to know and thank you for improving the Native types idea to a level where it can be merged!

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