refactor abstractDoctrineCommand into CommandAdapter