Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ jobs:

- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: nixpkgs=channel:nixos-unstable:phps=https://github.com/fossar/nix-phps/archive/master.tar.gz
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE=
substituters = https://cache.nixos.org/ https://fossar.cachix.org

- name: Run Unit Tests PHP8.1
run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-unit
Expand Down Expand Up @@ -142,7 +145,10 @@ jobs:

- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: nixpkgs=channel:nixos-unstable:phps=https://github.com/fossar/nix-phps/archive/master.tar.gz
extra_nix_config: |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE=
substituters = https://cache.nixos.org/ https://fossar.cachix.org

- name: Run Acceptance Tests PHP8.1
run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-acceptance
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/EventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ protected function createDemandObjectFromSettings(string $type, array $settings)
EventDemand::class
);

if (isset($settings['view'][$type]) &&
is_array($settings['view'][$type])
if (isset($settings['view'][$type])
&& is_array($settings['view'][$type])
) {
// Use default TypoScript settings for plugin configuration
$limit = (int)$settings['view'][$type]['limit'];
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Model/EventDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ public function getBestSpecialPrice(array $frontendUserGroupIds = []): ?SpecialP
if ($this->specialPrices) {
foreach ($this->specialPrices as $specialPrice) {
if (!isset($bestSpecialPrice) || $specialPrice->getPrice() < $bestSpecialPrice->getPrice()) {
if (!$specialPrice->getFrontendUserGroup() ||
in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds)
if (!$specialPrice->getFrontendUserGroup()
|| in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds)
) {
$bestSpecialPrice = $specialPrice;
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Model/PriceCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ public function getBestSpecialPrice(array $frontendUserGroupIds = []): ?SpecialP
if ($this->specialPrices) {
foreach ($this->specialPrices as $specialPrice) {
if (!isset($bestSpecialPrice) || $specialPrice->getPrice() < $bestSpecialPrice->getPrice()) {
if (!$specialPrice->getFrontendUserGroup() ||
in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds)
if (!$specialPrice->getFrontendUserGroup()
|| in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds)
) {
$bestSpecialPrice = $specialPrice;
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Repository/CategoryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ protected function buildSubcategories(array $categoriesArray, array $parentCateg
foreach ($categoriesArray as $category) {
if ($category['parent'] === $parentCategory['uid']) {
$newCategory = $category;
$newCategory['subcategories'] =
$this->buildSubcategories($categoriesArray, $category);
$newCategory['subcategories']
= $this->buildSubcategories($categoriesArray, $category);
$categories[] = $newCategory;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Classes/Domain/Repository/EventRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ protected function createOrderingsFromDemand(EventDemand $demand): array

if (!empty($orderList)) {
foreach ($orderList as $orderItem) {
[$orderField, $ascDesc] =
GeneralUtility::trimExplode(' ', $orderItem, true);
[$orderField, $ascDesc]
= GeneralUtility::trimExplode(' ', $orderItem, true);
if ($ascDesc) {
$orderings[$orderField] = ((strtolower($ascDesc) === 'desc') ?
QueryInterface::ORDER_DESCENDING :
QueryInterface::ORDER_ASCENDING);
$orderings[$orderField] = ((strtolower($ascDesc) === 'desc')
? QueryInterface::ORDER_DESCENDING
: QueryInterface::ORDER_ASCENDING);
} else {
$orderings[$orderField] = QueryInterface::ORDER_ASCENDING;
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Updates/SwitchableControllerActionsPluginUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ protected function getMigrationRecords(): array
protected function getTargetListType(string $sourceListType, string $switchableControllerActions): string
{
foreach (self::MIGRATION_SETTINGS as $setting) {
if ($setting['sourceListType'] === $sourceListType &&
$setting['switchableControllerActions'] === $switchableControllerActions
if ($setting['sourceListType'] === $sourceListType
&& $setting['switchableControllerActions'] === $switchableControllerActions
) {
return $setting['targetListType'];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@

// prepend category restriction at the beginning of foreign_table_where
if (!empty($categoryRestriction)) {
$GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where'] = $categoryRestriction .
$GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where'];
$GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where'] = $categoryRestriction .
$GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where'];
$GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where'] = $categoryRestriction
. $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where'];
$GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where'] = $categoryRestriction
. $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where'];
}
}
4 changes: 2 additions & 2 deletions Configuration/TCA/Overrides/tx_kesearch_indexerconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

if (ExtensionManagementUtility::isLoaded('ke_search')) {
$GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['startingpoints_recursive']['displayCond'] .=
',carteventsindexer,cartsingleeventindexer';
$GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['startingpoints_recursive']['displayCond']
.= ',carteventsindexer,cartsingleeventindexer';
}
16 changes: 8 additions & 8 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,26 @@

// Cart Hooks

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cart']['CartEvents']['Form']['AddToCartFinisher'] =
AddToCartFinisher::class;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cart']['CartEvents']['Form']['AddToCartFinisher']
= AddToCartFinisher::class;

// processDatamapClass Hook

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['cartevents_allowed'] =
DatamapDataHandlerHook::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['cartevents_allowed']
= DatamapDataHandlerHook::class;

// clearCachePostProc Hook

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['cartevents_clearcache'] =
DataHandler::class . '->clearCachePostProc';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['cartevents_clearcache']
= DataHandler::class . '->clearCachePostProc';

// register "cartevents:" namespace
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['cartevents'][]
= 'Extcode\\CartEvents\\ViewHelpers';

// update wizard for slugs
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['cartEventsSlugUpdater'] =
SlugUpdater::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['cartEventsSlugUpdater']
= SlugUpdater::class;

// translation overrides

Expand Down
10 changes: 8 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
pkgs ? import <nixpkgs> { }
,php81 ? import <phps>
,php85 ? import (fetchTarball "https://github.com/piotrkwiecinski/nixpkgs/archive/1c614d75004b9eb1ecda6ddeb959c4f544403de5.tar.gz") {}
,phpVersion ? "php81"
}:

let
php = pkgs.${phpVersion}.buildEnv {
phpVersionPkgs =
if (phpVersion == "php85") then php85.${phpVersion}
else if (phpVersion == "php81") then php81.packages.x86_64-linux.${phpVersion}
else pkgs.${phpVersion};
php = phpVersionPkgs.buildEnv {
extensions = { enabled, all }: enabled ++ (with all; [
xdebug
]);
Expand All @@ -14,7 +20,7 @@ let
memory_limit = 4G
'';
};
inherit(pkgs."${phpVersion}Packages") composer;
inherit(phpVersionPkgs.packages) composer;

projectInstall = pkgs.writeShellApplication {
name = "project-install";
Expand Down