Skip to content

Commit bfd759b

Browse files
authored
fix: components split dependencies (#6186)
1 parent bc8d57b commit bfd759b

File tree

69 files changed

+2509
-814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2509
-814
lines changed

.github/workflows/ci.yml

+23-23
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ jobs:
6262
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
6363
restore-keys: ${{ runner.os }}-composer-
6464
- name: Update project dependencies
65-
run: |
66-
composer update --no-interaction --no-progress --ansi
67-
- run: php components.php
65+
run: composer update --no-interaction --no-progress --ansi
66+
- run: composer check-dependencies
6867

6968
php-cs-fixer:
7069
name: PHP CS Fixer (PHP ${{ matrix.php }})
@@ -227,19 +226,21 @@ jobs:
227226
- '8.2'
228227
- '8.3'
229228
component:
230-
- JsonSchema
231-
- OpenApi
232-
- Metadata
233-
- ParameterValidator
234-
- Elasticsearch
235-
- HttpCache
236-
- RamseyUuid
237-
- GraphQl
238-
- Serializer
239-
- Symfony
240-
- Doctrine/Common
241-
- Doctrine/Orm
242-
- Doctrine/Odm
229+
- api-platform/doctrine-common
230+
- api-platform/doctrine-orm
231+
- api-platform/doctrine-odm
232+
- api-platform/metadata
233+
- api-platform/json-schema
234+
- api-platform/elasticsearch
235+
- api-platform/openapi
236+
- api-platform/graphql
237+
- api-platform/http-cache
238+
- api-platform/parameter-validator
239+
- api-platform/ramsey-uuid
240+
- api-platform/serializer
241+
- api-platform/state
242+
- api-platform/symfony
243+
- api-platform/validator
243244
include:
244245
- php: '8.1'
245246
coverage: true
@@ -259,23 +260,23 @@ jobs:
259260
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
260261
ini-values: memory_limit=-1
261262
- name: Run ${{ matrix.component }} tests
262-
working-directory: src/${{ matrix.component }}
263263
run: |
264264
composer update
265-
mkdir -p build/logs/phpunit
266-
vendor/bin/phpunit --log-junit "build/logs/phpunit/junit.xml" ${{ matrix.coverage && '--coverage-clover build/logs/phpunit/clover.xml' || '' }}
265+
composer ${{matrix.component}} update
266+
mkdir -p /tmp/build/logs/phpunit
267+
composer ${{matrix.component}} test --log-junit "/tmp/build/logs/phpunit/junit.xml" ${{ matrix.coverage && '--coverage-clover /tmp/build/logs/phpunit/clover.xml' || '' }}
267268
- name: Upload test artifacts
268269
if: always()
269270
uses: actions/upload-artifact@v4
270271
with:
271272
name: phpunit-logs-php${{ matrix.php }}
272-
path: src/${{ matrix.component }}/build/logs/phpunit
273+
path: /tmp/build/logs/phpunit
273274
continue-on-error: true
274275
- name: Upload coverage results to Codecov
275276
if: matrix.coverage
276277
uses: codecov/codecov-action@v3
277278
with:
278-
directory: src/${{ matrix.component }}/build/logs/phpunit
279+
directory: /tmp/build/logs/phpunit
279280
name: phpunit-php${{ matrix.php }}
280281
flags: phpunit
281282
fail_ci_if_error: true
@@ -284,11 +285,10 @@ jobs:
284285
if: matrix.coverage
285286
env:
286287
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
287-
working-directory: src/${{ matrix.component }}
288288
run: |
289289
composer global require --prefer-dist --no-interaction --no-progress --ansi php-coveralls/php-coveralls
290290
export PATH="$PATH:$HOME/.composer/vendor/bin"
291-
php-coveralls --coverage_clover=build/logs/phpunit/clover.xml
291+
php-coveralls --coverage_clover=/tmp/build/logs/phpunit/clover.xml
292292
continue-on-error: true
293293

294294
behat:

components.php

-168
This file was deleted.

composer.json

+45-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"willdurand/negotiation": "^3.0"
3939
},
4040
"require-dev": {
41+
"soyuka/pmu": "^0.0.2",
4142
"behat/behat": "^3.11",
4243
"behat/mink": "^1.9",
4344
"doctrine/cache": "^1.11 || ^2.1",
@@ -149,7 +150,8 @@
149150
"allow-plugins": {
150151
"composer/package-versions-deprecated": true,
151152
"phpstan/extension-installer": true,
152-
"php-http/discovery": true
153+
"php-http/discovery": true,
154+
"soyuka/pmu": true
153155
}
154156
},
155157
"extra": {
@@ -158,6 +160,46 @@
158160
},
159161
"symfony": {
160162
"require": "^6.4 || ^7.0"
161-
}
162-
}
163+
},
164+
"projects": [
165+
"api-platform/doctrine-common",
166+
"api-platform/doctrine-orm",
167+
"api-platform/doctrine-odm",
168+
"api-platform/metadata",
169+
"api-platform/json-schema",
170+
"api-platform/elasticsearch",
171+
"api-platform/jsonld",
172+
"api-platform/hydra",
173+
"api-platform/openapi",
174+
"api-platform/graphql",
175+
"api-platform/http-cache",
176+
"api-platform/documentation",
177+
"api-platform/parameter-validator",
178+
"api-platform/ramsey-uuid",
179+
"api-platform/serializer",
180+
"api-platform/state",
181+
"api-platform/symfony",
182+
"api-platform/validator"
183+
]
184+
},
185+
"repositories": [
186+
{"type": "path", "url": "./src/Doctrine/Common"},
187+
{"type": "path", "url": "./src/Doctrine/Orm"},
188+
{"type": "path", "url": "./src/Doctrine/Odm"},
189+
{"type": "path", "url": "./src/Metadata"},
190+
{"type": "path", "url": "./src/JsonSchema"},
191+
{"type": "path", "url": "./src/Elasticsearch"},
192+
{"type": "path", "url": "./src/JsonLd"},
193+
{"type": "path", "url": "./src/Hydra"},
194+
{"type": "path", "url": "./src/OpenApi"},
195+
{"type": "path", "url": "./src/GraphQl"},
196+
{"type": "path", "url": "./src/HttpCache"},
197+
{"type": "path", "url": "./src/Documentation"},
198+
{"type": "path", "url": "./src/ParameterValidator"},
199+
{"type": "path", "url": "./src/RamseyUuid"},
200+
{"type": "path", "url": "./src/Serializer"},
201+
{"type": "path", "url": "./src/State"},
202+
{"type": "path", "url": "./src/Symfony"},
203+
{"type": "path", "url": "./src/Validator"}
204+
]
163205
}

0 commit comments

Comments
 (0)