this syntax is fine, the problem is that compose only seems to build the classmap when you run composer update.  So after installing update should be run right after. My guess is that's a bug in composer