How To Install php-symfony-var-dumper on CentOS 7

In this tutorial we learn how to install php-symfony-var-dumper on CentOS 7. php-symfony-var-dumper is Symfony mechanism for exploring and dumping PHP variables

Introduction

In this tutorial we learn how to install php-symfony-var-dumper on CentOS 7.

What is php-symfony-var-dumper

This component provides a mechanism that allows exploring then dumping any PHP variable. It handles scalars, objects and resources properly, taking hard and soft references into account. More than being immune to infinite recursion problems, it allows dumping where references link to each other. It explores recursive structures using a breadth-first algorithm. The component exposes all the parts involved in the different steps of cloning then dumping a PHP variable, while applying size limits and having specialized output formats and methods. Optional * AMQP (php-pecl-amqp) * MySQL (php-mysql) Required for Symfony\Component\VarDumper\Caster\ResourceCaster

We can use yum or dnf to install php-symfony-var-dumper on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install php-symfony-var-dumper.

Install php-symfony-var-dumper on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install php-symfony-var-dumper using yum by running the following command:

sudo yum -y install php-symfony-var-dumper

Install php-symfony-var-dumper on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install php-symfony-var-dumper using dnf by running the following command:

sudo dnf -y install php-symfony-var-dumper

How To Uninstall php-symfony-var-dumper on CentOS 7

To uninstall only the php-symfony-var-dumper package we can use the following command:

sudo dnf remove php-symfony-var-dumper

References

Summary

In this tutorial we learn how to install php-symfony-var-dumper on CentOS 7 using yum and dnf.