How To Install php-wikimedia-assert on Fedora 36

In this tutorial we learn how to install php-wikimedia-assert in Fedora 36. php-wikimedia-assert is An alternative to PHP’s assert

Introduction

In this tutorial we learn how to install php-wikimedia-assert on Fedora 36.

What is php-wikimedia-assert

This package provides an alternative to PHP’s assert() that allows for a simple and reliable way to check preconditions and postconditions in PHP code. It was proposed as a MediaWiki RFC, but is completely generic and can be used by any PHP program or library.

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

Install php-wikimedia-assert 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-wikimedia-assert using dnf by running the following command:

sudo dnf -y install php-wikimedia-assert

Install php-wikimedia-assert 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-wikimedia-assert using yum by running the following command:

sudo yum -y install php-wikimedia-assert

How To Uninstall php-wikimedia-assert on Fedora 36

To uninstall only the php-wikimedia-assert package we can use the following command:

sudo dnf remove php-wikimedia-assert

php-wikimedia-assert Package Contents on Fedora 36

/usr/share/doc/php-wikimedia-assert
/usr/share/doc/php-wikimedia-assert/README.md
/usr/share/doc/php-wikimedia-assert/RELEASE-NOTES.md
/usr/share/licenses/php-wikimedia-assert
/usr/share/licenses/php-wikimedia-assert/COPYING
/usr/share/php/Wikimedia
/usr/share/php/Wikimedia/Assert
/usr/share/php/Wikimedia/Assert/Assert.php
/usr/share/php/Wikimedia/Assert/AssertionException.php
/usr/share/php/Wikimedia/Assert/InvariantException.php
/usr/share/php/Wikimedia/Assert/ParameterAssertionException.php
/usr/share/php/Wikimedia/Assert/ParameterElementTypeException.php
/usr/share/php/Wikimedia/Assert/ParameterKeyTypeException.php
/usr/share/php/Wikimedia/Assert/ParameterTypeException.php
/usr/share/php/Wikimedia/Assert/PostconditionException.php
/usr/share/php/Wikimedia/Assert/PreconditionException.php
/usr/share/php/Wikimedia/Assert/autoload.php

References

Summary

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