{"action":"opened","issue":{"url":"https://api.github.com/repos/dpfaffenbauer/pimcore-coreshop/issues/23","labels_url":"https://api.github.com/repos/dpfaffenbauer/pimcore-coreshop/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/dpfaffenbauer/pimcore-coreshop/issues/23/comments","events_url":"https://api.github.com/repos/dpfaffenbauer/pimcore-coreshop/issues/23/events","html_url":"https://github.com/dpfaffenbauer/pimcore-coreshop/issues/23","id":121654829,"number":23,"title":"Pimcore 4: GeoIP is deprecated","user":{"login":"solverat","id":700119,"avatar_url":"https://avatars.githubusercontent.com/u/700119?v=3","gravatar_id":"","url":"https://api.github.com/users/solverat","html_url":"https://github.com/solverat","followers_url":"https://api.github.com/users/solverat/followers","following_url":"https://api.github.com/users/solverat/following{/other_user}","gists_url":"https://api.github.com/users/solverat/gists{/gist_id}","starred_url":"https://api.github.com/users/solverat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solverat/subscriptions","organizations_url":"https://api.github.com/users/solverat/orgs","repos_url":"https://api.github.com/users/solverat/repos","events_url":"https://api.github.com/users/solverat/events{/privacy}","received_events_url":"https://api.github.com/users/solverat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-11T07:30:33Z","updated_at":"2015-12-11T07:30:33Z","closed_at":null,"body":"https://github.com/dpfaffenbauer/pimcore-coreshop/blob/54803c73ffb59ba1679d547a211f015cdda4e19f/lib/CoreShop/Tool.php#L162\r\n\r\nin pimcore 4, geoip is deprecated. use geoip2 instead:\r\n\r\n```php\r\n\r\n//@fixme: install GeoLite2-Country.mmdb in install process.\r\n\r\nif(file_exists(CORESHOP_CONFIGURATION_PATH . \"/GeoLite2-Country.mmdb\")) {\r\n\r\n    $reader = new Reader(CORESHOP_CONFIGURATION_PATH . \"/GeoLite2-Country.mmdb\");\r\n\r\n    $country = null;\r\n\r\n    try {\r\n\r\n        $country = $reader->country(\\Pimcore\\Tool::getClientIp());\r\n\r\n    } catch(\\Exception $ex) {\r\n\r\n    }\r\n\r\n    $country = Country::getByIsoCode($country);\r\n}\r\n```"}}