Closed jasin closed 10 years ago
I have the exact same problem apart from the line 295 is listed as line 308 but the code looks exactly the same.
Done "php composer.phar update" and getting the same error but this time it says it is line 310 which is again the same line as above that is listed as 295 and is the same function allFallthroughRoute
Have you installed phpcomplete-extended-laravel plugin?
Yes, both phpcomplete-extended and phpcomplete-extended-laravel were installed today
Hmm, at first glance, it seems to be a problem is related to route filter. I am trying to reproduce the error here.
I could not reproduce the error. Can you list the route declarations of app/routes.php
by issuing :g/Route::/p
and paste the output here. It would be helpful if you list which plugins are you using. Also the problem is occurring during bootstrapping the framework. Does the project works correctly in browser?
I do have filters in UserController and AdminController. They make sure the user is logged in and have the proper authorization before they can access the page. Would it help to see the filter.php as well? Yes, the webpage works. it is a work in progress but you can access it at laravel.coleburt.com and see the filters in action for yourself.
:g/Route::/p
Route::get('/', function()
Route::get('test', function() {
Route::get('logout', function() {
Route::get('user/index', array('as' => 'home', 'uses' => 'UserController@getIndex'));
Route::get('user/predictions', array('as' => 'predictions', 'uses' => 'UserController@getPredictions'));
Route::get('admin/index', array('as' => 'admin', 'uses' => 'AdminController@getIndex'));
Route::get('admin/managedb', array('as' => 'managedb', function(){ return View::make('admin.managedb')->withTitle('manage database'); }));
Route::post('admin/season', array('before' => 'csrf|admin', 'uses' => 'AdminController@postSeason'));
Route::controller('login', 'LoginController');
Route::controller('admin', 'AdminController');
Route::controller('user', 'UserController');
Route::post('test', array('before' => 'csrf', 'uses' => 'TestController@test'));
and what plugins exactly are you talking about? Vim plugins
" My bundles here:
Bundle 'captbaritone/better-indent-support-for-php-with-html'
Bundle 'Shougo/vimproc'
Bundle 'Shougo/unite.vim'
Bundle 'm2mdas/phpcomplete-extended'
Bundle 'm2mdas/phpcomplete-extended-laravel'
Bundle 'm2mdas/phpcomplete-extended-symfony'
" original repos on GitHub
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Bundle 'tpope/vim-rails.git'
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'HTML5-Syntax-File'
" non-GitHub repos
"Bundle 'git://git.wincent.com/command-t.git'
Bundle 'git://github.com/othree/html5-syntax.vim.git'
" Git repos on your local machine (i.e. when working on your own plugin)
"Bundle 'file:///Users/gmarik/path/to/plugin'
" ...
Well I actually meant Laravel bundles. But that wouldn't be necessary as the problem is elsewhere. The problem was not handling of Route::controller()
route declaration. I normally used Route::resource()
for resource controllers, thats why I forgot to handle Route::controller()
:). I fixed the issue. Please update phpcomplete-extended-laravel
and run :PHPCompleteExtendedGenerateIndex
.
P.S, a disclaimer. I last worked on a Laravel project 4 months ago with limited set of bundles. In the meantime Laravel 4.1 is released. There may be a possibility of occurring index generating error. If you face any error don't hesitate to file bug report. I will try to fix the error as soon as I can.
Yes, that fixed the issue, index generates now with no errors. Thanks for the speedy fixes.
I can confirm it is working for me as well, thank you as well for the fast fix!
code that phpcomplete-extended is complaining about
I am using laravel 4.0