{
    "href": "/post/2023/04/10/qiq-templates-20-released/",
    "relId": "2023/04/10/qiq-templates-20-released",
    "title": "Qiq Templates 2.0 Released",
    "author": "pmjones",
    "tags": [
        {
            "href": "/tag/programming/",
            "relId": "programming",
            "title": "Programming",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/php/",
            "relId": "php",
            "title": "PHP",
            "author": null,
            "created": null,
            "updated": [],
            "markup": "markdown"
        },
        {
            "href": "/tag/qiq/",
            "relId": "qiq",
            "title": "Qiq",
            "author": null,
            "created": "2021-10-20 16:48:23 UTC",
            "updated": [
                "2021-10-20 16:48:23 UTC"
            ],
            "markup": "markdown"
        }
    ],
    "created": "2023-04-10 20:49:18 UTC",
    "updated": [
        "2023-04-10 20:49:18 UTC",
        "2023-04-10 20:49:54 UTC",
        "2023-04-10 20:57:19 UTC",
        "2023-04-10 21:00:49 UTC",
        "2023-04-10 21:01:12 UTC"
    ],
    "markup": "markdown",
    "html": "<p>I am happy to annouce the <a href=\"https://packagist.org/packages/qiq/qiq\">2.0 release</a> of <a href=\"https://qiqphp.com\">Qiq templates for PHP 8</a>.</p>\n<p>Qiq is for developers who prefer native PHP templates, but with less verbosity. It offers:</p>\n<ul>\n<li>Native <code>&lt;?php ?&gt;</code> and <code>{{ qiq }}</code> <a href=\"https://qiqphp.com/2.x/syntax.html\">syntax</a>\n</li>\n<li>Concise, explicit, context-specific escaping</li>\n<li>Views, <a href=\"https://qiqphp.com/2.x/layouts.html\">layouts</a>, and <a href=\"https://qiqphp.com/2.x//partials.html\">partials</a>\n</li>\n<li>\n<a href=\"https://qiqphp.com/2.x/blocks.html\">Blocks</a> and <a href=\"https://qiqphp.com/2.x/inheritance.html\">inheritance</a>\n</li>\n<li>Rich and extensible <a href=\"https://qiqphp.com/2.x/helpers/overview.html\">HTML helpers</a>\n</li>\n<li>Easy-to-implement <a href=\"https://qiqphp.com/2.x/static-analysis.html\">static analysis</a>\n</li>\n<li>Full documentation and unit-testing</li>\n</ul>\n<p>This release incorporates several substantial changes; you can see the upgrade notes <a href=\"https://qiqphp.com/2.x/upgrading.html\">here</a>.</p>\n<p>The most important of these changes is that Qiq templates are now easily subject to <a href=\"https://qiqphp.com/2.x/static-analysis.html\">static analysis</a>. Add a docblock typehint for <code>$this</code> in your template files, recompile any templates using Qiq syntax, and run your static analyzer against your templates. Yes, it's that easy.</p>\n<p>The way helpers are implemented has also changed. Previously, you would have to register your helper class with a helper locator, but that made static analysis more difficult. As of this release, helpers are now just <a href=\"https://qiqphp.com/2.x/helpers/custom.html\">methods on a <em>Helpers</em> class</a>, which makes static analysis simple and straightforward. To add a helper, extend the <em>Helpers</em> class and write any method you like. In addition, all helper objects are retained in a PSR-11 container object; use the <a href=\"https://github.com/qiqphp/qiq/blob/2.x/src/Container.php\">lightweight <em>Container</em> provided by Qiq</a>, or bring your own (maybe <a href=\"http://capsulephp.com\">Capsule</a>).</p>\n<p>Finally, a Twig-like implementation of \"blocks\" and \"inheritance\" has been added to this release, and backported to the latest 1.x release.</p>\n<p>If you're a Twig user looking to branch out, or if you like native PHP templates but want something a little more concise, try <a href=\"https://qiqphp.com\">Qiq</a>!</p>\n"
}
