Yii’s current way of handling extension has several downsides:
Yii’s extension ecosystem for Yii v1 and v2 is not very impressive. Yes there are many extensions. But many of those are unmaintained, poorly documented, poorly coded, hardly supported or have other issues. Most developers also end up searching and comparing the Yii site, Packagist and GitHub to find the best one.
The Yii community is small yet there are many duplicate extensions aimed at providing the same feature. While we all appreciate freedom of choice, most developers would probably prefer one excellent extension over the choice between five average ones. The community would probably be better served by focusing on fewer extensions that cover more features.
The release of Yii v3 will create the challenge of having to build a new collection of v3-compatible extensions. Given the scattered nature of extensions, this will be a substantial undertaking and many will likely not be ported from v2 to v3 by their original authors. On the other hand, given Yii 3’s focus on a minimal footprint for the core framework, a substantial extension collection will be conditional to the successful adoption of Yii v3.
The described problem is not limited to Yii or PHP, but almost every single framework. And there are some solutions starting to emerge.
Here is VoxPopuli’s mission statement:
We are a collective of Puppet module, tooling and documentation authors all working together to ensure continued development on the code we maintain.
We work under a shared name and namespace and synchronize our efforts. Having no official relation to Puppet Inc. allows us to maintain our own pace and direction when it comes to how we work and develop. However, all community members are welcome and this includes many Puppet Labs employees.
One of the benefits we hope to achieve is that by a shared ownership of modules we no longer end up in situations where the original maintainer has moved on and a forest of disparate forks try to fill the void. Since a huge team of contributors has access to our code anyone can step in and help move a module forward, merge code into it and release a new version of it.
React Native Community takes another approach. Whenever a popular extension goes unmaintained, or when the author is overwhelmed with issues/prs, they offer the author to transfer the repository to the
react-native-community org on github. There, the extension immediately benefit from a fresh set of eyes, and the author gets help. Usually these are extensions mature enough to have a clear set of features/foreseeable changes, so the original author intention is respected.
If a newly adopted extension duplicates a feature implemented in another one, the community discuss this, and the feature gets removed from one of them. This avoids duplication and concentrate all efforts in one place.
What about Yii3?
Yii could benefit from a similar, official “Yii community extensions” initiative.
Let’s try to get the best and most active Yii extension builders together and create a community effort to build and maintain an extensive collection of long-term supported, best-practice coded, well-documented, well-tested, multi-lingual, feature-rich Yii 3 extensions.
With the intent to create:
- Optimal community efficiency by not reinventing the wheel several times building multiple extensions for the same feature/functionality.
- Yii being the PHP framework known for its best-in-class extensions with regards to performance, reliability, standardization, code quality, translation, documentation, etc.
- More trustworthy, reliable and easy to find extensions through centralization.
- More extension continuity; e.g. long-term supported, actively maintained and actively developed without regular forking, renaming, moved ownership, etc.
How this could work with the Yii community:
- Create a new Github and Packagist organization separate of
yiisoft. Let’s call it
- Everybody can contribute. Owners of existing extensions are free and encouraged to transfer their repository to
yiipeopleand continue the development of their extensions there. The current core team is also encouraged to transfer everything they are maintaining that they do not consider core modules, and to contribute to
yiipeoplejust like every other contributor.
- Just like with the framework itself,
yiipeopleshould have its own “core team” that reviews commits and PR’s. Close ties to the core framework’s “core team” is encouraged for effort synchronization, but this can and should be a seperate team of senior yii extension developers.
- People contribute to and collaborate on extensions in
yiipeopleunder a shared name, namespace and ownership. Each extension can have a single “lead” maintainer and credits to original authors and contributors should be awarded, but ultimately shared ownership applies to prevent unattended issues/PR’s and unmaintained extensions.
- Decision making on plans and direction should match the framework’s method: consult the community, but the core team has the final decision. Perhaps a section can be created here on Discourse for the community extension initiative to interact with the community.
yiipeoplewill focus on creating and long-term maintaining one best-in-class extension per feature/technology/functionality for the most common non-core features per Yii version. High quality extensions with good code, well tested, properly documented, adherence to PHP and Yii’s standards and conventions, with translations, that don’t conflict with each other. It aspires to be every developer’s first place to look and preferred source.
In this setup, the heroes of the
yiipeople core team will have several key roles:
- Draft and maintain common versioning, code quality and structure, documentation, testing and contribution guidelines for
- Align extension efforts and development with the Yii framework core team.
- Assess onboarded extensions that are contributed by community members, recommend opportunities for improvements and possibly contribute code themselves.
- Approach developers of popular extensions to move their extension to
yiipeopleand become contributors (and perhaps even join the core team).
- Monitor the health of extensions, jump in when extensions are stalled and/or unmaintained.
- Handle issues and pull requests, or assist extension lead(s) on minor issues/PR’s if applicable.
- Make sure the community is consulted and there is consensus among core members and/or extension lead(s) on potential major changes.
I believe this would increase Yii’s development strength and velocity, would be beneficial to users, and would make Yii more attractive to new developers. It’s nice to have a primary source of reliable extensions.
Getting this up and running would be a lot easier and faster with some initial support from the core team. Perhaps financial support through the OpenCollective campaign is even an option. I hope existing extension creators are open to the idea of forming a collective and working together on this, for the sake of the community at large.