Skip to content

Commit 29d5e81

Browse files
committed
Merge branch 'release/8.3.0'
2 parents 8d6488f + 6e49caf commit 29d5e81

File tree

8 files changed

+52
-8
lines changed

8 files changed

+52
-8
lines changed

.github/workflows/ter-release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: TER release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
ter-release:
10+
name: TER release
11+
runs-on: ubuntu-latest
12+
env:
13+
TYPO3_EXTENSION_KEY: 'powermail'
14+
REPOSITORY_URL: 'https://github.com/einpraegsam/powermail'
15+
TYPO3_API_TOKEN: ${{ secrets.TYPO3_API_TOKEN }}
16+
TYPO3_API_USERNAME: ${{ secrets.TYPO3_API_USERNAME }}
17+
TYPO3_API_PASSWORD: ${{ secrets.TYPO3_API_PASSWORD }}
18+
19+
steps:
20+
- name: Get the version
21+
id: get_version
22+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: '7.4'
28+
extensions: intl, mbstring, xml, soap, zip, curl
29+
30+
- name: Install EXT:tailor
31+
run: composer global require typo3/tailor --prefer-dist --no-progress --no-suggest
32+
33+
- name: Upload EXT:${{ env.EXTENSION_KEY }} as ${{ steps.get_version.outputs.VERSION }} to TER
34+
run: php ~/.composer/vendor/bin/tailor ter:publish ${{ steps.get_version.outputs.VERSION }} --artefact=${{ env.REPOSITORY_URL }}/archive/${{ steps.get_version.outputs.VERSION }}.zip --comment="New release of version ${{ steps.get_version.outputs.VERSION }} - see details, changelog and documentation on ${{ env.REPOSITORY_URL }}"

Classes/Domain/Model/Mail.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ public function setBody(string $body): Mail
258258
*/
259259
public function getFeuser()
260260
{
261+
if ($this->feuser instanceof LazyLoadingProxy) {
262+
$this->feuser->_loadRealInstance();
263+
}
261264
return $this->feuser;
262265
}
263266

Classes/Domain/Service/Mail/ReceiverMailReceiverPropertiesService.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
use In2code\Powermail\Utility\ObjectUtility;
1212
use In2code\Powermail\Utility\TemplateUtility;
1313
use In2code\Powermail\Utility\TypoScriptUtility;
14-
use TYPO3\CMS\Beuser\Domain\Model\Demand;
1514
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
1615
use TYPO3\CMS\Core\Utility\GeneralUtility;
1716
use TYPO3\CMS\Extbase\Domain\Repository\BackendUserRepository;
1817
use TYPO3\CMS\Extbase\Object\Exception;
18+
use TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException;
1919
use TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException;
2020
use TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotReturnException;
2121

@@ -182,14 +182,15 @@ protected function getEmailsFromFeGroup(array $emailArray, int $uid): array
182182
* @param int $uid be_groups.uid
183183
* @return array
184184
* @throws Exception
185+
* @throws InvalidQueryException
185186
*/
186187
protected function getEmailsFromBeGroup(array $emailArray, int $uid): array
187188
{
188189
if ((int)$this->settings['receiver']['type'] === self::RECEIVERS_BACKENDGROUP && !empty($uid)) {
190+
/** @var BackendUserRepository $beUserRepository */
189191
$beUserRepository = ObjectUtility::getObjectManager()->get(BackendUserRepository::class);
190-
$demand = ObjectUtility::getObjectManager()->get(Demand::class);
191-
$demand->setBackendUserGroup($uid);
192-
$users = $beUserRepository->findDemanded($demand);
192+
$query = $beUserRepository->createQuery();
193+
$users = $query->matching($query->contains('usergroup', $uid))->execute();
193194
$emailArray = [];
194195
/** @var User $user */
195196
foreach ($users as $user) {

Classes/Domain/Service/Mail/SendDisclaimedMailPreflight.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function sendMail(Mail $mail): void
9191
'format' => $this->settings['sender']['mailformat'],
9292
'variables' => ['mail' => $mail]
9393
];
94-
$this->sendMailService->sendMail($email, $mail, $this->settings, 'optin');
94+
$this->sendMailService->sendMail($email, $mail, $this->settings, 'disclaimer');
9595
}
9696
}
9797
}

Classes/Domain/Validator/ForeignValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function addErrors(Result $result): void
7070
if (!empty($errors)) {
7171
/** @var Error $error */
7272
foreach ($errors as $error) {
73-
$this->addError($error->getMessage(), $error->getCode());
73+
$this->addError($error->getMessage(), $error->getCode(), $error->getArguments(), $error->getTitle());
7474
}
7575
$this->setValidState(false);
7676
}

Classes/Utility/TemplateUtility.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static function getTemplateFolders(string $part = 'template'): array
3636
);
3737
if (!empty($extbaseConfig['view'][$part . 'RootPaths'])) {
3838
$templatePaths = $extbaseConfig['view'][$part . 'RootPaths'];
39+
ksort($templatePaths, SORT_NUMERIC);
3940
$templatePaths = array_values($templatePaths);
4041
}
4142
if (empty($templatePaths)) {
@@ -163,6 +164,6 @@ public static function fluidParseString(string $string, array $variables = []):
163164
$standaloneView = ObjectUtility::getObjectManager()->get(StandaloneView::class);
164165
$standaloneView->setTemplateSource($string);
165166
$standaloneView->assignMultiple($variables);
166-
return $standaloneView->render();
167+
return $standaloneView->render() ?? '';
167168
}
168169
}

Documentation/Changelog/Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
| Version | Release Date | Description |
66
|------------ |--------------|-----------------------------------------------------------------------------------------------------------------------|
7+
| 8.3.0 | 2021-02-16 | Feature: Add autodeployment functionality to TER |
8+
| | | Bugfix: Foreign-Validator compatibility to core methods |
9+
| | | Bugfix: Reanimate sending emails to backend users |
10+
| | | Bugfix: Harden template utility functions against type errors |
11+
| | | Bugfix: Resolve LazyLoadingProxy to fe_users relations |
712
| 8.2.4 | 2020-12-02 | Bugfix: Fix possible exception when extending powermail with own validators and using a confirmation view |
813
| 8.2.3 | 2020-11-08 | Bugfix: Set tx_powermail_domain_model_mail.fe_user value for logged in users |
914
| | | Bugfix: Fix link from PluginPreview to powermail module |

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
and easy to use mailform extension with a lots of features
1010
(spam prevention, marketing information, optin, ajax submit, diagram analysis, etc...)',
1111
'category' => 'plugin',
12-
'version' => '8.2.4',
12+
'version' => '8.3.0',
1313
'state' => 'stable',
1414
'author' => 'Powermail Development Team',
1515
'author_email' => 'alexander.kellner@in2code.de',

0 commit comments

Comments
 (0)