Symfony2, composer, your PHP version (5.6.18) overriden by "config.platform.php" version (5.3.9) does not satisfy requirement

Asked
Active3 hr before
Viewed126 times

6 Answers

90%

Meta Stack Overflow ,Stack Overflow en español,Stack Overflow em Português, Stack Overflow Public questions & answers

Somewhere in your composer.json you have

"config": {
   "preferred-install": "dist",
   "platform": {
      "php": "5.3.9"
   }
}
load more v
88%

N [Solved] How to get the relational sub-components using query? Latest: nas 8 minutes ago Technology Forum , W [Solved] Postgresql how to convert insert value as parameters Latest: William 8 minutes ago Technology Forum , J [Solved] Probleme to connect Mongodb to the local server Latest: Julien Loubere 8 minutes ago Technology Forum

import {
   GeneralApiProblem
} from "./api-problem"
import {
   Character
} from "../../models/character/character"

export interface User {
   id: number
   name: string
}

export interface APIUser {
   success: boolean,
      message: null,
      data: UserData
}

export interface UserData {
   userId: string,
      organisationId: string,
      email: string,
      firstname: string,
      lastName: string,
      userToken: string,
      refreshToken: string
}

export type GetUsersResult = {
   kind: "ok";users: User[]
} | GeneralApiProblem
export type GetUserResult = {
   kind: "ok";user: User
} | GeneralApiProblem

export type GetCharactersResult = {
   kind: "ok";characters: Character[]
} | GeneralApiProblem
export type GetCharacterResult = {
   kind: "ok";character: Character
} | GeneralApiProblem

// Added 
export type PostLoginUserResult = {
   kind: "ok";apiUser: APIUser
} | GeneralApiProblem
load more v
72%

Version PHP: PHP 5.6.18,Le contenu de composer.json,Ce bloc remplace votre version actuelle PHP comme décrit dans doc compositeur .

Version PHP: PHP 5.6.18

PHP 5.6 .18(cli)(built: Feb 3 2016 17: 20: 21)
Copyright(c) 1997 - 2016 The PHP Group
Zend Engine v2 .6 .0, Copyright(c) 1998 - 2016 Zend Technologies
with Zend OPcache v7 .0 .6 - dev, Copyright(c) 1999 - 2016, by Zend Technologies

L'erreur: c ..> composer nécessite des doctrines/data-fixtures

Using version ^ 1.1
for doctrine / data - fixtures
   . / composer.json has been updated
Loading composer repositories with package information
Updating dependencies(including require - dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
   -
   doctrine / migrations v1 .3 .0 requires php ^ 5.5 | ^ 7.0 - > your PHP version(5.6 .18) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that re
quirement. -
   doctrine / migrations v1 .2 .2 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .2 .1 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .2 .0 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .1 .0 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .0 .0 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   Installation request
for doctrine / migrations~1.0 - > satisfiable by doctri
ne / migrations[v1 .0 .0, v1 .1 .0, v1 .2 .0, v1 .2 .1, v1 .2 .2, v1 .3 .0].

Installation failed, reverting. / composer.json to its original content.

Le contenu de composer.json

"require": {
   "php": ">=5.3.9",
   "symfony/symfony": "2.8.*",
   "doctrine/orm": "^2.4.8",
   "doctrine/doctrine-bundle": "~1.4",
   "doctrine/data-fixtures": "~1.1",
   "doctrine/doctrine-fixtures-bundle": "dev-master",
load more v
65%

PHP версия: PHP 5.6.18

PHP 5.6 .18(cli)(built: Feb 3 2016 17: 20: 21)
Copyright(c) 1997 - 2016 The PHP Group
Zend Engine v2 .6 .0, Copyright(c) 1998 - 2016 Zend Technologies
with Zend OPcache v7 .0 .6 - dev, Copyright(c) 1999 - 2016, by Zend Technologies

Ошибка: c..>композитор требует doctrine/data-fixtures

Using version ^ 1.1
for doctrine / data - fixtures
   . / composer.json has been updated
Loading composer repositories with package information
Updating dependencies(including require - dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
   -
   doctrine / migrations v1 .3 .0 requires php ^ 5.5 | ^ 7.0 - > your PHP version(5.6 .18) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that re
quirement. -
   doctrine / migrations v1 .2 .2 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .2 .1 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .2 .0 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .1 .0 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   doctrine / migrations v1 .0 .0 requires php >= 5.4 .0 - > your PHP version(5.6 .1 8) overriden by "config.platform.php"
version(5.3 .9) does not satisfy that requ
irement. -
   Installation request
for doctrine / migrations~1.0 - > satisfiable by doctri
ne / migrations[v1 .0 .0, v1 .1 .0, v1 .2 .0, v1 .2 .1, v1 .2 .2, v1 .3 .0].

Installation failed, reverting. / composer.json to its original content.

Содержание composer.json

"require": {
   "php": ">=5.3.9",
   "symfony/symfony": "2.8.*",
   "doctrine/orm": "^2.4.8",
   "doctrine/doctrine-bundle": "~1.4",
   "doctrine/data-fixtures": "~1.1",
   "doctrine/doctrine-fixtures-bundle": "dev-master",
load more v
75%

You serious ? what you mean by I am not entirely truthful ? If you are willing I will share screen to demonstrate . Environment is not broken we have 10+ laravel websites running on server (all below 5.5 version),Update Default php version in WHM to use latest php version . This works for me

cat composer.json {
   "name": "laravel/laravel",
   "description": "The Laravel Framework.",
   "keywords": ["framework", "laravel"],
   "license": "MIT",
   "type": "project",
   "require": {
      "php": ">=7.0.0",
      "barryvdh/laravel-debugbar": "^3.1",
      "fideloper/proxy": "~3.3",
      "laravel/framework": "5.5.*",
      "laravel/tinker": "~1.0"
   },
   "require-dev": {
      "filp/whoops": "~2.0",
      "fzaninotto/faker": "~1.4",
      "mockery/mockery": "~1.0",
      "phpunit/phpunit": "~6.0"
   },
   "autoload": {
      "classmap": [
         "database/seeds",
         "database/factories"
      ],
      "psr-4": {
         "App\\": "app/"
      }
   },
   "autoload-dev": {
      "psr-4": {
         "Tests\\": "tests/"
      }
   },
   "extra": {
      "laravel": {
         "dont-discover": []
      }
   },
   "scripts": {
      "post-root-package-install": [
         "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
      ],
      "post-create-project-cmd": [
         "@php artisan key:generate"
      ],
      "post-autoload-dump": [
         "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
         "@php artisan package:discover"
      ]
   },
   "config": {
      "preferred-install": "dist",
      "sort-packages": true,
      "optimize-autoloader": true
   }
}
load more v
40%

Answer #1:

I don't believe there's a default way of doing this. What you could do is to write your own service that adds a Filter to your Doctrine DQL queries.

Filter
load more v

Other "undefined-undefined" queries related to "Symfony2, composer, your PHP version (5.6.18) overriden by "config.platform.php" version (5.3.9) does not satisfy requirement"