Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer update error with Laravel 5 - 'PHPExcel_Shared_Font' not found

I needed to customize a package I found on packagist, so I cloned the repo on github and updated my composer.json file to get the dependency from there instead.

Now when I run composer update I get the following:

[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:\Users\Tim\Code\Laravel\config\excel.php on line 174
PHP Fatal error:  Class 'PHPExcel_Shared_Font' not found in C:\Users\Tim\Code\Laravel\config\excel.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:\Users\Tim\Code\Laravel\config\excel.php on line 174

I reveresed the change, and ran `composer update' again and get the following message:

[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

Does anyone know where I've gone wrong?

like image 892
TimothyBuktu Avatar asked Aug 01 '15 10:08

TimothyBuktu


2 Answers

delete config/excel.php and re-publish it. php artisan vendor:publish --provider=Maatwebsite\Excel\ExcelServiceProvider

like image 52
mm Xl Avatar answered Oct 24 '22 02:10

mm Xl


As per your own comment @TimothyBuktu, serverfireteam/blog requires laravel 5.1.

You'll want to lock the version of serverfireteam/blog to dev-master#c0039d3ade67503d674093f3a56d7b1540ae958d in your composer.json, which is the last commit before the requirement of laravel was bumped to 5.1

Alternatively if you still want to receive updates for the package, you'll need to update your application to laravel 5.1. http://laravel.com/docs/5.1/upgrade

like image 3
Wader Avatar answered Oct 24 '22 00:10

Wader