Skip to content

InputTypeGenerator::mapFactoryMethod doesn't call field middleware. #439

@withinboredom

Description

@withinboredom

When generating fields from a factory method, the field middleware appears to never be called for the generated fields. I expected to be able to do something like:

<?php

// usings here

class Example {
  #[Factory]
  public function exampleFactory (
    #[AutoWire] 
    Something $something, 
    #[CustomAttribute] 
    string $field
  ) {
    // do stuff
  }
}

For now, the workaround appears to be to manually specify an input type instead of a factory?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions