Skip to content

Add a stub package for ext-mongodb#3431

Merged
teohhanhui merged 1 commit into
api-platform:2.5from
teohhanhui:stub-ext-mongodb
Mar 9, 2020
Merged

Add a stub package for ext-mongodb#3431
teohhanhui merged 1 commit into
api-platform:2.5from
teohhanhui:stub-ext-mongodb

Conversation

@teohhanhui

Copy link
Copy Markdown
Contributor
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tickets fixes #3236, fixes #3368 (comment)
License MIT
Doc PR N/A

Comment thread .circleci/config.yml
- checkout
- restore-mongodb-php-extension-build-cache:
php_version: << parameters.php_version >>
- install-mongodb-php-extension

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rationale: Let PHPStan use our stubs so that we know when it's broken (time to sync changes from https://github.com/JetBrains/phpstorm-stubs/blob/master/mongodb/mongodb.php)... 🙏

@dunglas

dunglas commented Mar 6, 2020

Copy link
Copy Markdown
Member

Awesome

@teohhanhui

Copy link
Copy Markdown
Contributor Author

Do you have any concerns about these stub files being in the repository?

Comment thread composer.json Outdated
"twig/twig": "^1.42.3 || ^2.12",
"webonyx/graphql-php": ">=0.13.1 <1.0"
"webonyx/graphql-php": ">=0.13.1 <1.0",
"zz-api-platform-dev/stubs-mongodb": "@dev"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's with the zz-api-platform-dev ? :p

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So that it's sorted at the end. 🤯

@soyuka

soyuka commented Mar 7, 2020

Copy link
Copy Markdown
Member

Indeed I'm not a huge fan of having this in this repository, can't we install this from a distant package via composer?

@teohhanhui

teohhanhui commented Mar 8, 2020

Copy link
Copy Markdown
Contributor Author

I'm not sure, but we might run into composer/composer#5030 probably not, as long as we use an inline repository.

@teohhanhui

Copy link
Copy Markdown
Contributor Author

@soyuka I've extracted the stubs to https://github.com/teohhanhui/stubs-mongodb

@teohhanhui

teohhanhui commented Mar 9, 2020

Copy link
Copy Markdown
Contributor Author

Travis CI needed a bit of hand holding. Hopefully future jobs will be fine... Flaky jobs are annoying.

@teohhanhui
teohhanhui merged commit f79e301 into api-platform:2.5 Mar 9, 2020
@teohhanhui
teohhanhui deleted the stub-ext-mongodb branch March 9, 2020 16:50
@soyuka

soyuka commented Mar 9, 2020

Copy link
Copy Markdown
Member

Awesome job thanks @teohhanhui it'll help a lot on contributing to api-platform :D

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