In phpmaker 2022, I successfully link my custom files to the phpmaker libraries using this code
namespace PHPMaker2022\custom2;
require_once “../vendor/autoload.php”;
require_once “../src/constants.php”;
require_once “../src/config.php”;
require_once “../src/phpfn.php”;
require_once “../src/userfn.php”;
But this is not working in 2024