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]: Cannot install the package #4110

Open
1 task done
cool-energie opened this issue Mar 25, 2024 · 10 comments
Open
1 task done

[Bug]: Cannot install the package #4110

cool-energie opened this issue Mar 25, 2024 · 10 comments
Labels

Comments

@cool-energie
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

What version of Laravel are you using?

8.83.27

What version of PHP are you using?

7.4.33

Describe your issue

When i execute the command "composer require maatwebsite/excel:^3.1", I get this output:

==============

The "3.1" constraint for "maatwebsite/excel" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
Running composer update maatwebsite/excel
Loading composer repositories with package information
Updating dependencies
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].
- maatwebsite/excel 3.1.0 requires illuminate/support ^5.5 -> found illuminate/support[v5.5.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

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

===============================

If i execute "composer require maatwebsite/excel" i get the 1.1 version and i want the 3.1 version.

How can the issue be reproduced?

I have only copy the command from the documentation and execute it in the console.

What should be the expected behaviour?

Installation command work without issues

@patrickbrouwers
Copy link
Member

Make sure you read the requirements in the docs. You are most likely missing a php extension that is required

@cool-energie
Copy link
Author

@patrickbrouwers thank you for your reply. That is what i get when i run "php -i":

=====================
...

gd

GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.9.1
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 9 compatible
PNG Support => enabled
libPNG Version => 1.6.34
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30512
XBM Support => enabled
WebP Support => enabled
BMP Support => enabled
TGA Read Support => enabled

Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 1 => 1

...

iconv

iconv support => enabled
iconv implementation => "libiconv"
iconv library version => 1.16

Directive => Local Value => Master Value
iconv.input_encoding => no value => no value
iconv.internal_encoding => no value => no value
iconv.output_encoding => no value => no value

...

SimpleXML

SimpleXML support => enabled
Schema support => enabled

...

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.10
...

xmlreader

XMLReader => enabled

...

zip

Zip => enabled
Zip version => 1.15.6
Libzip headers version => 1.7.1
Libzip library version => 1.7.1

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.12
Linked Version => 1.2.12

====

All required extensions are enabled.

@sdon2
Copy link

sdon2 commented Apr 6, 2024

@cool-energie Same issue here! Found any solutions?

@Dev-rahul
Copy link

same issue with me, let me know if you have found a fix @cool-energie

@cool-energie
Copy link
Author

@sdon2 , @Dev-rahul I didn't found a fix yet sorry.

@sdon2
Copy link

sdon2 commented Apr 9, 2024

Found that v3.1 requires PHP 8.0. Its working fine with my PHP 8.2 environment flawlessly.

@angelofan
Copy link

angelofan commented May 31, 2024

I installed successfully using composer require maatwebsite/excel:^3.1.55.

When running composer require maatwebsite/excel:^3.1, composer will first use v3.1.0 for dependency check, but v3.1.0 does not support PHP ^8.0, as shown below:

"php": "^7.0",

Until v3.1.26, php ^8.0 was added to composer.json.

"php": "^7.0|^8.0",

To sum up, if you want to install it on PHP 8.0 or above, please lock the version number to v3.1.26 or later.

@angelofan
Copy link

我使用 安装成功composer require maatwebsite/excel:^3.1.55

在运行时composer require maatwebsite/excel:^3.1,Composer会首先使用v3.1.0进行依赖检查,但是v3.1.0不支持PHP^8.0,如下所示:

"php": "^7.0",

直到 v3.1.26,php ^8.0 才被添加到composer.json

"php": "^7.0|^8.0",

综上所述,如果要在PHP 8.0以上版本安装,请将版本号锁定为v3.1.26或更高版本。

This may require an update to the documentation.

@indiofran
Copy link

indiofran commented May 31, 2024

i try to install maatwebsite/excel:^3.1.55 but i found that install first phpoffice/phpspreadsheet: ^2.1,.

i think that can update composer.json

"phpoffice/phpspreadsheet": "^1.15",
"phpoffice/phpspreadsheet": "^1.15|^2.0 ",

Changelog Phpspreadsheet

@patrickbrouwers
Copy link
Member

Don't install 2.0 of phpspreadsheet before installing this package, it's not supported yet

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