fast framework Help

Including Composer Packages

Since ff uses its own class autoloader mechanism, that is incompatible with psr-4, it is also not compatible with composer's autoloader.

To include third party composer packages in your project, do like this:

  • In your project plugin folder create a folder named libs and put the package's composer.json there.

  • After installing with composer install it should now contain the vendor folder.

  • In your project plugin's classes folder add a file ìnclude.php with the following content:

<?php require_once realpath(pathinfo(__FILE__, PATHINFO_DIRNAME) . '/../libs/vendor/autoload.php');
  • you can now use the package as described in their specs and composer update to keep it up to date.

29 März 2024