Skip to content

Use php-cs-fixer/shim instead + full Symfony 8 support#1128

Merged
dantleech merged 3 commits intophpbench:masterfrom
Kocal:php-cs-fixer-shim
Nov 6, 2025
Merged

Use php-cs-fixer/shim instead + full Symfony 8 support#1128
dantleech merged 3 commits intophpbench:masterfrom
Kocal:php-cs-fixer-shim

Conversation

@Kocal
Copy link
Contributor

@Kocal Kocal commented Nov 5, 2025

Follows #1125

@Jean85
Copy link

Jean85 commented Nov 5, 2025

This is still not installing Symfony 8. I fear that without Flex enforcing it, Composer prefers the stable version.

@Kocal
Copy link
Contributor Author

Kocal commented Nov 5, 2025

Seeing https://github.com/phpbench/phpbench/actions/runs/19114176412/job/54631434251, I'm not sure to understand why it does not install Symfony 8 beta packages:

  • PHP 8.4 is used
  • the minimum-stability is configured to beta

However, running composer require symfony/console ^8.0.0-BETA1 -W correctly install Symfony 8 beta packages.

@Jean85
Copy link

Jean85 commented Nov 5, 2025

Because you're forcing Composer's SAT solver to use the beta; it seems that, if it's left with the choice, it prefers the stable tag.

We need Flex and its forced requirement.

@Kocal Kocal force-pushed the php-cs-fixer-shim branch from e925566 to f346e43 Compare November 6, 2025 07:17
@Kocal
Copy link
Contributor Author

Kocal commented Nov 6, 2025

Added Flex and updated the pinned version of shivammathur/setup-php.
We now requires phpbench/container#12 to be merged/released.

@dantleech
Copy link
Member

dantleech commented Nov 6, 2025

container 2.2.3 was tagged.

still seems odd that Symfny seems to require a special tool to install it, given a choice I'd rather just composer require symfony/console $symfonyVersion in the pipeline. But it's fine to leave it as it is.

@Jean85
Copy link

Jean85 commented Nov 6, 2025

container 2.2.3 was tagged.

Can you please restart the CI?

still seems odd that Symfny seems to require a special tool to install it, given a choice I'd rather just composer require symfony/console $symfonyVersion in the pipeline. But it's fine to leave it as it is.

Flex does a lot more than that, because it locks down all Symfony components, so it influences indirect dependencies too. In the past I had issues without that because it can mix different major versions, leading to strange bugs in CI.

@dantleech
Copy link
Member

ok, looks like we've uncovered actual incompatibilit(y|ies) now

@Jean85
Copy link

Jean85 commented Nov 6, 2025

Application::add($command) is easily replaced with Application::addCommands([$command]) (notice the 1-element array). addCommands is available since ages and still available in 8, I did this same fix multiple times yesterday.

@Kocal Kocal changed the title Use php-cs-fixer/shim instead Use php-cs-fixer/shim instead + full Symfony 8 support Nov 6, 2025
@Kocal
Copy link
Contributor Author

Kocal commented Nov 6, 2025

Aaaand it's all green now, PHPBench can now fully run on Symfony 8 :)

PS: I really like the bin/phpbench cats --profile=examples command 😻

@dantleech dantleech merged commit b641dde into phpbench:master Nov 6, 2025
13 checks passed
@dantleech
Copy link
Member

dantleech commented Nov 6, 2025

awesome, thanks for this, will tag later today or tomorrow

@Kocal
Copy link
Contributor Author

Kocal commented Nov 6, 2025

Perfect, thanks :)

@Kocal Kocal deleted the php-cs-fixer-shim branch November 6, 2025 19:09
@staabm
Copy link
Contributor

staabm commented Nov 28, 2025

great job guys, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants