Skip to content

WebFiori Framework v2.0.0 Stable

Compare
Choose a tag to compare
@usernane usernane released this 14 Jan 18:12

Changelog

  • New Features:

    • Introduced the folder app. It can hold all source code which is related to the web application.
    • Added new public folder which should be set as server root in deployment. This folder can hold system resources such as images, css and js files.
    • New command line interface engine (more info at https://webfiori.com/learn/command-line-interface).
    • Added support for middleware (more info at https://webfiori.com/learn/middleware) .
    • Added new database abstraction layer (currently only support MySQL).
    • Moved all request and response related things to a library called HTTP.
    • Added support for creating middleware class using CLI.
    • Added support for creating background process class using CLI.
    • Added support for creating web services using CLI.
    • Added support for creating database tables classes and entities using CLI.
    • Auto-Registration:
      • CRON jobs which are created in the folder app/jobs are auto registered.
      • Commands which are created in the folder app/commands are auto registered.
      • Middleware which are created in the folder app/middleware are auto registered.
  • Email Related Improvements:

    • Now it is possible to create more than one instance of the class EmailMessage.
    • Fixed encoding issues with sending emails Now supports emoji in names and subject.
  • Themes Related Improvements:

    • Themes resources (js, css, images or fonts) now should be placed inside the folder public/assets.
    • Theme resources (js and css) are automatically loaded if resources directories names are set.
    • Added support for loading themes using the syntax Class::class.
  • Routing Related Improvements:

    • Added support for creating routes to classes using the syntax Class::class.
    • Support for redirect to non-www URL is added. It is possible to force the website to use non-www URLs.
    • A 404 error page that uses default theme will appear if a route is not found by default.
  • New Classes:

    • New class added: AbstractJob. This class can be used to implement custom cron jobs.
    • New class added: CronEmail. This class is used to send cron output and cron notifications.
    • New class added: GlobalConstants. The main aim of this class is to allow the developer to define his own global constants in one place.
    • New class added: UploadFile. This class is used by the class Uploader to use it instead of returning associative arrays.
  • Other Changes and Improvements

    • Improved error handling.
    • Now the framework has its own set of exceptions which are found under the namespace webfiori\framework\exceptions.
    • Added a way to enable and disable cron web interface.
    • Improved existing CLI commands.
    • Root framework file changed from WebFiori.php to index.php.
    • Moved all framework related classes to the namespace webfiori\framework.
    • All standard libraries updated to latest versions
    • Ability to install the framework using composer.

Installation

Using Composer

To install the latest release using composer, use the following command:
php composer.phar create-project --prefer-dist "webfiori/framework" <project-folder>

Replace <project-folder> with the name of the folder that will hold your project.

Using Attached File

Optionally, you can download the file webfiori-v2.0.0.zip which is part of this release if you don't want to use composer in installation. Once downloaded, extract the content of the file in your project folder.

Running Using PHP's Built-in Server

To run the project, open command line interface and navigate to <project-folder>/src. While inside the folder, run the following command:
path/to/php.exe -S localhost:8080 -t public
In your web browser, open http://localhost:8080 . Note that if the framework is installed using attached release, no need to add the src folder. Just navigate to <project-folder>

Learning Resources

If you are new to the framework and would like to learn how to use it, you can check at https://webfiori.com/learn .