Making extensions distribution-ready
In this chapter, you learned how to create various types of Yii extensions. Now we'll talk about how to share your results with people and why it's important.
Getting ready
Let's form a checklist for a good extension first. A good programming product should follow these points:
Good coding style
People should be able to find it
A consistent, easy to read, and easy to use API
Good documentation
Extension should apply to the most common use cases
Should be maintained
Well-tested code, ideally with unit tests
You need to provide support for it
Of course, having all these requires a lot of work, but these are necessary to create a good product.
How to do it…
Every modern PHP product must follow the PSR4 standards of autoloading and the PSR1 and PSR2 standards of the coding style from the http://www.php-fig.org/psr/ guide.
Let's review our list in more detail, starting with the API. The API should be consistent, easy to read, and easy to use. Consistent means that the overall...