How To Install php-doctrine-sql-formatter on Fedora 36

In this tutorial we learn how to install php-doctrine-sql-formatter in Fedora 36. php-doctrine-sql-formatter is SQL highlighting library

Introduction

In this tutorial we learn how to install php-doctrine-sql-formatter on Fedora 36.

What is php-doctrine-sql-formatter

A lightweight php package for formatting sql statements. It can automatically indent and add line breaks in addition to syntax highlighting. This package is a fork from jdorn/sql-formatter. Autoloader

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

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

sudo dnf -y install php-doctrine-sql-formatter

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

sudo yum -y install php-doctrine-sql-formatter

How To Uninstall php-doctrine-sql-formatter on Fedora 36

To uninstall only the php-doctrine-sql-formatter package we can use the following command:

sudo dnf remove php-doctrine-sql-formatter

php-doctrine-sql-formatter Package Contents on Fedora 36

/usr/share/doc/php-doctrine-sql-formatter
/usr/share/doc/php-doctrine-sql-formatter/CONTRIBUTING.md
/usr/share/doc/php-doctrine-sql-formatter/README.md
/usr/share/doc/php-doctrine-sql-formatter/composer.json
/usr/share/licenses/php-doctrine-sql-formatter
/usr/share/licenses/php-doctrine-sql-formatter/LICENSE.txt
/usr/share/php/Doctrine
/usr/share/php/Doctrine/SqlFormatter
/usr/share/php/Doctrine/SqlFormatter/CliHighlighter.php
/usr/share/php/Doctrine/SqlFormatter/Cursor.php
/usr/share/php/Doctrine/SqlFormatter/Highlighter.php
/usr/share/php/Doctrine/SqlFormatter/HtmlHighlighter.php
/usr/share/php/Doctrine/SqlFormatter/NullHighlighter.php
/usr/share/php/Doctrine/SqlFormatter/SqlFormatter.php
/usr/share/php/Doctrine/SqlFormatter/Token.php
/usr/share/php/Doctrine/SqlFormatter/Tokenizer.php
/usr/share/php/Doctrine/SqlFormatter/autoload.php

References

Summary

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