{"action":"created","issue":{"url":"https://api.github.com/repos/tinyspeck/php-function-rename/issues/1","labels_url":"https://api.github.com/repos/tinyspeck/php-function-rename/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/tinyspeck/php-function-rename/issues/1/comments","events_url":"https://api.github.com/repos/tinyspeck/php-function-rename/issues/1/events","html_url":"https://github.com/tinyspeck/php-function-rename/pull/1","id":99699338,"number":1,"title":"Fix: Clear function caches for PHP 5.4+","user":{"login":"andycking","id":2487024,"avatar_url":"https://avatars.githubusercontent.com/u/2487024?v=3","gravatar_id":"","url":"https://api.github.com/users/andycking","html_url":"https://github.com/andycking","followers_url":"https://api.github.com/users/andycking/followers","following_url":"https://api.github.com/users/andycking/following{/other_user}","gists_url":"https://api.github.com/users/andycking/gists{/gist_id}","starred_url":"https://api.github.com/users/andycking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andycking/subscriptions","organizations_url":"https://api.github.com/users/andycking/orgs","repos_url":"https://api.github.com/users/andycking/repos","events_url":"https://api.github.com/users/andycking/events{/privacy}","received_events_url":"https://api.github.com/users/andycking/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-07T18:07:10Z","updated_at":"2015-08-10T22:10:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tinyspeck/php-function-rename/pulls/1","html_url":"https://github.com/tinyspeck/php-function-rename/pull/1","diff_url":"https://github.com/tinyspeck/php-function-rename/pull/1.diff","patch_url":"https://github.com/tinyspeck/php-function-rename/pull/1.patch"},"body":"We need to clear out the function caches on newer version of PHP\r\nwhen renaming a function. Otherwise it'll explode when it hits\r\nan out-of-sync cache.\r\n\r\nThis is taken from the Runkit PHP extension:\r\n\r\nhttps://github.com/zenovich/runkit\r\nhttps://github.com/zenovich/runkit/blob/master/runkit_functions.c"},"comment":{"url":"https://api.github.com/repos/tinyspeck/php-function-rename/issues/comments/129630538","html_url":"https://github.com/tinyspeck/php-function-rename/pull/1#issuecomment-129630538","issue_url":"https://api.github.com/repos/tinyspeck/php-function-rename/issues/1","id":129630538,"user":{"login":"pellyg","id":265960,"avatar_url":"https://avatars.githubusercontent.com/u/265960?v=3","gravatar_id":"","url":"https://api.github.com/users/pellyg","html_url":"https://github.com/pellyg","followers_url":"https://api.github.com/users/pellyg/followers","following_url":"https://api.github.com/users/pellyg/following{/other_user}","gists_url":"https://api.github.com/users/pellyg/gists{/gist_id}","starred_url":"https://api.github.com/users/pellyg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pellyg/subscriptions","organizations_url":"https://api.github.com/users/pellyg/orgs","repos_url":"https://api.github.com/users/pellyg/repos","events_url":"https://api.github.com/users/pellyg/events{/privacy}","received_events_url":"https://api.github.com/users/pellyg/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T22:10:21Z","updated_at":"2015-08-10T22:10:21Z","body":"I have confirmed that this patch fixed a frustrating segmentation fault issue that i was dealing with. \r\n\r\nAs a second test, I ran the following code (must be in webapp/tests/unit/) before and after the patch was run on dev26.  before the patch, i get a segfault. after the patch, it works as expected.\r\n\r\n<?php\r\n\r\n    $dir = dirname(__FILE__);\r\n    include(\"$dir/../include/bootstrap.php\");\r\n\r\n    loadtestlib('override');\r\n\r\n    function my_test_function(){\r\n        return \"original\";\r\n    }\r\n\r\n    function my_test_function_override(){\r\n        return \"override\";\r\n    }\r\n\r\n    function foo($bar){\r\n        return my_test_function();\r\n    }\r\n\r\n    is(foo(\"harro\"), \"original\");\r\n\r\n    override_function(\"my_test_function\", \"my_test_function_override\");\r\n\r\n    is(foo(\"harro\"), \"override\");\r\n\r\n    is(override_is_overridden(\"my_test_function\"), 1);\r\n\r\n    override_reset_function(\"my_test_function\");\r\n\r\n    is(foo(\"harro\"), \"original\");\r\n\r\n    is(override_is_overridden(\"my_test_function\"), 0);\r\n"}}