{"action":"created","issue":{"url":"https://api.github.com/repos/goaop/framework/issues/266","repository_url":"https://api.github.com/repos/goaop/framework","labels_url":"https://api.github.com/repos/goaop/framework/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/goaop/framework/issues/266/comments","events_url":"https://api.github.com/repos/goaop/framework/issues/266/events","html_url":"https://github.com/goaop/framework/issues/266","id":143404569,"number":266,"title":"Edit Argument Types?","user":{"login":"derekrprice","id":5413632,"avatar_url":"https://avatars.githubusercontent.com/u/5413632?v=3","gravatar_id":"","url":"https://api.github.com/users/derekrprice","html_url":"https://github.com/derekrprice","followers_url":"https://api.github.com/users/derekrprice/followers","following_url":"https://api.github.com/users/derekrprice/following{/other_user}","gists_url":"https://api.github.com/users/derekrprice/gists{/gist_id}","starred_url":"https://api.github.com/users/derekrprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekrprice/subscriptions","organizations_url":"https://api.github.com/users/derekrprice/orgs","repos_url":"https://api.github.com/users/derekrprice/repos","events_url":"https://api.github.com/users/derekrprice/events{/privacy}","received_events_url":"https://api.github.com/users/derekrprice/received_events","type":"User","site_admin":false},"labels":[{"id":79898089,"url":"https://api.github.com/repos/goaop/framework/labels/Support","name":"Support","color":"207de5","default":false},{"id":45882516,"url":"https://api.github.com/repos/goaop/framework/labels/To%20Be%20Discussed","name":"To Be Discussed","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-03-25T01:43:18Z","updated_at":"2016-11-02T13:40:48Z","closed_at":"2016-04-27T18:22:44Z","body":"I had an idea to define a @SimpleDateTime annotation which would reflect on the method's parameter types and if it found any strings had been passed where DateTime was declared in the prototype, then it would attempt to convert the argument to a DateTime.  Unfortunately, when I tried this, I still got this error message from PHP, before my aspect could intercept and replace the arguments:\n\n`PHP Catchable fatal error:  Argument 1 passed to AOP\\Duration::getReport() must be an instance of DateTime, string given, called in /var/www/html/ssl/h2o/lib-tmp/datetime.php on line 8 and defined in /var/www/html/ssl/h2o/cache/_proxies/AOP/Duration.php on line 26`\n\nIs there any way to avoid this error?  This would be very useful for avoiding boilerplate code since DateTime math in PHP involves a lot of converting back and forth between strings and DateTime objects.\n"},"comment":{"url":"https://api.github.com/repos/goaop/framework/issues/comments/257866797","html_url":"https://github.com/goaop/framework/issues/266#issuecomment-257866797","issue_url":"https://api.github.com/repos/goaop/framework/issues/266","id":257866797,"user":{"login":"lisachenko","id":640114,"avatar_url":"https://avatars.githubusercontent.com/u/640114?v=3","gravatar_id":"","url":"https://api.github.com/users/lisachenko","html_url":"https://github.com/lisachenko","followers_url":"https://api.github.com/users/lisachenko/followers","following_url":"https://api.github.com/users/lisachenko/following{/other_user}","gists_url":"https://api.github.com/users/lisachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/lisachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lisachenko/subscriptions","organizations_url":"https://api.github.com/users/lisachenko/orgs","repos_url":"https://api.github.com/users/lisachenko/repos","events_url":"https://api.github.com/users/lisachenko/events{/privacy}","received_events_url":"https://api.github.com/users/lisachenko/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T13:40:48Z","updated_at":"2016-11-02T13:40:48Z","body":"This should be possible now via #297, just replace the arguments for invocation as needed. For example, if parameter is string and has an annotation `SimpleDateTime`, then replace this argument with `DateTime` instance"}}
{"actor":{"display_login":"lisachenko"}}