Download the PHP package tommander/phpsphinx without Composer
On this page you can find all versions of the php package tommander/phpsphinx. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tommander/phpsphinx
More information about tommander/phpsphinx
Files in tommander/phpsphinx
Package phpsphinx
Short Description A simple bridge between phpDocumentor and Sphinx.
License MIT
Informations about the package phpsphinx
PhpSphinx
A simple PHP script for use in command line. This script takes an XML file generated by phpDocumentor and generates a Sphinx-ready API documentation in the output folder.
Prerequisites
- git
- composer 2.2+
- Sphinx
- Extension
sphinx_rtd_theme - Domain
PHP
- Extension
- phpDocumentor
- PHP 7.4+
Note: if your PHP version is different from 8.2, you might need to run composer update.
Composer Installation
First require the package as a dev dependency.
Manual Installation
First clone the repo and install dependencies.
Use In Existing Projects
First, check that you have all the prerequisites.
Then you can create a folder for the documentation. In the example, it is docs. Create two subfolders, source and build.
In the docs/source subfolder, create a folder named api and a file named conf.py e.g. with this content:
Then you can create .rst files and other subfolders in the source directory as needed. That will be the static part of your documentation. Just don't create anything in the folder api; it will contain the automatically generated docs.
Next, create a file named Makefile in the root of your project e.g. with this content:
Now you are ready to generate the documentation.
And if all went well, you should have your beautiful documentation in docs/build.
This flow is just an example; there is plenty of room for adjustment of this flow to your needs.
Quality Assurance
It is recommended to run QA check before pushing anything to the repo. For branches "main" and "devel", this check runs automatically on a push/PR anyway.
PHP_CodeSniffer with coding standards PSR-12 and PHP-Compatibility.
psalm for static analysis.
phpunit for unit testing.
Issues
Please track in GitHub Issues.
Pull Requests
Contributing.
Documentation
All important information is in the main file src/StructureToRst.php.
Executable bin/phpsphinx is a PHP file that should be called via command-line. It just takes two options (-i for input XML file path and -o for output API docs path) and then calls the code in the main file.
Simple unit test tests/StructureToRstTest.php ensures to a certain degree that, for a given XML structure, an expected output is generated.
License
MIT License.