Fork me on GitHub

Foundations for our Future

posted 2012-11-28 by Phil Sturgeon

The team here have been meaning to get more active with blogging about what is happening behind the scenes and there is no time like the present.

I am constantly amazed by the number of people using, blogging about, launching with, and contributing to PyroCMS. Compared to a year ago we're a much bigger community and this can be seen through so many metrics. We're the Most Watched PHP CMS on GitHub, we have hundreds of contributors and PyroCMS just got translated into Chinese Simplified - it's 22nd language!

While the v2.1 branch is doing this well I am not content with it. We are tantalizingly close to getting v2.2.0 out the door and you guys will be very happy with the changes included there. Totally modular Search is a certainly going to be a big thing, along with the amazingly powerful Page Types which are going to blow people away with how powerful and easy they are. With v2.2.0 getting close to launch I do of course have to start planning the future beyond that.

v2.3.0 will be PHP 5.3

But thinking even further ahead than v2.2.0 is v2.3.0, which will be an even bigger improvement for PyroCMS. PHP 5.2.4 has been our minimum requirement for a long time, but the usage numbers for that version of PHP 5.2.x have dropped so significantly in the last few months (down from 30% to less than 15%) that we feel it's appropriate for us to start building out new versions with PHP 5.3.6 as a minimum requirement.

Wether that interests or concerns you, the team feels like it is absolutely for the best of PyroCMS users. I completely understand that there are many of you who are unable to upgrade because your web host for some reason still only has PHP 5.2 available, or for whatever other reason, but you are not forgotten about.

Versions of PyroCMS are supported for 2 minor versions (e.g: 2.0 is currently supported), so you essentially have about a year to get from 2.2 to 2.3 before you need to be concerned. Security updates and hotfixes will be applied to the 2.2.x branch for that time, and if by next year PHP 5.3 is not an option for your web hosts then you seriously need to consider moving.

If anyone is looking for a hosting solution with PHP 5.3 as an option then please try out our hosting platform for free, or take a look at our hosting partners on the same page.

Composer and Laravel

The main thing here is Composer. Composer allows us to easily include code and packages from a number of sources, including other frameworks instead of being limited to CodeIgniter-only code. CodeIgniter has been incredibly good to us for years now, and we've been happy to contribute code and features back to the community, but there are some things it just cannot do well.

For example the PDO support in CodeIgniter is broken. You can select, insert, update, delete but the DBForge is just functionally and fundamentally broken for anything other than MySQL. We want to bring SQLite and Postgres support to you properly in 2.3 and that cannot happen using CodeIgniter's Database Driver.

While looking for alternatives to using CodeIgniter's broken database drivers we came across the Laravel 4 Database package, which can run entirely standalone in any framework. Thanks to Composer we can easily install this code in with our own. It's namespaced, doesn't conflict and works extremely well - it's even unit tested! We can just drop this in as an option to developers who want to use a powerful new database layer and even have access to Eloquent, which is an incredibly lightweight system, while keeping the CodeIgniter Database layer intact for a few versions to allow people enough time to move away from using it.

This is not the only package we'll be utilizing. Laravel provides much more powerful Validation, Jerel has built a PSR-2 Caching system based off quick-cache, Guzzle is a considerably more advanced component to replace my aging Curl and Rest Sparks, and much much more - all of which leverages PHP 5.3 and its wonderful namespaces, callbacks, static facades and other kickass design patterns.

Deprecating CodeIgniter

This sounds scary, but please, do not be afraid. This is a huge undertaking and we are not taking this lightly.

As I said above CodeIgniter has served us extremely well over the last few years and many of you use PyroCMS because it is based on CodeIgniter. That said there are fundamental limits in the design of CodeIgniter which block it from ever truly taking advantage of PHP 5.3 or any of its features. CodeIgniter puts an extremely heavy focus on backwards compatibility with its API, which over the last 5 years has essentially never changed. I know, I was on the development team for almost 2 years and a focus was always on "not breaking the API". From PHP 4 to PHP 5.2 this has worked out well enough and while certain features were not able to be implemented properly it did mean that application developers could be confident different versions would not be drastically different.

Well, that worked up until PHP 5.2 but for CodeIgniter to ever leverage any part of PHP beyond that it would require a drastic rewrite. Nobody is interested in doing that rewrite, not us, not the company who owns CodeIgniter and definitely not the community - so it's just not going to happen. If it did happen somehow then we'd be faced with having to rewrite PyroCMS anyway - so this change makes the most sense for us. We can move to a codebase of our choice at a time of our choosing, and roll the changes out over a few versions to keep add-on developers happy. We've been talking to the developers of PyroCart, FireSALE and other popular addons and they cannot get enough of the Laravel 4 components that we have been demonstrating to them. These add-on developers are excited to get going and even diving into GitHub to help speed the process up, and I believe this definitely shows we're on the right track.

Laravel 3 is an incredibly popular framework already and its roots come from CodeIgniter. If you've ever used CodeIgniter, Kohana, FuelPHP or PyroCMS you will know exactly how this works and feel right at home. The documentation is as (or more) extensive as CodeIgniter's and you will fall in love with the amazingly simple syntax in no time. The whole focus of Laravel is making clean, modern, even sexy code, with heavy testing and a stable base. It's important to mention that we're not moving to Laravel 3 (the current full-stack framework) but actually moving to Laravel 4, which is entirely built with PSR-2 components. We're good friends with the Laravel team and so this has been going very smoothly, even though these components are not yet released. They will however be entirely ready and entirely documented before 2.3 launches, don't worry about that.

All of this said, the move to Laravel is going to take time and is going to be done in steps. As I mentioned above 2.3 will include the new Database layer, the Eloquent ORM - which is an insanely lightweight ORM, and potentially some of their validation and other components. For the lifetime of PyroCMS 2.3.0 these components will be available if you want to use them, or you can keep on using CodeIgniter exactly the same as you are now. This gives Add-on developers a great amount of time to start utilizing these components before PyroCMS 3.0 happens. This is the softest and easiest approach we can take, and it should work out really well.

To put this into context, Drupal 7 to Drupal 8 was a total rewrite onto a new framework and nothing works between those two versions. Everyone had to go back to square 1 and start everything from scratch. This sort of stuff happens, but we're spreading this out over multiple versions to make the transition that much easier.

Testing is now a focus

In the past there have been bugs which should have been found with testing. I'd hate to blame this entirely on CodeIgniter, but it certainly hasn't made it easy.

Most Composer packages are unit-tested, and we will only be using components that have good code coverage. This means most of our codebase will already be tested thanks to the tests that each component already implements.

Then we can create some behavioral tests that simulate installation, common user interaction, etc. This again is much easier with a PHP 5.3 codebase than in PHP 5.2.

Onwards and Upwards

PyroCMS is slowly transitioning itself to the new world of PHP - which it would have to do at some point. We can do it now and stay at the front of the pack, or be forced to in a few years after we’ve stagnated. If we were to lock things down completely and not upgrade our codebase then you'd grow bored or frustrated and move to a totally new CMS, and that is going to be a LOT more difficult than the upgrade process we have planned.

We'll be blogging, tweeting, supplying documentation, recording screencasts and doing everything we can to help you guys out during this time. Our support is free and you're welcome to contact us directly if you have any more questions.

Further Reading:

Comments

Gravatar
Samuel Goodwin

2012-11-28

have been checking out Laravel over the last few weeks... awesome framework and i cannot wait to start getting neck deep into it and start banging out cool modules. Nice work guys. Keep it up.

Gravatar
Donald Allen

2012-11-28

Very excited about the future of Pyro. The PyroCMS team deserves major props. Simple the best CMS I've used.

Gravatar

2012-11-29

Very much looking forward to all this. I think I speak for many when I say I'm in it for the long haul. Let's do it to it.

Gravatar

2012-11-29

Surely, I won't be the only one to say this but here we go: thank you PyroTeam.

Gravatar

2012-11-29

Watching Laravel during the last couple of weeks and reading trough some entries about Laravel 4, I think it is a wise decision to move forward in this direction. I chose PyroCMS because it is CI based. But there has to be some evolution and so the journey has to go on. Well done, guys!

Gravatar
Rob Meijer

2012-11-29

I've been a huge fan of Laravel since I started working with it a few months ago, and I'm really excited about the direction of L4. I'm also a huge fan of PyroCMS, so, seeing these two come together is certainly cause for celebration.

Well done guys!

Gravatar
Reynierpm

2012-11-29

I've been using Pyro for a while and is amazing but as many said it's a bit slow and need a better base code, so this news are amazing for developers and people behind Pyro. In the other hand I'll like to know if there are any road map or something else that give us a date where 2.2.0 expect to be released

Gravatar

2012-11-29

Reynierpm: We're putting together an Interstate roadmap right now. 2.2.0 is literally going to be within a week or two, but we can't set a date. It's another one of those "ready when it's ready" situations that I am sure you're used to hearing from open-source projects.

As for slow I'd be interested to hear more about what you think is slow? We've got PyroCMS powering some amazing high-traffic websites without any special caching servers in place or anything like that. The backend could be more AJAXy for sure, but I wouldn't say PyroCMS in general is slow.

Gravatar

2012-11-29

Laravel is a good choice, thanks.

Gravatar
Christian D.

2012-11-29

I wasn't sure about this at first, but as I thought more and more about it, I realized it had to be done (mainly because EllisLabs seems to be stuck in neutral and other comments I'll keep to myself). Like many here I came to Pyro because it was CI based and am a bit nervous about moving to another framework. However I've worked a bit with Laravel the last couple of days and I think the learning curve is not that steep coming from CI. However a few other comments/thoughts that have kept me, to some degree, from jumping feet first into Pyro land (and have kept me from using it in the company I work for...we pretty much use Wordpress for our CMS right now).

- How do you envision Pyro going forward? By this I mean are you focussed on the blogging community (ie: taking on Wordpress)? Focussed on the web development community (which where I see this currently and I guess would take on EE?). I think some clarification on this would help the development of the community (ie: themes, modules, widgets etc).

- Chasing the next 'shiny'! As Pyro is fairly dependent on a framework, and currently Laravel is the chosen one, what happens when something happens to Laravel (stagnet, etc etc) or composer, then what? What I'm saying is that chasing the next 'shiny/framework', I don't think would serve the community well. Love it or hate it, but as near as I know Wordpress has been...Wordpress. No jumping from framework to framework. You need a LAMP server, good or bad (updated PHP or not), and that's what's made it successful.

Otherwise I'm really excited to see Pyro grow and see what happens with it and seeing where Phil, Jerel and Adam take Pyro (and I'm hoping that early next year we'll roll out our first Pyro install and see how it serves us).

Gravatar

2012-11-29

Thanks for all the comments guys, we appreciate your support and involvement.

Gravatar

2012-11-29

I agree with aiwebsystems. I'm in it for the long haul and the future is looking pretty good. You guys are doing a great job.

Gravatar
Gdmac

2012-11-29

My problem with pyro cms has always been the user interface. A bit to focused on the advanced user. It never felt right for the noob, the first time cms user. As an avid EE user, everything felt simple, I could explain the edit screen to everyone. For me that would be the decisive step.

Gravatar
Bretticus

2012-11-30

We use Wordpress for most of our clients. It has it's own "framework" or it's own platform. Which consists of a billion functions in scope. If you don't mind constant security concerns or stretching your head wondering in what order your code is going to be executed, or buying hardware to compensate for the horrible performance, I say use it :) Yes, Wordpress has the best management UI in existence I conceed.

Gravatar

2012-12-02

GDMac: The interface has always been something I have been unhappy about, which is why I am so happy to have Joshua Pekera onboard. You'll see a blog post about what he is up to for 2.3 coming out fairly soon and you will be blown away, and the 2.3 stuff is only a stepping stone to the amazing plans for 3.0.

That said, we've always had people say that PyroCMS was much easier to explain to their clients than systems like EE, ModX or Silverstripe. Interesting that it went the other way for you!

Bretticus: Lol?

Gravatar
Alexander Cogneau

2012-12-02

And when Laravel isn't updated to PHP 5.4, will you switch again?

Gravatar
Michael Calkins

2012-12-03

I just rewrote our software to Laravel and made some tutorials. You will not be disappointed :)

Gravatar
Will

2012-12-03

This is great news. I have not yet used pyrocms, partly because it's on codeignitor. Looking forward to it being based on laravel which is just a lovely framework.

Gravatar
Joey Daly

2012-12-03

I like this!

PyroCMS is by far the best and most fun to code with. The UI ... is just simply UI - won't be long till we've got some smart minds coming together to make the backend UI even more awesome as Phil mentioned with Joshua. Eventually I'll be diving in that deep end too since I too am on the unhappy bandwagon, but it doesn't stop me.

Clients love it. I love it. Great work guys!

Gravatar
Ben

2012-12-04

So I guess you'll be "competing" with Platform then? (http://www.getplatform.com/)

Gravatar

2012-12-04

Until now, you've done a very good work with PyroCMS. I trust you for its future !
We should never fear the change if it's constructive !

"Repartir sur de bonnes bases" or "Reculer pour mieux sauter", as we say in France ! :D

Gravatar
Tomexsans

2012-12-04

i Came here because of how PyroCMS was built with codeigniter, been using codeingiter for a year now, and have invested my time on it. but iv'e seen many comments regarding Codeigniter issues and right now reading a great CMS built with CI will be moving to a new Framework, i tried to play with Laravel and the learning curve is not to steep, and with regards to documentation i say it is next to CI's documentation clean and compact. why not give it a shot. I will.

Gravatar
Pete Hawkins

2012-12-04

Great news guys!

Gravatar

2012-12-07

Will there be big changes in the Template/theme system ? Cause i just got then hang of it :P

Gravatar
mja

2012-12-14

The only reason why I use PyroCMS is that it's based on CI. If you move to Laravel I think I'll move to another CMS.

Gravatar

2013-01-06

mja: Is the ONLY reason you like PyroCMS it's CodeIgniter core? Nothing to do with the simplistic modular system, the admin panel, the functionality, the features, the community and the addons available are all just "Stuff" compared to the fact it happens to sit on top of CodeIgniter?

If that's the case then... well everything we ever did past adding that first line of code has been a massive waste of everyones time!

Here is a blog post you might find relevant:

http://philsturgeon.co.uk/blog/2012/12/5-things-codeigniter-cannot-do-without-a-rewrite

CodeIgniter has been amazing to us for a long time, but there are so many things we just cannot do without hacking it, or writing complicated functionality ourself that other frameworks such as Laravel 4 can provide out of the box.

Laravel is essentially CodeIgniter 4, and you shouldn't be scared, concerned or angry about the move. We made this decision over several months, it's not just some flippant change.

Gravatar
Dominic

2013-02-23

OMG if PyroCMS starts using Laravel I will have finally found a CMS I am happy with after 10 years of searching this is so exciting!!!!!!!!!!!!!

The ability to leave a comment has been disabled for this article. This is because it's a little old and we get spammed pretty hard.