pimax/fb-messenger-php

Constructors question

Opened this issue · 5 comments

Hey Fabian, what's your opinion on making constuctors?

At the moment, we have a series of parameters - and they are getting out of order.

Should a constructor just accept an array instead? Should that be how 2.0 works?

Very good question.

Should we tag the current status as a new version?

@wittfabian I believe that we should rewrite the code, tbh an important thing to do is parsing the request array within the class and fetch the data accordingly. It's super messy and weird to use arrays with index 0 to access data etc..

Are you going to maintain compatibility in class constructors?