Skip to content

Commit f79e301

Browse files
authored
Merge pull request #3431 from teohhanhui/stub-ext-mongodb
Add a stub package for ext-mongodb
2 parents 914d9a6 + 7817cca commit f79e301

File tree

5 files changed

+12
-36
lines changed

5 files changed

+12
-36
lines changed

.circleci/config.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
version: 2.1
22

3-
.constants:
4-
- &ext-mongodb-version '1.6.1'
5-
63
commands:
74
clear-test-app-cache:
85
steps:
@@ -19,11 +16,6 @@ commands:
1916
- run:
2017
name: Disable xdebug PHP extension
2118
command: sudo rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
22-
install-mongodb-php-extension:
23-
steps:
24-
- install-php-extension-from-pecl:
25-
extension_name: mongodb
26-
extension_version: *ext-mongodb-version
2719
install-php-extension-from-pecl:
2820
parameters:
2921
extension_name:
@@ -64,16 +56,6 @@ commands:
6456
- composer-{{ .Revision }}
6557
- composer-{{ .Branch }}
6658
- composer-
67-
restore-mongodb-php-extension-build-cache:
68-
parameters:
69-
php_version:
70-
description: PHP version (major.minor).
71-
type: string
72-
steps:
73-
- restore-php-extension-build-cache:
74-
extension_name: mongodb
75-
extension_version: *ext-mongodb-version
76-
php_version: << parameters.php_version >>
7759
restore-php-cs-fixer-cache:
7860
steps:
7961
- restore_cache:
@@ -118,16 +100,6 @@ commands:
118100
paths:
119101
- ~/.composer/cache
120102
key: composer-{{ .Revision }}-{{ .BuildNum }}
121-
save-mongodb-php-extension-build-cache:
122-
parameters:
123-
php_version:
124-
description: PHP version (major.minor).
125-
type: string
126-
steps:
127-
- save-php-extension-build-cache:
128-
extension_name: mongodb
129-
extension_version: *ext-mongodb-version
130-
php_version: << parameters.php_version >>
131103
save-php-cs-fixer-cache:
132104
steps:
133105
- save_cache:
@@ -231,11 +203,6 @@ jobs:
231203
working_directory: ~/api-platform/core
232204
steps:
233205
- checkout
234-
- restore-mongodb-php-extension-build-cache:
235-
php_version: << parameters.php_version >>
236-
- install-mongodb-php-extension
237-
- save-mongodb-php-extension-build-cache:
238-
php_version: << parameters.php_version >>
239206
- disable-xdebug-php-extension
240207
- disable-php-memory-limit
241208
- restore-composer-cache

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
COMPOSER_ALLOW_SUPERUSER: '1' # https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
99
COMPOSER_INSTALLER_COMMIT: fb22b78362d31c0d2bf516d1f8cdfd2745caa431
1010
COVERAGE: '0'
11-
EXT_MONGODB_VERSION: '1.6.1'
11+
EXT_MONGODB_VERSION: '1.7.3'
1212
EXT_PCOV_VERSION: '1.0.6'
1313

1414
jobs:

.php_cs.dist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ HEADER;
1313

1414
$finder = PhpCsFixer\Finder::create()
1515
->in(__DIR__)
16-
->exclude('tests/Fixtures/app/var')
16+
->exclude([
17+
'tests/Fixtures/app/var',
18+
])
1719
->append([
1820
'tests/Fixtures/app/console',
1921
]);

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install:
1313
- ps: |
1414
$web = New-Object Net.WebClient
1515
$web.Headers.Add('user-agent', 'AppVeyor')
16-
$web.DownloadFile('https://windows.php.net/downloads/pecl/releases/mongodb/1.6.1/php_mongodb-1.6.1-7.4-nts-vc15-x64.zip', 'c:\tools\php74\ext\php_mongodb.zip')
16+
$web.DownloadFile('https://windows.php.net/downloads/pecl/releases/mongodb/1.7.3/php_mongodb-1.7.3-7.4-nts-vc15-x64.zip', 'c:\tools\php74\ext\php_mongodb.zip')
1717
- 7z x php_mongodb.zip -y >nul
1818
- cd ..
1919
- copy php.ini-production php.ini /Y

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"symfony/validator": "^3.4 || ^4.0 || ^5.0",
8787
"symfony/web-profiler-bundle": "^4.2 || ^5.0",
8888
"symfony/yaml": "^3.4 || ^4.0 || ^5.0",
89+
"teohhanhui/stubs-mongodb": "@dev",
8990
"twig/twig": "^1.42.3 || ^2.12",
9091
"webonyx/graphql-php": ">=0.13.1 <1.0"
9192
},
@@ -119,6 +120,12 @@
119120
"ApiPlatform\\Core\\Tests\\": "tests/"
120121
}
121122
},
123+
"repositories": [
124+
{
125+
"type": "vcs",
126+
"url": "https://github.com/teohhanhui/stubs-mongodb"
127+
}
128+
],
122129
"config": {
123130
"preferred-install": {
124131
"*": "dist"

0 commit comments

Comments
 (0)