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

Composer fails to finish #92

Closed
parkervcp opened this issue Sep 26, 2016 · 2 comments · Fixed by #93
Closed

Composer fails to finish #92

parkervcp opened this issue Sep 26, 2016 · 2 comments · Fixed by #93
Labels
bug Something that's not working as it's intended to be.
Milestone

Comments

@parkervcp
Copy link
Member

parkervcp commented Sep 26, 2016

while running composer setup

composer setup
> composer install --ansi --no-dev

Error

> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
PHP Parse error:  syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /var/lib/nginx/html/app/Console/Commands/RunTasks.php on line 70


  [Symfony\Component\Debug\Exception\FatalErrorException]
  syntax error, unexpected '->' (T_OBJECT_OPERATOR)


Script php artisan optimize handling the post-update-cmd event returned with error code 255
Script composer install --ansi --no-dev handling the setup event returned with error code 255

On Alpine Linux 3.4

php -v
PHP 5.6.26 (cli) (built: Sep 23 2016 14:47:01)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
@parkervcp
Copy link
Member Author

parkervcp commented Sep 26, 2016

Confirmed on CentOS with 5.6.26

> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
PHP Parse error:  syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /var/www/html/app/Console/Commands/RunTasks.php on line 70


  [Symfony\Component\Debug\Exception\FatalErrorException]
  syntax error, unexpected '->' (T_OBJECT_OPERATOR)


Script php artisan optimize handling the post-update-cmd event returned with error code 255
Script composer install --ansi --no-dev handling the setup event returned with error code 255
[root@22ea4694a553 html]# uname -a
Linux 22ea4694a553 4.7.3-1.el7.elrepo.x86_64 #1 SMP Wed Sep 7 13:19:00 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@22ea4694a553 html]# cat /etc/r
rc.d/           rc0.d/          rc2.d/          rc4.d/          rc6.d/          resolv.conf     rpm/
rc.local        rc1.d/          rc3.d/          rc5.d/          redhat-release  rpc             rsyslog.d/
[root@22ea4694a553 html]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

@schrej
Copy link
Member

schrej commented Sep 26, 2016

This can be fixed by removing the unnecessary brackets around Carbon::now() in the file mentioned in the error output (this worked for me yesterday at least).

Just change line 70 in app/Console/Commands/RunTasks.php from

$tasks = Models\Task::where('queued', 0)->where('active', 1)->where('next_run', '<=', (Carbon::now())->toAtomString())->get();

to

$tasks = Models\Task::where('queued', 0)->where('active', 1)->where('next_run', '<=', Carbon::now()->toAtomString())->get();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as it's intended to be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants