Syntax error after deploying

Hi there! I currently use Vercel for my application and recently I’m trying out fly. I know my app already works in production. My laravel app gets this very weird error after the deploy where it’s a syntax error, the error is currently coming from my trusted proxy middleware as shown here:


in [/var/www/html/app/Http/Middleware/**TrustProxies.php** ]( 15)

10. `    /**`
11. `     * The trusted proxies for this application.`
12. `     *`
13. `     * @var array|string|null`
14. `     */`
15. `    protected $proxies = "*" = '*';`

When I got and actually check my trusted proxies middleware its just the normal

    protected $proxies = '*';

I’ve never seen something like this and would love some help if it’s possible. PHP 8.1

Found it!

If you are experiencing this same issue, fly’s docker file will automatically try to add this into your trusted proxies. You will need to either remove it or remove it from the docker file.

Docker file → line 26 && sed -i 's/protected \$proxies/protected \$proxies = "*"/g' app/Http/Middleware/TrustProxies.php \

This should definitely be documented or some sort of warning in the fly docs for laravel tutorial.