sbuerk / typo3-cmscomposerinstallers-testingframework-bridge

Intermediate Bridge for CMS Composer Installers 5 and Testing Framework for extension development
GNU General Public License v2.0
5 stars 1 forks source link

Clarify (in README) for which versions and which scenario this package is required #11

Open sypets opened 1 year ago

sypets commented 1 year ago

I think it would help to clarify when this package must be used, with which version combinations it can be combined and for which scenarios.

And when it is not required.

For me the README is not clear enough to determine in which combination of versions and which scenario this package is required.

What would be possible use cases?

What is the use case for combining typo3/cms-composer-installers:4.0.0-RC1 with v11?

Does it makes sense to propagate this as it is advertised as temporary work around? What is the alternative?

Example news

This was in an older version of news:

"require": {
        "typo3/cms-core": "^11.5.24 || ^12.3",
"typo3/cms-composer-installers": "^3.1.3 || 4.0.0-RC1 || ^5.0",
"sbuerk/typo3-cmscomposerinstallers-testingframework-bridge": "^0.0.1",
"typo3/testing-framework": "~7.0@dev",

Here, the bridge plugin is removed again, mostly by changing some paths: https://github.com/georgringer/news/commit/66d2a936fdd0905d889a956456f8e81d65cdaa6f

would it not be better to just make the changes and not use the bridge plugin at all?

other extensions

Is used in other extensions as well, such as:

Links

sbuerk commented 1 year ago

Thanks for opening the issue and raising these question. You are right, some more information to the README.md should be use-full and I will take care of it. Also with some more explanation of it.

Some backgrounds:

typo3/cms-composer-installers 4RC1 was the release candiate for the 4.x version of the composer plugin, which introduces changed behaviors for composer installations:

Instead, these packages are installed into the <vendor-dir>/<vendor>/<package-name> as it is the default for composer packges (if not changed by installers like cms-composer-installers <3.x.

That have been a release candiated, allowed to be installed and used along with TYPO3 v11. But never released, as a version would most likely auto-pulled into instances and changing behaviour which can be considered as "breaking" because core allowed that package in following versions: ^2.0 || ^3.0 || ^4.0

The very same code stand of the cms-composer-installers have been released finally as ^5.x.x and TYPO3 v12 changed the requirement hard to ^5.0 of the installers - and therefore hardrequiring these behaviour changes.

That means, that for TYPO3 v11 it's optional. It's possible to already switch to the new behaviour and work/tackle issues (hardcoded paths etc) already in v11 by simply enforce installing the 4.0.0RC1 release candiate.

Regarding testing, especially if typo3/testing-framework is used, these changes broke testing (extension/project testing) with TYPO3 v12.0 (first sprint release) - beside 4RC1/TYPO3 v11 - and the core testing-framework because of one or two things:

As I could not figured out a quick solution to properly handle this in the testing-framework back then 1 day before 12.0, I created this bridge plugin as intermediate solutions which fakes / restores the old structure so invokation AND function test case instances can be correctly build - by using composer package informations and doing fallback symlinks for systemextensions and required extensions + root package if it is a extension.

I created the plugin in the way, that it only takes action if typo3/cms-composer-installers 4RC1 OR 5 is used, if not no symlinks are created.

Over the time I searched and tried to add support to the testing-framework, at least for the functional test instance symlinking part. So that it's absolutly irrelevant where they are installed. This took quite some time, as I had to dig first into the whole internas and composer. On the TYPO3 v12.4 LTS release day, we merged and tagged finally testing-framework 7.0.0 (v11/v12) and 8.0.0 (v12/v13[main]) - containing the information that the TF replaces my plugin. So even if it stays in the composer.json, it's not installed and do no longer work. So it can be removed now. I had missed some cases which have been fixed (TF 7.0.2 + 8.0.1).

That means that TF7 can deal with installers ^3 || ^4.0.0-RC1 || ^5 for TYPO3 v11 and v12. and TF8 with TYPO3 v12 + installers ^5.

Only left ofter is the need to adjust the path for invoking tests, if they have been configured with the symlinked old legacy style path .Build/Web/typo3conf/ext/.... And this should be done anyway .. and should be doable before already (have to check this against TF6).

So there have not been version and stuff really around until LTS release day, and was busy with fixing the issues.

But will update/change the readme to make this now more clear. Fixed for georgs news who asked for support (okay, hey asked for a hint but could not sleep :angel: so provided the PR).

Creating these symlinks is a bad thing, and therefore this plugin must die :skull_and_crossbones: - will wait until abanding it.

Some may have used this plugin for the symlinked backwards compat structure even without TF - so for they this still works. Albeit, that was not the intention of this plugin.

So - thanks for the issue :heart: , I hope I could answer some of your questions and will work on the README.md the next days.