Imagine there is some framework X and modules A and B developed for this framework. Also, A depends on B (any version of B allowed). Originally, A v.10 and B v1.0 were developed for X v1.0.
B and A are released new versions periodically. This will lead to when I update A, B would also get updated. Let's assume a few years passed and now in our repository there is A of v3.0 and B of v6.0 (and both A and B are still for X v1.0).
Now we have some local installation which have remained in the original state (X, A and B are all of v1.0). So if I updated A at this point, this would end up in updating A to v3.0 and B to v6.0. But let's assume I didn't run this update before X v2.0 release.
Now framework X v2.0 gets released and it's not compatible with X v1.0. Vendor of B then released B v7.0 for X v2.0. Vendor of A, however, hasn't updated it for X v2.0 yet. The attempt to update A to v3.0 will lead to an attempt to update B to v7.0 which won't work and the upgrade procedure will be terminated.
What I wanted would be that updating A to 3.0 will lead to updating B to v6.0 as it was the last compatible version for X v1.0.
If in A there was dependency "B 1.x", this would protect me from getting issues when B v2.0 for X v2.0 comes out. However, I won't be able to get updates to B when it gets new major releases which can still be compatible with X v1.0. This means the module vendor cannot make v2.0 if it still runs on X v1.0 framework, all updates to B must be v1.x.
So I'd better have freedom to set versions to modules (incl. major versions) independently of X framework versions. I need mechanism to resolve dependencies in the way that the most recent version of dependency gets installed ONLY if it's compatible with the current environment. If it's not compatible, the most recent compatible version will be selected instead of stopping the whole process.
It is possible to "tell" Composer "Update to the latest versions which are possible under the current conditions" instead simply of "Update to the latest versions"?