mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-11 15:54:04 +02:00
Start using PSR-4
This commit is contained in:
@@ -88,9 +88,9 @@ require 'vendor/autoload.php';
|
||||
Otherwise, you can simply require the file directly:
|
||||
|
||||
```php
|
||||
require_once 'path/to/Stringy/src/Stringy/Stringy.php';
|
||||
require_once 'path/to/Stringy/src/Stringy.php';
|
||||
// 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.
|
||||
|
@@ -17,7 +17,11 @@
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"support": {
|
||||
"issues": "https://github.com/danielstjules/Stringy/issues",
|
||||
"source": "https://github.com/danielstjules/Stringy"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": { "Stringy": "src/" }
|
||||
"psr-4": { "Stringy\\": "src/" }
|
||||
}
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
syntaxCheck="false">
|
||||
<testsuites>
|
||||
<testsuite name="Stringy">
|
||||
<directory>tests/Stringy</directory>
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$base = realpath(dirname(__FILE__) . '/../..');
|
||||
require("$base/src/Stringy/StaticStringy.php");
|
||||
$base = realpath(dirname(__FILE__) . '/..');
|
||||
require("$base/src/StaticStringy.php");
|
||||
|
||||
use Stringy\StaticStringy as S;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$base = realpath(dirname(__FILE__) . '/../..');
|
||||
require("$base/src/Stringy/Stringy.php");
|
||||
$base = realpath(dirname(__FILE__) . '/..');
|
||||
require("$base/src/Stringy.php");
|
||||
|
||||
use Stringy\Stringy as S;
|
||||
|
Reference in New Issue
Block a user