5 * PHP7 produces all sorts of pointless warnings... this attempts to just include all the files,
6 * so that you can view them..??
8 * would be nice to write the code to fix them.
11 require_once 'Pman.php';
13 class Pman_Core_Process_Php7 extends Pman
16 static $cli_desc = "Tests for PHP compatibilty, by including files...";
17 static $cli_opts = array();
21 if (empty($this->bootLoader->cli)) {
26 function get($base, $opts = array())
28 set_error_handler(function ($errno, $errstr, $errfile, $errline ){
29 // throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
43 function scan($route = array())
45 $dir = $this->rootDir . "/" . implode("/", $route);
47 echo "Looking for {$dir}\n";
49 foreach (scandir($dir) as $d) {
51 if (!strlen($d) || $d[0] == '.') {
56 $this->scan(array_merge($route, array($d)));
60 if (!preg_match('/\.php$/', $d)) {
70 require_once implode('/', $route) . "/" . $d;
72 } catch (ErrorException $ex) {
73 echo $ex->getMessage() . "\n";
80 // function scan($p, $pr, $path = false)
82 // $full_path = array($p, $pr);
83 // $class_path = array();
84 // if ($path !== false) {
85 // $full_path = array_merge($full_path, $path);
86 // $class_path = array_merge($class_path, $path);
88 // //print_r("CHKDIR: ". implode('/', $full_path)."\n");
90 // foreach (scandir(implode('/', $full_path)) as $d) {
92 // if (!strlen($d) || $d[0] == '.') {
98 // $clp = $class_path;
102 // //print_r("CHK: " . implode('/', $chk)."\n");
103 // // is it a file.. and .PHP...
104 // if (!is_dir(implode('/', $chk))) {
105 // if (!preg_match('/\.php$/', $d)) {
108 // $clp[] = preg_replace('/\.php$/', '', $d);
110 // //print_r("CLP: " . implode('/', $clp)."\n");
111 // require_once "Pman/" . implode('/', $clp) . '.php';
115 // // otherwise recurse...
116 // //print_r("RECURSE: " . implode('/', $clp)."\n");
118 // $this->scan($p, $pr, $clp);