Bludevon logoBakslash logo

PHP wasn’t

supposed to

do that

Félix · Bludevon × Bakslash · bludevon.com/symfonycon-warsaw-2026

SymfonyCon Warsaw 2026

“

The website is great.

Now we need a mobile app.

SymfonyCon Warsaw 2026

github.com/feymo

“

Dad, websites are

for dinosaurs.

SymfonyCon Warsaw 2026

github.com/feymo

A thick vertical line splits the screen: web on the left, mobile on the right

Websites:

PHP

Mobile:

something

else

SymfonyCon Warsaw 2026

github.com/feymo

PHP wasn’t supposed

to be object-oriented

SymfonyCon Warsaw 2026

github.com/feymo

PHP wasn’t supposed

to be fast

SymfonyCon Warsaw 2026

github.com/feymo

PHP wasn’t supposed

to still be here

SymfonyCon Warsaw 2026

github.com/feymo

The line, straight and thick

PHP wasn’t supposed

to do that

SymfonyCon Warsaw 2026

github.com/feymo

Félix · Symfony developer ·

bludevon.com/symfonycon-warsaw-2026

SymfonyCon Warsaw 2026

github.com/feymo

The line vibrates behind the words

New stack

SymfonyCon Warsaw 2026

github.com/feymo

The line vibrates behind the words

New hires

SymfonyCon Warsaw 2026

github.com/feymo

The line vibrates behind the words

New lines in a README

nobody will read

SymfonyCon Warsaw 2026

github.com/feymo

The line vibrates behind the words

Two codebases.

Six months.

arrow-left
arrow-rightSymfonyCon Warsaw 2026

github.com/feymo

Same product.

Two teams.

Two truths.

SymfonyCon Warsaw 2026

github.com/feymo

The line starts to bend

What if we

moved

the line?

SymfonyCon Warsaw 2026

github.com/feymo

Your Symfony app talks HTTP both ways with a native shell on the phone

Your

Symfony app

HTTP

Native

shell

SymfonyCon Warsaw 2026

github.com/feymo

composer require

symfony/ux-native

SymfonyCon Warsaw 2026

github.com/feymo

ellipse

DEMO

Your app, on a phone

SymfonyCon Warsaw 2026

github.com/feymo

SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable
The line, clearly bent

PHP wasn’t supposed

to do that

SymfonyCon Warsaw 2026

github.com/feymo

ellipse

DEMO

One template.

Two surfaces.

SymfonyCon Warsaw 2026

github.com/feymo

ux_is_native()

SymfonyCon Warsaw 2026

github.com/feymo

templates/base.html.twig

<body>

{{ include('_partials/_navbar.html.twig') }}

{% block body %}{% endblock %}

</body>

SymfonyCon Warsaw 2026

github.com/feymo

templates/base.html.twig

<body>

{% if not ux_is_native() %}

{{ include('_partials/_navbar.html.twig') }}

{% endif %}

{% block body %}{% endblock %}

</body>

SymfonyCon Warsaw 2026

github.com/feymo

SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable

symfony/ux-native · NativeListener (simplified)

GET /expenses

User-Agent: … Hotwire Native iOS …

// on every request:

$ua = $request->headers->get('User-Agent', '');

$request->attributes->set('_ux_is_native',

str_contains($ua, 'Hotwire Native'));

{# ux_is_native() just reads it #}

SymfonyCon Warsaw 2026

github.com/feymo

One URL.

Two different pages.

Mind your HTTP cache.

SymfonyCon Warsaw 2026

github.com/feymo

src/Native/AppNativeConfiguration.php

#[AsNativeConfiguration('/config/ios_v1.json')]

public function iosV1(): Configuration

{

return new Configuration(rules: [

new Rule(['.*'], ['context' => 'default']),

new Rule(['/archives$'], ['context' => 'modal']),

]);

}

SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable
SymfonyCon Warsaw 2026

github.com/feymo

A bridge starts to take shape over the bent lineellipse

DEMO

Let’s build

the bridge

SymfonyCon Warsaw 2026

github.com/feymo

bin/console

make:native-bridge-controller

SymfonyCon Warsaw 2026

github.com/feymo

assets/controllers/bridge/button_controller.js

import { BridgeComponent }

from '@hotwired/hotwire-native-bridge';

export default class extends BridgeComponent {

static component = 'button';

}

SymfonyCon Warsaw 2026

github.com/feymo

assets/controllers/bridge/button_controller.js

connect() {

super.connect();

const title = this.bridgeElement.title;

const image = this.bridgeElement

.bridgeAttribute('ios-image');

this.send('connect', { title, image }, () => {

this.element.click();

});

}

SymfonyCon Warsaw 2026

github.com/feymo

templates/expense/index.html.twig

<a href="{{ path('app_expense_new') }}"

data-controller="bridge--button"

data-bridge-title="New expense"

data-bridge-ios-image="plus">

<span>New expense</span>

</a>

SymfonyCon Warsaw 2026

github.com/feymo

native/ios/Remit/Bridge/ButtonComponent.swift

36 lines

final class ButtonComponent: BridgeComponent {

override class var name: String { "button" }

override func onReceive(message: Message) {

…

let action = UIAction { [unowned self] _ in

reply(to: "connect")

}

…

SymfonyCon Warsaw 2026

github.com/feymo

SymfonyCon Warsaw 2026

github.com/feymo

button_controller.js ↔ ButtonComponent.swift

YOUR SYMFONY APP

THE NATIVE SHELL

Twig asks for a button

data-controller="bridge--button"

SymfonyCon Warsaw 2026

github.com/feymo

button_controller.js ↔ ButtonComponent.swift

YOUR SYMFONY APP

THE NATIVE SHELL

Twig asks for a button

data-controller="bridge--button"

"connect" · { title, image }

SymfonyCon Warsaw 2026

github.com/feymo

button_controller.js ↔ ButtonComponent.swift

YOUR SYMFONY APP

THE NATIVE SHELL

Twig asks for a button

data-controller="bridge--button"

"connect" · { title, image }

Swift draws it

UIBarButtonItem, in the title bar

SymfonyCon Warsaw 2026

github.com/feymo

button_controller.js ↔ ButtonComponent.swift

YOUR SYMFONY APP

THE NATIVE SHELL

Twig asks for a button

data-controller="bridge--button"

"connect" · { title, image }

Swift draws it

UIBarButtonItem, in the title bar

tap → reply(to: "connect")

SymfonyCon Warsaw 2026

github.com/feymo

button_controller.js ↔ ButtonComponent.swift

YOUR SYMFONY APP

THE NATIVE SHELL

Twig asks for a button

data-controller="bridge--button"

"connect" · { title, image }

Swift draws it

UIBarButtonItem, in the title bar

tap → reply(to: "connect")

A plain link click

this.element.click() → a Turbo visit

SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable
A finished bridge spans the line

PHP wasn’t supposed

to do that

SymfonyCon Warsaw 2026

github.com/feymo

ellipse

DEMO

And also…

SymfonyCon Warsaw 2026

github.com/feymo

SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable
SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable
SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable
SymfonyCon Warsaw 2026

github.com/feymo

Video unavailable

I did not update

your app.

SymfonyCon Warsaw 2026

github.com/feymo

I did not update

your app.

I updated a website.

SymfonyCon Warsaw 2026

github.com/feymo

You’ve had a question

for fifteen minutes.

SymfonyCon Warsaw 2026

github.com/feymo

Isn’t this just

a webview?

SymfonyCon Warsaw 2026

github.com/feymo

Will Apple

reject it?

SymfonyCon Warsaw 2026

github.com/feymo

How much Swift

will I write?

SymfonyCon Warsaw 2026

github.com/feymo

What about

login?

SymfonyCon Warsaw 2026

github.com/feymo

Does it work

offline?

SymfonyCon Warsaw 2026

github.com/feymo

Push

notifications?

SymfonyCon Warsaw 2026

github.com/feymo

Is it

production-ready?

SymfonyCon Warsaw 2026

github.com/feymo

Is it

production-ready?

Experimental.

SymfonyCon Warsaw 2026

github.com/feymo

Screens of your own data?

This is the

right answer.

SymfonyCon Warsaw 2026

github.com/feymo

Twig Components

→ Live Components

→ …

SymfonyCon Warsaw 2026

github.com/feymo

The surprising part is

that it feels obvious.

SymfonyCon Warsaw 2026

github.com/feymo

The line fades away

PHP wasn’t supposed

to do that

SymfonyCon Warsaw 2026

github.com/feymo

PHP wasn’t supposed

to do that

And now it just does.

SymfonyCon Warsaw 2026

github.com/feymo

No PHP developer was forced

to learn Swift during

the making of this talk.

Mildly exposed, yes.

SymfonyCon Warsaw 2026

github.com/feymo

Bludevon logoBakslash logo

bludevon.com/

symfonycon-warsaw-2026

Félix

QR code: bludevon.com/symfonycon-warsaw-2026SymfonyCon Warsaw 2026