In PhCalculation, the parameters dict is already popped and verified as being empty at line 280:
if parameters:
raise exceptions.InputValidationError(
'The following namelists are specified in parameters, but are not valid namelists for the current type '
f'of calculation: {", ".join(list(parameters.keys()))}'
)
Then at line 340 and 364 it tries to get electron_phonon from parameters dictionary.
if parameters['INPUTPH'].get('electron_phonon', None) is not None: