{"action":"created","issue":{"url":"https://api.github.com/repos/php/php-src/issues/2103","repository_url":"https://api.github.com/repos/php/php-src","labels_url":"https://api.github.com/repos/php/php-src/issues/2103/labels{/name}","comments_url":"https://api.github.com/repos/php/php-src/issues/2103/comments","events_url":"https://api.github.com/repos/php/php-src/issues/2103/events","html_url":"https://github.com/php/php-src/pull/2103","id":173958006,"number":2103,"title":"Implement stream_vt100_support user function","user":{"login":"mlocati","id":928116,"avatar_url":"https://avatars.githubusercontent.com/u/928116?v=3","gravatar_id":"","url":"https://api.github.com/users/mlocati","html_url":"https://github.com/mlocati","followers_url":"https://api.github.com/users/mlocati/followers","following_url":"https://api.github.com/users/mlocati/following{/other_user}","gists_url":"https://api.github.com/users/mlocati/gists{/gist_id}","starred_url":"https://api.github.com/users/mlocati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlocati/subscriptions","organizations_url":"https://api.github.com/users/mlocati/orgs","repos_url":"https://api.github.com/users/mlocati/repos","events_url":"https://api.github.com/users/mlocati/events{/privacy}","received_events_url":"https://api.github.com/users/mlocati/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/php/php-src/labels/Enhancement","name":"Enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":57,"created_at":"2016-08-30T08:23:54Z","updated_at":"2016-10-09T01:17:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/2103","html_url":"https://github.com/php/php-src/pull/2103","diff_url":"https://github.com/php/php-src/pull/2103.diff","patch_url":"https://github.com/php/php-src/pull/2103.patch"},"body":"This is a followup of https://bugs.php.net/bug.php?id=72768\r\n\r\nTL;DR Console apps of newer Windows 10 versions support colors, but we need to manually set the `ENABLE_VIRTUAL_TERMINAL_PROCESSING` console flag.\r\n\r\nHere's my proposal of a new userland function: `bool stream_vt100_support(resource stream[, bool enable])`\r\n\r\nWhere:\r\n- `stream` should be `STDOUT` or`STDERR`\r\n- if `enable` missing: the function returns true if the specified stream supports colors\r\n- if `enable` is true: the function tries to enable color support for the stream (return true on success)\r\n- if `enable` is false: the function tries to disable color support for the stream (return true on success)\r\n\r\nTo be done:\r\n- [X] currently the function accepts a string (eg `php://stdout`): it should instead accept a stream resource\r\n- [X] tests\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/php/php-src/issues/comments/252457777","html_url":"https://github.com/php/php-src/pull/2103#issuecomment-252457777","issue_url":"https://api.github.com/repos/php/php-src/issues/2103","id":252457777,"user":{"login":"weltling","id":22016,"avatar_url":"https://avatars.githubusercontent.com/u/22016?v=3","gravatar_id":"","url":"https://api.github.com/users/weltling","html_url":"https://github.com/weltling","followers_url":"https://api.github.com/users/weltling/followers","following_url":"https://api.github.com/users/weltling/following{/other_user}","gists_url":"https://api.github.com/users/weltling/gists{/gist_id}","starred_url":"https://api.github.com/users/weltling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weltling/subscriptions","organizations_url":"https://api.github.com/users/weltling/orgs","repos_url":"https://api.github.com/users/weltling/repos","events_url":"https://api.github.com/users/weltling/events{/privacy}","received_events_url":"https://api.github.com/users/weltling/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T01:17:08Z","updated_at":"2016-10-09T01:17:08Z","body":"@mlocati pah! I obviously missed something in my english class. Gramatically \"Is taken\" and \"is being taken\" is a similar construct. I apparently took the former as passive past, not as passive present, and obviously misunderstood the context. Thanks for the explanation on your point!\r\n\r\nYeah, I'd be indeed examining ext/posix closer, if we couldn't reach the common opinion. Meanwhile @johnstevenson made the other suggestion, so I thought the topic were switched. It's doable to make ext/posix parts to work on Windows, however it's a fair bit of work. It were a fun task, to be mentioned. I already had several drafts to support more from POSIX in the C FS layer, while working on another patch. But there seems to be no much demand in the community, so it is not really relevant ATM.\r\n\r\nSeems the concept is clear now. \r\n * vt100 is enabled by default automatically, where it's supported\r\n * stream_isatty() for crossplatform terminal check\r\n * sapi_windows_vt100_support() to check/control vt100 functionality \r\n\r\nI'm in process of preparing some test VMs, so i'll be ready to run the tests with the final variant. Anyway, have a lot of sun tomorrow, still it's a sunday :-)\r\n\r\nThanks.\r\n\r\n\r\n"}}
{"actor":{"display_login":"weltling"}}