Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!!![TASK:T12] Don't initialize TSFE in TYPO3 BE (Record Monitoring) context #3582

Conversation

dkd-kaehm
Copy link
Collaborator

@dkd-kaehm dkd-kaehm commented Mar 31, 2023

EXT:solr does not want really the initialized TSFE object on multiple places at all. The TSFE object was necessary in EXT:solr versions, which used the TypoScript conditions for configure/map the Apache Solr cores to appropriated TYPO3 languages. The indexing stack required this approach as well to be able to index different pages and/or its records in single PHP-Process.

Nova-days this all hacks not required on TYPO3 12+ LTS anymore, so the whole TSFE-Fake initialization stack will be removed and "isolated TYPO3 Application" approach will be used. This will lead to more isolated and less exceptional behavior on TYPO3 components on EXT:solr side/feature set.

Relates: #3376

Todo:

  • Rebase and change to main as target branch

3l73 and others added 30 commits March 3, 2023 15:42
Increase dependencies of TYPO3 to 12.0.0.

Resolves: TYPO3-Solr#3376
Increase version of Solarium to 6.2.7 due to dependency to symfony/event-dispatcher-contracts.

Resolves: TYPO3-Solr#3376
Set requirement to dev-main

Resolves: TYPO3-Solr#3376
Adjust method signature and implement new method 'getLabel()'.

Use new class ContextualFeedbackSeverity as status code.

Resolves: TYPO3-Solr#3376
Configure PHP 8.1 and TYPO3 12.

Resolves: TYPO3-Solr#3376
Migrate the registration of status classes.

Resolves: TYPO3-Solr#3376
Remove inheritance to the TYPO3 translation ViewHelper.

Resolves: TYPO3-Solr#3376
Adjust the class configuration for report services.

Resolves: TYPO3-Solr#3376
This change contains: 

* Reenable "modernize_strpos" rule and applies it
* The PSR12 rule for import type blocks for PhpcsFixer 
   The ordered_imports.imports_order is now 
   class, function, const
* the coding standards fixes for TYPO3 12+.

Fixes: TYPO3-Solr#3460
The ObjectManager replaced with call of GeneralUtility::makeInstance() and dependency injection.

Resolves: TYPO3-Solr#3455
The signal-slot technology was deprecated and now replaced threw the EventDispatcher.

Remove old documentation about signal slot.

Resolves: TYPO3-Solr#3376
The use of the `QueryGenerator::getTreeList()` was replaced with
`\ApacheSolrForTypo3\Solr\System\Records\Pages\PagesRepository::getTreeList()`

Resolves: TYPO3-Solr#3453
Relates: TYPO3-Solr#3376
This commit must be backported to all supported versions, to be able to make backports on this path easier.
This change contains basic change, like replacemnets of deprecated/removed methods or namespace changes.

Relates: TYPO3-Solr#3376
# Main task

Move to new way of TYPO3 12+ to register custom content objects.
See: [Breaking: #96659 - Registration of cObjects via TYPO3_CONF_VARS](https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-96659-RegistrationOfCObjectsViaTYPO3_CONF_VARS.html)

## Tests fixed

* Unit\ContentObject\ClassificationTest::*
* Unit\ContentObject\MultivalueTest::*
* Integration\ContentObject\RelationTest::*

# Additional tasks

To avoid rewrites of xml fixtures for TYPO3 12 compatibility task, the "typo3/testing-framework" is fixed to v 7.x.

Fixes: TYPO3-Solr#3476
…mCache()

Migrates cores
 [!!!][TASK] Use new TypoScript parser in Frontend
See:
TYPO3/typo3@a927bc0
## Please revert this commit

This is the temporary fix. 
Which allows to run integration tests within soll-ddev-site 
"project" and avoid migration of fixtures from xml to csv.
 
Please reset to "typo3/testing-framework":"dev-7" as soon
TYPO3/testing-framework#435 is merged.
Move the backend modul registration into Configuration/Backend/Modules.php

Resolves: TYPO3-Solr#3376
Move the icon registration into Configuration/Icons.php

Resolves: TYPO3-Solr#3376
Configure folder for backend controller and backend view helper as service.

Resolves: TYPO3-Solr#3376
Adjust method signatures.

Resolves: TYPO3-Solr#3376
TSFEs ::getFromCache() must be called to get TypoScript
configuration in EXT:solr stack.

Relates: TYPO3-Solr#3376
TSFE is now more strict. The TSFE::id must be set before accessed.

Relates: TYPO3-Solr#3376
dkd-kaehm and others added 16 commits March 24, 2023 17:40
As controller context has been removed with TYPO3 12
we have introduces our own VariableProvider
to keep internal EXT:solr variables while loading
sections, layouts and partials.

Relates: TYPO3-Solr#3376
SolrControllerContext is obsolete since searchResultSet
and typoScriptConfiguration are now available via
variable provider, thus it's removed.

Relates: TYPO3-Solr#3376
This commit also removes superflous annotations
and prevents calling methods against null.

Relates: TYPO3-Solr#3376
As extbase ControllerContext has been removed with TYPO3 12,
we have replaced ControllerContext in various
ViewHelper classes.

Relates: TYPO3-Solr#3376
Solve all failing UnitTests of Query directory.

Relates: TYPO3-Solr#3376
Remove getControllerContenxt from onlyMethods call
in SearchFormViewHelperTest

Relates: TYPO3-Solr#3376
After removing the ControllerContext the UnitTests
have to be adopted to use information from
Controller Request

Relates: TYPO3-Solr#3376
Repair all Controller UnitTest cases.
Solve warning about deprecated "Test" suffix
in Abstract classes

Relates: TYPO3-Solr#3376
SearchController sets the Solr query manually if given via global
search parameter, this has now to be done via "withArgument" instead
of "setArgument".

Relates: TYPO3-Solr#3376
Drops custom TranslateViewHelper as this just provides named
placeholders in labels and with TYPO3 12 we had to completly
reimplement the translate feature as the TYPO3 core version
cannot be used as base anymore.

This is a breaking change for all users that are using this ViewHelper
and own labels and markers like @resultsFrom or @resultsTo. Please
replace this markers with default markers like "%s" or "%1$s" and use
the default TYPO3 translate view helper.

Relates: TYPO3-Solr#3376
…ontext

EXT:solr does not want really the initialized TSFE object on multiple places at all. The TSFE object was necessary in EXT:solr versions, which used the TypoScript conditions for configure/map the Apache Solr cores to appropriated TYPO3 languages.  The indexing stack required this approach as well to be able to index  different pages and/or its records in single PHP-Process.

Nova-days this all hacks not required on TYPO3 12+ LTS anymore,  so the whole TSFE-Fake initialization stack will be removed and  "isolated TYPO3 Application" approach will be used. This will lead to more isolated and less exceptional behavior on TYPO3 components on EXT:solr side/feature set.

Relates: TYPO3-Solr#3376
@dkd-kaehm dkd-kaehm force-pushed the task/3376_remove_Tsfe_init_on_TYPO3_BE_actions branch from 5711c1c to 7bb37b0 Compare March 31, 2023 12:44
@dkd-kaehm dkd-kaehm force-pushed the task/3376-TYPO3_12_compatibility branch 2 times, most recently from b846714 to 6cffa97 Compare April 8, 2023 15:44
@dkd-kaehm dkd-kaehm force-pushed the task/3376-TYPO3_12_compatibility branch from e7e2e9d to e9e7248 Compare May 15, 2023 13:07
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this pull request May 26, 2023
…ontext

EXT:solr does not want really the initialized TSFE object on multiple places at all. The TSFE object was necessary in EXT:solr versions, which used the TypoScript conditions for configure/map the Apache Solr cores to appropriated TYPO3 languages.  The indexing stack required this approach as well to be able to index  different pages and/or its records in single PHP-Process.

Nova-days this all hacks not required on TYPO3 12+ LTS anymore,  so the whole TSFE-Fake initialization stack will be removed and  "isolated TYPO3 Application" approach will be used. This will lead to more isolated and less exceptional behavior on TYPO3 components on EXT:solr side/feature set.

Relates: TYPO3-Solr#3376
Replaces: TYPO3-Solr#3582
@dkd-kaehm dkd-kaehm closed this May 26, 2023
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this pull request May 26, 2023
…ontext

EXT:solr does not want really the initialized TSFE object on multiple places at all. The TSFE object was necessary in EXT:solr versions, which used the TypoScript conditions for configure/map the Apache Solr cores to appropriated TYPO3 languages.  The indexing stack required this approach as well to be able to index  different pages and/or its records in single PHP-Process.

Nova-days this all hacks not required on TYPO3 12+ LTS anymore,  so the whole TSFE-Fake initialization stack will be removed and  "isolated TYPO3 Application" approach will be used. This will lead to more isolated and less exceptional behavior on TYPO3 components on EXT:solr side/feature set.

Relates: TYPO3-Solr#3376
Replaces: TYPO3-Solr#3582
dkd-kaehm added a commit to dkd-kaehm/ext-solr that referenced this pull request May 31, 2023
…ontext

EXT:solr does not want really the initialized TSFE object on multiple places at all. The TSFE object was necessary in EXT:solr versions, which used the TypoScript conditions for configure/map the Apache Solr cores to appropriated TYPO3 languages.  The indexing stack required this approach as well to be able to index  different pages and/or its records in single PHP-Process.

Nova-days this all hacks not required on TYPO3 12+ LTS anymore,  so the whole TSFE-Fake initialization stack will be removed and  "isolated TYPO3 Application" approach will be used. This will lead to more isolated and less exceptional behavior on TYPO3 components on EXT:solr side/feature set.

Relates: TYPO3-Solr#3376
Replaces: TYPO3-Solr#3582
@dkd-kaehm dkd-kaehm deleted the task/3376_remove_Tsfe_init_on_TYPO3_BE_actions branch June 2, 2023 08:27
@dkd-kaehm dkd-kaehm restored the task/3376_remove_Tsfe_init_on_TYPO3_BE_actions branch June 2, 2023 08:27
@dkd-kaehm dkd-kaehm deleted the task/3376_remove_Tsfe_init_on_TYPO3_BE_actions branch December 12, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants