Yii2 components customizations like Yii1

Hi to all,
I’ve a web application already running in production, created with Yii1.

The application use a lot of Google Cloud Libraries for Logging, Queuing jobs, connecting to Datastore, BigQuery, Cloud Spanner, Pub/Sub and so on (all Google Cloud products).

Moreover, I’ve heavily customized components like the CGridView (to enable PDF and XLS export on background, column enable/disable and position), the DB and AR component to be multi-tenant aware, the CAssetManager to publish on Google Cloud Storage and the CStatePersister to use Redis instead of file system.

The application is currently running in multiple Cloud Run services (a Kubernetes cluster with Knative on top) and the file system is READ-ONLY (so I need to log on Cloud Logging and publish assets on Cloud Storage).

All works perfectly, but I feel the need to upgrade to, at least, Yii2 (I didn’t know if I should wait for Yii3).

Is Yii2 easy to customize and easy to use third parties libraries by extending his components like Yii1?
Should I start using Yii2 component inside Yii1 application or the opposite? Or start a new application from scratch and share the user login between the two, totally separated, applications?

There is a best practice in this case?

Thanks for any hints about this.

If you have no reason to rush, I suggest you look at Yii3. It is getting stable day after day with new 1.x.x releases. SO I would say that start playing around with Yii3 and start experimenting how easy or difficult is to port most complex parts of your project. This will give you time and leisure to start building blocks before Yii3 official release.

I would caution against upgrading to 2.x from 1.x unless you will upgrade to 3.x in many coming years.

Thanks for answering.

I’ve started playing with Yii2 in this weekend in a couple of hours I’ve already migrated the DB component with tenant awareness, our multi database redis cache and redis session and a couple of other parts. I’ll find Yii2 really easy to customize (I’ve also tried the same with Laravel, Symfony, CodeIgniter and Slim, and it has been a pain). Hope Yii3 is still so easy to extend and customize and do not use those “Facade”, “StrategyResolver”, “FuzzyWordUselessClass” that are so frequently in other frameworks and make so hard to make deep customizations.

I’ll take a look on Yii3, but where I can find it?

Track progress here. You can join the telegram group to get daily updates on Yii3 and ask any question directly to devs

Also check Yii3 forum and there is this question that can be beneficial to you:

Finally check the demo to dig deeper!