{"issue":{"milestone":null,"user":{"id":87955,"login":"kenjis","url":"https://api.github.com/users/kenjis","avatar_url":"https://secure.gravatar.com/avatar/e420241bec32f3d97b60f82e17550c2e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"e420241bec32f3d97b60f82e17550c2e"},"title":"fix namespace of HttpException","created_at":"2011-12-11T04:31:15Z","updated_at":"2011-12-18T13:26:49Z","labels":[],"state":"open","id":2514757,"pull_request":{"patch_url":"https://github.com/fuel/core/pull/722.patch","html_url":"https://github.com/fuel/core/pull/722","diff_url":"https://github.com/fuel/core/pull/722.diff"},"html_url":"https://github.com/fuel/core/issues/722","closed_at":null,"body":"When loading httpexception.php, there is no alias \\HttpException yet.\r\nSo it causes Class 'HttpException' not found Error.\r\n\r\nHow to reproduce:\r\n\r\napp/myexception.php:\r\n\r\n```php\r\nclass MyException extends \\HttpException\r\n{\r\n\t...\r\n}\r\n```\r\n\r\n```php\r\nclass Controller_Welcome extends Controller\r\n{\r\n\tpublic function action_index()\r\n\t{\r\n\t\tthrow new MyException('...');\r\n\t}\r\n}\r\n```\r\n","number":722,"url":"https://api.github.com/repos/fuel/core/issues/722","comments":1,"assignee":null},"comment":{"user":{"id":69116,"login":"jschreuder","url":"https://api.github.com/users/jschreuder","avatar_url":"https://secure.gravatar.com/avatar/db69a2f869424d55143b981857a3ddf2?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"db69a2f869424d55143b981857a3ddf2"},"created_at":"2011-12-18T13:26:48Z","updated_at":"2011-12-18T13:26:48Z","id":3194685,"body":"It is right for those classes to extend HttpException from global as it allow you to add methods/properties to the base exception that will be inherited by all. The problem is indeed that while the HttpException class is being loaded it's extended a second time, a circular load the PHP interpreter doesn't allow.\r\n\r\nThe fix shouldn't be to disallow extending the HttpException in a way that no longer allows extending it in a way that is inherited. We should either move the HttpException so it can be loaded independently from the others, or make sure it's loaded before anyone extends it.\r\n\r\n@dhorrigan thoughts?","url":"https://api.github.com/repos/fuel/core/issues/comments/3194685"},"action":"created"}