{"action":"closed","issue":{"url":"https://api.github.com/repos/ikkez/f3-cortex/issues/25","repository_url":"https://api.github.com/repos/ikkez/f3-cortex","labels_url":"https://api.github.com/repos/ikkez/f3-cortex/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/ikkez/f3-cortex/issues/25/comments","events_url":"https://api.github.com/repos/ikkez/f3-cortex/issues/25/events","html_url":"https://github.com/ikkez/f3-cortex/issues/25","id":150600023,"number":25,"title":"Cannot redeclare class DB\\SQL\\Schema error","user":{"login":"GhaziTriki","id":4991088,"avatar_url":"https://avatars.githubusercontent.com/u/4991088?v=3","gravatar_id":"","url":"https://api.github.com/users/GhaziTriki","html_url":"https://github.com/GhaziTriki","followers_url":"https://api.github.com/users/GhaziTriki/followers","following_url":"https://api.github.com/users/GhaziTriki/following{/other_user}","gists_url":"https://api.github.com/users/GhaziTriki/gists{/gist_id}","starred_url":"https://api.github.com/users/GhaziTriki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GhaziTriki/subscriptions","organizations_url":"https://api.github.com/users/GhaziTriki/orgs","repos_url":"https://api.github.com/users/GhaziTriki/repos","events_url":"https://api.github.com/users/GhaziTriki/events{/privacy}","received_events_url":"https://api.github.com/users/GhaziTriki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-04-23T21:45:55Z","updated_at":"2016-06-26T09:48:41Z","closed_at":"2016-06-26T09:48:41Z","body":"Hello,\r\n\r\nI wasn't sure about where to put this issue in the \"schema-builder\" projet or here.\r\n\r\nI have this issue when I have ```$fieldConf``` property for my User model class. If I remove it the error is gone.\r\n\r\n```php\r\nclass User\r\n{\r\n    protected $table = 'users';\r\n\r\n    protected $fieldConf = [\r\n        'settings' => [\r\n            'has-many' => ['\\models\\UserSetting', 'user_id']\r\n        ]\r\n    ];\r\n}\r\n\r\nclass UserSetting\r\n{\r\n    protected $table = 'users_settings';\r\n\r\n    protected $fieldConf = [\r\n        'user' => [\r\n            'belongs-to-one' => '\\models\\User'\r\n        ]\r\n    ];\r\n}\r\n```\r\n\r\nI have the following call stack trace\r\n\r\n```\r\nFatal error: Cannot redeclare class DB\\SQL\\Schema in /var/www/html/vendor/ikkez/f3-schema-builder/lib/db/sql/schema.php on line 30\r\n\r\nCall Stack:\r\n    0.0001     237864   1. {main}() /var/www/html/public/index.php:0\r\n    0.0071    1308536   2. application\\Bootstrap->__construct() /var/www/html/public/index.php:27\r\n    0.0347    2181728   3. Base->run() /var/www/html/app/classes/application/Bootstrap.php:75\r\n    0.0355    2224312   4. Base->call() /var/www/html/vendor/bcosca/fatfree-core/base.php:1509\r\n    0.0390    2275296   5. call_user_func_array:{/var/www/html/vendor/bcosca/fatfree-core/base.php:1683}() /var/www/html/vendor/bcosca/fatfree-core/base.php:1683\r\n    0.0390    2275776   6. actions\\users\\Index->execute() /var/www/html/vendor/bcosca/fatfree-core/base.php:1683\r\n    0.0402    2458304   7. models\\User->__construct() /var/www/html/app/classes/actions/users/Index.php:26\r\n    0.0402    2458640   8. models\\Base->__construct() /var/www/html/app/classes/models/User.php:41\r\n    0.0402    2458944   9. DB\\Cortex->__construct() /var/www/html/app/classes/models/Base.php:78\r\n    0.0402    2459712  10. DB\\Cortex->initMapper() /var/www/html/vendor/ikkez/f3-cortex/lib/db/cortex.php:124\r\n    0.0415    2475984  11. DB\\Cortex::resolveRelationConf() /var/www/html/vendor/ikkez/f3-cortex/lib/db/cortex.php:156\r\n    0.0415    2476744  12. spl_autoload_call() /var/www/html/vendor/ikkez/f3-cortex/lib/db/cortex.php:512\r\n    0.0415    2476776  13. Composer\\Autoload\\ClassLoader->loadClass() /var/www/html/vendor/ikkez/f3-cortex/lib/db/cortex.php:512\r\n    0.0415    2476776  14. Composer\\Autoload\\includeFile() /var/www/html/vendor/composer/ClassLoader.php:301\r\n    0.0424    2613440  15. include('/var/www/html/vendor/ikkez/f3-schema-builder/lib/db/sql/schema.php') /var/www/html/vendor/composer/ClassLoader.php:412\r\n```"}}
{"actor":{"display_login":"ikkez"}}