Use of undefined constant issue

It’s possible that your $http_host isn’t in the list of possible choices. You can always check first that the ENVIRONMENT constant has actually been defined:

if ( defined( 'ENVIRONMENT' ) && 'local' === ENVIRONMENT ) { 
     define('ASSETSDIR', get_template_directory_uri() . '/assets');
} else {
    define('ASSETSDIR', $dist_dir . '/assets');
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)