This change is made to comply with the new Symfony standards and to avoid deprecation warnings for future versions. The update touches various functionalities, including retrieving EntityManagerInterface instance and various service classes within the test files.
The codebase has been improved by refining and optimizing the test methods in the RelationshipApiControllerTest class. The check for relations was also added to exclude persons without any relationship, this may exclude duplicate relations. This change should avoid errors on this test.