1
I went to try to install a dependency: https://github.com/barryvdh/laravel-dompdf . But at the end of the installation, an error message appeared:
Installation failed, reverting ./composer.json to its original content.
now no command php artisan algo
works, this error presents:
[Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected ')'
I also tried to remove the folder vendor
and install again. Here is another error shown:
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
[Symfony\Component\Debug\Exception\FatalErrorException]
syntax error, unexpected ')'
Script php artisan optimize handling the post-install-cmd event returned with error code 255
Man composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database",
"app/Libraries/Classes",
"app/Libraries/Classes/HTML",
"app/Libraries/Classes/Script"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
This usually happens because of code errors you already have in the Windows app. I wonder if you can run the site normally???
– novic
Yeah, it’s probably some mistake in your /app, in order to be able to figure out exactly what it is would need all trace of the error, in case it is not being rendered try to look in the logs and post here.
– Kenny Rafael
What version of PHP is being used? Run a
php -v
to let people know...– Wallace Maxters