1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-12 00:04:11 +02:00

Start using PSR-4

This commit is contained in:
Daniel St. Jules
2014-02-11 23:04:11 -05:00
parent edaf567a13
commit b3e922c517
8 changed files with 12 additions and 8 deletions

View File

@@ -88,9 +88,9 @@ require 'vendor/autoload.php';
Otherwise, you can simply require the file directly: Otherwise, you can simply require the file directly:
```php ```php
require_once 'path/to/Stringy/src/Stringy/Stringy.php'; require_once 'path/to/Stringy/src/Stringy.php';
// or // or
require_once 'path/to/Stringy/src/Stringy/StaticStringy.php'; require_once 'path/to/Stringy/src/StaticStringy.php';
``` ```
And in either case, I'd suggest using an alias. And in either case, I'd suggest using an alias.

View File

@@ -17,7 +17,11 @@
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
}, },
"support": {
"issues": "https://github.com/danielstjules/Stringy/issues",
"source": "https://github.com/danielstjules/Stringy"
},
"autoload": { "autoload": {
"psr-0": { "Stringy": "src/" } "psr-4": { "Stringy\\": "src/" }
} }
} }

View File

@@ -5,7 +5,7 @@
syntaxCheck="false"> syntaxCheck="false">
<testsuites> <testsuites>
<testsuite name="Stringy"> <testsuite name="Stringy">
<directory>tests/Stringy</directory> <directory>tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
</phpunit> </phpunit>

View File

@@ -1,7 +1,7 @@
<?php <?php
$base = realpath(dirname(__FILE__) . '/../..'); $base = realpath(dirname(__FILE__) . '/..');
require("$base/src/Stringy/StaticStringy.php"); require("$base/src/StaticStringy.php");
use Stringy\StaticStringy as S; use Stringy\StaticStringy as S;

View File

@@ -1,7 +1,7 @@
<?php <?php
$base = realpath(dirname(__FILE__) . '/../..'); $base = realpath(dirname(__FILE__) . '/..');
require("$base/src/Stringy/Stringy.php"); require("$base/src/Stringy.php");
use Stringy\Stringy as S; use Stringy\Stringy as S;