websafe-michelf-markdown-parser-psr is a PSR-0 compliant version of
Michel Fortin's PHP Markdown library (branch: lib), automatically
generated by a buildscript, enhanced with a PHPUnit test suite, Composer
ready, with fixed PHP code and Travis CI integration and more.
| Branch | Build status | Based on commit |
|---|---|---|
master |
|
a10d48919913c2b3efdc3637e5494e4e57c04d5e |
develop |
|
- PSR-0 compliant - the migration process from Michel Fortin's PHP Markdown [branch: extra] to a PSR-0 compliant library is done by a buildscript (not a part of this repo) in an fully automated way.
- PHPUnit test suite for Markdown parsers. Easy creation of test cases without PHPUnit knowledge.
- Composer ready/compliant package -
composer.jsonshipped. - Fixed PHP code with Fabien Potencier's PHP-CS-Fixer.
- PHP_CodeSniffer reports for Michel Fortin and the PHP Markdown community.
- Continuous integration with Travis CI. See project's Build History.
- Very handy
build.xmlfor [Ant].
Create a project directory:
mkdir my-markdown-test
cd my-markdown-test
Now create a composer.json file in project's root, with this content:
{
"name": "my/markdown-test",
"type": "library",
"description": "My Markdown test",
"require": {
"php": ">=5.3.0",
"websafe/test-a": "*"
},
"minimum-stability": "dev",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/websafe/test-a.git",
"reference": "origin/master"
}
]
}And run composer:
composer -v update
Create a PHP script in your projetc's root:
touch my-markdown-test.php
with this content:
<?php
//
require 'vendor/autoload.php';
//
$mp = new Michelf\Markdown\Parser\ExtraParser();
//
echo $mp->transform("Hello!\n======\nIs it me you're looking for?");will return:
<h1>Hello!</h1>
<p>Is it me you're looking for?</p>Easy?
Clone this repos master branch:
git clone https://github.com/websafe/test-a.git
cd test-a
Now create a composer.json file:
ant setup-dev-env
Now You should have all required tools and dependecies installed in vendor/,
accessible via vendor/bin/*, or better [Ant].
ant phpdoc
PHP Documentation is created in doc/phpdoc/.
Now run some tests:
ant phpunit
You think any of the dependencies may have changed? Update Your dev environment
ant update-dev-env
this will update Composer with all dependencies and recreate missing dirs.
This diagram was generated using phpDocumentor2. You can browse the full PHP documentation for this library https://docs.websafe.pl/websafe-michelf-markdown-parser-psr/phpdoc/
- PSR-0 autoloader interoperability.
- Composer ready.
- phpDocumentor2.
- Handy [Ant]
build.xml. - Easy extendable PHPUnit test suite.
- Continuous integration with Travis CI.
- xxx
- PSR-1
- PSR-2
