All Versions
38
Latest Version
Avg Release Cycle
34 days
Latest Release
275 days ago

Changelog History
Page 1

  • v0.9.16 Changes

    January 14, 2021

    ๐Ÿ”‹ Features

    • ๐Ÿ“œ parsers: Added commonmark instead of parsedown (#540)
    • shortcodes: Added new shortcode - media_files_fetch

      example:

      [media_files_fetch id="entries/home/foo.txt" field="title" default="Bar"]
      

    ๐Ÿ› Bug Fixes

    • bootstrap: Fixed include path for dependencies.

    โ™ป๏ธ Refactoring

    • core: general code refactoring and improvements.
  • v0.9.15 Changes

    January 03, 2021

    ๐Ÿ”‹ Features

    • media: Added 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: Fixed issue with individual entries cache field (#537)
    • ๐Ÿ”Œ plugins: Fixed 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 of flextype('entries')->getStorage()
      • use flextype('entries')->storage()->set() instead of flextype('entries')->setStorage()
      • use flextype('entries')->storage()->has() instead of flextype('entries')->hasStorage()
      • use flextype('entries')->storage()->delete() instead of flextype('entries')->deleteStorage()

      note: all method from Atomastic Arrays are available for Arrays Storage Object manipulations docs: https://github.com/atomastic/arrays

  • v0.9.14 Changes

    December 30, 2020

    ๐Ÿ”‹ Features

    • core: Moving to PHP 7.4.0 (#524)

    • ๐Ÿ”Œ plugins: Set default plugin priority 100 and SORT them ascending (#523)

    ๐Ÿ› Bug Fixes

    • core: Fixed issue with Rest API endpoints detection. (#522)

    • entries: Fixed issue with empty variable $data in fetch() method. (#531)

    • entries: Fixed issue with deleteStorage() method return data.

    โ™ป๏ธ Refactoring

    • core: general code refactoring and improvements.
  • v0.9.13 Changes

    December 20, 2020

    ๐Ÿ”‹ Features

    • media-files: we will use fetch() method as entry point to execute different methods with fetch 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 Added 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 with fetch 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 Added 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 with fetch 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 Added 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 of uploads/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 Added 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 Added 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 Added 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 Added new field media.files.fetch and media.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 Added 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: Added new method deleteStorage() for Entries API (#498)

    • entries: Added new method hasStorage() for Entries API (#497)

    • core: Added new method isApiRequest to Determine API Request in the basic core functionality. (#507)

    • rest-api-entries Added 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_TOKEN
      

      Fetch collection with options

      GET /api/entries?id=YOUR_ENTRY_ID&options[collection]=true&options=[find]&[filter]&token=YOUR_ENTRIES_TOKEN
      
    • rest-api-entries Added ability to call macroable fetch methods. (#505)

      With help of query option ?options[method]= we should able to call any macroable fetch methods.

      Example

      Macroable method XML

      flextype('entries')::macro('fetchXml', function(string $id, array $options) {
        return ['XML DATA HERE'];
      });
      

      HTTP GET:

      GET /api/entries?id=YOUR_ID&options[method]=fetchXml&token=YOUR_ENTRIES_TOKEN
      
    • rest-api-media reorganize endpoints for Media Rest API (#514)

    • rest-api-media Added ability to call macroable fetch methods for Folder. (#512)

      With help of query option ?options[method]= we should able to call any macroable fetch methods.

      Example

      Macroable method

      flextype('media')->folders()::macro('fetchFromOtherStorage', function(string $id, array $options) {
        // fetch data from Other Storage using $id and $options
      });
      

      HTTP GET:

      GET /api/folders?id=YOUR_MEDIA_FILES_ID&options[method]= fetchFromOtherStorage&token=YOUR_MEDIA_FOLDERS_TOKEN
      
    • rest-api-media Added ability to call macroable fetch methods for Files. (#513)

      With help of query option ?option[method]= we should able to call any macroable fetch methods.

      Example

      Macroable method

      flextype('media')->files()::macro('fetchFromOtherStorage', function(string $id, array $options) {
        // fetch data from Other Storage using $id and $options
      });
      

      HTTP GET:

      GET /api/files?id=YOUR_MEDIA_FILES_ID&option[method]=fetchFromOtherStorage&token=YOUR_MEDIA_FILES_TOKEN
      

    ๐Ÿ› Bug Fixes

    • fields Fixed issue with slug field in Entries API (#520)

    • core: Fixed issue with invalid timezone setting (#490)

    • entries: Fixed issue with not exists entries collections. (#503)

    • entries: Fixed issue with collisions in Entries API $storage for entries fetching. (#496)

    • rest-api-entries Fixed issue with 404 status code in Entries Rest API (#502)

    • rest-api: Fixed issue with Rest API endpoints initialisation. (#506)

    ๐Ÿ’ฅ BREAKING CHANGES

    • media: standardise media container names with macroable ability for Media API. (#517)

      NEW CONTAINER OLD CONTAINER
      media media_files, media_files_meta, media_folders, media_folders_meta
    • ๐Ÿ“œ parsers: standardise parsers container names with macroable ability. (#519)

      NEW CONTAINER OLD CONTAINER
      parsers shortcode, markdown
    • serializers: standardise serializers container names with macroable ability. (#518)

      NEW CONTAINER OLD CONTAINER
      serializers yaml, json, frontmatter
    • rest-api-media reorganize endpoints for Media Rest API (#514)

      NEW ENDPOINT OLD ENDPOINT
      GET /api/media/files /api/files
      POST /api/media/files /api/files
      PUT /api/media/files /api/files
      PATCH /api/media/files /api/files
      DELETE /api/media/files /api/files
      POST /api/media/files/copy /api/files/copy
      PATCH /api/media/files/meta /api/files/meta
      POST /api/media/files/meta /api/files/meta
      DELETE /api/media/files/meta /api/files/meta
      GET /api/media/folders /api/folders
      POST /api/media/folders /api/folders
      PATCH /api/media/folders /api/folders
      DELETE /api/media/folders /api/folders
      POST /api/media/folders/copy /api/folders/copy

      Tokens:

      • token for files should be moved from /tokens/files/ to /tokens/media/files/
      • token for folders should be moved from /tokens/folders/ to /tokens/media/folders/

      Settings:

      api:
        ...
        media:
          files:
            enabled: true
            default_token:
          folders:
            enabled: true
            default_token:
      
    • helpers filter helper return array result every time and not int or bool. (#493)

    • helpers filter helper not support slice_offset and slice_limit because they are are duplicates already exists functionality offset and limit. (#493)

    • helpers filter helper not support count and exists. (#493)

    • entries: we have changes in the events names for Entries API (#499)

      Events:

      onEntriesFetch
      onEntriesFetchSingle instead of onEntryInitialized
      onEntriesFetchSingleCacheHasResult instead of onEntryAfterCacheInitialized
      onEntriesFetchSingleNoResult
      onEntriesFetchSingleHasResult instead of onEntryAfterInitialized
      onEntriesFetchCollection instead of onEntriesInitialized
      onEntriesFetchCollectionHasResult instead of onEntriesAfterInitialized
      onEntriesFetchCollectionNoResult
      onEntriesMove instead of onEntryMove
      onEntriesUpdate instead of onEntryUpdate
      onEntriesCreate instead of onEntryCreate
      onEntriesDelete instead of onEntryDelete
      onEntriesCopy instead of onEntryCopy
      onEntriesHas instead of onEntryHas

    • entries: Flextype EMS structure is changes because of issues with collisions (#496)

      Updated structure:

      $storage = [
          'fetch' => [
            'id' => '',
            'data' => [],
            'options' => [
                'find' => [],
                'filter' => [],
            ],
          ],
          'create' => [
            'id' => '',
            'data' => [],
          ],
          'Updated' => [
            'id' => '',
            'data' => [],
          ],
          'delete' => [
            'id' => '',
          ],
          'copy' => [
            'id' => '',
            'newID' => '',
          ],
          'move' => [
            'id' => '',
            'newID' => '',
          ],
          'has' => [
            'id' => '',
          ],
      ];
      
    • rest-api-entries Entries Rest API - for collection fetch we should define this in the request query &options[collection]=true

    • rest-api-entries Entries Rest API - instead of &filter=[] we should define filtering in the request query like this &options[find] and &options[filter]

    • rest-api-media-files Media Files Rest API - for collection fetch we should define this in the request query &options[collection]=true

    • rest-api-media-folders Media Folders Rest API - instead of &filter=[] we should define filtering in the request query like this &options[find] and &options[filter]

    • images we will use media/ folder instead of uploads/entries/ (#516)

      • folder uploads/entries/ should should be renamed to media/entries/ related to this ticket: #515
      • in the endpoint /api/images/{path:.+} path for entries, should starts with /entries/.

      Example:

      old: /api/images/home/banner.jpg new: /api/images/entries/home/banner.jpg

    • entries: we should use only fetch() method as entry point to execute different methods with fetch prefix. (#495)

      • method fetchSingle() removed. Use fetch($id, $options) method.
      • methods fetchCollection removed. Use fetch($id, ['collection' => true]) method.
    • media-folders: we should use only fetch() method as entry point to execute different methods with fetch prefix. (#509)

      • method fetchSingle() removed. Use fetch($id, $options) method.
      • methods fetchCollection removed. Use fetch($id, ['collection' => true]) method.
    • media-files: we should use only fetch() method as entry point to execute different methods with fetch prefix. (#508)

      • method fetchSingle() removed. Use fetch($id, $options) method.
      • methods fetchCollection removed. Use fetch($id, ['collection' => true]) method.
  • v0.9.12 Changes

    December 07, 2020

    ๐Ÿ”‹ Features

    • core: Added 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: Added ability to extend Core class with Macros. (#489)

    • cache: Added 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: Added new move() method instead of rename()

    • entries: Added new move() method instead of rename()

    • core: Added new PATH['tmp'] constant (#470)

      Now we have:

      PATH['tmp'] constant instead of PATH['cache'] and PATH['logs']

    • markdown: Added markdown basic settings (#471)

      markdown:
        auto_line_breaks: false
        auto_url_links: false
        escape_markup: false
      
    • markdown: Added ability to access markdown parser instance (#468)

      Usage:

      $markdown = flextype('markdown')->getInstance();
      
    • entries: Added 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 methods getStorage() setStorage() (#467)

      Structure (Flextype EMS):

      $storage = [
          'fetch' => [
            'id' => '',
            'data' => '',
          ],
          'create' => [
            'id' => '',
            'data' => '',
          ],
          'Updated' => [
            'id' => '',
            'data' => '',
          ],
          'delete' => [
            'id' => '',
          ],
          'copy' => [
            'id' => '',
            'new_id' => '',
          ],
          'move' => [
            'id' => '',
            'new_id' => '',
          ],
          'has' => [
            'id' => '',
          ],
      ];
      

      Accessing storage example:

      flextype('emitter')->AddedListener('onEntryAfterInitialized', static function () : void {
          flextype('entries')->setStorage('fetch.data.title', 'New title');
      });
      
      $entry = flextype('entries')->fetchSingle('about');
      
      echo $entry['title'];
      
    • entries: Added new events: onEntryHas, onEntryInitialized, onEntriesInitialized (#467)

    • helpers Added new support helper find() for files and directories searching instead of find_filter()

    • helpers Added new support helper filter() for data collection filtering instead of arrays_filter()

    ๐Ÿ› Bug Fixes

    • entries: Fixed issue with delete() method (#465)

    • media: Fixed issue with exif_read_data() on files upload.

    โ™ป๏ธ Refactoring

    • entries: Removed 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 of PATH['cache'] and PATH['logs'] (#470)

    • cache: old cache config removed, use new config for PhpFastCache (#457)

    • cache: use methods has() set() get() instead of contains() save() fetch() (#457)

    • core: Removed flextype-components/session (#473)

    • core: Removed flextype-components/cookie (#473)

    • core: Removed flextype-components/number (#474)

    • core: Removed flextype-components/filesystem (#474)

    • core: Removed flextype-components/arrays (#474)

  • v0.9.11 Changes

    August 25, 2020

    ๐Ÿ”‹ 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, use flextype() 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

    1. Backup your Site First!
    2. Read BREAKING CHANGES section!
    3. Download flextype-0.9.11.zip ๐Ÿ’ป 4. Unzip the contents to a new folder on your local computer. ๐Ÿšš 5. Remove on your server this folders and files:

      src/ vendor/ index.php

    4. Upload on your server this folders and files:

      src/ vendor/ index.php

    ๐Ÿ’ป 7. Clear browser cache!

  • v0.9.10 Changes

    August 19, 2020

    ๐Ÿ”‹ Features

    core Moving to PHP 7.3.0 (#456)

    core add new class Flextype that extends Slim\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 of parse() 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

    1. Backup your Site First!
    2. Read BREAKING CHANGES section!
    3. Download flextype-0.9.10.zip ๐Ÿ’ป 4. Unzip the contents to a new folder on your local computer. ๐Ÿšš 5. Remove on your server this folders and files:

      src/ vendor/ index.php

    4. Upload on your server this folders and files:

      src/ vendor/ index.php

    ๐Ÿšš 7. Remove folder var/ ! ๐Ÿ’ป 8. Clear browser cache!

  • v0.9.9 Changes

    August 05, 2020

    ๐Ÿ”‹ Features

    core Moving to PHP 7.2.5 #444

    core Add PhpArrayFileAdapter and set PhpArrayFile Cache as a default fallback cache driver instead of Filesystem Cache driver. This new feature give us performance boost up to 25%

    core Add preflight to Flextype basic checks and performance boost.

    core Update all namespaces and core infrastructure. #437

    core Add Symfony Finder Component and find_filter() helper.

    cache Cache API improvements

    • Cache ID generation enhancements
    • add new public function fetchMultiple(array $keys)
    • add new public function saveMultiple(array $keysAndValues, $lifetime = 0)
    • add new public function deleteMultiple(array $keys)
    • add new public function deleteAll()
    • add new public function flushAll()
    • add new public function purge(string $directory)
    • add new public function purgeAll()
    • add new public function getStats()

    - add new events onCacheBeforePurgeAll, onCacheAfterPurgeAll, onCacheBeforePurge, onCacheAfterPurge

    core New Media API for work with media uploads.

    ๐Ÿ†• New objects:

    $flextype['media_files_meta']
    $flextype['media_folders_meta']
    $flextype['media_files']
    $flextype['media_folders']
    

    ๐Ÿ‘€ See: http://docs.flextype.org/en/core/media

    core New simplified parsers and serializers functionality #438

    ๐Ÿ†• New objects:

    $flextype['markdown']
    $flextype['shortcode']
    $flextype['json']
    $flextype['yaml']
    $flextype['frontmatter']
    

    ๐Ÿ†• New methods:

    $flextype->markdown->parse(string $input)
    
    $flextype->shortcode->add(string $name, $handler)
    $flextype->shortcode->parse(string $input, bool $cache = true)
    
    $flextype->json->decode(string $input, bool $cache = true, bool $assoc = true, int $depth = 512, int $flags = 0)
    $flextype->json->encode($input, int $options = 0, int $depth = 512) : string
    
    $flextype->yaml->decode(string $input, bool $cache = true, int $flags = 0) : array
    $flextype->yaml->encode($input, int $inline = 2, int $indent = 4, int $flags = 0) : string
    
    $flextype->frontmatter->decode(string $input, bool $cache = true)
    $flextype->frontmatter->encode($input) : string
    

    entries New simplified logic for entries methods: fetch() fetchSingle() and fetchCollection()

    โšก๏ธ We are stop doing unneeded things like extra scanning folders and files updates and etc... for fetching entries collections that's slowdowns the fetching process.

    We have improved filtering abilities for entries collections.

    From now there is a possible to path a much more rules for collections filtering inside the fetchCollection() and with using a standalone helper functions like collect_filter() and find_filter()

    • public function fetch(string $path, bool $collection = false, $filter = []) : array
      Fetch single entry or collections of entries.
    • public function fetchSingle(string $path) : array
      Fetch single entry.
    • public function fetchCollection(string $path, $filter = []) : array
      Fetch entries collection.

    ๐Ÿ‘€ See: http://docs.flextype.org/en/core/entries#methods

    entries New events added for Entries API.

    onEntryCreate
    onEntryCopy
    onEntryRename
    onEntryDelete
    onEntryUpdate
    onEntryAfterCacheInitialized
    onEntryAfterInitialized
    onEntriesAfterInitialized
    

    entries New decoupled and configurable fields added for entries instead of hardcoded.

    Entry fields decoupled into: /flextype/Foundation/Entries/Fields/

    Entry fields added into flextype.settings.entries.fields

    fields:
      slug:
        enabled: true
      published_at:
        enabled: true
      published_by:
        enabled: true
      modified_at:
        enabled: true
      created_at:
        enabled: true
      created_by:
        enabled: true
      routable:
        enabled: true
      parsers:
        enabled: true
      visibility:
        enabled: true
      uuid:
        enabled: true
    

    entries Add ability to set individual cache control for specific entries.

    cache:
      enabled: true
    
    or
    
    cache:
      enabled: false
    

    entries Add new Entries API class properties.

    /**
     * Current entry path
     *
     * @var string
     * @access public
     */
    public $entry_path = null;
    
    /**
     * Current entry create data array
     *
     * @var array
     * @access public
     */
    public $entry_create_data = [];
    
    /**
     * Current entry create data array
     *
     * @var array
     * @access public
     */
    public $entry_update_data = [];
    

    collections New Collection functionality on top of Doctrine Collections.

    We are able to use collections for any type of items, not just for entries.
    ๐Ÿ†• New Collection are simple and powerful!

    ๐Ÿ‘€ See: http://docs.flextype.org/en/core/collections

    settings Set max_file_size 8mb for uploads.

    yaml YAML set default inline = 5 and indent = 2

    vendors New Arrays library for Accessing PHP Arrays via DOT notation.

    rest-api New Files Rest API.

    Method Endpoint Description
    GET /api/files Fetch file(files)
    POST /api/files Upload file
    PUT /api/files Rename file
    PUT /api/files/copy Copy file
    DELETE /api/files Delete file
    โšก๏ธ PATCH /api/files/meta
    โšก๏ธ POST /api/files/meta
    DELETE /api/files/meta Delete file meta information

    rest-api New Folders Rest API.

    Method Endpoint Description
    GET /api/folders Fetch folder(folders)
    POST /api/folders Create folder
    PUT /api/folders Rename folder
    PUT /api/folders/copy Copy folder
    DELETE /api/folders Delete folder

    ๐Ÿ› Bug Fixes

    • frontmatter remove UTF-8 BOM if it exists.
    • frontmatter fix line endings to Unix style.
    • entries fix method rename() in Entries API #433
    • entries fix issue with parsing content on entry fetch #441
    • rest-api fix Rest API JSON Response #445
    • core fix all namespaces #437
    • core fix flextype config loading.
    • serializers fix YAML native parser.
    • ๐Ÿ”Œ plugins fix method getPluginsCacheID() for Plugins API

    โ™ป๏ธ Refactoring

    • pimple remove unused $flextype variable and cleanup dependencies.
    • yaml save and mute error_reporting for native YAML parser.
    • cors remove unused parameter $args
    • ๐Ÿ”Œ plugins remove dead variables.
    • shortcode update return type for shortcode add() method.
    • cache update $driver type for DoctrineCache.

    โšก๏ธ Vendor Updates

    • core: Update vendor league/glide to 1.6.0
    • core: Update vendor doctrine/cache to 1.10.2
    • core: Update vendor doctrine/collections to 1.6.6
    • core: Update vendor respect/validation to 2.0.16
    • core: Update vendor monolog/monolog to 2.1.1
    • core: Update vendor thunderer/shortcode to 0.7.4
    • core: Update vendor flextype-components/filesystem to 2.0.7
    • core: Update vendor flextype-components/registry to 3.0.0
    • core: Update vendor flextype-components/number to 1.1.1
    • core: Update vendor composer/semver to 3.0.0
    • core: Update vendor symfony/yaml to 5.1.3
    • core: Update vendor ramsey/uuid to 4.1.0

    ๐Ÿ’ฅ BREAKING CHANGES

    • entries Wildcard * removed from parsers field.
    • entries Cache setup removed from parsers field.
    • settings /project/config/settings.yaml move to /project/config/flextype/settings.yaml
    • constants remove constant PATH['config'], use - PATH['project'] . '/config/'
    • core: remove Date Component from the system.
    • core: remove Text Component from the system.
    • cache: removed methods clear() and clearAll(), use purge() and purgeAll() instead.
    • cache: change return type for methods save(), delete() from void too bool.

    โšก๏ธ Update from Flextype 0.9.7 to Flextype 0.9.8

    1. Backup your Site First!
    2. Read BREAKING CHANGES section!
    3. Download flextype-0.9.9.zip ๐Ÿ’ป 4. Unzip the contents to a new folder on your local computer. ๐Ÿšš 5. Remove on your server this folders and files:

      /src/ /vendor/ /index.php

    4. Upload on your server this folders and files:

      /src/ /vendor/ /index.php

    ๐Ÿ’ป 7. Clear browser cache!

  • v0.9.8 Changes

    May 14, 2020

    ๐Ÿ”‹ Features

    core: New lightweight and powerful core for kickass Applications!

    core: New Content Management API (CMA) for Entries. #421

    The Content Management API (CMA), is a read-write API for managing content.

    You could use the CMA for several use cases, such as:

    • Automatic imports from WordPress, Joomla, Drupal, and more.
    • Integration with other backend systems, such as an e-commerce shop.
    • Building custom editing experiences.

    Endpoints for Content Management API:

    Method Endpoint Description
    GET /api/management/entries Fetch entry(entries)
    POST /api/management/entries Create entry
    โšก๏ธ PATCH /api/management/entries
    PUT /api/management/entries Rename entry
    PUT /api/management/entries/copy Copy entry(entries)
    DELETE /api/management/entries Delete entry

    API Tokens folder: /project/tokens/management/entries

    core: New Images API.

    Method Endpoint Description
    GET /api/images Fetch image

    API Tokens folder: /project/tokens/images

    core: New Access API to create secret tokens for Content Management API (CMA).

    API Tokens folder: /project/tokens/access

    core: add Container for extending Flextype Container instead of Controller(s)

    core: add Application URL url into the common Flextype settings #405

    core: add new improved plugins sorting in the Plugins API.

    core: add dependencies validation for Plugins API #411

    core: add configurable CORS (Cross-origin resource sharing).

    cors:
      enabled: true
      origin: "*"
      headers: ["X-Requested-With", "Content-Type", "Accept", "Origin", "Authorization"]
      methods: [GET, POST, PUT, DELETE, PATCH, OPTIONS]
      expose: []
      credentials: false
    

    core: add manifest file /src/flextype/config/flextype.yaml for Flextype.

    core: add Serializer for data encoding/decoding and Parser for data parsing #424

    ๐Ÿ› Bug Fixes

    • core: fix incorrect data merging of manifest and settings for plugins and themes #404

    ๐Ÿ’ฅ BREAKING CHANGES

    core: core decoupled in the plugins, and moved out of the Flextype release package!

    ๐Ÿ”Œ Install all needed plugins for your project by your self.
    ๐Ÿ”Œ Browse plugins: https://github.com/flextype-plugins

    core: new way for data merging of manifest and settings for plugins and themes #404

    for e.g. this is a wrong code to access site title:

    {{ registry.plugins.site.title|e('html') }}
    

    and this is a correct code to access site title:

    {{ registry.get('plugins.site.settings.title')|e('html') }}
    

    core: We should add app url into the core instead of base_url and site_url #405

    for e.g. this is a wrong code to access site url:

    {{ registry.plugins.site.url }}
    

    and this is a correct code to access app url:

    {{ registry.get('flextype.settings.url') }}
    

    core: new project folder instead of site

    • rename folder site into project

    - use new constant PATH['project'] instead of constant PATH['site']

    core: removed constants

    • PATH['plugins']
    • PATH['themes']
    • PATH['entries']
    • PATH['themes']
    • PATH['snippets']
    • PATH['fieldsets']
    • PATH['tokens']
    • PATH['accounts']

    - PATH['uploads']

    core: removed Snippets functionality

    โšก๏ธ Update from Flextype 0.9.7 to Flextype 0.9.8

    1. Backup your Site First!
    2. Read BREAKING CHANGES section!
    3. Download flextype-0.9.8.zip ๐Ÿ’ป 4. Unzip the contents to a new folder on your local computer. ๐Ÿšš 5. Remove on your server this folders and files:

      /flextype/ /vendor/ /index.php

    4. Upload on your server this folders and files:

      /src/ /vendor/ /index.php

    5. Rename /site/ to /project/ ๐Ÿ’ป 8. Clear browser cache!

    6. Create CDA, CMA and Access tokens for your project using this webpage.

  • v0.9.7 Changes

    March 03, 2020

    ๐Ÿ”‹ Features

    core: add Delivery API's for Entries, Images and Registry. #159

    ๐Ÿ‘‰ Use Flextype as a Headless CMS with the full power of the Admin Panel.
    ๐Ÿ— Build a Websites and Apps with a technology you are familiar with.

    Endpoints for Delivery API's:

    /api/delivery/entries
    /api/delivery/images
    /api/delivery/registry
    

    core: add new core constants PATH['tokens'], PATH['accounts'], PATH['logs'], PATH['uploads']

    core: add new locales support Persian, Indonesian, Galician #327

    core: add alternative comparison syntax for Entries API

    Alternative comparison syntax:

    != - Not equals to
    like - Contains the substring
    

    core: set entries field routable=true on new entry creation #320

    core: use array_merge() instead of array_replace_recursive() for entries update method.

    core: initialize plugins before themes #323

    core: update Cache to use adapter to retrieve driver object #341

    core: load Shortcodes extensions based on flextype.shortcodes.extensions array #352

    core: load Twig extensions based on flextype.twig.extensions array #351

    core: add new Global Vars PATH_ACCOUNTS, PATH_UPLOADS, PATH_TOKENS, PATH_LOGS for Twig.

    0๏ธโƒฃ default-theme: Moving to Tailwind CSS from Twitter Bootstrap #356

    ๐Ÿ”Œ site-plugin: add ability to set custom site url, new shortcode [site_url] and twig var {{ site_url }}

    ๐Ÿ”Œ form-plugin: add new Form plugin for forms handling instead of core Forms API.

    ๐Ÿ”Œ icon-plugin: add new Icon plugin for Font Awesome icons set.

    usage in templates:

    <i class="icon">{{ icon('fab fa-apple') }}</i>
    

    usage in entries content:

    [icon value="fab fa-apple"]
    

    ๐Ÿ”Œ (site-plugin): add ability to access uri variable in the theme templates.

    usage in templates:

    {{ uri }}
    

    ๐Ÿ”Œ admin-plugin: add RTL support for URLs #62

    ๐Ÿ”Œ /site/config/plugins/admin/settings.yaml

    ...
    entries:
      slugify: true # set `false` to disable slugify for entries
    

    ๐Ÿ”Œ admin-plugin: add ability to deactivate/activate all type of plugins. #211

    ๐Ÿ”Œ admin-plugin: add Confirmation Required modal for system plugins deactivation.

    ๐Ÿ”Œ admin-plugin: new Admin Panel UI with better UX and powered by Tailwind CSS.

    ๐Ÿ”Œ admin-plugin: new improved entries media manager page.

    ๐Ÿ”Œ admin-plugin: add ability to continue editing after saving in the editor.

    ๐Ÿ”Œ admin-plugin: add action onAdminThemeTail for admin panel base layout.

    ๐Ÿ”Œ admin-plugin: add ability to change entries view from list view to table view.

    ๐Ÿ”Œ /site/config/plugins/admin/settings.yaml

    ...
    entries:
      items_view_default: list # set `table` for table entries view
    

    ๐Ÿ”Œ admin-plugin: increase upload limit for _uploadFile from 3mb to 5mb

    ๐Ÿ”Œ admin-plugin: do not rewrite plugins and themes manifest with custom manifests.

    ๐Ÿ”Œ admin-plugin: add parsleys for frontend form validation.

    ๐Ÿ”Œ admin-plugin: add select2 for all select form controls.

    ๐Ÿ”Œ admin-plugin: add swal for all modals.

    ๐Ÿ”Œ admin-plugin: add flatpickr for date and time.

    ๐Ÿ”Œ admin-plugin: add tippy.js for all tooltips and dropdown menus.

    ๐Ÿ”Œ admin-plugin: add confirmation modals powered by swal for all critical actions.

    ๐Ÿ”Œ admin-plugin: add dim color for entries with draft, hidden and routable=false status #324

    ๐Ÿ”Œ admin-plugin: add ability to select entry type in the nice modal on entry creation. #331

    ๐Ÿ”Œ admin-plugin: add new setting entries.items_view_default with default value list.

    ๐Ÿ”Œ admin-plugin: add ability for redirect to the editor after creating #343

    ๐Ÿ”Œ admin-plugin: add ability to create default API tokens on installation process.

    ๐Ÿ”Œ admin-plugin: add ability to use local SVG version of Font Awesome Icons #322

    usage in templates:

    <i class="icon">{{ icon('fas fa-ellipsis-h') }}</i>
    

    ๐Ÿ› Bug Fixes

    • core: fix discord server link #325
    • core: fix issue with system fields data types in the Entries API #383
    • ๐Ÿ”Œ admin-plugin: fix issue for creating entry process with same IDs #333
    • ๐Ÿ”Œ admin-plugin: fix redirect for entries after edit process.
    • ๐Ÿ”Œ admin-plugin: fix issues with routable field on entry edit process.

    โ™ป๏ธ Refactoring

    • core: move /site/cache directory to the /var/cache #347
    • core: remove Forms API from Flextype core #360
    • ๐Ÿ”Œ admin-plugin: improve Gulp configuration for better assets building.
    • 0๏ธโƒฃ default-theme: improve Gulp configuration for better assets building.
    • core: simplify logic for themes initialization process, remove extra checks for theme setting is enabled or not.
    • ๐Ÿ”Œ admin-plugin: move templates from views folder into the templates folder #347
    • ๐Ÿ”Œ admin-plugin: remove unused namespaces in EntriesContoller #347
    • ๐Ÿ”Œ admin-plugin: remove complex logic for themes activation process.
    • ๐Ÿ”Œ admin-plugin: add ext-gd to the require section of composer.json #347
    • ๐Ÿ”Œ admin-plugin: add ext-fileinfo to the require section of composer.json #347
    • ๐Ÿ”Œ admin-plugin: add ext-dom to the require section of composer.json #347
    • ๐Ÿ”Œ admin-plugin: add ext-spl to the require section of composer.json #347
    • 0๏ธโƒฃ default-theme: remove enabled option from theme settings.

    โšก๏ธ Vendor Updates

    • core: Update vendor monolog/monolog to 2.0.2
    • core: Update vendor cocur/slugify to 4.0.0
    • core: Update vendor thunderer/shortcode to 0.7.3
    • core: Update vendor ramsey/uuid to 3.9.2

    ๐Ÿ’ฅ BREAKING CHANGES

    core: accounts moved to their specific folders.

    for e.g.

    /accounts/admin.yaml => /accounts/admin/profile.yaml
    

    core: remove Debug, Html and Form Flextype Components.

    core: all images links should be updated

    http://docs.flextype.org/en/content/media
    

    core: core and plugin settings keys renamed

    For all core settings:
    settings.* => flextype.*
    
    For all site settings:
    settings.title => plugins.site.title
    settings.description => plugins.site.description
    settings.keywords => plugins.site.keywords
    settings.robots => plugins.site.robots
    settings.author.email => plugins.site.author.email
    settings.author.name => plugins.site.author.name
    

    ๐Ÿ”Œ admin-plugin: remove Twitter Bootstrap from Admin Panel and Default Theme.

    ๐Ÿ”Œ admin-plugin: remove user profile page /admin/profile

    ๐Ÿ”Œ admin-plugin: method getUsers() renamed to getUsersList() in UsersController.

    โšก๏ธ Update from Flextype 0.9.6 to Flextype 0.9.7

    • Backup your Site First!
    • ๐Ÿš€ Read BREAKING CHANGES release section!
    • Download flextype-0.9.7.zip
    • ๐Ÿ’ป Unzip the contents to a new folder on your local computer.
    • โœ‚ Remove on your server this folders and files:
      • /flextype/
      • /vendor/
      • /site/accounts/
      • /site/config/
      • /site/cache/
      • /site/plugins/admin/
      • /site/plugins/site/
      • /site/themes/default/
      • /index.php
    • Upload on your server this folders and files:
      • /flextype/
      • /vendor/
      • /site/plugins/admin/
      • /site/plugins/site/
      • /site/plugins/icon/
      • /site/plugins/form/
      • /site/themes/default/
      • /index.php
    • ๐Ÿ’ป Clear browser cache!
    • Go to YOUR_SITE_URL/admin url and create new user account.

    โœ… Flextype 0.9.7 (1463 commits and more than 400h for development and testing!)