...
 
Commits (478)
#ddev-generated: Automatically generated ddev .gitignore.
# You can remove the above line if you want to edit and maintain this file yourself.
/import.yaml
/docker-compose.yaml
/db_snapshots
/sequelpro.spf
/import-db
/.bgsync*
/config.*.y*ml
/.webimageExtra
/.dbimageExtra
/*-build/Dockerfile.example
APIVersion: v0.19.0
APIVersion: v1.9.1
name: my.typo3.org
type: typo3
docroot: html
php_version: "7.0"
docroot: public
php_version: "7.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.1"
nfs_mount_enabled: false
provider: default
hooks:
post-start:
- exec: cp typo3conf/AdditionalConfiguration.ddev.php typo3conf/AdditionalConfiguration.php
- exec: composer install -d /var/www/html
- exec: npm --prefix typo3conf/ext/t3olayout/Build install
- exec: npm --prefix typo3conf/ext/t3olayout/Build run-script build
- exec: ../bin/typo3cms install:generatepackagestates
- exec: ../bin/typo3cms install:extensionsetupifpossible
- exec: cp private/typo3conf/AdditionalConfiguration.ddev.php private/typo3conf/AdditionalConfiguration.php
- exec: composer install
- exec: npm --prefix private/typo3conf/ext/t3olayout/Build install
- exec: npm --prefix private/typo3conf/ext/t3olayout/Build run-script build
- exec: vendor/bin/typo3cms install:generatepackagestates
- exec: vendor/bin/typo3cms install:extensionsetupifpossible
webimage_extra_packages: [php7.2-ldap]
use_dns_when_possible: true
timezone: Europe/Berlin
# This config.yaml was created with ddev version v1.9.1
# webimage: drud/ddev-webserver:v1.9.0
# dbimage: drud/ddev-dbserver:v1.9.0-10.2
# dbaimage: drud/phpmyadmin:v1.9.0
# bgsyncimage: drud/ddev-bgsync:v1.9.0
# However we do not recommend explicitly wiring these images into the
# config.yaml as they may break future versions of ddev.
# You can update this config.yaml using 'ddev config'.
# Key features of ddev's config.yaml:
# name: <projectname> # Name of the project, automatically provides
# http://projectname.ddev.site and https://projectname.ddev.site
# type: <projecttype> # drupal6/7/8, backdrop, typo3, wordpress, php
# docroot: <relative_path> # Relative path to the directory containing index.php.
# php_version: "7.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3"
# You can explicitly specify the webimage, dbimage, dbaimage lines but this
# is not recommended, as the images are often closely tied to ddev's' behavior,
# so this can break upgrades.
# webimage: <docker_image> # nginx/php docker image.
# dbimage: <docker_image> # mariadb docker image.
# dbaimage: <docker_image>
# bgsyncimage: <docker_image>
# router_http_port: <port> # Port to be used for http (defaults to port 80)
# router_https_port: <port> # Port for https (defaults to 443)
# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart"
# webserver_type: nginx-fpm # Can be set to apache-fpm or apache-cgi as well
# additional_hostnames:
# - somename
# - someothername
# would provide http and https URLs for "somename.ddev.site"
# and "someothername.ddev.site".
# additional_fqdns:
# - example.com
# - sub1.example.com
# would provide http and https URLs for "example.com" and "sub1.example.com"
# Please take care with this because it can cause great confusion.
# upload_dir: custom/upload/dir
# would set the destination path for ddev import-files to custom/upload/dir.
# working_dir:
# web: /var/www/html
# db: /home
# would set the default working directory for the web and db services.
# These values specify the destination directory for ddev ssh and the
# directory in which commands passed into ddev exec are run.
# omit_containers: ["dba", "ddev-ssh-agent"]
# would omit the dba (phpMyAdmin) and ddev-ssh-agent containers. Currently
# only those two containers can be omitted here.
# Note that these containers can also be omitted globally in the
# ~/.ddev/global_config.yaml or with the "ddev config global" command.
# nfs_mount_enabled: false
# Great performance improvement but requires host configuration first.
# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container
# webcache_enabled: false (deprecated)
# Was only for macOS, but now deprecated.
# See https://ddev.readthedocs.io/en/stable/users/performance/#using-webcache_enabled-to-cache-the-project-directory
# host_https_port: "59002"
# The host port binding for https can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.
# host_webserver_port: "59001"
# The host port binding for the ddev-webserver can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.
# host_db_port: "59002"
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
# unless explicitly specified.
# phpmyadmin_port: "1000"
# The PHPMyAdmin port can be changed from the default 8036
# mailhog_port: "1001"
# The MailHog port can be changed from the default 8025
# webimage_extra_packages: [php-yaml, php7.3-ldap]
# Extra Debian packages that are needed in the webimage can be added here
# This is ignored if a free-form .ddev/web-build/Dockerfile is provided
# dbimage_extra_packages: [telnet,netcat]
# Extra Debian packages that are needed in the dbimage can be added here
# This is ignored if a free-form .ddev/db-build/Dockerfile is provided
# use_dns_when_possible: true
# If the host has internet access and the domain configured can
# successfully be looked up, DNS will be used for hostname resolution
# instead of editing /etc/hosts
# Defaults to true
# project_tld: ddev.site
# The top-level domain used for project URLs
# The default "ddev.site" allows DNS lookup via a wildcard
# For backward compatibility this can be changed to "ddev.local"
# ngrok_args: --subdomain mysite --auth "user:pass"
# Provide extra flags to the "ngrok http" command, see
# https://ngrok.com/docs#http or run "ngrok http -h"
# provider: default # Currently either "default" or "pantheon"
#
# Many ddev commands can be extended to run tasks before or after the
# ddev command is executed, for example "post-start", "post-import-db",
# "pre-composer", "post-composer"
# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
#hooks:
# post-start:
# - exec: composer install -d /var/www/html
version: '3'
version: '3.6'
services:
web:
environment:
- TYPO3_CONTEXT=Development
\ No newline at end of file
- TYPO3_CONTEXT=Development
version: '3'
#ddev-generated
services:
db:
container_name: ddev-${DDEV_SITENAME}-db
image: $DDEV_DBIMAGE
stop_grace_period: 60s
volumes:
- "${DDEV_IMPORTDIR}:/db"
- "${DDEV_DATADIR}:/var/lib/mysql"
- ".:/mnt/ddev_config"
restart: "no"
user: "$DDEV_UID:$DDEV_GID"
ports:
- "3306"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.platform: ddev
com.ddev.app-type: typo3
com.ddev.approot: $DDEV_APPROOT
com.ddev.app-url: $DDEV_URL
environment:
- COLUMNS=$COLUMNS
- LINES=$LINES
web:
container_name: ddev-${DDEV_SITENAME}-web
image: $DDEV_WEBIMAGE
volumes:
- "../:/var/www/html:cached"
- ".:/mnt/ddev_config"
restart: "no"
user: "$DDEV_UID:$DDEV_GID"
depends_on:
- db
links:
- db:db
# ports is list of exposed *container* ports
ports:
- "80"
- "8025"
working_dir: /var/www/html/${DDEV_DOCROOT}
environment:
- DDEV_URL=$DDEV_URL
- DOCROOT=$DDEV_DOCROOT
- DDEV_PHP_VERSION=$DDEV_PHP_VERSION
- DDEV_PROJECT_TYPE=$DDEV_PROJECT_TYPE
- DDEV_ROUTER_HTTP_PORT=$DDEV_ROUTER_HTTP_PORT
- DDEV_ROUTER_HTTPS_PORT=$DDEV_ROUTER_HTTPS_PORT
- DDEV_XDEBUG_ENABLED=$DDEV_XDEBUG_ENABLED
- DEPLOY_NAME=local
- VIRTUAL_HOST=$DDEV_HOSTNAME
- COLUMNS=$COLUMNS
- LINES=$LINES
# HTTP_EXPOSE allows for ports accepting HTTP traffic to be accessible from <site>.ddev.local:<port>
# To expose a container port to a different host port, define the port as hostPort:containerPort
- HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,8025
# You can optionally expose an HTTPS port option for any ports defined in HTTP_EXPOSE.
# To expose an HTTPS port, define the port as securePort:containerPort.
- HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.platform: ddev
com.ddev.app-type: typo3
com.ddev.approot: $DDEV_APPROOT
com.ddev.app-url: $DDEV_URL
extra_hosts: ["unneeded:127.0.0.1"]
dba:
container_name: ddev-${DDEV_SITENAME}-dba
image: $DDEV_DBAIMAGE
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.platform: ddev
com.ddev.app-type: typo3
com.ddev.approot: $DDEV_APPROOT
com.ddev.app-url: $DDEV_URL
depends_on:
- db
links:
- db:db
ports:
- "80"
environment:
- PMA_USER=db
- PMA_PASSWORD=db
- VIRTUAL_HOST=$DDEV_HOSTNAME
# HTTP_EXPOSE allows for ports accepting HTTP traffic to be accessible from <site>.ddev.local:<port>
- HTTP_EXPOSE=8036
networks:
default:
external:
name: ddev_default
bin
vendor
typo3_src
html/index.php
html/typo3
html/fileadmin/
html/typo3conf/ext/*
!html/typo3conf/ext/t3omy/
html/typo3conf/AdditionalConfiguration.php
html/typo3conf/deprecation_*
html/typo3conf/ENABLE_INSTALL_TOOL
html/typo3conf/PackageStates.php
html/typo3conf/l10n
html/typo3temp/
html/uploads/
/vendor/
/var/
/public/
!/public/humans.txt
/private/
!/private/typo3conf/LocalConfiguration.php
!/private/typo3conf/AdditionalConfiguration.ddev.php
!/private/typo3conf/.gitignore
/auth.json
/html/typo3conf/realurl_autoconf.php
/.php_cs.cache
/.ddev/db_snapshots
/.ddev/sequelpro.spf
/.data
/.idea
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
before_script:
- apk add bash --no-cache
stages:
- dump
- build
- layout
- deploy
build:
stage: build
image: php:7.0-alpine
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
before_script:
- apk add bash --no-cache
- apk add git --update
- curl https://getcomposer.org/composer.phar -o composer.phar --silent
- chmod +x composer.phar
script:
- ./composer.phar config store-auths false
- ./composer.phar config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
- ./composer.phar install
artifacts:
paths:
- ./
expire_in: '1h'
except:
- assets
include:
- project: 't3o/t3olayout'
ref: master
file: '/Configuration/GitLab/t3o-builds.yml'
layout:
stage: layout
image: node:7
before_script:
- cd html/typo3conf/ext/t3olayout/Build
script:
- npm install
- npm run build
artifacts:
paths:
- ./
expire_in: '7d'
dependencies:
- build
except:
- assets
.deploy-template: &deploy_template
stage: deploy
image:
name: "torvitas/deployer:4.0.0-alpine"
entrypoint: [""]
before_script:
- mkdir -p /root/.ssh/
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_STAGE" | ssh-add -
- echo "$SSH_PRIVATE_KEY_PRODUCTION" | ssh-add -
- ssh-keyscan -p 22191 my-stage.typo3.org >> /root/.ssh/known_hosts
- ssh-keyscan -p 22193 my.typo3.org >> /root/.ssh/known_hosts
script:
- dep -f./.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
dependencies:
- layout
except:
- assets
deploy-master:
<<: *deploy_template
environment:
name: master
url: https://my.typo3.org/
only:
- master
deploy-develop:
<<: *deploy_template
environment:
name: develop
url: https://my-stage.typo3.org/
only:
- develop
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
STAGE_PORT: 22200
STAGE_HOST: "my-stage-v9.typo3.org"
PRODUCTION_PORT: 22201
PRODUCTION_HOST: "my.typo3.org"
DUMP_USER: "mystage"
DUMP_EXCLUDE_TABLES_LIST: "be_groups,be_sessions,be_users,cf_cache_hash,cf_cache_hash_tags,cf_cache_imagesizes,cf_cache_imagesizes_tags,cf_cache_news_category,cf_cache_news_category_tags,cf_cache_pages,cf_cache_pages_tags,cf_cache_pagesection,cf_cache_pagesection_tags,cf_cache_rootline,cf_cache_rootline_tags,cf_extbase_datamapfactory_datamap,cf_extbase_datamapfactory_datamap_tags,cf_extbase_object,cf_extbase_object_tags,cf_extbase_reflection,cf_extbase_reflection_tags,cf_tx_solr,cf_tx_solr_configuration,cf_tx_solr_configuration_tags,cf_tx_solr_tags,fe_groups,fe_sessions,fe_users,old_users,sys_domain,sys_log,tx_solr_cache,tx_solr_cache_tags,tx_t3oslack_domain_model_slackuser"
PHP_EXECUTABLE: "/opt/php/php72/bin/php"
dump-assets:
<<: *deploy_template
stage: dump
image: alpine:3.5
artifacts:
paths:
- ./assets/
expire_in: '3d'
script:
- apk add rsync --no-cache
- rsync -ah -e "ssh -p 22191" --exclude=typo3conf my@my-stage.typo3.org:ci/shared/ ./assets/
- ssh -p22191 my@my-stage.typo3.org "mysqldump -u${STAGE_DATABASE_USER} -p${STAGE_DATABASE_PASSWORD} -h127.0.0.1 ${STAGE_DATABASE_DB} | gzip -9 -c" > ./assets/db.sql.gz
dependencies:
when:
tags:
- proxy
only:
- assets
except:
<?php
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* This file represents the configuration for Code Sniffing PSR-2-related
* automatic checks of coding guidelines
* Install @fabpot's great php-cs-fixer tool via
*
* $ composer global require friendsofphp/php-cs-fixer
*
* And then simply run
*
* $ php-cs-fixer fix --config ../Build/.php_cs
*
* inside the TYPO3 directory. Warning: This may take up to 10 minutes.
*
* For more information read:
* https://www.php-fig.org/psr/psr-2/
* https://cs.sensiolabs.org
*/
if (PHP_SAPI !== 'cli') {
die('This script supports command line usage only. Please check your command.');
}
// Define in which folders to search and which folders to exclude
// Exclude some directories that are excluded by Git anyways to speed up the sniffing
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('typo3temp')
->in(__DIR__ . '/../../');
// Return a Code Sniffing configuration using
// all sniffers needed for PSR-2
// and additionally:
// - Remove leading slashes in use clauses.
// - PHP single-line arrays should not have trailing comma.
// - Single-line whitespace before closing semicolon are prohibited.
// - Remove unused use statements in the PHP source code
// - Ensure Concatenation to have at least one whitespace around
// - Remove trailing whitespace at the end of blank lines.
return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([
'@PSR2' => true,
'@DoctrineAnnotation' => true,
'no_leading_import_slash' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'concat_space' => ['spacing' => 'one'],
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'single_quote' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'phpdoc_no_package' => true,
'phpdoc_scalar' => true,
'no_blank_lines_after_phpdoc' => true,
'array_syntax' => ['syntax' => 'short'],
'whitespace_after_comma_in_array' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'no_alias_functions' => true,
'lowercase_cast' => true,
'no_leading_namespace_whitespace' => true,
'native_function_casing' => true,
'no_short_bool_cast' => true,
'no_unneeded_control_parentheses' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_trim' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'phpdoc_types' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_type_declaration' => ['space_before' => 'none'],
'cast_spaces' => ['space' => 'none'],
'declare_equal_normalize' => ['space' => 'single'],
'dir_constant' => true,
])->setFinder($finder);
......@@ -2,27 +2,24 @@
namespace Deployer;
require_once '/composer/vendor/deployer/deployer/recipe/common.php';
require_once '/composer/vendor/deployer/recipes/rsync.php';
require_once '/tmp/vendor/deployer/deployer/recipe/common.php';
require_once '/tmp/vendor/deployer/recipes/recipe/rsync.php';
$sharedDirectories = [
'html/fileadmin',
'html/uploads',
'html/.well-known'
'private/fileadmin',
'private/uploads',
'public/.well-known'
];
set('shared_dirs', $sharedDirectories);
$sharedFiles = [
'html/typo3conf/AdditionalConfiguration.php',
'private/typo3conf/AdditionalConfiguration.php',
'.cachetool.yml'
];
set('shared_files', $sharedFiles);
$writeableDirectories = [
'html/typo3temp',
'html/fileadmin',
'html/uploads'
'public/typo3temp'
];
set('writable_dirs', $writeableDirectories);
......@@ -30,6 +27,7 @@ $exclude = [
'.gitignore',
'.htaccess',
'.git',
'.ddev',
'Readme.rst',
'Readme.txt',
'Upgrading.rst',
......@@ -52,16 +50,17 @@ set('rsync', [
]);
set('rsync_src', './');
set('keep_releases', 10);
serverList('./.gitlab-ci/deployer/servers.yml');
set('php', '/opt/php/php70/bin/php');
inventory('./.gitlab-ci/deployer/servers.yml');
set('php', '/opt/php/php72/bin/php');
set('bin_folder', 'vendor/bin/');
task('typo3', function () {
run('cd {{release_path}} && {{php}} bin/typo3cms install:generatepackagestates');
run('cd {{release_path}} && {{php}} bin/typo3cms install:extensionsetupifpossible');
task('typo3', function() {
run('cd {{release_path}} && {{php}} {{bin_folder}}typo3cms install:generatepackagestates');
run('cd {{release_path}} && {{php}} {{bin_folder}}typo3cms install:extensionsetupifpossible');
});
task('cache', function () {
run('cd {{release_path}} && {{php}} bin/cachetool opcache:reset');
run('cd {{release_path}} && {{php}} {{bin_folder}}cachetool opcache:reset');
});
task('deploy', [
......@@ -74,5 +73,5 @@ task('deploy', [
'typo3',
'deploy:symlink',
'cache',
'cleanup',
'cleanup'
]);
master:
stage: production
host: my.typo3.org
port: 22193
hostname: my.typo3.org
port: 22201
user: my
writable_mode: chmod
forward_agent: true
deploy_path: ~/ci
develop:
stage: stage
host: my-stage.typo3.org
port: 22191
hostname: my-stage-v9.typo3.org
port: 22200
user: mystage
writable_mode: chmod
forward_agent: true
deploy_path: ~/ci/
Subproject commit 57323530b0771c5575efb38d64d1bf117716ebf5
<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" label.
For Layout issues please use this tracker:
- https://git-t3o.typo3.org/t3o/t3olayout/issues?label_name%5B%5D=bug
and verify the issue you're about to submit isn't a duplicate.
--->
### Summary
(Summarize the bug encountered concisely)
### Steps to reproduce
(How one can reproduce the issue - this is very important)
### Example URL
(Add an Url where we can see the issue)
### What is the current *bug* behavior?
(What actually happens)
### What is the expected *correct* behavior?
(What you should see instead)
**Acceptence Criterias**
* [ ] Must be fullfilled
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
### Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
/label ~bug
### Problem to solve
<!--- What problem do we solve? -->
### Further details
<!--- Include use cases, benefits, and/or goals (contributes to our vision?) -->
### Proposal
<!--- How are we going to solve the problem? Try to include the user journey! -->
### What does success look like, and how can we measure that?
<!--- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this -->
**Acceptence Criterias**
* [ ] Must be fullfilled
### Links / references
/label ~feature
### Describe the task
<!--- What problem do we solve? -->
### Further details
<!--- Include use cases, benefits, and/or goals (contributes to our vision?) -->
### What does success look like, and how can we measure that?
<!--- Define both the success metrics and acceptance criteria. Note that success metrics indicate the desired business outcomes, while acceptance criteria indicate when the solution is working correctly. If there is no way to measure success, link to an issue that will implement a way to measure this -->
**Acceptence Criterias**
* [ ] Must be fullfilled
### Links / references
/label ~task
**Who wants to be recovered:**
> Insert request
**old username**
**old e-mail adress**
**Process steps**
* [ ] user needs to confirm his old e-mail adress (reply with old adress)
* [ ] recover the user via backend
[submodule ".gitlab-ci/scripts"]
path = .gitlab-ci/scripts
url = https://github.com/torvitas/docker-scripts.git
# my.typo3.org documentation
my my.typo3.org is the entry point for all user profile related actions for
typo3.org frontend users.
## Local Extensions
* karma: manages community "kara" [documentation](extensions/karma/readme.md)
* t3o_ldap: Operation to write data into LDAP [documentation](extensions/t3o_ldap/ReadMe.md)
* t3o_slack: Sign up and link process to / with Slack [documentation](extensions/t3o_slack/Documentation/index.rst)
* t3omy: Project configuration (local templates, TCA additions, hooks) [documentation](extensions/t3omy/Documentation/index.rst)
## Service Documentation
Accountdata are documentated in a restricted project:
https://git-t3o.typo3.org/services/my.typo3.org/blob/master/README.md
\ No newline at end of file
......@@ -9,8 +9,8 @@
],
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org"
"type": "path",
"url": "extensions/*"
},
{
"type": "vcs",
......@@ -18,49 +18,40 @@
},
{
"type": "vcs",
"url": "https://git-t3o.typo3.org/t3o/t3o_slack.git"
},
{
"type": "vcs",
"url": "https://git-t3o.typo3.org/t3o/t3o_ldap.git"
"url": "https://github.com/in2code-de/userprofile.git"
},
{
"type": "vcs",
"url": "https://git-t3o.typo3.org/t3o/gitlab_api.git"
}
],
"support": {
"email": "maintenance@typo3.org",
"issues": "https://git-t3o.typo3.org/t3o/my/issues"
},
"require": {
"typo3/cms": "^8.7",
"typo3/cms-redirects": "^9.5",
"helhum/typo3-console": "^5.0",
"dmitryd/typo3-realurl": "^2.1",
"t3o/t3o_slack": " ^1.1",
"t3o/t3olayout": "^3.0",
"t3o/t3o_ldap": "^1.0",
"typo3-ter/femanager": "^4.0",
"in2code/userprofile": "^0.2",
"t3o/t3olayout": "dev-develop-v9",
"in2code/femanager": "^5.1",
"sjbr/static-info-tables": "^6.5",
"t3o/gitlab_api": "^1.0",
"gordalina/cachetool": "^3.2"
"gordalina/cachetool": "^4.0",
"t3o/t3omy": "@dev",
"t3o/t3o_slack": "@dev",
"t3o/t3o_ldap": "@dev",
"in2code/userprofile": "dev-singleview"
},
"config": {
"bin-dir": "bin"
"platform": {
"php": "7.2.11"
}
},
"extra": {
"typo3/cms": {
"web-dir": "html",
"web-dir": "public",
"root-dir": "private",
"cms-package-dir": "{$vendor-dir}/typo3/cms"
},
"helhum/typo3-console": {
"install-binary": true,
"install-extension-dummy": false
}
},
"autoload": {
"psr-4": {
"T3o\\T3olayout\\": "html/typo3conf/ext/t3olayout/Classes",
"T3o\\T3omy\\": "html/typo3conf/ext/t3omy/Classes",
"T3o\\Userprofile\\": "html/typo3conf/ext/userprofile/Classes"
}
}
}
This diff is collapsed.
rootPageId: 1
base: 'https://my.typo3.org'
baseVariants:
-
base: 'http://my.typo3.org.ddev.site'
condition: 'applicationContext == "Development"'
-
base: 'https://my-stage.typo3.org'
condition: 'applicationContext == "Testing"'
-
base: 'https://my.typo3.org'
condition: 'applicationContext == "Production"'
languages:
-
title: English
enabled: true
languageId: '0'
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: English
hreflang: en-US
direction: ''
flag: gb
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=404'
routes:
-
route: robots.txt
type: staticText
content: "User-agent: *\r\nDisallow: /typo3/\r\nDisallow: /fileadmin/\r\nAllow: /typo3/sysext/frontend/Resources/Public/*"
<?php
namespace T3o\Karma\Controller;
use T3o\Karma\Domain\Repository\FrontendUserRepository;
use T3o\Karma\Domain\Repository\LedgerEntryRepository;
use T3o\Karma\Service\KarmaService;
/***************************************************************
* Copyright notice
*
* (c) 2018
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* @var KarmaService
*/
protected $karmaService;
/**
* @var \T3o\Karma\Domain\Repository\FrontendUserRepository
*/
protected $frontendUserRepository;
/**
* @var LedgerEntryRepository
*/
protected $ledgerEntryRepository;
/**
* @param KarmaService $karmaService
*/
public function injectKarmaService(KarmaService $karmaService)
{
$this->karmaService = $karmaService;
}
/**
* @param \T3o\Karma\Domain\Repository\FrontendUserRepository $frontendUserRepository
*/
public function injectFrontendUserRepository(FrontendUserRepository $frontendUserRepository)
{
$this->frontendUserRepository = $frontendUserRepository;
}
/**
* @param LedgerEntryRepository $ledgerEntryRepository
*/
public function injectLedgerEntryRepository(LedgerEntryRepository $ledgerEntryRepository)
{
$this->ledgerEntryRepository = $ledgerEntryRepository;
}
/**
* @return array The source codes for karma
*/
public function getKarmaSourceCodes()
{
return array_keys($this->settings['sourceCodes']);
}
}
<?php
namespace T3o\Karma\Controller;
use T3o\Karma\Utility\UserProfileChangeKarmaIssuerUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
/***************************************************************
* Copyright notice
*
* (c) 2018
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class ManagerController extends AbstractController
{
/**
* The test action
*/
public function testAction()
{
$frontendUser = $this->frontendUserRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var UserProfileChangeKarmaIssuerUtility $testUserProfileChangeKarmaIssuerSlot */
$testUserProfileChangeKarmaIssuerSlot = $objectManager->get(UserProfileChangeKarmaIssuerUtility::class);
$testUserProfileChangeKarmaIssuerSlot->newUserWasCreated($frontendUser);
}
}
<?php
namespace T3o\Karma\Controller;
/***************************************************************
* Copyright notice
*
* (c) 2018
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class UserDisplayController extends AbstractController
{
/**
* Lists karma ledger entries for the currently logged-in user
*/
public function listAction()
{
$entries = $this->ledgerEntryRepository->findByUser($GLOBALS['TSFE']->fe_user->user['uid']);
$this->view->assign('entries', $entries);
}
/*
* Shows a small karma earned widget for the currently logged-in user
*/
public function statusWidgetAction()
{
if ($GLOBALS['TSFE']->fe_user->user['uid']) {
$frontendUser = $this->frontendUserRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
$immutableValue = $this->karmaService->getImmutableKarmaForUser($frontendUser);
$mutableValue = $this->karmaService->getMutableKarmaForUser($frontendUser);
$sourceTotals = [];
foreach ($this->getKarmaSourceCodes() as $sourceCode) {
$sourceTotals[$sourceCode] = $this->karmaService->getImmutableKarmaSourceTotalForUser($sourceCode, $frontendUser);
}
$this->view->assign('immutableValue', $immutableValue);
$this->view->assign('mutableValue', $mutableValue);
$this->view->assign('hasKarma', ($immutableValue > 0 || $mutableValue > 0));
$this->view->assign('sourceTotals', $sourceTotals);
}
}
}
<?php
namespace T3o\Karma\Domain\Model;
/***************************************************************
* Copyright notice
*
* (c) 2018
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class Campaign extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* The title of the campaign
*
* @var string
*/
protected $title;
/**
* The percentage with which to change the entry value (no change = 100)
*
* @var int
*/
protected $percent;
/**
* The value to add or subtract from the entry value
*
* @var int
*/
protected $value;
/**
* Returns the title of the campaign
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set the title of the campaign
*
* @param string $title
*/
public function setTitle(string $title)
{
$this->title = $title;
}
/**
* Return the percentage amount to change the entry value
*
* No change = 100
*
* @return int
*/
public function getPercent()
{
return $this->percent;
}
/**
* Set the percentage value with which to change an entry
*
* No change = 100
*
* @param int $percent
*/
public function setPercent(int $percent)
{
$this->percent = $percent;
}
/**
* Returns the value to add or subtract from the entry value
*
* @return int
*/
public function getValue()
{
return $this->value;
}
/**
* Set the value to add or subtract from the entry value
*
* @param int $value
*/
public function setValue(int $value)
{
$this->value = $value;
}
}
<?php
namespace T3o\Karma\Domain\Model;
/***************************************************************
* Copyright notice
*
* (c) 2018
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class FrontendUser extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
{
/**
* Cached immutable karma total
*
* @var int
*/
protected $karmaImmutableValueCache = 0;
/**
* Cached mutable karma total
*
* @var int
*/
protected $karmaMutableValueCache = 0;
/**
* Karma total cache generation timestamp
*
* @var int
*/
protected $karmaCacheTimestamp = 0;
/**
* JSON encoded associative array containing totals for the karma source
*
* @var string
*/
protected $karmaSourceTotalCache = '';
/**
* @var array|null
*/
private $karmaSourceTotalCacheDecoded;
/**
* Get the cached immutable karma total
*
* @return int
*/
public function getKarmaImmutableValueCache(): int
{
return $this->karmaImmutableValueCache;
}
/**
* Set cached immutable karma total
*
* @param int $karmaImmutableValueCache
*/
public function setKarmaImmutableValueCache(int $karmaImmutableValueCache)
{
$this->karmaImmutableValueCache = $karmaImmutableValueCache;
}
/**
* Get cached mutable karma total
*
* @return int
*/
public function getKarmaMutableValueCache(): int
{
return $this->karmaMutableValueCache;
}
/**
* Set cached mutable karma total
*
* @param int $karmaMutableValue
*/
public function setKarmaMutableValueCache(int $karmaMutableValue)
{
$this->karmaMutableValueCache = $karmaMutableValue;
}
/**
* Get karma total cache generation timestamp
*
* @return int
*/
public function getKarmaCacheTimestamp(): int
{
return $this->karmaCacheTimestamp;
}
/**
* Set karma total cache generation timestamp
*
* @param int $karmaCacheTimestamp
*/
public function setKarmaCacheTimestamp(int $karmaCacheTimestamp)
{
$this->karmaCacheTimestamp = $karmaCacheTimestamp;
}
/**
* Get the JSON string containing the karma source total cache array
*
* @return string
*/
public function getKarmaSourceTotalCache(): string
{
return $this->karmaSourceTotalCache;
}
/**
* Set the JSON string containing the karma source total cache array
*
* @param string $karmaSourceTotalCache
*/
public function setKarmaSourceTotalCache(string $karmaSourceTotalCache)
{
$this->karmaSourceTotalCache = $karmaSourceTotalCache;
}
/**
* @return array|null
*/
public function getKarmaSourceTotalCacheDecoded(): ?array
{
if ($this->karmaSourceTotalCacheDecoded === null) {
$this->karmaSourceTotalCacheDecoded = json_decode($this->getKarmaSourceTotalCache());
if (!is_array($this->karmaSourceTotalCacheDecoded)) {
$this->karmaSourceTotalCacheDecoded = [];
$this->setKarmaSourceTotalCache(json_encode($this->karmaSourceTotalCacheDecoded));
}
}
return $this->karmaSourceTotalCacheDecoded;
}
/**
* @param array|null $karmaSourceTotalCacheDecoded
*/
public function setKarmaSourceTotalCacheDecoded(array $karmaSouceTotalDecoded)
{
$this->karmaSourceTotalCacheDecoded = $karmaSouceTotalDecoded;
$this->setKarmaSourceTotalCache(json_encode($this->karmaSourceTotalCacheDecoded));
}
}
<?php
namespace T3o\Karma\Domain\Model;
/***************************************************************
* Copyright notice
*
* (c) 2018
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class LedgerEntry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* @var \DateTime
*/
protected $crdate;
/**
* @var \DateTime
*/
protected $tstamp;
/**
* The date when the entry expired, if set.
*
* Set when the entry expires.
*
* @var int
*/
protected $expired;
/**
* The unchangeable ledgerentry entry value
*
* @var int
*/
protected $immutableValue;
/**
* The changeable ledgerentry entry value.
*
* Can be depreciated over time or set to zero.
*
* @var int
*/
protected $mutableValue;
/**
* The entry karma source code
*