Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: prevent redeclaring export query generator function (Laravel Octane) #173

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

Merged
yajra merged 2 commits into yajra:master from Namoshek:fix/export-redeclare-function
Feb 28, 2023
Merged

fix: prevent redeclaring export query generator function (Laravel Octane) #173

yajra merged 2 commits into yajra:master from Namoshek:fix/export-redeclare-function
Feb 28, 2023

Conversation

@Namoshek
Copy link
Contributor

@Namoshek Namoshek commented Feb 24, 2023

Currently, when using FastExcel exports within Laravel Octane, a fatal error is produced on consecutive export requests:

PHP Fatal error: Cannot redeclare Yajra\DataTables\Services\queryGenerator() (previously declared in /var/www/vendor/yajra/laravel-datatables-buttons/src/Services/DataTable.php:803) in /var/www/vendor/yajra/laravel-datatables-buttons/src/Services/DataTable.php on line 803

I think it should be completely safe and backwards compatible to use a variable for this scoped function instead of a named function.

yajra reacted with thumbs up emoji
Copy link

@yajra yajra assigned yajra and unassigned yajra Feb 28, 2023
@yajra yajra self-requested a review February 28, 2023 04:06
Copy link
Owner

yajra commented Feb 28, 2023

Wasn't able to test on Octane but using Valet still works well. Thanks!

@yajra yajra merged commit 41c65df into yajra:master Feb 28, 2023
Copy link
Owner

yajra commented Feb 28, 2023

@Namoshek Namoshek deleted the fix/export-redeclare-function branch February 28, 2023 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@yajra yajra yajra approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /