Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mr.jessop's avatar

PHP Parse error: syntax error, unexpected '.' in /var/www/vendor/illuminate/support/Facades/Facade.php on line 52

vagrant@corebox:/var/www$ php artisan migrate
PHP Parse error:  syntax error, unexpected '.' in /var/www/vendor/illuminate/support/Facades/Facade.php on line 52
PHP Stack trace:
PHP   1. {main}() /var/www/artisan:0
PHP   2. Laravel\Lumen\Application->make() /var/www/artisan:33
PHP   3. Illuminate\Container\Container->make() /var/www/vendor/laravel/lumen-framework/src/Application.php:208
PHP   4. Illuminate\Container\Container->build() /var/www/vendor/illuminate/container/Container.php:565
PHP   5. Illuminate\Container\Container->Illuminate\Container{closure}() /var/www/vendor/illuminate/container/Container.php:678
PHP   6. Laravel\Lumen\Application->make() /var/www/vendor/illuminate/container/Container.php:239
PHP   7. Illuminate\Container\Container->make() /var/www/vendor/laravel/lumen-framework/src/Application.php:208
PHP   8. Illuminate\Container\Container->build() /var/www/vendor/illuminate/container/Container.php:565
PHP   9. ReflectionClass->newInstanceArgs() /var/www/vendor/illuminate/container/Container.php:714
PHP  10. Laravel\Lumen\Console\Kernel->__construct() /var/www/vendor/illuminate/container/Container.php:714
PHP  11. Laravel\Lumen\Application->prepareForConsoleCommand() /var/www/vendor/laravel/lumen-framework/src/Console/Kernel.php:55
PHP  12. Laravel\Lumen\Application->withFacades() /var/www/vendor/laravel/lumen-framework/src/Application.php:756
PHP  13. spl_autoload_call() /var/www/vendor/laravel/lumen-framework/src/Application.php:617
PHP  14. Composer\Autoload\ClassLoader->loadClass() /var/www/vendor/laravel/lumen-framework/src/Application.php:0
PHP  15. Composer\Autoload\includeFile() /var/www/vendor/composer/ClassLoader.php:301

I am currently getting this in my newly installed lumen app and I would like to know how to fix this issue.

0 likes
5 replies
Indemnity83's avatar

Have you tried removing the vendor folder and re-installing composer dependencies?

rm -rf vendor/*
composer install
michaelnguyen547's avatar

I just setup a new lumen application with

lumen new lumen_blog

updated the env file and run migration fine with no errors.

what does your migration code look like ?

mr.jessop's avatar
/**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function(Blueprint $up){
            $up->increments('id');
            $up->string('email')->unique();
            $up->string('username')->unique();
            $up->string('password', 60);
            $up->rememberToken();
            $up->nullabletimestamps();
        });
    }
arnabrahman's avatar

Last week faced this same problem. It was working fine in localhost but not working in server. Problem was that server was not recognizing Variable-length argument lists.

Please or to participate in this conversation.