Upgrading To Sculpin 3

So not that long ago, Sculpin released version 3.0 thanks to a bunch of hard work by Kevin Boyd (@Beryllium9). This brought Sculpin up-to-date with current versions of PHP, and updated a bunch of stuff under the hood. It also showed why I love Sculpin — because it ultimately is a very simple idea, a major upgrade like this barely caused any problems, and the upgrade was very easy.

First off, I deleted my old sculpin.json and sculpin.lock files. I still used them because I'm a horrible person, and the old deploy system I used to use still used the phar version. Funny enough, I used vendor/bin/sculpin locally since I had long since stopped using PHP 5, but my old build system for the blog still ran PHP 5.6 and used the phar. I know, I know. That's all been updated now.

I then deleted my composer.lock file and updated my composer.json to use the version 3 tags for Sculpin:

{
    "require": {
        "sculpin/sculpin": "~3.0"
    }
}

As expected, when I ran composer install it nuked a bunch of old libraries and dragged in all the new ones. This was a super simple composer.json, so there was not any other conflicts.

I then ran vendor/bin/sculpin generate --server --watch to build the site and see what happened. I did have two very minor issues. One was that I had a title: front matter that started with the back tick ("`"). I removed that because it was not a big deal. The other issue was that one of my source files was missing an extension, and it would give the following error:

Exception: Argument 2 passed to Sculpin\Core\Formatter\FormatterManager::formatBlocks() must be of the type string, null given

This took a bit of tracking down, but it looks like if the extension is missing Sculpin cannot figure out the type of content it is, and therefore does not process it. When it grabs the content, it gets a "null" value, and the system complains. Another small issue, so adding ".md" to that file fixed it right away! I'll be submitting a bug report for that.

Overall though, the process took about 20 minutes to upgrade, with almost all of that time being the missing extension problem. Sculpin continues to be a very simple, robust, and yet easy-to-use system, and I love it for that.


Comments