Skip to content

[CI] Rework tests-php job matrix, better covers different PHP/SF versions, test all components in a single job #2734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented May 13, 2025

Q A
Bug fix? no
New feature? no
Docs? no
Issues Fix #...
License MIT

tl;dr:
image

Following internal messages about UX CI, let's improve our CI:

  • Modifying the matrix is now easier than before
  • We now use PHP 8.2 too
  • One "fully-working" lowest deps job (it's more explicit than before)
  • The "component" matrix entry has been removed in favor of the same system used by symfony/symfony CI for unit-tests. Now, all components packages tests are run in a single job, in parallel. So, we won't increase the number of jobs by X when modifying the matrix (when working on this PR and without this change, I went to ~150 jobs 😅)
Enregistrement.de.l.ecran.2025-05-21.a.07.54.43.mov

@Kocal Kocal force-pushed the ci/rework-tests-php branch from 3a427d0 to ea0927e Compare May 13, 2025 12:56
@Kocal Kocal force-pushed the ci/rework-tests-php branch from 38662c0 to ec516fb Compare May 14, 2025 04:40
@Kocal Kocal force-pushed the ci/rework-tests-php branch 12 times, most recently from b187f7b to 704f311 Compare May 14, 2025 06:19
@Kocal
Copy link
Member Author

Kocal commented May 14, 2025

Okay I believe we are one something nice:
image

Some notes:

  1. the --prefer-lowest has a tons of deprecations 😬
  2. dev jobs fail because of TwigComponent requiring an old version of WebpackEncoreBundle, :
+ cd src/TwigComponent
+ composer config minimum-stability dev --ansi
+ composer update --no-progress --no-interaction --ansi
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "7.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires symfony/webpack-encore-bundle ^1.15 -> satisfiable by symfony/webpack-encore-bundle[v1.15.0, ..., v1.17.2].
    - symfony/webpack-encore-bundle[v1.15.0, ..., v1.17.2] require symfony/asset ^4.4 || ^5.0 || ^6.0 -> found symfony/asset[v4.4.0-BETA1, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev, v6.0.0-BETA1, ..., 6.4.x-dev] but these were not loaded, likely because it conflicts with another require.

Error: Your requirements could not be resolved to an installable set of packages.

and also because deprecations from symfony/property-info:^7.3:

Remaining direct deprecation notices (3079)

  778x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getType()" instead.
    158x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    131x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

  778x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.
    158x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    131x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

  761x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.
    158x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    114x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

  761x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor::getType()" instead.
    158x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
    114x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
    102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
    20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
    ...

  1x: Since symfony/property-info 7.3: The "Symfony\Component\PropertyInfo\Type" class is deprecated. Use "Symfony\Component\TypeInfo\Type" class from "symfony/type-info" instead.
    1x in BatchActionControllerTest::testCanBatchActions from Symfony\UX\LiveComponent\Tests\Functional\Controller

Remaining indirect deprecation notices (1059)
  1. other jobs are failing due to the Twig\Template::loadTemplate() deprecation, that will be fixed by [TwigComponent] Fix loadTemplate deprecation for Twig >= 3.21 #2713

BRB taking the ✈️ :D

@Kocal Kocal force-pushed the ci/rework-tests-php branch 2 times, most recently from 5ee3705 to 6a05cee Compare May 20, 2025 05:55
@stof
Copy link
Member

stof commented May 20, 2025

  1. the --prefer-lowest has a tons of deprecations

this job should be running with deprecations allowed (lowest deps might not have solved all deprecations)

@Kocal
Copy link
Member Author

Kocal commented May 20, 2025

Thanks for the advice, will try it asap :)

@Kocal Kocal force-pushed the ci/rework-tests-php branch 3 times, most recently from e43a2ae to 925b565 Compare May 21, 2025 05:44
@Kocal Kocal changed the title [CI] Rework tests php job, fix minimum-stability, add Symfony versions [CI] Rework tests-php job matrix, better covers different PHP/SF versions, test all components in a single job May 21, 2025
@Kocal Kocal marked this pull request as ready for review May 21, 2025 05:57
@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label May 21, 2025
@Kocal Kocal requested a review from smnandre May 21, 2025 05:57
@Kocal Kocal self-assigned this May 21, 2025
@Kocal Kocal requested a review from kbond May 21, 2025 05:57
@Kocal Kocal removed their assignment May 21, 2025
@Kocal Kocal force-pushed the ci/rework-tests-php branch 3 times, most recently from 66153ff to 84b5ebd Compare May 21, 2025 06:36
…rsions, test all components in a single job
@Kocal Kocal force-pushed the ci/rework-tests-php branch from 84b5ebd to 17295cf Compare May 21, 2025 06:44
Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels May 21, 2025
@smnandre
Copy link
Member

🙇

@Kocal Kocal merged commit 5665746 into symfony:2.x May 22, 2025
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants