diff --git a/src/App/src/Fixture/articles_cleaned.json b/src/App/src/Fixture/articles_cleaned.json index 279de3ae..642f3cb8 100644 --- a/src/App/src/Fixture/articles_cleaned.json +++ b/src/App/src/Fixture/articles_cleaned.json @@ -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": [] }, { diff --git a/src/Blog/templates/page/JSON-LD/dotkernel/doctrine-enum-implementation-in-dotkernel.jsonld.twig b/src/Blog/templates/page/JSON-LD/dotkernel/doctrine-enum-implementation-in-dotkernel.jsonld.twig index 50bd15ed..250a32b3 100644 --- a/src/Blog/templates/page/JSON-LD/dotkernel/doctrine-enum-implementation-in-dotkernel.jsonld.twig +++ b/src/Blog/templates/page/JSON-LD/dotkernel/doctrine-enum-implementation-in-dotkernel.jsonld.twig @@ -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." } } ] } diff --git a/src/Blog/templates/page/JSON-LD/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.jsonld.twig b/src/Blog/templates/page/JSON-LD/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.jsonld.twig index 02ede974..b251d44f 100644 --- a/src/Blog/templates/page/JSON-LD/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.jsonld.twig +++ b/src/Blog/templates/page/JSON-LD/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.jsonld.twig @@ -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." } } ] } diff --git a/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig index 831aa48d..be7ce995 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig @@ -41,7 +41,7 @@ class Card public Suit $suit; } -

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

+

Note that the type Types::ENUM part is still required if we want to have an actual enum column in MariaDB. We still default to Types::STRING or TYPES::INTEGER for columns types with a PHP enum as this is the more portable solution and the safer default.

Dotkernel's approach

@@ -245,7 +245,7 @@ new setup: status ENUM(\'active\', \'pending\') DEFAULT \'pending\' NOT NULL Does Types::ENUM still fall back to a string or integer database column? +
-

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.

+

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.

diff --git a/src/Blog/templates/page/blog-resource/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.html.twig b/src/Blog/templates/page/blog-resource/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.html.twig index 628486e7..6a09804a 100644 --- a/src/Blog/templates/page/blog-resource/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.html.twig +++ b/src/Blog/templates/page/blog-resource/headless-platform/version-7-adds-postgresql-native-uuid-and-php-8-5.html.twig @@ -9,7 +9,7 @@
  • Support for PostgreSQL.
  • -
  • Support for PHP 8.5 for API and 8.4 for Admin.
  • +
  • Support for PHP 8.5 for API and Admin.
  • Support for database table prefix (string prepended to the name of every table in a database).
  • @@ -29,7 +29,7 @@

    The most important change in v7 is the introduction of support for native UUID. We use the package ramsey/uuid 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.

    -

    To ensure you have support for the UUID data type, you must use PostgreSQL or MariaDB v10.7 or later.

    +

    To ensure you have support for the UUID data type, you must use PostgreSQL or MariaDB v11.4 or later.

    This also brings along a less-impactful change that still deserves mentioning: the table columns named uuid have been renamed to id.

    @@ -49,7 +49,7 @@
    What new features does Dotkernel API v7 introduce? +
    -

    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.

    +

    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.

    @@ -67,7 +67,7 @@
    Which databases support the UUID data type required by v7? +
    -

    You must use PostgreSQL or MariaDB v10.7 or later to have support for the UUID data type.

    +

    You must use PostgreSQL or MariaDB v11.4 or later to have support for the UUID data type.

    diff --git a/src/Blog/templates/page/blog-resource/how-to/installing-almalinux-10-in-wsl2-php-mariadb-composer-phpmyadmin.html.twig b/src/Blog/templates/page/blog-resource/how-to/installing-almalinux-10-in-wsl2-php-mariadb-composer-phpmyadmin.html.twig index 7dcccf68..21d8a980 100644 --- a/src/Blog/templates/page/blog-resource/how-to/installing-almalinux-10-in-wsl2-php-mariadb-composer-phpmyadmin.html.twig +++ b/src/Blog/templates/page/blog-resource/how-to/installing-almalinux-10-in-wsl2-php-mariadb-composer-phpmyadmin.html.twig @@ -23,7 +23,7 @@
  • Node.js - JavaScript runtime environment.
  • -
  • PhpMyAdmin - Open source administration tool for MySQL and MariaDB.
  • +
  • PhpMyAdmin - Open source administration tool for PostgreSQL and MariaDB.
  • Requirements

    diff --git a/src/Page/templates/page/admin.html.twig b/src/Page/templates/page/admin.html.twig index f0a6274d..5beb8b4d 100644 --- a/src/Page/templates/page/admin.html.twig +++ b/src/Page/templates/page/admin.html.twig @@ -417,7 +417,7 @@ Database - MariaDB 10.7, 10.11 LTS, 11.4 LTS and 11.8 LTS, or PostgreSQL 13 and above. + MariaDB 11.4 LTS, 11.8 LTS and 12.3 LTS, or PostgreSQL 13 and above. MySQL is not supported, as it has no UUID support. diff --git a/src/Page/templates/page/api.html.twig b/src/Page/templates/page/api.html.twig index c255cfde..1f5a695a 100644 --- a/src/Page/templates/page/api.html.twig +++ b/src/Page/templates/page/api.html.twig @@ -317,8 +317,8 @@

    PostgreSQL support

    -

    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.

    +

    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.

    PHP 8.5

    @@ -569,7 +569,7 @@ Get started

    Install it and call an endpoint

    - 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.

    diff --git a/src/Page/templates/page/frontend.html.twig b/src/Page/templates/page/frontend.html.twig index ca4a25ad..8db3cd03 100644 --- a/src/Page/templates/page/frontend.html.twig +++ b/src/Page/templates/page/frontend.html.twig @@ -440,7 +440,7 @@ Database - Tested with MariaDB 10.11 LTS and 11.4 LTS, and with MySQL 8.4 LTS. For MySQL 8.4, + Tested with MariaDB 11.4 LTS, 11.8 LTS and 12.3 LTS, and with PostgreSQL 13 and above, my.cnf needs mysql_native_password=ON. @@ -461,7 +461,7 @@

    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+.