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

Always returns a ParamBag #289

Conversation

bburnichon
Copy link
Contributor

Having to check whether there is a ParamBag or not is error prone.

This PR ensures Transformers are always called with a ParamBag instance.

@bburnichon
Copy link
Contributor Author

ping @willishq @jasonlewis @philsturgeon

@hskrasek
Copy link

I was about to open a PR for this, but looks like someone else beat me to it. Would help removing the extra $params === null check that can make include logic odd, depending on how you use include params

@philsturgeon
Copy link
Member

@bburnichon could you implement what @hskrasek suggested? @greydnls will be able to pick this up when back from the PHP Cruise :D

@bburnichon
Copy link
Contributor Author

@philsturgeon I don't understand what you want me to implement. The extra $params === null check is not in library code, but on each include method of TransformerAbstract subclasses.

@philsturgeon
Copy link
Member

I'm just asking if you have a response to @hskrasek's suggestion. Work it out amongst yourselves. :)

@bburnichon
Copy link
Contributor Author

So yes, merge the PR and it will do what @hskrasek wants to achieve 😄. Am I wrong, @hskrasek?

@hskrasek
Copy link

Yea sorry, my wording might have been off. I was honestly just bumping this PR since it would be useful. So you're all good @bburnichon, PR just needs to be merged if it looks good to @greydnls.

@philsturgeon philsturgeon merged commit 56ad893 into thephpleague:master Jul 21, 2016
@bburnichon bburnichon deleted the improvement/always-call-with-parambag branch July 21, 2016 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants