Adapting code to new Composer API