Based on your github link for your entities:
First
You can't do $movie->getSources()
since there is no field called $sources
in your Movie class
Second
In your movie-entity there is a field called $movieSource
which is an one-to-many relation. That should be renamed to $movieSources
cause you'll get back a ArrayCollection of MovieSource-objects
I suspect, you want to model a ManyToMany relation with Movie <-> Source?
If yes, you can directly link these entities to each other without being worry about an intermediate table, doctrine will do that for you.
See here:
https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/association-mapping.html#many-to-many-bidirectional
I would strongly recommend to discard the intermediate table if there is no real usage for it.
But if you want to keep this model you'll have to call (after changing the methods name)
$movie->getMovieSources()
and iterate over this collection.
for ($movie->getMovieSources() as $movieSource) {
$moviesource->getSource();
}
It's most likely, that your original asked error is gone with these changes.