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: prevent redeclaring export query generator function (Laravel Octane) #173

Merged
merged 2 commits into from
Feb 28, 2023
Merged

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

merged 2 commits into from
Feb 28, 2023

Conversation

Namoshek
Copy link
Contributor

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.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yajra yajra assigned yajra and unassigned yajra Feb 28, 2023
@yajra yajra self-requested a review February 28, 2023 04:06
@yajra
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
@yajra
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants