Skip to content
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

[fix] registerExecutor parameter type #1613

Merged
merged 2 commits into from
Apr 8, 2021

Conversation

ibelar
Copy link
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
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
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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants