fixed phpspec specs (cherry pick of 39f6bb35011b8e07d1cd2e647c78033aac36f306)