Skip to content

Commit 666a962

Browse files
author
flow-php
committed
1 parent d857627 commit 666a962

File tree

67 files changed

+396
-394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+396
-394
lines changed

changelog/index.html

Lines changed: 130 additions & 128 deletions
Large diffs are not rendered by default.

documentation/adrs/extension-points/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>Extension Points</h1>
382+
<h1><a id="flow-php-extension-points" href="#content-extension-points" class="mr-2" aria-hidden="true" title="Permalink">#</a>Extension Points</h1>
383383
<p>Proposed by: <a rel="noopener noreferrer" target="_blank" href="https://github.com/norberttech">@norberttech</a><br />
384384
Date: 2025-01-09</p>
385-
<h2>Context</h2>
385+
<h2><a id="flow-php-context" href="#content-context" class="mr-2" aria-hidden="true" title="Permalink">#</a>Context</h2>
386386
<hr />
387387
<p>Flow is a framework, and as all frameworks, it should provide extension points for developers to hook into the framework and extend its functionality.</p>
388388
<p>How to find an extension point?</p>
@@ -399,7 +399,7 @@ <h2>Context</h2>
399399
<p>Why? Because nothing prevents developers from extending those classes and injecting
400400
their custom version into the DataFrame.</p>
401401
<p>Those extension points can't be covered by our backward compatibility policy.</p>
402-
<h2>Decision</h2>
402+
<h2><a id="flow-php-decision" href="#content-decision" class="mr-2" aria-hidden="true" title="Permalink">#</a>Decision</h2>
403403
<hr />
404404
<p><strong>Closed by default</strong></p>
405405
<p>All classes should be marked as <code>final</code> and whenever we need to expose an extension point,
@@ -413,7 +413,7 @@ <h2>Decision</h2>
413413
but we do not guarantee backward compatibility for those cases and everyone should
414414
do it at their own risk. As a Flow PHP maintainers, we also reserve the right to
415415
not provide any help or support for those cases.</p>
416-
<h2>Pros &amp; Cons</h2>
416+
<h2><a id="flow-php-pros--cons" href="#content-pros--cons" class="mr-2" aria-hidden="true" title="Permalink">#</a>Pros &amp; Cons</h2>
417417
<hr />
418418
<ul>
419419
<li>zero risk of breaking accidentally backward compatibility promise</li>
@@ -422,14 +422,14 @@ <h2>Pros &amp; Cons</h2>
422422
<li>easier to find an actual extension points</li>
423423
<li>impossible to mock classes that aren’t marked as <code>final</code> in tests (which is a good thing, users shouldn’t mock Flow classes in their test suites)</li>
424424
</ul>
425-
<h2>Alternatives Considered (optional)</h2>
425+
<h2><a id="flow-php-alternatives-considered-optional" href="#content-alternatives-considered-optional" class="mr-2" aria-hidden="true" title="Permalink">#</a>Alternatives Considered (optional)</h2>
426426
<hr />
427427
<p>Alternatively we could take similar approach to Symfony and mark classes as <code>final</code>
428428
<a rel="noopener noreferrer" target="_blank" href="https://github.com/symfony/symfony/issues/15233#issuecomment-1566682054">when it makes sense</a>
429429
but this approach is too easy to get abused.</p>
430430
<p>Plus, changing non-final class into a final one is much bigger BC break
431431
then the other way around.</p>
432-
<h2>Links and References (optional)</h2>
432+
<h2><a id="flow-php-links-and-references-optional" href="#content-links-and-references-optional" class="mr-2" aria-hidden="true" title="Permalink">#</a>Links and References (optional)</h2>
433433
<hr />
434434
<ul>
435435
<li><a rel="noopener noreferrer" target="_blank" href="https://ocramius.github.io/blog/when-to-declare-classes-final/">When to declare classes final</a></li>

documentation/adrs/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>Architecture Decision Record</h1>
383-
<h1>What are ADRs?</h1>
382+
<h1><a id="flow-php-architecture-decision-record" href="#content-architecture-decision-record" class="mr-2" aria-hidden="true" title="Permalink">#</a>Architecture Decision Record</h1>
383+
<h1><a id="flow-php-what-are-adrs" href="#content-what-are-adrs" class="mr-2" aria-hidden="true" title="Permalink">#</a>What are ADRs?</h1>
384384
<p>Architecture Decision Records (ADRs) are structured documents that capture significant architectural decisions made during the development of this project.</p>
385385
<p>Each ADR explains:</p>
386386
<ul>
@@ -389,7 +389,7 @@ <h1>What are ADRs?</h1>
389389
<li><strong>The consequences</strong>: The impact of the decision, both positive and negative.</li>
390390
</ul>
391391
<p>ADRs act as a single source of truth for important design and architectural choices, ensuring that everyone involved in the project has a shared understanding of why things are the way they are.</p>
392-
<h2>How to Use ADRs in This Project</h2>
392+
<h2><a id="flow-php-how-to-use-adrs-in-this-project" href="#content-how-to-use-adrs-in-this-project" class="mr-2" aria-hidden="true" title="Permalink">#</a>How to Use ADRs in This Project</h2>
393393
<p><strong>Follow Existing ADRs</strong>: ADRs are mandatory to follow unless explicitly overridden by a new ADR. This ensures consistency in decision-making across the project.</p>
394394
<blockquote>
395395
<p>Whenever ADR is merged into the main branch, it is considered accepted and must be followed by all contributors.</p>
@@ -401,14 +401,14 @@ <h2>How to Use ADRs in This Project</h2>
401401
<li>Submit the ADR via a pull request and engage in a discussion with maintainers and contributors.</li>
402402
<li><strong>Document Decisions Transparently</strong>: All significant decisions must be documented. This includes not only what was decided but also the alternatives that were considered and why they were rejected.</li>
403403
</ul>
404-
<h2>Index of ADRs</h2>
405-
<h3><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/pulls?q=is%3Apr+is%3Aclosed+is%3Amerged+label%3AAD+">Accepted AD</a></h3>
404+
<h2><a id="flow-php-index-of-adrs" href="#content-index-of-adrs" class="mr-2" aria-hidden="true" title="Permalink">#</a>Index of ADRs</h2>
405+
<h3><a id="flow-php-accepted-ad" href="#content-accepted-ad" class="mr-2" aria-hidden="true" title="Permalink">#</a><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/pulls?q=is%3Apr+is%3Aclosed+is%3Amerged+label%3AAD+">Accepted AD</a></h3>
406406
<ul>
407407
<li><a href="/documentation/adrs/static-analysis-baseline">2025-01-07: Static Analysis Baseline</a></li>
408408
<li><a href="/documentation/adrs/extension-points">2025-01-09: Extension Points</a></li>
409409
</ul>
410-
<h3><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/pulls?q=is%3Apr+is%3Aopen+label%3AAD+">Proposed AD</a></h3>
411-
<h3><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/pulls?q=is%3Apr+is%3Aclosed+is%3Aunmerged+label%3AAD+">Rejected AD</a></h3>
410+
<h3><a id="flow-php-proposed-ad" href="#content-proposed-ad" class="mr-2" aria-hidden="true" title="Permalink">#</a><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/pulls?q=is%3Apr+is%3Aopen+label%3AAD+">Proposed AD</a></h3>
411+
<h3><a id="flow-php-rejected-ad" href="#content-rejected-ad" class="mr-2" aria-hidden="true" title="Permalink">#</a><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/pulls?q=is%3Apr+is%3Aclosed+is%3Aunmerged+label%3AAD+">Rejected AD</a></h3>
412412

413413

414414
<hr class="!mt-8 !mb-8"/>

documentation/adrs/static-analysis-baseline/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>Static Analysis Baseline</h1>
382+
<h1><a id="flow-php-static-analysis-baseline" href="#content-static-analysis-baseline" class="mr-2" aria-hidden="true" title="Permalink">#</a>Static Analysis Baseline</h1>
383383
<p>Proposed by: <a rel="noopener noreferrer" target="_blank" href="https://github.com/norberttech">@norberttech</a>
384384
Date: 2025-01-07</p>
385-
<h2>Context</h2>
385+
<h2><a id="flow-php-context" href="#content-context" class="mr-2" aria-hidden="true" title="Permalink">#</a>Context</h2>
386386
<hr />
387387
<p>After removal of Psalm and making PHPStan the main static analysis tool,
388388
we looked again into hardening the static analysis configuration.</p>
@@ -401,21 +401,21 @@ <h2>Context</h2>
401401
Whenever the code is changed, the baseline needs to be updated, which is an opportunity to also suppress new errors.<br />
402402
This means that maintainers would not only need to go through the code changes
403403
but also through the baseline file, which is not the best use of their very limited and valuable time anyway.</p>
404-
<h2>Decision</h2>
404+
<h2><a id="flow-php-decision" href="#content-decision" class="mr-2" aria-hidden="true" title="Permalink">#</a>Decision</h2>
405405
<hr />
406406
<p>We <strong>must not</strong> use baseline for static analysis.
407407
Instead, errors can be suppressed by annotations in the codebase or globally
408408
in the static analysis tool configuration.</p>
409409
<p>Error suppression should be considered an edge case and should be used sparingly.
410410
Core contributors should review and approve all suppression annotations.</p>
411-
<h2>Pros &amp; Cons</h2>
411+
<h2><a id="flow-php-pros--cons" href="#content-pros--cons" class="mr-2" aria-hidden="true" title="Permalink">#</a>Pros &amp; Cons</h2>
412412
<hr />
413413
<ul>
414414
<li>The codebase will be cleaner and more maintainable.</li>
415415
<li>More predictable and stricter types.</li>
416416
<li>Less maintenance overhead related to managing the baseline.</li>
417417
</ul>
418-
<h2>Links and References</h2>
418+
<h2><a id="flow-php-links-and-references" href="#content-links-and-references" class="mr-2" aria-hidden="true" title="Permalink">#</a>Links and References</h2>
419419
<hr />
420420
<ul>
421421
<li><a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/flow/issues/1329">#1329</a></li>

documentation/adrs/template/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,39 +379,39 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>[Decision Title]</h1>
382+
<h1><a id="flow-php-decision-title" href="#content-decision-title" class="mr-2" aria-hidden="true" title="Permalink">#</a>[Decision Title]</h1>
383383
<p>Proposed by: @author_github_username
384384
Date: YYYY-MM-DD</p>
385-
<h2>Context</h2>
385+
<h2><a id="flow-php-context" href="#content-context" class="mr-2" aria-hidden="true" title="Permalink">#</a>Context</h2>
386386
<hr />
387387
<p><code>// Todo: Describe context here</code></p>
388388
<blockquote>
389389
<p>What is the current situation or issue that needs addressing?<br />
390390
Why is this decision necessary?<br />
391391
Any relevant background or constraints.</p>
392392
</blockquote>
393-
<h2>Decision</h2>
393+
<h2><a id="flow-php-decision" href="#content-decision" class="mr-2" aria-hidden="true" title="Permalink">#</a>Decision</h2>
394394
<hr />
395395
<p><code>// Todo: Describe the decision here</code></p>
396396
<blockquote>
397397
<p>What is the decision being made?<br />
398398
State it clearly and concisely.</p>
399399
</blockquote>
400-
<h2>Pros &amp; Cons</h2>
400+
<h2><a id="flow-php-pros--cons" href="#content-pros--cons" class="mr-2" aria-hidden="true" title="Permalink">#</a>Pros &amp; Cons</h2>
401401
<hr />
402402
<p><code>// Todo: Describe the consequences here</code></p>
403403
<blockquote>
404404
<p>What are the outcomes or implications of this decision?<br />
405405
Highlight both positive and negative impacts.</p>
406406
</blockquote>
407-
<h2>Alternatives Considered (optional)</h2>
407+
<h2><a id="flow-php-alternatives-considered-optional" href="#content-alternatives-considered-optional" class="mr-2" aria-hidden="true" title="Permalink">#</a>Alternatives Considered (optional)</h2>
408408
<hr />
409409
<p><code>// Todo: Describe the alternatives here</code></p>
410410
<blockquote>
411411
<p>Briefly describe any alternatives that were considered.<br />
412412
Why were they not chosen?</p>
413413
</blockquote>
414-
<h2>Links and References (optional)</h2>
414+
<h2><a id="flow-php-links-and-references-optional" href="#content-links-and-references-optional" class="mr-2" aria-hidden="true" title="Permalink">#</a>Links and References (optional)</h2>
415415
<hr />
416416
<blockquote>
417417
<p>Include any supporting documents, links to issues, pull requests, or discussions that provide context.</p>

documentation/components/adapters/avro/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>Avro Adapter</h1>
382+
<h1><a id="flow-php-avro-adapter" href="#content-avro-adapter" class="mr-2" aria-hidden="true" title="Permalink">#</a>Avro Adapter</h1>
383383
<ul>
384384
<li><a href="../../introduction">⬅️️ Back</a></li>
385385
</ul>

documentation/components/adapters/chartjs/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>Chart JS Adapter</h1>
382+
<h1><a id="flow-php-chart-js-adapter" href="#content-chart-js-adapter" class="mr-2" aria-hidden="true" title="Permalink">#</a>Chart JS Adapter</h1>
383383
<ul>
384384
<li><a href="../../introduction">⬅️️ Back</a></li>
385385
</ul>
@@ -394,10 +394,10 @@ <h1>Chart JS Adapter</h1>
394394
data visualization in large-scale and data-intensive environments. With Flow PHP's Adapter ChartJS, managing chart
395395
rendering and interaction within your ETL workflows becomes a more refined and efficient endeavor, harmoniously aligning
396396
with the robust and adaptable framework of the Flow PHP ecosystem.</p>
397-
<h2>Installation</h2>
397+
<h2><a id="flow-php-installation" href="#content-installation" class="mr-2" aria-hidden="true" title="Permalink">#</a>Installation</h2>
398398
<pre class="language-plain"><code class="language-plain" data-controller="syntax-highlight">composer require flow-php/etl-adapter-chartjs
399399
</code></pre>
400-
<h2>Usage</h2>
400+
<h2><a id="flow-php-usage" href="#content-usage" class="mr-2" aria-hidden="true" title="Permalink">#</a>Usage</h2>
401401
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">&lt;?php
402402

403403
use function Flow\ETL\Adapter\ChartJS\{bar_chart, line_chart, pie_chart, to_chartjs_file, to_chartjs_var};

documentation/components/adapters/csv/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>CSV Adapter</h1>
382+
<h1><a id="flow-php-csv-adapter" href="#content-csv-adapter" class="mr-2" aria-hidden="true" title="Permalink">#</a>CSV Adapter</h1>
383383
<ul>
384384
<li><a href="../../introduction">⬅️️ Back</a></li>
385385
</ul>
@@ -393,17 +393,17 @@ <h1>CSV Adapter</h1>
393393
making it a prime choice for developers dealing with CSV data in large-scale and data-intensive projects. With Flow
394394
PHP's Adapter CSV, managing CSV data within your ETL workflows becomes a more simplified and efficient task, perfectly
395395
aligning with the robust and adaptable framework of the Flow PHP ecosystem.</p>
396-
<h2>Installation</h2>
396+
<h2><a id="flow-php-installation" href="#content-installation" class="mr-2" aria-hidden="true" title="Permalink">#</a>Installation</h2>
397397
<pre class="language-plain"><code class="language-plain" data-controller="syntax-highlight">composer require flow-php/etl-adapter-csv
398398
</code></pre>
399-
<h2>Extractor</h2>
399+
<h2><a id="flow-php-extractor" href="#content-extractor" class="mr-2" aria-hidden="true" title="Permalink">#</a>Extractor</h2>
400400
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">&lt;?php
401401

402402
$rows = data_frame()
403403
-&gt;read(from_csv($path))
404404
-&gt;fetch();
405405
</code></pre>
406-
<h2>Loader</h2>
406+
<h2><a id="flow-php-loader" href="#content-loader" class="mr-2" aria-hidden="true" title="Permalink">#</a>Loader</h2>
407407
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">&lt;?php
408408

409409
data_frame()

documentation/components/adapters/doctrine/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h2>Bridges</h2>
379379
</a>
380380
</div>
381381

382-
<h1>ETL Adapter: Doctrine</h1>
382+
<h1><a id="flow-php-etl-adapter-doctrine" href="#content-etl-adapter-doctrine" class="mr-2" aria-hidden="true" title="Permalink">#</a>ETL Adapter: Doctrine</h1>
383383
<ul>
384384
<li><a href="../../introduction">⬅️️ Back</a></li>
385385
</ul>
@@ -394,12 +394,12 @@ <h1>ETL Adapter: Doctrine</h1>
394394
operations in large-scale and data-intensive environments. With Flow PHP's Adapter Doctrine, managing database
395395
interactions within your ETL workflows becomes a more simplified and efficient endeavor, perfectly aligning with the
396396
robust and adaptable nature of the Flow PHP ecosystem.</p>
397-
<h2>Installation</h2>
397+
<h2><a id="flow-php-installation" href="#content-installation" class="mr-2" aria-hidden="true" title="Permalink">#</a>Installation</h2>
398398
<pre class="language-plain"><code class="language-plain" data-controller="syntax-highlight">composer require flow-php/etl-adapter-doctrine
399399
</code></pre>
400-
<h2>Description</h2>
400+
<h2><a id="flow-php-description" href="#content-description" class="mr-2" aria-hidden="true" title="Permalink">#</a>Description</h2>
401401
<p>Adapter for <a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/etl">ETL</a> using bulk operations from <a rel="noopener noreferrer" target="_blank" href="https://github.com/flow-php/doctrine-dbal-bulk">Doctrine Dbal Bulk</a>.</p>
402-
<h2>Loader - DbalLoader</h2>
402+
<h2><a id="flow-php-loader---dballoader" href="#content-loader---dballoader" class="mr-2" aria-hidden="true" title="Permalink">#</a>Loader - DbalLoader</h2>
403403
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">data_frame()
404404
-&gt;read(from_())
405405
-&gt;write(new DbalLoader('your-table-name', $bulkSize = 100, ['url' =&gt; \getenv('PGSQL_DATABASE_URL')], ['skip_conflicts' =&gt; true]))
@@ -413,21 +413,21 @@ <h2>Loader - DbalLoader</h2>
413413
</ul>
414414
<p>The <code>bulkSize</code> means how many rows you want to push to a database in a single <code>INSERT</code> query. Each extracted rows set
415415
is going to be split before inserting data into the database.</p>
416-
<h2>Extractor - DbalQuery</h2>
416+
<h2><a id="flow-php-extractor---dbalquery" href="#content-extractor---dbalquery" class="mr-2" aria-hidden="true" title="Permalink">#</a>Extractor - DbalQuery</h2>
417417
<p>This simple but powerful extractor let you extract data from a single or multiple parametrized queries.</p>
418-
<h3>Single Query</h3>
418+
<h3><a id="flow-php-single-query" href="#content-single-query" class="mr-2" aria-hidden="true" title="Permalink">#</a>Single Query</h3>
419419
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">data_frame()
420420
-&gt;read(DbalQueryExtractor::singleQuery($connection, "SELECT * FROM {$table} ORDER BY id"))
421421
-&gt;write(to_())
422422
-&gt;run()
423423
</code></pre>
424-
<h3>Single Parametrized Query</h3>
424+
<h3><a id="flow-php-single-parametrized-query" href="#content-single-parametrized-query" class="mr-2" aria-hidden="true" title="Permalink">#</a>Single Parametrized Query</h3>
425425
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">data_frame()
426426
-&gt;read(DbalQueryExtractor::singleQuery($connection, "SELECT * FROM {$table} WHERE id = :id", ['id' =&gt; 1]))
427427
-&gt;write(to_())
428428
-&gt;run()
429429
</code></pre>
430-
<h3>Multiple Parametrized Query</h3>
430+
<h3><a id="flow-php-multiple-parametrized-query" href="#content-multiple-parametrized-query" class="mr-2" aria-hidden="true" title="Permalink">#</a>Multiple Parametrized Query</h3>
431431
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">data_frame()
432432
-&gt;read(
433433
new DbalQueryExtractor(
@@ -446,7 +446,7 @@ <h3>Multiple Parametrized Query</h3>
446446
-&gt;run()
447447
</code></pre>
448448
<p>In this case, query will be executed exactly five times, taking every time next entry of parameters from ParametersSet.</p>
449-
<h2>Schema Converter</h2>
449+
<h2><a id="flow-php-schema-converter" href="#content-schema-converter" class="mr-2" aria-hidden="true" title="Permalink">#</a>Schema Converter</h2>
450450
<p>With <code>to_dbal_schema_table()</code> function we can convert any Flow Schema (which represents a dataset)
451451
to Doctrine DBAL Schema Table.</p>
452452
<p>By providing metadata defined in <code>\Flow\ETL\Adapter\Doctrine\DbalMetadata</code> we can also add additional information to the schema,
@@ -510,7 +510,7 @@ <h2>Schema Converter</h2>
510510
]
511511
);
512512
</code></pre>
513-
<h3>Schema Converter - Types Map</h3>
513+
<h3><a id="flow-php-schema-converter---types-map" href="#content-schema-converter---types-map" class="mr-2" aria-hidden="true" title="Permalink">#</a>Schema Converter - Types Map</h3>
514514
<p>When types map is not provided, the default one will be used:</p>
515515
<pre class="language-php"><code class="language-php" data-controller="syntax-highlight">public const DEFAULT_TYPES = [
516516
StringType::class =&gt; \Doctrine\DBAL\Types\StringType::class,

0 commit comments

Comments
 (0)