Skip to content

Version 2.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@PhrozenByte PhrozenByte released this 05 Nov 18:28
· 59 commits to master since this release
2d09e82

First beta release of Pico's official PicoDeprecated plugin for Pico's second major release. This is a pre-release!

Note: Pico's official PicoDeprecated plugin was moved to this separate repository in preparation for Pico 2.0. Refer to Pico's changelog for a list of changes to this plugin before Pico 2.0.

* [New] Update plugin to API v2 and add support for all API v1 events
* [New] Keep track of all loaded Pico plugins and distinguish them by the API
        version they use; deprecated events are only triggered on plugins using
        this particular API version (`PicoDeprecated::API_VERSION_*` constants)
* [New] Take care of triggering events on plugins using older API versions;
        this includes not only core events, but also all custom events; as a
        result, old plugin's always depend on `PicoDeprecated` now
* [New] Use a simple event alias table to keep track of unchanged or just
        renamed core events
* [New] Add `rewrite_url` and `is_front_page` Twig variables
* [New] Add support for the `config/config.php` configuration file
* [New] Additionally compare registered meta headers case-insensitive
* [New] Make meta headers on the first level of a page's meta data also
        available using a lowered key (as of Pico 1.0; i.e. `SomeKey: value` is
        now accessible using both `$meta['SomeKey']` and `$meta['somekey']`)
* [New] Add public `PicoDeprecated::triggersApiEvents()` method
* [New] Add public `PicoDeprecated::triggerEvent()` method (and the additional
        `$apiVersion` parameter) as replacement for the previously protected
        method of the same name
* [Fixed] ! Don't overwrite the global `$config` variable if it is defined
* [Fixed] ! Improve re-indexing of pages added by the API v0 event `get_pages`
* [Changed] No longer try to guess whether the plugin needs to be enabled or
            not, rather enable it by default (guessing was pretty error-prone)
* [Changed] ! Use a scope-isolated `require()` to include configuration files
* [Changed] ! Don't pass `$plugins` parameter to API v1 `onPluginsLoaded` event
            by reference anymore; use `Pico::loadPlugin()` instead
* [Changed] ! The API v1 events `onTwigRegistration` and `onMetaHeaders`, as
            well as the API v0 event `before_twig_register` are no longer part
            of Pico's event flow and are triggered just once on demand
* [Changed] Improve PHP class docs
* [Changed] A vast number of small improvements and changes...
* [Removed] ! Remove support for `PicoParsePagesContent` plugin
* [Removed] ! Remove support for `PicoExcerpt` plugin