Skip to content

Commit

Permalink
Update psr-4 loader.
Browse files Browse the repository at this point in the history
  • Loading branch information
greylabel committed Nov 14, 2023
1 parent d9a0ee9 commit 332bedb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"license": "MIT",
"autoload": {
"psr-4": {
"BasaltInc\\TwigRenderer\\": "dist/"
"BasaltInc\\": "dist/"
}
},
"autoload-dev": {
"psr-4": {
"BasaltInc\\TwigRenderer\\Tests\\": "tests/"
"BasaltInc\\Tests\\": "tests/"
}
},
"config": {
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/TwigRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace BasaltInc\TwigRenderer;
namespace BasaltInc;

use Twig\Environment;
use Twig\Loader\ArrayLoader;
Expand Down
4 changes: 2 additions & 2 deletions src/server--async.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

declare(strict_types=1);

use BasaltInc\TwigRenderer\TwigRenderer;
use BasaltInc\TwigRenderer;
use Psr\Http\Message\ServerRequestInterface;
use React\EventLoop\Loop;
use React\Http\Response;
use React\Http\Server;
use React\Promise\Promise;
use React\Socket\SocketServer;

require __DIR__.'/../vendor/autoload.php';
require_once dirname(__DIR__).'/vendor/autoload.php';

// CLI args
$port = $argv[1];
Expand Down
4 changes: 2 additions & 2 deletions src/server--sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

// WARNING: not tested nor supported (though it's very close to working) - actual support is on `server--async.php`.

require dirname(__DIR__).'/vendor/autoload.php';
use BasaltInc\TwigRenderer;

use BasaltInc\TwigRenderer\TwigRenderer;
require dirname(__DIR__).'/vendor/autoload.php';

// HTTP Status Codes Used
// 200 OK - The standard response for successful HTTP requests.
Expand Down

0 comments on commit 332bedb

Please sign in to comment.