Commit 7e394b02 authored by alexpott's avatar alexpott

Issue #2313989 by sun: Update vfsStream to 1.3.0.

parent e3833d0f
......@@ -648,22 +648,30 @@
},
{
"name": "mikey179/vfsStream",
"version": "v1.2.0",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
"reference": "063fb10633f10c5ccbcac26227e94f46d9336f90"
"reference": "8571f349567e02af1b7efc0fc4e3a4a1c98e664e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/063fb10633f10c5ccbcac26227e94f46d9336f90",
"reference": "063fb10633f10c5ccbcac26227e94f46d9336f90",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/8571f349567e02af1b7efc0fc4e3a4a1c98e664e",
"reference": "8571f349567e02af1b7efc0fc4e3a4a1c98e664e",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"autoload": {
"psr-0": {
"org\\bovigo\\vfs\\": "src/main/php"
......@@ -674,7 +682,7 @@
"BSD"
],
"homepage": "http://vfs.bovigo.org/",
"time": "2013-04-01 10:41:02"
"time": "2014-07-21 20:15:54"
},
{
"name": "phpunit/php-code-coverage",
......@@ -2425,8 +2433,12 @@
"time": "2013-06-12 19:46:58"
}
],
"packages-dev": [],
"aliases": [],
"packages-dev": [
],
"aliases": [
],
"minimum-stability": "stable",
"stability-flags": {
"symfony/yaml": 20,
......@@ -2436,9 +2448,10 @@
"symfony-cmf/routing": 15,
"phpunit/phpunit-mock-objects": 20
},
"prefer-stable": false,
"platform": {
"php": ">=5.4.2"
},
"platform-dev": []
"platform-dev": [
]
}
......@@ -143,8 +143,6 @@ public function add($prefix, $paths, $prepend = false)
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-0 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
......@@ -204,13 +202,10 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*/
public function setPsr4($prefix, $paths)
{
public function setPsr4($prefix, $paths) {
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
......
......@@ -23,6 +23,9 @@ public static function getLoader()
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitDrupal8', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
$includePaths = require __DIR__ . '/include_paths.php';
array_push($includePaths, get_include_path());
set_include_path(join(PATH_SEPARATOR, $includePaths));
......
......@@ -2422,38 +2422,6 @@
"web service"
]
},
{
"name": "mikey179/vfsStream",
"version": "v1.2.0",
"version_normalized": "1.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
"reference": "063fb10633f10c5ccbcac26227e94f46d9336f90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/063fb10633f10c5ccbcac26227e94f46d9336f90",
"reference": "063fb10633f10c5ccbcac26227e94f46d9336f90",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2013-04-01 10:41:02",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-0": {
"org\\bovigo\\vfs\\": "src/main/php"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
],
"homepage": "http://vfs.bovigo.org/"
},
{
"name": "symfony/serializer",
"version": "v2.5.2",
......@@ -2504,5 +2472,45 @@
],
"description": "Symfony Serializer Component",
"homepage": "http://symfony.com"
},
{
"name": "mikey179/vfsStream",
"version": "v1.3.0",
"version_normalized": "1.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
"reference": "8571f349567e02af1b7efc0fc4e3a4a1c98e664e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/8571f349567e02af1b7efc0fc4e3a4a1c98e664e",
"reference": "8571f349567e02af1b7efc0fc4e3a4a1c98e664e",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.1"
},
"time": "2014-07-21 20:15:54",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"org\\bovigo\\vfs\\": "src/main/php"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
],
"homepage": "http://vfs.bovigo.org/"
}
]
src_dir: src/main/php
coverage_clover: docs/phpunit/clover.xml
json_path: docs/phpunit/coveralls-upload.json
\ No newline at end of file
/composer.lock
/docs
/nbproject
/vendor
language: php
php:
- hhvm
- 5.6
- 5.3
- 5.4
- 5.5
matrix:
allow_failures:
- php: hhvm
- php: 5.6
before_script:
- composer install --dev
- "mkdir -p ~/.composer"
- composer self-update
- composer install
- composer require satooshi/php-coveralls:dev-master
script:
- vendor/bin/phpunit --coverage-text
script: phpunit --coverage-text
after_script:
- vendor/bin/coveralls
1.3.0 (2014-07-21)
------------------
* implemented #79: possibility to mock large files without large memory footprint, see https://github.com/mikey179/vfsStream/wiki/MockingLargeFiles
* implemented #67: added partial support for text-mode translation flag (i.e., no actual translation of line endings takes place) so it no longer throws an exception (provided by Anthon Pang)
* fixed issue #74: issue with trailing windows path separators (provided by Sebastian Krüger)
* fixed issue #50: difference between real file system and vfs with `RecursiveDirectoryIterator`
* fixed issue #80: touch with no arguments for modification and access time behave incorrect
* deprecated `org\bovigo\vfs\vfsStreamFile::readUntilEnd()`
* deprecated `org\bovigo\vfs\vfsStreamFile::getBytesRead()`
1.2.0 (2013-04-01)
------------------
* implemented issue #34: provide `url()` method on all `vfsStreamContent` instances
* added `org\bovigo\vfs\vfsStreamContent::url()`
* added `org\bovigo\vfs\vfsStreamContent::path()`
* fixed issue #40: flock implementation doesn't work correctly, patch provided by Kamil Dziedzic
* fixed issue #49: call to member function on a non-object when trying to delete a file one above root where a file with same name in root exists
* fixed issue #51: `unlink()` must consider permissions of directory where file is inside, not of the file to unlink itself
* fixed issue #52: `chmod()`, `chown()` and `chgrp()` must consider permissions of directory where file/directory is inside
* fixed issue #53: `chmod()`, `chown()` and `chgrp()` must consider current user and current owner of file/directoy to change
1.1.0 (2012-08-25)
------------------
* implemented issue #11: add support for `streamWrapper::stream_metadata()` vfsStream now supports `touch()`, `chown()`, `chgrp()` and `chmod()`
* implemented issue #33: add support for `stream_truncate()` (provided by https://github.com/nikcorg)
* implemented issue #35: size limit (quota) for VFS
1.0.0 (2012-05-15)
------------------
* raised requirement for PHP version to 5.3.0
* migrated codebase to use namespaces
* changed distribution from PEAR to Composer
* implemented issue #30: support "c" mode for `fopen()`
* fixed issue #31: prohibit aquiring locks when already locked / release lock on `fclose()`
* fixed issue #32: problems when subfolder has same name as folder
* fixed issue #36: `vfsStreamWrapper::stream_open()` should return false while trying to open existing non-writable file, patch provided by Alexander Peresypkin
0.11.2 (2012-01-14)
-------------------
* fixed issue #29: set permissions properly when using `vfsStream::copyFromFileSystem()`, patch provided by predakanga
* fixed failing tests under PHP > 5.3.2
0.11.1 (2011-12-04)
-------------------
* fixed issue #28: `mkdir()` overwrites existing directories/files
0.11.0 (2011-11-29)
-------------------
* implemented issue #20: `vfsStream::create()` removes old structure
* implemented issue #4: possibility to copy structure from existing file system
* fixed issue #23: `unlink()` should not remove any directory
* fixed issue #25: `vfsStreamDirectory::hasChild()` gives false positives for nested paths, patch provided by Andrew Coulton
* fixed issue #26: opening a file for reading only should not update its modification time, reported and initial patch provided by Ludovic Chabant
0.10.1 (2011-08-22)
-------------------
* fixed issue #16: replace `vfsStreamContent` to `vfsStreamContainer` for autocompletion
* fixed issue #17: `vfsStream::create()` has issues with numeric directories, patch provided by mathieuk
0.10.0 (2011-07-22)
-------------------
* added new method `vfsStreamContainer::hasChildren()` and `vfsStreamDirectory::hasChildren()`
* implemented issue #14: less verbose way to initialize vfsStream
* implemented issue #13: remove deprecated method `vfsStreamContent::setFilemtime()`
* implemented issue #6: locking meachanism for files
* ensured that `stream_set_blocking()`, `stream_set_timeout()` and `stream_set_write_buffer()` on vfsStream urls have the same behaviour with PHP 5.2 and 5.3
* implemented issue #10: method to print directory structure
0.9.0 (2011-07-13)
------------------
* implemented feature request issue #7: add support for `fileatime()` and `filectime()`
* fixed issue #3: add support for `streamWrapper::stream_cast()`
* fixed issue #9: resolve path not called everywhere its needed
* deprecated `vfsStreamAbstractContent::setFilemtime()`, use `vfsStreamAbstractContent::lastModified()` instead, will be removed with 0.10.0
0.8.0 (2010-10-08)
------------------
* implemented enhancement #6: use `vfsStream::umask()` to influence initial file mode for files and directories
* implemented enhancement #19: support of .. in the url, patch provided by Guislain Duthieuw
* fixed issue #18: `getChild()` returns NULL when child's name contains parent name
* fixed bug with incomplete error message when accessing non-existing files on root level
0.7.0 (2010-06-08)
------------------
* added new `vfsStream::setup()` method to simplify vfsStream usage
* fixed issue #15: `mkdir()` creates a subfolder in a folder without permissions
0.6.0 (2010-02-15)
------------------
* added support for `$mode` param when opening files, implements enhancement #7 and fixes issue #13
* `vfsStreamWrapper::stream_open()` now evaluates `$options` for `STREAM_REPORT_ERRORS`
0.5.0 (2010-01-25)
------------------
* added support for `rename()`, patch provided by Benoit Aubuchon
* added support for . as directory alias so that `vfs://foo/.` resolves to `vfs://foo`, can be used as workaround for bug #8
0.4.0 (2009-07-13)
------------------
* added support for file modes, users and groups (with restrictions, see http://code.google.com/p/bovigo/wiki/vfsStreamDocsKnownIssues)
* fixed bug #5: `vfsStreamDirectory::addChild()` does not replace child with same name
* fixed bug with `is_writable()` because of missing `stat()` fields, patch provided by Sergey Galkin
0.3.2 (2009-02-16)
------------------
* support trailing slashes on directories in vfsStream urls, patch provided by Gabriel Birke
* fixed bug #4: vfsstream can only be read once, reported by Christoph Bloemer
* enabled multiple iterations at the same time over the same directory
0.3.1 (2008-02-18)
------------------
* fixed path/directory separator issues under linux systems
* fixed uid/gid issues under linux systems
0.3.0 (2008-01-02)
------------------
* added support for `rmdir()`
* added `vfsStream::newDirectory()`, dropped `vfsStreamDirectory::ceate()`
* added new interface `vfsStreamContainer`
* added `vfsStreamContent::at()` which allows code like `$file = vfsStream::newFile('file.txt.')->withContent('foo')->at($otherDir);`
* added `vfsStreamContent::lastModified()`, made `vfsStreamContent::setFilemtime()` an alias for this
* moved from Stubbles development environment to bovigo
* refactorings to reduce crap index of various methods
0.2.0 (2007-12-29)
------------------
* moved `vfsStreamWrapper::PROTOCOL` to `vfsStream::SCHEME`
* added new `vfsStream::url()` method to assist in creating correct vfsStream urls
* added `vfsStream::path()` method as opposite to `vfsStream::url()`
* a call to `vfsStreamWrapper::register()` will now reset the root to null, implemented on request from David Zuelke
* added support for `is_readable()`, `is_dir()`, `is_file()`
* added `vfsStream::newFile()` to be able to do `$file = vfsStream::newFile("foo.txt")->withContent("bar");`
0.1.0 (2007-12-14)
------------------
* Initial release.
1.2.0, 2013-04-01
==================
- implemented issue #34: provide url() method on all vfsStreamContent instances
- added org\bovigo\vfs\vfsStreamContent::url()
- added org\bovigo\vfs\vfsStreamContent::path()
- fixed issue #40: flock implementation doesn't work correctly, patch provided
by Kamil Dziedzic
- fixed issue #49: call to member function on a non-object when trying to delete
a file one above root where a file with same name in root exists
- fixed issue #51: unlink() must consider permissions of directory where file is
inside, not of the file to unlink itself
- fixed issue #52: chmod(), chown() and chgrp() must consider permissions of
directory where file/directory is inside
- fixed issue #53: chmod(), chown() and chgrp() must consider current user and
current owner of file/directoy to change
1.1.0, 2012-08-25
==================
- implemented issue #11: add support for streamWrapper::stream_metadata()
vfsStream now supports touch(), chown(), chgrp() and chmod()
- implemented issue #33: add support for stream_truncate
(provided by https://github.com/nikcorg)
- implemented issue #35: size limit (quota) for VFS
1.0.0, 2012-05-15
==================
- raised requirement for PHP version to 5.3.0
- migrated codebase to use namespaces
- changed distribution from PEAR to Composer
- implemented issue #30: support "c" mode for fopen()
- fixed issue #31: prohibit aquiring locks when already locked / release lock on
fclose()
- fixed issue #32: problems when subfolder has same name as folder
- fixed issue #36: vfsStreamWrapper::stream_open should return false while
trying to open existing non-writable file, patch provided by Alexander Peresypkin
0.11.2, 2012-01-14
==================
- fixed issue #29: set permissions properly when using
vfsStream::copyFromFileSystem(), patch provided by predakanga
- fixed failing tests under PHP > 5.3.2
0.11.1, 2011-12-04
==================
- fixed issue #28: mkdir overwrites existing directories/files
0.11.0, 2011-11-29
==================
- implemented issue #20: vfsStream::create() removes old structure
- implemented issue #4: possibility to copy structure from existing file system
- fixed issue #23: unlink should not remove any directory
- fixed issue #25: vfsStreamDirectory::hasChild() gives false positives for
nested paths, patch provided by Andrew Coulton
- fixed issue #26: opening a file for reading only should not update its
modification time, reported and initial patch provided by Ludovic Chabant
0.10.1, 2011-08-22
==================
- fixed issue #16: replace vfsStreamContent to vfsStreamContainer for
autocompletion
- fixed issue #17: vfsStream::create() has issues with numeric directories,
patch provided by mathieuk
0.10.0, 2011-07-22
==================
- added new method vfsStreamContainer::hasChildren() and
vfsStreamDirectory::hasChildren()
- implemented issue #14: less verbose way to initialize vfsStream
- implemented issue #13: remove deprecated method vfsStreamContent::setFilemtime()
- implemented issue #6: locking meachanism for files
- ensured that stream_set_blocking(), stream_set_timeout() and
stream_set_write_buffer() on vfsStream urls have the same behaviour
with PHP 5.2 and 5.3
- implemented issue #10: method to print directory structure
0.9.0, 2011-07-13
=================
- implemented feature request issue #7: add support for fileatime() and filectime()
- fixed issue #3: add support for streamWrapper::stream_cast()
- fixed issue #9: resolve path not called everywhere its needed
- deprecated vfsStreamAbstractContent::setFilemtime(), use
vfsStreamAbstractContent::lastModified() instead, will be removed with 0.10.0
0.8.0, 2010-10-08
=================
- implemented enhancement #6: use vfsStream::umask() to influence initial file
mode for files and directories
- implemented enhancement #19: support of .. in the url, patch provided by
Guislain Duthieuw
- fixed issue #18: getChild() returns NULL when child's name contains parent name
- fixed bug with incomplete error message when accessing non-existing files on
root level
0.7.0, 2010-06-08
=================
- added new vfsStream::setup() method to simplify vfsStream usage
- fixed issue #15: mkdir creates a subfolder in a folder without permissions
0.6.0, 2010-02-15
=================
- added support for $mode param when opening files, implements enhancement #7
and fixes issue #13
- vfsStreamWrapper::stream_open() now evaluates $options for STREAM_REPORT_ERRORS
0.5.0, 2010-01-25
=================
- added support for rename(), patch provided by Benoit Aubuchon
- added support for . as directory alias so that vfs://foo/. resolves to
vfs://foo, can be used as workaround for bug #8
0.4.0, 2009-07-13
=================
- added support for file modes, users and groups (with restrictions, see
http://code.google.com/p/bovigo/wiki/vfsStreamDocsKnownIssues)
- fixed bug #5: vfsStreamDirectory::addChild() does not replace child with same
name
- fixed bug with is_writable() because of missing stat() fields, patch provided
by Sergey Galkin
0.3.2, 2009-02-16
=================
- support trailing slashes on directories in vfsStream urls, patch provided by
Gabriel Birke
- fixed bug #4: vfsstream can only be read once, reported by Christoph Bloemer
- enabled multiple iterations at the same time over the same directory
0.3.1, 2008-02-18
=================
- fixed path/directory separator issues under linux systems
- fixed uid/gid issues under linux systems
0.3.0, 2008-01-02
=================
- added support for rmdir()
- added vfsStream::newDirectory(), dropped vfsStreamDirectory::ceate()
- added new interface vfsStreamContainer
- added vfsStreamContent::at() which allows code like
$file = vfsStream::newFile('file.txt.')->withContent('foo')->at($otherDir);
- added vfsStreamContent::lastModified(), made vfsStreamContent::setFilemtime()
an alias for this
- moved from Stubbles development environment to bovigo
- refactorings to reduce crap index of various methods
0.2.0, 2007-12-29
=================
- moved vfsStreamWrapper::PROTOCOL to vfsStream::SCHEME
- added new vfsStream::url() method to assist in creating correct vfsStream urls
- added vfsStream::path() method as opposite to vfsStream::url()
- a call to vfsStreamWrapper::register() will now reset the root to null,
implemented on request from David Zuelke
- added support for is_readable(), is_dir(), is_file()
- added vfsStream::newFile() to be able to do
$file = vfsStream::newFile("foo.txt")->withContent("bar");
0.1.0, 2007-12-14
=================
Initial release.
Copyright (c) 2007-2013, Frank Kleine
Copyright (c) 2007-2014, Frank Kleine
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -6,7 +6,15 @@
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.1"
},
"autoload": {
"psr-0": { "org\\bovigo\\vfs\\": "src/main/php" }
},
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
}
}
\ No newline at end of file
......@@ -32,6 +32,7 @@
<log type="coverage-html" target="docs/coverage" charset="UTF-8"
yui="true" highlight="false"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="docs/phpunit/clover.xml"/>
<log type="junit" target="docs/phpunit/junit.xml" logIncompleteSkipped="false"/>
<log type="testdox-html" target="docs/phpunit/testdox.html"/>
</logging>
......
For more information have a look in the [wiki](https://github.com/mikey179/vfsStream/wiki).
[![Build Status](https://secure.travis-ci.org/mikey179/vfsStream.png)](http://travis-ci.org/mikey179/vfsStream)
\ No newline at end of file
[![Build Status](https://secure.travis-ci.org/mikey179/vfsStream.png)](http://travis-ci.org/mikey179/vfsStream) [![Coverage Status](https://coveralls.io/repos/mikey179/vfsStream/badge.png?branch=master)](https://coveralls.io/r/mikey179/vfsStream?branch=master)
[![Latest Stable Version](https://poser.pugx.org/mikey179/vfsStream/version.png)](https://packagist.org/packages/mikey179/vfsStream) [![Latest Unstable Version](https://poser.pugx.org/mikey179/vfsStream/v/unstable.png)](//packagist.org/packages/mikey179/vfsStream)
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs;
/**
* Directory container.
*/
class DotDirectory extends vfsStreamDirectory
{
/**
* returns iterator for the children
*
* @return vfsStreamContainerIterator
*/
public function getIterator()
{
return new \ArrayIterator(array());
}
/**
* checks whether dir is a dot dir
*
* @return bool
*/
public function isDot()
{
return true;
}
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\content;
/**
* Interface for actual file contents.
*
* @since 1.3.0
*/
interface FileContent
{
/**
* returns actual content
*
* @return string
*/
public function content();
/**
* returns size of content
*
* @return int
*/
public function size();
/**
* reads the given amount of bytes from content
*
* @param int $count
* @return string
*/
public function read($count);
/**
* seeks to the given offset
*
* @param int $offset
* @param int $whence
* @return bool
*/
public function seek($offset, $whence);
/**
* checks whether pointer is at end of file
*
* @return bool
*/
public function eof();
/**
* writes an amount of data
*
* @param string $data
* @return amount of written bytes
*/
public function write($data);
/**
* Truncates a file to a given length
*
* @param int $size length to truncate file to
* @return bool
*/