In Phil 3:2, Paul is essential repeating the instruction he give in Gal 5:1-15 which is partially quoted below:
2 Take notice: I, Paul, tell you that if you let yourselves be circumcised, Christ will be of no value to you at all. 3 Again I
testify to every man who gets himself circumcised that he is obligated
to obey the whole law. 4 You who are trying to be justified by the
law have been severed from Christ; you have fallen away from grace.
11 Now, brothers, if I am still preaching circumcision, why am I still being persecuted? In that case the offense of the cross has been
abolished. 12 As for those who are agitating you, I wish they
would proceed to emasculate themselves!
Paul's extremely strong language here is unmistakable! We cannot earn salvation by works of the Levitical law, it is a free gift of God. This teaching is consistent with that in Acts 15 where circumcision was declared obsolete.
In Phil 3, Paul repeats his strong language and calls such teachers of works (as opposed to grace) are "dogs", an allusion to the notion that dogs are excluded from the heavenly kingdom (Rev 22:15). The same language was used with the Syro-Phoenician woman in Matt 15:26.
Paul then confirms this describing these "dogs" as "evil workers".
Ellicott sums this well:
(2) Beware of (the) dogs.—In Revelation 22:15 “the dogs” excluded from
the heavenly Jerusalem seem to be those who are impure. In that sense
the Jews applied the word to the heathen, as our Lord, for a moment
appearing to follow the Jewish usage, does to the Syro-Phœnician woman
in Matthew 15:26. But here the context appropriates the word to the
Judaising party, who claimed special purity, ceremonial and moral, and
who probably were not characterised by peculiar impurity—such as,
indeed, below (Philippians 3:17-21) would seem rather to attach to the
Antinomian party, probably the extreme on the other side. Chrysostom’s
hint that the Apostle means to retort the name upon them, as now by
their own wilful apostasy occupying the place outside the spiritual
Israel which once belonged to the despised Gentiles, is probably
right. Yet perhaps there may be some allusion to the dogs, not as
unclean, but as, especially in their half-wild state in the East,
snarling and savage, driving off as interlopers all who approach what
they consider their ground. Nothing could better describe the narrow
Judaising spirit.