

PHP wasn’t
supposed to
do that
Félix · Bludevon × Bakslash · bludevon.com/symfonycon-warsaw-2026

“
The website is great.
Now we need a mobile app.

github.com/feymo
“
Dad, websites are
for dinosaurs.

github.com/feymo

Websites:
PHP
Mobile:
something
else

github.com/feymo
PHP wasn’t supposed
to be object-oriented

github.com/feymo
PHP wasn’t supposed
to be fast

github.com/feymo
PHP wasn’t supposed
to still be here

github.com/feymo

PHP wasn’t supposed
to do that

github.com/feymo
Félix · Symfony developer ·
bludevon.com/symfonycon-warsaw-2026

github.com/feymo

New stack

github.com/feymo

New hires

github.com/feymo

New lines in a README
nobody will read

github.com/feymo

Two codebases.
Six months.



github.com/feymo
Same product.
Two teams.
Two truths.

github.com/feymo

What if we
moved
the line?

github.com/feymo

Your
Symfony app
HTTP
Native
shell

github.com/feymo
composer require
symfony/ux-native

github.com/feymo

DEMO
Your app, on a phone

github.com/feymo

github.com/feymo

PHP wasn’t supposed
to do that

github.com/feymo

DEMO
One template.
Two surfaces.

github.com/feymo
ux_is_native()

github.com/feymo
templates/base.html.twig
<body>
{{ include('_partials/_navbar.html.twig') }}
{% block body %}{% endblock %}
</body>

github.com/feymo
templates/base.html.twig
<body>
{% if not ux_is_native() %}
{{ include('_partials/_navbar.html.twig') }}
{% endif %}
{% block body %}{% endblock %}
</body>

github.com/feymo

github.com/feymo
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 #}

github.com/feymo
One URL.
Two different pages.
Mind your HTTP cache.

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']),
]);
}

github.com/feymo

github.com/feymo


DEMO
Let’s build
the bridge

github.com/feymo
bin/console
make:native-bridge-controller

github.com/feymo
assets/controllers/bridge/button_controller.js
import { BridgeComponent }
from '@hotwired/hotwire-native-bridge';
export default class extends BridgeComponent {
static component = 'button';
}

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();
});
}

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>

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")
}
…

github.com/feymo

github.com/feymo
button_controller.js ↔ ButtonComponent.swift
YOUR SYMFONY APP
THE NATIVE SHELL
Twig asks for a button
data-controller="bridge--button"

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 }

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

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")

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

github.com/feymo

PHP wasn’t supposed
to do that

github.com/feymo

DEMO
And also…

github.com/feymo

github.com/feymo

github.com/feymo

github.com/feymo

github.com/feymo
I did not update
your app.

github.com/feymo
I did not update
your app.
I updated a website.

github.com/feymo
You’ve had a question
for fifteen minutes.

github.com/feymo
Isn’t this just
a webview?

github.com/feymo
Will Apple
reject it?

github.com/feymo
How much Swift
will I write?

github.com/feymo
What about
login?

github.com/feymo
Does it work
offline?

github.com/feymo
Push
notifications?

github.com/feymo
Is it
production-ready?

github.com/feymo
Is it
production-ready?
Experimental.

github.com/feymo
Screens of your own data?
This is the
right answer.

github.com/feymo
Twig Components
→ Live Components
→ …

github.com/feymo
The surprising part is
that it feels obvious.

github.com/feymo

PHP wasn’t supposed
to do that

github.com/feymo
PHP wasn’t supposed
to do that
And now it just does.

github.com/feymo
No PHP developer was forced
to learn Swift during
the making of this talk.
Mildly exposed, yes.

github.com/feymo


bludevon.com/
symfonycon-warsaw-2026
Félix


On a phone: tap or swipe to move between slides. The demos are muted screen recordings.