├── .ddev ├── homeadditions │ └── .bash_aliases ├── commands │ ├── web │ │ ├── typo3cms │ │ └── recreate-project │ ├── host │ │ ├── phpstorm │ │ └── launch │ └── db │ │ ├── mysqldump │ │ └── mysql ├── web-build │ └── Dockerfile ├── config.yaml ├── .gitignore └── docker-compose.typo3-env.yaml ├── config ├── includes │ ├── environments │ │ └── ddev.yaml │ ├── extension.yaml │ ├── dev │ │ ├── debug.yaml │ │ └── cache.yaml │ └── routing.yaml ├── setup │ ├── install.override.settings.yaml │ └── install.steps.yaml ├── dev.settings.yaml └── settings.yaml ├── packages ├── helhum_site_package │ ├── Configuration │ │ ├── TypoScript │ │ │ ├── constants.typoscript │ │ │ ├── setup.typoscript │ │ │ └── Libraries │ │ │ │ └── Page.typoscript │ │ ├── TCA │ │ │ └── Overrides │ │ │ │ └── sys_template.php │ │ └── Distribution │ │ │ └── Extension.yaml │ ├── Resources │ │ └── Public │ │ │ ├── Images │ │ │ ├── login.png │ │ │ ├── t3console.png │ │ │ ├── background.jpg │ │ │ ├── favicon-96x96.png │ │ │ ├── t3console.svg │ │ │ └── t3console-backend-logo.svg │ │ │ └── Icons │ │ │ └── Extension.png │ ├── ext_localconf.php │ ├── composer.json │ └── ext_emconf.php └── typo3-error-handling │ ├── Configuration │ └── Distribution │ │ └── Config.yaml │ ├── composer.json │ ├── src │ └── Error │ │ ├── ProductionExceptionHandler.php │ │ ├── ExceptionHandlerTrait.php │ │ └── DebugExceptionHandler.php │ └── Resources │ └── Private │ └── Templates │ └── views │ └── header.html.php ├── .env.dist ├── res └── scripts │ └── setup.sh ├── .gitignore ├── README.md ├── .htaccess ├── dynamicReturnTypeMeta.json ├── .styleci.yml ├── composer.json └── .php_cs.dist /.ddev/homeadditions/.bash_aliases: -------------------------------------------------------------------------------- 1 | alias ll="ls -la" 2 | -------------------------------------------------------------------------------- /config/includes/environments/ddev.yaml: -------------------------------------------------------------------------------- 1 | SYS: 2 | trustedHostsPattern: '.*' 3 | -------------------------------------------------------------------------------- /config/setup/install.override.settings.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: 'includes/environments/ddev.yaml', optional: true } 3 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Configuration/TypoScript/constants.typoscript: -------------------------------------------------------------------------------- 1 | @import 'EXT:fluid_styled_content/Configuration/TypoScript/constants.typoscript' 2 | -------------------------------------------------------------------------------- /.ddev/commands/web/typo3cms: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Description: Run TYPO3 Console CLI binary 4 | ## Usage: typo3cms [options] 5 | 6 | vendor/bin/typo3cms $@ 7 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Images/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helhum/TYPO3-Distribution/HEAD/packages/helhum_site_package/Resources/Public/Images/login.png -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Icons/Extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helhum/TYPO3-Distribution/HEAD/packages/helhum_site_package/Resources/Public/Icons/Extension.png -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Images/t3console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helhum/TYPO3-Distribution/HEAD/packages/helhum_site_package/Resources/Public/Images/t3console.png -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helhum/TYPO3-Distribution/HEAD/packages/helhum_site_package/Resources/Public/Images/background.jpg -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Images/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helhum/TYPO3-Distribution/HEAD/packages/helhum_site_package/Resources/Public/Images/favicon-96x96.png -------------------------------------------------------------------------------- /.env.dist: -------------------------------------------------------------------------------- 1 | # @IgnoreInspection BashAddShebang 2 | # Use "Development" to avoid TYPO3 caching and verbose error output 3 | # Use "Production" for maximum performance and no error output 4 | TYPO3_CONTEXT='Development' 5 | -------------------------------------------------------------------------------- /res/scripts/setup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ ! -f "private/typo3conf/LocalConfiguration.php" ]] 4 | then 5 | .ddev/commands/web/recreate-project >&2 6 | else 7 | >&2 echo 'Skipped initial project setup'; 8 | fi 9 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Configuration/TypoScript/setup.typoscript: -------------------------------------------------------------------------------- 1 | @import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript' 2 | @import 'EXT:helhum_site_package/Configuration/TypoScript/Libraries/*.typoscript' 3 | -------------------------------------------------------------------------------- /.ddev/web-build/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | # You can copy this Dockerfile.example to Dockerfile to add configuration 3 | # or packages or anything else to your webimage 4 | ARG BASE_IMAGE 5 | FROM $BASE_IMAGE 6 | RUN sudo composer self-update --snapshot --2 7 | -------------------------------------------------------------------------------- /.ddev/commands/host/phpstorm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Description: Open PHPStorm with the current project 4 | ## Usage: phpstorm 5 | ## Example: "ddev phpstorm" 6 | 7 | # Example is macOS-specific, but easy to adapt to any OS 8 | open -a PHPStorm.app ${DDEV_APPROOT} 9 | -------------------------------------------------------------------------------- /.ddev/commands/db/mysqldump: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Description: run mysqldump in web container 4 | ## Usage: mysqldump [flags] [args] 5 | ## Example: "ddev mysqldump db" or "ddev mysqldump otherdb" or "ddev mysqldump db | gzip >db.sql.gz" 6 | 7 | mysqldump -udb -pdb $@ 8 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Configuration/TCA/Overrides/sys_template.php: -------------------------------------------------------------------------------- 1 | getLogger('Helhum'); 5 | // $logger->warning( 6 | // 'warning Message', 7 | // [ 8 | // 'foo' => 'bar', 9 | // ] 10 | // ); 11 | // 12 | // throw new \Exception('sadf', 1572786055); 13 | })(); 14 | -------------------------------------------------------------------------------- /config/includes/extension.yaml: -------------------------------------------------------------------------------- 1 | EXTENSIONS: 2 | backend: 3 | backendFavicon: '' 4 | backendLogo: '' 5 | loginBackgroundImage: '' 6 | loginFootnote: '' 7 | loginHighlightColor: '' 8 | loginLogo: '' 9 | extensionmanager: 10 | automaticInstallation: '1' 11 | offlineMode: '0' 12 | scheduler: 13 | maxLifetime: '1440' 14 | showSampleTasks: '1' 15 | -------------------------------------------------------------------------------- /config/includes/dev/debug.yaml: -------------------------------------------------------------------------------- 1 | SYS: 2 | displayErrors: 1 3 | devIPmask: '*' 4 | sqlDebug: 1 5 | enableDeprecationLog: file 6 | exceptionalErrors: 28930 7 | BE: 8 | debug: true 9 | FE: 10 | debug: true 11 | LOG: 12 | writerConfiguration: 13 | '%const(TYPO3\CMS\Core\Log\LogLevel::DEBUG)%': 14 | TYPO3\CMS\Core\Log\Writer\FileWriter: 15 | { logFile: '%env(TYPO3_PATH_COMPOSER_ROOT)%/var/log/typo3-debug.log' } 16 | -------------------------------------------------------------------------------- /packages/typo3-error-handling/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "helhum/typo3-error-handling", 3 | "description" : "Error handling classes for TYPO3 CMS", 4 | "license": "GPL-2.0-or-later", 5 | "require": { 6 | "php": "^7", 7 | "filp/whoops": "^2.7", 8 | "helhum/typo3-console": "^6.0", 9 | "typo3/cms-core": "^10.4" 10 | }, 11 | "autoload": { 12 | "psr-4": { 13 | "Helhum\\TYPO3\\ErrorHandling\\": "src/" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Configuration/Distribution/Extension.yaml: -------------------------------------------------------------------------------- 1 | EXTENSIONS: 2 | backend: 3 | backendFavicon: 'EXT:helhum_site_package/Resources/Public/Images/favicon-96x96.png' 4 | backendLogo: 'EXT:helhum_site_package/Resources/Public/Images/t3console-backend-logo.svg' 5 | loginBackgroundImage: 'EXT:helhum_site_package/Resources/Public/Images/background.jpg' 6 | loginHighlightColor: '#515151' 7 | loginLogo: 'EXT:helhum_site_package/Resources/Public/Images/login.png' 8 | -------------------------------------------------------------------------------- /.ddev/config.yaml: -------------------------------------------------------------------------------- 1 | name: awesome.typo3 2 | type: php 3 | docroot: public 4 | php_version: "7.4" 5 | webserver_type: apache-fpm 6 | router_http_port: "8085" 7 | router_https_port: "4434" 8 | xdebug_enabled: false 9 | additional_hostnames: [] 10 | additional_fqdns: 11 | - awesome-typo3.test 12 | mariadb_version: "10.2" 13 | provider: default 14 | hooks: 15 | post-start: 16 | - exec: res/scripts/setup.sh 17 | upload_dir: private/fileadmin 18 | working_dir: 19 | web: /var/www/html 20 | omit_containers: [dba, ddev-ssh-agent] 21 | use_dns_when_possible: true 22 | timezone: Europe/Berlin 23 | -------------------------------------------------------------------------------- /packages/helhum_site_package/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "helhum/site-package", 3 | "type": "typo3-cms-extension", 4 | "description" : "An example site package for Helhum TYPO3 Distribution", 5 | "license": "GPL-2.0-or-later", 6 | "require": { 7 | "php": "^7", 8 | "typo3/cms-core": "^10.4" 9 | }, 10 | "autoload": { 11 | "psr-4": { 12 | "Helhum\\SitePackage\\": "Classes/" 13 | } 14 | }, 15 | "extra": { 16 | "typo3/cms": { 17 | "extension-key": "helhum_site_package" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.ddev/.gitignore: -------------------------------------------------------------------------------- 1 | #ddev-generated: Automatically generated ddev .gitignore. 2 | # You can remove the above line if you want to edit and maintain this file yourself. 3 | 4 | /commands/*/*.example 5 | /commands/*/README.txt 6 | /commands/host/launch 7 | /commands/web/xdebug 8 | /commands/db/mysql 9 | /homeadditions/*.example 10 | /homeadditions/README.txt 11 | /.gitignore 12 | /import.yaml 13 | /.ddev-docker-compose-base.yaml 14 | /.ddev-docker-compose-full.yaml 15 | /db_snapshots 16 | /sequelpro.spf 17 | /import-db 18 | /config.*.y*ml 19 | /.webimageBuild 20 | /.dbimageBuild 21 | /.sshimageBuild 22 | /.webimageExtra 23 | /.dbimageExtra 24 | /*-build/Dockerfile.example 25 | -------------------------------------------------------------------------------- /packages/helhum_site_package/ext_emconf.php: -------------------------------------------------------------------------------- 1 | 'Helhum TYPO3 Distribution Site Package', 4 | 'description' => 'An example site package for Helhum TYPO3 Distribution', 5 | 'category' => 'TYPO3 Console', 6 | 'state' => 'stable', 7 | 'uploadfolder' => 0, 8 | 'createDirs' => '', 9 | 'modify_tables' => '', 10 | 'clearCacheOnLoad' => 0, 11 | 'author' => 'Helmut Hummel', 12 | 'author_email' => 'info@helhum.io', 13 | 'author_company' => 'helhum.io', 14 | 'version' => '0.1.0', 15 | 'constraints' => [ 16 | 'depends' => [ 17 | 'typo3' => '9.5.0-9.5.99', 18 | ], 19 | 'conflicts' => [ 20 | ], 21 | 'suggests' => [ 22 | ], 23 | ], 24 | ]; 25 | -------------------------------------------------------------------------------- /.ddev/commands/web/recreate-project: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mysql -e 'DROP DATABASE IF EXISTS db; CREATE DATABASE db;' 4 | rm -rf var/cache var/log var/lock var/session var/transient config/override.settings.yaml 5 | echo ''; 6 | echo 'Fetching vendor code…'; 7 | composer install > /dev/null 2>&1 8 | rm private/typo3conf/LocalConfiguration.php 9 | echo 'Setting up TYPO3…'; 10 | TYPO3_CONTEXT=Production vendor/bin/typo3cms install:setup --no-interaction 11 | [[ -f .ddev/import-db/live-db.sql.gz ]] || [[ -f res/content-master.sql.gz ]] && echo 'Importing content master…' && zcat res/content-master.sql.gz | mysql 12 | [[ -f .ddev/import-db/live-db.sql.gz ]] && echo 'Importing live DB…' && zcat .ddev/import-db/live-db.sql.gz | mysql 13 | 14 | echo '' 15 | echo 'Your project has been recreated'; 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Installation steps for helhum/typo3-distribution 2 | 3 | ### Install using ddev (recommended) 4 | 1. Download and install [ddev](https://ddev.readthedocs.io/en/stable/#installation) 5 | 1. Clone the repository `git clone https://github.com/helhum/TYPO3-Distribution.git your-project` 6 | 1. Run `cd your-project` 7 | 1. Checkout the branch matching your TYPO3 version (e.g. `git checkout origin/9.5 -b 9.5`) 8 | 1. Run `ddev launch typo3` to start and open the browser with the TYPO3 backend login 9 | 10 | ### Install in any environment 11 | 1. Download and install [composer](https://getcomposer.org/download/) 12 | 1. Run `composer create-project helhum/typo3-distribution your-project` 13 | 1. Enter correct credentials during setup, select `site` as setup type when asked 14 | 1. Run `cd your-project` 15 | 1. Run `vendor/bin/typo3cms server:run` 16 | 1. Enter `http://127.0.0.1:8080/typo3/` in your browser to log into the backend 17 | -------------------------------------------------------------------------------- /config/setup/install.steps.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: 'InstallSteps.yaml', type: console } 3 | 4 | databaseData: 5 | arguments: 6 | adminUserName: 7 | value: 'admin' 8 | adminPassword: 9 | value: 'password' 10 | siteName: 11 | default: 'Helhum''s awesome TYPO3 Composer Distribution' 12 | 13 | defaultConfiguration: 14 | arguments: 15 | siteSetupType: 16 | value: site 17 | siteUrl: 18 | description: 'Specify the site base url (including scheme, host, port)' 19 | default: 'http://127.0.0.1:8080/' 20 | 21 | setupProject: 22 | type: Helhum\TYPO3\ConfigHandling\Install\Action\SetupConfigurationAction 23 | description: 'Set up project settings' 24 | customOverrideSettings: '%env(TYPO3_INSTALL_OVERRIDE_SETTINGS_FILE)%' 25 | customSettings: [] 26 | removeSettings: 27 | - LOG 28 | - SYS.caching 29 | - SYS.features 30 | -------------------------------------------------------------------------------- /.ddev/docker-compose.typo3-env.yaml: -------------------------------------------------------------------------------- 1 | version: '3.6' 2 | 3 | services: 4 | web: 5 | environment: 6 | - TZ=Europe/Berlin 7 | - PHP_IDE_CONFIG=serverName=awesome-typo3.test 8 | - TYPO3_IS_SET_UP=1 9 | - TYPO3_INSTALL_SETUP_STEPS=/var/www/html/config/setup/install.steps.yaml 10 | - TYPO3_INSTALL_DB_USER=db 11 | - TYPO3_INSTALL_DB_PASSWORD=db 12 | - TYPO3_INSTALL_DB_HOST=db 13 | - TYPO3_INSTALL_DB_PORT=3306 14 | - TYPO3_INSTALL_DB_UNIX_SOCKET= 15 | - TYPO3_INSTALL_DB_USE_EXISTING=1 16 | - TYPO3_INSTALL_DB_DRIVER=mysqli 17 | - TYPO3_INSTALL_DB_DBNAME=db 18 | - TYPO3_INSTALL_ADMIN_USER=admin 19 | - TYPO3_INSTALL_ADMIN_PASSWORD=password 20 | - TYPO3_INSTALL_SITE_NAME=$DDEV_SITENAME (on DDEV) 21 | - TYPO3_INSTALL_SITE_SETUP_TYPE=site 22 | - TYPO3_INSTALL_WEB_SERVER_CONFIG=apache 23 | - TYPO3_INSTALL_SITE_BASE_URL=https://awesome-typo3.test/ 24 | - TYPO3_INSTALL_OVERRIDE_SETTINGS_FILE=install.override.settings.yaml 25 | db: 26 | environment: 27 | - TZ=Europe/Berlin 28 | -------------------------------------------------------------------------------- /packages/typo3-error-handling/src/Error/ProductionExceptionHandler.php: -------------------------------------------------------------------------------- 1 | 9 | * All rights reserved 10 | * 11 | * The GNU General Public License can be found at 12 | * http://www.gnu.org/copyleft/gpl.html. 13 | * A copy is found in the text file GPL.txt and important notices to the license 14 | * from the author is found in LICENSE.txt distributed with these scripts. 15 | * 16 | * 17 | * This script is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * This copyright notice MUST APPEAR in all copies of the script! 23 | ***************************************************************/ 24 | 25 | /** 26 | * A quiet exception handler which catches but ignores any exception. 27 | */ 28 | class ProductionExceptionHandler extends \TYPO3\CMS\Core\Error\ProductionExceptionHandler 29 | { 30 | use ExceptionHandlerTrait; 31 | } 32 | -------------------------------------------------------------------------------- /config/includes/dev/cache.yaml: -------------------------------------------------------------------------------- 1 | SYS: 2 | caching: 3 | cacheConfigurations: 4 | cache_core: 5 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 6 | fluid_template: 7 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 8 | cache_hash: 9 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 10 | cache_pages: 11 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 12 | cache_pagesection: 13 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 14 | cache_phpcode: 15 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 16 | cache_runtime: 17 | backend: 'TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend' 18 | cache_rootline: 19 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 20 | cache_imagesizes: 21 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 22 | l10n: 23 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 24 | extbase_reflection: 25 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 26 | extbase_datamapfactory_datamap: 27 | backend: 'TYPO3\CMS\Core\Cache\Backend\NullBackend' 28 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Images/t3console.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Resources/Public/Images/t3console-backend-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | # Asset Caching 2 | 3 | 4 | ExpiresActive on 5 | ExpiresDefault "access plus 30 days" 6 | 7 | FileETag MTime Size 8 | 9 | 10 | 11 | RewriteEngine On 12 | 13 | # Version Numbered Filenames 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteCond %{REQUEST_FILENAME} !-d 16 | RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L] 17 | 18 | # Basic security checks 19 | RewriteRule _(?:recycler|temp)_/ - [F] 20 | RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?)/ - [F] 21 | RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC] 22 | RewriteCond %{SCRIPT_FILENAME} -d [OR] 23 | RewriteCond %{SCRIPT_FILENAME} -f 24 | RewriteRule (?:^|/)\. - [F] 25 | 26 | # Stop rewrite processing, if we are in the typo3/ directory. 27 | RewriteRule ^(typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L] 28 | 29 | # If the file/symlink/directory does not exist => Redirect to index.php. 30 | RewriteCond %{REQUEST_FILENAME} !-f 31 | RewriteCond %{REQUEST_FILENAME} !-d 32 | RewriteCond %{REQUEST_FILENAME} !-l 33 | RewriteRule .* /index.php [L] 34 | 35 | 36 | 37 | # gzip compression of all assets 38 | 39 | SetOutputFilter DEFLATE 40 | 41 | 42 | # Redirects 43 | #Redirect 301 /news/aktuell http://project.tld/news/aktuelles/ 44 | -------------------------------------------------------------------------------- /packages/helhum_site_package/Configuration/TypoScript/Libraries/Page.typoscript: -------------------------------------------------------------------------------- 1 | page = PAGE 2 | page.10 = TEXT 3 | page.10.value ( 4 |
5 |
6 | 7 |
8 |

Welcome to a default website made with TYPO3

9 |
10 | ) 11 | page.100 =< styles.content.get 12 | 13 | #page.10 > 14 | #page.10 = FLUIDTEMPLATE 15 | -------------------------------------------------------------------------------- /dynamicReturnTypeMeta.json: -------------------------------------------------------------------------------- 1 | { 2 | // configuration file for PHPStorm Plugin: http://plugins.jetbrains.com/plugin/7251 3 | "methodCalls": [ 4 | { 5 | "class": "\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility", 6 | "method": "makeInstance", 7 | "position": 0 8 | }, 9 | { 10 | "class": "\\TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface", 11 | "method": "get", 12 | "position": 0 13 | }, 14 | { 15 | "class": "\\PHPUnit_Framework_TestCase", 16 | "method": "prophesize", 17 | "position": 0, 18 | "mask": "%s|\\Prophecy\\Prophecy\\ObjectProphecy" 19 | }, 20 | { 21 | "class": "\\PHPUnit_Framework_TestCase", 22 | "method": "getMock", 23 | "position": 0, 24 | "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject" 25 | }, 26 | { 27 | "class": "\\PHPUnit_Framework_TestCase", 28 | "method": "createMock", 29 | "position": 0, 30 | "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject" 31 | }, 32 | { 33 | "class": "\\TYPO3\\CMS\\Components\\TestingFramework\\Core\\BaseTestCase", 34 | "method": "getAccessibleMock", 35 | "position": 0, 36 | "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject|\\TYPO3\\CMS\\Components\\TestingFramework\\Core\\AccessibleObjectInterface" 37 | }, 38 | { 39 | "class": "\\TYPO3\\CMS\\Components\\TestingFramework\\Core\\BaseTestCase", 40 | "method": "getAccessibleMockForAbstractClass", 41 | "position": 0, 42 | "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject|\\TYPO3\\CMS\\Components\\TestingFramework\\Core\\AccessibleObjectInterface" 43 | } 44 | ], 45 | "functionCalls": [ 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /config/settings.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: 'DefaultConfiguration', type: typo3, exclude: [LOG] } 3 | - { resource: 'includes/*.yaml', type: glob } 4 | - { resource: '../packages/*/Configuration/Distribution/*.yaml', type: glob, optional: true } 5 | 6 | BE: 7 | explicitADmode: 'explicitAllow' 8 | loginSecurityLevel: 'normal' 9 | DB: 10 | Connections: 11 | Default: 12 | charset: 'utf8' 13 | FE: 14 | loginSecurityLevel: 'normal' 15 | GFX: 16 | jpg_quality: '80' 17 | processor: 'GraphicsMagick' 18 | processor_effects: -1 19 | LOG: 20 | writerConfiguration: 21 | '%const(TYPO3\CMS\Core\Log\LogLevel::WARNING)%': 22 | TYPO3\CMS\Core\Log\Writer\FileWriter: 23 | logFile: '%env(TYPO3_PATH_COMPOSER_ROOT)%/var/log/typo3-warning.log' 24 | TYPO3: 25 | CMS: 26 | deprecations: 27 | writerConfiguration: 28 | '%const(TYPO3\CMS\Core\Log\LogLevel::EMERGENCY)%': 29 | TYPO3\CMS\Core\Log\Writer\NullWriter: [ ] 30 | Extbase: 31 | SignalSlot: 32 | Dispatcher: 33 | writerConfiguration: 34 | '%const(TYPO3\CMS\Core\Log\LogLevel::EMERGENCY)%': 35 | TYPO3\CMS\Core\Log\Writer\NullWriter: [ ] 36 | SYS: 37 | displayErrors: 0 38 | errorHandlerErrors: 32514 39 | exceptionalErrors: 4352 40 | Objects: 41 | TYPO3\CMS\Core\Configuration\SiteConfiguration: 42 | className: Helhum\TYPO3\ConfigHandling\Typo3SiteConfiguration 43 | -------------------------------------------------------------------------------- /config/includes/routing.yaml: -------------------------------------------------------------------------------- 1 | EXTCONF: 2 | realurl: 3 | _DOMAINS: 4 | encode: 5 | - { GETvar: L, value: '0', useConfiguration: default.tld, urlPrepend: 'http://%conf(EXTCONF.helhum_site_package.defaultLanguageDomain)%' } 6 | - { GETvar: L, value: '1', useConfiguration: default.tld, urlPrepend: 'http://%conf(EXTCONF.helhum_site_package.englishDomain)%' } 7 | decode: 8 | '%conf(EXTCONF.helhum_site_package.defaultLanguageDomain)%': 9 | GETvars: { L: '0' } 10 | useConfiguration: default.tld 11 | '%conf(EXTCONF.helhum_site_package.englishDomain)%': 12 | GETvars: { L: '1' } 13 | useConfiguration: default.tld 14 | default.tld: 15 | init: 16 | enableCHashCache: true 17 | appendMissingSlash: 'ifNotFile' 18 | adminJumpToBackend: true 19 | enableUrlDecodeCache: true 20 | enableUrlEncodeCache: true 21 | emptyUrlReturnValue: / 22 | disableErrorLog: true 23 | pagePath: 24 | rootpage_id: '1' 25 | type: user 26 | userFunc: 'Tx\Realurl\UriGeneratorAndResolver->main' 27 | spaceCharacter: '-' 28 | languageGetVar: 'L' 29 | expireDays: 3 30 | dontResolveShortcuts: false 31 | fileName: 32 | defaultToHTMLsuffixOnPrev: false 33 | '%conf(EXTCONF.helhum_site_package.englishDomain)%': 'default.tld' 34 | '%conf(EXTCONF.helhum_site_package.defaultLanguageDomain)%': 'default.tld' 35 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | preset: psr2 2 | 3 | enabled: 4 | - alpha_ordered_imports 5 | - binary_operator_spaces 6 | - concat_with_spaces 7 | - function_typehint_space 8 | - hash_to_slash_comment 9 | - linebreak_after_opening_tag 10 | - lowercase_cast 11 | - method_separation 12 | - native_function_casing 13 | - new_with_braces 14 | - no_alias_functions 15 | - no_blank_lines_after_class_opening 16 | - no_blank_lines_after_phpdoc 17 | - no_blank_lines_before_namespace 18 | - no_empty_comment 19 | - no_empty_phpdoc 20 | - no_empty_statement 21 | - no_extra_block_blank_lines 22 | - no_extra_consecutive_blank_lines 23 | - no_leading_import_slash 24 | - no_leading_namespace_whitespace 25 | - no_multiline_whitespace_around_double_arrow 26 | - no_multiline_whitespace_before_semicolons 27 | - no_short_bool_cast 28 | - no_singleline_whitespace_before_semicolons 29 | - no_trailing_comma_in_list_call 30 | - no_trailing_comma_in_singleline_array 31 | - no_unneeded_control_parentheses 32 | - no_unreachable_default_argument_value 33 | - no_unused_imports 34 | - no_useless_else 35 | - no_useless_return 36 | - no_whitespace_before_comma_in_array 37 | - no_whitespace_in_blank_line 38 | - normalize_index_brace 39 | - phpdoc_add_missing_param_annotation 40 | - phpdoc_no_package 41 | - phpdoc_order 42 | - phpdoc_scalar 43 | - phpdoc_types 44 | - self_accessor 45 | - short_array_syntax 46 | - short_scalar_cast 47 | - single_quote 48 | - standardize_not_equals 49 | - ternary_operator_spaces 50 | - trailing_comma_in_multiline_array 51 | - whitespace_after_comma_in_array 52 | 53 | finder: 54 | name: 55 | - "*.php" 56 | exclude: 57 | - ".surf" 58 | - "var" 59 | - "vendor" 60 | - "web" 61 | not-name: 62 | - "ext_emconf.php" 63 | -------------------------------------------------------------------------------- /packages/typo3-error-handling/src/Error/ExceptionHandlerTrait.php: -------------------------------------------------------------------------------- 1 | 9 | * All rights reserved 10 | * 11 | * The GNU General Public License can be found at 12 | * http://www.gnu.org/copyleft/gpl.html. 13 | * A copy is found in the text file GPL.txt and important notices to the license 14 | * from the author is found in LICENSE.txt distributed with these scripts. 15 | * 16 | * 17 | * This script is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * This copyright notice MUST APPEAR in all copies of the script! 23 | ***************************************************************/ 24 | 25 | use Helhum\Typo3Console\Error\ExceptionRenderer; 26 | use Symfony\Component\Console\Output\ConsoleOutput; 27 | 28 | trait ExceptionHandlerTrait 29 | { 30 | /** 31 | * Formats and echoes the exception for the command line 32 | * 33 | * @param \Throwable $exception The throwable object. 34 | */ 35 | public function echoExceptionCLI(\Throwable $exception): void 36 | { 37 | $exceptionRenderer = new ExceptionRenderer(); 38 | $output = new ConsoleOutput(); 39 | $output->setVerbosity($output::VERBOSITY_DEBUG); 40 | $exceptionRenderer->render($exception, $output); 41 | die(1); 42 | } 43 | 44 | protected function writeLog($logMessage) 45 | { 46 | // Don't write to sys_log database table 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "repositories": [ 3 | { "type": "path", "url": "packages/*" } 4 | ], 5 | "name": "helhum/typo3-distribution", 6 | "description" : "TYPO3 CMS Distribution with console and .env support", 7 | "license": "GPL-2.0-or-later", 8 | "config": { 9 | "sort-packages": true, 10 | "platform": { 11 | "php": "7.2.5" 12 | } 13 | }, 14 | "require": { 15 | "helhum/site-package": "@dev", 16 | "helhum/typo3-config-handling": "^1.0@rc", 17 | "helhum/typo3-console": "^6.3", 18 | "helhum/typo3-error-handling": "@dev", 19 | "helhum/typo3-secure-web": "^0.2.9", 20 | "roave/security-advisories": "dev-master", 21 | "typo3-console/composer-auto-commands": "^0.4", 22 | "typo3/cms-adminpanel": "^10.4", 23 | "typo3/cms-belog": "^10.4", 24 | "typo3/cms-beuser": "^10.4", 25 | "typo3/cms-context-help": "^10.4", 26 | "typo3/cms-fluid-styled-content": "^10.4", 27 | "typo3/cms-impexp": "^10.4", 28 | "typo3/cms-info": "^10.4", 29 | "typo3/cms-info-pagetsconfig": "^10.4", 30 | "typo3/cms-lowlevel": "^10.4", 31 | "typo3/minimal": "^10.4", 32 | "typo3/cms-reports": "^10.4", 33 | "typo3/cms-rte-ckeditor": "^10.4", 34 | "typo3/cms-setup": "^10.4", 35 | "typo3/cms-tstemplate": "^10.4", 36 | "typo3/cms-viewpage": "^10.4" 37 | }, 38 | "require-dev": { 39 | "helhum/dotenv-connector": "^2.2", 40 | "typo3-console/composer-typo3-auto-install": "^0.4", 41 | "typo3-console/php-server-command": "^0.2", 42 | "typo3/testing-framework": "^5" 43 | }, 44 | "extra": { 45 | "typo3/cms": { 46 | "root-dir": "private", 47 | "web-dir": "public" 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /.ddev/commands/host/launch: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Description: Launch a browser with the current site 4 | ## Usage: launch [path] [-p|--phpmyadmin] [-m|--mailhog] 5 | ## Example: "ddev launch" or "ddev launch /admin/reports/status/php" or "ddev launch phpinfo.php", for PHPMyAdmin "ddev launch -p", MailHog "ddev launch -m" 6 | 7 | FULLURL="https://awesome-typo3.test:4434" 8 | HTTPS="" 9 | if [ ${DDEV_PRIMARY_URL%://*} = "https" ]; then HTTPS=true; fi 10 | 11 | while :; do 12 | case $1 in 13 | -h|-\?|--help) 14 | show_help 15 | exit 16 | ;; 17 | -p|--phpmyadmin) 18 | if [ "${HTTPS}" = "" ]; then 19 | FULLURL="${FULLURL}:${DDEV_PHPMYADMIN_PORT}" 20 | else 21 | FULLURL="${FULLURL}:${DDEV_PHPMYADMIN_HTTPS_PORT}" 22 | fi 23 | ;; 24 | -m|--mailhog) 25 | if [ "${HTTPS}" = "" ]; then 26 | FULLURL="${FULLURL}:${DDEV_MAILHOG_PORT}" 27 | else 28 | FULLURL="${FULLURL}:${DDEV_MAILHOG_HTTPS_PORT}" 29 | fi 30 | ;; 31 | 32 | --) # End of all options. 33 | shift 34 | break 35 | ;; 36 | -?*) 37 | printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2 38 | ;; 39 | *) # Default case: No more options, so break out of the loop. 40 | break 41 | esac 42 | 43 | shift 44 | done 45 | 46 | if [ -n "${1:-}" ] ; then 47 | if [[ ${1::1} != "/" ]] ; then 48 | FULLURL="${FULLURL}/"; 49 | fi 50 | 51 | FULLURL="${FULLURL}${1}"; 52 | fi 53 | 54 | case $OSTYPE in 55 | linux-gnu) 56 | xdg-open ${FULLURL} 57 | ;; 58 | "darwin"*) 59 | open ${FULLURL} 60 | ;; 61 | "win*"* | "msys"*) 62 | start ${FULLURL} 63 | ;; 64 | esac 65 | -------------------------------------------------------------------------------- /packages/typo3-error-handling/src/Error/DebugExceptionHandler.php: -------------------------------------------------------------------------------- 1 | sendStatusHeaders($exception); 33 | $this->writeLogEntries($exception, self::CONTEXT_WEB); 34 | $pageHandler = new PrettyPageHandler(); 35 | $pageHandler->handleUnconditionally(true); 36 | $pageHandler->addResourcePath(__DIR__ . '/../../Resources/Private/Templates'); 37 | 38 | $editor = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['exceptionHandling']['editor'] ?? 'phpstorm'; 39 | $pageHandler->setEditor($editor); 40 | if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['exceptionHandling']['pathMapping'])) { 41 | $previousPageHandler = clone $pageHandler; 42 | $pageHandler->setEditor( 43 | function ($file, $line) use ($previousPageHandler) { 44 | $file = str_replace('/var/www/html/', '/Users/helmut/Sites/Kunden/TYPO3-Distribution/', $file); 45 | 46 | return $previousPageHandler->getEditorHref($file, $line); 47 | } 48 | ); 49 | } 50 | 51 | $run = new Run(); 52 | $run->allowQuit(false); 53 | $run->writeToOutput(false); 54 | $run->appendHandler($pageHandler); 55 | echo $run->handleException($exception); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /.php_cs.dist: -------------------------------------------------------------------------------- 1 | setRiskyAllowed(true) 4 | ->setRules([ 5 | '@PSR2' => true, 6 | 'array_syntax' => [ 7 | 'syntax' => 'short', 8 | ], 9 | 'binary_operator_spaces' => true, 10 | 'concat_space' => [ 11 | 'spacing' => 'one', 12 | ], 13 | 'function_typehint_space' => true, 14 | 'hash_to_slash_comment' => true, 15 | 'linebreak_after_opening_tag' => true, 16 | 'lowercase_cast' => true, 17 | 'method_separation' => true, 18 | 'native_function_casing' => true, 19 | 'new_with_braces' => true, 20 | 'no_alias_functions' => true, 21 | 'no_blank_lines_after_class_opening' => true, 22 | 'no_blank_lines_after_phpdoc' => true, 23 | 'no_blank_lines_before_namespace' => true, 24 | 'no_empty_comment' => true, 25 | 'no_empty_phpdoc' => true, 26 | 'no_empty_statement' => true, 27 | 'no_extra_consecutive_blank_lines' => [ 28 | 'continue', 29 | 'curly_brace_block', 30 | 'extra', 31 | 'parenthesis_brace_block', 32 | 'square_brace_block', 33 | 'throw', 34 | ], 35 | 'no_leading_import_slash' => true, 36 | 'no_leading_namespace_whitespace' => true, 37 | 'no_multiline_whitespace_around_double_arrow' => true, 38 | 'no_multiline_whitespace_before_semicolons' => true, 39 | 'no_short_bool_cast' => true, 40 | 'no_singleline_whitespace_before_semicolons' => true, 41 | 'no_trailing_comma_in_list_call' => true, 42 | 'no_trailing_comma_in_singleline_array' => true, 43 | 'no_unneeded_control_parentheses' => [ 44 | 'break', 45 | 'clone', 46 | 'continue', 47 | 'echo_print', 48 | 'return', 49 | 'switch_case', 50 | ], 51 | 'no_unreachable_default_argument_value' => true, 52 | 'no_unused_imports' => true, 53 | 'no_useless_else' => true, 54 | 'no_useless_return' => true, 55 | 'no_whitespace_before_comma_in_array' => true, 56 | 'no_whitespace_in_blank_line' => true, 57 | 'normalize_index_brace' => true, 58 | 'ordered_imports' => true, 59 | 'phpdoc_add_missing_param_annotation' => true, 60 | 'phpdoc_no_package' => true, 61 | 'phpdoc_order' => true, 62 | 'phpdoc_scalar' => true, 63 | 'phpdoc_types' => true, 64 | 'self_accessor' => true, 65 | 'short_scalar_cast' => true, 66 | 'single_quote' => true, 67 | 'standardize_not_equals' => true, 68 | 'ternary_operator_spaces' => true, 69 | 'trailing_comma_in_multiline_array' => true, 70 | 'whitespace_after_comma_in_array' => true, 71 | ]) 72 | ->setFinder( 73 | PhpCsFixer\Finder::create() 74 | ->in(__DIR__ . '/packages') 75 | ->notName('ext_emconf.php') 76 | ); 77 | -------------------------------------------------------------------------------- /packages/typo3-error-handling/Resources/Private/Templates/views/header.html.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | $nameSection): ?> 4 | 5 | escape($nameSection) ?> 6 | 7 | escape($nameSection) . ' \\' ?> 8 | 9 | 10 | 11 | (escape($code) ?>) 12 | 13 |
14 | 15 |
16 | 17 | escape($message) ?> 18 | 19 | 20 | 21 |
22 | Previous exceptions 23 |
24 | 25 |
    26 | $previousMessage): ?> 27 |
  • 28 | escape($previousMessage) ?> 29 | () 30 |
  • 31 | 32 |
33 | 34 | 35 | 36 | 37 | 38 | No message 39 | 40 | 41 | 94 | 95 | escape($plain_exception) ?> 96 | 99 | 102 |
103 |
104 | --------------------------------------------------------------------------------