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

Class "MyCLabs\Enum\Enum" not found #3758

Closed
7 tasks
Sab-tech-lab opened this issue Oct 2, 2023 · 2 comments
Closed
7 tasks

Class "MyCLabs\Enum\Enum" not found #3758

Sab-tech-lab opened this issue Oct 2, 2023 · 2 comments

Comments

@Sab-tech-lab
Copy link

Sab-tech-lab commented Oct 2, 2023

This is:

- [x ] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Not load class, Class "MyCLabs\Enum\Enum" not found

What is the current behavior?

Load class

What are the steps to reproduce?

Write a simple file Xlsx

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();

// add code that show the issue here...

If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.

What features do you think are causing the issue

  • Reader
  • [X ] Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

Which versions of PhpSpreadsheet and PHP are affected?

@Sab-tech-lab
Copy link
Author

Sab-tech-lab commented Oct 2, 2023

I hava add library to composer and now the error is:
PHP Fatal error: Uncaught TypeError: ZipStream\ZipStream::__construct(): Argument #1 ($operationMode) must be of type ZipStream\OperationMode, null given,
If downgrade from 3.1.0 => 3.0.2 writing file work

@billynoah
Copy link

Running php 8.3.11 here - this is what I did to get things working again:

composer require myclabs/php-enum
composer require maennchen/zipstream-php:3.0.2

As @Sab-tech-lab points out above, ZipStream 3.1.0 (current version at this time) will cause issues. Not sure why php-enum was missing.

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

No branches or pull requests

2 participants