Skip to content

Commit

Permalink
Merge pull request #33 from jweiland-net/removeTypo39compatibility
Browse files Browse the repository at this point in the history
Remove typo39compatibility
  • Loading branch information
sfroemkenjw committed Jul 14, 2023
2 parents 7238743 + 7046a96 commit 6a0acff
Show file tree
Hide file tree
Showing 18 changed files with 168 additions and 117 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -10,8 +10,13 @@ jobs:
strategy:
fail-fast: false
matrix:
typo3: [^9.5, ^10.4]
typo3: [^10.4, ^11.5]
php: ['7.4']
include:
- typo3: ^11.5
php: '8.0'
- typo3: ^11.5
php: '8.1'

services:
mysql:
Expand Down
36 changes: 24 additions & 12 deletions Build/php-cs-fixer/config.php
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the package jweiland/walls-io-proxy.
* This file is part of the package jweiland/mediapool.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
Expand All @@ -20,30 +20,40 @@
LICENSE file that was distributed with this source code.
COMMENT;

$finder = PhpCsFixer\Finder::create()
->name('*.php')
->exclude('.build')
->in(__DIR__);

return (new \PhpCsFixer\Config())
->setFinder($finder)
->setFinder(
(new PhpCsFixer\Finder())
->ignoreVCSIgnored(true)
->in([
__DIR__ . '/../../Build/',
__DIR__ . '/../../Classes/',
__DIR__ . '/../../Configuration/',
])
)
->setUsingCache(false)
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PSR2' => true,
'@PER' => true,
'header_comment' => [
'header' => $headerComment,
'comment_type' => 'comment',
'separate' => 'both',
'location' => 'after_declare_strict',
],
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'braces' => ['allow_single_line_closure' => true],
'cast_spaces' => ['space' => 'none'],
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'dir_constant' => true,
'function_to_constant' => ['functions' => ['get_called_class', 'get_class', 'get_class_this', 'php_sapi_name', 'phpversion', 'pi']],
'function_typehint_space' => true,
'lowercase_cast' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'modernize_strpos' => true,
'modernize_strpos' => false,
'modernize_types_casting' => true,
'native_function_casing' => true,
'new_with_braces' => true,
Expand All @@ -58,10 +68,11 @@
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_superfluous_elseif' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_comma_in_singleline' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_nullsafe_operator' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']],
Expand All @@ -76,9 +87,10 @@
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_type_declaration' => ['space_before' => 'none'],
'single_quote' => true,
'single_space_after_construct' => true,
'single_line_comment_style' => ['comment_types' => ['hash']],
'single_trait_insert_per_statement' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'whitespace_after_comma_in_array' => true,
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
]);
5 changes: 2 additions & 3 deletions Classes/Service/WallsService.php
Expand Up @@ -99,8 +99,7 @@ protected function getUncachedRequestFromWallsIO(RequestInterface $wallsIoReques
$response = $this->client->processRequest($wallsIoRequest);

if (
is_array($response)
&& array_key_exists('status', $response)
array_key_exists('status', $response)
&& $response['status'] === 'success'
&& array_key_exists('data', $response)
&& is_array($response['data'])
Expand Down Expand Up @@ -187,7 +186,7 @@ public function clearCache(int $contentRecordUid): int
$registry = GeneralUtility::makeInstance(Registry::class);
$registry->remove('WallsIoProxy', 'ContentRecordUid_' . $contentRecordUid);

GeneralUtility::flushDirectory($this->getTargetDirectory($contentRecordUid));
GeneralUtility::rmdir($this->getTargetDirectory($contentRecordUid));

return 1;
}
Expand Down
Empty file.
16 changes: 2 additions & 14 deletions Configuration/TypoScript/setup.txt
@@ -1,14 +1,2 @@
tt_content.wallsioproxy {
templateRootPaths.0 = EXT:walls_io_proxy/Resources/Private/Templates/
dataProcessing {
1 = JWeiland\WallsIoProxy\DataProcessing\AddWallsProcessor
}
}

page.includeCSS {
wall-fluid = EXT:walls_io_proxy/Resources/Public/Css/WallFluid.css
}

page.includeJSFooterlibs {
wall-fluid = EXT:walls_io_proxy/Resources/Public/JavaScript/Wall.js
}
# Important: This file is deprecated and will be removed with next major version of EXT:walls_io_proxy
@import 'EXT:walls_io_proxy/Configuration/TypoScript/Gallery/setup.typoscript'
14 changes: 14 additions & 0 deletions Configuration/TypoScript/setup.typoscript
@@ -0,0 +1,14 @@
tt_content.wallsioproxy {
templateRootPaths.0 = EXT:walls_io_proxy/Resources/Private/Templates/
dataProcessing {
1 = JWeiland\WallsIoProxy\DataProcessing\AddWallsProcessor
}
}

page.includeCSS {
wall-fluid = EXT:walls_io_proxy/Resources/Public/Css/WallFluid.css
}

page.includeJSFooterlibs {
wall-fluid = EXT:walls_io_proxy/Resources/Public/JavaScript/Wall.js
}
12 changes: 6 additions & 6 deletions Documentation/Administrator/Index.rst
Expand Up @@ -7,16 +7,16 @@
Administrator manual
====================

This chapter describes how to manage the extension from a superuser point of view.

This chapter describes how to manage the extension from a superuser point
of view.

Clear Cache
===========

`walls_io_proxy` caches all requested wall posts and containing images. So, if API of walls.io is offline
our extension will deliver the cached wall posts.
As an administrator you can use the `Clear Cache` button (visible on the plugin preview) to clear all
cached wall posts and images.
`walls_io_proxy` caches all requested wall posts and containing images. So, if
API of walls.io is offline our extension will deliver the cached wall posts.
As an administrator you can use the `Clear Cache` button (visible on the
plugin preview) to clear all cached wall posts and images.


.. toctree::
Expand Down
40 changes: 26 additions & 14 deletions Documentation/Administrator/Upgrade/Index.rst
Expand Up @@ -5,27 +5,38 @@
Updating
========

If you update EXT:walls_io_proxy to a newer version, please read this section carefully!
If you update EXT:walls_io_proxy to a newer version, please read this
section carefully!

Update to Version 6.0.0
=======================

We have migrated the file ending `ts` to `typoscript`. Please update
your references, if you make use of the old file endings.

Update to Version 5.2.0
=======================

If you do not use walls_io_proxy as an API (WallsService) you can update to version 5.2.0 without any problems.
If you do not use `walls_io_proxy` as an API (WallsService) you can update to
version 5.2.0 without any problems.

For all other users: WallsService::getWallPosts() expects an object of type PluginConfiguration now. Please update
your code accordingly.
For all other users: WallsService::getWallPosts() expects an object of type
PluginConfiguration now. Please update your code accordingly.

Update to Version 5.0.0
=======================

We have removed TYPO3 8 compatibility. No new features added, so no problems while upgrading.
We have removed TYPO3 8 compatibility. No new features added, so no problems
while upgrading.

Update to Version 4.2.0
=======================

As a `WallId` is not needed anymore, all previously created cache entries are invalid.
As a `WallId` is not needed anymore, all previously created cache entries
are invalid.

If you don't like unused data in database you can remove them with following SQL query:
If you don't like unused data in database you can remove them with
following SQL query:

`DELETE FROM sys_registry WHERE entry_namespace = 'WallsIoProxy';`

Expand All @@ -36,18 +47,19 @@ Further you can remove all files in here:
Update to Version 4.0.0
=======================

Because of various problems with our PHP socket connection we will use the walls.io API now. That's why you
have to pay for Premium account. Else you will not get API access.
Insert access token in Extension Settings
Because of various problems with our PHP socket connection we will use
the walls.io API now. That's why you have to pay for Premium account. Else you
will not get API access. Insert access token in Extension Settings

Update to Version 3.0.0
=======================

We are not using cloudfront in Fluid templates anymore. As we download all external resources now, you should
update your Fluid templates to use the local file path.
We are not using cloudfront in Fluid templates anymore. As we download all
external resources now, you should update your Fluid templates to use the
local file path.

Update to Version 2.0.0
=======================

As we have switched over from Caching Framework to SysRegistry, it would be good, if you remove the unneeded
walls_io_proxy Cache Tables from Database.
As we have switched over from Caching Framework to SysRegistry, it would be
good, if you remove the unneeded walls_io_proxy Cache Tables from Database.
6 changes: 6 additions & 0 deletions Documentation/ChangeLog/Index.rst
Expand Up @@ -7,6 +7,12 @@
ChangeLog
=========

Version 6.0.0
=============

* TASK: Add TYPO3 11 compatibility
* TASK: Remove TYPO3 9 compatibility

Version 5.2.1
=============

Expand Down
36 changes: 21 additions & 15 deletions Documentation/Configuration/Index.rst
Expand Up @@ -48,8 +48,9 @@ Further you can change walls.io CSS file and our JS:
ContentElement Settings
=======================

After installation of `walls_io_proxy` you will find a new ContentElement in newContentElementWizard called
"Walls.io Proxy". On Tab "Walls.io" you can configure the Output as follows:
After installation of `walls_io_proxy` you will find a new ContentElement
in newContentElementWizard called "Walls.io Proxy". On Tab "Walls.io" you can
configure the Output as follows:

Access Token
------------
Expand All @@ -63,40 +64,45 @@ walls.io comes with two main API interfaces to request wall posts:

**PostsRequest (/v1/posts)**

These wall posts are sorted by their date of receipt at walls.io. This option should be OK for most
customers. Keep in mind: If you add a new social media platform to this wall in customer menu of walls.io
ALL wall posts of this platform will get the same creation date (receipt date at walls.io). This may lead
to old wall posts visible at first. If you often switch the social media platforms you should consider
to use **ChangedRequests**. If you add a new social media platform once a year we prefer to just wait a few
These wall posts are sorted by their date of receipt at walls.io. This option
should be OK for most customers. Keep in mind: If you add a new social media
platform to this wall in customer menu of walls.io ALL wall posts of this
platform will get the same creation date (receipt date at walls.io). This may
lead to old wall posts visible at first. If you often switch the social media
platforms you should consider to use **ChangedRequests**. If you add a new
social media platform once a year we prefer to just wait a few
days (20 or 50 new posts) until the ordering is OK for you again.

**ChangedRequest (/v1/posts/changed)**

These wall posts are sorted by their modification date. If you update an old wall post it will be visible
at first position in frontend.
These wall posts are sorted by their modification date. If you update an old
wall post it will be visible at first position in frontend.

Amount of entries to load
-------------------------

Default: 24
Max: 999 (1000 is the max. value allowed by walls.io)

Define the amount of entries to load from walls.io within one request. If you have some conditions implemented
in Fluid View, you should increase this value a little bit to match your needs.
Define the amount of entries to load from walls.io within one request. If you
have some conditions implemented in Fluid View, you should increase this value
a little bit to match your needs.

Amount of entries to show
-------------------------

Default: 8

This amount of entries will be visible displayed in frontend. With each hit on the "load more" button this amount
of entries will be appended to the current visible entries in frontend.
This amount of entries will be visible displayed in frontend. With each hit on
the "load more" button this amount of entries will be appended to the current
visible entries in frontend.

Show entries of the last x days
-------------------------------

Default: 365 (1 year)

Since walls_io_proxy v5.1.0 you can sort wall posts by their modification date. This new API call needs a further
mandatory value called `since`. `since` is used to load entries from walls.io with a maximum date. Don't be afraid, you
Since walls_io_proxy v5.1.0 you can sort wall posts by their modification date.
This new API call needs a further mandatory value called `since`. `since` is
used to load entries from walls.io with a maximum date. Don't be afraid, you
still will get the most current, updated entries first ;-)
30 changes: 0 additions & 30 deletions Documentation/Contribute/Index.rst

This file was deleted.

1 change: 0 additions & 1 deletion Documentation/Index.rst
Expand Up @@ -46,7 +46,6 @@ Cache and Proxy for walls.io, so no Cookie will be set on Client
Installation/Index
Configuration/Index
Administrator/Index
Contribute/Index
KnownProblems/Index
ChangeLog/Index

Expand Down

0 comments on commit 6a0acff

Please sign in to comment.