You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Laravel-admin 1.8.19与Laravel 11.8.0是否不兼容?依赖安装失败

Laravel 11.8.0 安装 laravel-admin 失败问题解析

核心结论

encore/laravel-admin 确实与 Laravel 11.8.0 完全不兼容。该包的最新稳定版本(v1.8.x)仅支持到 Laravel 8.x,后续未针对 Laravel 9+ 版本做适配更新。你的项目使用的 Laravel 11 依赖 Symfony v7.0、Carbon v3.x 等新版本组件,与 laravel-admin 要求的旧版依赖存在严重冲突,导致 Composer 无法解析出可安装的包组合。

关键冲突点

从错误日志中可提取核心矛盾:

  • laravel-admin 所有版本对 Laravel 框架的依赖上限为 Laravel 8.x,而你的项目明确要求 Laravel ^11.0,直接版本冲突
  • laravel-admin 依赖的 doctrine/dbal 2.|3. 版本,与 Laravel 11 依赖的 symfony/http-foundation v7.0.7 存在兼容性问题
  • Laravel 11 使用的 nesbot/carbon 3.4.0 依赖 carbonphp/carbon-doctrine-types 3.2.0,该组件与 doctrine/dbal 部分版本冲突

可行解决方案

  1. 更换适配 Laravel 11 的后台管理包

    • Filament:功能全面的开源后台框架,完美支持 Laravel 11
    • Laravel Breeze + 自定义后台:适合轻量级需求,基于官方脚手架扩展
    • Nova:Laravel 官方付费后台包,集成度高
  2. 降级 Laravel 版本(不推荐)
    将项目 Laravel 版本降级到 8.x,可兼容 laravel-admin,但会丢失 Laravel 11 的新特性、性能优化及安全更新,仅适合维护旧项目场景

完整错误日志

astroid@Tatsunoris-MacBook-Pro wvs % composer require encore/laravel-admin
./composer.json has been updated
Running composer update encore/laravel-admin
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - encore/laravel-admin v1.1.6 requires laravel/framework 5.1.* -> found laravel/framework[v5.1.0, ..., v5.1.46] but it conflicts with your root composer.json require (^11.0).
    - encore/laravel-admin[v1.2.6, ..., v1.2.10] require laravel/framework 5.2.* -> found laravel/framework[v5.2.0, ..., v5.2.45] but it conflicts with your root composer.json require (^11.0).
    - encore/laravel-admin[v1.3.3, ..., v1.3.4] require laravel/framework 5.3.* -> found laravel/framework[v5.3.0, ..., v5.3.31] but it conflicts with your root composer.json require (^11.0).
    - encore/laravel-admin[v1.4.1, ..., v1.4.6] require laravel/framework 5.4.* -> found laravel/framework[v5.4.0, ..., v5.4.36] but it conflicts with your root composer.json require (^11.0).
    - encore/laravel-admin[v1.5.5, ..., v1.7.6] require laravel/framework ~5.5 -> found laravel/framework[v5.5.0, ..., v5.8.38] but it conflicts with your root composer.json require (^11.0).
    - encore/laravel-admin[v1.7.7, ..., v1.7.9] require laravel/framework ~5.5|~6.0 -> found laravel/framework[v5.5.0, ..., v5.8.38, v6.0.0, ..., v6.20.44] but it conflicts with your root composer.json require (^11.0).
    - doctrine/common[v2.4.0, ..., v2.5.3] require doctrine/inflector 1.* -> found doctrine/inflector[v1.0, ..., 1.4.4] but the package is fixed to 2.0.10 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - doctrine/common[v2.6.0, ..., v2.6.2] require php ~5.5|~7.0 -> your php version (8.2.17) does not satisfy that requirement.
    - doctrine/common[v2.7.0, ..., v2.7.3] require php ~5.6|~7.0 -> your php version (8.2.17) does not satisfy that requirement.
    - doctrine/common[v2.8.0, ..., v2.8.1] require php ~7.1 -> your php version (8.2.17) does not satisfy that requirement.
    - doctrine/common[v2.9.0, ..., 2.13.0] require php ^7.1 -> your php version (8.2.17) does not satisfy that requirement.
    - doctrine/dbal[v2.6.0, ..., v2.9.3] require php ^7.1 -> your php version (8.2.17) does not satisfy that requirement.
    - doctrine/common[2.13.1, ..., 2.13.3] require doctrine/inflector ^1.0 -> found doctrine/inflector[v1.0, ..., 1.4.4] but the package is fixed to 2.0.10 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - doctrine/dbal[v2.10.0, ..., 2.10.4] require php ^7.2 -> your php version (8.2.17) does not satisfy that requirement.
    - doctrine/dbal[2.11.0, ..., 2.11.3] require php ^7.3 -> your php version (8.2.17) does not satisfy that requirement.
    - carbonphp/carbon-doctrine-types 3.2.0 conflicts with doctrine/dbal 3.8.4.
    - encore/laravel-admin[v1.7.11, ..., v1.8.14] require doctrine/dbal 2.* -> satisfiable by doctrine/dbal[2.1.5, ..., 2.13.9].
    - nesbot/carbon 3.4.0 requires carbonphp/carbon-doctrine-types * -> satisfiable by carbonphp/carbon-doctrine-types[3.2.0].
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.5.4.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.4.6.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.3.8.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.3.5.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.2.2.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.1.5.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.1.0.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 3.0.0.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.13.9.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.13.8.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.13.1.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.12.1.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.3.5.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.3.2.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.2.2.
    - symfony/http-foundation v7.0.7 conflicts with doctrine/dbal 2.1.7.
    - laravel/framework v11.8.0 requires nesbot/carbon ^2.72.2|^3.0 -> satisfiable by nesbot/carbon[3.4.0].
    - laravel/framework v11.8.0 requires symfony/http-foundation ^7.0 -> satisfiable by symfony/http-foundation[v7.0.7].
    - doctrine/dbal[v2.5.0, ..., v2.5.2] require doctrine/common >=2.4,<2.6-dev -> satisfiable by doctrine/common[v2.4.0, ..., v2.5.3].
    - doctrine/dbal[v2.5.3, ..., v2.5.5] require doctrine/common >=2.4,<2.7-dev -> satisfiable by doctrine/common[v2.4.0, ..., v2.6.2].
    - doctrine/dbal[v2.5.6, ..., v2.5.13] require doctrine/common >=2.4,<2.8-dev -> satisfiable by doctrine/common[v2.4.0, ..., v2.7.3].
    - doctrine/dbal[v2.4.0, ..., v2.4.5] require doctrine/common ~2.4 -> satisfiable by doctrine/common[v2.4.0, ..., 2.13.3].
    - laravel/framework is locked to version v11.8.0 and an update of this package was not requested.
    - encore/laravel-admin[v1.8.15, ..., v1.8.19] require doctrine/dbal 2.*|3.* -> satisfiable by doctrine/dbal[2.1.5, ..., 2.13.9, 3.0.0, ..., 3.8.4].
    - Root composer.json requires encore/laravel-admin * -> satisfiable by encore/laravel-admin[v1.1.6, ..., v1.8.19].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require encore/laravel-admin:*" to figure out if any version is installable, or "composer require encore/laravel-admin:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

内容的提问来源于stack exchange,提问作者Tatsunori Ono

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.23 09:14:54