2017 © Pedro Peláez
 

library minusl

PHP MinusL (-l) Cached syntax checker

image

antiphp/minusl

PHP MinusL (-l) Cached syntax checker

  • Thursday, May 17, 2018
  • by antiphp
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AntiPhp MinusL (-l)

MinusL checks the syntax of PHP, XML, JSON and INI files, the result will be cached. Whether a file has changed or not is determined by a hash function (by default PHP's md5_file) but you can use other functions (filemtime) or hash algorithms., (*1)

Syntax check for PHP files: php -l (that's where the name comes from), (*2)

Syntax check for XML files: PHP's simplexml lib, (*3)

Syntax check for JSON files: PHP's json_decode(), (*4)

Syntax check for INI files: PHP's parse_ini_file(), (*5)

Composer.json

Extend your composer.json like this:, (*6)

{
    "require": {
        "php": ">=5.3.2",
        "antiphp/minusl": "dev-master"
    }
}

Tests

// run an update of your composer setup
php composer.phar update

// short syntax
php vendor/antiphp/minusl/bin/minusl.php run

// - or -

// extended syntax
php vendor/antiphp/minusl/bin/minusl.php --hash=md5 --cache-file=/path/to/your/project/tmp/minusl.json --auto-save-interval=80 run /path/to/your/project

Output

PHP MinusL (-l) Cached syntax checker by Christian Reinecke

/home/www/minusl
..E.............................................................................
........................................................

Error summary (1):
    [01] Errors parsing /home/www/minusl/latest/test.php

General summary:
    files.................... 221
    files ignored............ 85
    files checked............ 136
    files *.json............. 20
    files *.php.............. 101
    files *.xml.............. 15
    files valid.............. 1
    files valid from cache... 134
    files invalid............ 1
    saved time............... 10.01s

Fail.

Warning

Please keep in mind: This is my first git/composer/packagist project and this is just an alpha version. It is possible that there are a lot of changes coming soon., (*7)

The Versions

17/05 2018

dev-master

9999999-dev

PHP MinusL (-l) Cached syntax checker

  Sources   Download

MIT

The Requires

 

by Christian Reinecke

lint validation check validate syntax syntaxcheck phplint

17/05 2018

1.0.0

1.0.0.0

PHP MinusL (-l) Cached syntax checker

  Sources   Download

MIT

The Requires

 

by Christian Reinecke

lint validation check validate syntax syntaxcheck phplint