-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Nextcloud] app isn't compatible with version 28 due to using deprecated methods. #65
Comments
Possible fix: <?php
declare(strict_types=1);
namespace OCA\ScienceMesh\AppInfo;
use OCA\ScienceMesh\Notifier\ScienceMeshNotifier;
use OCA\ScienceMesh\Plugins\ScienceMeshSearchPlugin;
use OCA\ScienceMesh\Service\UserService;
use OCA\ScienceMesh\ShareProvider\ScienceMeshShareProvider;
use OCP\AppFramework\App;
use OCP\IUserSession;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class ScienceMeshApp extends App
{
/**
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function __construct()
{
parent::__construct("sciencemesh");
$container = $this->getContainer();
$server = $container->getServer();
$container->registerService(UserService::class, function ($c) {
return new UserService(
$c->get(IUserSession::class)
);
});
// currently logged-in user, userId can be gotten by calling the
// getUID() method on it
$container->registerService("User", function ($c) {
return $c->get(IUserSession::class)->getUser();
});
$collaboration = $container->get("OCP\Collaboration\Collaborators\ISearch");
$collaboration->registerPlugin(["shareType" => "SHARE_TYPE_REMOTE", "class" => ScienceMeshSearchPlugin::class]);
$shareManager = $container->get("OCP\Share\IManager");
$shareManager->registerShareProvider(ScienceMeshShareProvider::class);
$notificationManager = $server->getNotificationManager();
$notificationManager->registerNotifierService(ScienceMeshNotifier::class);
}
} |
Now I see that version 28 breaks the search! 😞 |
Presumably, fixing this will break OwnCloud compatibility? Maybe we should tag a new version where we can fix the nextcloud api breakage, and Owncloud users can use the older version? |
Alot of things has changed: https://docs.nextcloud.com/server/latest/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_28.html I can work on fixing them, but I can't promise to keep compatibility with OC 10. |
Hi Micke! Thanks for the help. IMO ownCloud compatibility is not necessary, and since I've started testing oCIS in the past weeks I noticed we have to update the ScienceMesh app for Nextcloud. I've created separate repos to work on them independently of each other (instead of forking this repo):
Once fixing and testing are finished we can migrate it back to the ScienceMesh organization. |
Nice! Are you working on them now? If so, do you want to dived up the work somehow? Otherwise I can fork you repo and start poking around and submit pr's to your repo? |
I planned ScienceMesh for my weekend hobby 😄 project starting this week. I appreciate your help on the Netxcloud as you are experienced with 28+ versions. |
Sounds good, I can start to take a look on Nextcloud tomorrow in that case! |
This whole section needs to be updated.
nc-sciencemesh/lib/AppInfo/ScienceMeshApp.php
Lines 20 to 33 in 0459993
currently it leads to:
The text was updated successfully, but these errors were encountered: