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

feat: Allow any callable in ->addColumn() #2977

Merged
merged 2 commits into from
Mar 28, 2023
Merged

Conversation

recursivetree
Copy link
Contributor

This PR fixes #2976

After upgrading our app to laravel-datatables 9.21 and above, you can't pass a class implementing __invoke() to addColumn. While this has never been supported according to the docs, it has worked until now. The fix is simple and should break other things.

add test case

fix detection for callable
@sonarcloud
Copy link

sonarcloud bot commented Mar 27, 2023

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
No Duplication information No Duplication information

Copy link
Owner

@yajra yajra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good.

@yajra yajra changed the title Allow any callable in ->addColumn() feat: Allow any callable in ->addColumn() Mar 28, 2023
@yajra yajra merged commit 45e57bf into yajra:master Mar 28, 2023
@yajra
Copy link
Owner

yajra commented Mar 28, 2023

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.

Passing callable classes to addColumn
2 participants