Skip to content

Commit 0a1a1ea

Browse files
authored
ci: prefer-lowest to avoid bumping inter components dependencies (#7169)
1 parent fdb485d commit 0a1a1ea

File tree

26 files changed

+139
-58
lines changed

26 files changed

+139
-58
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ jobs:
264264
continue-on-error: true
265265

266266
phpunit-components:
267-
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.coverage && 'coverage' || '' }}
267+
name: PHPUnit ${{ matrix.component }} (PHP ${{ matrix.php.version }} ${{ matrix.php.coverage && 'coverage' || '' }}${{ matrix.php.lowest && 'lowest' || '' }})
268268
runs-on: ubuntu-latest
269269
timeout-minutes: 20
270270
strategy:
@@ -274,6 +274,8 @@ jobs:
274274
- version: '8.3'
275275
- version: '8.4'
276276
coverage: true
277+
- version: '8.4'
278+
lowest: true
277279
component:
278280
- api-platform/doctrine-common
279281
- api-platform/doctrine-orm
@@ -302,14 +304,20 @@ jobs:
302304
tools: pecl, composer
303305
extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite, mongodb
304306
ini-values: memory_limit=-1
305-
- name: Linking
307+
- name: PMU
306308
run: |
307309
composer global require soyuka/pmu
308310
composer global config allow-plugins.soyuka/pmu true --no-interaction
311+
- name: Linking
312+
if: ${{ !matrix.php.lowest }}
313+
run: |
309314
composer global link . --permanent
315+
composer ${{matrix.component}} update
310316
- name: Run ${{ matrix.component }} install
317+
if: ${{ matrix.php.lowest }}
311318
run: |
312-
composer ${{matrix.component}} update
319+
cd $(composer ${{matrix.component}} --cwd)
320+
composer update${{ matrix.php.lowest && ' --prefer-lowest --prefer-source' || '' }}
313321
- name: Run ${{ matrix.component }} tests
314322
run: |
315323
mkdir -p /tmp/build/logs/phpunit

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"version": "4.1.12",
23
"authors": [
34
{
45
"name": "Kévin Dunglas",
@@ -47,7 +48,8 @@
4748
"extra": {
4849
"branch-alias": {
4950
"dev-3.4": "3.4.x-dev",
50-
"dev-main": "4.0.x-dev"
51+
"dev-4.1": "4.1.x-dev",
52+
"dev-main": "4.2.x-dev"
5153
},
5254
"symfony": {
5355
"require": "^6.4 || ^7.1"
@@ -104,7 +106,7 @@
104106
},
105107
"require": {
106108
"php": ">=8.2",
107-
"doctrine/inflector": "^1.0 || ^2.0",
109+
"doctrine/inflector": "^2.0",
108110
"psr/cache": "^1.0 || ^2.0 || ^3.0",
109111
"psr/container": "^1.0 || ^2.0",
110112
"symfony/deprecation-contracts": "^3.1",

src/Doctrine/Common/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"extra": {
6262
"branch-alias": {
6363
"dev-main": "4.2.x-dev",
64-
"dev-3.4": "3.4.x-dev"
64+
"dev-3.4": "3.4.x-dev",
65+
"dev-4.1": "4.1.x-dev"
6566
},
6667
"symfony": {
6768
"require": "^6.4 || ^7.0"
@@ -79,5 +80,6 @@
7980
"type": "vcs",
8081
"url": "https://github.com/soyuka/phpunit"
8182
}
82-
]
83+
],
84+
"version": "4.1.12"
8385
}

src/Doctrine/Odm/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"extra": {
6262
"branch-alias": {
6363
"dev-main": "4.2.x-dev",
64-
"dev-3.4": "3.4.x-dev"
64+
"dev-3.4": "3.4.x-dev",
65+
"dev-4.1": "4.1.x-dev"
6566
},
6667
"symfony": {
6768
"require": "^6.4 || ^7.0"
@@ -79,5 +80,6 @@
7980
"type": "vcs",
8081
"url": "https://github.com/soyuka/phpunit"
8182
}
82-
]
83+
],
84+
"version": "4.1.12"
8385
}

src/Doctrine/Orm/Filter/BackedEnumFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ protected function isBackedEnumField(string $property, string $resourceClass): b
163163
$fieldMapping = (array) $fieldMapping;
164164
}
165165

166-
if (!$enumType = $fieldMapping['enumType']) {
166+
if (!($enumType = $fieldMapping['enumType'] ?? null)) {
167167
return false;
168168
}
169169

src/Doctrine/Orm/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"extra": {
6262
"branch-alias": {
6363
"dev-main": "4.2.x-dev",
64-
"dev-3.4": "3.4.x-dev"
64+
"dev-3.4": "3.4.x-dev",
65+
"dev-4.1": "4.1.x-dev"
6566
},
6667
"symfony": {
6768
"require": "^6.4 || ^7.0"
@@ -79,5 +80,6 @@
7980
"type": "vcs",
8081
"url": "https://github.com/soyuka/phpunit"
8182
}
82-
]
83+
],
84+
"version": "4.1.12"
8385
}

src/Documentation/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"extra": {
2727
"branch-alias": {
2828
"dev-main": "4.2.x-dev",
29-
"dev-3.4": "3.4.x-dev"
29+
"dev-3.4": "3.4.x-dev",
30+
"dev-4.1": "4.1.x-dev"
3031
},
3132
"symfony": {
3233
"require": "^6.4 || ^7.0"
@@ -44,5 +45,6 @@
4445
"type": "vcs",
4546
"url": "https://github.com/soyuka/phpunit"
4647
}
47-
]
48+
],
49+
"version": "4.1.12"
4850
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace ApiPlatform\Elasticsearch\Tests\Fixtures\Metadata;
15+
16+
use ApiPlatform\Metadata\HttpOperation;
17+
18+
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
19+
final class Get extends HttpOperation
20+
{
21+
/**
22+
* {@inheritdoc}
23+
*/
24+
public function __construct(...$args)
25+
{
26+
parent::__construct('GET', ...$args);
27+
}
28+
}

src/Elasticsearch/Tests/Metadata/Resource/Factory/ElasticsearchProviderResourceMetadataCollectionFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
use ApiPlatform\Elasticsearch\Metadata\Resource\Factory\ElasticsearchProviderResourceMetadataCollectionFactory;
1717
use ApiPlatform\Elasticsearch\Tests\Fixtures\Foo;
18+
use ApiPlatform\Elasticsearch\Tests\Fixtures\Metadata\Get;
1819
use ApiPlatform\Metadata\ApiResource;
1920
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2021
use ApiPlatform\Metadata\Resource\ResourceMetadataCollection;
21-
use ApiPlatform\Metadata\Tests\Fixtures\Metadata\Get;
2222
use PHPUnit\Framework\TestCase;
2323
use Prophecy\PhpUnit\ProphecyTrait;
2424

src/Elasticsearch/composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
"extra": {
6262
"branch-alias": {
6363
"dev-main": "4.2.x-dev",
64-
"dev-3.4": "3.4.x-dev"
64+
"dev-3.4": "3.4.x-dev",
65+
"dev-4.1": "4.1.x-dev"
6566
},
6667
"symfony": {
6768
"require": "^6.4 || ^7.0"
@@ -79,5 +80,6 @@
7980
"type": "vcs",
8081
"url": "https://github.com/soyuka/phpunit"
8182
}
82-
]
83+
],
84+
"version": "4.1.12"
8385
}

0 commit comments

Comments
 (0)