Skip to content

IBX-11766: Removed prod phpunit dependency#184

Merged
bnowak merged 8 commits into
5.0from
IBX-11766-remove-prod-phpunit-dependency-part-2
May 22, 2026
Merged

IBX-11766: Removed prod phpunit dependency#184
bnowak merged 8 commits into
5.0from
IBX-11766-remove-prod-phpunit-dependency-part-2

Conversation

@bnowak
Copy link
Copy Markdown
Contributor

@bnowak bnowak commented May 14, 2026

Caution

  • Remove tmp commit before merging
🎫 Issue IBX-11766

Related PRs:

#183

Description:

The main goal is to unblock updating of phpunit/phpunit in ibexa/* dev dependencies to a version higher than 10. Currently, this package narrows it down to max version 10.

This PR moves phpunit from prod to dev dependencies (updated to version ^12.5). In src/ directory it replaces phpunit assertions with webmozart ones.

Merging procedure

Unfortunately, because of high dependency cascade coupling between our packages which have some behat related logic in code - it's hard (or almost impossible) to make each separate package PR work standalone. Each of them needs to have mocked direct and indirect custom dependencies to all other packages (where we're replacing phpunit assertions with webmozart ones), because otherwise we have conflicts between webmozart versions (some packages have dependency to webmozart:v1 and I updated all packages to version ^2.3).

It's agreed that we'll merge this PR and all related (all mentioned in this PR) altogether. That should align all webmozart versions into one ^2.3, so we don't expect to have composer dependencies conflicts. Afterwards, if they're ll be any failing CI jobs - I'll handle and fix them one by one.

For QA:

Documentation:

@bnowak bnowak force-pushed the IBX-11766-remove-prod-phpunit-dependency-part-2 branch from 5cacdf4 to d3ba6d1 Compare May 14, 2026 12:04
@bnowak bnowak force-pushed the IBX-11766-remove-prod-phpunit-dependency-part-2 branch from d3ba6d1 to 7dd064b Compare May 15, 2026 08:07
@bnowak bnowak changed the title Ibx 11766 remove prod phpunit dependency part 2 IBX-11766: Removed prod phpunit dependency May 15, 2026
@bnowak bnowak force-pushed the IBX-11766-remove-prod-phpunit-dependency-part-2 branch from 7dd064b to 8404954 Compare May 15, 2026 08:50
@mnocon
Copy link
Copy Markdown
Contributor

mnocon commented May 15, 2026

Hi!

Maybe you've checked this already, but the reason phpunit was in the require section is that the Behat tests sometimes use PHPUnit assertions:
https://github.com/ibexa/page-builder/blob/5.0/src/lib/Behat/Component/Blocks/TextBlock.php#L77

so PHPUnit has to be installed on the project level when Behat tests are run.

Might be good to run regressions to verify before merging this - if they're green it will be ok 👍

@bnowak
Copy link
Copy Markdown
Contributor Author

bnowak commented May 15, 2026

Hi!

Maybe you've checked this already, but the reason phpunit was in the require section is that the Behat tests sometimes use PHPUnit assertions: https://github.com/ibexa/page-builder/blob/5.0/src/lib/Behat/Component/Blocks/TextBlock.php#L77

so PHPUnit has to be installed on the project level when Behat tests are run.

Might be good to run regressions to verify before merging this - if they're green it will be ok 👍

@mnocon
Yeah, I've checked that. The plan is to replace phpunit assertions with those from webmozart/assert library. It's quite popular (over 911 billion installs), stable and widely used in php applications. Also, it has not additional dependencies and is self-served. 😉

By running regressions, do you mean some more/additional tests which are not triggered by CI jobs? Could you shortly introduce me to that topic please?

@mnocon
Copy link
Copy Markdown
Contributor

mnocon commented May 15, 2026

By running regressions I mean running the whole test suite (not only the checks defined in the given repo), usually run by the QA by preparing a PR similar to this one: ibexa/commerce#1813

They'll help you with that once you're ready 😄

@bnowak bnowak force-pushed the IBX-11766-remove-prod-phpunit-dependency-part-2 branch 2 times, most recently from fb79df2 to 2729724 Compare May 21, 2026 08:59
@sonarqubecloud
Copy link
Copy Markdown

@bnowak bnowak marked this pull request as ready for review May 21, 2026 09:07
@bnowak bnowak merged commit a600bd0 into 5.0 May 22, 2026
18 of 21 checks passed
@bnowak bnowak deleted the IBX-11766-remove-prod-phpunit-dependency-part-2 branch May 22, 2026 12:27
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.

7 participants