-
-
Notifications
You must be signed in to change notification settings - Fork 53
feat(web/landing): add Flow PHP 0.41.0 release blog post #2492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added
BIN
+76 KB
web/landing/assets/images/blog/flow-php-release-0410/messenger_link.png
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 added
BIN
+66.2 KB
web/landing/assets/images/blog/flow-php-release-0410/profiler_migrations.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
BIN
+101 KB
web/landing/assets/images/blog/flow-php-release-0410/profiler_queries.png
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
web/landing/templates/blog/posts/2026-06-29/flow-php-release-0410/exporter_enabling.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
7 changes: 7 additions & 0 deletions
7
web/landing/templates/blog/posts/2026-06-29/flow-php-release-0410/messenger_linking.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
102 changes: 102 additions & 0 deletions
102
web/landing/templates/blog/posts/2026-06-29/flow-php-release-0410/post.html.twig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 %} |
2 changes: 2 additions & 0 deletions
2
web/landing/templates/blog/posts/2026-06-29/flow-php-release-0410/runtime_mode.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| flow_telemetry: | ||
| runtime_mode: auto # auto|classic|worker |
30 changes: 30 additions & 0 deletions
30
web/landing/templates/blog/posts/2026-06-29/flow-php-release-0410/seal.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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