Ambiguous class resolution in laravel phpexcel update

北战南征 提交于 2019-12-05 01:33:14

This actually has nothing to do with the package you are installing.

Explanation

When recreating the autoload files (composer dump-autoload) after the update Composer detected that you have two classes with the exact same name (but in different files).

Class SettingsController in SettingsController.php and SettingsControllerBackup.php

and class ClassModel in ClassModel.php and LoginModel.php

Composer will then choose to use one of the two (I'm not sure how it makes that decision, it's probably just the first one it finds) and will ignore the other occurrence.

Solutions

  1. Delete the files if you don't need them
  2. Rename the class

A good and common practice is to name the class like the file. This is a simple way to avoid such collisions because two files in the same directory can't have the same name.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!