Skip to content

0.9.0

Compare
Choose a tag to compare
@ut4 ut4 released this 25 Jan 17:24
· 7 commits to master since this release

Added

  • Initial support for php8
  • Support for nested optional/wildcard paths to ObjectValidator
  • $queryVars parameter to Request->__construct()

Changed

Semi-public API

  • Renamed DbTestUtils::getDb() -> DbTestUtils::setGetDb().
  • Changed Response->sendIfReady() -> Response->commitIfReady() and Response->isSent() -> Response->isCommitted()
  • Renamed TestUtils\AppHolder -> TestUtils\ResponseSpyingApp

Breaking

App::create -> new App

\Pike\App::create(
    ['MyModule', 'MyOtherModule'],
    require 'my-config-file.php',
    new MyAppContext
)

->

new \Pike\App(
    [new MyModule(), new MyOtherModule('my-stuff')],
    function (MyAppContext $ctx, \Pike\AppDefaults $defaults): void {
        $ctx->config = $defaults->makeConfig(require 'my-config-file.php');
    },
    new MyAppContext
)

Module::alterIoc -> Module->alterDi

class MyModule {
    public static function alterIoc(Auryn\Injector $injector) {}
}

->

class MyModule {
    public function alterDi(Auryn\Injector $di) {}
}

TestUtils-API

$app = $this->makeApp('\My\App::create');
$req = new Request('/foo', 'GET');
$res = $this->makeSpyingResponse();
$this->sendRequest($req, $res, $app);
$this->assertEquals('foo', $res->getActualBody());

->

$req = new Request('/foo', 'GET');
$res = $this->makeApp('\My\App::create')->sendRequest($req);
$this->assertEquals('foo', $res->getActualBody());

Removed

  • $email parameter from Auth\AccountManager->finalizePasswordReset().