Skip to content

Commit

Permalink
port #209 to 1.x as suggested in #221
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mikey179 committed Mar 3, 2020
1 parent 9260406 commit d9aec4e
Show file tree
Hide file tree
Showing 101 changed files with 1,354 additions and 167 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
------------------

Expand Down
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
6 changes: 3 additions & 3 deletions examples/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -51,4 +51,4 @@ public function setDirectory($directory)

// more source code here...
}
?>
?>
6 changes: 3 additions & 3 deletions examples/ExampleTestCaseOldWay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -45,4 +45,4 @@ public function directoryIsCreated()
$this->assertTrue(file_exists(__DIR__ . '/id'));
}
}
?>
?>
8 changes: 4 additions & 4 deletions examples/ExampleTestCaseWithVfsStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -44,4 +44,4 @@ public function directoryIsCreated()
$this->assertTrue($this->root->hasChild('id'));
}
}
?>
?>
6 changes: 3 additions & 3 deletions examples/FailureExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -47,4 +47,4 @@ public function writeData($data)

// more source code here...
}
?>
?>
8 changes: 4 additions & 4 deletions examples/FailureExampleTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -55,4 +55,4 @@ public function returnsErrorMessageIfWritingToFileFails()
$this->assertSame('notoverwritten', $this->root->getChild('test.txt')->getContent());
}
}
?>
?>
6 changes: 3 additions & 3 deletions examples/FileModeExampleTestCaseOldWay.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -64,4 +64,4 @@ public function testDirectoryHasCorrectDifferentFilePermissions()
}
}
}
?>
?>
6 changes: 3 additions & 3 deletions examples/FilePermissionsExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -26,4 +26,4 @@ public function writeConfig($config, $configFile)

// more methods here
}
?>
?>
8 changes: 4 additions & 4 deletions examples/FilePermissionsExampleTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -41,4 +41,4 @@ public function directoryNotWritable()
);
}
}
?>
?>
6 changes: 3 additions & 3 deletions examples/FilemodeExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -59,4 +59,4 @@ public function setDirectory($directory)

// more source code here...
}
?>
?>
8 changes: 4 additions & 4 deletions examples/FilemodeExampleTestCaseWithVfsStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -50,4 +50,4 @@ public function testDirectoryIsCreatedWithGivenPermissions()
$this->assertEquals(0755, $this->root->getChild('id')->getPermissions());
}
}
?>
?>
16 changes: 16 additions & 0 deletions org/bovigo/vfs/DotDirectory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs;

use bovigo\vfs\DotDirectory as Base;

class_exists('bovigo\vfs\DotDirectory');

@trigger_error('Using the "org\bovigo\vfs\DotDirectory" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\DotDirectory" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\DotDirectory" instead */
class DotDirectory extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/Quota.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs;

use bovigo\vfs\Quota as Base;

class_exists('bovigo\vfs\Quota');

@trigger_error('Using the "org\bovigo\vfs\Quota" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\Quota" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\Quota" instead */
class Quota extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/content/FileContent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs\content;

use bovigo\vfs\content\FileContent as Base;

interface_exists('bovigo\vfs\content\FileContent');

@trigger_error('Using the "org\bovigo\vfs\content\FileContent" interface is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\content\FileContent" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\FileContent" instead */
interface FileContent extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/content/LargeFileContent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs\content;

use bovigo\vfs\content\LargeFileContent as Base;

class_exists('bovigo\vfs\content\LargeFileContent');

@trigger_error('Using the "org\bovigo\vfs\content\LargeFileContent" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\content\LargeFileContent" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\LargeFileContent" instead */
class LargeFileContent extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/content/SeekableFileContent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs\content;

use bovigo\vfs\content\SeekableFileContent as Base;

class_exists('bovigo\vfs\content\SeekableFileContent');

@trigger_error('Using the "org\bovigo\vfs\content\SeekableFileContent" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\content\SeekableFileContent" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\SeekableFileContent" instead */
abstract class SeekableFileContent extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/content/StringBasedFileContent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs\content;

use bovigo\vfs\content\StringBasedFileContent as Base;

class_exists('bovigo\vfs\content\StringBasedFileContent');

@trigger_error('Using the "org\bovigo\vfs\content\StringBasedFileContent" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\content\StringBasedFileContent" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\StringBasedFileContent" instead */
class StringBasedFileContent extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/vfsStream.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs;

use bovigo\vfs\vfsStream as Base;

class_exists('bovigo\vfs\vfsStream');

@trigger_error('Using the "org\bovigo\vfs\vfsStream" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\vfsStream" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\vfsStream" instead */
class vfsStream extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/vfsStreamAbstractContent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs;

use bovigo\vfs\vfsStreamAbstractContent as Base;

class_exists('bovigo\vfs\vfsStreamAbstractContent');

@trigger_error('Using the "org\bovigo\vfs\vfsStreamAbstractContent" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\vfsStreamAbstractContent" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\vfsStreamAbstractContent" instead */
abstract class vfsStreamAbstractContent extends Base
{
}
}
16 changes: 16 additions & 0 deletions org/bovigo/vfs/vfsStreamBlock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace org\bovigo\vfs;

use bovigo\vfs\vfsStreamBlock as Base;

class_exists('bovigo\vfs\vfsStreamBlock');

@trigger_error('Using the "org\bovigo\vfs\vfsStreamBlock" class is deprecated since version 1.7 and will be removed in version 2, use "bovigo\vfs\vfsStreamBlock" instead.', E_USER_DEPRECATED);

if (\false) {
/** @deprecated since 1.7, use "bovigo\vfs\vfsStreamBlock" instead */
class vfsStreamBlock extends Base
{
}
}
Loading

0 comments on commit d9aec4e

Please sign in to comment.