How To Install php-PhpCollection on Fedora 36

In this tutorial we learn how to install php-PhpCollection in Fedora 36. php-PhpCollection is General purpose collection library for PHP

Introduction

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

What is php-PhpCollection

This library adds basic collections for PHP. Collections can be seen as more specialized arrays for which certain contracts are guaranteed. Supported Collections * Sequences ** Keys ** Values ** Classes * Maps ** Keys ** Values ** Classes * Sets (not yet implemented) ** Keys ** Values ** Classes General Characteristics * Collections are mutable (new elements may be added, existing elements may be modified or removed). Specialized immutable versions may be added in the future though. * Equality comparison between elements are always performed using the shallow comparison operator (===). * Sorting algorithms are unstable, that means the order for equal elements is undefined (the default, and only PHP behavior). Autoloader

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

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

sudo dnf -y install php-PhpCollection

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

sudo yum -y install php-PhpCollection

How To Uninstall php-PhpCollection on Fedora 36

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

sudo dnf remove php-PhpCollection

php-PhpCollection Package Contents on Fedora 36

/usr/share/doc/php-PhpCollection
/usr/share/doc/php-PhpCollection/README.md
/usr/share/doc/php-PhpCollection/composer.json
/usr/share/licenses/php-PhpCollection
/usr/share/licenses/php-PhpCollection/LICENSE
/usr/share/php/PhpCollection
/usr/share/php/PhpCollection/AbstractCollection.php
/usr/share/php/PhpCollection/AbstractMap.php
/usr/share/php/PhpCollection/AbstractSequence.php
/usr/share/php/PhpCollection/CollectionInterface.php
/usr/share/php/PhpCollection/EntityLikeObject.php
/usr/share/php/PhpCollection/Map.php
/usr/share/php/PhpCollection/MapInterface.php
/usr/share/php/PhpCollection/ObjectBasics.php
/usr/share/php/PhpCollection/ObjectBasicsHandler
/usr/share/php/PhpCollection/ObjectBasicsHandler.php
/usr/share/php/PhpCollection/ObjectBasicsHandler/DateTimeHandler.php
/usr/share/php/PhpCollection/ObjectBasicsHandler/IdentityHandler.php
/usr/share/php/PhpCollection/ObjectBasicsHandlerRegistry.php
/usr/share/php/PhpCollection/Sequence.php
/usr/share/php/PhpCollection/SequenceInterface.php
/usr/share/php/PhpCollection/Set.php
/usr/share/php/PhpCollection/SetInterface.php
/usr/share/php/PhpCollection/SortableInterface.php
/usr/share/php/PhpCollection/SortedSequence.php
/usr/share/php/PhpCollection/autoload.php

References

Summary

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