domain.com // does not work with multiple subdomain // sub1.sub2.domain.com -> sub2.domain.com return preg_replace('/^[^.]*.\s*/', '', $domainName); } public static function getComposerJson(): array { if (!file_exists(dirname(__FILE__) . self::COMPOSER_CONFIG_PATH)) { return []; } return json_decode(file_get_contents(dirname(__FILE__) . self::COMPOSER_CONFIG_PATH), true); } }