Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(transformer): support static callable in attribute for transformer#314

Merged
Korbeil merged 1 commit into
mainfrom
feat/static-callable-support
Jan 21, 2026
Merged

feat(transformer): support static callable in attribute for transformer#314
Korbeil merged 1 commit into
mainfrom
feat/static-callable-support

Conversation

@joelwurtz
Copy link
Copy Markdown
Member

@joelwurtz joelwurtz commented Jan 21, 2026

This allow having this (for php 8.5) :

<?php

use AutoMapper\Attribute\MapTo;

class Foo
{
    #[MapTo(target: 'array', transformer: static function () { return 'bar'; })]
    public string $foo;
}

Copy link
Copy Markdown
Member

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

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

Looks neat 🙏

@Korbeil Korbeil merged commit 0b02325 into main Jan 21, 2026
4 of 5 checks passed
@Korbeil Korbeil deleted the feat/static-callable-support branch January 21, 2026 09:12
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