{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/26357","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/26357/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/26357/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/26357/events","html_url":"https://github.com/symfony/symfony/issues/26357","id":301424129,"number":26357,"title":"[RFC] Make using the Filesystem component (a bit) simpler","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars3.githubusercontent.com/u/73419?v=4","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"labels":[{"id":18832723,"url":"https://api.github.com/repos/symfony/symfony/labels/Filesystem","name":"Filesystem","color":"DDDDDD","default":false},{"id":83934034,"url":"https://api.github.com/repos/symfony/symfony/labels/RFC","name":"RFC","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-03-01T14:27:59Z","updated_at":"2018-03-01T22:56:07Z","closed_at":null,"author_association":"MEMBER","body":"| Q                | A\r\n| ---------------- | -----\r\n| Bug report?      | no\r\n| Feature request? | yes\r\n| BC Break report? | no\r\n| RFC?             | yes\r\n| Symfony version  | 4.1\r\n\r\nI've always wondered why the Filesystem component doesn't define static methods, given that it doesn't define a constructor and doesn't store any state. My use case is that I'm tired of doing this:\r\n\r\n```php\r\n$fs = new Filesystem();\r\n$fs->copy('...' , '...');\r\n```\r\n\r\nor\r\n\r\n```php\r\n(new Filesystem())->copy('...' , '...');\r\n```\r\n\r\nI'd prefer to have this in my code:\r\n\r\n```php\r\nFilesystem::copy('...' , '...');\r\n```\r\n\r\nIf you agree with this, it would be possible to make this change and be backward compatible. Make all methods static and define a `__call()` method that allows to execute the non-static methods and displays the deprecation notice.\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/369760065","html_url":"https://github.com/symfony/symfony/issues/26357#issuecomment-369760065","issue_url":"https://api.github.com/repos/symfony/symfony/issues/26357","id":369760065,"user":{"login":"Simperfit","id":3451634,"avatar_url":"https://avatars1.githubusercontent.com/u/3451634?v=4","gravatar_id":"","url":"https://api.github.com/users/Simperfit","html_url":"https://github.com/Simperfit","followers_url":"https://api.github.com/users/Simperfit/followers","following_url":"https://api.github.com/users/Simperfit/following{/other_user}","gists_url":"https://api.github.com/users/Simperfit/gists{/gist_id}","starred_url":"https://api.github.com/users/Simperfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simperfit/subscriptions","organizations_url":"https://api.github.com/users/Simperfit/orgs","repos_url":"https://api.github.com/users/Simperfit/repos","events_url":"https://api.github.com/users/Simperfit/events{/privacy}","received_events_url":"https://api.github.com/users/Simperfit/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T22:56:07Z","updated_at":"2018-03-01T22:56:07Z","author_association":"CONTRIBUTOR","body":"And this adds no overhead when using the component ?\nLe jeu. 1 mars 2018 à 21:58, Gabriel Ostrolucký <notifications@github.com>\na écrit :\n\n> Here's how to do it https://3v4l.org/Za4KP Key is making current\n> functions protected, so they are no longer visible from outside when making\n> static call.\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/symfony/symfony/issues/26357#issuecomment-369728361>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ADSq8jrGulTPADdxO80m3Hxxs9-jGguHks5taGDYgaJpZM4SYZDS>\n> .\n>\n"}}
{"actor":{"display_login":"Simperfit"}}