S
S
Sergey Krivochenko2015-05-30 12:50:04
Yii
Sergey Krivochenko, 2015-05-30 12:50:04

Fork or redefine classes?

Hello. I am writing an extension for Yii2. The extension uses Authclient . You need to add one method to the client classes and override another method. What is the best way to do it - fork the repository and work with it, or use an existing extension and write your own client classes, inheriting them from those that are in Authclient.
If it's better to fork, then how much work will it take to pull off the improvements that will appear in the "parent" repository? What about information about the author of files? Now the class files say: @author Paul Klimov <[email protected]>. If left as it is, someone may have a question about the code I wrote, and it will be asked to the person who did not write this code. What about the namespace? Leave as is or change tomyVendorName\authclient? Is it worth it, for the sake of order, to delete unused class files?
If the second option is preferable, then there is only one question: how much will one more element in the class hierarchy affect performance?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
God Emperor, 2015-05-30
@krivochenko

Fork - if you think that it then makes sense to merge with the official repository and the owner will go for it there.
And then the questions you describe will not arise.
Otherwise, override. It will have almost no effect on performance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question