Skip to content

pmvc-plugin/dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Stable Version Latest Unstable Version CircleCI License Total Downloads

dev

How to set debug level

Best plug order

  • put dev before debug, you could get most of plug trace
\PMVC\Load::plug([
    'controller'=>null
    ,'dispatcher'=>null

    /*dev*/
    ,'error'=>['all']
    ,'dev'=>null
    ,'debug'=>null
]);

Unit test tip

        \PMVC\plug('debug',[
            'output'=> '*Output Plugin*'
        ])->setLevel('*Test Level*', true);
        \PMVC\plug('dev')->onResetDebugLevel();

phpunit

debug with cli

\PMVC\plug('dev')->debug_with_cli();
  • display debug only (without trace)
\PMVC\plug('dev')->debug_with_cli('debug');
  • accept multiple dump level
\PMVC\plug('dev')->debug_with_cli('debug, trace, help');

Why help also trigger dump

Install with Composer

CLICK TO SEE

### 1. Download composer * mkdir test_folder * curl -sS https://getcomposer.org/installer | php

2. Install by composer.json or use command-line directly

2.1 Install by composer.json

  • vim composer.json
{
    "require": {
        "pmvc-plugin/dev": "dev-master"
    }
}
  • php composer.phar install

2.2 Or use composer command-line

  • php composer.phar require pmvc-plugin/dev

or

  • composer require pmvc-plugin/dev