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

Update function map for ext-mongodb 1.17 #2768

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

alcaeus
Copy link
Contributor

@alcaeus alcaeus commented Nov 23, 2023

No description provided.

'MongoDB\Driver\Monitoring\addSubscriber' => ['void', 'subscriber'=>'MongoDB\Driver\Monitoring\Subscriber'],
'MongoDB\Driver\Monitoring\removeSubscriber' => ['void', 'subscriber'=>'MongoDB\Driver\Monitoring\Subscriber'],
'MongoDB\BSON\Binary::__construct' => ['void', 'data'=>'string', 'type='=>'int'],
'MongoDB\BSON\fromJSON' => ['string', 'json' => 'string'],
Copy link
Member

Choose a reason for hiding this comment

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

Because of the => and => change this is very hard to review. Please do not change this formatting as the rest of the file also use =>.

@alcaeus
Copy link
Contributor Author

alcaeus commented Nov 26, 2023

You can view changes without whitespaces: https://github.com/phpstan/phpstan-src/pull/2768/files?diff=unified&w=1

There are a few lines at the bottom that also have that space, and the tooling we use outputs the code with whitespaces as they are required by other tools where we re-use this code (e.g. Psalm). If you insist I can remove them, but it's an extra effort I'd like to avoid as we're already having to update these stubs in three places.

I'm also happy to create a separate pull request that adds whitespaces to the rest of the file to make it compliant with widely accepted coding standards.

@thg2k
Copy link
Contributor

thg2k commented Nov 26, 2023

Despite me also being fond of coding style, making such a big change on a stable branch just for the sake of coding style is unwise. It would cause all kinds of conflicts on other open PRs, WIPs, and altered forks

@ondrejmirtes
Copy link
Member

I just unified the array format in functionMap: 97d9ddf

Please fix the formatting of your PR.

@ondrejmirtes ondrejmirtes merged commit d00509b into phpstan:1.10.x Nov 27, 2023
75 of 82 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@alcaeus
Copy link
Contributor Author

alcaeus commented Nov 27, 2023

I just unified the array format in functionMap: 97d9ddf

Please fix the formatting of your PR.

For the record, there are spaces on first array level, e.g.:

'MongoDB\Driver\WriteConcern::unserialize' => ['void', 'data'=>'string'],

Not sure why the parameter list is special in that regard, especially considering that the rest of the source code uses different formatting, but it's not my call 🤷‍♂️

@alcaeus alcaeus deleted the mongodb-1.17-stubs branch November 27, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants