Laravel 5 的作曲家更新错误 - 未找到'PHPExcel_Shared_Font'



我需要自定义我在packagist上找到的一个包,所以我克隆了github上的repo并更新了我的composer.json文件以从那里获得依赖项。

现在,当我运行composer update时,我得到以下内容:

[4.5MB/0.34s] Loading composer repositories with package information
[4.8MB/1.57s] Updating dependencies (including require-dev)
[248.7MB/16.88s]   - Removing serverfireteam/blog (master)
[113.1MB/17.54s] Writing lock file
[113.1MB/17.55s] Generating autoload files
Fatal error: Class 'PHPExcel_Shared_Font' not found in C:UsersTimCodeLaravelconfigexcel.php on line 174
PHP Fatal error:  Class 'PHPExcel_Shared_Font' not found in C:UsersTimCodeLaravelconfigexcel.php on line 174
[113.4MB/18.22s] Script php artisan clear-compiled handling the post-update-cmd event returned with an error

  [RuntimeException]
  Error Output: PHP Fatal error:  Class 'PHPExcel_Shared_Font' not found in C:UsersTimCodeLaravelconfigexcel.php on line 174

我撤消了更改,并再次运行' composer update'并得到以下消息:

[4.4MB/0.33s] Loading composer repositories with package information
[4.7MB/1.48s] Updating dependencies (including require-dev)
[258.9MB/15.11s] Your requirements could not be resolved to an installable set of packages.
[258.9MB/15.11s]
  Problem 1
    - Conclusion: remove laravel/framework v5.0.33
    - Conclusion: don't install laravel/framework v5.0.33
    - Conclusion: don't install laravel/framework v5.0.32
    - Conclusion: don't install laravel/framework v5.0.31
    - Conclusion: don't install laravel/framework 5.0.30
    - Conclusion: don't install laravel/framework v5.0.29
    - Conclusion: don't install laravel/framework v5.0.28
    - Conclusion: don't install laravel/framework v5.0.27
    - Conclusion: don't install laravel/framework v5.0.26
    - Conclusion: don't install laravel/framework v5.0.25
    - Conclusion: don't install laravel/framework v5.0.24
    - Conclusion: don't install laravel/framework v5.0.23
    - Conclusion: don't install laravel/framework v5.0.22
    - Conclusion: don't install laravel/framework v5.0.21
    - Conclusion: don't install laravel/framework v5.0.20
    - Conclusion: don't install laravel/framework v5.0.19
    - Conclusion: don't install laravel/framework v5.0.18
    - Conclusion: don't install laravel/framework v5.0.17
    - Conclusion: don't install laravel/framework v5.0.16
    - Conclusion: don't install laravel/framework v5.0.15
    - Conclusion: don't install laravel/framework v5.0.14
    - Conclusion: don't install laravel/framework v5.0.13
    - Conclusion: don't install laravel/framework v5.0.12
    - Conclusion: don't install laravel/framework v5.0.11
    - Conclusion: don't install laravel/framework v5.0.10
    - Conclusion: don't install laravel/framework v5.0.9
    - Conclusion: don't install laravel/framework v5.0.8
    - Conclusion: don't install laravel/framework v5.0.7
    - Conclusion: don't install laravel/framework v5.0.6
    - Conclusion: don't install laravel/framework v5.0.5
    - Conclusion: don't install laravel/framework v5.0.4
    - Conclusion: don't install laravel/framework v5.0.3
    - Conclusion: don't install laravel/framework v5.0.2
    - Conclusion: don't install laravel/framework v5.0.1
    - serverfireteam/blog master requires illuminate/support ~5.1 -> satisfiable by illuminate/support[v5.1.1, v5.1.2, v5.1.6, v5.1.8].
    - serverfireteam/blog dev-master requires illuminate/support ~5.1 -> satisfiable by illuminate/support[v5.1.1, v5.1.2, v5.1.6, v5.1.8].
    - don't install illuminate/support v5.1.1|don't install laravel/framework v5.0.0
    - don't install illuminate/support v5.1.2|don't install laravel/framework v5.0.0
    - don't install illuminate/support v5.1.6|don't install laravel/framework v5.0.0
    - don't install illuminate/support v5.1.8|don't install laravel/framework v5.0.0
    - Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[5.0.30, v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.12, v5.0.13, v5.0.14, v5.0.15, v5.0.16, v5.0.17, v5.0.18, v5.0.19, v5.0.2, v5.0.20, v5.0.21, v5.0.22, v5.0.23, v5.0.24, v5.0.25, v5.0.26, v5.0.27, v5.0.28, v5.0.29, v5.0.3, v5.0.31, v5.0.32, v5.0.33, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9].
    - Installation request for serverfireteam/blog dev-master -> satisfiable by serverfireteam/blog[master].
[113.9MB/15.48s] Memory usage: 113.9MB (peak: 259.06MB), time: 15.48s
有谁知道我哪里做错了吗?

删除config/excel.php并重新发布。php artisan vendor:publish --provider=MaatwebsiteExcelExcelServiceProvider

根据你自己的评论@TimothyBuktu, serverfireteam/blog需要laravel 5.1。

你需要在composer.json中锁定serverfireteam/blog的版本到dev-master#c0039d3ade67503d674093f3a56d7b1540ae958d,这是在laravel的要求被跳到5.1之前的最后一次提交

或者,如果你仍然想接收包的更新,你需要将你的应用程序更新到laravel 5.1。http://laravel.com/docs/5.1/upgrade

mm Xl的回答太棒了!

但在3.1版本(包括在内)之后,命令更改为以下命令:

php artisan vendor:publish --provider="MaatwebsiteExcelExcelServiceProvider" --tag=config

在文档中查看此部分:https://github.com/Maatwebsite/laravel-excel-docs/blob/develop/3.1/getting-started/installation.md

相关内容

  • 没有找到相关文章

最新更新