Skip to content

Fix the missing support for save_callback being a function#56

Merged
stefanheimes merged 1 commit intomenatwork:masterfrom
qzminski:bugfix/save-callback
Jan 28, 2026
Merged

Fix the missing support for save_callback being a function#56
stefanheimes merged 1 commit intomenatwork:masterfrom
qzminski:bugfix/save-callback

Conversation

@qzminski
Copy link

Right now the callbacks inside save_callback must be provided as arrays:

'save_callback' => [
    ['class1', 'method1'],
    ['class2', 'method2'],
],

However, Contao also supports functions. This pull request fixes this, so functions can be provided as well:

'save_callback' => [
    ['class1', 'method1'],
    static function($value) {
        return $value;
    }
],

@stefanheimes stefanheimes self-assigned this Jan 27, 2026
@stefanheimes stefanheimes added the enhancement New feature or request label Jan 27, 2026
stefanheimes added a commit that referenced this pull request Jan 28, 2026
Hofix Update

- Merge PR #56 from @qzminski
- Fix phpcq
- Fix phpunit
@stefanheimes stefanheimes merged commit 054fdae into menatwork:master Jan 28, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants