I am noticing occasions where I need to add dependencies to parent classes, and their parents and so on, only because a child class needs it. Is this a code smell? Is it reasonable for a parent class to need information only because a child class needs it?
In particular in our [slightly anemic] flavor of DDD this seems to occur with Application Services (Domain boundary) needing information from our application layer to pass on to Domain Services. It is quite painful to add dependencies to app services calling a particular domain service and all of the associated tests when a domain service needs a new dependency.
Yes, it is a smell. If your child class needs some dependency, then inject dependency directly into child class. And let parent class know (i.e. be dependent) only about child.
BTW Are you sure that in your case dependency is passed to domain service? Dependency is a specific service that is required by dependent object to fulfill its function. It looks like in your case simple data is passed to domain service.