DNF and Modules - PHP

Hi All, Trying to get my head round this modules thing with DNF. I think I get the idea. BUT, I have an PHP application that requires php-tidy. None of the module groups in the regular repositories offer php-tidy. The remi and cheese repositories do have it.

But if I configure those repositories and try to install php-tidy I get a module complaint like this

“Problem: package php-tidy-7.2.24-2.el8.x86_64 requires php-common(x86-64) = 7.2.24-2.el8, but none of the providers can be installed”

That version of php-common is in both appstream and the cheese repositories. ( Did I hear someone say .dll hell? )

How do I move forward with this without having a spiders web, or a dogs dinner, of a setup and a fundamentally broken system from an update point of view.

Or have I completely missed the point somewhere.

Would really appreciate some guidance



First, I’d prefer remi – have never heard of cheese.

I would:

  1. Uninstall all PHP-related packages
  2. dnf module disable php
  3. Add appropriate Remi’s repo
  4. Install consistent set of PHP

Note: AppStream has now three php streams: 7.2, 7.3, and 7.4. Only 7.4 has longer term support. See Red Hat Enterprise Linux 8 Application Streams Life Cycle - Red Hat Customer Portal
Upstream even PHP 7.4 is on its last legs: Red Hat Enterprise Linux 8 Application Streams Life Cycle - Red Hat Customer Portal so Red Hat shows commitment (but that does not help with php-tidy).
EPEL has some php-*, but again no php-tidy

In principle the DNF modules is a nice idea, but the implementation has weak points. For example, packages for “same stream” from multiple repositories (e.g. Rocky and EPEL) is apparently not ok.

Traditional Yum repository has one or more versions of a package, say xxx-1.0, xxx-1.1, and xxx-2.0. You can install only one ‘xxx’ – the latest version.

The modules are just filters in the repository that exclude/include, well hide or keep available some packages. Say, streams ‘xxx/1’ and ‘xxx/2’. The first includes all xxx-1., and the second all xxx-2.. You can still install only one ‘xxx’, but now the user can opt to use only ‘xxx/1’ packages so that when repo maintainer releases ‘xxx-1.2’ and ‘xxx-2.1’, the user’s system can update from xxx-1.1 into xxx-1.2 (even though the repo already contains xxx-2.0 and xxx-2.1).

A repo can thus offer multiple “maintained branches”.

The Software Collections (SCL) in RHEL 6 and 7 had each “stream” with unique package names (and did also install “outside of PATH”, into /opt/).

Notice, for proper usage of “remi” repository, please follow the Wizard instructions.

PHP 7.2 to 8.1 are available there as modules with most of extensions.

Thank you - very much appreciated

:+1: Ken

PHP 8 is now in the AppStream, you do not need to add remi repo (for PHP 8). To install PHP 8.0 from the AppStream repo I did the following:

  1. Disable php module – sudo dnf module disable php
  2. [Re-]Enable php module from Appstream repo – sudo dnf module enable php:8.0