Skip to content

consumption of method_signature annotation doesn't account for dot-notation access of nested fields for a required field #684

@noahdietz

Description

@noahdietz

The following code:

if (count($methodSignatureArguments) !== $requiredFields->count()) {
throw new \LogicException(sprintf(
'missing method signature arguments (Expected "%s", found %s)',
$methodSignature,
implode(',', $requiredFields->map(fn ($f) => $f->name)->toArray()) ?: 'none'
));
}

Does not account for a signature like "foo.a,foo.b" where foo is a google.api.field_behavior = REQUIRED field. The presence of foo.a should be sufficient.

Furthermore, we need to make sure that build fragment generation can handle a dot-notation signature!

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueThis issue is a good place to started contributing to this repository.priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions