Skip to content

[fix] registerExecutor parameter type#1613

Merged
mvorisek merged 2 commits intodevelopfrom
fix/register-executor-factory
Apr 8, 2021
Merged

[fix] registerExecutor parameter type#1613
mvorisek merged 2 commits intodevelopfrom
fix/register-executor-factory

Conversation

@ibelar
Copy link
Copy Markdown
Contributor

@ibelar ibelar commented Apr 8, 2021

Allow using Object instance as seed.

Allow to use Object instance as seed.
@ibelar ibelar requested a review from DarkSide666 April 8, 2021 15:50
@ibelar ibelar added the RTM label Apr 8, 2021
@mvorisek mvorisek merged commit 2c58911 into develop Apr 8, 2021
@mvorisek mvorisek deleted the fix/register-executor-factory branch April 8, 2021 17:30
@mvorisek
Copy link
Copy Markdown
Member

mvorisek commented Apr 8, 2021

merged but the seed object is not instanced neewly, thus allowing object seed in general may lead to very strange results, be careful

@ibelar
Copy link
Copy Markdown
Contributor Author

ibelar commented Apr 8, 2021

Is it better to check for proper instance then and throw error if not array and not of type ExecutorInterface?

@mvorisek
Copy link
Copy Markdown
Member

mvorisek commented Apr 8, 2021

Phpstan will do this check if enabled in project where used.

The issue is when you pass some object seed, that is expected to be instanced for every use.

@ibelar
Copy link
Copy Markdown
Contributor Author

ibelar commented Apr 8, 2021

yes right, I misunderstood your comment. Perhaps check should be at the object creation in order to make sure the created instance if of type ExecutorInterface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants