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

Skip to content

[Config] [ConfigBuilder] Set FQCN as properties type instead of class name #40956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

MatTheCat
Copy link
Contributor

Q A
Branch? 5.x
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #40921
License MIT
Doc PR N/A

@derrabus derrabus added this to the 5.3 milestone Apr 27, 2021
@derrabus derrabus requested a review from Nyholm April 27, 2021 11:29
@carsonbot carsonbot changed the title [ConfigBuilder] Set FQCN as properties type instead of class name [Config] [ConfigBuilder] Set FQCN as properties type instead of class name Apr 27, 2021
@Nyholm
Copy link
Member

Nyholm commented Apr 27, 2021

Oh, yes. The constructors!
I missed that. Thank you.

Could you add a small tests for this too? Have a look at AddToList.php, AddToList.config.php, AddToList.output.php and add something similar (but simpler) to that. I can help out if you need me to.

@MatTheCat
Copy link
Contributor Author

Well thank you for the ConfigBuilder 😁

Could I just replace

$config->messenger()
->routing('Foo\\Message')->senders(['workqueue']);
$config->messenger()
->routing('Foo\\DoubleMessage')->senders(['sync', 'workqueue']);
by

$config->messenger([
    'routing' => [
        'Foo\\Message' => [
            'senders' => ['workqueue'],
        ],
        'Foo\\DoubleMessage' => [
            'senders' => ['sync', 'workqueue'],
        ],
    ]
]);

?

@Nyholm
Copy link
Member

Nyholm commented Apr 27, 2021

Sure, but dont replace anything. Just add a third message.

$config->messenger([
    'routing' => [
        'Foo\\MyArrayMessage' => [
            'senders' => ['workqueue'],
        ],
    ]
]);
 $config->messenger() 
     ->routing('Foo\\Message')->senders(['workqueue']); 
 $config->messenger() 
     ->routing('Foo\\DoubleMessage')->senders(['sync', 'workqueue']); 

@MatTheCat
Copy link
Contributor Author

Done 👌

Travis failure seems unrelated.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Great. Thank you

@OskarStark
Copy link
Contributor

Thanks for fixing this bug Mathieu.

@OskarStark OskarStark merged commit 01602ef into symfony:5.x Apr 28, 2021
@MatTheCat MatTheCat deleted the ticket_40921 branch April 28, 2021 08:35
@fabpot fabpot mentioned this pull request May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Config] Missing namespace in generated config classes constructor
5 participants