How To Install php-zend-hydrator on Debian 9

In this tutorial we learn how to install php-zend-hydrator on Debian 9. php-zend-hydrator is Zend Framework - Hydrator component

Introduction

In this tutorial we learn how to install php-zend-hydrator on Debian 9.

What is php-zend-hydrator

php-zend-hydrator is:

Zend\Hydrator provides utilities for mapping arrays to objects, and vice versa, including facilities for filtering which data is mapped as well as providing mechanisms for mapping nested structures.

Zend is a PHP framework for developing web applications and services.

There are three methods to install php-zend-hydrator on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install php-zend-hydrator Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install php-zend-hydrator using apt-get by running the following command:

sudo apt-get -y install php-zend-hydrator

Install php-zend-hydrator Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install php-zend-hydrator using apt by running the following command:

sudo apt -y install php-zend-hydrator

Install php-zend-hydrator Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install php-zend-hydrator using aptitude by running the following command:

sudo aptitude -y install php-zend-hydrator

How To Uninstall php-zend-hydrator on Debian 9

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

sudo apt-get remove php-zend-hydrator

Uninstall php-zend-hydrator And Its Dependencies

To uninstall php-zend-hydrator and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove php-zend-hydrator

Remove php-zend-hydrator Configurations and Data

To remove php-zend-hydrator configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge php-zend-hydrator

Remove php-zend-hydrator configuration, data, and all of its dependencies

We can use the following command to remove php-zend-hydrator configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge php-zend-hydrator

Dependencies

php-zend-hydrator have the following dependencies:

References

Summary

In this tutorial we learn how to install php-zend-hydrator package on Debian 9 using different package management tools: apt, apt-get and aptitude.