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

fix fromCollection to pass collection instead of array #4274

Open
wants to merge 2 commits into
base: 3.1
Choose a base branch
from

Conversation

bocanhcam
Copy link

@bocanhcam bocanhcam commented Feb 25, 2025

Please take note of our contributing guidelines: https://docs.laravel-excel.com/3.1/getting-started/contributing.html
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.

1️⃣ Why should it be added? What are the benefits of this change?
This fixes the issue #4270, which occurred because collection()->all() does not return a collection. This change ensures it returns a collection.

2️⃣ Does it contain multiple, unrelated changes? Please separate the PRs out.
No
3️⃣ Does it include tests, if possible?
Yes
4️⃣ Any drawbacks? Possible breaking changes?
No
5️⃣ Mark the following tasks as done:

  • Checked the codebase to ensure that your feature doesn't already exist.
  • Take note of the contributing guidelines.
  • Checked the pull requests to ensure that another person hasn't already submitted a fix.
  • Added tests to ensure against regression.

6️⃣ Thanks for contributing! 🙌

@patrickbrouwers
Copy link
Member

Can you please add a short description to the PR and add tests that show that this works.

@bocanhcam
Copy link
Author

Hi @patrickbrouwers
I added a description. This PR doesn't include test.

@patrickbrouwers
Copy link
Member

That's why I'm asking to include a test. I only merge these kind of changes if they are backed with tests.

@bocanhcam
Copy link
Author

@patrickbrouwers
I’ve included a test to ensure this change is covered. If you need any modifications or additional cases, happy to adjust!

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

Successfully merging this pull request may close these issues.

2 participants