From f4dd5b69fe99e294a7d169d56bd730bd021aa8da Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 19 Aug 2020 11:06:51 +0300 Subject: [PATCH] chore(changelog): update changelog --- CHANGELOG.md | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65960a7e..b4c7cfed 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,39 @@ -# [0.9.10](https://github.com/flextype/flextype/compare/v0.9.9...v0.9.10) (2020-08-xx) +# [0.9.10](https://github.com/flextype/flextype/compare/v0.9.9...v0.9.10) (2020-08-19) ### Features +* **core** Moving to PHP 7.3.0 ([#456](https://github.com/flextype/flextype/issues/456)) +* **core** add new class `Flextype` that extends `Slim\App` ([#458](https://github.com/flextype/flextype/issues/458)) + + with methods: + + ``` + /** + * Get Dependency Injection Container. + * + * @param string $key DI Container key. + */ + public function container(?string $key = null) + + /** + * Returns Flextype Instance + */ + public static function getInstance() + + /** + * This method will returns the current Flextype version + */ + public static function getVersion() : string + ``` + +* **collection** Add `only()` method for Collection ([#455](https://github.com/flextype/flextype/issues/455)) + + Example: + ``` + ...->only(['id', 'title'])->... + ``` + * **entries** Rename path to id in Entries API ([#453](https://github.com/flextype/flextype/issues/453)) New implementation @@ -16,9 +47,32 @@ $new_id ``` +* **shortcode** add New Shortcode ([#454](https://github.com/flextype/flextype/issues/454)) + + ``` + [raw] Raw shortcode content [/raw] + ``` + +* **shortcode** add New Shortcode Methods ([#454](https://github.com/flextype/flextype/issues/454)) + + ``` + // Get shortcode instance. + getInstance() + + // Add shortcode handler. + addHandler(string $name, $handler) + + // Add event handler. + addEventHandler($name, $handler) + + // Processes text and replaces shortcodes. + process(string $input, bool $cache = true) + ``` + ### Bug Fixes -* **cache** fix issue with purge() method. ([#451](https://github.com/flextype/flextype/issues/451)) +* **entries** fix issue with entries paths on Windows ([#460](https://github.com/flextype/flextype/issues/460)) +* **cache** fix issue with `purge()` method. ([#451](https://github.com/flextype/flextype/issues/451)) * **entries** fix wrong Implementation of Slug Field for Entries ([#452](https://github.com/flextype/flextype/issues/452)) * **entries** add new entry field `id` ([#452](https://github.com/flextype/flextype/issues/452)) @@ -56,6 +110,80 @@ blog/flextype-0.9.10 ``` +* **shortcode** We should use `process()` method instead of `parse()` for shortcode processing. ([#454](https://github.com/flextype/flextype/issues/454)) + + Example of new usage in PHP: + + ``` + ...->shortcode->process($input, $cache); + ``` + +* **core** `$container`, `$flextype` and `$app` objects removed! ([#458](https://github.com/flextype/flextype/issues/458)) + + We should use new object `$flextype` as it is a consolidate entry point to all Flextype features. + + Here is some examples: + + ``` + // OLD + $app->get(...) + $app->post(...) + ... + + // NEW + $flextype->get(...) + $flextype->post(...) + ... + ``` + ``` + // OLD + $container['registry'] = static function ($container) { + return new Registry($container); + }; + + $container->registry->get(...) + + // NEW + $flextype->container()['registry'] = static function () use ($flextype) { + return new Registry($flextype); + }; + + $flextype->container('registry')->get(....) + ``` + +* class `Container` removed! ([#458](https://github.com/flextype/flextype/issues/458)) + + We should use `$flextype` object to access all Flextype features inside Service Controllers and Models. + + Here is some examples: + + ``` + // OLD + class FooController extends Container + { + public function bar() + { + return $this->registry->get('.....'); + } + } + + // NEW + class FooController + { + protected $flextype; + + public function __construct($flextype) + { + $this->flextype = $flextype; + } + + public function bar() + { + return $this->flextype->container('registry')->get('.....'); + } + } + ``` + # [0.9.9](https://github.com/flextype/flextype/compare/v0.9.8...v0.9.9) (2020-08-05)