{"action":"closed","issue":{"url":"https://api.github.com/repos/FriendsOfCake/app-template/issues/62","repository_url":"https://api.github.com/repos/FriendsOfCake/app-template","labels_url":"https://api.github.com/repos/FriendsOfCake/app-template/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfCake/app-template/issues/62/comments","events_url":"https://api.github.com/repos/FriendsOfCake/app-template/issues/62/events","html_url":"https://github.com/FriendsOfCake/app-template/issues/62","id":50975724,"number":62,"title":"cake.bat vs. cake.php behave differently about Plugins","user":{"login":"ravage84","id":625761,"avatar_url":"https://avatars.githubusercontent.com/u/625761?v=3","gravatar_id":"","url":"https://api.github.com/users/ravage84","html_url":"https://github.com/ravage84","followers_url":"https://api.github.com/users/ravage84/followers","following_url":"https://api.github.com/users/ravage84/following{/other_user}","gists_url":"https://api.github.com/users/ravage84/gists{/gist_id}","starred_url":"https://api.github.com/users/ravage84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravage84/subscriptions","organizations_url":"https://api.github.com/users/ravage84/orgs","repos_url":"https://api.github.com/users/ravage84/repos","events_url":"https://api.github.com/users/ravage84/events{/privacy}","received_events_url":"https://api.github.com/users/ravage84/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2014-12-04T13:35:34Z","updated_at":"2016-11-13T07:40:03Z","closed_at":"2016-11-13T07:40:03Z","body":"`cake.bat` and `cake.php` behave differently.\n\nI setup the app-template, connect to the DB, add CakeDC's Search plugin and execute its shell through\na) `cake.bat` \nb) `cake.php`\n\nAs you can see below adding `--working .` fixes the issue.\n`cake.bat` and the *nix shell script `cake` both set the working path when calling `cake.php`:\nhttps://github.com/FriendsOfCake/app-template/blob/69f700e7a2154510b08201e9a50a72a095d9b223/app/Console/cake.bat#L28\nhttps://github.com/FriendsOfCake/app-template/blob/69f700e7a2154510b08201e9a50a72a095d9b223/app/Console/cake#L41\n\n```\nD:\\dev\\xampp\\htdocs>composer -sdev create-project friendsofcake/app-template app\n-template\nInstalling friendsofcake/app-template (dev-master 69f700e7a2154510b08201e9a50a72\na095d9b223)\n  - Installing friendsofcake/app-template (dev-master master)\n    Cloning master\n\nCreated project in app-template\nLoading composer repositories with package information\nInstalling dependencies (including require-dev)\n  - Installing composer/installers (dev-master 89d77bf)\n    Loading from cache\n\n  - Installing josegonzalez/dotenv (0.3.0)\n    Downloading: 100%\n\n  - Installing cakephp/cakephp (2.5.6)\n    Loading from cache\n\n  - Installing friendsofcake/crud (3.0.9)\n    Downloading: 100%\n\n  - Installing ad7six/dsn (0.3.1)\n    Downloading: 100%\n\n  - Installing cakephp/debug_kit (dev-master c911030)\n    Loading from cache\n\nfriendsofcake/crud suggests installing cakedc/search (If you want to use the Sea\nrch Listener)\nWriting lock file\nGenerating autoload files\nDo you want to remove the existing VCS (.git, .svn..) history? [Y,n]? y\n\nD:\\dev\\xampp\\htdocs>cd app-template\n\nD:\\dev\\xampp\\htdocs\\app-template>composer require cakedc/migrations:*\n./composer.json has been updated\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\n  - Installing cakedc/migrations (dev-master 0d62dda)\n    Cloning 0d62dda64f4386fb29e68e3ba4d022aa90252aee\n\nWriting lock file\nGenerating autoload files\n\nD:\\dev\\xampp\\htdocs\\app-template>cd app\n\nD:\\dev\\xampp\\htdocs\\app-template\\app>console\\cake.bat Migrations.migration statu\ns\n\nCake Migration Shell\n---------------------------------------------------------------\nMigrations Plugin\n\nCurrent version:\n  #003 003_increase_class_name_length\nLatest version:\n  #003 003_increase_class_name_length\n---------------------------------------------------------------\n\n\nD:\\dev\\xampp\\htdocs\\app-template\\app>php console\\cake.php Migrations.migration s\ntatus\nError: Plugin Migrations could not be found.\n#0 D:\\dev\\xampp\\htdocs\\app-template\\vendor\\cakephp\\cakephp\\lib\\Cake\\Core\\App.php\n(227): CakePlugin::path('Migrations')\n#1 D:\\dev\\xampp\\htdocs\\app-template\\vendor\\cakephp\\cakephp\\lib\\Cake\\Core\\App.php\n(549): App::path('Console/Command', 'Migrations')\n#2 [internal function]: App::load('MigrationShell')\n#3 [internal function]: spl_autoload_call('MigrationShell')\n#4 D:\\dev\\xampp\\htdocs\\app-template\\vendor\\cakephp\\cakephp\\lib\\Cake\\Console\\Shel\nlDispatcher.php(249): class_exists('MigrationShell')\n#5 D:\\dev\\xampp\\htdocs\\app-template\\vendor\\cakephp\\cakephp\\lib\\Cake\\Console\\Shel\nlDispatcher.php(200): ShellDispatcher->_getShell('Migrations.migr...')\n#6 D:\\dev\\xampp\\htdocs\\app-template\\vendor\\cakephp\\cakephp\\lib\\Cake\\Console\\Shel\nlDispatcher.php(66): ShellDispatcher->dispatch()\n#7 D:\\dev\\xampp\\htdocs\\app-template\\app\\Console\\cake.php(40): ShellDispatcher::r\nun(Array)\n#8 {main}\n\nD:\\dev\\xampp\\htdocs\\app-template\\app>php console\\cake.php Migrations.migration s\ntatus --working .\nCake Migration Shell\n---------------------------------------------------------------\nMigrations Plugin\n\nCurrent version:\n  #003 003_increase_class_name_length\nLatest version:\n  #003 003_increase_class_name_length\n---------------------------------------------------------------\n\nD:\\dev\\xampp\\htdocs\\app-template\\app>\n```\n\nThis is unexpected because when using a vanilla CakePHP setup this is not needed:\n\n```\nC:\\Users\\marc.wuerth\\Desktop\\cakephp-master\\app>console\\cake.bat Migrations.migr\nation status\n\nCake Migration Shell\n---------------------------------------------------------------\nMigrations Plugin\n\nCurrent version:\n  #003 003_increase_class_name_length\nLatest version:\n  #003 003_increase_class_name_length\n---------------------------------------------------------------\n\n\nC:\\Users\\marc.wuerth\\Desktop\\cakephp-master\\app>php console\\cake.php Migrations.\nmigration status\nCake Migration Shell\n---------------------------------------------------------------\nMigrations Plugin\n\nCurrent version:\n  #003 003_increase_class_name_length\nLatest version:\n  #003 003_increase_class_name_length\n---------------------------------------------------------------\n\nC:\\Users\\marc.wuerth\\Desktop\\cakephp-master\\app>console\\cake.bat Migrations.migr\nation status --working .\n\nCake Migration Shell\n---------------------------------------------------------------\nMigrations Plugin\n\nCurrent version:\n  #003 003_increase_class_name_length\nLatest version:\n  #003 003_increase_class_name_length\n---------------------------------------------------------------\n\n\nC:\\Users\\marc.wuerth\\Desktop\\cakephp-master\\app>php console\\cake.php Migrations.\nmigration status --working .\nCake Migration Shell\n---------------------------------------------------------------\nMigrations Plugin\n\nCurrent version:\n  #003 003_increase_class_name_length\nLatest version:\n  #003 003_increase_class_name_length\n---------------------------------------------------------------\n```\n"}}
{"actor":{"display_login":"josegonzalez"}}