Skip to content

Instantly share code, notes, and snippets.

@Schlaefer

Schlaefer/1.6.md Secret

Last active August 29, 2015 14:26
Show Gist options
  • Save Schlaefer/0b3d35a5321fcf13b544 to your computer and use it in GitHub Desktop.
Save Schlaefer/0b3d35a5321fcf13b544 to your computer and use it in GitHub Desktop.

Noteworthy Changes

  • add method Model\Page::getRawContent() #242
  • change default markdown tab width to 4 spaces1 #232/#233
  • improve ErrorHandler\Development #231
  • fix routing if a base-URL path-part also exists in content-URL #245/#246
  • setup-check is now performed in a plugin #247
  • lazy load 'pages' template variable2 #256/#257
  • use YAML parser for meta-data evaluation3 #259
  • remove theme/default/style.css4 #237/#264

For other improvements and bugfixes see the full changelog.

Update Notes

1If you have code intended by less then 4 spaces in your existing markdown files you have to set the parser config back to 2 spaces to restore the old behaviour. Or update your markdown files accordingly.

3There's one new composer dependency "symfony/yaml": "^2.7". So if you have installed Phile via composer don't forget to update the composer.json and run composer update.

Because the meta data is parsed by YAML now you can't rely on retrieving the same string you wrote for e.g. dates in your content file anymore. Instead you'll get a unix timestamp. You have to use meta.formattedDate instead of meta.date. But you already did that to apply the format defined in your global Phile config.php/default_config.php, right?. If not, now is a good time to start. You can still use a date directly but you have to format it manually, e.g. Twig: meta.date|date('<your date format>').

4theme/default/style.css was never used by Phile. But if you have accidentally picked that file up in your own code/templates please refer to theme/default/css/style.css now.

Plugin/Dev Notes

After discussion #234 Phile strives to follow semver versioning. So the 1.6 API should be backwards-compatible to 1.5. If you encounter any problems when updating please submit an issue.

2Repositoryl\Page::findAll() doesn't return a array anymore but a traversable object with array access. If you need a raw array straight away you can call $repository->findAll()->toArray();.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment