Skip to content

MethodCallWithReference is not correctly identified #1133

@template-provider

Description

@template-provider

I have something like this:

App\Tour:
    tour_{1..10}:
        __construct:
            applicationCountry: 'DE'
            number (unique): 'test-000<current()>'
            date: '<dateTimeBetween("+1 minutes", "+10 minutes")>'
            dcName: 'foo'
            stops: '@stop_collection'

App\Stops:
    stop_collection:
        __construct:
            stops:
             - '@stops_tour_1'

App\Stop:
    stops_{@tour_*}:
        __construct:
            id: '1'
            name: '11111111'
            street: 'blabla'
            city: 'berlin'
            zip: '12345'
            predictedTimeOfArrival: '<dateTimeBetween("+30 minutes", "+600 minutes")>'
            customerNumber: '0987654324'
            deliveryNumber: '0987654322'
            invoiceNumber: '0987654323'
            orders: '@order_collection'

App\Orders:
    order_collection:
        __construct:
            orders: '[@orders]'

App\Order:
    orders:
        __construct:
            orderNumber: '0987654321'
            temperatureRange: 1 

The SimpleFixture has a MethodCallWithReference wit method "stops" + arguments.
But it should be a SimpleMethodCall with method "__construct" + arguments.

With this annotation it works:

App\Stops:
    lisel_stop_collection:
        __construct:
            stops: '[@stops_tour_1]'

The problem is the array syntax, but because of this bug: #966 I cannot use this annotation.
We want to use something like this: "stops: '[@stops_tour_<numberBetween(1,10)>]'"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions