{"action":"opened","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/11199","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11199/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11199/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/11199/events","html_url":"https://github.com/phalcon/cphalcon/issues/11199","id":120703840,"number":11199,"title":"[2.0.9] CLI console:boot event not be triggered","user":{"login":"AlloVince","id":176019,"avatar_url":"https://avatars.githubusercontent.com/u/176019?v=3","gravatar_id":"","url":"https://api.github.com/users/AlloVince","html_url":"https://github.com/AlloVince","followers_url":"https://api.github.com/users/AlloVince/followers","following_url":"https://api.github.com/users/AlloVince/following{/other_user}","gists_url":"https://api.github.com/users/AlloVince/gists{/gist_id}","starred_url":"https://api.github.com/users/AlloVince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlloVince/subscriptions","organizations_url":"https://api.github.com/users/AlloVince/orgs","repos_url":"https://api.github.com/users/AlloVince/repos","events_url":"https://api.github.com/users/AlloVince/events{/privacy}","received_events_url":"https://api.github.com/users/AlloVince/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-07T05:52:04Z","updated_at":"2015-12-07T05:52:04Z","closed_at":null,"body":"Hi guys\r\n\r\nHere is a test about phalcon 2.0.9 new event `console:boot`\r\n\r\n``` php\r\n<?php\r\n\r\nuse Phalcon\\DI\\FactoryDefault\\CLI as CliDI,\r\n    Phalcon\\CLI\\Console as ConsoleApp;\r\n\r\ndefine('VERSION', '1.0.0');\r\n\r\n// Using the CLI factory default services container\r\n$di = new CliDI();\r\n\r\n// Define path to application directory\r\ndefined('APPLICATION_PATH')\r\n|| define('APPLICATION_PATH', realpath(dirname(__FILE__)));\r\n\r\n\r\nclass ConsoleListener {\r\n\r\n\tpublic function boot($event, $application) {\r\n\t\tvar_dump(1);\r\n\t}\r\n}\r\n$di->getEventsManager()->attach('console', new ConsoleListener());\r\n\r\n\r\n/**\r\n * Register the autoloader and tell it to register the tasks directory\r\n */\r\n$loader = new \\Phalcon\\Loader();\r\n$loader->registerDirs(\r\n    array(\r\n        APPLICATION_PATH . '/tasks'\r\n    )\r\n);\r\n$loader->register();\r\n\r\n// Load the configuration file (if any)\r\nif (is_readable(APPLICATION_PATH . '/config/config.php')) {\r\n    $config = include APPLICATION_PATH . '/config/config.php';\r\n    $di->set('config', $config);\r\n}\r\n\r\n// Create a console application\r\n$console = new ConsoleApp();\r\n$console->setDI($di);\r\n$console->setEventsManager($di->getEventsManager());\r\n\r\n/**\r\n * Process the console arguments\r\n */\r\n$arguments = array();\r\nforeach ($argv as $k => $arg) {\r\n    if ($k == 1) {\r\n        $arguments['task'] = $arg;\r\n    } elseif ($k == 2) {\r\n        $arguments['action'] = $arg;\r\n    } elseif ($k >= 3) {\r\n        $arguments['params'][] = $arg;\r\n    }\r\n}\r\n\r\n// Define global constants for the current task and action\r\ndefine('CURRENT_TASK',   (isset($argv[1]) ? $argv[1] : null));\r\ndefine('CURRENT_ACTION', (isset($argv[2]) ? $argv[2] : null));\r\n\r\ntry {\r\n    // Handle incoming arguments\r\n    $console->handle($arguments);\r\n} catch (\\Phalcon\\Exception $e) {\r\n    echo $e->getMessage();\r\n    exit(255);\r\n}\r\n```\r\n\r\ncheck the full code here: https://github.com/AlloVince/phalcon_bugs/tree/master/cli_events\r\n\r\nThere is no output attached on `console:boot` event:\r\n\r\n```\r\nphp cli.php\r\n\r\nThis is the default task and the default action\r\n```\r\n\r\nI am sure about phaclon version is 2.0.9:\r\n\r\n```\r\nphp -i | grep -A 5 phalcon\r\n/usr/local/etc/php/5.6/conf.d/ext-phalcon.ini,\r\n/usr/local/etc/php/5.6/conf.d/ext-redis.ini,\r\n/usr/local/etc/php/5.6/conf.d/ext-xdebug.ini,\r\n/usr/local/etc/php/5.6/conf.d/ext-yaml.ini\r\n\r\nPHP API => 20131106\r\n--\r\nphalcon\r\n\r\n\r\nWeb framework delivered as a C-extension for PHP\r\nphalcon => enabled\r\nAuthor => Phalcon Team and contributors\r\nVersion => 2.0.9\r\n```\r\n\r\nI found phalcon source code there is event trigger code:\r\n\r\nhttps://github.com/phalcon/cphalcon/blob/master/phalcon/cli/console.zep#L161\r\n\r\nIs there any way to debug or trace this issue?"}}