mardi 28 août 2018

Laravel fatal error after git pull

I am running composer.json in laravel and I am getting following error:

Problem 1
    - Installation request for doctrine/inflector v1.3.0 -> satisfiable by doctrine/inflector[v1.3.0].
    - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (5.6.35) does not satisfy that requirement.
  Problem 2
    - Installation request for symfony/event-dispatcher v4.0.4 -> satisfiable by symfony/event-dispatcher[v4.0.4].
    - symfony/event-dispatcher v4.0.4 requires php ^7.1.3 -> your PHP version (5.6.35) does not satisfy that requirement.
  Problem 3
    - Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
    - doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (5.6.35) does not satisfy that requirement.
  Problem 4
    - Installation request for phpdocumentor/reflection-docblock 4.3.0 -> satisfiable by phpdocumentor/reflection-docblock[4.3.0].
    - phpdocumentor/reflection-docblock 4.3.0 requires php ^7.0 -> your PHP version (5.6.35) does not satisfy that requirement.
  Problem 5
    - Installation request for phpunit/php-token-stream 2.0.2 -> satisfiable by phpunit/php-token-stream[2.0.2].
    - phpunit/php-token-stream 2.0.2 requires php ^7.0 -> your PHP version (5.6.35) does not satisfy that requirement.
  Problem 6
    - Installation request for symfony/yaml v4.0.4 -> satisfiable by symfony/yaml[v4.0.4].
    - symfony/yaml v4.0.4 requires php ^7.1.3 -> your PHP version (5.6.35) does not satisfy that requirement.
  Problem 7
    - doctrine/inflector v1.3.0 requires php ^7.1 -> your PHP version (5.6.35) does not satisfy that requirement.
    - laravel/framework v5.4.36 requires doctrine/inflector ~1.1 -> satisfiable by doctrine/inflector[v1.3.0].
    - Installation request for laravel/framework v5.4.36 -> satisfiable by laravel/framework[v5.4.36].

I understand its happening due to version difference in localhost and server. On localhost its php 7.0 and in server its php 5.6

My composer.json file is:

{
    "name": "florientr/laravel-gentelella",
    "description": "The Laravel 5.4 framework with Gentelella template",
    "keywords": [
      "framework",
      "laravel",
      "laravel 5.4",
      "gentelella",
      "laravel-gentelella",
      "template",
      "bootstrap",
      "responsive",
      "admin",
      "php",
      "html",
      "css",
      "taggable",
      "gravatar",
      "form html"
    ],
    "license": "MIT",
    "version": "4.2.0",
    "type": "project",
    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.*",
        "thomaswelton/laravel-gravatar": "~1.0",
        "rtconner/laravel-tagging": "~2.2",
        "laravelcollective/html": "^5.4",
        "cartalyst/sentinel": "2.0.*",
        "laracasts/flash": "^2.0",
        "unisharp/laravel-ckeditor": "^4.6",
        "maatwebsite/excel": "~2.1.0"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7",
        "symfony/css-selector": "3.1.*",
        "symfony/dom-crawler": "3.1.*"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }, 
        "files": [
            "app/Helpers/helpers.php"
        ]  
    },
    "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"
    }
}

The problem is that I cannot upgrade my server as it will break other sites. How can i resolve it without upgrading the php version.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire