This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\ExtensionName\Domain\Repository; | |
class XyzRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { | |
public function findByFoo($value) | |
{ | |
$query = $this->createQuery(); | |
#$query->setFancyConstrations(...) | |
$this->debugQuery($query); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Vendor\ExtensionName\Domain\Repository; | |
class XyzRepository extends \TYPO3\CMS\Extbase\Persistence\Repository { | |
public function findByFoo($value) | |
{ | |
$query = $this->createQuery(); | |
#$query->setFancyConstrations(...) | |
$this->debugQuery($query->execute()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('TYPO3_MODE')) { | |
die('Access denied.'); | |
} | |
$GLOBALS['TCA']['tx_customext_domain_model_department'] = array( | |
'ctrl' => array( | |
'title' => 'LLL:EXT:custom_ext/Resources/Private/Language/locallang_db.xlf:tx_custom_ext_domain_model_department', | |
// title prefixed by department_id | |
'label' => 'department_id', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DB='xxx' | |
DB_GROUP='' | |
WEBROOT='/var/www/vhosts/xxx/html' | |
FOLDERS=( 'fileadmin' 'uploads' ) | |
read -p "Backup DB? (y/N) " BACKUP_DB | |
if [ "$BACKUP_DB" == "y" ]; then | |
TABLES=`mysql --defaults-group-suffix=$DB_GROUP -BN $DB -e "show tables" | egrep -v '(cf_|cache|sys_log|sys_history|sys_refindex|tx_devlog|tx_solr_|tx_realurl_errorlog|zzz_deleted_|TABLE)' | xargs` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------- | |
# PHP-Compatibility | |
# ------------------------- | |
# Add dev requirements | |
composer require --dev phpcompatibility/php-compatibility | |
# List installed configs (should be none) | |
bin/phpcs --config-show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (version_compare(PHP_VERSION, '7.0.0', '>=') { | |
... | |
} | |
if (version_compare(TYPO3_version, '8.7.0', '>=') { | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://get.sensiolabs.org/security-checker.phar | |
php security-checker.phar security:check composer.lock | |
# see https://github.com/sensiolabs/security-checker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test $SHELL = /bin/sh -a -x /bin/bash && \ | |
SHELL=/bin/bash ENV=~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Don't log any deprecations | |
unset($GLOBALS['TYPO3_CONF_VARS']['LOG']['TYPO3']['CMS']['deprecations']); | |
// Log only errors and higher (default is 'warning') | |
$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = [ | |
\TYPO3\CMS\Core\Log\LogLevel::ERROR => [ | |
\TYPO3\CMS\Core\Log\Writer\FileWriter::class => [], | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load one of these files | |
source /usr/lib/git-core/git-sh-prompt | |
source /usr/share/git-core/contrib/completion/git-prompt.sh | |
source /usr/local/git/contrib/completion/git-prompt.sh | |
source /etc/bash_completion.d/git | |
# Set flags | |
GIT_PS1_SHOWDIRTYSTATE=true | |
GIT_PS1_SHOWUNTRACKEDFILES=true |