Building a Yaf Scaffold
Install the Yaf Extension
Start by checking
phpinfoto confirm whether your PHP build is Thread Safe (TS) or Non-Thread Safe (NTS).
Visit the PECL website to download the extension.


After extracting the archive, move the php_yaf.dll file into your PHP extension directory.
TIP
Make sure to locate your own extension directory—don't copy the path blindly.

Edit the PHP configuration file.

Add the following block in an appropriate location:
iniextension=php_yaf.dll [yaf] yaf.use_namespace=1 yaf.use_spl_autoload=1Restart Nginx and check
phpinfoagain. Seeing the section below means the installation succeeded.TIP
A full system reboot may be required before the change takes effect.

Install the Scaffold
TIP
I chose the overtrue/yaf-skeleton scaffold because the blank framework felt too barebones—this one comes with some sensible defaults.
- Pull the code:
composer create-project overtrue/yaf-skeleton skeleton - Install the template engine:
composer require league/plates - Configure the Nginx site and you are ready to run 🎉

