Skip to content

Commit e5fd5ed

Browse files
author
Andy Vaughn
committed
fix psr-4 configuration
1 parent 79badea commit e5fd5ed

21 files changed

Lines changed: 33 additions & 57 deletions

_bootstrap.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,4 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
require_once(dirname(__FILE__) . '/vendor/autoload.php');
21-
spl_autoload_register(function($class) {
22-
$prefix = 'MindTouch\\XArray\\';
23-
$length = strlen($prefix);
24-
if(strncmp($prefix, $class, $length) !== 0) {
25-
return;
26-
}
27-
$relativeClass = substr($class, $length);
28-
$segments = explode('\\', $relativeClass);
29-
$path = dirname(__FILE__) . '/src/' . implode('/', $segments) . '.php';
30-
if(file_exists($path)) {
31-
32-
/** @noinspection PhpIncludeInspection */
33-
include_once($path);
34-
}
35-
});
20+
require_once(dirname(__FILE__) . '/vendor/autoload.php');

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"role": "Maintainer"
1111
}
1212
],
13-
"minimum-stability": "dev",
1413
"support": {
1514
"issues": "https://github.com/MindTouch/XArray.php/issues"
1615
},
@@ -21,7 +20,9 @@
2120
"phpunit/phpunit": "~4.8.23"
2221
},
2322
"autoload": {
24-
"psr-4": { "MindTouch\\XArray\\": "src/" }
23+
"psr-4": { "MindTouch\\XArray\\": ["src/"] }
2524
},
26-
"target-dir": "MindTouch/XArray"
25+
"autoload-dev": {
26+
"psr-4": { "MindTouch\\XArray\\tests\\": ["tests/"] }
27+
}
2728
}

test/phpunit.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\MutableXArray;
20+
namespace MindTouch\XArray\tests\MutableXArray;
2121

2222
use MindTouch\XArray\MutableXArray;
2323
use PHPUnit_Framework_TestCase;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\MutableXArray;
20+
namespace MindTouch\XArray\tests\MutableXArray;
2121

22-
class getAll_Test extends \MindTouch\XArray\test\tests\XArrayBase\getAll_Test {
22+
class getAll_Test extends \MindTouch\XArray\tests\XArrayBase\getAll_Test {
2323

2424
/**
2525
* @var string
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\MutableXArray;
20+
namespace MindTouch\XArray\tests\MutableXArray;
2121

22-
class getVal_Test extends \MindTouch\XArray\test\tests\XArrayBase\getVal_Test {
22+
class getVal_Test extends \MindTouch\XArray\tests\XArrayBase\getVal_Test {
2323

2424
/**
2525
* @var string
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\MutableXArray;
20+
namespace MindTouch\XArray\tests\MutableXArray;
2121

2222
use MindTouch\XArray\MutableXArray;
2323

24-
class setVal_Test extends \MindTouch\XArray\test\tests\XArrayBase\setVal_Test {
24+
class setVal_Test extends \MindTouch\XArray\tests\XArrayBase\setVal_Test {
2525

2626
/**
2727
* @var string
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\MutableXArray;
20+
namespace MindTouch\XArray\tests\MutableXArray;
2121

22-
class toArray_Test extends \MindTouch\XArray\test\tests\XArrayBase\toArray_Test {
22+
class toArray_Test extends \MindTouch\XArray\tests\XArrayBase\toArray_Test {
2323

2424
/**
2525
* @var string
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\MutableXArray;
20+
namespace MindTouch\XArray\tests\MutableXArray;
2121

22-
class toXml_Test extends \MindTouch\XArray\test\tests\XArrayBase\toXml_Test {
22+
class toXml_Test extends \MindTouch\XArray\tests\XArrayBase\toXml_Test {
2323

2424
/**
2525
* @var string
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* See the License for the specific language governing permissions and
1818
* limitations under the License.
1919
*/
20-
namespace MindTouch\XArray\test\tests\XArray;
20+
namespace MindTouch\XArray\tests\XArray;
2121

2222
use MindTouch\XArray\XArray;
2323
use PHPUnit_Framework_TestCase;

0 commit comments

Comments
 (0)