Craft CMS + Laravel: A match made in heaven?

Could a switch from the Yii Framework to Laravel be on the cards for a future release of Craft CMS? Founder & CEO of Craft CMS, Brandon Kelly, dropped a few hints in the Craft CMS Discord recently.

Craft CMS has always been built on the Yii Framework, version 1 started with Yii 1 and Craft 3 made the not insignificant leap to Yii 2. It's probably safe to say that in that time (from 2013 to 2020) the PHP community has dated, married and is now thinking about starting a family with Laravel. Now, at its 8th release, the Laravel Framework has become the defacto choice for PHP web application development in 2020.

Graph of "Laravel" versus "Yii" web searches from Google Trends

Certainly here at Enovate we select Laravel for many new web application development projects thanks to its wide-adoption and friendly developer-experience. Like many web agencies of our size we use both Craft CMS and Laravel in our projects and from time-to-time both. Our developers certainly feel more comfortable and productive working with Laravel and seldom speak with any praise or enthusiasm about the Yii Framework. The two frameworks take a different approach to developer-experience and we often find ourselves wishing we had features available in Yii that exist in Laravel and the same cannot be said in reverse.

So it was with much excitement when I heard, at the recent online London Craft CMS Meetup we organise, John Morton (curator of Craft Link List) mentioned that Brandon Kelly had raised the topic of Craft CMS switching from Yii to Laravel in a future version on the Craft CMS community Discord (#extending-craft, 21st August 2020):

We considered it before porting to Yii 2 but at the time Yii was still the clear choice. With Yii 3 on the near horizon we are considering it again, and this time Laravel is certainly looking like the better choice.

[...]

It will most likely happen, question is the timing

Brandon Kelly, Founder & CEO, Craft CMS

This is really exciting news, the sort of news that draws out the very best animated GIFs when shared with (remote) working colleagues! Think Carlton dance levels of sheer unbridled joy!

Whilst Yii has proven to be a safe and stable foundation for Craft CMS up to now, it’s definitely become apparent that Laravel is where the PHP community has moved and has the potential to provide a fantastic foundation for Craft CMS going forward.

Those of us who have been part of the Craft CMS journey since we got our hands on version 1 back in 2013 are probably recoiling in horror at the prospect of another Craft version 3 type upgrade / migration. I am too, but Brandon was swift to back up his comments with some reassurances around making the transition for developers and our clients as smooth and pain-free as possible:

We don't want to force another 3.0-sized update on the community, ever again, so we will need to figure out how to do it w/out going too nuts.

Brandon Kelly, Founder & CEO, Craft CMS

That said, I think realistically a change of this magnitude is always going to be accompanied by a few bumps but to hear that commitment from Brandon Kelly to keep those as minimal as possible was good enough for me. I think we all understand that, in choosing Craft, a modern CMS that is committed to staying that way, an element of upkeep comes with the territory. Personally, I fail to see how this transition could be accomplished without some degree of pain for us developers but the prize (being on Laravel) would motivate us to do so much more than moving to Yii version 3 ever could.

In my opinion switching to Laravel makes great business sense for Craft. Being able to introduce the large Laravel community to such a polished CMS as Craft will be transformative both for Craft CMS as a business and potentially for us Craft CMS Partners and the developers who work with Craft CMS day-to-day.

Furthermore, it would be great for our developers to feel equally at home when moving from our pure web application projects built upon Laravel to our Craft CMS projects. In addition, the potential for code reuse along with tooling such as test frameworks, CI, and deployment approaches would be a massive time-saver and benefit to us as a company.

I’m going to stick my neck out and say that a move to Laravel Framework from Yii could be the most transformative change Craft CMS has undergone since its debut in 2013.

Let’s do this Craftisans!

Tagged with:

You might also like...

Why we love Craft CMS

Michael Walsh by Michael Walsh