{"action":"created","issue":{"url":"https://api.github.com/repos/robmorgan/phinx/issues/16","labels_url":"https://api.github.com/repos/robmorgan/phinx/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/robmorgan/phinx/issues/16/comments","events_url":"https://api.github.com/repos/robmorgan/phinx/issues/16/events","html_url":"https://github.com/robmorgan/phinx/issues/16","id":5040066,"number":16,"title":"Add Windows Support","user":{"login":"robmorgan","id":178939,"avatar_url":"https://avatars.githubusercontent.com/u/178939?v=3","gravatar_id":"","url":"https://api.github.com/users/robmorgan","html_url":"https://github.com/robmorgan","followers_url":"https://api.github.com/users/robmorgan/followers","following_url":"https://api.github.com/users/robmorgan/following{/other_user}","gists_url":"https://api.github.com/users/robmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/robmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmorgan/subscriptions","organizations_url":"https://api.github.com/users/robmorgan/orgs","repos_url":"https://api.github.com/users/robmorgan/repos","events_url":"https://api.github.com/users/robmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/robmorgan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/robmorgan/phinx/labels/feature","name":"feature","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/robmorgan/phinx/milestones/6","html_url":"https://github.com/robmorgan/phinx/milestones/0.1.5","labels_url":"https://api.github.com/repos/robmorgan/phinx/milestones/6/labels","id":194856,"number":6,"title":"0.1.5","description":"","creator":{"login":"robmorgan","id":178939,"avatar_url":"https://avatars.githubusercontent.com/u/178939?v=3","gravatar_id":"","url":"https://api.github.com/users/robmorgan","html_url":"https://github.com/robmorgan","followers_url":"https://api.github.com/users/robmorgan/followers","following_url":"https://api.github.com/users/robmorgan/following{/other_user}","gists_url":"https://api.github.com/users/robmorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/robmorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmorgan/subscriptions","organizations_url":"https://api.github.com/users/robmorgan/orgs","repos_url":"https://api.github.com/users/robmorgan/repos","events_url":"https://api.github.com/users/robmorgan/events{/privacy}","received_events_url":"https://api.github.com/users/robmorgan/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":9,"state":"closed","created_at":"2012-10-13T03:52:33Z","updated_at":"2012-11-04T03:43:42Z","due_on":"2012-11-04T07:00:00Z","closed_at":"2012-11-04T03:43:42Z"},"comments":3,"created_at":"2012-06-13T03:26:44Z","updated_at":"2015-09-11T17:37:05Z","closed_at":"2012-11-04T03:17:18Z","body":"Phinx should work on Windows and be installable via Composer."},"comment":{"url":"https://api.github.com/repos/robmorgan/phinx/issues/comments/139609121","html_url":"https://github.com/robmorgan/phinx/issues/16#issuecomment-139609121","issue_url":"https://api.github.com/repos/robmorgan/phinx/issues/16","id":139609121,"user":{"login":"rquadling","id":12801,"avatar_url":"https://avatars.githubusercontent.com/u/12801?v=3","gravatar_id":"","url":"https://api.github.com/users/rquadling","html_url":"https://github.com/rquadling","followers_url":"https://api.github.com/users/rquadling/followers","following_url":"https://api.github.com/users/rquadling/following{/other_user}","gists_url":"https://api.github.com/users/rquadling/gists{/gist_id}","starred_url":"https://api.github.com/users/rquadling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rquadling/subscriptions","organizations_url":"https://api.github.com/users/rquadling/orgs","repos_url":"https://api.github.com/users/rquadling/repos","events_url":"https://api.github.com/users/rquadling/events{/privacy}","received_events_url":"https://api.github.com/users/rquadling/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T17:37:05Z","updated_at":"2015-09-11T17:37:05Z","body":"TL;DR\r\n```vendor\\bin\\phinx``` is NOT a PHP file. So don't use PHP against it. Just use ```vendor\\bin\\phinx```.\r\n\r\n\r\n```vendor\\bin\\phinx``` is a shell script file for unix.\r\n\r\nBut, if you look, you'll also see ```vendor\\bin\\phinx.bat``` as Composer on Windows automatically provides the helper script.\r\n\r\nNow. Assuming you've not been buggering around with your environment variables, you can simply run ```vendor\\bin\\phinx```.\r\n\r\nNow you may be thinking \"Hold on, that'll try and run the unix shell script and I'm on Windows and that's not going to work and this guy doesn't know what he is talking about!\".\r\n\r\nAnd in response, I'll gently snigger with a slightly smug sense of superiority.\r\n\r\nWhat actually happens is that when you type a command at the command line, CMD has to work out what to execute. There are several steps it goes through.\r\n\r\nOne of them is to try and find a file that is \"executable\". Hmm. Or rather has an extension that Windows has a registered executor for.\r\n\r\nThe extensions are set up in an environment variable called PATHEXT (you can see the value by typing ```SET PATHEXT```). Mine looks like this ```PATHEXT=.COM;.EXE;.BAT;.CMD;.PHP;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.RB;.RBW;.PY```\r\n\r\nSo, when you typed ```vendor\\bin\\phinx```, internally, it went looking for the following files ...\r\n\r\n```\r\nvendor\\bin\\phinx.exe\r\nvendor\\bin\\phinx.com\r\nvendor\\bin\\phinx.bat\r\n```\r\n\r\nWhen it found ```vendor\\bin\\phinx.bat``` Windows then went and found the appropriate executor - which in this case is the shell itself (sort of a clever autodetection by the shell I think).\r\n\r\nSo. If you are interested, you can make PHP scripts work the same way. AND you can make then run without having to type PHP to load them AND you can make PHP scripts act as filters.\r\n\r\nAs an example, I have a script that strips out ANSI codes from output (normally used for scripts that don't have a --no-ansi option).\r\n\r\nI can use it by ```Command --that --makes --ansi --codes | noansi```.\r\n\r\nRather than ```Command --that --makes --ansi --codes | C:\\php5\\php.exe -f C:\\Utils\\noansi.php```.\r\n\r\nFor all the juicy help read all about it in http://php.net/manual/en/install.windows.commandline.php\r\n"}}