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

eriktobben's avatar

Can't deploy Forge site

Hi,

I was deploying my site via Forge and introduced a syntax error in the console kernel.

I fixed the error, pushed the code and tried to deploy again, but then I get this error:

PHP Parse error:  syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/forge/domain.com/app/Console/Kernel.php on line 33

Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /home/forge/domain.com/app/Console/Kernel.php on line 33

I am not able to deploy the code because of this error.

What would cause the deploy script to fail because of a syntax error in the PHP code?

0 likes
1 reply
eriktobben's avatar
eriktobben
OP
Best Answer
Level 8

I figured it out.

I removed everything from the Deploy Script except "git pull origin master" and it seems that the "php artisan backup:run" is the one causing trouble.

Please or to participate in this conversation.