Skip to content

Extractor doesn't consider inherited functions to implement routes #28

@theCalcaholic

Description

@theCalcaholic

If a route is configured that is implemented by a controller's parent class, an error is thrown saying 'Missing controller method'.

In my case, the method in question is the method authenticate from OCP\AppFramework\AuthPublicShareController which can't be overwritten by my controller because it is final.

As a workaround, I'll try to a proxy function that forwards its parameters to parent::authenticate, but ideally that should not be necessary.

My relevant routes:

<?php
declare(strict_types=1);

return [
	'routes' => [
		// ....
		['name' => 'SecretShare#authenticate', 'root' => '/secret',
			'url' => '/show/{token}/authenticate/{redirect}', 'verb' => 'POST'],
	],
	'ocs' => [
                // ....
	]
];

Excerpt from my controller class:

<?php
declare(strict_types=1);

namespace OCA\Secrets\Controller;

use OCP\AppFramework\AuthPublicShareController;

class SecretShareController extends AuthPublicShareController {
	// ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions