PK yVRt;B B phpdoc.dist.xmlnu ٘
vfsStream API Doc
docs/api
bovigo\vfs
docs/api
src
PK yVR|V V .coveralls.ymlnu ٘ coverage_clover: docs/phpunit/clover.xml
json_path: docs/phpunit/coveralls-upload.jsonPK yVRF+{ {
composer.locknu ٘ {
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "212f953fb57cb0368b67252d0cb1e46f",
"packages": [],
"packages-dev": [
{
"name": "bovigo/assert",
"version": "v6.1.0",
"source": {
"type": "git",
"url": "https://github.com/bovigo/assert.git",
"reference": "f9910721fde3740464712be841ffe47518d14455"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bovigo/assert/zipball/f9910721fde3740464712be841ffe47518d14455",
"reference": "f9910721fde3740464712be841ffe47518d14455",
"shasum": ""
},
"require": {
"php": "^7.3||^8.0",
"sebastian/comparator": "^4.0",
"sebastian/exporter": "^4.0"
},
"require-dev": {
"mikey179/vfsstream": "^1.6.8",
"phpstan/phpstan": "^0.12.54",
"phpunit/phpunit": "^9.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.1.x-dev"
}
},
"autoload": {
"psr-4": {
"bovigo\\assert\\": "src/main/php"
},
"files": [
"src/main/php/assert.php",
"src/main/php/predicate/predicates.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Provides assertions for unit tests.",
"support": {
"issues": "https://github.com/bovigo/assert/issues",
"source": "https://github.com/bovigo/assert/tree/v6.1.0"
},
"time": "2020-11-15T16:37:38+00:00"
},
{
"name": "bovigo/callmap",
"version": "v6.2.1",
"source": {
"type": "git",
"url": "https://github.com/bovigo/callmap.git",
"reference": "5fe2246b9a46308e16c3bfdfb23cfa854835399b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bovigo/callmap/zipball/5fe2246b9a46308e16c3bfdfb23cfa854835399b",
"reference": "5fe2246b9a46308e16c3bfdfb23cfa854835399b",
"shasum": ""
},
"require": {
"bovigo/assert": "^6.1",
"php": "^7.3||^8.0"
},
"require-dev": {
"phpstan/phpstan": "^0.12.57",
"phpunit/phpunit": "^9.4",
"xp-framework/core": "^10.3 | ^9.9",
"xp-framework/unittest": "^11.1 | ^10.1 | ^9.7.1"
},
"suggest": {
"bovigo/assert": "To use argument verification",
"phpunit/phpunit": "Alternative option for argument verification",
"xp-framework/unittest": "Alternative option for argument verification"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.2.x-dev"
}
},
"autoload": {
"psr-4": {
"bovigo\\callmap\\": "src/main/php"
},
"files": [
"src/main/php/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Allows to stub and mock method calls by applying a callmap.",
"support": {
"issues": "https://github.com/bovigo/callmap/issues",
"source": "https://github.com/bovigo/callmap/tree/v6.2.1"
},
"time": "2020-12-19T09:00:24+00:00"
},
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
"version": "v0.7.1",
"source": {
"type": "git",
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
"reference": "fe390591e0241955f22eb9ba327d137e501c771c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c",
"reference": "fe390591e0241955f22eb9ba327d137e501c771c",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0 || ^2.0",
"php": ">=5.3",
"squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0"
},
"require-dev": {
"composer/composer": "*",
"phpcompatibility/php-compatibility": "^9.0",
"sensiolabs/security-checker": "^4.1.0"
},
"type": "composer-plugin",
"extra": {
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
},
"autoload": {
"psr-4": {
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Franck Nijhof",
"email": "franck.nijhof@dealerdirect.com",
"homepage": "http://www.frenck.nl",
"role": "Developer / IT Manager"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
"homepage": "http://www.dealerdirect.com",
"keywords": [
"PHPCodeSniffer",
"PHP_CodeSniffer",
"code quality",
"codesniffer",
"composer",
"installer",
"phpcs",
"plugin",
"qa",
"quality",
"standard",
"standards",
"style guide",
"stylecheck",
"tests"
],
"support": {
"issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
"source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
},
"time": "2020-12-07T18:04:37+00:00"
},
{
"name": "doctrine/coding-standard",
"version": "8.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/coding-standard.git",
"reference": "529d385bb3790431080493c0fe7adaec39df368a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/coding-standard/zipball/529d385bb3790431080493c0fe7adaec39df368a",
"reference": "529d385bb3790431080493c0fe7adaec39df368a",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
"php": "^7.1 || ^8.0",
"slevomat/coding-standard": "^6.3.9",
"squizlabs/php_codesniffer": "^3.5.5"
},
"type": "phpcodesniffer-standard",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Steve Müller",
"email": "st.mueller@dzh-online.de"
}
],
"description": "The Doctrine Coding Standard is a set of PHPCS rules applied to all Doctrine projects.",
"homepage": "https://www.doctrine-project.org/projects/coding-standard.html",
"keywords": [
"checks",
"code",
"coding",
"cs",
"doctrine",
"rules",
"sniffer",
"sniffs",
"standard",
"style"
],
"support": {
"issues": "https://github.com/doctrine/coding-standard/issues",
"source": "https://github.com/doctrine/coding-standard/tree/8.2.0"
},
"time": "2020-10-25T14:56:19+00:00"
},
{
"name": "doctrine/instantiator",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^8.0",
"ext-pdo": "*",
"ext-phar": "*",
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.0"
},
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
"type": "tidelift"
}
],
"time": "2020-11-10T18:47:58+00:00"
},
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [
"src/DeepCopy/deep_copy.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
"type": "tidelift"
}
],
"time": "2020-11-13T09:40:50+00:00"
},
{
"name": "nikic/php-parser",
"version": "v4.10.3",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984",
"reference": "dbe56d23de8fcb157bbc0cfb3ad7c7de0cfb0984",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=7.0"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.3"
},
"time": "2020-12-03T17:45:45+00:00"
},
{
"name": "phar-io/manifest",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
"ext-xmlwriter": "*",
"phar-io/version": "^3.0.1",
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
"source": "https://github.com/phar-io/manifest/tree/master"
},
"time": "2020-06-27T14:33:11+00:00"
},
{
"name": "phar-io/version",
"version": "3.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451",
"reference": "e4782611070e50613683d2b9a57730e9a3ba5451",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.0.4"
},
"time": "2020-12-13T23:18:30+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jaap van Otterdijk",
"email": "opensource@ijaap.nl"
}
],
"description": "Common reflection classes used by phpdocumentor to reflect the code structure",
"homepage": "http://www.phpdoc.org",
"keywords": [
"FQSEN",
"phpDocumentor",
"phpdoc",
"reflection",
"static analysis"
],
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
},
"time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"shasum": ""
},
"require": {
"ext-filter": "*",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.3",
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"mockery/mockery": "~1.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
},
{
"name": "Jaap van Otterdijk",
"email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
},
"time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"ext-tokenizer": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
},
"time": "2020-09-17T18:55:26+00:00"
},
{
"name": "phpspec/prophecy",
"version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d",
"reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.2",
"php": "^7.2 || ~8.0, <8.1",
"phpdocumentor/reflection-docblock": "^5.2",
"sebastian/comparator": "^3.0 || ^4.0",
"sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
"phpspec/phpspec": "^6.0",
"phpunit/phpunit": "^8.0 || ^9.0 <9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.11.x-dev"
}
},
"autoload": {
"psr-4": {
"Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com",
"homepage": "http://everzet.com"
},
{
"name": "Marcello Duarte",
"email": "marcello.duarte@gmail.com"
}
],
"description": "Highly opinionated mocking framework for PHP 5.3+",
"homepage": "https://github.com/phpspec/prophecy",
"keywords": [
"Double",
"Dummy",
"fake",
"mock",
"spy",
"stub"
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/1.12.1"
},
"time": "2020-09-29T09:10:42+00:00"
},
{
"name": "phpstan/phpdoc-parser",
"version": "0.4.9",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531",
"reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"consistence/coding-standard": "^3.5",
"ergebnis/composer-normalize": "^2.0.2",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"phing/phing": "^2.16.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12.26",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^6.3",
"slevomat/coding-standard": "^4.7.2",
"symfony/process": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.4-dev"
}
},
"autoload": {
"psr-4": {
"PHPStan\\PhpDocParser\\": [
"src/"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/master"
},
"time": "2020-08-03T20:32:43+00:00"
},
{
"name": "phpstan/phpstan",
"version": "0.12.63",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "c97ec4754bd53099a06c24847bd2870b99966b6a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/c97ec4754bd53099a06c24847bd2870b99966b6a",
"reference": "c97ec4754bd53099a06c24847bd2870b99966b6a",
"shasum": ""
},
"require": {
"php": "^7.1|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
},
"bin": [
"phpstan",
"phpstan.phar"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.12-dev"
}
},
"autoload": {
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/0.12.63"
},
"funding": [
{
"url": "https://github.com/ondrejmirtes",
"type": "github"
},
{
"url": "https://www.patreon.com/phpstan",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
"type": "tidelift"
}
],
"time": "2020-12-15T16:37:16+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
"version": "0.12.6",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-deprecation-rules.git",
"reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/46dbd43c2db973d2876d6653e53f5c2cc3a01fbb",
"reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0",
"phpstan/phpstan": "^0.12.60"
},
"require-dev": {
"phing/phing": "^2.16.3",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^7.5.20"
},
"type": "phpstan-extension",
"extra": {
"branch-alias": {
"dev-master": "0.12-dev"
},
"phpstan": {
"includes": [
"rules.neon"
]
}
},
"autoload": {
"psr-4": {
"PHPStan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.",
"support": {
"issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues",
"source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/0.12.6"
},
"time": "2020-12-13T10:20:54+00:00"
},
{
"name": "phpstan/phpstan-phpunit",
"version": "0.12.17",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-phpunit.git",
"reference": "432575b41cf2d4f44e460234acaf56119ed97d36"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/432575b41cf2d4f44e460234acaf56119ed97d36",
"reference": "432575b41cf2d4f44e460234acaf56119ed97d36",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0",
"phpstan/phpstan": "^0.12.60"
},
"conflict": {
"phpunit/phpunit": "<7.0"
},
"require-dev": {
"phing/phing": "^2.16.3",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan-strict-rules": "^0.12.6",
"phpunit/phpunit": "^7.5.20"
},
"type": "phpstan-extension",
"extra": {
"branch-alias": {
"dev-master": "0.12-dev"
},
"phpstan": {
"includes": [
"extension.neon",
"rules.neon"
]
}
},
"autoload": {
"psr-4": {
"PHPStan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "PHPUnit extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
"source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.17"
},
"time": "2020-12-13T12:12:51+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f3e026641cc91909d421802dd3ac7827ebfd97e1",
"reference": "f3e026641cc91909d421802dd3ac7827ebfd97e1",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.10.2",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
"sebastian/code-unit-reverse-lookup": "^2.0.2",
"sebastian/complexity": "^2.0",
"sebastian/environment": "^5.1.2",
"sebastian/lines-of-code": "^1.0.3",
"sebastian/version": "^3.0.1",
"theseer/tokenizer": "^1.2.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcov": "*",
"ext-xdebug": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.2-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
"homepage": "https://github.com/sebastianbergmann/php-code-coverage",
"keywords": [
"coverage",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.5"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-28T06:44:49+00:00"
},
{
"name": "phpunit/php-file-iterator",
"version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
"reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
"reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
"homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
"keywords": [
"filesystem",
"iterator"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:57:25+00:00"
},
{
"name": "phpunit/php-invoker",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"ext-pcntl": "*",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcntl": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Invoke callables with a timeout",
"homepage": "https://github.com/sebastianbergmann/php-invoker/",
"keywords": [
"process"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
"source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:58:55+00:00"
},
{
"name": "phpunit/php-text-template",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
"reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Simple template engine.",
"homepage": "https://github.com/sebastianbergmann/php-text-template/",
"keywords": [
"template"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
"source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T05:33:50+00:00"
},
{
"name": "phpunit/php-timer",
"version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
"reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Utility class for timing",
"homepage": "https://github.com/sebastianbergmann/php-timer/",
"keywords": [
"timer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
"source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:16:10+00:00"
},
{
"name": "phpunit/phpunit",
"version": "9.5.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
"reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
"myclabs/deep-copy": "^1.10.1",
"phar-io/manifest": "^2.0.1",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
"phpunit/php-code-coverage": "^9.2.3",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
"phpunit/php-timer": "^5.0.2",
"sebastian/cli-parser": "^1.0.1",
"sebastian/code-unit": "^1.0.6",
"sebastian/comparator": "^4.0.5",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
"sebastian/exporter": "^4.0.3",
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
"sebastian/type": "^2.3",
"sebastian/version": "^3.0.2"
},
"require-dev": {
"ext-pdo": "*",
"phpspec/prophecy-phpunit": "^2.0.1"
},
"suggest": {
"ext-soap": "*",
"ext-xdebug": "*"
},
"bin": [
"phpunit"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.5-dev"
}
},
"autoload": {
"classmap": [
"src/"
],
"files": [
"src/Framework/Assert/Functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "The PHP Unit Testing framework.",
"homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.0"
},
"funding": [
{
"url": "https://phpunit.de/donate.html",
"type": "custom"
},
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-12-04T05:05:53+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for parsing CLI options",
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
"source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:08:49+00:00"
},
{
"name": "sebastian/code-unit",
"version": "1.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
"reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
"reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Collection of value objects that represent the PHP code units",
"homepage": "https://github.com/sebastianbergmann/code-unit",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit/issues",
"source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:08:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
"source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
"version": "4.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "55f4261989e546dc112258c7a75935a81a7ce382"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382",
"reference": "55f4261989e546dc112258c7a75935a81a7ce382",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/diff": "^4.0",
"sebastian/exporter": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
}
],
"description": "Provides the functionality to compare PHP values for equality",
"homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T15:49:45+00:00"
},
{
"name": "sebastian/complexity",
"version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.7",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for calculating the complexity of PHP code units",
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
"source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T15:52:27+00:00"
},
{
"name": "sebastian/diff",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"symfony/process": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Kore Nordmann",
"email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
"diff",
"udiff",
"unidiff",
"unified diff"
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:10:38+00:00"
},
{
"name": "sebastian/environment",
"version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
"reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
"homepage": "http://www.github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
"hhvm"
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/5.1.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:52:38+00:00"
},
{
"name": "sebastian/exporter",
"version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-mbstring": "*",
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
"homepage": "http://www.github.com/sebastianbergmann/exporter",
"keywords": [
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T05:24:23+00:00"
},
{
"name": "sebastian/global-state",
"version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
"reference": "a90ccbddffa067b51f574dea6eb25d5680839455"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455",
"reference": "a90ccbddffa067b51f574dea6eb25d5680839455",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-dom": "*",
"phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Snapshotting of global state",
"homepage": "http://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/5.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T15:55:19+00:00"
},
{
"name": "sebastian/lines-of-code",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.6",
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library for counting the lines of code in PHP source code",
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-11-28T06:42:11+00:00"
},
{
"name": "sebastian/object-enumerator",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
"reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
"reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
"shasum": ""
},
"require": {
"php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
"source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:12:34+00:00"
},
{
"name": "sebastian/object-reflector",
"version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
"source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:14:26+00:00"
},
{
"name": "sebastian/recursion-context",
"version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
"reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
}
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:17:30+00:00"
},
{
"name": "sebastian/resource-operations",
"version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
}
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
"issues": "https://github.com/sebastianbergmann/resource-operations/issues",
"source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:45:17+00:00"
},
{
"name": "sebastian/type",
"version": "2.3.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
"reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
"source": "https://github.com/sebastianbergmann/type/tree/2.3.1"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-10-26T13:18:59+00:00"
},
{
"name": "sebastian/version",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
"reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
"reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
"php": ">=7.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
"source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
},
"funding": [
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
}
],
"time": "2020-09-28T06:39:44+00:00"
},
{
"name": "slevomat/coding-standard",
"version": "6.4.1",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
"reference": "696dcca217d0c9da2c40d02731526c1e25b65346"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346",
"reference": "696dcca217d0c9da2c40d02731526c1e25b65346",
"shasum": ""
},
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
"php": "^7.1 || ^8.0",
"phpstan/phpdoc-parser": "0.4.5 - 0.4.9",
"squizlabs/php_codesniffer": "^3.5.6"
},
"require-dev": {
"phing/phing": "2.16.3",
"php-parallel-lint/php-parallel-lint": "1.2.0",
"phpstan/phpstan": "0.12.48",
"phpstan/phpstan-deprecation-rules": "0.12.5",
"phpstan/phpstan-phpunit": "0.12.16",
"phpstan/phpstan-strict-rules": "0.12.5",
"phpunit/phpunit": "7.5.20|8.5.5|9.4.0"
},
"type": "phpcodesniffer-standard",
"extra": {
"branch-alias": {
"dev-master": "6.x-dev"
}
},
"autoload": {
"psr-4": {
"SlevomatCodingStandard\\": "SlevomatCodingStandard"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
"support": {
"issues": "https://github.com/slevomat/coding-standard/issues",
"source": "https://github.com/slevomat/coding-standard/tree/6.4.1"
},
"funding": [
{
"url": "https://github.com/kukulich",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
"type": "tidelift"
}
],
"time": "2020-10-05T12:39:37+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.5.8",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4",
"reference": "9d583721a7157ee997f235f327de038e7ea6dac4",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"bin": [
"bin/phpcs",
"bin/phpcbf"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2020-10-23T02:01:07+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
"reference": "75a63c33a8577608444246075ea0af0d052e452a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
"reference": "75a63c33a8577608444246075ea0af0d052e452a",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Arne Blankerts",
"email": "arne@blankerts.de",
"role": "Developer"
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
"source": "https://github.com/theseer/tokenizer/tree/master"
},
"funding": [
{
"url": "https://github.com/theseer",
"type": "github"
}
],
"time": "2020-07-12T23:59:07+00:00"
},
{
"name": "webmozart/assert",
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Assertions to validate method input/output with nice error messages.",
"keywords": [
"assert",
"check",
"validate"
],
"support": {
"issues": "https://github.com/webmozart/assert/issues",
"source": "https://github.com/webmozart/assert/tree/master"
},
"time": "2020-07-08T17:02:28+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.2|^8.0"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"
}
PK yVR
CODE_OF_CONDUCT.mdnu ٘ # Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at vfs-stream@bovigo.org. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
PK yVRyCR R README.mdnu ٘ # vfsStream
![Tests](https://github.com/bovigo/vfsStream/workflows/Tests/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/bovigo/vfsStream/badge.svg)](https://coveralls.io/github/bovigo/vfsStream) [![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)
vfsStream is a stream wrapper for a virtual file system that may be helpful in unit tests to mock the real file system. It can be used with any unit test framework, like PHPUnit or SimpleTest.
### Documentation
See the [wiki](https://github.com/bovigo/vfsStream/wiki).
Also you might want to check [vfsStream examples](https://github.com/bovigo/vfs-stream-examples).
PK yVRH H
.gitignorenu ٘ /docs
/vendor
.phpunit.result.cache
phpstan.neon
phpunit.xml
phpdoc.xml
PK yVR # examples/FilePermissionsExample.phpnu ٘
PK yVRtF< examples/FilemodeExample.phpnu ٘ id = $id;
$this->fileMode = $fileMode;
}
/**
* sets the directory
*
* @param string $directory
*/
public function setDirectory($directory)
{
$this->directory = $directory . DIRECTORY_SEPARATOR . $this->id;
if (file_exists($this->directory) === false) {
mkdir($this->directory, $this->fileMode, true);
}
}
// more source code here...
}
?>
PK yVR Ͱ examples/FailureExample.phpnu ٘ filename = $filename;
}
/**
* sets the directory
*
* @param string $directory
*/
public function writeData($data)
{
$bytes = @file_put_contents($this->filename, $data);
if (false === $bytes) {
return 'could not write data';
}
return 'ok';
}
// more source code here...
}
?>
PK yVRG G * examples/FileModeExampleTestCaseOldWay.phpnu ٘ setDirectory(__DIR__);
if (DIRECTORY_SEPARATOR === '\\') {
// can not really test on windows, filemode from mkdir() is ignored
$this->assertEquals(40777, decoct(fileperms(__DIR__ . '/id')));
} else {
$this->assertEquals(40700, decoct(fileperms(__DIR__ . '/id')));
}
}
/**
* test correct file mode for created directory
*/
public function testDirectoryHasCorrectDifferentFilePermissions()
{
$example = new FilemodeExample('id', 0755);
$example->setDirectory(__DIR__);
if (DIRECTORY_SEPARATOR === '\\') {
// can not really test on windows, filemode from mkdir() is ignored
$this->assertEquals(40777, decoct(fileperms(__DIR__ . '/id')));
} else {
$this->assertEquals(40755, decoct(fileperms(__DIR__ . '/id')));
}
}
}
?>
PK yVR? ? examples/bootstrap.phpnu ٘ PK yVRX5 5 1 examples/FilemodeExampleTestCaseWithVfsStream.phpnu ٘ root = vfsStream::setup('exampleDir');
}
/**
* test that the directory is created
*/
public function testDirectoryIsCreatedWithDefaultPermissions()
{
$example = new FilemodeExample('id');
$example->setDirectory(vfsStream::url('exampleDir'));
$this->assertEquals(0700, $this->root->getChild('id')->getPermissions());
}
/**
* test that the directory is created
*/
public function testDirectoryIsCreatedWithGivenPermissions()
{
$example = new FilemodeExample('id', 0755);
$example->setDirectory(vfsStream::url('exampleDir'));
$this->assertEquals(0755, $this->root->getChild('id')->getPermissions());
}
}
?>
PK yVR : : + examples/FilePermissionsExampleTestCase.phpnu ٘ writeConfig(array('foo' => 'bar'),
vfsStream::url('exampleDir/writable.ini')
);
// assertions here
}
/**
* @test
*/
public function directoryNotWritable()
{
vfsStream::setup('exampleDir', 0444);
$example = new FilePermissionsExample();
$example->writeConfig(array('foo' => 'bar'),
vfsStream::url('exampleDir/notWritable.ini')
);
}
}
?>
PK yVR " examples/ExampleTestCaseOldWay.phpnu ٘ assertFalse(file_exists(__DIR__ . '/id'));
$example->setDirectory(__DIR__);
$this->assertTrue(file_exists(__DIR__ . '/id'));
}
}
?>
PK yVR@l܀ ) examples/ExampleTestCaseWithVfsStream.phpnu ٘ root = vfsStream::setup('exampleDir');
}
/**
* @test
*/
public function directoryIsCreated()
{
$example = new Example('id');
$this->assertFalse($this->root->hasChild('id'));
$example->setDirectory(vfsStream::url('exampleDir'));
$this->assertTrue($this->root->hasChild('id'));
}
}
?>
PK yVR%, examples/Example.phpnu ٘ id = $id;
}
/**
* sets the directory
*
* @param string $directory
*/
public function setDirectory($directory)
{
$this->directory = $directory . DIRECTORY_SEPARATOR . $this->id;
if (file_exists($this->directory) === false) {
mkdir($this->directory, 0700, true);
}
}
// more source code here...
}
?>
PK yVRIfXL L # examples/FailureExampleTestCase.phpnu ٘ root = vfsStream::setup('exampleDir');
}
/**
* @test
*/
public function returnsOkOnNoFailure()
{
$example = new FailureExample(vfsStream::url('exampleDir/test.txt'));
$this->assertSame('ok', $example->writeData('testdata'));
$this->assertTrue($this->root->hasChild('test.txt'));
$this->assertSame('testdata', $this->root->getChild('test.txt')->getContent());
}
/**
* @test
*/
public function returnsErrorMessageIfWritingToFileFails()
{
$file = vfsStream::newFile('test.txt', 0000)
->withContent('notoverwritten')
->at($this->root);
$example = new FailureExample(vfsStream::url('exampleDir/test.txt'));
$this->assertSame('could not write data', $example->writeData('testdata'));
$this->assertTrue($this->root->hasChild('test.txt'));
$this->assertSame('notoverwritten', $this->root->getChild('test.txt')->getContent());
}
}
?>
PK yVRd src/vfsStreamDirectory.phpnu ٘ type = vfsStreamContent::TYPE_DIR;
parent::__construct($name, $permissions);
}
/**
* returns default permissions for concrete implementation
*
* @since 0.8.0
*/
protected function getDefaultPermissions(): int
{
return 0777;
}
/**
* returns size of directory
*
* The size of a directory is always 0 bytes. To calculate the summarized
* size of all children in the directory use sizeSummarized().
*/
public function size(): int
{
return 0;
}
/**
* returns summarized size of directory and its children
*/
public function sizeSummarized(): int
{
$size = 0;
foreach ($this->children as $child) {
if ($child instanceof self) {
$size += $child->sizeSummarized();
} else {
$size += $child->size();
}
}
return $size;
}
/**
* sets parent path
*
* @internal only to be set by parent
*
* @since 1.2.0
*/
public function setParentPath(string $parentPath): void
{
parent::setParentPath($parentPath);
foreach ($this->children as $child) {
$child->setParentPath($this->path());
}
}
/**
* adds child to the directory
*/
public function addChild(vfsStreamContent $child): void
{
$child->setParentPath($this->path());
$this->children[$child->getName()] = $child;
$this->updateModifications();
}
/**
* removes child from the directory
*/
public function removeChild(string $name): bool
{
foreach ($this->children as $key => $child) {
if ($child->appliesTo($name)) {
$child->removeParentPath();
unset($this->children[$key]);
$this->updateModifications();
return true;
}
}
return false;
}
/**
* updates internal timestamps
*/
protected function updateModifications(): void
{
$time = time();
$this->lastAttributeModified = $time;
$this->lastModified = $time;
}
/**
* checks whether the container contains a child with the given name
*/
public function hasChild(string $name): bool
{
return $this->getChild($name) !== null;
}
/**
* returns the child with the given name
*/
public function getChild(string $name): ?vfsStreamContent
{
$childName = $this->getRealChildName($name);
foreach ($this->children as $child) {
if ($child->getName() === $childName) {
return $child;
}
if (! $child instanceof vfsStreamContainer) {
continue;
}
if ($child->appliesTo($childName) && $child->hasChild($childName)) {
return $child->getChild($childName);
}
}
return null;
}
/**
* helper method to detect the real child name
*/
protected function getRealChildName(string $name): string
{
if ($this->appliesTo($name) === true) {
return self::getChildName($name, $this->name);
}
return $name;
}
/**
* helper method to calculate the child name
*/
protected static function getChildName(string $name, string $ownName): string
{
if ($name === $ownName) {
return $name;
}
return substr($name, strlen($ownName) + 1);
}
/**
* checks whether directory contains any children
*
* @since 0.10.0
*/
public function hasChildren(): bool
{
return count($this->children) > 0;
}
/**
* returns a list of children for this directory
*
* @return vfsStreamContent[]
*/
public function getChildren(): array
{
return array_values($this->children);
}
/**
* returns iterator for the children
*
* @return vfsStreamContainerIterator
*/
public function getIterator(): Iterator
{
return new vfsStreamContainerIterator($this->children);
}
/**
* checks whether dir is a dot dir
*/
public function isDot(): bool
{
return $this->name === '.' || $this->name === '..';
}
}
class_alias('bovigo\vfs\vfsStreamDirectory', 'org\bovigo\vfs\vfsStreamDirectory');
PK yVR A A src/vfsStream.phpnu ٘
* [
* 'Core' => [
* 'AbstractFactory' => [
* 'test.php' => 'some text content',
* 'other.php' => 'Some more text content',
* 'Invalid.csv' => 'Something else',
* ],
* 'AnEmptyFolder' => [],
* 'badlocation.php' => 'some bad content',
* ]
* ]
*
* the resulting directory tree will look like this:
*
* root
* `- Core
* |- badlocation.php
* |- AbstractFactory
* | |- test.php
* | |- other.php
* | `- Invalid.csv
* `- AnEmptyFolder
*
* Arrays will become directories with their key as directory name, and
* strings becomes files with their key as file name and their value as file
* content.
*
* @see https://github.com/mikey179/vfsStream/issues/14
* @see https://github.com/mikey179/vfsStream/issues/20
*
* @param string $rootDirName name of root directory
* @param int|null $permissions file permissions of root directory
* @param array $structure directory structure to add under root directory
*
* @since 0.7.0
*/
public static function setup(
string $rootDirName = 'root',
?int $permissions = null,
array $structure = []
): vfsStreamDirectory {
vfsStreamWrapper::register();
return self::create($structure, vfsStreamWrapper::setRoot(self::newDirectory($rootDirName, $permissions)));
}
/**
* creates vfsStream directory structure from an array and adds it to given base dir
*
* Assumed $structure contains an array like this:
*
* [
* 'Core' => [
* 'AbstractFactory' => [
* 'test.php' => 'some text content',
* 'other.php' => 'Some more text content',
* 'Invalid.csv' => 'Something else',
* ],
* 'AnEmptyFolder' => [],
* 'badlocation.php' => 'some bad content',
* ]
* ]
*
* the resulting directory tree will look like this:
*
* baseDir
* `- Core
* |- badlocation.php
* |- AbstractFactory
* | |- test.php
* | |- other.php
* | `- Invalid.csv
* `- AnEmptyFolder
*
* Arrays will become directories with their key as directory name, and
* strings becomes files with their key as file name and their value as file
* content.
*
* If no baseDir is given it will try to add the structure to the existing
* root directory without replacing existing childs except those with equal
* names.
*
* @see https://github.com/mikey179/vfsStream/issues/14
* @see https://github.com/mikey179/vfsStream/issues/20
*
* @param array $structure directory structure to add under root directory
* @param vfsStreamDirectory|null $baseDir base directory to add structure to
*
* @throws InvalidArgumentException
*
* @since 0.10.0
*/
public static function create(array $structure, ?vfsStreamDirectory $baseDir = null): vfsStreamDirectory
{
if ($baseDir === null) {
$baseDir = vfsStreamWrapper::getRoot();
}
if ($baseDir === null) {
throw new InvalidArgumentException('No baseDir given and no root directory set.');
}
return self::addStructure($structure, $baseDir);
}
/**
* helper method to create subdirectories recursively
*
* @param mixed[] $structure subdirectory structure to add
* @param vfsStreamDirectory $baseDir directory to add the structure to
*/
protected static function addStructure(array $structure, vfsStreamDirectory $baseDir): vfsStreamDirectory
{
foreach ($structure as $name => $data) {
$name = (string) $name;
if (is_array($data) === true) {
self::addStructure($data, self::newDirectory($name)->at($baseDir));
} elseif (is_string($data) === true) {
$matches = null;
preg_match('/^\[(.*)\]$/', $name, $matches);
if ($matches !== []) {
self::newBlock($matches[1])->withContent($data)->at($baseDir);
} else {
self::newFile($name)->withContent($data)->at($baseDir);
}
} elseif ($data instanceof FileContent) {
self::newFile($name)->withContent($data)->at($baseDir);
} elseif ($data instanceof vfsStreamFile) {
$baseDir->addChild($data);
}
}
return $baseDir;
}
/**
* copies the file system structure from given path into the base dir
*
* If no baseDir is given it will try to add the structure to the existing
* root directory without replacing existing childs except those with equal
* names.
* File permissions are copied as well.
* Please note that file contents will only be copied if their file size
* does not exceed the given $maxFileSize which defaults to 1024 KB. In case
* the file is larger file content will be mocked, see
* https://github.com/mikey179/vfsStream/wiki/MockingLargeFiles.
*
* @see https://github.com/mikey179/vfsStream/issues/4
*
* @param string $path path to copy the structure from
* @param vfsStreamDirectory|null $baseDir directory to add the structure to
* @param int $maxFileSize maximum file size of files to copy content from
*
* @throws InvalidArgumentException
*
* @since 0.11.0
*/
public static function copyFromFileSystem(
string $path,
?vfsStreamDirectory $baseDir = null,
int $maxFileSize = 1048576
): vfsStreamDirectory {
if ($baseDir === null) {
/** @var vfsStreamDirectory|null $baseDir **/
$baseDir = vfsStreamWrapper::getRoot();
}
if ($baseDir === null) {
throw new InvalidArgumentException('No baseDir given and no root directory set.');
}
$dir = new DirectoryIterator($path);
foreach ($dir as $fileinfo) {
switch (filetype($fileinfo->getPathname())) {
case 'file':
if ($fileinfo->getSize() <= $maxFileSize) {
$content = file_get_contents($fileinfo->getPathname());
} else {
$content = new LargeFileContent($fileinfo->getSize());
}
self::newFile(
$fileinfo->getFilename(),
octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4))
)
->withContent($content)
->at($baseDir);
break;
case 'dir':
if (! $fileinfo->isDot()) {
self::copyFromFileSystem(
$fileinfo->getPathname(),
self::newDirectory(
$fileinfo->getFilename(),
octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4))
)->at($baseDir),
$maxFileSize
);
}
break;
case 'block':
self::newBlock(
$fileinfo->getFilename(),
octdec(substr(sprintf('%o', $fileinfo->getPerms()), -4))
)->at($baseDir);
break;
}
}
return $baseDir;
}
/**
* returns a new file with given name
*
* @param string $name name of file to create
* @param int|null $permissions permissions of file to create
*/
public static function newFile(string $name, ?int $permissions = null): vfsStreamFile
{
return new vfsStreamFile($name, $permissions);
}
/**
* Returns a new erroneous file with given name.
*
* Allows for throwing an error during fopen, fwrite, etc.
*
* For example:
*
* $file = vfsStream::newErroneousFile('foo.txt', ['open' => 'error message']);
*
* Will generate a file that always fails on open and displays "error message".
*
* You can set errors for: open, read, write, truncate, tell, seek, stat,
* eof, and lock.
*
* @param string $name name of file to create
* @param string[] $errorMessages Formatted as [action => message], e.g. ['open' => 'error message']
* @param int|null $permissions permissions of file to create
*/
public static function newErroneousFile(
string $name,
array $errorMessages,
?int $permissions = null
): vfsStreamErroneousFile {
return new vfsStreamErroneousFile($name, $errorMessages, $permissions);
}
/**
* returns a new directory with given name
*
* If the name contains slashes, a new directory structure will be created.
* The returned directory will always be the parent directory of this
* directory structure.
*
* @param string $name name of directory to create
* @param int|null $permissions permissions of directory to create
*/
public static function newDirectory(string $name, ?int $permissions = null): vfsStreamDirectory
{
if (substr($name, 0, 1) === '/') {
$name = substr($name, 1);
}
$firstSlash = strpos($name, '/');
if ($firstSlash === false) {
return new vfsStreamDirectory($name, $permissions);
}
$ownName = substr($name, 0, $firstSlash);
$subDirs = substr($name, $firstSlash + 1);
$directory = new vfsStreamDirectory($ownName, $permissions);
if (is_string($subDirs) && strlen($subDirs) > 0) {
self::newDirectory($subDirs, $permissions)->at($directory);
}
return $directory;
}
/**
* returns a new block with the given name
*
* @param string $name name of the block device
* @param int|null $permissions permissions of block to create
*/
public static function newBlock(string $name, ?int $permissions = null): vfsStreamBlock
{
return new vfsStreamBlock($name, $permissions);
}
/**
* returns current user
*
* If the system does not support posix_getuid() the current user will be root (0).
*/
public static function getCurrentUser(): int
{
return function_exists('posix_getuid') ? posix_getuid() : self::OWNER_ROOT;
}
/**
* returns current group
*
* If the system does not support posix_getgid() the current group will be root (0).
*/
public static function getCurrentGroup(): int
{
return function_exists('posix_getgid') ? posix_getgid() : self::GROUP_ROOT;
}
/**
* use visitor to inspect a content structure
*
* If the given content is null it will fall back to use the current root
* directory of the stream wrapper.
*
* Returns given visitor for method chaining comfort.
*
* @see https://github.com/mikey179/vfsStream/issues/10
*
* @param vfsStreamVisitor $visitor the visitor who inspects
* @param vfsStreamContent|null $content directory structure to inspect
*
* @throws InvalidArgumentException
*
* @since 0.10.0
*/
public static function inspect(vfsStreamVisitor $visitor, ?vfsStreamContent $content = null): vfsStreamVisitor
{
if ($content !== null) {
return $visitor->visit($content);
}
$root = vfsStreamWrapper::getRoot();
if ($root === null) {
throw new InvalidArgumentException('No content given and no root directory set.');
}
return $visitor->visitDirectory($root);
}
/**
* sets quota to given amount of bytes
*
* @since 1.1.0
*/
public static function setQuota(int $bytes): void
{
vfsStreamWrapper::setQuota(new Quota($bytes));
}
/**
* checks if vfsStream lists dotfiles in directory listings
*
* @since 1.3.0
*/
public static function useDotfiles(): bool
{
return self::$dotFiles;
}
/**
* disable dotfiles in directory listings
*
* @since 1.3.0
*/
public static function disableDotfiles(): void
{
self::$dotFiles = false;
}
/**
* enable dotfiles in directory listings
*
* @since 1.3.0
*/
public static function enableDotfiles(): void
{
self::$dotFiles = true;
}
}
class_alias('bovigo\vfs\vfsStream', 'org\bovigo\vfs\vfsStream');
PK yVRgpH src/DotDirectory.phpnu ٘
*/
public function getIterator(): Iterator
{
return new ArrayIterator([]);
}
/**
* checks whether dir is a dot dir
*/
public function isDot(): bool
{
return true;
}
}
class_alias('bovigo\vfs\DotDirectory', 'org\bovigo\vfs\DotDirectory');
PK yVR{ū'' '' src/vfsStreamFile.phpnu ٘
*/
protected $sharedLock = [];
/**
* constructor
*
* @param int|null $permissions optional
*/
public function __construct(string $name, ?int $permissions = null)
{
$this->content = new StringBasedFileContent('');
$this->type = vfsStreamContent::TYPE_FILE;
parent::__construct($name, $permissions);
}
/**
* returns default permissions for concrete implementation
*
* @since 0.8.0
*/
protected function getDefaultPermissions(): int
{
return 0666;
}
/**
* checks whether the container can be applied to given name
*/
public function appliesTo(string $name): bool
{
return $this->name === $name;
}
/**
* alias for withContent()
*
* @see withContent()
*
* @param string|FileContent $content
*/
public function setContent($content): vfsStreamFile
{
return $this->withContent($content);
}
/**
* sets the contents of the file
*
* Setting content with this method does not change the time when the file
* was last modified.
*
* @param string|FileContent $content
*
* @throws InvalidArgumentException
*/
public function withContent($content): vfsStreamFile
{
if (is_string($content)) {
$this->content = new StringBasedFileContent($content);
} elseif ($content instanceof FileContent) {
$this->content = $content;
} else {
throw new InvalidArgumentException(
sprintf(
'Given content must either be a string or an instance of %s',
FileContent::class
)
);
}
return $this;
}
/**
* returns the contents of the file
*
* Getting content does not change the time when the file
* was last accessed.
*/
public function getContent(): string
{
return $this->content->content();
}
/**
* returns the raw content object.
*
* @internal
*/
public function getContentObject(): FileContent
{
return $this->content;
}
/**
* simply open the file
*
* @since 0.9
*/
public function open(): void
{
$this->content->seek(0, SEEK_SET);
$this->lastAccessed = time();
}
/**
* open file and set pointer to end of file
*
* @since 0.9
*/
public function openForAppend(): void
{
$this->content->seek(0, SEEK_END);
$this->lastAccessed = time();
}
/**
* open file and truncate content
*
* @since 0.9
*/
public function openWithTruncate(): void
{
$this->open();
$this->content->truncate(0);
$time = time();
$this->lastAccessed = $time;
$this->lastModified = $time;
}
/**
* reads the given amount of bytes from content
*
* Using this method changes the time when the file was last accessed.
*/
public function read(int $count): string
{
$this->lastAccessed = time();
return $this->content->read($count);
}
/**
* returns the content until its end from current offset
*
* Using this method changes the time when the file was last accessed.
*
* @internal since 1.3.0
*/
public function readUntilEnd(): string
{
$this->lastAccessed = time();
return $this->content->readUntilEnd();
}
/**
* writes an amount of data
*
* Using this method changes the time when the file was last modified.
*
* @return int amount of written bytes
*/
public function write(string $data): int
{
$this->lastModified = time();
return $this->content->write($data);
}
/**
* Truncates a file to a given length
*
* @param int $size length to truncate file to
*
* @since 1.1.0
*/
public function truncate(int $size): bool
{
$this->content->truncate($size);
$this->lastModified = time();
return true;
}
/**
* checks whether pointer is at end of file
*/
public function eof(): bool
{
return $this->content->eof();
}
/**
* returns the current position within the file
*
* @internal since 1.3.0
*/
public function getBytesRead(): int
{
return $this->content->bytesRead();
}
/**
* seeks to the given offset
*/
public function seek(int $offset, int $whence): bool
{
return $this->content->seek($offset, $whence);
}
/**
* returns size of content
*/
public function size(): int
{
return $this->content->size();
}
/**
* locks file for
*
* @see https://github.com/mikey179/vfsStream/issues/6
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*
* @since 0.10.0
*/
public function lock($resource, int $operation): bool
{
if ((LOCK_NB & $operation) === LOCK_NB) {
$operation -= LOCK_NB;
}
// call to lock file on the same file handler firstly releases the lock
$this->unlock($resource);
if ($operation === LOCK_EX) {
if ($this->isLocked()) {
return false;
}
$this->setExclusiveLock($resource);
} elseif ($operation === LOCK_SH) {
if ($this->hasExclusiveLock()) {
return false;
}
$this->addSharedLock($resource);
}
return true;
}
/**
* Removes lock from file acquired by given resource
*
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*/
public function unlock($resource): void
{
if ($this->hasExclusiveLock($resource)) {
$this->exclusiveLock = null;
}
if (! $this->hasSharedLock($resource)) {
return;
}
unset($this->sharedLock[$this->getResourceId($resource)]);
}
/**
* Set exlusive lock on file by given resource
*
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*/
protected function setExclusiveLock($resource): void
{
$this->exclusiveLock = $this->getResourceId($resource);
}
/**
* Add shared lock on file by given resource
*
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*/
protected function addSharedLock($resource): void
{
$this->sharedLock[$this->getResourceId($resource)] = true;
}
/**
* checks whether file is locked
*
* @see https://github.com/mikey179/vfsStream/issues/6
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*
* @since 0.10.0
*/
public function isLocked($resource = null): bool
{
return $this->hasSharedLock($resource) || $this->hasExclusiveLock($resource);
}
/**
* checks whether file is locked in shared mode
*
* @see https://github.com/mikey179/vfsStream/issues/6
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*
* @since 0.10.0
*/
public function hasSharedLock($resource = null): bool
{
if ($resource !== null) {
return isset($this->sharedLock[$this->getResourceId($resource)]);
}
return ! empty($this->sharedLock);
}
/**
* Returns unique resource id
*
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*/
public function getResourceId($resource): string
{
if (is_resource($resource)) {
$data = stream_get_meta_data($resource);
$resource = $data['wrapper_data'];
}
return spl_object_hash($resource);
}
/**
* checks whether file is locked in exclusive mode
*
* @see https://github.com/mikey179/vfsStream/issues/6
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @param resource|vfsStreamWrapper $resource
*
* @since 0.10.0
*/
public function hasExclusiveLock($resource = null): bool
{
if ($resource !== null) {
return $this->exclusiveLock === $this->getResourceId($resource);
}
return $this->exclusiveLock !== null;
}
}
class_alias('bovigo\vfs\vfsStreamFile', 'org\bovigo\vfs\vfsStreamFile');
PK yVRȏh src/vfsStreamException.phpnu ٘ children = $children;
if (vfsStream::useDotfiles()) {
array_unshift($this->children, new DotDirectory('.'), new DotDirectory('..'));
}
reset($this->children);
}
/**
* resets children pointer
*/
public function rewind(): void
{
reset($this->children);
}
/**
* returns the current child
*/
public function current(): ?vfsStreamContent
{
$child = current($this->children);
if ($child === false) {
return null;
}
return $child;
}
/**
* returns the name of the current child
*/
public function key(): ?string
{
$child = current($this->children);
if ($child === false) {
return null;
}
return $child->getName();
}
/**
* iterates to next child
*/
public function next(): void
{
next($this->children);
}
/**
* checks if the current value is valid
*/
public function valid(): bool
{
return current($this->children) !== false;
}
}
class_alias('bovigo\vfs\vfsStreamContainerIterator', 'org\bovigo\vfs\vfsStreamContainerIterator');
PK yVRU"-) ) src/vfsStreamContent.phpnu ٘ type = vfsStreamContent::TYPE_BLOCK;
}
}
class_alias('bovigo\vfs\vfsStreamBlock', 'org\bovigo\vfs\vfsStreamBlock');
PK yVR$: src/vfsStreamErroneousFile.phpnu ٘ message], e.g. ['open' => 'error message']
* @param int|null $permissions optional
*/
public function __construct(string $name, array $errorMessages, ?int $permissions = null)
{
parent::__construct($name, $permissions);
$this->errorMessages = $errorMessages;
}
public function open(): void
{
if (isset($this->errorMessages['open'])) {
trigger_error($this->errorMessages['open'], E_USER_WARNING);
return;
}
parent::open();
}
public function openForAppend(): void
{
if (isset($this->errorMessages['open'])) {
trigger_error($this->errorMessages['open'], E_USER_WARNING);
return;
}
parent::openForAppend();
}
public function openWithTruncate(): void
{
if (isset($this->errorMessages['open'])) {
trigger_error($this->errorMessages['open'], E_USER_WARNING);
return;
}
parent::openWithTruncate();
}
public function read(int $count): string
{
if (isset($this->errorMessages['read'])) {
trigger_error($this->errorMessages['read'], E_USER_WARNING);
return '';
}
return parent::read($count);
}
public function readUntilEnd(): string
{
if (isset($this->errorMessages['read'])) {
trigger_error($this->errorMessages['read'], E_USER_WARNING);
return '';
}
return parent::readUntilEnd();
}
public function write(string $data): int
{
if (isset($this->errorMessages['write'])) {
trigger_error($this->errorMessages['write'], E_USER_WARNING);
return 0;
}
return parent::write($data);
}
public function truncate(int $size): bool
{
if (isset($this->errorMessages['truncate'])) {
trigger_error($this->errorMessages['truncate'], E_USER_WARNING);
return false;
}
return parent::truncate($size);
}
public function eof(): bool
{
if (isset($this->errorMessages['eof'])) {
trigger_error($this->errorMessages['eof'], E_USER_WARNING);
// True on error.
// See: https://www.php.net/manual/en/function.feof.php#refsect1-function.feof-returnvalues
return true;
}
return parent::eof();
}
public function getBytesRead(): int
{
if (isset($this->errorMessages['tell'])) {
trigger_error($this->errorMessages['tell'], E_USER_WARNING);
return 0;
}
return parent::getBytesRead();
}
public function seek(int $offset, int $whence): bool
{
if (isset($this->errorMessages['seek'])) {
trigger_error($this->errorMessages['seek'], E_USER_WARNING);
return false;
}
return parent::seek($offset, $whence);
}
public function size(): int
{
if (isset($this->errorMessages['stat'])) {
trigger_error($this->errorMessages['stat'], E_USER_WARNING);
return -1;
}
return parent::size();
}
/**
* {@inheritDoc}
*/
public function lock($resource, int $operation): bool
{
if (isset($this->errorMessages['lock'])) {
trigger_error($this->errorMessages['lock'], E_USER_WARNING);
return false;
}
return parent::lock($resource, $operation);
}
public function filemtime(): int
{
if (isset($this->errorMessages['stat'])) {
trigger_error($this->errorMessages['stat'], E_USER_WARNING);
return -1;
}
return parent::filemtime();
}
public function fileatime(): int
{
if (isset($this->errorMessages['stat'])) {
trigger_error($this->errorMessages['stat'], E_USER_WARNING);
return -1;
}
return parent::fileatime();
}
public function filectime(): int
{
if (isset($this->errorMessages['stat'])) {
trigger_error($this->errorMessages['stat'], E_USER_WARNING);
return -1;
}
return parent::filectime();
}
}
PK yVRӔ! ! src/vfsStreamAbstractContent.phpnu ٘ name = $name;
$time = time();
if ($permissions === null) {
$permissions = $this->getDefaultPermissions() & ~vfsStream::umask();
}
$this->lastAccessed = $time;
$this->lastAttributeModified = $time;
$this->lastModified = $time;
$this->permissions = $permissions;
$this->user = vfsStream::getCurrentUser();
$this->group = vfsStream::getCurrentGroup();
}
/**
* returns default permissions for concrete implementation
*
* @since 0.8.0
*/
abstract protected function getDefaultPermissions(): int;
/**
* returns the file name of the content
*/
public function getName(): string
{
return $this->name;
}
/**
* renames the content
*/
public function rename(string $newName): void
{
if (strstr($newName, '/') !== false) {
throw new vfsStreamException('Name can not contain /.');
}
$this->name = $newName;
}
/**
* checks whether the container can be applied to given name
*/
public function appliesTo(string $name): bool
{
if ($name === $this->name) {
return true;
}
$segment_name = $this->name . '/';
return strncmp($segment_name, $name, strlen($segment_name)) === 0;
}
/**
* returns the type of the container
*/
public function getType(): int
{
return $this->type;
}
/**
* sets the last modification time of the stream content
*/
public function lastModified(int $filemtime): vfsStreamContent
{
$this->lastModified = $filemtime;
return $this;
}
/**
* returns the last modification time of the stream content
*/
public function filemtime(): int
{
return $this->lastModified;
}
/**
* sets last access time of the stream content
*
* @since 0.9
*/
public function lastAccessed(int $fileatime): vfsStreamContent
{
$this->lastAccessed = $fileatime;
return $this;
}
/**
* returns the last access time of the stream content
*
* @since 0.9
*/
public function fileatime(): int
{
return $this->lastAccessed;
}
/**
* sets the last attribute modification time of the stream content
*
* @since 0.9
*/
public function lastAttributeModified(int $filectime): vfsStreamContent
{
$this->lastAttributeModified = $filectime;
return $this;
}
/**
* returns the last attribute modification time of the stream content
*
* @since 0.9
*/
public function filectime(): int
{
return $this->lastAttributeModified;
}
/**
* adds content to given container
*/
public function at(vfsStreamContainer $container): vfsStreamContent
{
$container->addChild($this);
return $this;
}
/**
* change file mode to given permissions
*/
public function chmod(int $permissions): vfsStreamContent
{
$this->permissions = $permissions;
$this->lastAttributeModified = time();
clearstatcache();
return $this;
}
/**
* returns permissions
*/
public function getPermissions(): int
{
return $this->permissions;
}
/**
* checks whether content is readable
*
* @param int $user id of user to check for
* @param int $group id of group to check for
*/
public function isReadable(int $user, int $group): bool
{
if ($this->user === $user) {
$check = 0400;
} elseif ($this->group === $group) {
$check = 0040;
} else {
$check = 0004;
}
return (bool) ($this->permissions & $check);
}
/**
* checks whether content is writable
*
* @param int $user id of user to check for
* @param int $group id of group to check for
*/
public function isWritable(int $user, int $group): bool
{
if ($this->user === $user) {
$check = 0200;
} elseif ($this->group === $group) {
$check = 0020;
} else {
$check = 0002;
}
return (bool) ($this->permissions & $check);
}
/**
* checks whether content is executable
*
* @param int $user id of user to check for
* @param int $group id of group to check for
*/
public function isExecutable(int $user, int $group): bool
{
if ($this->user === $user) {
$check = 0100;
} elseif ($this->group === $group) {
$check = 0010;
} else {
$check = 0001;
}
return (bool) ($this->permissions & $check);
}
/**
* change owner of file to given user
*/
public function chown(int $user): vfsStreamContent
{
$this->user = $user;
$this->lastAttributeModified = time();
return $this;
}
/**
* checks whether file is owned by given user
*/
public function isOwnedByUser(int $user): bool
{
return $this->user === $user;
}
/**
* returns owner of file
*/
public function getUser(): int
{
return $this->user;
}
/**
* change owner group of file to given group
*/
public function chgrp(int $group): vfsStreamContent
{
$this->group = $group;
$this->lastAttributeModified = time();
return $this;
}
/**
* checks whether file is owned by group
*/
public function isOwnedByGroup(int $group): bool
{
return $this->group === $group;
}
/**
* returns owner group of file
*/
public function getGroup(): int
{
return $this->group;
}
/**
* sets parent path
*
* @internal only to be set by parent
*
* @since 1.2.0
*/
public function setParentPath(string $parentPath): void
{
$this->parentPath = $parentPath;
}
/**
* removes parent path
*
* @internal only to be set by parent
*
* @since 2.0.0
*/
public function removeParentPath(): void
{
$this->parentPath = null;
}
/**
* returns path to this content
*
* @since 1.2.0
*/
public function path(): string
{
if ($this->parentPath === null) {
return $this->name;
}
return $this->parentPath . '/' . $this->name;
}
/**
* returns complete vfsStream url for this content
*
* @since 1.2.0
*/
public function url(): string
{
return vfsStream::url($this->path());
}
}
class_alias('bovigo\vfs\vfsStreamAbstractContent', 'org\bovigo\vfs\vfsStreamAbstractContent');
PK yVRTu u src/vfsStreamWrapper.phpnu ٘ getName() === $path) {
return self::$root;
}
if ($this->isInRoot($path) && self::$root->hasChild($path) === true) {
return self::$root->getChild($path);
}
return null;
}
/**
* helper method to detect whether given path is in root path
*/
private function isInRoot(string $path): bool
{
return substr($path, 0, strlen(self::$root->getName())) === self::$root->getName();
}
/**
* returns content for given path but only when it is of given type
*/
protected function getContentOfType(string $path, int $type): ?vfsStreamContent
{
$content = $this->getContent($path);
if ($content !== null && $content->getType() === $type) {
return $content;
}
return null;
}
/**
* splits path into its dirname and the basename
*
* @return string[]
*/
protected function splitPath(string $path): array
{
$lastSlashPos = strrpos($path, '/');
if ($lastSlashPos === false) {
return ['dirname' => '', 'basename' => $path];
}
return [
'dirname' => substr($path, 0, $lastSlashPos),
'basename' => substr($path, $lastSlashPos + 1),
];
}
/**
* helper method to resolve a path from /foo/bar/. to /foo/bar
*/
protected function resolvePath(string $path): string
{
$newPath = [];
foreach (explode('/', $path) as $pathPart) {
if ($pathPart === '.') {
continue;
}
if ($pathPart !== '..') {
$newPath[] = $pathPart;
} elseif (count($newPath) > 1) {
array_pop($newPath);
}
}
return implode('/', $newPath);
}
/**
* open the stream
*
* @param string $path the path to open
* @param string $mode mode for opening
* @param int $options options for opening
* @param string|null $opened_path full path that was actually opened
*/
public function stream_open(string $path, string $mode, int $options, ?string $opened_path = null): bool
{
$extended = (strstr($mode, '+') !== false ? (true) : (false));
$mode = str_replace(['t', 'b', '+'], '', $mode);
if (in_array($mode, ['r', 'w', 'a', 'x', 'c']) === false) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error(
'Illegal mode ' . $mode . ', use r, w, a, x or c, flavoured with t, b and/or +',
E_USER_WARNING
);
}
return false;
}
$this->mode = $this->calculateMode($mode, $extended);
$path = $this->resolvePath(vfsStream::path($path));
$this->content = null;
/** @var vfsStreamFile|null $content */
$content = $this->getContentOfType($path, vfsStreamContent::TYPE_FILE);
if ($content !== null) {
$this->content = new OpenedFile($content);
if ($mode === self::WRITE) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error(
'File ' . $path . ' already exists, can not open with mode x',
E_USER_WARNING
);
}
return false;
}
if (
($mode === self::TRUNCATE || $mode === self::APPEND) &&
$this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false
) {
return false;
}
if ($mode === self::TRUNCATE) {
$this->content->openWithTruncate();
} elseif ($mode === self::APPEND) {
$this->content->openForAppend();
} else {
if (! $this->content->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error('Permission denied', E_USER_WARNING);
}
return false;
}
$this->content->open();
}
return true;
}
$content = $this->createFile($path, $mode, $options);
if ($content === false) {
return false;
}
$this->content = new OpenedFile($content);
return true;
}
/**
* creates a file at given path
*
* @param string $path the path to open
* @param string|null $mode mode for opening
* @param int|null $options options for opening
*
* @return vfsStreamFile|false
*/
private function createFile(string $path, ?string $mode = null, ?int $options = null)
{
$names = $this->splitPath($path);
if (empty($names['dirname']) === true) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error('File ' . $names['basename'] . ' does not exist', E_USER_WARNING);
}
return false;
}
/** @var vfsStreamDirectory|null $dir */
$dir = $this->getContentOfType($names['dirname'], vfsStreamContent::TYPE_DIR);
if ($dir === null) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error('Directory ' . $names['dirname'] . ' does not exist', E_USER_WARNING);
}
return false;
}
if ($dir->hasChild($names['basename']) === true) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error(
'Directory ' . $names['dirname'] . ' already contains a director named ' .
$names['basename'],
E_USER_WARNING
);
}
return false;
}
if ($mode === self::READ) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error(
'Can not open non-existing file ' . $path . ' for reading',
E_USER_WARNING
);
}
return false;
}
if ($dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
if (($options & STREAM_REPORT_ERRORS) === STREAM_REPORT_ERRORS) {
trigger_error(
'Can not create new file in non-writable path ' . $names['dirname'],
E_USER_WARNING
);
}
return false;
}
/** @var vfsStreamFile $file */
$file = vfsStream::newFile($names['basename'])->at($dir);
return $file;
}
/**
* calculates the file mode
*
* @param string $mode opening mode: r, w, a or x
* @param bool $extended true if + was set with opening mode
*/
protected function calculateMode(string $mode, bool $extended): int
{
if ($extended === true) {
return self::ALL;
}
if ($mode === self::READ) {
return self::READONLY;
}
return self::WRITEONLY;
}
/**
* closes the stream
*
* @see https://github.com/mikey179/vfsStream/issues/40
*/
public function stream_close(): void
{
$this->content->lock($this, LOCK_UN);
}
/**
* read the stream up to $count bytes
*
* @param int $count amount of bytes to read
*/
public function stream_read(int $count): string
{
if ($this->mode === self::WRITEONLY) {
return '';
}
if ($this->content->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
return '';
}
return $this->content->read($count);
}
/**
* writes data into the stream
*
* @return int amount of bytes written
*/
public function stream_write(string $data): int
{
if ($this->mode === self::READONLY) {
return 0;
}
if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
return 0;
}
if (self::$quota->isLimited()) {
$data = substr($data, 0, self::$quota->spaceLeft(self::$root->sizeSummarized()));
}
return $this->content->write($data);
}
/**
* truncates a file to a given length
*
* @param int $size length to truncate file to
*
* @since 1.1.0
*/
public function stream_truncate(int $size): bool
{
if ($this->mode === self::READONLY) {
return false;
}
if ($this->content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
return false;
}
if ($this->content->getType() !== vfsStreamContent::TYPE_FILE) {
return false;
}
if (self::$quota->isLimited() && $this->content->size() < $size) {
$maxSize = self::$quota->spaceLeft(self::$root->sizeSummarized());
if ($maxSize === 0) {
return false;
}
if ($size > $maxSize) {
$size = $maxSize;
}
}
return $this->content->truncate($size);
}
/**
* sets metadata like owner, user or permissions
*
* @param mixed $var
*
* @since 1.1.0
*/
public function stream_metadata(string $path, int $option, $var): bool
{
$path = $this->resolvePath(vfsStream::path($path));
/** @var vfsStreamAbstractContent|null $content */
$content = $this->getContent($path);
switch ($option) {
case STREAM_META_TOUCH:
if ($content === null) {
$content = $this->createFile($path, null, STREAM_REPORT_ERRORS);
// file creation may not be allowed at provided path
if ($content === false) {
return false;
}
}
$currentTime = time();
$content->lastModified($var[0] ?? $currentTime);
$content->lastAccessed($var[1] ?? $currentTime);
return true;
case STREAM_META_OWNER_NAME:
return false;
case STREAM_META_OWNER:
if ($content === null) {
return false;
}
return $this->doPermChange(
$path,
$content,
static function () use ($content, $var): void {
$content->chown($var);
}
);
case STREAM_META_GROUP_NAME:
return false;
case STREAM_META_GROUP:
if ($content === null) {
return false;
}
return $this->doPermChange(
$path,
$content,
static function () use ($content, $var): void {
$content->chgrp($var);
}
);
case STREAM_META_ACCESS:
if ($content === null) {
return false;
}
return $this->doPermChange(
$path,
$content,
static function () use ($content, $var): void {
$content->chmod($var);
}
);
default:
return false;
}
}
/**
* executes given permission change when necessary rights allow such a change
*/
private function doPermChange(string $path, vfsStreamAbstractContent $content, callable $change): bool
{
if (! $content->isOwnedByUser(vfsStream::getCurrentUser())) {
return false;
}
if (self::$root->getName() !== $path) {
$names = $this->splitPath($path);
$parent = $this->getContent($names['dirname']);
if (! $parent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
return false;
}
}
$change();
return true;
}
/**
* checks whether stream is at end of file
*/
public function stream_eof(): bool
{
return $this->content->eof();
}
/**
* returns the current position of the stream
*/
public function stream_tell(): int
{
return $this->content->getBytesRead();
}
/**
* seeks to the given offset
*/
public function stream_seek(int $offset, int $whence): bool
{
return $this->content->seek($offset, $whence);
}
/**
* flushes unstored data into storage
*/
public function stream_flush(): bool
{
return true;
}
/**
* returns status of stream
*
* @return int[]|false
*/
public function stream_stat()
{
$atime = $this->content->fileatime();
$ctime = $this->content->filectime();
$mtime = $this->content->filemtime();
$size = $this->content->size();
if ($atime === -1 || $ctime === -1 || $mtime === -1 || $size === -1) {
return false;
}
$fileStat = [
'dev' => 0,
'ino' => spl_object_id($this->content->getBaseFile()),
'mode' => $this->content->getType() | $this->content->getPermissions(),
'nlink' => 0,
'uid' => $this->content->getUser(),
'gid' => $this->content->getGroup(),
'rdev' => 0,
'size' => $size,
'atime' => $atime,
'mtime' => $mtime,
'ctime' => $ctime,
'blksize' => -1,
'blocks' => -1,
];
return array_merge(array_values($fileStat), $fileStat);
}
/**
* retrieve the underlaying resource
*
* Please note that this method always returns false as there is no
* underlaying resource to return.
*
* @see https://github.com/mikey179/vfsStream/issues/3
*
* @since 0.9.0
*/
public function stream_cast(int $cast_as): bool
{
return false;
}
/**
* set lock status for stream
*
* @see https://github.com/mikey179/vfsStream/issues/6
* @see https://github.com/mikey179/vfsStream/issues/31
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @since 0.10.0
*/
public function stream_lock(int $operation): bool
{
if ((LOCK_NB & $operation) === LOCK_NB) {
$operation -= LOCK_NB;
}
return $this->content->lock($this, $operation);
}
/**
* sets options on the stream
*
* @see https://github.com/mikey179/vfsStream/issues/15
* @see http://www.php.net/manual/streamwrapper.stream-set-option.php
*/
//phpcs:ignore SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint
public function stream_set_option(int $option, $arg1, $arg2): bool
{
switch ($option) {
case STREAM_OPTION_BLOCKING:
// break omitted
case STREAM_OPTION_READ_TIMEOUT:
// break omitted
case STREAM_OPTION_WRITE_BUFFER:
// break omitted
default:
// nothing to do here
}
return false;
}
/**
* remove the data under the given path
*/
public function unlink(string $path): bool
{
$realPath = $this->resolvePath(vfsStream::path($path));
$content = $this->getContent($realPath);
if ($content === null) {
trigger_error('unlink(' . $path . '): No such file or directory', E_USER_WARNING);
return false;
}
if ($content->getType() !== vfsStreamContent::TYPE_FILE) {
trigger_error('unlink(' . $path . '): Operation not permitted', E_USER_WARNING);
return false;
}
return $this->doUnlink($realPath);
}
/**
* removes a path
*/
protected function doUnlink(string $path): bool
{
if (self::$root->getName() === $path) {
// delete root? very brave. :)
self::$root = null;
clearstatcache();
return true;
}
$names = $this->splitPath($path);
/** @var vfsStreamDirectory $content */
$content = $this->getContent($names['dirname']);
if (! $content->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
return false;
}
clearstatcache();
return $content->removeChild($names['basename']);
}
/**
* rename from one path to another
*
* @author Benoit Aubuchon
*/
public function rename(string $path_from, string $path_to): bool
{
$srcRealPath = $this->resolvePath(vfsStream::path($path_from));
$dstRealPath = $this->resolvePath(vfsStream::path($path_to));
$srcContent = $this->getContent($srcRealPath);
if ($srcContent === null) {
trigger_error('No such file or directory', E_USER_WARNING);
return false;
}
$dstNames = $this->splitPath($dstRealPath);
/** @var vfsStreamDirectory|null $dstParentContent */
$dstParentContent = $this->getContent($dstNames['dirname']);
if ($dstParentContent === null) {
trigger_error('No such file or directory', E_USER_WARNING);
return false;
}
if (! $dstParentContent->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
trigger_error('Permission denied', E_USER_WARNING);
return false;
}
if ($dstParentContent->getType() !== vfsStreamContent::TYPE_DIR) {
trigger_error('Target is not a directory', E_USER_WARNING);
return false;
}
// remove old source first, so we can rename later
// (renaming first would lead to not being able to remove the old path)
if (! $this->doUnlink($srcRealPath)) {
return false;
}
$dstContent = $srcContent;
// Renaming the filename
$dstContent->rename($dstNames['basename']);
// Copying to the destination
$dstParentContent->addChild($dstContent);
return true;
}
/**
* creates a new directory
*/
public function mkdir(string $path, int $mode, int $options): bool
{
$umask = vfsStream::umask();
if (0 < $umask) {
$permissions = $mode & ~$umask;
} else {
$permissions = $mode;
}
$path = $this->resolvePath(vfsStream::path($path));
if ($this->getContent($path) !== null) {
trigger_error('mkdir(): Path vfs://' . $path . ' exists', E_USER_WARNING);
return false;
}
if (self::$root === null) {
self::$root = vfsStream::newDirectory($path, $permissions);
return true;
}
$maxDepth = count(explode('/', $path));
$names = $this->splitPath($path);
$newDirs = $names['basename'];
$dir = null;
$i = 0;
while ($dir === null && $i < $maxDepth) {
$dir = $this->getContent($names['dirname']);
$names = $this->splitPath($names['dirname']);
if ($dir === null) {
$newDirs = $names['basename'] . '/' . $newDirs;
}
$i++;
}
if (
$dir === null
|| $dir->getType() !== vfsStreamContent::TYPE_DIR
|| $dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false
) {
return false;
}
$recursive = (STREAM_MKDIR_RECURSIVE & $options) !== 0 ? (true) : (false);
if (strpos($newDirs, '/') !== false && $recursive === false) {
return false;
}
vfsStream::newDirectory($newDirs, $permissions)->at($dir);
return true;
}
/**
* removes a directory
*
* @todo consider $options with STREAM_MKDIR_RECURSIVE
*/
public function rmdir(string $path, int $options): bool
{
$path = $this->resolvePath(vfsStream::path($path));
/** @var vfsStreamDirectory|null $child */
$child = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR);
if ($child === null) {
return false;
}
// can only remove empty directories
if (count($child->getChildren()) > 0) {
return false;
}
if (self::$root->getName() === $path) {
// delete root? very brave. :)
self::$root = null;
clearstatcache();
return true;
}
$names = $this->splitPath($path);
/** @var vfsStreamDirectory $dir */
$dir = $this->getContentOfType($names['dirname'], vfsStreamContent::TYPE_DIR);
if ($dir->isWritable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup()) === false) {
return false;
}
clearstatcache();
return $dir->removeChild($child->getName());
}
/**
* opens a directory
*/
public function dir_opendir(string $path, int $options): bool
{
$path = $this->resolvePath(vfsStream::path($path));
$this->dir = null;
/** @var vfsStreamDirectory|null $dir */
$dir = $this->getContentOfType($path, vfsStreamContent::TYPE_DIR);
if ($dir === null) {
return false;
}
$this->dir = $dir;
if (! $this->dir->isReadable(vfsStream::getCurrentUser(), vfsStream::getCurrentGroup())) {
return false;
}
$this->dirIterator = $this->dir->getIterator();
return true;
}
/**
* reads directory contents
*
* @return string|bool
*/
public function dir_readdir()
{
$dir = $this->dirIterator->current();
if ($dir === null) {
return false;
}
$this->dirIterator->next();
return $dir->getName();
}
/**
* reset directory iteration
*/
public function dir_rewinddir(): bool
{
$this->dirIterator->rewind();
return true;
}
/**
* closes directory
*/
public function dir_closedir(): bool
{
$this->dirIterator = null;
return true;
}
/**
* returns status of url
*
* @param string $path path of url to return status for
* @param int $flags flags set by the stream API
*
* @return mixed[]|bool
*/
public function url_stat(string $path, int $flags)
{
/** @var vfsStreamAbstractContent|null $content */
$content = $this->getContent($this->resolvePath(vfsStream::path($path)));
if ($content === null) {
if (($flags & STREAM_URL_STAT_QUIET) !== STREAM_URL_STAT_QUIET) {
trigger_error(' No such file or directory: ' . $path, E_USER_WARNING);
}
return false;
}
$atime = $content->fileatime();
$ctime = $content->filectime();
$mtime = $content->filemtime();
$size = $content->size();
if ($atime === -1 || $ctime === -1 || $mtime === -1 || $size === -1) {
return false;
}
$fileStat = [
'dev' => 0,
'ino' => spl_object_id($content),
'mode' => $content->getType() | $content->getPermissions(),
'nlink' => 0,
'uid' => $content->getUser(),
'gid' => $content->getGroup(),
'rdev' => 0,
'size' => $size,
'atime' => $atime,
'mtime' => $mtime,
'ctime' => $ctime,
'blksize' => -1,
'blocks' => -1,
];
return array_merge(array_values($fileStat), $fileStat);
}
}
class_alias('bovigo\vfs\vfsStreamWrapper', 'org\bovigo\vfs\vfsStreamWrapper');
PK yVRJ2
src/Quota.phpnu ٘ amount = $amount;
}
/**
* create with unlimited space
*/
public static function unlimited(): self
{
return new self(self::UNLIMITED);
}
/**
* checks if a quota is set
*/
public function isLimited(): bool
{
return self::UNLIMITED < $this->amount;
}
/**
* checks if given used space exceeda quota limit
*/
public function spaceLeft(int $usedSpace): int
{
if ($this->amount === self::UNLIMITED) {
return $usedSpace;
}
if ($usedSpace >= $this->amount) {
return 0;
}
$spaceLeft = $this->amount - $usedSpace;
if (0 >= $spaceLeft) {
return 0;
}
return $spaceLeft;
}
}
class_alias('bovigo\vfs\Quota', 'org\bovigo\vfs\Quota');
PK yVR
) src/visitor/vfsStreamStructureVisitor.phpnu ٘ reset();
}
/**
* visit a file and process it
*
* @return vfsStreamStructureVisitor
*/
public function visitFile(vfsStreamFile $file): vfsStreamVisitor
{
$this->current[$file->getName()] = $file->getContent();
return $this;
}
/**
* visit a block device and process it
*
* @return vfsStreamStructureVisitor
*/
public function visitBlockDevice(vfsStreamBlock $block): vfsStreamVisitor
{
$this->current['[' . $block->getName() . ']'] = $block->getContent();
return $this;
}
/**
* visit a directory and process it
*
* @return vfsStreamStructureVisitor
*/
public function visitDirectory(vfsStreamDirectory $dir): vfsStreamVisitor
{
$this->current[$dir->getName()] = [];
$tmp =& $this->current;
$this->current =& $tmp[$dir->getName()];
foreach ($dir as $child) {
$this->visit($child);
}
$this->current =& $tmp;
return $this;
}
/**
* returns structure of visited contents
*
* @return string[]
*
* @api
*/
public function getStructure(): array
{
return $this->structure;
}
/**
* resets structure so visitor could be reused
*/
public function reset(): self
{
$this->structure = [];
$this->current =& $this->structure;
return $this;
}
}
class_alias('bovigo\vfs\visitor\vfsStreamStructureVisitor', 'org\bovigo\vfs\visitor\vfsStreamStructureVisitor');
PK yVRV]Ba
% src/visitor/vfsStreamPrintVisitor.phpnu ٘ out = $out;
}
/**
* visit a file and process it
*
* @return vfsStreamPrintVisitor
*/
public function visitFile(vfsStreamFile $file): vfsStreamVisitor
{
$this->printContent($file->getName());
return $this;
}
/**
* visit a block device and process it
*
* @return vfsStreamPrintVisitor
*/
public function visitBlockDevice(vfsStreamBlock $block): vfsStreamVisitor
{
$name = '[' . $block->getName() . ']';
$this->printContent($name);
return $this;
}
/**
* visit a directory and process it
*
* @return vfsStreamPrintVisitor
*/
public function visitDirectory(vfsStreamDirectory $dir): vfsStreamVisitor
{
$this->printContent($dir->getName());
$this->depth++;
foreach ($dir as $child) {
$this->visit($child);
}
$this->depth--;
return $this;
}
/**
* helper method to print the content
*/
protected function printContent(string $name): void
{
fwrite($this->out, str_repeat(' ', $this->depth) . '- ' . $name . "\n");
}
}
class_alias('bovigo\vfs\visitor\vfsStreamPrintVisitor', 'org\bovigo\vfs\visitor\vfsStreamPrintVisitor');
PK yVRW+և src/visitor/vfsStreamVisitor.phpnu ٘ visitBlockDevice($content);
} elseif ($content instanceof vfsStreamFile) {
$this->visitFile($content);
} elseif ($content instanceof vfsStreamDirectory) {
if (! $content->isDot()) {
$this->visitDirectory($content);
}
} else {
throw new InvalidArgumentException(
'Unknown content type ' . $content->getType() . ' for ' . $content->getName()
);
}
return $this;
}
/**
* visit a block device and process it
*/
public function visitBlockDevice(vfsStreamBlock $block): vfsStreamVisitor
{
return $this->visitFile($block);
}
}
class_alias('bovigo\vfs\visitor\vfsStreamAbstractVisitor', 'org\bovigo\vfs\visitor\vfsStreamAbstractVisitor');
PK yVRe79 9 src/OpenedFile.phpnu ٘ base = $base;
}
public function getBaseFile(): vfsStreamFile
{
return $this->base;
}
/**
* simply open the file
*/
public function open(): void
{
$this->base->open();
}
/**
* open file and set pointer to end of file
*/
public function openForAppend(): void
{
$this->base->openForAppend();
$this->savePosition();
}
/**
* open file and truncate content
*/
public function openWithTruncate(): void
{
$this->base->openWithTruncate();
$this->savePosition();
}
/**
* reads the given amount of bytes from content
*/
public function read(int $count): string
{
$this->restorePosition();
$data = $this->base->read($count);
$this->savePosition();
return $data;
}
/**
* returns the content until its end from current offset
*/
public function readUntilEnd(): string
{
$this->restorePosition();
$data = $this->base->readUntilEnd();
$this->savePosition();
return $data;
}
/**
* writes an amount of data
*
* @return int number of bytes written
*/
public function write(string $data): int
{
$this->restorePosition();
$bytes = $this->base->write($data);
$this->savePosition();
return $bytes;
}
/**
* Truncates a file to a given length
*
* @param int $size length to truncate file to
*/
public function truncate(int $size): bool
{
$this->restorePosition();
return $this->base->truncate($size);
}
/**
* checks whether pointer is at end of file
*/
public function eof(): bool
{
$this->restorePosition();
return $this->base->eof();
}
/**
* returns the current position within the file
*/
public function getBytesRead(): int
{
$this->restorePosition();
$this->position = $this->base->getBytesRead();
return $this->position;
}
/**
* seeks to the given offset
*/
public function seek(int $offset, int $whence): bool
{
if ($whence !== SEEK_SET) {
$this->restorePosition();
}
$success = $this->base->seek($offset, $whence);
$this->savePosition();
return $success;
}
/**
* returns size of content
*/
public function size(): int
{
return $this->base->size();
}
/**
* locks file
*
* @param resource|vfsStreamWrapper $resource
*/
public function lock($resource, int $operation): bool
{
return $this->base->lock($resource, $operation);
}
/**
* returns the type of the container
*/
public function getType(): int
{
return $this->base->getType();
}
/**
* returns the last modification time of the stream content
*/
public function filemtime(): int
{
return $this->base->filemtime();
}
/**
* returns the last access time of the stream content
*/
public function fileatime(): int
{
return $this->base->fileatime();
}
/**
* returns the last attribute modification time of the stream content
*/
public function filectime(): int
{
return $this->base->filectime();
}
/**
* returns permissions
*/
public function getPermissions(): int
{
return $this->base->getPermissions();
}
/**
* checks whether content is readable
*
* @param int $user id of user to check for
* @param int $group id of group to check for
*/
public function isReadable(int $user, int $group): bool
{
return $this->base->isReadable($user, $group);
}
/**
* checks whether content is writable
*
* @param int $user id of user to check for
* @param int $group id of group to check for
*/
public function isWritable(int $user, int $group): bool
{
return $this->base->isWritable($user, $group);
}
/**
* checks whether content is executable
*
* @param int $user id of user to check for
* @param int $group id of group to check for
*/
public function isExecutable(int $user, int $group): bool
{
return $this->base->isExecutable($user, $group);
}
/**
* returns owner of file
*/
public function getUser(): int
{
return $this->base->getUser();
}
/**
* returns owner group of file
*/
public function getGroup(): int
{
return $this->base->getGroup();
}
private function restorePosition(): void
{
$this->base->getContentObject()->seek($this->position, SEEK_SET);
}
private function savePosition(): void
{
$this->position = $this->base->getContentObject()->bytesRead();
}
}
PK yVR]Zn n # src/content/SeekableFileContent.phpnu ٘ doRead($this->offset, $count);
$this->offset += $count;
return $data;
}
/**
* actual reading of given byte count starting at given offset
*/
abstract protected function doRead(int $offset, int $count): string;
/**
* seeks to the given offset
*/
public function seek(int $offset, int $whence): bool
{
$newOffset = $this->offset;
switch ($whence) {
case SEEK_CUR:
$newOffset += $offset;
break;
case SEEK_END:
$newOffset = $this->size() + $offset;
break;
case SEEK_SET:
$newOffset = $offset;
break;
default:
return false;
}
if ($newOffset < 0) {
return false;
}
$this->offset = $newOffset;
return true;
}
/**
* checks whether pointer is at end of file
*/
public function eof(): bool
{
return $this->size() <= $this->offset;
}
/**
* writes an amount of data
*
* @return int amount of written bytes
*/
public function write(string $data): int
{
$dataLength = strlen($data);
$this->doWrite($data, $this->offset, $dataLength);
$this->offset += $dataLength;
return $dataLength;
}
/**
* actual writing of data with specified length at given offset
*/
abstract protected function doWrite(string $data, int $offset, int $length): void;
/**
* for backwards compatibility with vfsStreamFile::bytesRead()
*
* @internal
*/
public function bytesRead(): int
{
return $this->offset;
}
/**
* for backwards compatibility with vfsStreamFile::readUntilEnd()
*
* @internal
*/
public function readUntilEnd(): string
{
/** @var string|false $data */
$data = substr($this->content(), $this->offset);
return $data === false ? '' : $data;
}
}
class_alias('bovigo\vfs\content\SeekableFileContent', 'org\bovigo\vfs\content\SeekableFileContent');
PK yVRO8 src/content/LargeFileContent.phpnu ٘ size = $size;
}
/**
* create large file with given size in kilobyte
*/
public static function withKilobytes(int $kilobyte): self
{
return new self($kilobyte * 1024);
}
/**
* create large file with given size in megabyte
*/
public static function withMegabytes(int $megabyte): self
{
return self::withKilobytes($megabyte * 1024);
}
/**
* create large file with given size in gigabyte
*/
public static function withGigabytes(int $gigabyte): self
{
return self::withMegabytes($gigabyte * 1024);
}
/**
* returns actual content
*/
public function content(): string
{
return $this->doRead(0, $this->size);
}
/**
* returns size of content
*/
public function size(): int
{
return $this->size;
}
/**
* actual reading of given byte count starting at given offset
*/
protected function doRead(int $offset, int $count): string
{
if ($offset + $count > $this->size) {
$count = $this->size - $offset;
}
$result = '';
for ($i = 0; $i < $count; $i++) {
$result .= $this->content[$i + $offset] ?? ' ';
}
return $result;
}
/**
* actual writing of data with specified length at given offset
*/
protected function doWrite(string $data, int $offset, int $length): void
{
for ($i = 0; $i < $length; $i++) {
$this->content[$i + $offset] = substr($data, $i, 1);
}
if ($offset >= $this->size) {
$this->size += $length;
} elseif ($offset + $length > $this->size) {
$this->size = $offset + $length;
}
}
/**
* Truncates a file to a given length
*
* @param int $size length to truncate file to
*/
public function truncate(int $size): bool
{
$this->size = $size;
foreach (
array_filter(
array_keys($this->content),
static function ($pos) use ($size) {
return $pos >= $size;
}
) as $removePos
) {
unset($this->content[$removePos]);
}
return true;
}
}
class_alias('bovigo\vfs\content\LargeFileContent', 'org\bovigo\vfs\content\LargeFileContent');
PK yVR/H H src/content/FileContent.phpnu ٘ content = $content;
}
/**
* returns actual content
*/
public function content(): string
{
return $this->content;
}
/**
* returns size of content
*/
public function size(): int
{
return strlen($this->content);
}
/**
* actual reading of length starting at given offset
*/
protected function doRead(int $offset, int $count): string
{
/** @var string|false $data */
$data = substr($this->content, $offset, $count);
return $data === false ? '' : $data;
}
/**
* actual writing of data with specified length at given offset
*/
protected function doWrite(string $data, int $offset, int $length): void
{
$this->content = substr($this->content, 0, $offset)
. $data
. substr($this->content, $offset + $length);
}
/**
* Truncates a file to a given length
*
* @param int $size length to truncate file to
*/
public function truncate(int $size): bool
{
if ($size > $this->size()) {
// Pad with null-chars if we're "truncating up"
$this->content .= str_repeat("\0", $size - $this->size());
} else {
$this->content = substr($this->content, 0, $size);
}
return true;
}
}
class_alias('bovigo\vfs\content\StringBasedFileContent', 'org\bovigo\vfs\content\StringBasedFileContent');
PK yVRO phpcs.xml.distnu ٘
The coding standard for vfsStream.
src
tests/phpunit
src/vfsStreamException.php
tests/*
src/vfsStreamWrapper.php
src/*
tests/phpunit/vfsStreamDirectoryIssue134TestCase.php
tests/phpunit/vfsStreamWrapperAlreadyRegisteredTestCase.php
tests/phpunit/vfsStreamWrapperAlreadyRegisteredTestCase.php
PK yVR> .github/workflows/phpstan.ymlnu ٘ name: PHPStan
on:
push:
branches:
- master
pull_request:
jobs:
analyse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring
tools: cs2pr
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: PHPStan
run: vendor/bin/phpstan analyse --error-format=checkstyle | sed '/^$/d' | cs2pr
PK yVRbO .github/workflows/phpcs.ymlnu ٘ name: Code style
on:
push:
branches:
- master
pull_request:
jobs:
tests:
name: PHP CodeSniffer
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
extensions: mbstring
tools: cs2pr
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: phpcs
run: vendor/bin/phpcs --report=checkstyle -q | cs2pr
PK yVRl .github/workflows/runTests.ymlnu ٘ name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
tests:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.os }} w/ ${{ matrix.dependencies }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.php-versions == '8.0' }}
strategy:
fail-fast: false
matrix:
php-versions: ['7.3', '7.4', '8.0']
os: [ubuntu-latest, windows-latest, macOS-latest]
dependencies: ['install', 'update --prefer-lowest', 'update']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
coverage: pcov
- name: Setup Problem Matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer ${{ matrix.dependencies }} --prefer-dist --no-progress --no-suggest
- name: Run test suite
run: composer run-script test -- --coverage-text
- name: Notify Coveralls
if: matrix.php-versions == '7.3' && runner.os == 'Linux' && matrix.dependencies == 'install'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls
composer run-script php-coveralls -- --verbose
PK yVR=. .github/dependabot.ymlnu ٘ version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
PK yVRw^ ^ .gitattributesnu ٘ /docs export-ignore
/examples export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpdoc.dist.xml export-ignore
PK yVR phpstan.neon.distnu ٘ includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
level: 4
paths:
- src
PK yVR
. phpunit.xml.distnu ٘
src
tests/phpt
tests/phpunit
PK yVRH$ % org/bovigo/vfs/vfsStreamDirectory.phpnu ٘ 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.
PK yVR0uU U tests/phpt/bug71287.phptnu ٘ --TEST--
Reproduce octal output from stream wrapper invocation
See https://bugs.php.net/bug.php?id=71287
See https://github.com/mikey179/vfsStream/issues/120
--FILE--
--EXPECTF--
Warning: file_put_contents(): Only 7 of 9 bytes written, possibly out of free disk space in %s on line %dPK yVR.qc c 4 tests/phpunit/vfsStreamContainerIteratorTestCase.phpnu ٘ dir = new vfsStreamDirectory('foo');
$this->child1 = NewInstance::of(vfsStreamContent::class)->returns(['getName' => 'bar']);
$this->dir->addChild($this->child1);
$this->child2 = NewInstance::of(vfsStreamContent::class)->returns(['getName' => 'baz']);
$this->dir->addChild($this->child2);
}
/**
* clean up test environment
*/
protected function tearDown(): void
{
vfsStream::enableDotfiles();
}
/**
* @return string[][]
*/
public function provideSwitchWithExpectations(): array
{
return [
[[vfsStream::class, 'disableDotfiles'], []],
[[vfsStream::class, 'enableDotfiles'], ['.', '..']],
];
}
/**
* @param string|vfsStreamContent $dir
*/
private function nameOf($dir): string
{
if (is_string($dir)) {
return $dir;
}
return $dir->getName();
}
/**
* @param mixed[] $dirs
*
* @test
* @dataProvider provideSwitchWithExpectations
*/
public function iteration(callable $switchDotFiles, array $dirs): void
{
$dirs[] = $this->child1;
$dirs[] = $this->child2;
$switchDotFiles();
$dirIterator = $this->dir->getIterator();
foreach ($dirs as $dir) {
assertThat($dirIterator->key(), equals($this->nameOf($dir)));
assertTrue($dirIterator->valid());
if (! is_string($dir)) {
assertThat($dirIterator->current(), isSameAs($dir));
}
$dirIterator->next();
}
assertFalse($dirIterator->valid());
assertNull($dirIterator->key());
assertNull($dirIterator->current());
}
}
PK yVR{
{
( tests/phpunit/vfsStreamBlockTestCase.phpnu ٘ getType(), equals(vfsStreamContent::TYPE_BLOCK));
}
/**
* @test
*/
public function appliesForSelf(): void
{
assertTrue((new vfsStreamBlock('foo'))->appliesTo('foo'));
}
/**
* @test
*/
public function doesNotApplyForSubDirectories(): void
{
assertFalse((new vfsStreamBlock('foo'))->appliesTo('foo/bar'));
}
/**
* @test
*/
public function doesNotApplyForOtherNames(): void
{
assertFalse((new vfsStreamBlock('foo'))->appliesTo('bar'));
}
/**
* @test
*/
public function hasGivenName(): void
{
assertThat((new vfsStreamBlock('foo'))->getName(), equals('foo'));
}
/**
* tests how external functions see this object
*
* @test
*/
public function external(): void
{
$root = vfsStream::setup('root');
$root->addChild(vfsStream::newBlock('foo'));
assertThat(filetype(vfsStream::url('root/foo')), equals('block'));
}
/**
* tests adding a complex structure
*
* @test
*/
public function addStructure(): void
{
vfsStream::create([
'topLevel' => [
'thisIsAFile' => 'file contents',
'[blockDevice]' => 'block contents',
],
]);
assertThat(
filetype(vfsStream::url('root/topLevel/blockDevice')),
equals('block')
);
}
/**
* @test
*/
public function createWithEmptyNameThrowsException(): void
{
expect(static function (): void {
vfsStream::create([
'topLevel' => [
'thisIsAFile' => 'file contents',
'[]' => 'block contents',
],
]);
})->throws(vfsStreamException::class);
}
}
PK yVRՑ"8 "8 / tests/phpunit/vfsStreamWrapperFlockTestCase.phpnu ٘ root = vfsStream::setup();
}
/**
* @test
*/
public function fileIsNotLockedByDefault(): void
{
assertFalse(vfsStream::newFile('foo.txt')->isLocked());
}
/**
* @test
*/
public function streamIsNotLockedByDefault(): void
{
file_put_contents(vfsStream::url('root/foo.txt'), 'content');
assertFalse($this->root->getChild('foo.txt')->isLocked());
}
/**
* @test
*/
public function canAquireSharedLock(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
assertTrue(flock($fp, LOCK_SH));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp);
}
/**
* @test
*/
public function canAquireSharedLockWithNonBlockingFlockCall(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
assertTrue(flock($fp, LOCK_SH | LOCK_NB));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp);
}
/**
* @test
*/
public function canAquireEclusiveLock(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
assertTrue(flock($fp, LOCK_EX));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
fclose($fp);
}
/**
* @test
*/
public function canAquireEclusiveLockWithNonBlockingFlockCall(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
assertTrue(flock($fp, LOCK_EX | LOCK_NB));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
fclose($fp);
}
/**
* @test
*/
public function canRemoveLock(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_EX);
assertTrue(flock($fp, LOCK_UN));
assertFalse($file->isLocked());
assertFalse($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canRemoveLockWhenNotLocked(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
assertTrue(flock($fp, LOCK_UN));
assertFalse($file->isLocked());
assertFalse($file->hasSharedLock());
assertFalse($file->hasSharedLock($fp));
assertFalse($file->hasExclusiveLock());
assertFalse($file->hasExclusiveLock($fp));
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canRemoveSharedLockWithoutRemovingSharedLockOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_SH);
$file->lock($fp2, LOCK_SH);
assertTrue(flock($fp1, LOCK_UN));
assertTrue($file->hasSharedLock());
assertFalse($file->hasSharedLock($fp1));
assertTrue($file->hasSharedLock($fp2));
fclose($fp1);
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canNotRemoveSharedLockAcquiredOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_SH);
assertTrue(flock($fp2, LOCK_UN));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp1);
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canNotRemoveExlusiveLockAcquiredOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_EX);
assertTrue(flock($fp2, LOCK_UN));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
fclose($fp1);
fclose($fp2);
}
/**
* @test
*/
public function canRemoveLockWithNonBlockingFlockCall(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_EX);
assertTrue(flock($fp, LOCK_UN | LOCK_NB));
assertFalse($file->isLocked());
assertFalse($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canNotAquireExclusiveLockIfAlreadyExclusivelyLockedOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_EX);
assertFalse(flock($fp2, LOCK_EX + LOCK_NB));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
assertTrue($file->hasExclusiveLock($fp1));
assertFalse($file->hasExclusiveLock($fp2));
fclose($fp1);
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canAquireExclusiveLockIfAlreadySelfExclusivelyLocked(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_EX);
assertTrue(flock($fp, LOCK_EX + LOCK_NB));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canNotAquireExclusiveLockIfAlreadySharedLockedOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_SH);
assertFalse(flock($fp2, LOCK_EX));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp1);
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canAquireExclusiveLockIfAlreadySelfSharedLocked(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_SH);
assertTrue(flock($fp, LOCK_EX));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canNotAquireSharedLockIfAlreadyExclusivelyLockedOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_EX);
assertFalse(flock($fp2, LOCK_SH + LOCK_NB));
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
fclose($fp1);
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canAquireSharedLockIfAlreadySelfExclusivelyLocked(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_EX);
assertTrue(flock($fp, LOCK_SH + LOCK_NB));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canAquireSharedLockIfAlreadySelfSharedLocked(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_SH);
assertTrue(flock($fp, LOCK_SH));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
fclose($fp);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function canAquireSharedLockIfAlreadySharedLockedOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp1, LOCK_SH);
assertTrue(flock($fp2, LOCK_SH));
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertTrue($file->hasSharedLock($fp1));
assertTrue($file->hasSharedLock($fp2));
assertFalse($file->hasExclusiveLock());
fclose($fp1);
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/31
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_31
* @group issue_40
*/
public function removesExclusiveLockOnStreamClose(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_EX);
fclose($fp);
assertFalse($file->isLocked());
assertFalse($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
}
/**
* @see https://github.com/mikey179/vfsStream/issues/31
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_31
* @group issue_40
*/
public function removesSharedLockOnStreamClose(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp, LOCK_SH);
fclose($fp);
assertFalse($file->isLocked());
assertFalse($file->hasSharedLock());
assertFalse($file->hasExclusiveLock());
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function notRemovesExclusiveLockOnStreamCloseIfExclusiveLockAcquiredOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp2, LOCK_EX);
fclose($fp1);
assertTrue($file->isLocked());
assertFalse($file->hasSharedLock());
assertTrue($file->hasExclusiveLock());
assertTrue($file->hasExclusiveLock($fp2));
fclose($fp2);
}
/**
* @see https://github.com/mikey179/vfsStream/issues/40
*
* @test
* @group issue_40
*/
public function notRemovesSharedLockOnStreamCloseIfSharedLockAcquiredOnOtherFileHandler(): void
{
$file = vfsStream::newFile('foo.txt')->at($this->root);
$fp1 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$fp2 = fopen(vfsStream::url('root/foo.txt'), 'rb');
$file->lock($fp2, LOCK_SH);
fclose($fp1);
assertTrue($file->isLocked());
assertTrue($file->hasSharedLock());
assertTrue($file->hasSharedLock($fp2));
assertFalse($file->hasExclusiveLock());
fclose($fp2);
}
}
PK yVRM0ׁ ) tests/phpunit/vfsStreamExLockTestCase.phpnu ٘ at($root);
}
/**
* This test verifies the current behaviour where vfsStream URLs do not work
* with file_put_contents() and LOCK_EX. The test is intended to break once
* PHP changes this so we get notified about the change.
*
* @test
*/
public function filePutContentsWithLockShouldReportError(): void
{
expect(static function (): void {
file_put_contents(vfsStream::url('root/testfile'), "some string\n", LOCK_EX);
})->triggers()
->withMessage('file_put_contents(): Exclusive locks may only be set for regular files');
}
/**
* @test
*/
public function flockShouldPass(): void
{
$fp = fopen(vfsStream::url('root/testfile'), 'w');
flock($fp, LOCK_EX);
fwrite($fp, "another string\n");
flock($fp, LOCK_UN);
fclose($fp);
assertThat(
file_get_contents(vfsStream::url('root/testfile')),
equals("another string\n")
);
}
}
PK yVRGQ? &