Hi,

Welcome to Bagisto!

The syntax itself is correct, but that declaration (const int USER_ID = 1;) uses typed class constants, which are only supported in PHP 8.3 and later.

This error usually means your server is running an older PHP version (such as 8.2, 8.1, or below), so PHP doesn't recognize the int type before the constant name and throws the parse error.

You can verify your PHP version by running:

php -v

or by checking the output of phpinfo() if you're using a web server.

If you're using a PHP version below 8.3, please upgrade to PHP 8.3, as the current Bagisto version requires it.

Thanks
Aviral
Team Bagisto