1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-10 15:14:20 +02:00

chore(changelog): update changelog

This commit is contained in:
Awilum
2020-08-19 11:06:51 +03:00
parent 30b097d324
commit f4dd5b69fe

View File

@@ -1,8 +1,39 @@
<a name="0.9.10"></a>
# [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('.....');
}
}
```
<a name="0.9.9"></a>
# [0.9.9](https://github.com/flextype/flextype/compare/v0.9.8...v0.9.9) (2020-08-05)