{"action":"created","issue":{"url":"https://api.github.com/repos/StyleCI/StyleCI/issues/471","labels_url":"https://api.github.com/repos/StyleCI/StyleCI/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/StyleCI/StyleCI/issues/471/comments","events_url":"https://api.github.com/repos/StyleCI/StyleCI/issues/471/events","html_url":"https://github.com/StyleCI/StyleCI/issues/471","id":95404259,"number":471,"title":"Support Multiple Path Passes","user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/StyleCI/StyleCI/milestones/9","html_url":"https://github.com/StyleCI/StyleCI/milestones/V1.0.0","labels_url":"https://api.github.com/repos/StyleCI/StyleCI/milestones/9/labels","id":1053107,"number":9,"title":"V1.0.0","description":"","creator":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":57,"state":"closed","created_at":"2015-04-05T00:16:01Z","updated_at":"2015-07-26T10:27:01Z","due_on":"2015-07-25T23:00:00Z","closed_at":"2015-07-26T10:27:01Z"},"comments":12,"created_at":"2015-07-16T10:30:10Z","updated_at":"2015-09-29T16:36:59Z","closed_at":"2015-07-16T10:38:29Z","body":"At the moment, StyleCI always runs PHP-CS-Fixer in the project's root directory. This is problematic when a project contains multiple mapped PSR-4 roots, for example:\r\n\r\n```\r\nsrc/ -> Vendor\\Project\r\ntests/ -> Vendor\\Project\\Tests\r\n```\r\n\r\nSince the directory \"tests\" is different from the namespace \"Tests\", PHP-CS-Fixer lowercases the namespace to match the directory name:\r\n\r\n```\r\n$ php-cs-fixer fix --fixers psr0 .\r\n```\r\n\r\nResult:\r\n\r\n```php\r\nnamespace Vendor\\Project\\tests;\r\n```\r\n\r\nThis is correct when assuming PSR-0, but not for PSR-4.\r\n\r\nThe way to solve this is to run PHP-CS-Fixer individually for each root directory:\r\n\r\n```\r\n$ php-cs-fixer fix --fixers psr0 src\r\n$ php-cs-fixer fix --fixers psr0 tests\r\n```\r\n\r\nThis way, PHP-CS-Fixer will not change the \"Tests\" namespace. It would be great if StyleCI could be configured to run on multiple, specified directories. At the moment, the `psr0` fixer is unusable for me for PSR-4 projects.\r\n\r\nUsing the finder's `path()` method does not work, since that's used for filtering only, not for determining the base directory."},"comment":{"url":"https://api.github.com/repos/StyleCI/StyleCI/issues/comments/144113777","html_url":"https://github.com/StyleCI/StyleCI/issues/471#issuecomment-144113777","issue_url":"https://api.github.com/repos/StyleCI/StyleCI/issues/471","id":144113777,"user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T16:36:59Z","updated_at":"2015-09-29T16:36:59Z","body":"I did, however the error message was confusing and I did not realize it was related with those emails. Everything works now."}}