Releases: ut4/pike
Releases · ut4/pike
0.10.0
Added
- Support for sqlite
$request->queryVar()
Changed
PhpMailerMailer->sendMail()now resets itself if called more than once$db->open( void )->$db->open( array $pdoOptions = [], bool $doSwallowExceptionError = true )
Breaking
- php <=7.2 is no longer supported
- The middleware loop now stops if $next() is not called. Previously you had to call $res->something or throw an exception to stop the thing.
Removed
App::MAKE_AUTO
0.9.0
Added
- Initial support for php8
- Support for nested optional/wildcard paths to
ObjectValidator $queryVarsparameter toRequest->__construct()
Changed
Semi-public API
- Renamed
DbTestUtils::getDb()->DbTestUtils::setGetDb(). - Changed
Response->sendIfReady()->Response->commitIfReady()andResponse->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
$emailparameter fromAuth\AccountManager->finalizePasswordReset().
0.8.1
- Muuttunut
- Authenticator->getIdentity (rememberMe:n ollessa päällä) palauttaa
null, mikäli tilin status ei oleAutheticator::STATUS_ACTIVATED - SafeHTMLValidator hyväksyy <u> -tagit oletuksena
- Request->createFromGlobals heittää poikkeuksen mikäli json POST/PUT-pyynnön parsattu body ei ole olio
- Authenticator->getIdentity (rememberMe:n ollessa päällä) palauttaa
0.8.0
- Lisätty
Request->header()
- Muuttunut
- Uudelleennimetty/siirretty:
Pike\AbstractMailer->Pike\Interfaces\MailerInterfacePike\SessionInterface->Pike\Interfaces\SessionInterfacePike\FileSystemInterface->Pike\Interfaces\FileSystemInterfacePike\Auth\AbstractUserRepository->Pike\Interfaces\UserRepositoryInterfacePike\Auth\DefaultUserRepository->Pike\Defaults\DefaultUserRepositoryAuthenticator::INVALID_CREDENTIAL->Authenticator::CREDENTIAL_WAS_INVALIDAuthenticator::USER_ALREADY_EXISTS->Authenticator::USER_ALREADY_EXISTEDAuthenticator::EXPIRED_KEY->Authenticator::KEY_HAD_EXPIREDAuthenticator::UNEXPECTED_ACCOUNT_STATUS->Authenticator::ACCOUNT_STATUS_WAS_UNEXPECTED
- Siirretty
Authenticator->requestNewAccount|activateAccount|requestPasswordReset|finalizePasswordReset()->Authenticator->getAccountManager()->requestNewAccount|activateAccount|requestPasswordReset|finalizePasswordReset() Authenticator->login|logout()ei palauta mitään aikaisemmanbool:n sijaan- Authenticator käyttää
PikeException::ERROR_EXCEPTIONvirhekoodiaAuthenticator::CRYPTO_FAILURE:n sijaan App->handleRequest($requestOrBaseUrl, $urlPath = null)->App->handleRequest($urlOrRequest = null, $baseUrl = null)Request->createFromGlobals($baseUrl, $urlPath = null)->Request->createFromGlobals($fullUrl = null, $baseUrl = null)
- Uudelleennimetty/siirretty:
- Poistettu
TestUtils\MutedResponseTestUtils\HttpTestUtils->createMockResponse()TestUtils\HttpTestUtils->createBodyCapturingMockResponse()
0.7.0
- Lisätty
- \Pike\Auth\Crypto->hash()
- \Pike\Request->getQueryVar()
- \Pike\TestUtils\TestUtils->verifyResponseMetaEquals()
- \Pike\TestUtils\MutedSpyingResponse->getActualHeader(s?)()
- Muuttunut
- $ctx->auth käyttää nyt automaattisesti
\Pike\Auth\Internal\DefaultRememberMe-toiminnallisuutta - $ctx->authin käyttämä
\Pike\Auth\Internal\DefaultUserRepositoryvaatii nyt kentätloginId,loginIdValidatorHash, jaloginData(ks. tests/testSuiteDbSchema.mariadb.sql) - $ctx->auth kirjoittaa nyt automaattisesti maybeLoggedInUserRole -cookien
- $ctx->auth käyttää nyt automaattisesti