Inital commit for unit test configuration

This commit is contained in:
Manish Verma
2018-09-05 12:36:46 +05:30
committed by Manish Verma
parent 2f0796e954
commit e0436b7757
252 changed files with 3219 additions and 1631 deletions

View File

@@ -19,7 +19,7 @@
"require-dev": {
"ext-fileinfo": "*",
"phpspec/phpspec": "^3.4",
"phpunit/phpunit": "^5.7"
"phpunit/phpunit": "^5.7.10"
},
"autoload": {
"psr-4": {

19
vendor/league/flysystem/deprecations.md vendored Normal file
View File

@@ -0,0 +1,19 @@
# Deprecations
This document lists all the planned deprecations.
## Handlers will be removed in 2.0
The `Handler` type and associated calls will be removed in version 2.0.
### Upgrade path
You should either create your own implementation for handling OOP usage,
but it's recommended to move away from using an OOP-style wrapper entirely.
The reason for this is that it's too easy for implementation details (for
your application this is Flysystem) to leak into the application. The most
important part for Flysystem is that it improved portability and creates a
solid boundary between your application core and the infrastructure you use.
The OOP-style handling breaks this principle, therefor I want to stop
promoting it.

View File

@@ -150,18 +150,11 @@ class Local extends AbstractAdapter
$this->ensureDirectory(dirname($location));
$stream = fopen($location, 'w+b');
if ( ! $stream) {
return false;
}
stream_copy_to_stream($resource, $stream);
if ( ! fclose($stream)) {
if ( ! $stream || stream_copy_to_stream($resource, $stream) === false || ! fclose($stream)) {
return false;
}
$type = 'file';
$result = compact('type', 'path');
if ($visibility = $config->get('visibility')) {
@@ -261,7 +254,7 @@ class Local extends AbstractAdapter
{
$location = $this->applyPathPrefix($path);
return unlink($location);
return @unlink($location);
}
/**

View File

@@ -195,6 +195,7 @@ class MountManager
*
* @throws InvalidArgumentException
* @throws FilesystemNotFoundException
* @throws FileExistsException
*
* @return bool
*/