{
  "id": "php/composer-require-conflict-version-constraint",
  "signature": "Your requirements could not be resolved to an installable set of packages.\n  Problem 1\n    - Root composer.json requires php ^8.0 but your php version (7.4.33) does not satisfy that requirement.",
  "signature_zh": "您的要求无法解析为可安装的软件包集合。问题 1 - 根 composer.json 要求 php ^8.0，但您的 php 版本 (7.4.33) 不满足该要求。",
  "regex": "Your requirements could not be resolved to an installable set of packages.*php version.*does not satisfy",
  "domain": "php",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The PHP version installed on the system is incompatible with the version constraint specified in composer.json, preventing package installation or update.",
  "root_cause_type": "generic",
  "root_cause_zh": "系统上安装的 PHP 版本与 composer.json 中指定的版本约束不兼容，阻止软件包安装或更新。",
  "versions": [
    {
      "version": "Composer 2.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "PHP 7.4.33",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "PHP 8.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Editing composer.json to remove the php version constraint entirely",
      "why_fails": "Composer may still require a minimum PHP version based on dependencies; removing the constraint can lead to runtime errors.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Running composer install --ignore-platform-reqs to bypass the check",
      "why_fails": "This installs packages that may not work on the current PHP version, causing fatal errors at runtime.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Upgrade PHP to a version that satisfies the constraint (e.g., from 7.4 to 8.0):\nsudo apt update && sudo apt install php8.0\nOr use a version manager like phpenv.",
      "success_rate": 0.95,
      "how": "Upgrade PHP to a version that satisfies the constraint (e.g., from 7.4 to 8.0):\nsudo apt update && sudo apt install php8.0\nOr use a version manager like phpenv.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If upgrading PHP is not possible, lower the php version constraint in composer.json to match the installed version (e.g., \"php\": \">=7.4\") and run composer update --with-dependencies. Note: This may cause dependency conflicts.",
      "success_rate": 0.8,
      "how": "If upgrading PHP is not possible, lower the php version constraint in composer.json to match the installed version (e.g., \"php\": \">=7.4\") and run composer update --with-dependencies. Note: This may cause dependency conflicts.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "将 PHP 升级到满足约束的版本（例如，从 7.4 升级到 8.0）：\nsudo apt update && sudo apt install php8.0\n或使用版本管理器如 phpenv。",
    "如果无法升级 PHP，降低 composer.json 中的 php 版本约束以匹配已安装的版本（例如 \"php\": \">=7.4\"），然后运行 composer update --with-dependencies。注意：可能导致依赖冲突。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://getcomposer.org/doc/04-schema.md#php",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.89,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-05-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}