Skip to content

Commit

Permalink
Merge branch 'main' into feature/site-sets
Browse files Browse the repository at this point in the history
  • Loading branch information
linawolf authored Sep 12, 2024
2 parents a3ac866 + 82d2e52 commit 54deb71
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
4 changes: 3 additions & 1 deletion Build/rector/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use Ssch\TYPO3Rector\CodeQuality\General\ConvertImplicitVariablesToExplicitGlobalsRector;
Expand Down Expand Up @@ -46,13 +47,14 @@
ConvertImplicitVariablesToExplicitGlobalsRector::class,
])
->withConfiguredRule(ExtEmConfRector::class, [
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '13.1.0-13.99.99',
ExtEmConfRector::TYPO3_VERSION_CONSTRAINT => '13.3.0-13.99.99',
ExtEmConfRector::ADDITIONAL_VALUES_TO_BE_REMOVED => [],
])
// If you use importNames(), you should consider excluding some TYPO3 files.
->withSkip([
// AddLiteralSeparatorToNumberRector would make the exception codes more readable.
// But as they are just timestamps this is not needed/wanted.
AddLiteralSeparatorToNumberRector::class,
RemoveParentCallWithoutParentRector::class,
])
;
19 changes: 8 additions & 11 deletions Classes/ViewHelpers/GravatarViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use TYPO3\CMS\Core\Utility\HttpUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;

/*
* This file is part of the TYPO3 CMS project.
Expand All @@ -28,16 +27,18 @@
* See http://www.gravatar.com
* = Examples =
* <code>
* <blog:gravatar emailAddress="[email protected]" size="40" defaultImageUri="someDefaultImage" />
* <blog:gravatar emailAddress="[email protected]"
* size="40"
* defaultImageUri="someDefaultImage"
* alt="Gravator icon of {comment.author}"
* data-name="{comment.author}" />
* </code>
* <output>
* <img src="http://www.gravatar.com/avatar/4a28b782cade3dbcd6e306fa4757849d?d=someDefaultImage&s=40" />
* </output>
*/
class GravatarViewHelper extends AbstractTagBasedViewHelper
{
use CompileWithRenderStatic;

/**
* @var string
*/
Expand All @@ -47,15 +48,11 @@ public function __construct(private readonly UriFactory $uriFactory)
parent::__construct();
}

/**
* Initialize arguments
*/
public function initializeArguments(): void
{
$this->registerUniversalTagAttributes();
$this->registerArgument('emailAddress', 'string', '', true)
->registerArgument('defaultImageUri', 'string', '', false)
->registerArgument('size', 'int', '', false);
$this->registerArgument('emailAddress', 'string', '', true);
$this->registerArgument('defaultImageUri', 'string', '');
$this->registerArgument('size', 'int', '');
}

public function render(): string
Expand Down
9 changes: 8 additions & 1 deletion Resources/Private/Templates/Post/Show.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ <h2>
<ol>
<f:for each="{post.comments}" as="comment">
<li>
<blog:gravatar emailAddress="{comment.email}" defaultImageUri="{f:uri.resource(path: '{settings.defaultGravator}', absolute: 1)}" size="40" class="tx-blogexample-gravatar" />
<blog:gravatar
emailAddress="{comment.email}"
defaultImageUri="{f:uri.resource(path: '{settings.defaultGravator}', absolute: 1)}"
size="40"
class="tx-blogexample-gravatar"
alt="Gravator icon of {comment.author}"
data-name="{comment.author}"
/>
<f:link.email email="{comment.author}">{comment.author}</f:link.email>
<span class="tx-blogexample-metadata"><f:translate key="postedOn" default="[posted on]" /> {post.date -> f:format.date(format: '{f:translate(key: \'culture.date.formatLong\')}')}</span>
<p>
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'state' => 'stable',
'constraints' => [
'depends' => [
'typo3' => '13.1.0-13.99.99',
'typo3' => '13.3.0-13.99.99',
],
'conflicts' => [],
'suggests' => [],
Expand Down

0 comments on commit 54deb71

Please sign in to comment.