Composer在Eloquent Classes中添加...

I install Laravels Eloquent outside the laravel enviroment like so...

"require": {
    "php": "^5.6 || ~7.0.0 || ~7.1.0",
    "ext-gd": "*",
    "ext-mbstring": "*",
    "psr/log": "^1.0",
    "setasign/fpdi": "1.6.*",
    "illuminate/database": "*"
},

Then I did composer install

It works great locally but when I put it on the server I get a error

syntax error, unexpected '.'

For some reason when the classes were imported, they were imported with alot of classes looking like this

public function __call($method, $parameters)
{
    if (in_array($method, ['increment', 'decrement'])) {
        return $this->$method(...$parameters);
    }

    return $this->newQuery()->$method(...$parameters);
}

They add ... to alot of the magic method calls. Nothing breaks on my machine locally but the server does not like this. what is up with this ??

if I remove them then the ORM stops working altogether

The ... or the splat operator was introduced in PHP 5.6. The server probably has an older version of PHP.

PHP 5.6 "new features" notes.

EDIT:

To further answer your question, Eloquent 5.2.* only required PHP >= 5.5.9, so you should be able to use the latest 5.2 release.