# Task NEX-310 - Use DI for getting another app classes

Project: Stream Nextcloud app "OpenProject Integration"
Status: closed
URL: https://community.openproject.org/work_packages/NEX-310

## Details

| Attribute | Value |
| --- | --- |
| Assignee | Swikriti Tripathi |
| Date |  |
| Priority | Medium |
| Target versions | Nextcloud Integration 2.5.0 |
| Category |  |
| Labels |  |

## Description

We have some functions that require the classes of other nextcloud apps like groupfolders and as we are supporting 3 major versions of the nextcloud server, the parameters to the class constructors may change according to the server's version. Currently, we are determining the version of the nextcloud and providing parameters based on that but maybe we should use dependency injection like in PR <https://github.com/nextcloud/integration_openproject/pull/502>
