SpellNumber icon indicating copy to clipboard operation
SpellNumber copied to clipboard

Cannot cache configs due to callback present in config file

Open percymamedy opened this issue 1 year ago • 2 comments

   /*
    |--------------------------------------------------------------------------
    | Encountered a specific adjustment in the number to words output?.
    |--------------------------------------------------------------------------
    |
    | Here, you have the option to adjust whatever you need, the best part!
    | This adjustment will apply to all your number to words outputs.
    |
    */

    'callback_output' => function ($data) {
        // Your logic here...

        return $data->getWords();
    },

This block of code in the config files prevents caching config file. See output below:

INFO  Caching the framework bootstrap files.                              
                                                                               
    config ........................................................... 36ms F  
  AIL                                                                          
                                                                               
     LogicException                                                            
                                                                               
    Your configuration files are not serializable. 

percymamedy avatar Nov 30 '23 19:11 percymamedy

Thank you very much for the report, we are seeing if we can use the Serialize interface and if it does not work it will be necessary to remove the closure and include a method that allows you to do similar things.

rmunate avatar Nov 30 '23 23:11 rmunate

We are almost ready on Tuesday we will have the new version with all the adjustments thank you for the wait

rmunate avatar Dec 04 '23 00:12 rmunate