Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Class \"Maatwebsite\\Excel\\Facades\\Excel\" not found on Laravel 11 #4268

Open
1 task done
codeOraaange opened this issue Feb 8, 2025 · 6 comments
Open
1 task done
Labels

Comments

@codeOraaange
Copy link

Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?

  • Yes, it's still reproducable

What version of Laravel Excel are you using?

^3.1 | 3.1.x-dev

What version of Laravel are you using?

^11.9

What version of PHP are you using?

^8.2

Describe your issue

I have tried installing composer require maatwebsite/excel to composer require maatwebsite/excel ^3.1 or composer require maatwebsite/excel 3.1.x-dev (include --with-all-dependencies too) but it still doesn't work.
Also added manual providers and aliases on config/app.php file still error.

How can the issue be reproduced?

And run command composer show maatwebsite/excel, show:

requires
composer/semver ^3.3
ext-json *
illuminate/support 5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
php ^7.0||^8.0
phpoffice/phpspreadsheet ^1.29.9
psr/simple-cache ^1.0||^2.0||^3.0

requires (dev)
laravel/scout ^7.0||^8.0||^9.0||^10.0
orchestra/testbench ^6.0||^7.0||^8.0||^9.0
predis/predis ^1.1

What should be the expected behaviour?

It looks like this package is not yet compatible with Laravel 11 because the lts from composer show is laravel/scout ^10.0, can anyone help?

@shamimbdpro
Copy link

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.2.27) does not satisfy that requirement.
- maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[1.15.0, ..., 1.29.10].
- maatwebsite/excel 3.1.27 requires phpoffice/phpspreadsheet ^1.16 -> satisfiable by phpoffice/phpspreadsheet[1.16.0, ..., 1.29.10].
- maatwebsite/excel[3.1.28, ..., 3.1.30] require phpoffice/phpspreadsheet 1.16.* -> satisfiable by phpoffice/phpspreadsheet[1.16.0].
- maatwebsite/excel[3.1.31, ..., 3.1.56] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, ..., 1.29.10].
- maatwebsite/excel[3.1.57, ..., 3.1.58] require phpoffice/phpspreadsheet ^1.29.1 -> satisfiable by phpoffice/phpspreadsheet[1.29.1, ..., 1.29.10].
- maatwebsite/excel 3.1.59 requires phpoffice/phpspreadsheet ^1.29.2 -> satisfiable by phpoffice/phpspreadsheet[1.29.2, ..., 1.29.10].
- maatwebsite/excel[3.1.60, ..., 3.1.61] require phpoffice/phpspreadsheet ^1.29.4 -> satisfiable by phpoffice/phpspreadsheet[1.29.4, ..., 1.29.10].
- maatwebsite/excel 3.1.62 requires phpoffice/phpspreadsheet ^1.29.7 -> satisfiable by phpoffice/phpspreadsheet[1.29.7, 1.29.8, 1.29.9, 1.29.10].
- maatwebsite/excel 3.1.x-dev requires phpoffice/phpspreadsheet ^1.29.9 -> satisfiable by phpoffice/phpspreadsheet[1.29.9, 1.29.10].
- phpoffice/phpspreadsheet[1.15.0, ..., 1.29.10] require ext-zip * -> it is missing from your system. Install or enable PHP's zip extension.

  Alternatively you can require one of these packages that provide the extension (or parts of it):
  - badpixxel/paddock Just The Paddock Project

##same issue here

@patrickbrouwers
Copy link
Member

Please read the output of composer:

phpoffice/phpspreadsheet[1.15.0, ..., 1.29.10] require ext-zip * -> it is missing from your system. Install or enable PHP's zip extension.

@SvetoslavStefanov
Copy link

SvetoslavStefanov commented Feb 16, 2025

root@ace8d491143a:/var/www/html# php -m | grep zip
zip

/usr/local/etc/php/conf.d/docker-php-ext-zip.ini
Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip
gzip compression => enabled
bzip2 compression => disabled (install ext/bz2)
zip
Libzip version => 1.7.3

I have ext-zip on my environment, but still couldn't run this package on Laravel 11

@craigpipeandpiper
Copy link

ext-zip needs adding to composer.json too

@patrickbrouwers
Copy link
Member

but still couldn't run this package on Laravel 11

This remark is too vague to be able to help. Please share more information: what doesn't work? Which errors did you get?

@olezhkafp
Copy link

ext-zip needs adding to composer.json too

No, it doesn't

I have ext-zip on my environment, but still couldn't run this package on Laravel 11

Why can't you post the error you have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants