Glad you're here! Coordinating a project requires practices that will work together. Those are described here. They are the dull scaffolding we build on, but should leave room for you to add your personal touch to Postmatic.
Our goal is to adopt existing standards where possible:
- WordPress Coding Standards
- PSR-4 Autoloader Note we break WordPress file naming convention in favor of this.
Start with a development environment meeting WordPress requirements.
Install Composer if you don't have it yet.
Clone the repository. Do this in wp-content/plugins
if you're working in a default WordPress root.
$ git clone [email protected]:postmatic/postmatic-basic.git
$ cd postmatic-basic
There will probably be a development branch. You'll probably want to create a feature branch from that.
$ git checkout x.x.x-dev
$ git checkout -b my-feature
Use composer to install dependencies and build autoloaders.
$ composer install
Composer will install Commentium, our own WordPress comment library. Just something to keep in mind.
If you have a WordPress core SVN checkout somewhere, set an environment variable to point to it.
$ export WP_DEVELOP_DIR=/home/me/wp-dev
Alternatively you can run a script to install a WordPress development instance in /tmp with your database information. Be aware that THIS DATABASE WILL BE DESTROYED every time tests are run.
$ ./vendor/frozzare/wp-test-suite/bin/install-wp-tests.sh <db-name> <db-user> <db-pass> [db-host] [wp-version]
You should now be able to run the tests.
$ ./vendor/bin/phpunit
The tests
directory contains all tests. Add tests for your classes and methods accordingly.
The Prompt_Api
class should always be fully documented and backward compatible within minor versions.
The github collaboration docs on forking and submitting pull requests should be sufficient.
To create a distribution in a build
subdirectory:
$ ./vendor/bin/phing
Phing is a PHP build tool, and takes the
build.xml
file as input. Look at that file for details.
Pushes to the github repository will trigger a build and test on TravisCI.
Pushes to the master branch will also trigger deployment to the WordPress plugin repository.
TravisCI configuration is in .travis.yml
.