We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Closure::{closure}(), 1

After the last upgrade to 4.0.0-alpha1 and update PHP 7.2.17 my main application does not work anymore and retFatal error: Uncaught ArgumentCountError: Too few arguments to function Closure::{closure}(), 1ameters"

$di->set(
    'voltService',
    function ($view, $di) {
        $volt = new Volt($view, $di); // 140 line 

        $compiler = $volt->getCompiler();

        $compiler->addFilter('number_format', 'number_format');

        $compiler->addFilter('substr', 'substr');

        $compiler->addFunction('file_exists', function($resolvedArgs) {
       return "file_exists(" . $resolvedArgs . ")";
   });

        $volt->setOptions(
            [
                'compiledPath'      =>  APP_PATH . '/tmp/',
                'compiledExtension' => '.compiled',
                'compileAlways' => true
            ]
        );

        return $volt;
    }
);

I dont think v4 is production ready yet, as the 4.0.0-alpha1 suggests....

Thank you very much!