 In 1689 the Gothic edifice was demolished as it proved too small for the growing cult of Saint John Cantius, the patron saint of the Jagiellonian University who's laid to rest there.In 1689-1705 the new Baroque church was erected, modelled on Sant'Andrea della Valle in Rome.The architect was a Polonized Dutchman Tylman van Gameren, a chief architect at the court of John III Sobieski.