{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/16970","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/16970/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/16970/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/16970/events","html_url":"https://github.com/yiisoft/yii2/issues/16970","id":391395053,"node_id":"MDU6SXNzdWUzOTEzOTUwNTM=","number":16970,"title":"APC cache is being required by default","user":{"login":"emuthomi","id":3242390,"node_id":"MDQ6VXNlcjMyNDIzOTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3242390?v=4","gravatar_id":"","url":"https://api.github.com/users/emuthomi","html_url":"https://github.com/emuthomi","followers_url":"https://api.github.com/users/emuthomi/followers","following_url":"https://api.github.com/users/emuthomi/following{/other_user}","gists_url":"https://api.github.com/users/emuthomi/gists{/gist_id}","starred_url":"https://api.github.com/users/emuthomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emuthomi/subscriptions","organizations_url":"https://api.github.com/users/emuthomi/orgs","repos_url":"https://api.github.com/users/emuthomi/repos","events_url":"https://api.github.com/users/emuthomi/events{/privacy}","received_events_url":"https://api.github.com/users/emuthomi/received_events","type":"User","site_admin":false},"labels":[{"id":145356565,"node_id":"MDU6TGFiZWwxNDUzNTY1NjU=","url":"https://api.github.com/repos/yiisoft/yii2/labels/status:need%20more%20info","name":"status:need more info","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-15T17:08:48Z","updated_at":"2018-12-17T08:43:19Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPlease use this issue tracker for bugs and feature requests only. In case you need support please use one of\r\nYii communities listed at https://github.com/yiisoft/yii2/wiki/communities\r\n-->\r\n\r\n### What steps will reproduce the problem?\r\nI have updated yii2 through composer from Yii v2.0.5 to v2.0.15.1.\r\n\r\n### What is the expected result?\r\nI expected no major breaking issue, and my application to work as is\r\n### What do you get instead?\r\n```\r\nInvalid Configuration – yii\\base\\InvalidConfigException\r\nApcCache requires PHP apc extension to be loaded.\r\n```\r\n in C:\\xampp71\\htdocs\\myapp\\vendor\\yiisoft\\yii2\\caching\\ApcCache.php line 47\r\nThe offending code is: \r\n\r\n```\r\npublic function init()\r\n    {\r\n        parent::init();\r\n        $extension = $this->useApcu ? 'apcu' : 'apc';\r\n        if (!extension_loaded($extension)) {\r\n            throw new InvalidConfigException(\"ApcCache requires PHP $extension extension to be loaded.\");\r\n        }\r\n    }\r\n```\r\nMy web.php config file:\r\n\r\n```\r\n'cache' => [\r\n      'class' => 'yii\\caching\\FileCache',\r\n ],\r\n```\r\n\r\nI have tried changing the config to below but the issue couldn't be resolved:\r\n```\r\n'cache' => [\r\n      'class' => 'yii\\caching\\ApcCache',\r\n      'useApcu' => true,\r\n ],\r\n```\r\nThe only fix that worked is to explicitly change \r\n``` \r\npublic $useApcu = false;\r\n```\r\nin the ApcCache class to \r\n```\r\npublic $useApcu = true;\r\n```\r\n### Additional info\r\n\r\n| Q                | A\r\n| ---------------- | ---\r\n| Yii version      | 2.0.15.1?\r\n| PHP version      | 7.1.1\r\n| PHP Compiler    | MSVC14 (Visual C++ 2015)\r\n| Architecture      | x86\r\n| Apache Version   | Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/7.1.1\r\n| Operating system | Windows 7 Professional Edition Service Pack 1\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/447764606","html_url":"https://github.com/yiisoft/yii2/issues/16970#issuecomment-447764606","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/16970","id":447764606,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Nzc2NDYwNg==","user":{"login":"emuthomi","id":3242390,"node_id":"MDQ6VXNlcjMyNDIzOTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3242390?v=4","gravatar_id":"","url":"https://api.github.com/users/emuthomi","html_url":"https://github.com/emuthomi","followers_url":"https://api.github.com/users/emuthomi/followers","following_url":"https://api.github.com/users/emuthomi/following{/other_user}","gists_url":"https://api.github.com/users/emuthomi/gists{/gist_id}","starred_url":"https://api.github.com/users/emuthomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emuthomi/subscriptions","organizations_url":"https://api.github.com/users/emuthomi/orgs","repos_url":"https://api.github.com/users/emuthomi/repos","events_url":"https://api.github.com/users/emuthomi/events{/privacy}","received_events_url":"https://api.github.com/users/emuthomi/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T08:43:19Z","updated_at":"2018-12-17T08:43:19Z","author_association":"NONE","body":"After keenly looking at the Stack Trace, turns out the issue emanates from the urlManager configuration...  when the ```enablePrettyUrl``` property is set to ```true``` , for some reason the urlManager is trying to look into the APC cache. "}}
{"actor":{"display_login":"emuthomi"}}