The invariance principle for ϕ-mixing sequences