{"action":"created","issue":{"url":"https://api.github.com/repos/hoaproject/File/issues/22","repository_url":"https://api.github.com/repos/hoaproject/File","labels_url":"https://api.github.com/repos/hoaproject/File/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/hoaproject/File/issues/22/comments","events_url":"https://api.github.com/repos/hoaproject/File/issues/22/events","html_url":"https://github.com/hoaproject/File/pull/22","id":116726365,"number":22,"title":"Add glob support in the finder","user":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hoaproject/File/labels/difficulty:%20hard","name":"difficulty: hard","color":"DE264C"},{"url":"https://api.github.com/repos/hoaproject/File/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/hoaproject/File/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"Jir4","id":717155,"avatar_url":"https://avatars.githubusercontent.com/u/717155?v=3","gravatar_id":"","url":"https://api.github.com/users/Jir4","html_url":"https://github.com/Jir4","followers_url":"https://api.github.com/users/Jir4/followers","following_url":"https://api.github.com/users/Jir4/following{/other_user}","gists_url":"https://api.github.com/users/Jir4/gists{/gist_id}","starred_url":"https://api.github.com/users/Jir4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jir4/subscriptions","organizations_url":"https://api.github.com/users/Jir4/orgs","repos_url":"https://api.github.com/users/Jir4/repos","events_url":"https://api.github.com/users/Jir4/events{/privacy}","received_events_url":"https://api.github.com/users/Jir4/received_events","type":"User","site_admin":false},"milestone":null,"comments":23,"created_at":"2015-11-13T08:55:18Z","updated_at":"2016-02-19T15:16:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hoaproject/File/pulls/22","html_url":"https://github.com/hoaproject/File/pull/22","diff_url":"https://github.com/hoaproject/File/pull/22.diff","patch_url":"https://github.com/hoaproject/File/pull/22.patch"},"body":"Fix #18.\r\n\r\nWith that update if you specify a path like \"/*emp\" or \"/{a,b,c}*.php\", it will be processed nicely.\r\n\r\nExample:\r\n```php\r\n<?php\r\n$finder = (new Finder())->in([\"/*emp\", \"/{a,b,c}*.php\"]);\r\n```\r\n\r\nDoes not use the `Iterator\\Glob` implementation here because it does not have the GLOB_ONLYDIR filter. It can be replaced with a combination of `Iterator\\CallbackFilter` and `Iterator\\Glob` but it seems more complex which is not suitable here..."},"comment":{"url":"https://api.github.com/repos/hoaproject/File/issues/comments/186255644","html_url":"https://github.com/hoaproject/File/pull/22#issuecomment-186255644","issue_url":"https://api.github.com/repos/hoaproject/File/issues/22","id":186255644,"user":{"login":"shulard","id":482993,"avatar_url":"https://avatars.githubusercontent.com/u/482993?v=3","gravatar_id":"","url":"https://api.github.com/users/shulard","html_url":"https://github.com/shulard","followers_url":"https://api.github.com/users/shulard/followers","following_url":"https://api.github.com/users/shulard/following{/other_user}","gists_url":"https://api.github.com/users/shulard/gists{/gist_id}","starred_url":"https://api.github.com/users/shulard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shulard/subscriptions","organizations_url":"https://api.github.com/users/shulard/orgs","repos_url":"https://api.github.com/users/shulard/repos","events_url":"https://api.github.com/users/shulard/events{/privacy}","received_events_url":"https://api.github.com/users/shulard/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T15:16:46Z","updated_at":"2016-02-19T15:16:46Z","body":"I've updated my bench repo here: https://github.com/shulard/hoa-file-glob-benchmark\r\n\r\nNow I check with `glob`, with `Iterator\\Glob`, with detection+`glob`, with detection+`Iterator\\Glob`:\r\n\r\n```\r\nglob              ||||||||||                                      1677ms,  22.0%\r\niterator          ||||||||||                                      1723ms,  22.6%\r\nglobnodetect      |||||||||||                                     1800ms,  23.6%\r\niteratornodetect  ||||||||||                                      1667ms,  21.9%\r\n```\r\n\r\nExecution time is really similar with the given path patterns :\r\n\r\n* `/Users/shulard/Sites/Clients`\r\n* `/[u]sr/[lb]*/`\r\n\r\nAll the objects found 42083 files on my computer.\r\nI ran the test multiple times, `Iterator\\Glob` results are all consistant but `glob` can take about 100ms more on some calls... Maybe it's my computer, maybe it's the implementation...\r\n\r\nI also confirmed that braces are not handled by the `GlobIterator` implementation in PHP (but it's not an official feature of glob...)."}}