On phi-Dedekind rings and phi-Krull rings