At the same time Docker/Mirantis have committed to creating a CRI plugin for Docker, so it seems pretty likely that Docker is and will continue to be an option for Kubernetes clusters.
If your language runtime supports testcontainers (https://www.testcontainers.org/) I would strongly suggest using that over docker compose. Docker compose is so lacking in features that I would just write bash scripts to setup/tear down container dependencies. But testcontainer removes the need to write bash scripts and provides some basic orchestration features that make it an absolute breeze to use.
I see that they now recommend some workarounds to fix this issue, where I want to ensure that dependencies are running before spinning up my app. Usually, this is in the context of integration tests. The inability to support this "natively" makes the integration tests somewhat flaky and unreliable.
We continue to use v2.4 in all our projects today because it allows you do easily do things like define startup order with healthchecks, as well as limit cpu, memory, etc. without having to spin up a whole swarm cluster.
For local development use-cases, docker-compose v3 is just v2 minus all the features Docker Swarm doesn't support.
some_service:
depends_on:
other_service:
condition: service_healthy
but yeah.., Docker Inc. overestimated their importance and got what they deserve = Open Source tools wanting to distance from them.