Releases: flextype/flextype
1.0.0 alpha 3
Features
- core Core packages updated.
- core Added new package Glowy Benchmark.
1.0.0 alpha 2
Features
-
rest-api Added new Query API 587.
-
entries Added new private fields functionality for entries 585.
- Private field starts with
_
and evailable only in the current entry.
entry.md
--- title: Product item _message: Message... _vars: currency: "USD" vat: "@type[int] [[ strings().random(2, 1234567890) ]]" price: "[[ 100 + _vars.vat ]]" price_with_currency: "[[ price ~ ' ' ~ _vars.currency ]]" --- [[ title ]] // Product item [[ _message ]] // Message...
response
{ "title": "Product item", "price": "120", "price_with_currency": "120 USD" "content": "Product item \n Message..." }
- Private field starts with
-
vars Added new
Vars
service to store global variables. -
directives Added ability to disable expressions using
!expressions
. -
directives Added ability to disable shortcodes using
!shortcodes
. -
directives Added ability to disable markdown using
!markdown
. -
directives Added ability to disable textile using
!textile
. -
directives Added ability to disable php using
!php
. -
directives Added ability to disable types using
!types
. -
expressions Expressions language as a part of Parsers 586.
- From now Expressions are part of Parsers, configurable and available globally.
- Ability to configure opening/closing tags for variables, blocks and comments.
opening_variable_tag: "[[" closing_variable_tag: "]]" opening_block_tag: "[%" closing_block_tag: "%]" opening_comment_tag: "[#" closing_comment_tag: "#]"
- Ability to write multiline expressions
[[ field1 ~ field2 ~ field2 ]]
- Ability to store parsed expressions in the cache.
- Ability to quickly access current entries fields.
[[ field_name ]]
-
expressions Added new expression function
when
. -
expressions Added new expression function
unless
. -
expressions Added new expression function
time
. -
expressions Added new expression function
strtotime
. -
expressions Added new expression function
round
. -
expressions Added new expression function
abs
. -
expressions Added support for
Vars
service. 583- New function
vars()
returns instance ofVars
service. - New function
var()
for quick access to variables stored inVars
service.
- New function
-
shortcodes Added support for
Vars
service. 583- New shortcode
(var)
to get, set, unset and delete variables fromVars
service.
- New shortcode
-
core Added new package
Guzzle
. -
core Added a new
fetch
helper, expression function and shortcode with the ability to fetch data from different sources, entries, files, and URLs. 581
Bug Fixes
-
expressions Fixed
strings
expression function. -
expressions Fixed
Entries
Expressions methods. -
helpers Fixed issue in
collection
helper with limit and offset double check.
BREAKING CHANGES
-
expressions Configuration for expressions moved from entries to parsers section.
-
expressions Use
parsers()->expressions()
instead ofexpressions()
to access methods. -
entries Local
vars
are replaced with global variables and local private fields. -
shortcodes Use
registerShortcodes()
instead ofinitShortcodes()
to register custom shortcodes. -
directives Use
registerDirectives()
instead ofinitDirectives()
to register custom directives. -
exressions Use
registerExpressions()
instead ofinitExpressions()
to register custom expressions.
1.0.0 alpha 1
Features
-
core Minimum PHP version required PHP 8.1.0.
-
core Core application updated from Slim 3 to Slim 4!
See: Upgrade Guide
-
core New PHP-DI added instead of Pimple DI.
See: Usage Guide
-
console Added Extendable Flextype CLI Application.
Flextype CLI Application 1.0.0-alpha.1 Usage: command [options] [arguments] Options: -h, --help Display help for the given command. When no command is given display help for the list command -q, --quiet Do not output any message -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: about Get information about Flextype. completion Dump the shell completion script help Display help for a command list List commands cache cache:clear Clear cache. cache:clear-config Clear cache config. cache:clear-data Clear cache data. cache:clear-routes Clear cache routes. cache:delete Delete item. cache:delete-multiple Delete mutiple items. cache:get Get item. cache:get-multiple Get multiple items. cache:has Check whether cache item exists. cache:set Set item. cache:set-multiple Set multiple items. entries entries:copy Copy entry. entries:create Create entry. entries:delete Delete entry. entries:fetch Fetch entry. entries:has Check whether entry exists. entries:move Move entry. entries:update Update entry. tokens tokens:create Create a new unique token. tokens:delete Delete token entry. tokens:fetch Fetch token entry. tokens:generate Generate token. tokens:generate-hash Generate token hash. tokens:has Check whether token entry exists. tokens:update Update tokens entry. tokens:verify-hash Verify token hash.
-
core Added
Thermage
library for better Flextype CLI Application styling. -
core Added ability to execute specific project related code.
before-plugins
to bootstrap file before plugins intialization.after-plugins
to bootstrap file after plugins intialization.
-
core Added new core constants:
FLEXTYPE_PROJECT_NAME
,FLEXTYPE_PATH_PROJECT
,FLEXTYPE_PATH_TMP
,FLEXTYPE_START_TIME
. -
core Added ability to run Flextype in silent mode by disabling
app
andcli
. -
core Added New Glowy PHP Packages
View
,Macroable
,Strings
,Arrays
,Csrf
,Filesystem
,Registry
,Session
. -
core Added built-in I18n module.
-
core Added ability to override default constants
-
entries Added new functionality that allows implementing Virtual Entries by overriding default entries CRUD methods with the help of events.
-
entries Added ability to create completely customisable high-level collections for entries with their fields and various formats.
-
entries Added ability to set custom events for each entries collections.
-
entries Added ability to create and use entries fields directives.
See: Documentation
-
entries Added ability to create custom entries macros.
Built-in macros:
entries
,php
,registry
. -
entries Added new method
registry
to get entries registry. -
entries Added new method
options
to get entries options. -
entries Added new method
setOptions
to set entries options. -
entries Added new method
setRegistry
to set entries registry. -
entries Added ability to override logic for built-in custom fields.
Example:
If you want to have your custom logic for processing fielduuid
just update flextype project settings.from:
... entries: default: ... fields: ... uuid: enabled: true path: "src/flextype/core/Entries/Fields/Default/UuidField.php" ... ... ... ...
to:
... entries: default: ... fields: ... uuid: enabled: true path: "project/plugins/your-custom-plugin/Entries/Fields/Default/UuidField.php" ... ... ... ...
-
directives Added new directive
@type
to set field type. -
directives Added new directive
@markdown
to parse markdown text inside current field. -
directives Added new directive
@shortcodes
to parse shortcodes text inside current field. -
directives Added new directive
@textile
to parse textile text inside current field. -
directives Added new directive
@php
to execute php code text inside current field. -
directives Added new directive
[[ ]]
to eval expression. -
endpoints All Rest API Endpoints codebase was rewritten from scratch.
-
endpoints Added new Rest API Endpoint
POST /api/v1/cache/clear
to clear cache. -
endpoints Added new Rest API Endpoint
POST /api/v1/tokens/generate
to generate token hash. -
endpoints Added new Rest API Endpoint
POST /api/v1/tokens/verify-hash
to verify token hash. -
endpoints Added new Rest API Endpoint
POST /api/v1/tokens
to create token entry. -
endpoints Added new Rest API Endpoint
PATCH /api/v1/tokens
to update token entry. -
endpoints Added new Rest API Endpoint
DELETE /api/v1/tokens
to delete token entry. -
endpoints Added new Rest API Endpoint
GET /api/v1/tokens
to fetch token entry. -
csrf Added Glowy CSRF protection for Cross Site Request Forgery protection by comparing provided token with session token to ensure request validity.
-
frontmatter Added ability to define custom frontmatter header parsers for entries. Example: instead of first
---
you may set serializer---json
,---json5
---yaml
or---neon
. -
serializers Added new serializer
Json5
.See: Documentation
-
serializers Added new serializer
Neon
.See: Documentation
-
serializers Added ability to set global settings for all built-in serializers.
src/flextype/settings.yaml
serializers: json: decode: cache: enabled: true string: "" assoc: true depth: 512 flags: 0 encode: options: 0 depth: 512 json5: decode: cache: enabled: true string: "" assoc: true depth: 512 flags: 0 encode: options: 0 depth: 512 yaml: decode: cache: enabled: true string: "" native: true flags: 0 encode: inline: 10 indent: 2 flags: 0 frontmatter: decode: cache: enabled: true string: "" cache_id_string: "" header: serializer: yaml allowed: ['yaml', 'json', 'json5', 'neon'] encode: header: serializer: yaml allowed: ['yaml', 'json', 'json5', 'neon'] neon: decode: cache: enabled: true string: "" encode: blockMode: false indentation: "\t" phparray: decode: cache: enabled: true string: "" encode: wrap: true
-
serializers Added ability to set specific header serializer for
Frontmatter
serializer (default is YAML).src/flextype/settings.yaml
frontmatter: decode: cache: enabled: true string: "" cache_id_string: "" header: serializer: yaml allowed: ['yaml', 'json', 'json5', 'neon'] encode: header: serializer: yaml allowed: ['yaml', 'json', 'json5', 'neon']
-
parsers Markdown parser Commonmark updated to v2
-
parsers Added new Textile parser.
-
parsers Added ability to set global settings for all parsers.
src/flextype/settings.yaml
parsers: markdown: cache: enabled: true string: "" commonmark: renderer: block_separator: "\n" inner_separator: "\n" soft_break: "\n" commonmark: enable_em: true enable_strong: true use_asterisk: true use_underscore: true unordered_list_markers: ['-', '*', '+'] html_input: 'allow' allow_...
0.9.16
Features
-
parsers add commonmark instead of parsedown (#540)
-
shortcodes add new shortcode - media_files_fetch
example:
[media_files_fetch id="entries/home/foo.txt" field="title" default="Bar"]
Bug Fixes
- bootstrap fix include path for dependencies.
Refactoring
- core general code refactoring and improvements.
Update from Flextype 0.9.15 to Flextype 0.9.16
- Backup your Site First!
- Download flextype-0.9.16.zip
- Unzip the contents to a new folder on your local computer.
- Remove on your server this folders and files:
src/ vendor/ var/ index.php
- Upload on your server this folders and files:
src/ vendor/ index.php
- Update all your plugins!
- Clear browser cache!
0.9.15
Features
- media add method
has()
for Media Folders (#534) - entries simplify functionality to work with online entries storage. (#536)
- parsers move markdown and shortcode settings under parsers setting. (#539)
Bug Fixes
- entries fix issue with individual entries cache field (#537)
- plugins fix issue with empty manifest and settings yaml files (#538)
BREAKING CHANGES
-
entries according to this ticket (#536) we have several changes for entries storage.
- use
flextype('entries')->storage()->get()
instead offlextype('entries')->getStorage()
- use
flextype('entries')->storage()->set()
instead offlextype('entries')->setStorage()
- use
flextype('entries')->storage()->has()
instead offlextype('entries')->hasStorage()
- use
flextype('entries')->storage()->delete()
instead offlextype('entries')->deleteStorage()
note: all method from Atomastic Arrays are available for Arrays Storage Object manipulations
docs: https://github.com/atomastic/arrays - use
Update from Flextype 0.9.14 to Flextype 0.9.15
- Backup your Site First!
- Download flextype-0.9.15.zip
- Unzip the contents to a new folder on your local computer.
- Remove on your server this folders and files:
src/ vendor/ var/ index.php
- Upload on your server this folders and files:
src/ vendor/ index.php
- Update all your plugins!
- Clear browser cache!
0.9.14
Features
-
core Moving to PHP 7.4.0 (#524)
-
plugins Set default plugin priority 100 and SORT them ascending (#523)
Bug Fixes
-
core fix issue with Rest API endpoints detection. (#522)
-
entries fix issue with empty variable $data in fetch() method. (#531)
-
entries fix issue with deleteStorage() method return data.
Refactoring
- core general code refactoring and improvements.
Update from Flextype 0.9.13 to Flextype 0.9.14
- Backup your Site First!
- Download flextype-0.9.14.zip
- Unzip the contents to a new folder on your local computer.
- Remove on your server this folders and files:
src/ vendor/ var/ index.php
- Upload on your server this folders and files:
src/ vendor/ index.php
- Update all your plugins!
- Read updated PLUGINS BREAKING CHANGES section! - Site Plugin and Twig Plugin has breaking changes
- Clear browser cache!
0.9.13
Features
-
media-files we will use
fetch()
method as entry point to execute different methods withfetch
prefix. (#508)/** * Fetch. * * @param string $id The path to file. * @param array $options Options array. * * @access public * * @return self Returns instance of The Arrays class. */ public function fetch(string $id, array $options = []): Arrays
Media Files API is macroable and we will able to add any custom fetch methods for receiving data from different sources.
flextype('media')->files()::macro('fetchFromOtherStorage', function(string $id, array $options) { // fetch data from Other Storage using $id and $options }); $data = flextype('media')->files()-> fetchFromOtherStorage($id, $options);
-
media-folders we will use
fetch()
method as entry point to execute different methods withfetch
prefix. (#509)/** * Fetch. * * @param string $id The path to folder. * @param array $options Options array. * * @access public * * @return self Returns instance of The Arrays class. */ public function fetch(string $id, array $options = []): Arrays
Media Folders API is macroable and we will able to add any custom fetch methods for receiving data from different sources.
flextype('media')->folders()::macro('fetchFromOtherStorage', function(string $id, array $options) { // fetch data from Other Storage using $id and $options }); $data = flextype('media')->folders()-> fetchFromOtherStorage($id, $options);
-
entries we will use
fetch()
method as entry point to execute different methods withfetch
prefix. (#495)/** * Fetch. * * @param string $id Unique identifier of the entry. * @param array $options Options array. * * @access public * * @return mixed */ public function fetch(string $id, array $options = []): Arrays
Entries API is macroable and we will able to add any custom fetch methods for receiving data from different sources.
flextype('entries')::macro('fetchXML', function(string $id, array $options) { // fetch data from XML using $id and $options }); $data = flextype('entries')->fetchXML($id, $options);
-
images we will use
media/
folder instead ofuploads/entries/
(#516) -
serializers standardise serializers container names with macroable ability. (#518)
New methods to access Serializers:
flextype('serializers')->yaml() flextype('serializers')->json() flextype('serializers')->frontmatter()
Adding macros:
flextype('serializers')::macro('NAME', CALLBACK_FUNCTION() {});
-
parsers standardise parsers container names with macroable ability. (#519)
New methods to access Parsers:
flextype('parsers')->shortcode() flextype('parsers')->markdown()
Adding macros:
flextype('parsers')::macro('NAME', CALLBACK_FUNCTION() {});
-
media standardise media container names with macroable ability for Media API. (#517)
New macroable common class for all media -
class Media
New methods to access Media API:
flextype('media')->files() flextype('media')->files()->meta() flextype('media')->folders() flextype('media')->folders()->meta()
Adding macros:
flextype('media')::macro('NAME', CALLBACK_FUNCTION() {}); flextype('media')->files()::macro('NAME', CALLBACK_FUNCTION() {}); flextype('media')->files()->meta()::macro('NAME', CALLBACK_FUNCTION() {}); flextype('media')->folders()::macro('NAME', CALLBACK_FUNCTION() {}); flextype('media')->folders()->meta()::macro('NAME', CALLBACK_FUNCTION() {});
-
fields add new field
registry.get
for Registry API (#494)Registry API provides method
get()
for retrieving data from registry and we should able to access them inside entries frontmatter header for retrieving data right in the entries.Basic Example
Sample entry with several queries and with several nested queries inside of children entries.
File:
/project/entries/registry-root/entry.md
--- title: Root registry: get: flextype: key: flextype.manifest.name author.name: key: flextype.manifest.author.name license: key: flextype.manifest.license entries: fetch: level1: id: registry-root/level-1 ---
Setting for this fields
File:
/project/config/flextype/settings.yaml
entries: fields: registry: get: enabled: true
Valid values for setting enabled is true or false
-
fields add new field
entries.fetch
for Entries API (#492)Entries API provides methods for entries fetch:
fetch()
and we should able to access them inside entries frontmatter header for fetching data right in the entries. Also, we will able to add and use any kind of fetch methods with our macroable functionality.Basic Example
Catalog entry with several queries and with several nested queries inside of children entries.
File:
/project/entries/catalog/entry.md
--- title: Catalog visibility: visible entries: fetch: label1: id: discounts/50-off options: filter: limit: 4 bikes: id: catalog/bikes options: collection: true filter: where: - key: brand operator: eq value: gt limit: 10 discounts: id: discounts options: collection: true filter: where: - key: title operator: eq value: '30% off' - key: category operator: eq value: bikes ---
Setting for this fields
File:
/project/config/flextype/settings.yaml
entries: fields: entries: fetch: enabled: true result: toObject
Valid values for setting enabled is true or false
Valid values for setting result is toObject or toArray -
fields add new field
media.files.fetch
andmedia.folders.fetch
for Media API's (#501) (#500)Media API's provides methods for files and folders fetch:
fetch()
and we should able to access them inside entries frontmatter header for fetching data right in the entries. Also, we will able to add and use any kind of fetch methods with our macroable functionality.--- title: Media media: folders: fetch: macroable_folder: id: 'foo' options: method: fetchExtraData foo_folder: id: 'foo' collection_of_folders: id: '/' options: collection: true files: fetch: macroable_file: id: 'foo' options: method: fetchExtraData foo_file: id: foo.txt collection_of_files: id: '/' options: collection: true ---
Setting for this fields
File:
/project/config/flextype/settings.yaml
entries: fields: media: files: fetch: enabled: true result: toObject folders: fetch: enabled: true result: toObject
Valid values for setting enabled is true or false
Valid values for setting result is toObject or toArray -
entries add new method
deleteStorage()
for Entries API (#498) -
entries add new method
hasStorage()
for Entries API (#497) -
core add new method
isApiRequest
to Determine API Request in the basic core functionality. (#507) -
rest-api-entries add ability to send options for
fetch()
methods in Entries Rest API. (#504)Fetch single
GET /api/entries?id=YOUR_ENTRY_ID&token=YOUR_ENTRIES_TOKEN
Fetch single with options
GET /api/entries?id=YOUR_ENTRY_ID&options=[filter]&token=YOUR_ENTRIES_TOKEN
Fetch collection
GET /api/entries?id=YOUR_ENTRY_ID&options[collection]=true&token=YOUR_ENTRIES_T...
0.9.12
Features
-
core add Atomastic Components instead of Flextype Components (#478)
Added:
- atomastic/session
- atomastic/arrays
- atomastic/filesystem
- atomastic/registry
- atomastic/strings
-
entries Entries API return Arrays Object instead of plain array on fetch. (#485)
From no we have ability to work with entries singles and collections as with smart objects
for further data manipulations with help of Atomastic Arrays Component.Example:
// Fetch random 10 posts created by Awilum and sort them by published_at field. $posts = flextype('entries') ->fetchCollection('blog') ->where('author.name', 'eq', 'Awilum') ->sortBy('published_at') ->limit(10) ->random();
-
entries Standardize Entries API fetch. (#486)
-
entries Standardize Media Files API fetch. (#487)
-
entries Standardize Media Folders API fetch. (#488)
-
entries Add ability to extend Core class with Macros. (#489)
-
cache add new cache engine - PHPFastCache instead of Doctrine Cache (#457)
New config for PhpFastCache
https://github.com/flextype/flextype/blob/dev/src/flextype/settings.yaml#L127-L241
New methods from PhpFastCache
We are start using PhpFastCache PSR16 adapter
https://github.com/PHPSocialNetwork/phpfastcache -
core Unit Test powered by PestPHP.
-
media add new
move()
method instead ofrename()
-
entries add new
move()
method instead ofrename()
-
core add new
PATH['tmp']
constant (#470)Now we have:
PATH['tmp']
constant instead ofPATH['cache']
andPATH['logs']
-
markdown add markdown basic settings (#471)
markdown: auto_line_breaks: false auto_url_links: false escape_markup: false
-
markdown add ability to access markdown parser instance (#468)
Usage:
$markdown = flextype('markdown')->getInstance();
-
entries add new Flextype Entries Memory Storage (Flextype EMS). New private property
$storage
for storing current requested entry(or entries) data and all Entries CRUD operations data in memory with ability to change them dynamically on fly. New public methodsgetStorage()
setStorage()
(#467)Structure (Flextype EMS):
$storage = [ 'fetch' => [ 'id' => '', 'data' => '', ], 'create' => [ 'id' => '', 'data' => '', ], 'update' => [ 'id' => '', 'data' => '', ], 'delete' => [ 'id' => '', ], 'copy' => [ 'id' => '', 'new_id' => '', ], 'move' => [ 'id' => '', 'new_id' => '', ], 'has' => [ 'id' => '', ], ];
Accessing storage example:
flextype('emitter')->addListener('onEntryAfterInitialized', static function () : void { flextype('entries')->setStorage('fetch.data.title', 'New title'); }); $entry = flextype('entries')->fetchSingle('about'); echo $entry['title'];
-
entries add new events:
onEntryHas
,onEntryInitialized
,onEntriesInitialized
(#467) -
helpers add new support helper
find()
for files and directories searching instead offind_filter()
-
helpers add new support helper
filter()
for data collection filtering instead ofarrays_filter()
Bug Fixes
-
entries fix issue with
delete()
method (#465) -
media fix issue with
exif_read_data()
on files upload.
Refactoring
- entries remove App from all core namespaces (#469)
BREAKING CHANGES
-
entries removed properties from Entries API (#467)
$entry_id $entry $entry_create_data $entry_update_data $entries_id $entries
Use public methods
getStorage()
setStorage()
instead.Example:
// old flextype('entries')->entry['title'] = 'New title'; // new flextype('entries')->setStorage('fetch.data.title', 'New title'); // old $title = flextype('entries')->entry['title']; // new $title = flextype('entries')->getStorage('fetch.data.title'); $title = flextype('entries')->getStorage('fetch.data')['title'];
-
core Removed App from all core namespaces (#469)
We should have
use Flextype\Foundation\Entries\Entries;
instead of
use Flextype\App\Foundation\Entries\Entries;
-
core use new
PATH['tmp']
constant instead ofPATH['cache']
andPATH['logs']
(#470) -
cache old cache config removed, use new config for PhpFastCache (#457)
-
cache use methods
has()
set()
get()
instead ofcontains()
save()
fetch()
(#457) -
core remove flextype-components/session (#473)
-
core remove flextype-components/cookie (#473)
-
core remove flextype-components/number (#474)
-
core remove flextype-components/filesystem (#474)
-
core remove flextype-components/arrays (#474)
Update from Flextype 0.9.11 to Flextype 0.9.12
- Backup your Site First!
- Read BREAKING CHANGES section!
- Download flextype-0.9.12.zip
- Unzip the contents to a new folder on your local computer.
- Remove on your server this folders and files:
src/ vendor/ var/ index.php
- Upload on your server this folders and files:
src/ vendor/ index.php
- Update all your plugins!
- Clear browser cache!
0.9.11
Features
-
New helper function added for access all Flextype features in one place
flextype($container_name = null, $container = [])
IMPORTANT
Do not use
$flextype
object to access Flextype features, useflextype()
helper function.
Bug Fixes
- core fix bug - Cannot access protected property Flextype\App\Foundation\Flextype::$container (#462)
- core fix bug - Cannot use object of type Flextype\App\Foundation\Flextype as array (#461)
- media fix Media exif_read_data warning - File not supported (#464)
Refactoring
- plugins remove $flextype variable from plugins init method.
- entries update return type for fetch() method.
- entries add additional check for getTimestamp() method in the getCacheID()
- entries remove dead code from fetchCollection() method.
Vendor Updates
- core: Update vendor flextype-components/filesystem to 2.0.8
- core: Update vendor ramsey/uuid to 4.1.1
Update from Flextype 0.9.10 to Flextype 0.9.11
- Backup your Site First!
- Read BREAKING CHANGES section!
- Download flextype-0.9.11.zip
- Unzip the contents to a new folder on your local computer.
- Remove on your server this folders and files:
src/ vendor/ index.php
- Upload on your server this folders and files:
src/ vendor/ index.php
- Clear browser cache!
0.9.10
Features
-
core Moving to PHP 7.3.0 (#456)
-
core add new class
Flextype
that extendsSlim\App
(#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)Example:
...->only(['id', 'title'])->...
-
entries Rename path to id in Entries API (#453)
New implementation
// Entry properties $entry_id $entries_id // Arguments $id $new_id
-
shortcode add New Shortcode (#454)
[raw] Raw shortcode content [/raw]
-
shortcode add New Shortcode Methods (#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
- entries fix issue with entries paths on Windows (#460)
- cache fix issue with
purge()
method. (#451) - entries fix wrong Implementation of Slug Field for Entries (#452)
- entries add new entry field
id
(#452)
BREAKING CHANGES
-
entries Rename path to id in Entries API (#453)
Old Entry properties
$entry_path $entries_path
New Entry properties
$entry_id $entries_id
-
entries fix wrong Implementation of Slug Field for Entries (#452)
From now we have entry fields:
slug
with current entry slug.Example:
flextype-0.9.10
id
with current entry full path as it is was for slug field.Example:
blog/flextype-0.9.10
-
shortcode We should use
process()
method instead ofparse()
for shortcode processing. (#454)Example of new usage in PHP:
...->shortcode->process($input, $cache);
-
core
$container
,$flextype
and$app
objects removed! (#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(....)
-
core class
Container
removed! (#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('.....'); } }
Update from Flextype 0.9.9 to Flextype 0.9.10
- Backup your Site First!
- Read BREAKING CHANGES section!
- Download flextype-0.9.10.zip
- Unzip the contents to a new folder on your local computer.
- Remove on your server this folders and files:
src/ vendor/ index.php
- Upload on your server this folders and files:
src/ vendor/ index.php
- Remove folder
var/
! - Clear browser cache!