Skip to content

Contributing

Terry L edited this page Aug 22, 2020 · 1 revision

Core Function

Welcome to contribute your idea to this project. Before sending your pull request, please make sure everything is tested well without errors.

Requirements

  • MySQL or MariaDB installed.
  • Redis installed. (Also include PHP extension php_redis)

Steps

  1. Run composer update to install required libraries.
    composer update
  2. Create a writable folder tmp. (same level with src folder.) for temporary testing files.
    mkdir tmp
    chmod 777 tmp
  3. Create a MySQL database shieldon_unittest
    mysql -u root -e 'CREATE DATABASE shieldon_unittest;'
  4. Create a user shieldon'@'localhost with password taiwan.
    mysql -u root -e "CREATE USER 'shieldon'@'localhost' IDENTIFIED BY 'taiwan';"
  5. Grant database permissions on shieldon_unittest to shieldon'@'localhost.
    mysql -u root -e "GRANT ALL ON shieldon_unittest.* TO 'shieldon'@'localhost';"
  6. Install PHP Xdebug.
    apt-get install php7.2-xdebug
  7. Run test.
    composer test
Clone this wiki locally