Skip to content
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

Does not accept League\Flysystem\Filesystem in Storage/dropbox::setFlysystem #86

Open
jasson99 opened this issue Apr 20, 2020 · 1 comment

Comments

@jasson99
Copy link
Contributor

When working on updating phpstan for files_external_dropbox, this error is found:

------ ----------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   lib/Storage/Dropbox.php                                                                                                                                    
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------- 
  79     Property OCA\Files_external_dropbox\Storage\Dropbox::$flysystem (OCA\Files_external_dropbox\Storage\Adapter) does not accept League\Flysystem\Filesystem.  
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------- 

The function including line 79 is:

/**
	 * Initialize the storage backend with a flyssytem adapter
	 * @override
	 * @param \League\Flysystem\Filesystem $fs
	 */
	public function setFlysystem($fs) {
		$this->flysystem = $fs;
		$this->flysystem->addPlugin(new \League\Flysystem\Plugin\GetWithMetadata());
	}

And line 79 is:

		$this->flysystem = $fs;

@phil-davis
Copy link
Contributor

Maybe this is a real problem, or maybe it is safe to just override this in phpstan?
Someone who knows the code needs to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants