sqd/phpgists 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sqd/phpgists

Composer 安装命令:

composer require sqd/phpgists

包简介

Set of php functions and tools to help with CCN projects

README 文档

README

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)
zend_extension=[absolute path to your php_xdebug.dll]
xdebug.remote_enable=1
xdebug.remote_autostart = 1
xdebug.remote_port=9900
xdebug.remote_log=[choose an absolute path to xdebug.log]

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
xdebug.show_error_trace = 1
xdebug.remote_enable=1
xdebug.remote_autostart = 1
  • 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'

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2019-11-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固