How To Install php-phpdocumentor-reflection on Fedora 36

In this tutorial we learn how to install php-phpdocumentor-reflection in Fedora 36. php-phpdocumentor-reflection is Reflection library to do Static Analysis for PHP Projects

Introduction

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

What is php-phpdocumentor-reflection

Using this library it is possible to statically reflect one or more files and create an object graph representing your application’s structure, including accompanying in-source documentation using DocBlocks. The information that this library provides is similar to what the (built-in) Reflection extension of PHP provides; there are however several advantages to using this library * Due to its Static nature it does not execute procedural code in your reflected files where Dynamic Reflection does. * Because the none of the code is interpreted by PHP (and executed) Static Reflection uses less memory. * Can reflect complete files * Can reflect a whole project by reflecting multiple files. * Reflects the contents of a DocBlock instead of just mentioning there is one. * Is capable of analyzing code written for any PHP version (starting at 5.2) up to and including your installed PHP version. Features * [Creates an object graph] containing the structure of your application much like a site map shows the structure of a website. * Can read and interpret code of any PHP version starting with 5.2 up to and including your currently installed version of PHP. * Due it’s clean interface it can be in any application without a complex setup. Autoloader

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

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

sudo dnf -y install php-phpdocumentor-reflection

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

sudo yum -y install php-phpdocumentor-reflection

How To Uninstall php-phpdocumentor-reflection on Fedora 36

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

sudo dnf remove php-phpdocumentor-reflection

php-phpdocumentor-reflection Package Contents on Fedora 36

/usr/share/doc/php-phpdocumentor-reflection
/usr/share/doc/php-phpdocumentor-reflection/README.md
/usr/share/doc/php-phpdocumentor-reflection/composer.json
/usr/share/licenses/php-phpdocumentor-reflection
/usr/share/licenses/php-phpdocumentor-reflection/LICENSE
/usr/share/php/phpDocumentor/Reflection/BaseReflector.php
/usr/share/php/phpDocumentor/Reflection/ClassReflector
/usr/share/php/phpDocumentor/Reflection/ClassReflector.php
/usr/share/php/phpDocumentor/Reflection/ClassReflector/ConstantReflector.php
/usr/share/php/phpDocumentor/Reflection/ClassReflector/MethodReflector.php
/usr/share/php/phpDocumentor/Reflection/ClassReflector/PropertyReflector.php
/usr/share/php/phpDocumentor/Reflection/ConstantReflector.php
/usr/share/php/phpDocumentor/Reflection/Event
/usr/share/php/phpDocumentor/Reflection/Event/ExportDocBlockTagEvent.php
/usr/share/php/phpDocumentor/Reflection/Event/PostDocBlockExtractionEvent.php
/usr/share/php/phpDocumentor/Reflection/Exception
/usr/share/php/phpDocumentor/Reflection/Exception.php
/usr/share/php/phpDocumentor/Reflection/Exception/UnparsableFile.php
/usr/share/php/phpDocumentor/Reflection/Exception/UnreadableFile.php
/usr/share/php/phpDocumentor/Reflection/FileReflector.php
/usr/share/php/phpDocumentor/Reflection/FunctionReflector
/usr/share/php/phpDocumentor/Reflection/FunctionReflector.php
/usr/share/php/phpDocumentor/Reflection/FunctionReflector/ArgumentReflector.php
/usr/share/php/phpDocumentor/Reflection/IncludeReflector.php
/usr/share/php/phpDocumentor/Reflection/InterfaceReflector.php
/usr/share/php/phpDocumentor/Reflection/Lexer.php
/usr/share/php/phpDocumentor/Reflection/PrettyPrinter.php
/usr/share/php/phpDocumentor/Reflection/ReflectionAbstract.php
/usr/share/php/phpDocumentor/Reflection/TraitReflector.php
/usr/share/php/phpDocumentor/Reflection/Traverser.php
/usr/share/php/phpDocumentor/Reflection/autoload.php

References

Summary

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