Sage wordpress add customize register

I am working with customize register on sage wordpress

//adding setting for copyright text
add_action('customize_register', 'theme_copyright_customizer');

function theme_copyright_customizer($wp_customize) {
    //adding section in wordpress customizer   
    $wp_customize->add_section('copyright_extras_section', array(
        'title'          => 'Copyright Text Section'
    ));

    //adding setting for copyright text
    $wp_customize->add_setting('text_setting', array(
        'default'        => 'Default Text For copyright Section',
    ));

    $wp_customize->add_control('text_setting', array(
        'label'   => 'Copyright text',
        'section' => 'copyright_extras_section',
        'type'    => 'text',
    ));
}

This shows me

call_user_func_array() expects parameter 1 to be a valid callback, class xxx not found

Do anyone has an idea?

This is the solution for my question
add_action(‘customize_register’, function ($wp_customize) {
$wp_customize->add_section(‘copyright_extras_section’, array(
‘title’ => ‘Copyright Text Section’
));

    //adding setting for copyright text
    $wp_customize->add_setting('text_setting', array(
        'default'        => 'Default Text For copyright Section',
    ));

    $wp_customize->add_control('text_setting', array(
        'label'   => 'Copyright text',
        'section' => 'copyright_extras_section',
        'type'    => 'text',
    ));
});

Since you probably added this in a Sage file, that file is namespaced, and you haven’t added the namespace to your callback. Your solution works because anonymous functions don’t need a namespace described when used as a callback in this manner.

For a deeper explanation see: Namespacing and Autoloading | Roots