From d9aec4eb75615ef3854a7279266a4c11e860b97d Mon Sep 17 00:00:00 2001 From: Frank Kleine Date: Tue, 3 Mar 2020 14:37:45 +0100 Subject: [PATCH 1/4] port #209 to 1.x as suggested in #221 This ports the namespace change introduced with #209 to the 1.x series, as suggested in #221. This allows users to upgrade to 1.7 and adjust the used namespace. --- CHANGELOG.md | 8 +++ composer.json | 12 ++++- examples/Example.php | 6 +-- examples/ExampleTestCaseOldWay.php | 6 +-- examples/ExampleTestCaseWithVfsStream.php | 8 +-- examples/FailureExample.php | 6 +-- examples/FailureExampleTestCase.php | 8 +-- examples/FileModeExampleTestCaseOldWay.php | 6 +-- examples/FilePermissionsExample.php | 6 +-- examples/FilePermissionsExampleTestCase.php | 8 +-- examples/FilemodeExample.php | 6 +-- .../FilemodeExampleTestCaseWithVfsStream.php | 8 +-- org/bovigo/vfs/DotDirectory.php | 16 ++++++ org/bovigo/vfs/Quota.php | 16 ++++++ org/bovigo/vfs/content/FileContent.php | 16 ++++++ org/bovigo/vfs/content/LargeFileContent.php | 16 ++++++ .../vfs/content/SeekableFileContent.php | 16 ++++++ .../vfs/content/StringBasedFileContent.php | 16 ++++++ org/bovigo/vfs/vfsStream.php | 16 ++++++ org/bovigo/vfs/vfsStreamAbstractContent.php | 16 ++++++ org/bovigo/vfs/vfsStreamBlock.php | 16 ++++++ org/bovigo/vfs/vfsStreamContainer.php | 16 ++++++ org/bovigo/vfs/vfsStreamContainerIterator.php | 16 ++++++ org/bovigo/vfs/vfsStreamContent.php | 16 ++++++ org/bovigo/vfs/vfsStreamDirectory.php | 16 ++++++ org/bovigo/vfs/vfsStreamException.php | 16 ++++++ org/bovigo/vfs/vfsStreamFile.php | 16 ++++++ org/bovigo/vfs/vfsStreamWrapper.php | 16 ++++++ .../vfs/visitor/vfsStreamAbstractVisitor.php | 16 ++++++ .../vfs/visitor/vfsStreamPrintVisitor.php | 16 ++++++ .../vfs/visitor/vfsStreamStructureVisitor.php | 16 ++++++ org/bovigo/vfs/visitor/vfsStreamVisitor.php | 16 ++++++ phpcs.xml.dist | 54 +++++++++++++++++++ phpdoc.dist.xml | 6 +-- phpstan.neon.dist | 13 +++++ phpunit.xml.dist | 10 ++-- .../php/org/bovigo/vfs => }/DotDirectory.php | 10 +++- src/{main/php/org/bovigo/vfs => }/Quota.php | 8 ++- .../bovigo/vfs => }/content/FileContent.php | 8 ++- .../vfs => }/content/LargeFileContent.php | 11 +++- .../vfs => }/content/SeekableFileContent.php | 13 ++++- .../content/StringBasedFileContent.php | 11 +++- .../php/org/bovigo/vfs => }/vfsStream.php | 35 ++++++++++-- .../vfs => }/vfsStreamAbstractContent.php | 13 ++++- .../org/bovigo/vfs => }/vfsStreamBlock.php | 7 ++- .../bovigo/vfs => }/vfsStreamContainer.php | 9 +++- .../vfs => }/vfsStreamContainerIterator.php | 13 ++++- .../org/bovigo/vfs => }/vfsStreamContent.php | 8 ++- .../bovigo/vfs => }/vfsStreamDirectory.php | 14 ++++- .../bovigo/vfs => }/vfsStreamException.php | 9 +++- .../php/org/bovigo/vfs => }/vfsStreamFile.php | 33 ++++++++++-- .../org/bovigo/vfs => }/vfsStreamWrapper.php | 42 ++++++++++++++- .../visitor/vfsStreamAbstractVisitor.php | 14 +++-- .../visitor/vfsStreamPrintVisitor.php | 20 +++++-- .../visitor/vfsStreamStructureVisitor.php | 13 +++-- .../vfs => }/visitor/vfsStreamVisitor.php | 15 ++++-- {src/test => tests}/bootstrap.php | 2 +- {src/test => tests}/phpt/bug71287.phpt | 0 .../phpunit}/DirectoryIterationTestCase.php | 23 +++++++- .../phpunit}/FilenameTestCase.php | 15 +++++- .../phpunit}/Issue104TestCase.php | 12 ++++- .../phpunit}/PermissionsTestCase.php | 14 ++++- .../vfs => tests/phpunit}/QuotaTestCase.php | 13 ++++- .../vfs => tests/phpunit}/UnlinkTestCase.php | 18 ++++++- .../content/LargeFileContentTestCase.php | 15 +++++- .../StringBasedFileContentTestCase.php | 17 +++++- .../proxy/vfsStreamWrapperRecordingProxy.php | 0 .../vfsStreamAbstractContentTestCase.php | 18 ++++++- .../phpunit}/vfsStreamBlockTestCase.php | 18 ++++++- .../vfsStreamContainerIteratorTestCase.php | 19 ++++++- .../vfsStreamDirectoryIssue134TestCase.php | 13 ++++- .../vfsStreamDirectoryIssue18TestCase.php | 14 ++++- .../phpunit}/vfsStreamDirectoryTestCase.php | 21 +++++++- .../phpunit}/vfsStreamExLockTestCase.php | 18 ++++++- .../phpunit}/vfsStreamFileTestCase.php | 24 ++++++++- .../phpunit}/vfsStreamGlobTestCase.php | 13 ++++- .../vfsStreamResolveIncludePathTestCase.php | 18 ++++++- .../phpunit}/vfsStreamTestCase.php | 31 +++++++++-- .../phpunit}/vfsStreamUmaskTestCase.php | 13 ++++- ...StreamWrapperAlreadyRegisteredTestCase.php | 17 +++++- .../phpunit}/vfsStreamWrapperBaseTestCase.php | 12 ++++- .../vfsStreamWrapperDirSeparatorTestCase.php | 14 ++++- .../phpunit}/vfsStreamWrapperDirTestCase.php | 34 +++++++++--- .../phpunit}/vfsStreamWrapperFileTestCase.php | 31 +++++++++-- .../vfsStreamWrapperFileTimesTestCase.php | 27 +++++++++- .../vfsStreamWrapperFlockTestCase.php | 18 ++++++- .../vfsStreamWrapperLargeFileTestCase.php | 21 +++++++- .../vfsStreamWrapperQuotaTestCase.php | 19 ++++++- .../vfsStreamWrapperSetOptionTestCase.php | 16 +++++- .../vfsStreamWrapperStreamSelectTestCase.php | 13 ++++- .../phpunit}/vfsStreamWrapperTestCase.php | 53 ++++++++++++++++-- .../vfsStreamWrapperUnregisterTestCase.php | 17 +++++- .../vfsStreamWrapperWithoutRootTestCase.php | 15 +++++- .../phpunit}/vfsStreamZipTestCase.php | 15 +++++- .../vfsStreamAbstractVisitorTestCase.php | 20 +++++-- .../visitor/vfsStreamPrintVisitorTestCase.php | 20 +++++-- .../vfsStreamStructureVisitorTestCase.php | 13 +++-- .../filesystemcopy/emptyFolder/.gitignore | 0 .../filesystemcopy/withSubfolders/aFile.txt | 0 .../withSubfolders/subfolder1/file1.txt | 0 .../withSubfolders/subfolder2/.gitignore | 0 101 files changed, 1354 insertions(+), 167 deletions(-) create mode 100644 org/bovigo/vfs/DotDirectory.php create mode 100644 org/bovigo/vfs/Quota.php create mode 100644 org/bovigo/vfs/content/FileContent.php create mode 100644 org/bovigo/vfs/content/LargeFileContent.php create mode 100644 org/bovigo/vfs/content/SeekableFileContent.php create mode 100644 org/bovigo/vfs/content/StringBasedFileContent.php create mode 100644 org/bovigo/vfs/vfsStream.php create mode 100644 org/bovigo/vfs/vfsStreamAbstractContent.php create mode 100644 org/bovigo/vfs/vfsStreamBlock.php create mode 100644 org/bovigo/vfs/vfsStreamContainer.php create mode 100644 org/bovigo/vfs/vfsStreamContainerIterator.php create mode 100644 org/bovigo/vfs/vfsStreamContent.php create mode 100644 org/bovigo/vfs/vfsStreamDirectory.php create mode 100644 org/bovigo/vfs/vfsStreamException.php create mode 100644 org/bovigo/vfs/vfsStreamFile.php create mode 100644 org/bovigo/vfs/vfsStreamWrapper.php create mode 100644 org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php create mode 100644 org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php create mode 100644 org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php create mode 100644 org/bovigo/vfs/visitor/vfsStreamVisitor.php create mode 100644 phpcs.xml.dist create mode 100644 phpstan.neon.dist rename src/{main/php/org/bovigo/vfs => }/DotDirectory.php (80%) rename src/{main/php/org/bovigo/vfs => }/Quota.php (93%) rename src/{main/php/org/bovigo/vfs => }/content/FileContent.php (90%) rename src/{main/php/org/bovigo/vfs => }/content/LargeFileContent.php (94%) rename src/{main/php/org/bovigo/vfs => }/content/SeekableFileContent.php (91%) rename src/{main/php/org/bovigo/vfs => }/content/StringBasedFileContent.php (89%) rename src/{main/php/org/bovigo/vfs => }/vfsStream.php (95%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamAbstractContent.php (97%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamBlock.php (84%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamContainer.php (89%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamContainerIterator.php (87%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamContent.php (97%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamDirectory.php (95%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamException.php (69%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamFile.php (92%) rename src/{main/php/org/bovigo/vfs => }/vfsStreamWrapper.php (96%) rename src/{main/php/org/bovigo/vfs => }/visitor/vfsStreamAbstractVisitor.php (82%) rename src/{main/php/org/bovigo/vfs => }/visitor/vfsStreamPrintVisitor.php (85%) rename src/{main/php/org/bovigo/vfs => }/visitor/vfsStreamStructureVisitor.php (89%) rename src/{main/php/org/bovigo/vfs => }/visitor/vfsStreamVisitor.php (80%) rename {src/test => tests}/bootstrap.php (97%) rename {src/test => tests}/phpt/bug71287.phpt (100%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/DirectoryIterationTestCase.php (95%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/FilenameTestCase.php (85%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/Issue104TestCase.php (86%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/PermissionsTestCase.php (92%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/QuotaTestCase.php (84%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/UnlinkTestCase.php (80%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/content/LargeFileContentTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/content/StringBasedFileContentTestCase.php (92%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/proxy/vfsStreamWrapperRecordingProxy.php (100%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamAbstractContentTestCase.php (98%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamBlockTestCase.php (82%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamContainerIteratorTestCase.php (84%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamDirectoryIssue134TestCase.php (81%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamDirectoryIssue18TestCase.php (86%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamDirectoryTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamExLockTestCase.php (79%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamFileTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamGlobTestCase.php (73%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamResolveIncludePathTestCase.php (76%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamTestCase.php (96%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamUmaskTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperAlreadyRegisteredTestCase.php (78%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperBaseTestCase.php (91%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperDirSeparatorTestCase.php (83%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperDirTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperFileTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperFileTimesTestCase.php (94%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperFlockTestCase.php (97%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperLargeFileTestCase.php (80%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperQuotaTestCase.php (93%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperSetOptionTestCase.php (80%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperStreamSelectTestCase.php (77%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperTestCase.php (95%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperUnregisterTestCase.php (80%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamWrapperWithoutRootTestCase.php (80%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/vfsStreamZipTestCase.php (80%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/visitor/vfsStreamAbstractVisitorTestCase.php (86%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/visitor/vfsStreamPrintVisitorTestCase.php (88%) rename {src/test/php/org/bovigo/vfs => tests/phpunit}/visitor/vfsStreamStructureVisitorTestCase.php (91%) rename {src/test => tests}/resources/filesystemcopy/emptyFolder/.gitignore (100%) rename {src/test => tests}/resources/filesystemcopy/withSubfolders/aFile.txt (100%) rename {src/test => tests}/resources/filesystemcopy/withSubfolders/subfolder1/file1.txt (100%) rename {src/test => tests}/resources/filesystemcopy/withSubfolders/subfolder2/.gitignore (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbc10553..14af5740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +======= +1.7.0 (20??-??-??) +------------------ + + * Namespace changed from `org\bovigo\vfs` to `bovigo\vfs` + - The old namespace still works, but has been deprecated. It will be removed in version 2. + + 1.6.8 (2019-10-30) ------------------ diff --git a/composer.json b/composer.json index 9d1f3f0e..722e7475 100644 --- a/composer.json +++ b/composer.json @@ -23,11 +23,19 @@ "phpunit/phpunit": "^4.5|^5.0" }, "autoload": { - "psr-0": { "org\\bovigo\\vfs\\": "src/main/php" } + "psr-4": { + "bovigo\\vfs\\": "src", + "org\\bovigo\\vfs\\": "org/bovigo/vfs" + } + }, + "autoload-dev": { + "psr-4": { + "bovigo\\vfs\\tests\\": "tests/phpunit" + } }, "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.7.x-dev" } } } diff --git a/examples/Example.php b/examples/Example.php index a12caeec..59fb1780 100644 --- a/examples/Example.php +++ b/examples/Example.php @@ -5,9 +5,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; +namespace bovigo\vfs\example; /** * Example class. */ @@ -51,4 +51,4 @@ public function setDirectory($directory) // more source code here... } -?> \ No newline at end of file +?> diff --git a/examples/ExampleTestCaseOldWay.php b/examples/ExampleTestCaseOldWay.php index 4ecb9d8d..e54d2ed7 100644 --- a/examples/ExampleTestCaseOldWay.php +++ b/examples/ExampleTestCaseOldWay.php @@ -5,9 +5,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; +namespace bovigo\vfs\example; require_once 'Example.php'; /** * Test case for class Example. @@ -45,4 +45,4 @@ public function directoryIsCreated() $this->assertTrue(file_exists(__DIR__ . '/id')); } } -?> \ No newline at end of file +?> diff --git a/examples/ExampleTestCaseWithVfsStream.php b/examples/ExampleTestCaseWithVfsStream.php index 97c8a374..8103846d 100644 --- a/examples/ExampleTestCaseWithVfsStream.php +++ b/examples/ExampleTestCaseWithVfsStream.php @@ -5,10 +5,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; -use org\bovigo\vfs\vfsStream; +namespace bovigo\vfs\example; +use bovigo\vfs\vfsStream; require_once 'Example.php'; /** * Test case for class Example. @@ -44,4 +44,4 @@ public function directoryIsCreated() $this->assertTrue($this->root->hasChild('id')); } } -?> \ No newline at end of file +?> diff --git a/examples/FailureExample.php b/examples/FailureExample.php index 472468b2..0ae7dd3b 100644 --- a/examples/FailureExample.php +++ b/examples/FailureExample.php @@ -5,9 +5,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; +namespace bovigo\vfs\example; /** * Example class to demonstrate testing of failure behaviour with vfsStream. */ @@ -47,4 +47,4 @@ public function writeData($data) // more source code here... } -?> \ No newline at end of file +?> diff --git a/examples/FailureExampleTestCase.php b/examples/FailureExampleTestCase.php index e2123055..ac27dbc7 100644 --- a/examples/FailureExampleTestCase.php +++ b/examples/FailureExampleTestCase.php @@ -5,10 +5,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; -use org\bovigo\vfs\vfsStream; +namespace bovigo\vfs\example; +use bovigo\vfs\vfsStream; require_once 'FailureExample.php'; /** * Test case for class FailureExample. @@ -55,4 +55,4 @@ public function returnsErrorMessageIfWritingToFileFails() $this->assertSame('notoverwritten', $this->root->getChild('test.txt')->getContent()); } } -?> \ No newline at end of file +?> diff --git a/examples/FileModeExampleTestCaseOldWay.php b/examples/FileModeExampleTestCaseOldWay.php index 9f996711..2d3ebcf5 100644 --- a/examples/FileModeExampleTestCaseOldWay.php +++ b/examples/FileModeExampleTestCaseOldWay.php @@ -5,9 +5,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; +namespace bovigo\vfs\example; require_once 'FilemodeExample.php'; /** * Test case for class FilemodeExample. @@ -64,4 +64,4 @@ public function testDirectoryHasCorrectDifferentFilePermissions() } } } -?> \ No newline at end of file +?> diff --git a/examples/FilePermissionsExample.php b/examples/FilePermissionsExample.php index 6258a5d7..7733696c 100644 --- a/examples/FilePermissionsExample.php +++ b/examples/FilePermissionsExample.php @@ -5,9 +5,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; +namespace bovigo\vfs\example; /** * Example showing correct file permission support introduced with 0.7.0. */ @@ -26,4 +26,4 @@ public function writeConfig($config, $configFile) // more methods here } -?> \ No newline at end of file +?> diff --git a/examples/FilePermissionsExampleTestCase.php b/examples/FilePermissionsExampleTestCase.php index 66466362..9e879433 100644 --- a/examples/FilePermissionsExampleTestCase.php +++ b/examples/FilePermissionsExampleTestCase.php @@ -5,10 +5,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; -use org\bovigo\vfs\vfsStream; +namespace bovigo\vfs\example; +use bovigo\vfs\vfsStream; require_once 'FilePermissionsExample.php'; /** * Test for FilePermissionsExample. @@ -41,4 +41,4 @@ public function directoryNotWritable() ); } } -?> \ No newline at end of file +?> diff --git a/examples/FilemodeExample.php b/examples/FilemodeExample.php index c2ac364c..60e3eb93 100644 --- a/examples/FilemodeExample.php +++ b/examples/FilemodeExample.php @@ -5,9 +5,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; +namespace bovigo\vfs\example; /** * Example class. */ @@ -59,4 +59,4 @@ public function setDirectory($directory) // more source code here... } -?> \ No newline at end of file +?> diff --git a/examples/FilemodeExampleTestCaseWithVfsStream.php b/examples/FilemodeExampleTestCaseWithVfsStream.php index 675a2c72..bdf552c0 100644 --- a/examples/FilemodeExampleTestCaseWithVfsStream.php +++ b/examples/FilemodeExampleTestCaseWithVfsStream.php @@ -5,10 +5,10 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs\example; -use org\bovigo\vfs\vfsStream; +namespace bovigo\vfs\example; +use bovigo\vfs\vfsStream; require_once 'FilemodeExample.php'; /** * Test case for class FilemodeExample. @@ -50,4 +50,4 @@ public function testDirectoryIsCreatedWithGivenPermissions() $this->assertEquals(0755, $this->root->getChild('id')->getPermissions()); } } -?> \ No newline at end of file +?> diff --git a/org/bovigo/vfs/DotDirectory.php b/org/bovigo/vfs/DotDirectory.php new file mode 100644 index 00000000..d81908d9 --- /dev/null +++ b/org/bovigo/vfs/DotDirectory.php @@ -0,0 +1,16 @@ + + + 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 + + + + + + + + diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index 9cc27972..631216c4 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -3,12 +3,12 @@ vfsStream API Doc docs/api - org\bovigo\vfs + bovigo\vfs docs/api - src/main/php + src - \ No newline at end of file + diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..37543bdf --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,13 @@ +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 + ignoreErrors: + - + message: '/Default value of the parameter #1 \$out \(mixed\) of method [a-zA-Z0-9\\_]+::__construct\(\) is incompatible with type resource/' + path: %currentWorkingDirectory%/src/visitor/vfsStreamPrintVisitor.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1e6720a4..e92c4971 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,7 +1,7 @@ - - ./src/test/phpt - ./src/test/php + + tests/phpt + tests/phpunit - src/main/php + src diff --git a/src/main/php/org/bovigo/vfs/DotDirectory.php b/src/DotDirectory.php similarity index 80% rename from src/main/php/org/bovigo/vfs/DotDirectory.php rename to src/DotDirectory.php index b17b9796..bde269b3 100644 --- a/src/main/php/org/bovigo/vfs/DotDirectory.php +++ b/src/DotDirectory.php @@ -7,7 +7,13 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use ArrayIterator; +use Iterator; +use function class_alias; + /** * Directory container. */ @@ -33,3 +39,5 @@ public function isDot() return true; } } + +class_alias('bovigo\vfs\DotDirectory', 'org\bovigo\vfs\DotDirectory'); diff --git a/src/main/php/org/bovigo/vfs/Quota.php b/src/Quota.php similarity index 93% rename from src/main/php/org/bovigo/vfs/Quota.php rename to src/Quota.php index 7635f1d2..62d23086 100644 --- a/src/main/php/org/bovigo/vfs/Quota.php +++ b/src/Quota.php @@ -7,7 +7,11 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use function class_alias; + /** * Represents a quota for disk space. * @@ -84,3 +88,5 @@ public function spaceLeft($usedSpace) return $spaceLeft; } } + +class_alias('bovigo\vfs\Quota', 'org\bovigo\vfs\Quota'); diff --git a/src/main/php/org/bovigo/vfs/content/FileContent.php b/src/content/FileContent.php similarity index 90% rename from src/main/php/org/bovigo/vfs/content/FileContent.php rename to src/content/FileContent.php index e62e3098..e9920dc2 100644 --- a/src/main/php/org/bovigo/vfs/content/FileContent.php +++ b/src/content/FileContent.php @@ -7,7 +7,11 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\content; + +namespace bovigo\vfs\content; + +use function class_alias; + /** * Interface for actual file contents. * @@ -69,3 +73,5 @@ public function write($data); */ public function truncate($size); } + +class_alias('bovigo\vfs\content\FileContent', 'org\bovigo\vfs\content\FileContent'); diff --git a/src/main/php/org/bovigo/vfs/content/LargeFileContent.php b/src/content/LargeFileContent.php similarity index 94% rename from src/main/php/org/bovigo/vfs/content/LargeFileContent.php rename to src/content/LargeFileContent.php index a0035270..1ce140a7 100644 --- a/src/main/php/org/bovigo/vfs/content/LargeFileContent.php +++ b/src/content/LargeFileContent.php @@ -7,7 +7,14 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\content; + +namespace bovigo\vfs\content; + +use function array_filter; +use function array_keys; +use function class_alias; +use function substr; + /** * File content implementation to mock large files. * @@ -165,3 +172,5 @@ function($pos) use ($size) return true; } } + +class_alias('bovigo\vfs\content\LargeFileContent', 'org\bovigo\vfs\content\LargeFileContent'); diff --git a/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php b/src/content/SeekableFileContent.php similarity index 91% rename from src/main/php/org/bovigo/vfs/content/SeekableFileContent.php rename to src/content/SeekableFileContent.php index 960284cf..0c266592 100644 --- a/src/main/php/org/bovigo/vfs/content/SeekableFileContent.php +++ b/src/content/SeekableFileContent.php @@ -7,7 +7,16 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\content; + +namespace bovigo\vfs\content; + +use const SEEK_CUR; +use const SEEK_END; +use const SEEK_SET; +use function class_alias; +use function strlen; +use function substr; + /** * Default implementation for file contents based on simple strings. * @@ -132,3 +141,5 @@ public function readUntilEnd() return substr($this->content(), $this->offset); } } + +class_alias('bovigo\vfs\content\SeekableFileContent', 'org\bovigo\vfs\content\SeekableFileContent'); diff --git a/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php b/src/content/StringBasedFileContent.php similarity index 89% rename from src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php rename to src/content/StringBasedFileContent.php index 77adf8e5..c9b97427 100644 --- a/src/main/php/org/bovigo/vfs/content/StringBasedFileContent.php +++ b/src/content/StringBasedFileContent.php @@ -7,7 +7,14 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\content; + +namespace bovigo\vfs\content; + +use function class_alias; +use function str_repeat; +use function strlen; +use function substr; + /** * Default implementation for file contents based on simple strings. * @@ -95,3 +102,5 @@ public function truncate($size) return true; } } + +class_alias('bovigo\vfs\content\StringBasedFileContent', 'org\bovigo\vfs\content\StringBasedFileContent'); diff --git a/src/main/php/org/bovigo/vfs/vfsStream.php b/src/vfsStream.php similarity index 95% rename from src/main/php/org/bovigo/vfs/vfsStream.php rename to src/vfsStream.php index 1eb382df..1ccae6ab 100644 --- a/src/main/php/org/bovigo/vfs/vfsStream.php +++ b/src/vfsStream.php @@ -7,10 +7,35 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; -use org\bovigo\vfs\content\LargeFileContent; -use org\bovigo\vfs\content\FileContent; -use org\bovigo\vfs\visitor\vfsStreamVisitor; + +namespace bovigo\vfs; + +use bovigo\vfs\content\FileContent; +use bovigo\vfs\content\LargeFileContent; +use bovigo\vfs\visitor\vfsStreamVisitor; +use DirectoryIterator; +use InvalidArgumentException; +use function array_map; +use function class_alias; +use function explode; +use function file_get_contents; +use function filetype; +use function function_exists; +use function implode; +use function is_array; +use function is_string; +use function octdec; +use function posix_getgid; +use function posix_getuid; +use function preg_match; +use function rawurldecode; +use function sprintf; +use function str_replace; +use function strlen; +use function strpos; +use function substr; +use function trim; + /** * Some utility methods for vfsStream. * @@ -477,3 +502,5 @@ public static function enableDotfiles() self::$dotFiles = true; } } + +class_alias('bovigo\vfs\vfsStream', 'org\bovigo\vfs\vfsStream'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php b/src/vfsStreamAbstractContent.php similarity index 97% rename from src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php rename to src/vfsStreamAbstractContent.php index 7db2be28..cf6e6245 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamAbstractContent.php +++ b/src/vfsStreamAbstractContent.php @@ -7,7 +7,16 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use function class_alias; +use function clearstatcache; +use function strlen; +use function strncmp; +use function strstr; +use function time; + /** * Base stream contents container. */ @@ -416,3 +425,5 @@ public function url() return vfsStream::url($this->path()); } } + +class_alias('bovigo\vfs\vfsStreamAbstractContent', 'org\bovigo\vfs\vfsStreamAbstractContent'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamBlock.php b/src/vfsStreamBlock.php similarity index 84% rename from src/main/php/org/bovigo/vfs/vfsStreamBlock.php rename to src/vfsStreamBlock.php index 128a96a3..2deed4cf 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamBlock.php +++ b/src/vfsStreamBlock.php @@ -7,7 +7,10 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use function class_alias; /** * Block container. @@ -32,3 +35,5 @@ public function __construct($name, $permissions = null) $this->type = vfsStreamContent::TYPE_BLOCK; } } + +class_alias('bovigo\vfs\vfsStreamBlock', 'org\bovigo\vfs\vfsStreamBlock'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamContainer.php b/src/vfsStreamContainer.php similarity index 89% rename from src/main/php/org/bovigo/vfs/vfsStreamContainer.php rename to src/vfsStreamContainer.php index 74faa9a1..cceb59e3 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamContainer.php +++ b/src/vfsStreamContainer.php @@ -7,7 +7,12 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use IteratorAggregate; +use function class_alias; + /** * Interface for stream contents that are able to store other stream contents. */ @@ -59,3 +64,5 @@ public function hasChildren(); */ public function getChildren(); } + +class_alias('bovigo\vfs\vfsStreamContainer', 'org\bovigo\vfs\vfsStreamContainer'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamContainerIterator.php b/src/vfsStreamContainerIterator.php similarity index 87% rename from src/main/php/org/bovigo/vfs/vfsStreamContainerIterator.php rename to src/vfsStreamContainerIterator.php index 99ea1f8b..abe5808c 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamContainerIterator.php +++ b/src/vfsStreamContainerIterator.php @@ -7,7 +7,16 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use Iterator; +use function array_unshift; +use function class_alias; +use function current; +use function next; +use function reset; + /** * Iterator for children of a directory container. */ @@ -91,3 +100,5 @@ public function valid() return (false !== current($this->children)); } } + +class_alias('bovigo\vfs\vfsStreamContainerIterator', 'org\bovigo\vfs\vfsStreamContainerIterator'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamContent.php b/src/vfsStreamContent.php similarity index 97% rename from src/main/php/org/bovigo/vfs/vfsStreamContent.php rename to src/vfsStreamContent.php index 03b5bab7..688fde6c 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamContent.php +++ b/src/vfsStreamContent.php @@ -7,7 +7,11 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use function class_alias; + /** * Interface for stream contents. */ @@ -211,3 +215,5 @@ public function path(); */ public function url(); } + +class_alias('bovigo\vfs\vfsStreamContent', 'org\bovigo\vfs\vfsStreamContent'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php b/src/vfsStreamDirectory.php similarity index 95% rename from src/main/php/org/bovigo/vfs/vfsStreamDirectory.php rename to src/vfsStreamDirectory.php index ffb6db3f..e1507748 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php +++ b/src/vfsStreamDirectory.php @@ -7,7 +7,17 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use Iterator; +use function array_values; +use function class_alias; +use function count; +use function strlen; +use function substr; +use function time; + /** * Directory container. * @@ -264,3 +274,5 @@ public function isDot() return false; } } + +class_alias('bovigo\vfs\vfsStreamDirectory', 'org\bovigo\vfs\vfsStreamDirectory'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamException.php b/src/vfsStreamException.php similarity index 69% rename from src/main/php/org/bovigo/vfs/vfsStreamException.php rename to src/vfsStreamException.php index b78afd18..f6e55bab 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamException.php +++ b/src/vfsStreamException.php @@ -7,7 +7,12 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use Exception; +use function class_alias; + /** * Exception for vfsStream errors. * @@ -17,3 +22,5 @@ class vfsStreamException extends \Exception { // intentionally empty } + +class_alias('bovigo\vfs\vfsStreamException', 'org\bovigo\vfs\vfsStreamException'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamFile.php b/src/vfsStreamFile.php similarity index 92% rename from src/main/php/org/bovigo/vfs/vfsStreamFile.php rename to src/vfsStreamFile.php index 33ee5639..c3d6df04 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamFile.php +++ b/src/vfsStreamFile.php @@ -5,11 +5,27 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @package org\bovigo\vfs + * @package bovigo\vfs */ -namespace org\bovigo\vfs; -use org\bovigo\vfs\content\FileContent; -use org\bovigo\vfs\content\StringBasedFileContent; + +namespace bovigo\vfs; + +use bovigo\vfs\content\FileContent; +use bovigo\vfs\content\StringBasedFileContent; +use InvalidArgumentException; +use const LOCK_EX; +use const LOCK_NB; +use const LOCK_SH; +use const SEEK_END; +use const SEEK_SET; +use function class_alias; +use function is_resource; +use function is_string; +use function spl_object_hash; +use function sprintf; +use function stream_get_meta_data; +use function time; + /** * File container. * @@ -100,7 +116,12 @@ public function withContent($content) } elseif ($content instanceof FileContent) { $this->content = $content; } else { - throw new \InvalidArgumentException('Given content must either be a string or an instance of org\bovigo\vfs\content\FileContent'); + throw new InvalidArgumentException( + sprintf( + 'Given content must either be a string or an instance of %s', + FileContent::class + ) + ); } return $this; @@ -392,3 +413,5 @@ public function hasExclusiveLock($resource = null) return null !== $this->exclusiveLock; } } + +class_alias('bovigo\vfs\vfsStreamFile', 'org\bovigo\vfs\vfsStreamFile'); diff --git a/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php b/src/vfsStreamWrapper.php similarity index 96% rename from src/main/php/org/bovigo/vfs/vfsStreamWrapper.php rename to src/vfsStreamWrapper.php index 368b2fbe..4e18343b 100644 --- a/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php +++ b/src/vfsStreamWrapper.php @@ -7,7 +7,45 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs; + +namespace bovigo\vfs; + +use const E_USER_WARNING; +use const LOCK_NB; +use const LOCK_UN; +use const STREAM_META_ACCESS; +use const STREAM_META_GROUP; +use const STREAM_META_GROUP_NAME; +use const STREAM_META_OWNER; +use const STREAM_META_OWNER_NAME; +use const STREAM_META_TOUCH; +use const STREAM_OPTION_BLOCKING; +use const STREAM_OPTION_READ_TIMEOUT; +use const STREAM_OPTION_WRITE_BUFFER; +use const STREAM_REPORT_ERRORS; +use const STREAM_URL_STAT_QUIET; +use function array_merge; +use function array_pop; +use function array_values; +use function class_alias; +use function clearstatcache; +use function count; +use function explode; +use function implode; +use function in_array; +use function spl_object_id; +use function str_replace; +use function stream_get_wrappers; +use function stream_wrapper_register; +use function stream_wrapper_unregister; +use function strlen; +use function strpos; +use function strrpos; +use function strstr; +use function substr; +use function time; +use function trigger_error; + /** * Stream wrapper to mock file system requests. */ @@ -1010,3 +1048,5 @@ public function url_stat($path, $flags) return array_merge(array_values($fileStat), $fileStat); } } + +class_alias('bovigo\vfs\vfsStreamWrapper', 'org\bovigo\vfs\vfsStreamWrapper'); diff --git a/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php b/src/visitor/vfsStreamAbstractVisitor.php similarity index 82% rename from src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php rename to src/visitor/vfsStreamAbstractVisitor.php index f9e597b9..44e1f093 100644 --- a/src/main/php/org/bovigo/vfs/visitor/vfsStreamAbstractVisitor.php +++ b/src/visitor/vfsStreamAbstractVisitor.php @@ -7,9 +7,15 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\visitor; -use org\bovigo\vfs\vfsStreamContent; -use org\bovigo\vfs\vfsStreamBlock; + +namespace bovigo\vfs\visitor; + +use bovigo\vfs\vfsStreamBlock; +use bovigo\vfs\vfsStreamContent; +use bovigo\vfs\vfsStreamDirectory; +use bovigo\vfs\vfsStreamFile; +use InvalidArgumentException; +use function class_alias; /** * Abstract base class providing an implementation for the visit() method. @@ -62,3 +68,5 @@ public function visitBlockDevice(vfsStreamBlock $block) return $this->visitFile($block); } } + +class_alias('bovigo\vfs\visitor\vfsStreamAbstractVisitor', 'org\bovigo\vfs\visitor\vfsStreamAbstractVisitor'); diff --git a/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php b/src/visitor/vfsStreamPrintVisitor.php similarity index 85% rename from src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php rename to src/visitor/vfsStreamPrintVisitor.php index 15b0bc0c..cac81520 100644 --- a/src/main/php/org/bovigo/vfs/visitor/vfsStreamPrintVisitor.php +++ b/src/visitor/vfsStreamPrintVisitor.php @@ -7,11 +7,19 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\visitor; -use org\bovigo\vfs\vfsStreamContent; -use org\bovigo\vfs\vfsStreamDirectory; -use org\bovigo\vfs\vfsStreamFile; -use org\bovigo\vfs\vfsStreamBlock; + +namespace bovigo\vfs\visitor; + +use bovigo\vfs\vfsStreamBlock; +use bovigo\vfs\vfsStreamDirectory; +use bovigo\vfs\vfsStreamFile; +use InvalidArgumentException; +use const STDOUT; +use function class_alias; +use function fwrite; +use function get_resource_type; +use function is_resource; +use function str_repeat; /** * Visitor which traverses a content structure recursively to print it to an output stream. @@ -105,3 +113,5 @@ protected function printContent($name) fwrite($this->out, str_repeat(' ', $this->depth) . '- ' . $name . "\n"); } } + +class_alias('bovigo\vfs\visitor\vfsStreamPrintVisitor', 'org\bovigo\vfs\visitor\vfsStreamPrintVisitor'); diff --git a/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php b/src/visitor/vfsStreamStructureVisitor.php similarity index 89% rename from src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php rename to src/visitor/vfsStreamStructureVisitor.php index 47acc45c..6617367d 100644 --- a/src/main/php/org/bovigo/vfs/visitor/vfsStreamStructureVisitor.php +++ b/src/visitor/vfsStreamStructureVisitor.php @@ -7,10 +7,13 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\visitor; -use org\bovigo\vfs\vfsStreamDirectory; -use org\bovigo\vfs\vfsStreamFile; -use org\bovigo\vfs\vfsStreamBlock; + +namespace bovigo\vfs\visitor; + +use bovigo\vfs\vfsStreamBlock; +use bovigo\vfs\vfsStreamDirectory; +use bovigo\vfs\vfsStreamFile; +use function class_alias; /** * Visitor which traverses a content structure recursively to create an array structure from it. @@ -109,3 +112,5 @@ public function reset() return $this; } } + +class_alias('bovigo\vfs\visitor\vfsStreamStructureVisitor', 'org\bovigo\vfs\visitor\vfsStreamStructureVisitor'); diff --git a/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php b/src/visitor/vfsStreamVisitor.php similarity index 80% rename from src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php rename to src/visitor/vfsStreamVisitor.php index 21701058..5b2c0640 100644 --- a/src/main/php/org/bovigo/vfs/visitor/vfsStreamVisitor.php +++ b/src/visitor/vfsStreamVisitor.php @@ -7,11 +7,14 @@ * * @package org\bovigo\vfs */ -namespace org\bovigo\vfs\visitor; -use org\bovigo\vfs\vfsStreamContent; -use org\bovigo\vfs\vfsStreamDirectory; -use org\bovigo\vfs\vfsStreamFile; -use org\bovigo\vfs\vfsStreamBlock; + +namespace bovigo\vfs\visitor; + +use bovigo\vfs\vfsStreamBlock; +use bovigo\vfs\vfsStreamContent; +use bovigo\vfs\vfsStreamDirectory; +use bovigo\vfs\vfsStreamFile; +use function class_alias; /** * Interface for a visitor to work on a vfsStream content structure. @@ -53,3 +56,5 @@ public function visitDirectory(vfsStreamDirectory $dir); */ public function visitBlockDevice(vfsStreamBlock $block); } + +class_alias('bovigo\vfs\visitor\vfsStreamVisitor', 'org\bovigo\vfs\visitor\vfsStreamVisitor'); diff --git a/src/test/bootstrap.php b/tests/bootstrap.php similarity index 97% rename from src/test/bootstrap.php rename to tests/bootstrap.php index 13fdb23a..7d353464 100644 --- a/src/test/bootstrap.php +++ b/tests/bootstrap.php @@ -1,6 +1,6 @@ Date: Tue, 3 Mar 2020 15:00:43 +0100 Subject: [PATCH 2/4] remove files not meant to be added --- phpcs.xml.dist | 54 ----------------------------------------------- phpstan.neon.dist | 13 ------------ 2 files changed, 67 deletions(-) delete mode 100644 phpcs.xml.dist delete mode 100644 phpstan.neon.dist diff --git a/phpcs.xml.dist b/phpcs.xml.dist deleted file mode 100644 index 2abdae18..00000000 --- a/phpcs.xml.dist +++ /dev/null @@ -1,54 +0,0 @@ - - - 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 - - - - - - - - diff --git a/phpstan.neon.dist b/phpstan.neon.dist deleted file mode 100644 index 37543bdf..00000000 --- a/phpstan.neon.dist +++ /dev/null @@ -1,13 +0,0 @@ -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 - ignoreErrors: - - - message: '/Default value of the parameter #1 \$out \(mixed\) of method [a-zA-Z0-9\\_]+::__construct\(\) is incompatible with type resource/' - path: %currentWorkingDirectory%/src/visitor/vfsStreamPrintVisitor.php From 104793a3120312635671356cfede29f0556ef215 Mon Sep 17 00:00:00 2001 From: Frank Kleine Date: Tue, 3 Mar 2020 15:01:10 +0100 Subject: [PATCH 3/4] remove builds with PHP < 5.6 --- .travis.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97439d53..d213396f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,13 +11,6 @@ php: matrix: fast_finish: true - include: - - php: 5.5 - dist: precise - - php: 5.4 - dist: precise - - php: 5.3 - dist: precise allow_failures: - php: nightly - php: 7.4snapshot From 8e32926b2e532d01c1bfedbfe0ab0173c0125894 Mon Sep 17 00:00:00 2001 From: Frank Kleine Date: Wed, 4 Mar 2020 10:01:17 +0100 Subject: [PATCH 4/4] raise requirement for minimum PHP version to 5.6.0 --- CHANGELOG.md | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14af5740..9e9c70bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Namespace changed from `org\bovigo\vfs` to `bovigo\vfs` - The old namespace still works, but has been deprecated. It will be removed in version 2. + * raised requirement for minimum PHP version to 5.6.0 1.6.8 (2019-10-30) diff --git a/composer.json b/composer.json index 722e7475..a8cfae57 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "wiki": "https://github.com/bovigo/vfsStream/wiki" }, "require": { - "php": ">=5.3.0" + "php": ">=5.6.0" }, "require-dev": { "phpunit/phpunit": "^4.5|^5.0"