Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ phar:
wasm: && phar
cd wasm && ./build.sh

# Idempotent — both tools recompress losslessly, so it is safe to re-run over the whole folder.
# Requires nix-shell (oxipng/jpegoptim).
# Losslessly optimize landing-site images in place: oxipng for PNG, jpegoptim for JPEG.
optimize-images:
#!/usr/bin/env bash
set -euo pipefail
images_dir="web/landing/assets/images"
oxipng --opt max --strip safe --recursive "$images_dir"
while IFS= read -r -d '' f; do
jpegoptim --strip-all --all-progressive "$f"
done < <(find "$images_dir" -type f \( -iname '*.jpg' -o -iname '*.jpeg' \) -print0)

# Build the Docker image.
docker:
docker buildx build -t flow-php/flow:latest . --progress=plain --load
Expand Down
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pkgs.mkShell {
pkgs.actionlint
pkgs.zizmor
pkgs.just
pkgs.oxipng
pkgs.jpegoptim
]
++ pkgs.lib.optional with-blackfire pkgs.blackfire
++ pkgs.lib.optionals with-wasm [
Expand Down
136 changes: 128 additions & 8 deletions web/landing/assets/codemirror/completions/dsl.js

Large diffs are not rendered by default.

Binary file modified web/landing/assets/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/landing/assets/images/blog/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/sponsors/1Password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/sponsors/cloudflare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/sponsors/datadog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/landing/assets/images/sponsors/tailscale.png

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the optimisation was correct as ie here size gone up by 7KB

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions web/landing/assets/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ code {
font-size: 0.9em;
}

/* Blog post prose. Wraps full-width with comfortable reading measure. */
/* Blog post prose. Wraps full-width to match the site container. */
#blog-post {
@apply pb-5 px-4 sm:px-6 lg:px-8 mx-auto max-w-3xl text-slate-700 dark:text-white/85;
@apply pb-5 px-4 sm:px-6 lg:px-8 mx-auto max-w-screen-2xl text-slate-700 dark:text-white/85;
}

#blog-post a {
Expand Down Expand Up @@ -190,6 +190,18 @@ code {
@apply border-b border-slate-200 px-3 py-2 dark:border-white/10;
}

#blog-post img {
@apply max-w-full h-auto rounded-lg my-6 mx-auto;
}

#blog-post figure {
@apply my-8;
}

#blog-post figcaption {
@apply text-sm text-slate-500 text-center mt-2 dark:text-white/55;
}


#example-description h1 {
@apply font-bold text-2xl;
Expand Down
6 changes: 6 additions & 0 deletions web/landing/src/Flow/Website/Blog/Posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ final class Posts
'date' => '2025-03-16',
'slug' => 'flow-php-release-cycle',
],
[
'title' => 'Flow PHP - Release 0.41.0',
'description' => 'Summary of things changed in Flow PHP 0.41.0 release',
'date' => '2026-06-29',
'slug' => 'flow-php-release-0410',
],
];

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
flow_telemetry:
exporters:
otlp_exporter:
enabled: '%env(bool:OTEL_ENABLED)%' # off → discard exports; profiler still captures every signal
otlp:
transport:
type: curl
endpoint: '%env(OTEL_ENDPOINT)%'
encoding: protobuf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
flow_telemetry:
instrumentation:
messenger:
enabled: true
context_propagation: true # Propagate context across message boundaries
propagation_style: link # link|continue - How the consumer span relates to the producer span
link_to_worker: true # Link each message trace back to the messenger:consume worker span
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{% extends 'blog/post.html.twig' %}
{% block article %}
<article id="blog-post">
<h1>Flow PHP - Release 0.41.0</h1>
<hr/>
<p>
This is a first blog post about Flow Release, and 0.41.0 is bringing a lot of cool new features, mostly
around Telemetry and Symfony Integration.
</p>
<blockquote>
The plan is to write a blog post for each release, or at least try to.
</blockquote>

<h2>Symfony Telemetry Bundle</h2>
<hr/>
<p>
This is where most of our efforts were focused on, so lets start from the most exciting one.
</p>
<h3>Telemetry integration with Profiler</h3>
<figure>
<img src="{{ asset('images/blog/flow-php-release-0410/profiler_01.png') }}" alt="Symfony profiler showing Flow telemetry panel">
<img src="{{ asset('images/blog/flow-php-release-0410/profiler_02.png') }}" alt="Symfony profiler showing Flow telemetry panel">
<figcaption>Telemetry panel in the Symfony profiler</figcaption>
</figure>

<p>
This way during local development, we don't need to setup a full scale APM to quickly check if given part of
the system is correctly collecting telemetry signals.
</p>
<p>
Profiler integration is configurable on the bundle level, you can read more about it in <a href="/documentation/components/bridges/symfony-telemetry-bundle#web-profiler">documentation</a>.
</p>
<h3>Telemetry Worker Mode Support</h3>
<p>
Modern PHP systems are often deployed in the Worker mode, through runtimes like FrankenPHP or Swoole.
In order to support that, we introduced a <a href="https://github.com/flow-php/flow/blob/c2727605d2458ac7f0bffc76b60640803f0cfba3/src/lib/telemetry/src/Flow/Telemetry/Context/ResettableContextStorage.php" target="_blank">ResettableContextStorage</a> and a mechanism that can automatically detect if system is running in a worker mode.
</p>
<p>
<code>runtime_mode</code> can also be configured at symfony configuration level.
</p>
<pre><code class="language-yaml" {{ stimulus_controller('syntax_highlight') }}>{% apply escape %}{% include template_folder ~ '/runtime_mode.yaml' %}{% endapply %}</code></pre>

<h3>Messenger traces linking</h3>
<p>
Symfony Telemetry Bundle can now link traces that published message on the queue with message handling process (trace).
</p>
<figure>
<img src="{{ asset('images/blog/flow-php-release-0410/messenger_link.png') }}" alt="Link between symfony messenger traces">
<figcaption>Symfony Messenger traces linking</figcaption>
</figure>
<p>
As we can see on the screenshot above, trace representing processing <code>CreateOrderMessage</code>
is now linked into two other Traces.
</p>
<p>
The first one is a Worker trace (Flow Telemetry separates workers from handlers) and the second one is a
link to a Controller that published that <code>CreateOrderMessage</code> on the queue.
</p>
<p>
That behavior is also configurable at Symfony Bundle level.
</p>
<pre><code class="language-yaml" {{ stimulus_controller('syntax_highlight') }}>{% apply escape %}{% include template_folder ~ '/messenger_linking.yaml' %}{% endapply %}</code></pre>
<h3>Disable/Enable Exporters</h3>
<p>
Integrating Telemetry into existing systems can be really challenging task. It might be a good idea to start
in development environment or staging first, and only when everything is calibrated and tuned, enable it also
at production.
</p>
<p>
Now it can be achieved by a dedicated <code>enabled</code> option added to each export
</p>
<pre><code class="language-yaml" {{ stimulus_controller('syntax_highlight') }}>{% apply escape %}{% include template_folder ~ '/exporter_enabling.yaml' %}{% endapply %}</code></pre>
<h3>Symfony PostgreSQL Bundle - Profiler Integration</h3>
<p>
Similarly to Telemetry, PostgreSQL Bundle supports Symfony Profiler where we can see all queries and current migrations status.
</p>
<figure>
<img src="{{ asset('images/blog/flow-php-release-0410/profiler_migrations.png') }}" alt="Symfony Profiler - Migrations View">
<figcaption>Symfony Profiler - Migrations View</figcaption>
</figure>
<figure>
<img src="{{ asset('images/blog/flow-php-release-0410/profiler_queries.png') }}" alt="Symfony Profiler - Queries View">
<figcaption>Symfony Profiler - Queries View</figcaption>
</figure>
<h3>Integration with SEAL</h3>
<p>
<a href="https://php-cmsig.github.io/search/" target="_blank">SEAL - Search Engine Abstraction Layer</a> is now supported
by flow through dedicated <a href="https://github.com/flow-php/etl-adapter-seal" target="blank"><code>flow-php/etl-adapter-seal</code></a>
</p>
<p>
This adapter was delivered by <a href="https://github.com/MrHDOLEK">Aleksander</a>.
</p>
<p>
This opens a new set of features for Flow, making scalable indexing documents from various sources easier than ever.<br/>
Please look at the example of indexing a CSV document:
</p>
<pre><code class="language-php" {{ stimulus_controller('syntax_highlight') }}>{% apply escape %}{% include template_folder ~ '/seal.php' %}{% endapply %}</code></pre>
<p>
Those are just the most important additions to Flow PHP. For more details, check full at <a href="/changelog">Changelog</a>
</p>
</article>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
flow_telemetry:
runtime_mode: auto # auto|classic|worker
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

use CmsIg\Seal\Adapter\Elasticsearch\ElasticsearchAdapter;
use CmsIg\Seal\Engine;

use function Flow\ETL\Adapter\Seal\to_seal_schema;
use function Flow\ETL\DSL\{int_schema, schema, str_schema};
use function Flow\ETL\Adapter\Seal\to_seal_upsert;
use function Flow\ETL\Adapter\CSV\from_csv;
use function Flow\ETL\DSL\data_frame;

// @var \Elastic\Elasticsearch\Client $client
$client = require 'elastic_client.php';
$schema = to_seal_schema(
schema(
str_schema('id'),
str_schema('name'),
int_schema('age'),
),
index_name: 'users',
identifier: 'id',
);

$engine = new Engine(new ElasticsearchAdapter($client), $schema);
$engine->createIndex('users');

data_frame()
->read(from_csv(__DIR__ . '/users.csv'))
->write(to_seal_upsert($engine, 'users'))
->run();
4 changes: 2 additions & 2 deletions web/landing/templates/main/changelog.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
{%- block hero -%}{%- endblock -%}

{% block main %}
<section class="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8 mt-12 lg:mt-16">
<section class="mx-auto max-w-screen-2xl px-4 sm:px-6 lg:px-8 mt-12 lg:mt-16">
<span class="eyebrow">
<span class="h-1.5 w-1.5 rounded-full bg-orange-100"></span>
Releases
</span>
<h1 class="mt-3 text-4xl font-bold tracking-tight">Changelog</h1>
<p class="mt-3 muted">Every release of Flow PHP, in chronological order.</p>
</section>
<section id="changelog" class="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8 mt-8 mb-16">
<section id="changelog" class="mx-auto max-w-screen-2xl px-4 sm:px-6 lg:px-8 mt-8 mb-16">
{{ changelog_markdown|markdown_to_html }}
</section>
{% endblock %}
Loading