This is the second news issue released during the quarantine. Since last time measures got tightened. Some aspects of life normalized as the world adapted, some did not. Still, as far as I know, everyone in the Yii community is healthy so far, so we’ll make it through the quarantine and aren’t going to stop doing what we’re doing.
As a PHP guy from Russia, I was organizing a PHP Russia conference, and the virus messed it up significantly. The bad thing is that it was postponed (luckily to September but who knows). The good news is that there will be a free PHP Russia Online 13th of May. You’re very welcome to participate but please register in advance. I am not speaking myself this time, but I’m pretty sure we’ll have an event dedicated to Yii by the time Yii 3 will get closer to release.
Stay healthy and thank you for the support!
Both Yii 2 and extensions got releases.
- Yii 2.0.35.
- Shell 2.1.4.
- Gii 2.2.1.
- Redis 2.0.13.
- ApiDoc 2.1.4.
- Tobias Munk prepared building of PHP 7.4 Docker images for Yii 2 so these are now available.
- Composer installer 2.0.9 was released fixing Composer 2 compatibility. Combined with extensive testing and bug-reporting to the Composer team, which resulted in compatibility with the upcoming release.
As you know if you’ve read the last news issue, a bird-view of the most important Yii 3 plans is in a Trello board.
Now to what was done.
- First, a stable version of Injector package was released. It is 100% covered with tests and has a good quality score. A guide on how to use it and how it works is available. Since it’s framework-independent, it can be used in any PHP code. In Yii 3 it is one of the central parts that do all the auto-wiring into action handlers and widgets.
- Strings package got StringHelper::truncateBegin() and StringHelper::truncateMiddle() methods.
- Queue got extra tests. The package itself is still in the development stage.
- Router got important bug fixes and enhancements. It’s more efficient now lazy-loading everything. Configuration syntax was adjusted as well.
- HeaderHelper that helps to parse typical HTTP header types was moved to http from yii-web.
- PhpStorm metadata was added to http and yii-web for better code inspection and autocompletion.
- Web application got a new AfterEmit event.
- There’s now a handy way to respond with data and format it into JSON, XML, and more. That is going to be a solid base for the development of API-based applications.
ConcreteProviderwas merged with
Provider. Adding events directly in runtime was disallowed.
- yii-debug package was integrated better with the event manager. The UI to view the results collected is still missing.
- validator package got AtLeast and Json rules.
- mailer got cleanup.
- widget package factory is now automatically initialized so there’s no need to configure it explicitly in the application.
- We’ve tested Composer 2 compatibility of plugins we use and reported issues to fxpio/foxy that is used to install assets of Bootstrap 4 package. It is now compatible.
- composer-config-plugin got tests and was significantly refactored. It is also now compatible with the upcoming Composer 2.
- Session-related issues in yii-web were fixed.
- RBAC package got a recursive role search.
- array package got a concept of array modifiers. These are special markers that change the way arrays are merged. Useful for configs. Multisort was moved to a separate ArraySorter class.
- factory and di were cleaned up and improved including performance. Passing constructor parameters by either position or name are now supported as well as configuring immutable objects.
- All widgets are now immutable.
- data package KeysetPaginator was refactored. An example of using it was added to the demo package.
- yii-form package was created. It’s still under heavy development but already eases working with forms.
- Rate limiter middleware was moved to a separate package.
- Cookies code was refactored, collection was added.
- Yii demo package was updated to reflect many of the changes above. Additionally, a handy way to declare event handlers was added.
Constructive feedback on any Yii 3 packages is very welcome. Leave it in the issues of the package in question, or at the forum.
New and adjusted internal guidelines:
- Recommended books and websites forum topic
- Interview with Makarov about Yii Framework 3
- Composer 2: What’s new and changed
COVID-19 postponed the implementation of interesting ideas about getting extra income for Yii fund and worsened my financial situation so I have to do some extra commercial consulting in order not to take more from the foundation and be able to support contributors who are affected more.
With the help of the foundation, we have secured more of roxblnfk and Wilmer Arambula development time and plan to expand it.
At the OpenCollective page we have clarified expense policy:
Feel free to expense time you’ve spent according to Yii Software goal i.e. support, promote and develop Yii and other OpenSource software with a focus on Yii framework.
- Anyone contributing to Yii can use it. Priority is given to people who are contributing a lot and with a clear plan instead of doing a commercial job i.e. hurting regular income.
- Sum can’t exceed what’s in the current foundation considering others.
- The core team should be told about it in advance.
- Hours should be logged.
No person may be favored by expenses alien to the goals of the Yii Software or disproportionately high.
I’d like to thank all backers and contributors making Yii 3 possible. We are moving it forward together.
Special thanks for Yii 3 code contributions goes to: