Skip to content

Commit e84d080

Browse files
committed
fix: components split dependencies
1 parent 7694219 commit e84d080

File tree

75 files changed

+2535
-822
lines changed

Some content is hidden

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

75 files changed

+2535
-822
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

+63-3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,25 @@
3838
"willdurand/negotiation": "^3.0"
3939
},
4040
"require-dev": {
41+
"soyuka/pmu": "^0.0.1",
42+
"api-platform/doctrine-common": "*@dev",
43+
"api-platform/doctrine-orm": "*@dev",
44+
"api-platform/doctrine-odm": "*@dev",
45+
"api-platform/metadata": "*@dev",
46+
"api-platform/json-schema": "*@dev",
47+
"api-platform/elasticsearch": "*@dev",
48+
"api-platform/jsonld": "*@dev",
49+
"api-platform/hydra": "*@dev",
50+
"api-platform/openapi": "*@dev",
51+
"api-platform/graphql": "*@dev",
52+
"api-platform/http-cache": "*@dev",
53+
"api-platform/documentation": "*@dev",
54+
"api-platform/parameter-validator": "*@dev",
55+
"api-platform/ramsey-uuid": "*@dev",
56+
"api-platform/serializer": "*@dev",
57+
"api-platform/state": "*@dev",
58+
"api-platform/symfony": "*@dev",
59+
"api-platform/validator": "*@dev",
4160
"behat/behat": "^3.11",
4261
"behat/mink": "^1.9",
4362
"doctrine/cache": "^1.11 || ^2.1",
@@ -149,7 +168,8 @@
149168
"allow-plugins": {
150169
"composer/package-versions-deprecated": true,
151170
"phpstan/extension-installer": true,
152-
"php-http/discovery": true
171+
"php-http/discovery": true,
172+
"soyuka/pmu": true
153173
}
154174
},
155175
"extra": {
@@ -158,6 +178,46 @@
158178
},
159179
"symfony": {
160180
"require": "^6.4 || ^7.0"
161-
}
162-
}
181+
},
182+
"projects": [
183+
"api-platform/doctrine-common",
184+
"api-platform/doctrine-orm",
185+
"api-platform/doctrine-odm",
186+
"api-platform/metadata",
187+
"api-platform/json-schema",
188+
"api-platform/elasticsearch",
189+
"api-platform/jsonld",
190+
"api-platform/hydra",
191+
"api-platform/openapi",
192+
"api-platform/graphql",
193+
"api-platform/http-cache",
194+
"api-platform/documentation",
195+
"api-platform/parameter-validator",
196+
"api-platform/ramsey-uuid",
197+
"api-platform/serializer",
198+
"api-platform/state",
199+
"api-platform/symfony",
200+
"api-platform/validator"
201+
]
202+
},
203+
"repositories": [
204+
{"type": "path", "url": "./src/Doctrine/Common"},
205+
{"type": "path", "url": "./src/Doctrine/Orm"},
206+
{"type": "path", "url": "./src/Doctrine/Odm"},
207+
{"type": "path", "url": "./src/Metadata"},
208+
{"type": "path", "url": "./src/JsonSchema"},
209+
{"type": "path", "url": "./src/Elasticsearch"},
210+
{"type": "path", "url": "./src/JsonLd"},
211+
{"type": "path", "url": "./src/Hydra"},
212+
{"type": "path", "url": "./src/OpenApi"},
213+
{"type": "path", "url": "./src/GraphQl"},
214+
{"type": "path", "url": "./src/HttpCache"},
215+
{"type": "path", "url": "./src/Documentation"},
216+
{"type": "path", "url": "./src/ParameterValidator"},
217+
{"type": "path", "url": "./src/RamseyUuid"},
218+
{"type": "path", "url": "./src/Serializer"},
219+
{"type": "path", "url": "./src/State"},
220+
{"type": "path", "url": "./src/Symfony"},
221+
{"type": "path", "url": "./src/Validator"}
222+
]
163223
}

0 commit comments

Comments
 (0)