Download the PHP package sqd/phpgists without Composer
On this page you can find all versions of the php package sqd/phpgists. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package phpgists
Short Description Set of php functions and tools to help with CCN projects
License GPL-3.0-or-later
Informations about the package phpgists
PhpGists
This is a set of PHP functions and tools to help build my PHP projects.
run a phpunit test
You can install phpunit globally with composer global require phpunit
.
Once it's installed, run something like : phpunit .\tests\ArrayTest.php
to run the ArrayTest tests for example.
Configure debugging with vscode and xdebug
On Windows
- download xdebug and place in your php ext directory (where there are a lot of php_xxx.dll files)
- in your php.ini add the following lines (you can change the port if you want)
To debug a script, no need to use xdebug, just use the default vscode script config
On Linux
sudo apt-get install php-xdebug
-
add the following lines in /etc/php/7.x/mods-available/xdebug.ini
sudo service apache2 restart
How to use XDebug
- check that xdebug is ok by running
php -i | grep xdebug
- in vscode configure xdebug on port 9900 (the one you put in php.ini)
To debug something with xdebug (typically a phpunit test):
- place a breakpoint somewhere
- run the xdebug listener in vscode
- run the command you want like
phpunit ./tests/ArrayTest.php
- if you want to run only some functions, in the test file, add a
--filter pattern
argument in the phpunit command line
Documentation
Install phpDocumentor on Windows
- download the phpdoc.phar from the phpDocumentor website and add it to your PATH
- create in the same folder as phpdoc.phar, a phpdoc.cmd with this line :
@php "%~dp0phpdoc.phar" %*
)
Generate the HTML doc
- cd in the project and run
phpdoc.cmd -d ./src -t ./docs
Tools
There are some useful tools to help developping this module for example :
php ./tools/main.php create_test Array
to create a new test file to test the functions in file 'Array.php'