Only a subset of aggregation pipelines can be used in update operations:
https://www.mongodb.com/docs/manual/tutorial/update-documents-with-aggregation-pipeline/
Create a new UpdatePipeline class that restrict the stage using a new UpdateStageInterface.
From docs comment: https://github.com/mongodb/docs-php-library/pull/206#discussion_r1975993613