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

Trailing comma in function calls #34234

Closed
wants to merge 10 commits into from
Closed

Trailing comma in function calls #34234

wants to merge 10 commits into from

Conversation

mohamedziada
Copy link

@mohamedziada mohamedziada commented Sep 9, 2020

Log file

[2020-09-09 17:06:14] local.ERROR: syntax error, unexpected ')' {
"exception":"[object] (ParseError(code: 0): syntax error, unexpected ')'
at /var/www/laravel8/vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php:51)
[stacktrace]
#0 /var/www/laravel8/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/larave...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Illuminate\\Bus\\...')
#2 /var/www/laravel8/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(761): spl_autoload_call('Illuminate\\Bus\\...')
#3 /var/www/laravel8/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(741): Illuminate\Foundation\Application->registerDeferredProvider('Illuminate\\Bus\\...', 'Illuminate\\Bus\\...')
#4 /var/www/laravel8/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(717): Illuminate\Foundation\Application->loadDeferredProvider('Illuminate\\Bus\\...')
#5 /var/www/laravel8/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(313): Illuminate\Foundation\Application->loadDeferredProviders()
#6 /var/www/laravel8/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#7 Command line code(1): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 {main}
"}


On line 50 at vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php
there is "," more

protected function registerBatchServices()
{
$this->app->singleton(BatchRepository::class, DatabaseBatchRepository::class);

    $this->app->singleton(DatabaseBatchRepository::class, function ($app) {
        return new DatabaseBatchRepository(
            $app->make(BatchFactory::class),
            $app->make('db')->connection(config('queue.batching.database')),
            config('queue.batching.table', 'job_batches'),
        );
    });
}

@mohamedziada mohamedziada changed the title Master Trailing comma in function calls Sep 9, 2020
@ayoub-bousetta
Copy link

Still not pushed i guess

@rajkeshwar
Copy link

Yes got it working after removing the extra , ie at line no 50 config('queue.batching.table', 'job_batches')

@StephanDisberg
Copy link

I faced the same issue due to cron command for laravel scheduler pointing to the wrong php version folder (provider requires adding the full path to the php folder version: /opt/alt/php73/usr/bin/php ). Then the issue occurs even though the php (including cli) version is 7.3 or above. I know, this is of course very specific, depending on provider/environment requirements and user input.

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

Successfully merging this pull request may close these issues.

9 participants