{"action":"created","issue":{"url":"https://api.github.com/repos/phpro/soap-client/issues/63","repository_url":"https://api.github.com/repos/phpro/soap-client","labels_url":"https://api.github.com/repos/phpro/soap-client/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/phpro/soap-client/issues/63/comments","events_url":"https://api.github.com/repos/phpro/soap-client/issues/63/events","html_url":"https://github.com/phpro/soap-client/issues/63","id":254633731,"number":63,"title":"GuzzleWsdlProvider fills up tmp with cache files and keeps downloading WSDL file","user":{"login":"veloxy","id":491675,"avatar_url":"https://avatars2.githubusercontent.com/u/491675?v=4","gravatar_id":"","url":"https://api.github.com/users/veloxy","html_url":"https://github.com/veloxy","followers_url":"https://api.github.com/users/veloxy/followers","following_url":"https://api.github.com/users/veloxy/following{/other_user}","gists_url":"https://api.github.com/users/veloxy/gists{/gist_id}","starred_url":"https://api.github.com/users/veloxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veloxy/subscriptions","organizations_url":"https://api.github.com/users/veloxy/orgs","repos_url":"https://api.github.com/users/veloxy/repos","events_url":"https://api.github.com/users/veloxy/events{/privacy}","received_events_url":"https://api.github.com/users/veloxy/received_events","type":"User","site_admin":false},"labels":[{"id":233212081,"url":"https://api.github.com/repos/phpro/soap-client/labels/bug","name":"bug","color":"fc2929","default":true},{"id":233212084,"url":"https://api.github.com/repos/phpro/soap-client/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-01T13:01:33Z","updated_at":"2017-09-01T14:20:16Z","closed_at":null,"author_association":"NONE","body":"Unless I'm missing something major, there seem to be a few issues in the [guzzle provider](https://github.com/phpro/soap-client/blob/master/src/Phpro/SoapClient/Wsdl/Provider/GuzzleWsdlProvider.php#L92)\r\n\r\nA random file is ALWAYS generated if `getLocation()` does not return anything, it causes the system tmp directory to be filled up with files such as `/tmp/phpro-soap-client-wsdluP5u2I` but also with WSDL cache files, (if `cache_wsdl` is on) because the cache is based on that file.\r\n\r\nI'm not sure what the point of setting a location is, you'd have to create an empty file in advance or it will throw a `WsdlException`, after that it will keep rewriting that file every time a `SoapClient` is built.\r\n\r\nA GET request is always done to retrieve the WSDL, there is nothing that prevents this. Ideally it should return a path to the cached WSDL file, but this would keep it cached forever due to lack of cache invalidation.\r\n\r\nI currently don't see a fix other than building in a cache manager to handle cache correctly, ideally one implementing PSR-6 or PSR-16. A unique cache key could be generated from `$source`. This would make the `cache_wsdl` option rather useless though, you'd have 2 caching layers. "},"comment":{"url":"https://api.github.com/repos/phpro/soap-client/issues/comments/326593043","html_url":"https://github.com/phpro/soap-client/issues/63#issuecomment-326593043","issue_url":"https://api.github.com/repos/phpro/soap-client/issues/63","id":326593043,"user":{"login":"veloxy","id":491675,"avatar_url":"https://avatars2.githubusercontent.com/u/491675?v=4","gravatar_id":"","url":"https://api.github.com/users/veloxy","html_url":"https://github.com/veloxy","followers_url":"https://api.github.com/users/veloxy/followers","following_url":"https://api.github.com/users/veloxy/following{/other_user}","gists_url":"https://api.github.com/users/veloxy/gists{/gist_id}","starred_url":"https://api.github.com/users/veloxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veloxy/subscriptions","organizations_url":"https://api.github.com/users/veloxy/orgs","repos_url":"https://api.github.com/users/veloxy/repos","events_url":"https://api.github.com/users/veloxy/events{/privacy}","received_events_url":"https://api.github.com/users/veloxy/received_events","type":"User","site_admin":false},"created_at":"2017-09-01T14:20:16Z","updated_at":"2017-09-01T14:20:16Z","author_association":"NONE","body":"Well, specifying a location and enabling `cache_wsdl` option would indeed provide caching but that does not prevent te provider from downloading the WSDL over and over again. Or am I missing something?\r\n\r\nTo fix that, the provider should return the location of the file when the file contains data. So it doesn't re-download the WSDL again for no reason."}}
{"actor":{"display_login":"veloxy"}}