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
2 changes: 1 addition & 1 deletion src/App/src/Fixture/articles_cleaned.json
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@
"isObsolete": false,
"opengraph_img": "/opengraph/article/twitter-card-headless-v7.png",
"excerpt": "The Dotkernel Headless Platform has seen new releases for both API and Admin. The Admin codebase has received an overall facelift, as well as updates to retain compatibility with API v7.",
"tl_dr": "Dotkernel API v7 adds support for native UUID v7, PostgreSQL, PHP 8.5 (8.4 for Admin), database table prefixes, and improved database configuration, while replacing the binary data type for id columns with uuid.\nIt drops the Evolution pattern's Method Deprecation support and MySQL, since MySQL doesn't support the UUID data type.\nUUIDs are generated with the ramsey/uuid package, previously uuid-named table columns are now called id, and PostgreSQL or MariaDB v10.7+ is required for UUID support.",
"tl_dr": "Dotkernel API v7 adds support for native UUID v7, PostgreSQL, PHP 8.5, database table prefixes, and improved database configuration, while replacing the binary data type for id columns with uuid.\nIt drops the Evolution pattern's Method Deprecation support and MySQL, since MySQL doesn't support the UUID data type.\nUUIDs are generated with the ramsey/uuid package, previously uuid-named table columns are now called id, and PostgreSQL or MariaDB v11.4+ is required for UUID support.",
"tags": []
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{ "@type": "Question", "name": "What was the limitation of Dotkernel's old approach to columns like User->Status?", "acceptedAnswer": { "@type": "Answer", "text": "The old setup used a simple string type, so the value set couldn't be definitively enforced. A typo in a PHP value would still be accepted, and the database was independent of any values the PHP code allowed, so manually editing a value in the database would accept any string." } },
{ "@type": "Question", "name": "What was the one advantage of the old string-based setup?", "acceptedAnswer": { "@type": "Answer", "text": "It made it easy to add more values to the value set, though the article notes this ease also invites bugs in the execution." } },
{ "@type": "Question", "name": "What do you need to create to add a new custom enum type?", "acceptedAnswer": { "@type": "Answer", "text": "A PHP enum class (like UserStatusEnum) plus a DBAL type class extending AbstractEnumType, which must define a NAME constant and a getEnumClass() method; the new type is then registered under the types key in config/autoload/doctrine.global.php." } },
{ "@type": "Question", "name": "Does Types::ENUM still fall back to a string or integer database column?", "acceptedAnswer": { "@type": "Answer", "text": "The article notes that Doctrine still defaults to Types::STRING or Types::INTEGER for columns backed by a PHP enum, as this is considered the more portable and safer default; Types::ENUM is required if you want an actual enum column in MySQL/MariaDB." } },
{ "@type": "Question", "name": "Does Types::ENUM still fall back to a string or integer database column?", "acceptedAnswer": { "@type": "Answer", "text": "The article notes that Doctrine still defaults to Types::STRING or Types::INTEGER for columns backed by a PHP enum, as this is considered the more portable and safer default; Types::ENUM is required if you want an actual enum column in MariaDB/PostgreSQL." } },
{ "@type": "Question", "name": "What must happen when the value set of an enum changes under the new setup?", "acceptedAnswer": { "@type": "Answer", "text": "Any update to the value set must be made on both the PHP code and the database, since the new setup creates an explicit, enforced link between them." } }
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"@type": "FAQPage",
"@id": "{{ app.url ~ path('page::blog-resource', {categorySlug: article.category.slug, slug: article.slug}) }}#faq",
"mainEntity": [
{ "@type": "Question", "name": "What new features does Dotkernel API v7 introduce?", "acceptedAnswer": { "@type": "Answer", "text": "v7 adds support for UUID v7 using the native UUID data type, support for PostgreSQL, support for PHP 8.5 (API) and 8.4 (Admin), support for a database table prefix, improved database configuration, and replaces the binary data type for id (index) columns in favor of uuid." } },
{ "@type": "Question", "name": "What new features does Dotkernel API v7 introduce?", "acceptedAnswer": { "@type": "Answer", "text": "v7 adds support for UUID v7 using the native UUID data type, support for PostgreSQL, support for PHP 8.5, support for a database table prefix, improved database configuration, and replaces the binary data type for id (index) columns in favor of uuid." } },
{ "@type": "Question", "name": "What features were removed in v7?", "acceptedAnswer": { "@type": "Answer", "text": "v7 removes the Evolution pattern's support for Method Deprecation, and drops support for MySQL, primarily because MySQL doesn't support UUID as a data type." } },
{ "@type": "Question", "name": "What package generates the UUIDs, and why?", "acceptedAnswer": { "@type": "Answer", "text": "Dotkernel uses the ramsey/uuid package to generate the UUID before storing it in the database. This gives full control over the UUID version in use, so the application doesn't depend on extensions or a particular database version." } },
{ "@type": "Question", "name": "Which databases support the UUID data type required by v7?", "acceptedAnswer": { "@type": "Answer", "text": "You must use PostgreSQL or MariaDB v10.7 or later to have support for the UUID data type." } },
{ "@type": "Question", "name": "Which databases support the UUID data type required by v7?", "acceptedAnswer": { "@type": "Answer", "text": "You must use PostgreSQL or MariaDB v11.4 or later to have support for the UUID data type." } },
{ "@type": "Question", "name": "What else changed alongside the move to native UUID?", "acceptedAnswer": { "@type": "Answer", "text": "Table columns previously named uuid have been renamed to id. The database configuration was also clarified so it's more obvious which connection is the default and how to switch to another database connection." } }
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Card
public Suit $suit;
}</pre>

<blockquote><p class="mb-3">Note that the type <code>Types::ENUM</code> part is still required if we want to have an actual <code>enum</code> column in MySQL/MariaDB. We still default to <code>Types::STRING</code> or <code>TYPES::INTEGER</code> for columns types with a PHP enum as this is the more portable solution and the safer default.</p>
<blockquote><p class="mb-3">Note that the type <code>Types::ENUM</code> part is still required if we want to have an actual <code>enum</code> column in MariaDB. We still default to <code>Types::STRING</code> or <code>TYPES::INTEGER</code> for columns types with a PHP enum as this is the more portable solution and the safer default.</p>
</blockquote>

<h2><a href="#dotkernels-approach"></a>Dotkernel's approach</h2>
Expand Down Expand Up @@ -245,7 +245,7 @@ new setup: status ENUM(\'active\', \'pending\') DEFAULT \'pending\' NOT NULL</pr
<details class="acc">
<summary>Does Types::ENUM still fall back to a string or integer database column? <span class="chev">+</span></summary>
<div class="acc-body">
<p class="mb-0">The article notes that Doctrine still defaults to Types::STRING or Types::INTEGER for columns backed by a PHP enum, as this is considered the more portable and safer default; Types::ENUM is required if you want an actual enum column in MySQL/MariaDB.</p>
<p class="mb-0">The article notes that Doctrine still defaults to Types::STRING or Types::INTEGER for columns backed by a PHP enum, as this is considered the more portable and safer default; Types::ENUM is required if you want an actual enum column in MariaDB.</p>
</div>
</details>
<details class="acc">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<li>Support for PostgreSQL.</li>

<li>Support for PHP 8.5 for API and 8.4 for Admin.</li>
<li>Support for PHP 8.5 for API and Admin.</li>

<li>Support for database table prefix (string prepended to the name of every table in a database).</li>

Expand All @@ -29,7 +29,7 @@

<p class="mb-3">The most important change in v7 is the introduction of support for native UUID. We use the package <a href="https://github.com/ramsey/uuid" rel="noreferrer noopener" target="_blank">ramsey/uuid</a> to generate the uuid and then store it in the database. In this way we have full control over the UUID version in use. This solution means you don't depend on extensions or a particular version of the database.</p>

<blockquote><p class="mb-3">To ensure you have support for the <code>UUID</code> data type, you must use PostgreSQL or MariaDB v10.7 or later.</p>
<blockquote><p class="mb-3">To ensure you have support for the <code>UUID</code> data type, you must use PostgreSQL or MariaDB v11.4 or later.</p>
</blockquote>

<p class="mb-3">This also brings along a less-impactful change that still deserves mentioning: the table columns named <code>uuid</code> have been renamed to <code>id</code>.</p>
Expand All @@ -49,7 +49,7 @@
<details class="acc" open>
<summary>What new features does Dotkernel API v7 introduce? <span class="chev">+</span></summary>
<div class="acc-body">
<p class="mb-0">v7 adds support for UUID v7 using the native UUID data type, support for PostgreSQL, support for PHP 8.5 (API) and 8.4 (Admin), support for a database table prefix, improved database configuration, and replaces the binary data type for id (index) columns in favor of uuid.</p>
<p class="mb-0">v7 adds support for UUID v7 using the native UUID data type, support for PostgreSQL, support for PHP 8.5, support for a database table prefix, improved database configuration, and replaces the binary data type for id (index) columns in favor of uuid.</p>
</div>
</details>
<details class="acc">
Expand All @@ -67,7 +67,7 @@
<details class="acc">
<summary>Which databases support the UUID data type required by v7? <span class="chev">+</span></summary>
<div class="acc-body">
<p class="mb-0">You must use PostgreSQL or MariaDB v10.7 or later to have support for the UUID data type.</p>
<p class="mb-0">You must use PostgreSQL or MariaDB v11.4 or later to have support for the UUID data type.</p>
</div>
</details>
<details class="acc">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<li>Node.js - JavaScript runtime environment.</li>

<li>PhpMyAdmin - Open source administration tool for MySQL and MariaDB.</li>
<li>PhpMyAdmin - Open source administration tool for PostgreSQL and MariaDB.</li>
</ul>

<h2>Requirements</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/Page/templates/page/admin.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
</tr>
<tr>
<th scope="row">Database</th>
<td>MariaDB 10.7, 10.11 LTS, 11.4 LTS and 11.8 LTS, or PostgreSQL 13 and above.
<td>MariaDB 11.4 LTS, 11.8 LTS and 12.3 LTS, or PostgreSQL 13 and above.
<strong>MySQL is not supported</strong>, as it has no UUID support.</td>
</tr>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions src/Page/templates/page/api.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@
</div>
<div class="standard">
<h4>PostgreSQL support</h4>
<p>PostgreSQL joins the supported databases. Because native UUID is required, you need PostgreSQL or
MariaDB 10.7 or later; MySQL is no longer supported, as it has no UUID data type.</p>
<p>PostgreSQL joins the supported databases. Because native UUID is required, you need at least PostgreSQL 13 or
MariaDB 11.4; MySQL is no longer supported, as it has no UUID data type.</p>
</div>
<div class="standard">
<h4>PHP 8.5</h4>
Expand Down Expand Up @@ -569,7 +569,7 @@
<span class="eyebrow">Get started</span>
<h2>Install it and call an endpoint</h2>
<p class="lede">
Create the project with Composer, point it at PostgreSQL or MariaDB 10.7+, run the migrations, and
Create the project with Composer, point it at PostgreSQL 13+ or MariaDB 11.4+, run the migrations, and
you have an authenticated REST API with a browsable OpenAPI specification.
</p>
<div class="hero-ctas">
Expand Down
4 changes: 2 additions & 2 deletions src/Page/templates/page/frontend.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
</tr>
<tr>
<th scope="row">Database</th>
<td>Tested with MariaDB 10.11 LTS and 11.4 LTS, and with MySQL 8.4 LTS. For MySQL 8.4,
<td>Tested with MariaDB 11.4 LTS, 11.8 LTS and 12.3 LTS, and with PostgreSQL 13 and above,
<code>my.cnf</code> needs <code>mysql_native_password=ON</code>.</td>
</tr>
<tr>
Expand All @@ -461,7 +461,7 @@
</div>
<p class="spec-note">
Note that Frontend still supports MySQL - unlike API and Admin v7, which require native UUID support and
therefore PostgreSQL or MariaDB 10.7+.
therefore PostgreSQL 13+ or MariaDB 11.4+.
</p>
</div>
</section>
Expand Down