Yii. What's next?

Alexander Makarov

Yii core team

http://slides.rmcreative.ru/2017/yiiconf-next-en/

What's going on about PHP?

  • Yii 1.x started with 5.2.
  • Yii 2.0 requires 5.4.

PHP 7.* is the thing nowadays

  • Significantly faster.
  • Handles objects better.
  • Requires less memory.
  • Almost no memory leaks.

PHP is here to stay.

Current trends are

  • SOA.
  • DDD.
  • PSR.

Can't resist myself to note that SOA often turns debugging into hell because of layers and events.

Yii philosophy

  • Introduce only necessary complexity.
  • API and code usability first.
  • Document everything.
  • Backwards compatibility and support are important.

Yii history

Prado 1.0 (2004)

  • Qiang Xue, relesed in June 2004.
  • Inspired by Apache Tapestry, Borland Delphi and Microsoft ASP.NET.
  • Took Zend gophp5 prize.

Prado 2.0 (2005)

  • Wei Zhuo helped with i18n and l10n.
  • It was decided to rewrite everything after 2.0 release.

Prado 3.0 (2006)

  • Inspired by Microsoft ASP.NET 2.0.
  • Many enhancements.
  • It is current verison that is still used and supported.

Yii 1.0 (2006 — 2008)

  • Qiang announces Yii alpha.
  • Majority features are from Prado: ActiveRecord, i18n, l10n etc.
  • Inspired by RoR, symfony1, Joomla.
  • Faster than other frameworks.
  • Community grows fast.

yiiframework.ru

  • Launched in 2009.
  • Some code-igniter.ru community members migrated.

Yii 1.1 (2010)

  • Form builder, relational AR, unit testing framework and more.
  • I've joined core team.
  • New website released.
  • First books.

Yii 1.2 (2010)

  • The goal was to update 1.1.
  • PHP 5.2 and 5.3 compatible.
  • Wasn't released.

Yii cookbook (2011 — 2013)

  • My book.
  • Russian and English versions.
  • PACKT.
  • Mostly good experience (except what PACKT did with the name afterwards).

2012 — 2013

  • Carsten Brandt, @CeBe joined team in 2012.
  • Paul Klimov joined team in 2013.
  • GitHub.
  • More books.

Yii 2.0 (2012 — ...)

  • Developed privately until 2013.
  • Released in 2014.
  • In 2015 Dmitry Naumenko, @SilverFire joined the team.
  • In 2016 extension released were splitted from framework releases.
  • Same year Boudewijn Vahrmeijer, @dynasource join the team.
  • In 2017 Alexey Rogachev, @arogachev joined the team.

Qiang left the project summer 2015

Noone noticed for about 6 months and that's good.

Yii 2.0

  • PHP 5.4.
  • Well balanced.
  • Covers all the needs of traditional web.
  • Simplifies building REST APIs.
  • Good tools and infrastructure.
  • Less layered than others. Fast.

2.0 failures

Took too many features at the same time

Put too much in the core.

  • jQuery.
  • PJAX.
  • CAPTCHA.
  • Masked input.
  • The rest of clientside.

fxp composer plugin

Caused lots of pain but finally stabilized.

  • Almost no bugs.
  • Still complicates setup.
  • Slow.

Haven't used many PSRs

There were Yii releases already when PSRs were accepted. Backwards compatibility.

MVC

  • Can't route w/o it.
  • Called a class "Model".

Other mistakes

2.1 plans

Raise requirements

  • PHP 7.1+.
  • No HHVM support.

Lighter core

  • assets.
  • Clientside?
  • Obsolete cache backends.
  • Other thigns that do not belong to the core.

Official LTS

Cleanup

  • Remove @deprecated.
  • Remove polyfills that aren't needed for PHP 7.1.
  • Remove HHVM support.

change() for migrations

Will be no need to implement down().

Configurator

A component or a library that manages configs.

Queue

https://github.com/zhuravljov/yii2-queue

Docker

https://github.com/yiisoft/yii2-docker

More atomic operations

  • upsert.
  • batch w/ ignore.

Probably new application templates

  • advanced-like basic.
  • API.

intl abstraction

Probably will use Symfony polyfills.

asset-packagist by default

@hiqsol, @SilverFire and community created https://asset-packagist.org/.

It is an fxp composer plugin alternative that is much faster.

Docs

  • More tutorials.
  • More best practices.

New website

http://yiiframework.domain-na.me/

Pars of it are already done as separate projects

  • Admin panel and wiki search.
  • Comments for docs.
  • Ratings for comments, wiki and extensions.
  • Users ratings.
  • Replace old forum.
  • Extensions.
  • Design improvements.

Want to help us?

https://github.com/yiisoft-contrib/yiiframework.com

What about 1.1?

  • EOL. Security and PHP 7 compatibility fixes only.
  • 1.1.19.

Plans for 3.0 (or 2.2?)

  • We want to avoid revolution.
  • Experimenting with separate libs (router, DI container, collections).
  • Fix naming.
  • More PSR support.
  • Make routing work w/o MVC.

Some points are possible to introduce in 2.x.

How to help:

Questions time!

What would you like to see in 3.0?