refactcor abstractDoctrineCommand into CommandAdapter