Skip to content

0.5.0

Choose a tag to compare

@SerafimArts SerafimArts released this 25 Apr 01:18
· 592 commits to master since this release
9c7c1c8
  • Drop unnecessary WebViewLoading and WebViewLoaded events (you can use WebViewNavigating, WebViewNavigated and WebViewDomReady instead).
  • Added WebViewRequest intention.
  • Drop middleware system and replace to events (intentions):
    before
$app = new Application(new ApplicationCreateInfo(
    schemes: [ 'https' ],
));

$pipeline = $app->webview->schemes->find('https')
    ?->append(new class implements MiddlewareInterface {
        public function handle(RequestInterface $request, HandlerInterface $handler): Response
        {
            return new Response('<h1>Hello from "' . $request->url . '"!</h1>');
        }
    });

$app->webview->url = 'https://hello.world/';

after

$app = new Application(new ApplicationCreateInfo(
    schemes: [ 'https' ],
));

$app->events->addEventListener(WebViewRequest::class, function (WebViewRequest $e) {
    $e->response = new Response('<h1>Hello from "' . $request->url . '"!</h1>');
});

$app->webview->url = 'https://hello.world/';
  • Added Headers::first(), Headers::all() and Header::contains() methods

Full Changelog: 0.4.0...0.5.0