antonioribeiro / support

Support Classes
BSD 3-Clause "New" or "Revised" License
59 stars 49 forks source link

isLaravel5 funciton is not visible #11

Closed eugensuvorov closed 7 years ago

eugensuvorov commented 7 years ago

You've already done these changes but it wasn't pushed to release

There is an error.

I think it's because the call of isLaravel5 is placed before it's declaration:

declaration on 1086 line

if ( ! function_exists( 'isLaravel5' ))
{
    _function isLaravel5()_
    {
        return Laravel::VERSION >= '5.0.0';
    }
   ...

and call on 927

if ( ! function_exists( 'csrf_token' ) && ! isLaravel5())

An error

$ php artisan optimaze                                                                                                                                                                              

Fatal error: Call to undefined function isLaravel5() in C:\OpenServer\domains\shaman-admin-api\vendor\pragmarx\support\src\helpers.php on line 927                                                  

Call Stack:                                                                                                                                                                                         
    0.0002     128976   1. {main}() C:\OpenServer\domains\shaman-admin-api\artisan:0                                                                                                                
    0.0004     131064   2. require('C:\OpenServer\domains\shaman-admin-api\bootstrap\autoload.php') C:\OpenServer\domains\shaman-admin-api\artisan:16                                               
    0.0006     132496   3. require('C:\OpenServer\domains\shaman-admin-api\vendor\autoload.php') C:\OpenServer\domains\shaman-admin-api\bootstrap\autoload.php:17                                   
    0.0008     145080   4. ComposerAutoloaderInit5e6695309826f98ddf2a06b49a4e09ac::getLoader() C:\OpenServer\domains\shaman-admin-api\vendor\autoload.php:7                                         
    0.0161    1593912   5. composerRequire5e6695309826f98ddf2a06b49a4e09ac() C:\OpenServer\domains\shaman-admin-api\vendor\composer\autoload_real.php:56                                            
    0.0174    1741464   6. require('C:\OpenServer\domains\shaman-admin-api\vendor\pragmarx\support\src\helpers.php') C:\OpenServer\domains\shaman-admin-api\vendor\composer\autoload_real.php:66    

Dump $_SERVER                                                                                                                                                                                       
   $_SERVER['REMOTE_ADDR'] is undefined                                                                                                                                                             
   $_SERVER['REQUEST_METHOD'] is undefined                                                                                                                                                          
Dump $_SESSION                                                                                                                                                                                      
   $_SESSION['*'] is undefined                                                                                                                                                                      
Dump $_REQUEST              
antonioribeiro commented 7 years ago

Sorry, done now.