Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Semantical Error] The annotation "@Swagger\Annotations\GET" in ... does not exist, or could not be auto-loaded. #54

Open
matthiasderosa opened this issue Nov 23, 2015 · 3 comments

Comments

@matthiasderosa
Copy link

Hi,

I have a working documentation etc. on my system. When I copy the project to a remote server I get the following exception:


[Semantical Error] The annotation "@Swagger\Annotations\GET" in \helpa\Http\Controllers\UsersController->getUsers() in /var/www/helpa/app/Http/Controllers/UsersController.php on line 14 does not exist, or could not be auto-loaded.

in Logger.php line 38
at HandleExceptions->handleError('512', '[Semantical Error] The annotation "@Swagger\Annotations\GET" in \helpa\Http\Controllers\UsersController->getUsers() in /var/www/helpa/app/Http/Controllers/UsersController.php on line 14 does not exist, or could not be auto-loaded.', '/var/www/helpa/vendor/zircote/swagger-php/src/Logger.php', '38', array('entry' => '[Semantical Error] The annotation "@Swagger\Annotations\GET" in \helpa\Http\Controllers\UsersController->getUsers() in /var/www/helpa/app/Http/Controllers/UsersController.php on line 14 does not exist, or could not be auto-loaded.', 'type' => '512'))
at trigger_error('[Semantical Error] The annotation "@Swagger\Annotations\GET" in \helpa\Http\Controllers\UsersController->getUsers() in /var/www/helpa/app/Http/Controllers/UsersController.php on line 14 does not exist, or could not be auto-loaded.', '512') in Logger.php line 38
at Logger->Swagger\{closure}(object(AnnotationException), '512')
at call_user_func(object(Closure), object(AnnotationException), '512') in Logger.php line 59
at Logger::warning(object(AnnotationException)) in Analyser.php line 99
at Analyser->fromComment('/** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse * @SWG\Definition( * definition="Users", * required={"userid", "type", "firstname", "lastname", "avatar"}, * @SWG\Property( * property="userid", * type="string" * ), * @SWG\Property( * property="type", * type="string" * ), * @SWG\Property( * property="firstname", * type="string" * ), * @SWG\Property( * property="lastname", * type="string" * ), @SWG\Property( * property="avatar", * type="string" * ) * ), * * @SWG\GET( * path="/api/users/all", * description="Returns users list with minimum information.", * operationId="api.users.getUsers", * produces={"application/json"}, * tags={"1. Users"}, * @SWG\Response( * response=200, * description="Show users list with minimum information.", * @SWG\Schema( * ref="#/definitions/Users" * ) * ), * @SWG\Response( * response=401, * description="Unauthorized action.", * @SWG\Schema( * ref="#/definitions/ErrorResponse" * ) * ) * ) */', object(Context)) in StaticAnalyser.php line 244
at StaticAnalyser->analyseComment(object(Analysis), object(Analyser), '/** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse * @SWG\Definition( * definition="Users", * required={"userid", "type", "firstname", "lastname", "avatar"}, * @SWG\Property( * property="userid", * type="string" * ), * @SWG\Property( * property="type", * type="string" * ), * @SWG\Property( * property="firstname", * type="string" * ), * @SWG\Property( * property="lastname", * type="string" * ), @SWG\Property( * property="avatar", * type="string" * ) * ), * * @SWG\GET( * path="/api/users/all", * description="Returns users list with minimum information.", * operationId="api.users.getUsers", * produces={"application/json"}, * tags={"1. Users"}, * @SWG\Response( * response=200, * description="Show users list with minimum information.", * @SWG\Schema( * ref="#/definitions/Users" * ) * ), * @SWG\Response( * response=401, * description="Unauthorized action.", * @SWG\Schema( * ref="#/definitions/ErrorResponse" * ) * ) * ) */', object(Context)) in StaticAnalyser.php line 175
at StaticAnalyser->fromTokens(array(array('376', '<?php ', '1'), array('379', ' ', '2'), array('385', 'namespace', '3'), array('379', ' ', '3'), array('310', 'helpa', '3'), array('388', '\', '3'), array('310', 'Http', '3'), array('388', '\', '3'), array('310', 'Controllers', '3'), ';', array('379', ' ', '3'), array('344', 'use', '5'), array('379', ' ', '5'), array('310', 'helpa', '5'), array('388', '\', '5'), array('310', 'ConnectionsModel', '5'), ';', array('379', ' ', '5'), array('344', 'use', '6'), array('379', ' ', '6'), array('310', 'helpa', '6'), array('388', '\', '6'), array('310', 'Domain', '6'), array('388', '\', '6'), array('310', 'Model', '6'), array('388', '\', '6'), array('310', 'User', '6'), array('388', '\', '6'), array('310', 'User', '6'), ';', array('379', ' ', '6'), array('344', 'use', '7'), array('379', ' ', '7'), array('310', 'helpa', '7'), array('388', '\', '7'), array('310', 'UserModel', '7'), ';', array('379', ' ', '7'), array('344', 'use', '8'), array('379', ' ', '8'), array('310', 'Illuminate', '8'), array('388', '\', '8'), array('310', 'Http', '8'), array('388', '\', '8'), array('310', 'Request', '8'), ';', array('379', ' ', '8'), array('344', 'use', '9'), array('379', ' ', '9'), array('310', 'Illuminate', '9'), array('388', '\', '9'), array('310', 'Http', '9'), array('388', '\', '9'), array('310', 'Response', '9'), ';', array('379', ' ', '9'), array('344', 'use', '10'), array('379', ' ', '10'), array('310', 'helpa', '10'), array('388', '\', '10'), array('310', 'Domain', '10'), array('388', '\', '10'), array('310', 'Services', '10'), array('388', '\', '10'), array('310', 'ConnectionStatuses', '10'), ';', array('379', ' ', '10'), array('358', 'class', '12'), array('379', ' ', '12'), array('310', 'UsersController', '12'), array('379', ' ', '12'), array('361', 'extends', '12'), array('379', ' ', '12'), array('310', 'Controller', '12'), array('379', ' ', '12'), '{', array('379', ' ', '13'), array('375', '/** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse * @SWG\Definition( * definition="Users", * required={"userid", "type", "firstname", "lastname", "avatar"}, * @SWG\Property( * property="userid", * type="string" * ), * @SWG\Property( * property="type", * type="string" * ), * @SWG\Property( * property="firstname", * type="string" * ), * @SWG\Property( * property="lastname", * type="string" * ), @SWG\Property( * property="avatar", * type="string" * ) * ), * * @SWG\GET( * path="/api/users/all", * description="Returns users list with minimum information.", * operationId="api.users.getUsers", * produces={"application/json"}, * tags={"1. Users"}, * @SWG\Response( * response=200, * description="Show users list with minimum information.", * @SWG\Schema( * ref="#/definitions/Users" * ) * ), * @SWG\Response( * response=401, * description="Unauthorized action.", * @SWG\Schema( * ref="#/definitions/ErrorResponse" * ) * ) * ) */', '14'), array('379', ' ', '64'), array('347', 'public', '66'), array('379', ' ', '66'), array('337', 'function', '66'), array('379', ' ', '66'), array('310', 'getUsers', '66'), '(', array('310', 'Request', '66'), array('379', ' ', '66'), array('312', '$request', '66'), ')', array('379', ' ', '66'), '{', array('379', ' ', '67'), array('312', '$users', '68'), array('379', ' ', '68'), '=', array('379', ' ', '68'), array('310', 'User', '68'), array('384', '::', '68'), array('310', 'getUsers', '68'), '(', ')', ';', array('379', ' ', '68'), array('312', '$usersResource', '70'), array('379', ' ', '70'), '=', array('379', ' ', '70'), '[', ']', ';', array('379', ' ', '70'), array('375', '/** @var User $user */', '72'), array('379', ' ', '72'), array('325', 'foreach', '73'), array('379', ' ', '73'), '(', array('312', '$users', '73'), array('379', ' ', '73'), array('329', 'as', '73'), array('379', ' ', '73'), array('312', '$user', '73'), ')', array('379', ' ', '73'), '{', array('379', ' ', '73'), array('312', '$userData', '74'), array('379', ' ', '74'), '=', array('379', ' ', '74'), array('312', '$user', '74'), array('363', '->', '74'), array('310', 'toArray', '74'), '(', ')', ';', array('379', ' ', '74'), array('354', 'unset', '75'), '(', array('312', '$userData', '75'), '[', array('318', ''email'', '75'), ']', ')', ';', array('379', ' ', '75'), array('354', 'unset', '76'), '(', array('312', '$userData', '76'), '[', array('318', ''password'', '76'), ']', ')', ';', array('379', ' ', '76'), array('354', 'unset', '77'), '(', array('312', '$userData', '77'), '[', array('318', ''token'', '77'), ']', ')', ';', array('379', ' ', '77'), array('312', '$usersResource', '79'), '[', ']', array('379', ' ', '79'), '=', array('379', ' ', '79'), array('312', '$userData', '79'), ';', array('379', ' ', '79'), '}', array('379', ' ', '80'), array('339', 'return', '82'), array('379', ' ', '82'), array('302', 'new', '82'), array('379', ' ', '82'), array('310', 'Response', '82'), '(', array('310', 'json_encode', '82'), '(', array('312', '$usersResource', '82'), ',', array('379', ' ', '82'), array('310', 'JSON_PRETTY_PRINT', '82'), ')', ')', ';', array('379', ' ', '82'), '}', array('379', ' ', '83'), array('375', '/** * Display a listing of the resource. * *@return \Illuminate\Http\JsonResponse * @SWG\Definition( * definition="Search", * required={"type", "firstname", "lastname"}, * @SWG\Property( * property="type", * type="string" * ), * @SWG\Property( * property="firstname", * type="string" * ), * @SWG\Property( * property="lastname", * type="string" * ) * ), * * @return \Illuminate\Http\JsonResponse * @SWG\GET( * path="/api/users", * description="Returns users by firstname or lastname (or both).", * operationId="api.users.getSearch", * produces={"application/json"}, * tags={"1. Users"}, * @SWG\Parameter( * description="User firstname.", * type="string", * in="query", * name="name" * ), * @SWG\Parameter( * description="User lastname.", * type="string", * in="query", * name="lastname" * ), * @SWG\Response( * response=200, * description="Show users by search words (firstname, lastname).", * @SWG\Schema( * ref="#/definitions/Search" * ) * ), * @SWG\Response( * response=401, * description="Unauthorized action.", * @SWG\Schema( * ref="#/definitions/ErrorResponse" * ) * ) * ) */', '85'), array('379', ' ', '140'), array('347', 'public', '142'), array('379', ' ', '142'), array('337', 'function', '142'), array('379', ' ', '142'), array('310', 'getSearch', '142'), '(', array('310', 'Request', '142'), array('379', ' ', '142'), array('312', '$request', '142'), ')', array('379', ' ', '142'), '{', array('379', ' ', '143'), array('312', '$name', '144'), array('379', ' ', '144'), '=', array('379', ' ', '144'), array('312', '$request', '144'), array('363', '->', '144'), array('310', 'query', '144'), '(', array('318', ''name'', '144'), ')', ';', array('379', ' ', '144'), array('312', '$lastname', '145'), array('379', ' ', '145'), '=', array('379', ' ', '145'), array('312', '$request', '145'), array('363', '->', '145'), array('310', 'query', '145'), '(', array('318', ''lastname'', '145'), ')', ';', array('379', ' ', '145'), array('304', 'if', '147'), array('379', ' ', '147'), '(', array('310', 'is_null', '147'), '(', array('312', '$name', '147'), ')', array('379', ' ', '147'), array('281', '&&', '147'), array('379', ' ', '147'), array('310', 'is_null', '147'), '(', array('312', '$lastname', '147'), ')', ')', array('379', ' ', '147'), '{', array('379', ' ', '147'), array('339', 'return', '148'), array('379', ' ', '148'), array('310', 'response', '148'), '(', ')', array('363', '->', '148'), array('310', 'json', '148'), '(', '[', array('318', '"error"', '148'), array('379', ' ', '148'), array('364', '=>', '148'), array('379', ' ', '148'), array('318', '"Whoops! missing query params."', '148'), ']', ',', array('379', ' ', '148'), array('308', '401', '148'), ')', ';', array('379', ' ', '148'), '}', array('379', ' ', '149'), array('304', 'if', '151'), array('379', ' ', '151'), '(', array('310', 'is_null', '151'), '(', array('312', '$name', '151'), ')', ')', array('379', ' ', '151'), '{', array('379', ' ', '151'), array('312', '$query', '152'), array('379', ' ', '152'), '=', array('379', ' ', '152'), array('366', 'array', '152'), '(', array('379', ' ', '152'), array('318', ''lastname'', '153'), array('379', ' ', '153'), array('364', '=>', '153'), array('379', ' ', '153'), array('312', '$lastname', '153'), array('379', ' ', '153'), ')', ';', array('379', ' ', '154'), '}', array('379', ' ', '155'), array('306', 'else', '155'), array('379', ' ', '155'), array('304', 'if', '155'), array('379', ' ', '155'), '(', array('310', 'is_null', '155'), '(', array('312', '$lastname', '155'), ')', ')', array('379', ' ', '155'), '{', array('379', ' ', '155'), array('312', '$query', '156'), array('379', ' ', '156'), '=', array('379', ' ', '156'), array('366', 'array', '156'), '(', array('379', ' ', '156'), array('318', ''firstname'', '157'), array('379', ' ', '157'), array('364', '=>', '157'), array('379', ' ', '157'), array('312', '$name', '157'), array('379', ' ', '157'), ')', ';', array('379', ' ', '158'), '}', array('379', ' ', '159'), array('306', 'else', '159'), array('379', ' ', '159'), '{', array('379', ' ', '159'), array('312', '$query', '160'), array('379', ' ', '160'), '=', array('379', ' ', '160'), array('366', 'array', '160'), '(', array('379', ' ', '160'), array('318', ''firstname'', '161'), array('379', ' ', '161'), array('364', '=>', '161'), array('379', ' ', '161'), array('312', '$name', '161'), ',', array('379', ' ', '161'), array('318', ''lastname'', '162'), array('379', ' ', '162'), array('364', '=>', '162'), array('379', ' ', '162'), array('312', '$lastname', '162'), array('379', ' ', '162'), ')', ';', array('379', ' ', '163'), '}', array('379', ' ', '164'), array('312', '$users', '166'), array('379', ' ', '166'), '=', array('379', ' ', '166'), array('310', 'User', '166'), array('384', '::', '166'), array('310', 'getUsersByQuery', '166'), '(', array('312', '$query', '166'), ')', ';', array('379', ' ', '166'), array('312', '$usersResource', '168'), array('379', ' ', '168'), '=', array('379', ' ', '168'), '[', ']', ';', array('379', ' ', '168'), array('375', '/** @var User $user */', '170'), array('379', ' ', '170'), array('325', 'foreach', '171'), array('379', ' ', '171'), '(', array('312', '$users', '171'), array('379', ' ', '171'), array('329', 'as', '171'), array('379', ' ', '171'), array('312', '$user', '171'), ')', array('379', ' ', '171'), '{', array('379', ' ', '171'), array('312', '$userData', '172'), array('379', ' ', '172'), '=', array('379', ' ', '172'), array('312', '$user', '172'), array('363', '->', '172'), array('310', 'toArray', '172'), '(', ')', ';', array('379', ' ', '172'), array('354', 'unset', '173'), '(', array('312', '$userData', '173'), '[', array('318', ''userid'', '173'), ']', ')', ';', array('379', ' ', '173'), array('354', 'unset', '174'), '(', array('312', '$userData', '174'), '[', array('318', ''email'', '174'), ']', ')', ';', array('379', ' ', '174'), array('354', 'unset', '175'), '(', array('312', '$userData', '175'), '[', array('318', ''password'', '175'), ']', ')', ';', array('379', ' ', '175'), array('354', 'unset', '176'), '(', array('312', '$userData', '176'), '[', array('318', ''token'', '176'), ']', ')', ';', array('379', ' ', '176'), array('354', 'unset', '177'), '(', array('312', '$userData', '177'), '[', array('318', ''avatar'', '177'), ']', ')', ';', array('379', ' ', '177'), array('312', '$usersResource', '179'), '[', ']', array('379', ' ', '179'), '=', array('379', ' ', '179'), array('312', '$userData', '179'), ';', array('379', ' ', '179'), '}', array('379', ' ', '180'), array('339', 'return', '182'), array('379', ' ', '182'), array('302', 'new', '182'), array('379', ' ', '182'), array('310', 'Response', '182'), '(', array('310', 'json_encode', '182'), '(', array('312', '$usersResource', '182'), ',', array('379', ' ', '182'), array('310', 'JSON_PRETTY_PRINT', '182'), ')', ')', ';', array('379', ' ', '182'), '}', array('379', ' ', '183'), array('375', '/** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse * @SWG\Definition( * definition="Friends", * required={"userid", "type", "firstname", "lastname", "avatar", "email"}, * @SWG\Property( * property="userid", * type="string" * ), * @SWG\Property( * property="type", * type="string" * ), * @SWG\Property( * property="firstname", * type="string" * ), * @SWG\Property( * property="lastname", * type="string" * ), * @SWG\Property( * property="email", * type="string" * ), * @SWG\Property( * property="avatar", * type="string" * ) * ), * * @SWG\GET( * path="/api/user/{userId}/connections", * description="Returns user his friends list.", * operationId="api.users.getFriends", * produces={"application/json"}, * tags={"2. Connections"}, * @SWG\Parameter( * description="User token for security.", * type="string", * required=true, * in="header", * name="token" * ), * @SWG\Parameter( * description="User id for security.", * type="string", * required=true, * in="path", * name="userId" * ), * @SWG\Response( * response=200, * description="Show user his friends list.", * @SWG\Schema( * ref="#/definitions/Friends" * ) * ), * @SWG\Response( * response=401, * description="Unauthorized action.", * @SWG\Schema( * ref="#/definitions/ErrorResponse" * ) * ) * ) */', '185'), array('379', ' ', '253'), array('347', 'public', '255'), array('379', ' ', '255'), array('337', 'function', '255'), array('379', ' ', '255'), array('310', 'getFriends', '255'), '(', array('312', '$userId', '255'), ',', array('379', ' ', '255'), array('310', 'Request', '255'), array('379', ' ', '255'), array('312', '$request', '255'), ')', array('379', ' ', '255'), '{', array('379', ' ', '256'), array('312', '$reqUser', '257'), array('379', ' ', '257'), '=', array('379', ' ', '257'), array('310', 'User', '257'), array('384', '::', '257'), array('310', 'getByToken', '257'), '(', array('312', '$request', '257'), array('363', '->', '257'), array('310', 'header', '257'), '(', array('318', ''token'', '257'), ')', ')', ';', array('379', ' ', '257'), array('304', 'if', '259'), array('379', ' ', '259'), '(', array('312', '$reqUser', '259'), array('363', '->', '259'), array('310', 'getUserid', '259'), '(', ')', array('379', ' ', '259'), array('282', '!==', '259'), array('379', ' ', '259'), array('312', '$userId', '259'), ')', array('379', ' ', '259'), '{', array('379', ' ', '259'), array('339', 'return', '260'), array('379', ' ', '260'), array('310', 'response', '260'), '(', ')', array('363', '->', '260'), array('310', 'json', '260'), '(', '[', array('318', '"error"', '260'), array('379', ' ', '260'), array('364', '=>', '260'), array('379', ' ', '260'), array('318', '"Whoops! Not valid token"', '260'), ']', ',', array('379', ' ', '260'), array('308', '401', '260'), ')', ';', array('379', ' ', '260'), '}', array('379', ' ', '261'), array('312', '$pathUser', '263'), array('379', ' ', '263'), '=', array('379', ' ', '263'), array('310', 'User', '263'), array('384', '::', '263'), array('310', 'getById', '263'), '(', array('312', '$userId', '263'), ')', ';', array('379', ' ', '263'), array('304', 'if', '264'), array('379', ' ', '264'), '(', array('310', 'is_null', '264'), '(', array('312', '$pathUser', '264'), ')', ')', array('379', ' ', '264'), '{', array('379', ' ', '264'), array('339', 'return', '265'), array('379', ' ', '265'), array('310', 'response', '265'), '(', ')', array('363', '->', '265'), array('310', 'json', '265'), '(', '[', array('318', '"error"', '265'), array('379', ' ', '265'), array('364', '=>', '265'), array('379', ' ', '265'), array('318', '"Whoops! User not found"', '265'), ']', ',', array('379', ' ', '265'), array('308', '404', '265'), ')', ';', array('379', ' ', '265'), '}', array('379', ' ', '266'), array('312', '$users', '268'), array('379', ' ', '268'), '=', array('379', ' ', '268'), array('310', 'User', '268'), array('384', '::', '268'), array('310', 'getUsers', '268'), '(', ')', ';', array('379', ' ', '268'), array('312', '$userConnections', '269'), array('379', ' ', '269'), '=', array('379', ' ', '269'), array('310', 'ConnectionsModel', '269'), array('384', '::', '269'), array('310', 'getByStatus', '269'), '(', array('310', 'ConnectionStatuses', '269'), array('384', '::', '269'), array('310', 'ACCEPTED', '269'), ')', ';', array('379', ' ', '269'), array('312', '$usersResource', '271'), array('379', ' ', '271'), '=', array('379', ' ', '271'), '[', ']', ';', array('379', ' ', '271'), array('375', '/** @var User $user */', '273'), array('379', ' ', '273'), array('325', 'foreach', '274'), array('379', ' ', '274'), '(', array('312', '$users', '274'), array('379', ' ', '274'), array('329', 'as', '274'), array('379', ' ', '274'), array('312', '$user', '274'), ')', array('379', ' ', '274'), '{', array('379', ' ', '274'), array('304', 'if', '275'), array('379', ' ', '275'), '(', array('312', '$user', '275'), array('363', '->', '275'), array('310', 'getUserid', '275'), '(', ')', array('379', ' ', '275'), array('282', '!==', '275'), array('379', ' ', '275'), array('312', '$reqUser', '275'), array('363', '->', '275'), array('310', 'getUserid', '275'), '(', ')', ')', array('379', ' ', '275'), '{', array('379', ' ', '275'), array('325', 'foreach', '276'), array('379', ' ', '276'), '(', array('312', '$userConnections', '276'), array('379', ' ', '276'), array('329', 'as', '276'), array('379', ' ', '276'), array('312', '$connection', '276'), ')', array('379', ' ', '276'), '{', array('379', ' ', '276'), array('304', 'if', '277'), array('379', ' ', '277'), '(', array('312', '$connection', '277'), '[', array('318', ''id_user_confirmer'', '277'), ']', array('379', ' ', '277'), array('283', '===', '277'), array('379', ' ', '277'), array('312', '$user', '277'), array('363', '->', '277'), array('310', 'getUserid', '277'), '(', ')', array('379', ' ', '277'), array('281', '&&', '277'), array('379', ' ', '277'), array('312', '$connection', '277'), '[', array('318', ''id_user_requester'', '277'), ']', array('379', ' ', '277'), array('283', '===', '277'), array('379', ' ', '277'), array('312', '$reqUser', '277'), array('363', '->', '277'), array('310', 'getUserid', '277'), '(', ')', ')', array('379', ' ', '277'), '{', array('379', ' ', '277'), array('312', '$userData', '278'), array('379', ' ', '278'), '=', array('379', ' ', '278'), array('312', '$user', '278'), array('363', '->', '278'), array('310', 'toArray', '278'), '(', ')', ';', array('379', ' ', '278'), array('354', 'unset', '279'), '(', array('312', '$userData', '279'), '[', array('318', ''password'', '279'), ']', ')', ';', array('379', ' ', '279'), array('354', 'unset', '280'), '(', array('312', '$userData', '280'), '[', array('318', ''token'', '280'), ']', ')', ';', array('379', ' ', '280'), array('312', '$usersResource', '282'), '[', ']', array('379', ' ', '282'), '=', array('379', ' ', '282'), array('312', '$userData', '282'), ';', array('379', ' ', '282'), array('334', 'break', '283'), ';', array('379', ' ', '283'), '}', array('379', ' ', '284'), array('306', 'else', '284'), array('379', ' ', '284'), array('304', 'if', '284'), array('379', ' ', '284'), '(', array('312', '$connection', '284'), '[', array('318', ''id_user_confirmer'', '284'), ']', array('379', ' ', '284'), array('283', '===', '284'), array('379', ' ', '284'), array('312', '$reqUser', '284'), array('363', '->', '284'), array('310', 'getUserid', '284'), '(', ')', array('379', ' ', '284'), array('281', '&&', '284'), array('379', ' ', '284'), array('312', '$connection', '284'), '[', array('318', ''id_user_requester'', '284'), ']', array('379', ' ', '284'), array('283', '===', '284'), array('379', ' ', '284'), array('312', '$user', '284'), array('363', '->', '284'), array('310', 'getUserid', '284'), '(', ')', ')', array('379', ' ', '284'), '{', array('379', ' ', '284'), array('312', '$userData', '285'), array('379', ' ', '285'), '=', array('379', ' ', '285'), array('312', '$user', '285'), array('363', '->', '285'), array('310', 'toArray', '285'), '(', ')', ';', array('379', ' ', '285'), array('354', 'unset', '286'), '(', array('312', '$userData', '286'), '[', array('318', ''password'', '286'), ']', ')', ';', array('379', ' ', '286'), array('354', 'unset', '287'), '(', array('312', '$userData', '287'), '[', array('318', ''token'', '287'), ']', ')', ';', array('379', ' ', '287'), array('312', '$usersResource', '289'), '[', ']', array('379', ' ', '289'), '=', array('379', ' ', '289'), array('312', '$userData', '289'), ';', array('379', ' ', '289'), array('334', 'break', '290'), ';', array('379', ' ', '290'), '}', array('379', ' ', '291'), '}', array('379', ' ', '292'), '}', array('379', ' ', '293'), '}', array('379', ' ', '294'), array('339', 'return', '296'), array('379', ' ', '296'), array('310', 'json_encode', '296'), '(', array('312', '$usersResource', '296'), ',', array('379', ' ', '296'), array('310', 'JSON_PRETTY_PRINT', '296'), ')', ';', array('379', ' ', '296'), '}', array('379', ' ', '297'), '}'), object(Context)) in StaticAnalyser.php line 33
at StaticAnalyser->fromFile('/var/www/helpa/app/Http/Controllers/UsersController.php') in functions.php line 41
at Swagger\scan('/var/www/helpa/app/Http', array('exclude' => array('/var/www/helpa/storage', '/var/www/helpa/tests', '/var/www/helpa/resources/views', '/var/www/helpa/config', '/var/www/helpa/vendor'))) in routes.php line 39
at SwaggervelServiceProvider->{closure}()
at call_user_func_array(object(Closure), array()) in Route.php line 155
at Route->runCallable(object(Request)) in Route.php line 130
at Route->run(object(Request)) in Router.php line 712
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Router.php line 714
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 679
at Router->dispatchToRoute(object(Request)) in Router.php line 639
at Router->dispatch(object(Request)) in Kernel.php line 236
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103
at Pipeline->then(object(Closure)) in Kernel.php line 122
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87
at Kernel->handle(object(Request)) in index.php line 54
at require_once('/var/www/helpa/public/index.php') in server.php line 21

Since the same code works on a different system it must be related to the environment. Any idea what could cause this?

@matthiasderosa
Copy link
Author

This was a Windows vs. Linux issue. It has to be SWG\Get (case-sensitive)

@bengen
Copy link

bengen commented Mar 25, 2016

@Swagger\Annotations\GET
modify:
@Swagger\Annotations\Get

@rottenoats
Copy link

@bengen worked great.

This was the error I was getting from doing a php bin/console cache:clear on my Symfony project:

[RuntimeException]
Case mismatch between loaded and declared class names: "Swagger\Annotations\GET" vs "Swagger\Annotations\Get"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants