Download the PHP package t1st3/php-json-minify without Composer
On this page you can find all versions of the php package t1st3/php-json-minify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-json-minify
php-json-minify
About
This JSON minifier written in PHP is based on the PHP part of JSON.minify script by Kyle Simspon. This project being functional entirely relies on Kyle's work: this project basically wraps Kyle's script in a class, and adds some fancy fashion to that class, such as publication on Packagist for availability with Composer and documentation generated with PhpDocumentor. See original author's blog post if you want to know more.
This minifier also removes comments from JSON. While the authors of php-json-minify
and JSON.minify
do not encourage the use of comments in JSON, they are glad to provide you a way to remove those comments anyway!
Usage
Build dependencies
In order to build your generated Composer project from its source, you will need Grunt and PHP on the command line.
So, you must install PHP 5.6 on your system. Test it on your command line:
Note that the extension ext-dom
is required by dev-dependencies. On Debian/Ubuntu, this extension is shipped by default with regular PHP installation. On Fedora/CentOS, you'll have to install the extension separately (yum install php-xml
).
To install Grunt globally on the command line (and run the above build task), run:
Then, with Grunt, you can install Composer. Just run once:
Then, you can install require-dev
dependencies (PhpDocumentor, PhpUnit and PhpCPD) locally. Just run once:
Finally, you should also install the PHP extension named Xdebug, which will be used by PhpUnit for code coverage.
Build the sources
Once all your dependencies are installed, you can build your project with Grunt:
The build process will run the following tasks:
- PhpLint: runs php -l over the "src" folder
- Runs the tests located in the "tests" folder with PHPUnit
- Generates a PhpDocumentor documentation in the "doc" folder from the files of the "src" folder
- Detects copy/paste of code in the files of the "src" folder with PhpCPD
Credits
php-json-minify was initiated with generator-composer, a Yeoman generator that builds a PHP Composer project.
This project is based on JSON.minify by Kyle Simspon, which is released under the MIT license.
This project uses the following as development dependencies: