Skip to content

Commit

Permalink
Finalize refactoring for TYPO3 10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
metacontext committed Aug 8, 2020
1 parent 1fe9511 commit 6ddc92c
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 75 deletions.
1 change: 0 additions & 1 deletion Classes/ContentObject/XpathContentObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use TYPO3\CMS\Frontend\ContentObject\AbstractContentObject;
use TYPO3\CMS\Core\Utility\DebugUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Core\TimeTracker\TimeTracker;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;

Expand Down
8 changes: 8 additions & 0 deletions Documentation/Changelog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ ChangeLog
+----------------+---------------------------------------------------------------+
| Version | Changes |
+================+===============================================================+
| 1.10.0 | - TYPO3 compatibility: 9.5.0-10.4.99 |
| | |
| | - Remove namespace compatibility layer |
| | |
| | - Refactoring for TYPO3 v10 (thanks to contributors!) |
| | |
| | - Update manual |
+----------------+---------------------------------------------------------------+
| 1.9.0 | - TYPO3 compatibility: 8.7.0-9.5.99 |
| | |
| | - **Important:** Extension namespace switched from |
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ XPATH Content Object
en

:Description:
Manual for the extension cobj_path
Manual for the extension cobj_xpath

:Keywords:
XML, XPATH

:Copyright:
2012-2019
2012-2020

:Author:
Torsten Schrade
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Installation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Requirements

- PHP with libxml and SimpleXML enabled

- Supported TYPO3 versions: 8.79.5
- Supported TYPO3 versions: 9.510.4

Installation
^^^^^^^^^^^^
Expand Down
18 changes: 11 additions & 7 deletions Documentation/Reference/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
Reference
---------

This section gives an overview on all TypoScript properties of the XPATH content object.
This section gives an overview on all TypoScript properties of the XPATH content object.

.. important::

In TYPO3 10.4 the FILE TypoScript object was removed. You can use a FLUIDTEMPLATE
cObject instead. In respect to TYPO3 9.5 the deprecated FILE cObject is still supported.

.. container:: table-row

Expand All @@ -21,7 +26,7 @@ This section gives an overview on all TypoScript properties of the XPATH content

Description
This fetches the XML data from a source. Can be a XML string, a field
in the database, a file (path or via TypoScript FILE cObject) or an
in the database, a file (path or via TypoScript FLUIDTEMPLATE cObject) or an
external resource.

**Example (field):** ::
Expand All @@ -35,18 +40,17 @@ This section gives an overview on all TypoScript properties of the XPATH content
Fetches the XML from the field 'my\_xml\_field' of the current page
record.

**Example (stdWrap / FILE):** ::
**Example (stdWrap / FUIDTEMPLATE):** ::

page.10 = XPATH
page.10 {
source.cObject = FILE
source.cObject = FUIDTEMPLATE
source.cObject.file = fileadmin/myfile.xml
[...]
}

This fetches the XML from a file included by TypoScript's FILE content
object. Important: Due to FILE's internal settings, the data can't be
larger than 1024kb. See TSref.
This fetches the XML from a file included by TypoScript's FLUIDTEMPLATE content
object.

**Example (external):** ::

Expand Down
4 changes: 2 additions & 2 deletions Documentation/Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

---
conf.py:
copyright: 2019
copyright: 2012-2020
project: XPATH Content Object
version: 0.1
release: 1.9.0
release: 1.10.0
latex_documents:
- Index
- cobj_xpath.tex
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Tutorials/FluidtemplateXpathXslt/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Xpath query:
<ul>
<f:for each="{xpath:query(source: 'fileadmin/xpath/poe.xml', expression: '//div1[@type=\'contents\']/list/item', return: 'string')}" as="item" iteration="key">
<li>
<f:link.action additionalParams="{tale : key.cycle}">{item}</f:link.action>
<f:link.typolink parameter="t3://page?uid=###YOUR_PID###" additionalParams="&tale={key.cycle}">{item}</f:link.typolink>
</li>
</f:for>
</ul>
Expand Down
11 changes: 5 additions & 6 deletions Documentation/Tutorials/XpathAndStdwrap/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ the following XML file:
</collection>
We now want to select all CD titles and display them using alternative
colors. Wow, that's a real usecase, isn't it? ;). We decide to load
the source using the FILE object within our XPATH object. The XPATH
expression for selecting all title attributes within the document is
simply: //title. Since the titles are atomic node values, we decide
to return our result as strings. We end up with the following
TypoScript:
colors. We decide to load the source using the FLUIDTEMPLATE object
within our XPATH object. The XPATH expression for selecting all title
attributes within the document is simply: //title. Since the titles
are atomic node values, we decide to return our result as strings.
We end up with the following TypoScript:

::

Expand Down
16 changes: 5 additions & 11 deletions Documentation/Tutorials/XpathTypotag/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
<xpath> TypoTag
^^^^^^^^^^^^^^

.. important::

TYPO3 versions lower than 7.6.20 and 8.7.3 contain a bug that prevents the functionality
described in this tutorial from working. Please make sure you use this versions (or higher)
if you want to implement the TypoTag functionality.

From a developers point of view using the XPATH content object in a
TypoScript template or in a FLUIDTEMPLATE is nice. But
imagine you have some power users that work with XML and wantto select values
Expand All @@ -25,13 +19,13 @@ an address element for example.

.. attention::

TYPO3 7.6 and 8.7 use different rich text editors (rtehtmlarea and ckeditor).
TYPO3 7.6 and 8.7-10.4 use different rich text editors (rtehtmlarea and ckeditor).
The configuration therefore depends on your TYPO3 version and the RTE you use. The
tutorial will first discuss the general setup of the TypoTag and then show the
respective configurations for the two RTEs.

Configuration for a simple input field (TYPO3 7.6 and 8.7)
----------------------------------------------------------
Configuration for a simple input field (TYPO3 7.6 and 8.7-10.4)
---------------------------------------------------------------

The configuration for a simple input field without RTE works the same for both TYPO3 versions
and is also the basis for the integration of the TypoTag into the respective RTE.
Expand Down Expand Up @@ -156,8 +150,8 @@ This is the PageTSconfig for achieving the user element:
Notice: It is not possible to set attributes with a user element. Therefore you will
have to set a fixed expression and return value for each <xpath> user element you define.

Configuration for ckeditor (TYPO3 8.7)
--------------------------------------
Configuration for ckeditor (TYPO3 8.7-10.4)
-------------------------------------------

From this version onwards CKEditor is the new default RTE. Note that you can still use rtehtmlarea in TYPO3 8.7
but it is now a separate extension in TER. The integration of the <xpath> TypoTag into CKEditor is fully backwards
Expand Down
5 changes: 0 additions & 5 deletions Migrations/Code/ClassAliasMap.php

This file was deleted.

22 changes: 0 additions & 22 deletions Migrations/Code/LegacyClassesForIde.php

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ The documentation is at [https://docs.typo3.org/p/digicademy/cobj_xpath/master/e

| Version | TYPO3 | PHP | Support |
| ----------- | ---------- | ----------|---------------------------------------- |
| 1.9 | 8.7 - 9.5 | 7.2 | Features, Bugfixes, Security Updates |
| 1.10 | 9.5 - 10.4 | 7.2 | Features, Bugfixes, Security Updates |
| 1.9 | 8.7 - 9.5 | 7.2 | Bugfixes, Security Updates |
| 1.8 | 7.6 - 8.7 | 5.6 - 7.2 | none |
| 1.7 | 6.2 - 7.6 | 5.6 - 7.2 | none |
| 1.6 | 4.5 - 6.2 | 5.4 - 5.6 | none |
Expand All @@ -24,4 +25,4 @@ The documentation is at [https://docs.typo3.org/p/digicademy/cobj_xpath/master/e
This software is licensed under the terms of the GNU General Public License v2
as published by the Free Software Foundation.

Copyright <a href="https://orcid.org/0000-0002-0953-2818">Torsten Schrade</a> | <a href="http://www.adwmainz.de">Academy of Sciences and Literature | Mainz</a>
Copyright <a href="https://orcid.org/0000-0002-0953-2818">Torsten Schrade</a> | <a href="http://www.adwmainz.de">Academy of Sciences and Literature | Mainz</a>
11 changes: 2 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"support": {
"issues": "https://github.com/digicademy/cobj_xpath/issues"
},
"version": "1.9.0",
"version": "1.10.0",
"require": {
"typo3/cms-core": ">=8.7.0 || <=9.5.99",
"typo3/cms-core": ">=9.5.0 || <=10.4.99",
"ext-libxml": "*",
"ext-json": "*",
"ext-simplexml": "*",
Expand All @@ -33,12 +33,5 @@
"psr-4": {
"Digicademy\\CobjXpath\\": "Classes/"
}
},
"extra": {
"typo3/class-alias-loader": {
"class-alias-maps": [
"Migrations/Code/ClassAliasMap.php"
]
}
}
}
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '2'
version: '3'
services:
t3docmake:
image: t3docs/render-documentation:latest
command: makehtml
volumes:
- ./:/PROJECT:ro
- ./Documentation-GENERATED-temp:/RESULT
command: makehtml
- ./:/PROJECT:ro
- ./Documentation-GENERATED-temp:/RESULT
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'description' => 'Extends TypoScript with a new cObject XPATH for flexible handling of XML content.',
'category' => 'fe',
'shy' => 0,
'version' => '1.9.0',
'version' => '1.10.0',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
Expand All @@ -24,7 +24,7 @@
'CGLcompliance_note' => '',
'constraints' => array(
'depends' => array(
'typo3' => '8.7.0-9.5.99',
'typo3' => '9.5.0-10.4.99',
),
'conflicts' => array(),
'suggests' => array(
Expand Down

0 comments on commit 6ddc92c

Please sign in to comment.