Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 1.62 KB

README.md

File metadata and controls

33 lines (26 loc) · 1.62 KB

Proof of concept: Doctrine with TYPO3

NOTE: None of these extensions are meant to be used in production, this was just a fun experiment

This setup is a proof of concept of using Doctrine ORM with TYPO3. It uses the typo3_doctrine_orm extension to automatically generate TCA and schema based on registered entities. This was originally built with TYPO3 11.5, it now works with TYPO3 12.4LTS, but it's possible some hacks and DI registrations are not needed anymore.

Installation

  1. Clone this repository
  2. Run ddev start
  3. Run ddev composer install
  4. Create a FIRST_INSTALL file in the public directory
  5. Visit typo3/install.php and install TYPO3
  6. Make sure you've setup a site with an empty Typoscript root record (typoscript is included with EXT:sitepackage)
  7. Place the "Post list" element on the Homepage (or any other page)
  8. Create a storage folder and add author(s) and post(s)
  9. Visit the page to see the list and detail view of the posts

Extension: typo3_doctrine_orm

This extension is responsible for automatically generating the TCA and schema based on registered entities

Extension: doctrine_blog

This extension has multiple entities which display the working of the functionality:

  • Author
  • Post
  • Comment
  • RelatedPage

It contains a PostController which has a list and show action to display the posts, and an addComment action to add a comment to a post. There is no ext_tables.sql or TCA files, everything is generated by the typo3_doctrine_orm extension.

Extension: sitepackage

This extension is a basic sitepackage with a minimal setup to have a working frontend (loads Tailwindcss)