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

A change in ./src/Sheet.php in v3.1.47 moving WithDrawings from open to close method ignores WithHeadings headings() implementation [Bug]: #4069

Closed
1 task done
chrisbeaver opened this issue Jan 12, 2024 · 0 comments
Labels

Comments

@chrisbeaver
Copy link

chrisbeaver commented Jan 12, 2024

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.47

What version of Laravel are you using?

9.2

What version of PHP are you using?

8.1

Describe your issue

I have several implementations on my Export. I trace the issue back to this part of the code in ./src/Sheet.php. Moving the $this->addDrawings call from the open method to the close method broke my reports. I call the headings() method implemented on WithHeadings and now the call to headings() is being ignored. I have no headings, and my data starts where my heading used to be. I don't know why this change was made so I just want to point out the issue it caused me.

This is the commit that changed it: b79b0d4

I reverted to 3.1.40 to get the functionality I needed until now, but I investigated today to see what happens in the current version. My sheets are still incorrect.

How can the issue be reproduced?

I have a report implementing WithHeadings and WithDrawings, plus others which may be irrelevant. Use drawings() and headings() methods to return drawings and headings. The jump from 3.1.46 to 3.1.47 is where the code change occurs. I manually moved the addDrawings() call from close to open in the 3.1.47 and my excel sheet produces properly again.

What should be the expected behaviour?

Get the same export from 3.1.47 that I got in 3.1.46 with the headings.

@chrisbeaver chrisbeaver closed this as not planned Won't fix, can't repro, duplicate, stale Jan 12, 2024
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

1 participant