Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Releases: o-alquimista/fragments

Version 0.9 released

02 May 00:05
Compare
Choose a tag to compare

This release introduces support for PHP 8 Attributes. This is now the default route definition method, but XML remains available.

Other changes:

  • PHP 8.0 is now the minimum version supported.
  • HttpException was added to the http component. This exception takes a status code and results in a custom error page.

Fragments v0.8 released

11 Oct 03:08
Compare
Choose a tag to compare

Changelog:

  • Request and Response classes representing HTTP requests/responses were implemented. Controllers must now return a Response instance.
  • A new Templating component was added, injecting useful variables such as $app_request and $app_user into its context; Processing a template builds and returns a Response object with the resulting content.
  • The SessionManagement component was removed. It will be rewritten and included in a future release. Use the superglobal $_SESSION for now.
  • The PdoConnection class now follows the Singleton pattern to better support the use of SQL Transactions across files.

"Fragments Demo" is now "Fragments App"

The "Fragments Demo" application is being replaced by the newer Fragments App. Version v0.1 of Fragments App is compatible with this release. The master branch will often be configured for development.

Version 0.7 released

15 Apr 03:07
Compare
Choose a tag to compare

Changelog:

  • Improved error response handling:
    • A template for each error status code can be created, plus a generic error page (404.php, 500.php, error.php).
    • More error information is being logged to help debugging.
  • Enhancements and fixes to the Router component:
    • GET parameters will work as expected now (they would interfere with the route matching process).
    • It is now possible to generate URLs for routes that contain wildcards, by passing an associative array as the second argument of Request::redirectToRoute(). The parameter names must match the wildcard identifiers.

Version 0.6 released

24 Mar 19:35
Compare
Choose a tag to compare

This release includes a redesigned router component, with support for multiple wildcards.

Release notes:

  • The ExceptionHandler component, which was responsible for handling PHP errors, was removed 6813be6, but it will be implemented again soon.

Version 0.5 released

20 Mar 17:43
Compare
Choose a tag to compare

Changelog:

  • Error handling component was added to convert PHP errors into exceptions that we can catch and display a nice error page for.
  • Some custom throwable exceptions were added for internal use and also for developers to use in their Fragments applications. They will be caught and used to render an error page with the associated status code and message.

Release v0.4

17 Mar 16:55
Compare
Choose a tag to compare

Changelog:

  • Adopting a simpler pattern in which controllers use custom services.
  • No longer using Webpack by default to manage assets.
  • Created a TemplateHelper component to handle rendering templates and providing useful methods to use within them, replacing the AbstractView.

Version v0.3 released

06 Oct 14:23
Compare
Choose a tag to compare

This release incorporates fewer but more drastic changes to Fragments. This tag has to be created so we can start providing a stable version in Packagist.

  • We've split the framework (vendor) files from the skeleton project. You can now obtain the skeleton project from Packagist, which depends on the Fragments package.
  • Fragments now uses the Composer PSR-4 autoloader.
  • To manage assets, we've integrated Webpack. Yarn is the recommended tool to manage node dependencies.
  • Database connection settings are now provided through an .ini file at /config/database.ini

Check our README for updated instructions.

Version v0.2 released

05 Oct 21:36
Compare
Choose a tag to compare

This release is about enhancing the user experience, fixing bugs and addressing the limitations of some components.

Changelog:

  • The escape() method was added to the AbstractView to be used in templates, so you can escape variables to prevent XSS (uses htmlspecialchars).
  • renderTemplate() method was added to the AbstractView to enable file paths relative to the App/View/ directory.
  • Fixed loss of session data immediately after the session expired.
  • Session tools, session ID regeneration and session startup were merged into one class, Session.
  • Feedback message component was completely redesigned. You will now add a feedback by passing the type and the message itself in the method call, very similar to how Symfony's Flash messages work.
  • Redesigned directory structure inside Fragments/.
  • Helper methods were added to the AbstractController to obtain a session or request objects.
  • Added a Security/Csrf component, with a method to generate a token in the AbstractView (for the templates) and a method to retrieve and validate the tokens in the AbstractController.

First release of Fragments

05 Oct 21:35
Compare
Choose a tag to compare

This marks the point at which Fragments will start having the potential to be useful to others.

Main features developed so far:

  • Autoloading
  • Routing (with limited wildcard support)
  • Feedback message service (similar to Flash messages in Symfony)
  • Session and Request management tools