{"action":"created","issue":{"url":"https://api.github.com/repos/php/php-src/issues/947","labels_url":"https://api.github.com/repos/php/php-src/issues/947/labels{/name}","comments_url":"https://api.github.com/repos/php/php-src/issues/947/comments","events_url":"https://api.github.com/repos/php/php-src/issues/947/events","html_url":"https://github.com/php/php-src/pull/947","id":51382255,"number":947,"title":"[PHP7] Add support for package private class, trait and interface","user":{"login":"guilhermeblanco","id":208883,"avatar_url":"https://avatars.githubusercontent.com/u/208883?v=3","gravatar_id":"","url":"https://api.github.com/users/guilhermeblanco","html_url":"https://github.com/guilhermeblanco","followers_url":"https://api.github.com/users/guilhermeblanco/followers","following_url":"https://api.github.com/users/guilhermeblanco/following{/other_user}","gists_url":"https://api.github.com/users/guilhermeblanco/gists{/gist_id}","starred_url":"https://api.github.com/users/guilhermeblanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilhermeblanco/subscriptions","organizations_url":"https://api.github.com/users/guilhermeblanco/orgs","repos_url":"https://api.github.com/users/guilhermeblanco/repos","events_url":"https://api.github.com/users/guilhermeblanco/events{/privacy}","received_events_url":"https://api.github.com/users/guilhermeblanco/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/php/php-src/labels/RFC","name":"RFC","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2014-12-09T02:57:20Z","updated_at":"2015-09-16T02:34:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/947","html_url":"https://github.com/php/php-src/pull/947","diff_url":"https://github.com/php/php-src/pull/947.diff","patch_url":"https://github.com/php/php-src/pull/947.patch"},"body":"Consumes PR #931 \r\n\r\nThis PR allows this to be possible:\r\n\r\n```php\r\nnamespace Foo \r\n{\r\n    private class Bar\r\n    {\r\n        // ...\r\n    }\r\n}\r\n\r\nnamespace Woo {\r\n    class Fuzz extends Bar {}\r\n}\r\n```\r\n\r\nTo not be allowed as library developer of Foo may not have planned extension points in class `Bar`.\r\n\r\nRFC to be written yet...\r\n\r\nImplementation progress:\r\n\r\n* [x] Add lexical support for public classes, traits and interfaces\r\n* [x] Make sure public classes, traits and interfaces are supported correctly\r\n* [x] Add lexical support for private classes, traits and interfaces\r\n* [x] Implement compile time checks for private extension and implementation\r\n* [x] Implement run time check for private class instantiation\r\n* [x] Find a sponsor to review and help polish implementation (Nikita Popov)\r\n* [x] Implement `ReflectionClass::isPublic()` and `ReflectionClass::isPrivate()`\r\n* [x] Implement `ReflectionClass::setAccessible()`\r\n\r\nAdd more tests coverage for:\r\n\r\nReflectionClass:\r\n\r\n* [x] Add test for `ReflectionClass::isPublic()` with implicit value\r\n* [x] Add test for `ReflectionClass::isPublic()` with explicit value\r\n* [x] Add test for `ReflectionClass::isPrivate()` with explicit value\r\n* [x] Add test for `ReflectionClass::setAccessible()`\r\n\r\nClasses:\r\n\r\n* [x] Top level private class, top level instantiation\r\n* [x] Top level private class, top level class instantiation\r\n* [x] Top level private class, top level function instantiation\r\n* [x] Top level private class, top level closure instantiation\r\n* [x] Top level private class, top level clone instantiation\r\n* [x] Top level private class, top level class extension\r\n* [x] **(FAIL)** Top level private class, different namespace instantiation\r\n* [x] Top level private class, different namespace class instantiation\r\n* [x] Top level private class, different namespace function instantiation\r\n* [x] Top level private class, different namespace closure instantiation\r\n* [x] **(FAIL)** Top level private class, different namespace clone instantiation\r\n* [x] Top level private class, different namespace class extension\r\n* [x] Namespaced private class, top level instantiation\r\n* [x] Namespaced private class, top level class instantiation\r\n* [x] Namespaced private class, top level function instantiation\r\n* [x] Namespaced private class, top level closure instantiation\r\n* [x] **(FAIL)** Namespaced private class, top level clone instantiation\r\n* [x] Namespaced private class, top level class extension\r\n* [x] **(FAIL)** Namespaced private class, same namespace instantiation\r\n* [x] Namespaced private class, same namespace class instantiation\r\n* [x] Namespaced private class, same namespace function instantiation\r\n* [x] Namespaced private class, same namespace closure instantiation\r\n* [x] Namespaced private class, same namespace clone instantiation\r\n* [x] Namespaced private class, same namespace class extension\r\n* [x] **(FAIL)** Namespaced private class, different namespace instantiation\r\n* [x] Namespaced private class, different namespace class instantiation\r\n* [x] Namespaced private class, different namespace function instantiation\r\n* [x] Namespaced private class, different namespace closure instantiation\r\n* [x] **(FAIL)** Namespaced private class, different namespace clone instantiation\r\n* [x] Namespaced private class, different namespace class extension\r\n* [x] Any of the above test using autoloading\r\n\r\nInterfaces:\r\n\r\n* [x] Top level private interface, top level class implementation\r\n* [x] Top level private interface, different namespace class implementation\r\n* [x] Namespaced private interface, top level class implementation\r\n* [x] Namespaced private interface, same namespace class implementation\r\n* [x] Namespaced private interface, different namespace class implementation\r\n* [x] Any of the above test using autoloading\r\n\r\nTraits:\r\n\r\n* [x] Top level private trait, top level class usage\r\n* [x] Top level private trait, different namespace class usage\r\n* [x] Namespaced private trait, top level class usage\r\n* [x] Namespaced private trait, same namespace class usage\r\n* [x] Namespaced private trait, different namespace class usage\r\n* [x] Any of the above test using autoloading"},"comment":{"url":"https://api.github.com/repos/php/php-src/issues/comments/140607555","html_url":"https://github.com/php/php-src/pull/947#issuecomment-140607555","issue_url":"https://api.github.com/repos/php/php-src/issues/947","id":140607555,"user":{"login":"mbrzuchalski","id":3149753,"avatar_url":"https://avatars.githubusercontent.com/u/3149753?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrzuchalski","html_url":"https://github.com/mbrzuchalski","followers_url":"https://api.github.com/users/mbrzuchalski/followers","following_url":"https://api.github.com/users/mbrzuchalski/following{/other_user}","gists_url":"https://api.github.com/users/mbrzuchalski/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrzuchalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrzuchalski/subscriptions","organizations_url":"https://api.github.com/users/mbrzuchalski/orgs","repos_url":"https://api.github.com/users/mbrzuchalski/repos","events_url":"https://api.github.com/users/mbrzuchalski/events{/privacy}","received_events_url":"https://api.github.com/users/mbrzuchalski/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T02:34:17Z","updated_at":"2015-09-16T02:34:17Z","body":":+1: "}}