Skip to content

Commit

Permalink
fix: components split dependencies (#6186)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Feb 29, 2024
1 parent bc8d57b commit bfd759b
Show file tree
Hide file tree
Showing 69 changed files with 2,509 additions and 814 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Update project dependencies
run: |
composer update --no-interaction --no-progress --ansi
- run: php components.php
run: composer update --no-interaction --no-progress --ansi
- run: composer check-dependencies

php-cs-fixer:
name: PHP CS Fixer (PHP ${{ matrix.php }})
Expand Down Expand Up @@ -227,19 +226,21 @@ jobs:
- '8.2'
- '8.3'
component:
- JsonSchema
- OpenApi
- Metadata
- ParameterValidator
- Elasticsearch
- HttpCache
- RamseyUuid
- GraphQl
- Serializer
- Symfony
- Doctrine/Common
- Doctrine/Orm
- Doctrine/Odm
- api-platform/doctrine-common
- api-platform/doctrine-orm
- api-platform/doctrine-odm
- api-platform/metadata
- api-platform/json-schema
- api-platform/elasticsearch
- api-platform/openapi
- api-platform/graphql
- api-platform/http-cache
- api-platform/parameter-validator
- api-platform/ramsey-uuid
- api-platform/serializer
- api-platform/state
- api-platform/symfony
- api-platform/validator
include:
- php: '8.1'
coverage: true
Expand All @@ -259,23 +260,23 @@ jobs:
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
ini-values: memory_limit=-1
- name: Run ${{ matrix.component }} tests
working-directory: src/${{ matrix.component }}
run: |
composer update
mkdir -p build/logs/phpunit
vendor/bin/phpunit --log-junit "build/logs/phpunit/junit.xml" ${{ matrix.coverage && '--coverage-clover build/logs/phpunit/clover.xml' || '' }}
composer ${{matrix.component}} update
mkdir -p /tmp/build/logs/phpunit
composer ${{matrix.component}} test --log-junit "/tmp/build/logs/phpunit/junit.xml" ${{ matrix.coverage && '--coverage-clover /tmp/build/logs/phpunit/clover.xml' || '' }}
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: phpunit-logs-php${{ matrix.php }}
path: src/${{ matrix.component }}/build/logs/phpunit
path: /tmp/build/logs/phpunit
continue-on-error: true
- name: Upload coverage results to Codecov
if: matrix.coverage
uses: codecov/codecov-action@v3
with:
directory: src/${{ matrix.component }}/build/logs/phpunit
directory: /tmp/build/logs/phpunit
name: phpunit-php${{ matrix.php }}
flags: phpunit
fail_ci_if_error: true
Expand All @@ -284,11 +285,10 @@ jobs:
if: matrix.coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: src/${{ matrix.component }}
run: |
composer global require --prefer-dist --no-interaction --no-progress --ansi php-coveralls/php-coveralls
export PATH="$PATH:$HOME/.composer/vendor/bin"
php-coveralls --coverage_clover=build/logs/phpunit/clover.xml
php-coveralls --coverage_clover=/tmp/build/logs/phpunit/clover.xml
continue-on-error: true

behat:
Expand Down
168 changes: 0 additions & 168 deletions components.php

This file was deleted.

48 changes: 45 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"willdurand/negotiation": "^3.0"
},
"require-dev": {
"soyuka/pmu": "^0.0.2",
"behat/behat": "^3.11",
"behat/mink": "^1.9",
"doctrine/cache": "^1.11 || ^2.1",
Expand Down Expand Up @@ -149,7 +150,8 @@
"allow-plugins": {
"composer/package-versions-deprecated": true,
"phpstan/extension-installer": true,
"php-http/discovery": true
"php-http/discovery": true,
"soyuka/pmu": true
}
},
"extra": {
Expand All @@ -158,6 +160,46 @@
},
"symfony": {
"require": "^6.4 || ^7.0"
}
}
},
"projects": [
"api-platform/doctrine-common",
"api-platform/doctrine-orm",
"api-platform/doctrine-odm",
"api-platform/metadata",
"api-platform/json-schema",
"api-platform/elasticsearch",
"api-platform/jsonld",
"api-platform/hydra",
"api-platform/openapi",
"api-platform/graphql",
"api-platform/http-cache",
"api-platform/documentation",
"api-platform/parameter-validator",
"api-platform/ramsey-uuid",
"api-platform/serializer",
"api-platform/state",
"api-platform/symfony",
"api-platform/validator"
]
},
"repositories": [
{"type": "path", "url": "./src/Doctrine/Common"},
{"type": "path", "url": "./src/Doctrine/Orm"},
{"type": "path", "url": "./src/Doctrine/Odm"},
{"type": "path", "url": "./src/Metadata"},
{"type": "path", "url": "./src/JsonSchema"},
{"type": "path", "url": "./src/Elasticsearch"},
{"type": "path", "url": "./src/JsonLd"},
{"type": "path", "url": "./src/Hydra"},
{"type": "path", "url": "./src/OpenApi"},
{"type": "path", "url": "./src/GraphQl"},
{"type": "path", "url": "./src/HttpCache"},
{"type": "path", "url": "./src/Documentation"},
{"type": "path", "url": "./src/ParameterValidator"},
{"type": "path", "url": "./src/RamseyUuid"},
{"type": "path", "url": "./src/Serializer"},
{"type": "path", "url": "./src/State"},
{"type": "path", "url": "./src/Symfony"},
{"type": "path", "url": "./src/Validator"}
]
}

0 comments on commit bfd759b

Please sign in to comment.