Add docs for hasId method (Ref symfony/symfony#12331)