How To Install php-composer-pcre on Fedora 36

In this tutorial we learn how to install php-composer-pcre in Fedora 36. php-composer-pcre is PCRE wrapping library version 1

Introduction

In this tutorial we learn how to install php-composer-pcre on Fedora 36.

What is php-composer-pcre

PCRE wrapping library that offers type-safe preg_* replacements. This library gives you a way to ensure preg_* functions do not fail silently, returning unexpected nulls that may not be handled. It also makes it easier ot work with static analysis tools like PHPStan or Psalm as it simplifies and reduces the possible return values from all the preg_* functions which are quite packed with edge cases. Autoloader

We can use yum or dnf to install php-composer-pcre on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-composer-pcre.

Install php-composer-pcre on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install php-composer-pcre using dnf by running the following command:

sudo dnf -y install php-composer-pcre

Install php-composer-pcre on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install php-composer-pcre using yum by running the following command:

sudo yum -y install php-composer-pcre

How To Uninstall php-composer-pcre on Fedora 36

To uninstall only the php-composer-pcre package we can use the following command:

sudo dnf remove php-composer-pcre

php-composer-pcre Package Contents on Fedora 36

/usr/share/doc/php-composer-pcre
/usr/share/doc/php-composer-pcre/CONTRIBUTING.md
/usr/share/doc/php-composer-pcre/README.md
/usr/share/doc/php-composer-pcre/composer.json
/usr/share/licenses/php-composer-pcre
/usr/share/licenses/php-composer-pcre/LICENSE
/usr/share/php/Composer
/usr/share/php/Composer/Pcre
/usr/share/php/Composer/Pcre/MatchAllResult.php
/usr/share/php/Composer/Pcre/MatchAllWithOffsetsResult.php
/usr/share/php/Composer/Pcre/MatchResult.php
/usr/share/php/Composer/Pcre/MatchWithOffsetsResult.php
/usr/share/php/Composer/Pcre/PcreException.php
/usr/share/php/Composer/Pcre/Preg.php
/usr/share/php/Composer/Pcre/Regex.php
/usr/share/php/Composer/Pcre/ReplaceResult.php
/usr/share/php/Composer/Pcre/autoload.php

References

Summary

In this tutorial we learn how to install php-composer-pcre on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).