44512[TASK] Allow use of TYPO3Fluid/Fluid without hacking
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 1
Review log 37
Show 12 earlier messages
-
Claus Due uploaded patch set 1 11/03/15, 14:54
-
Claus Due uploaded patch set 2 11/03/15, 16:05
-
Claus Due commented on patch set 2 11/03/15, 16:08
Currently needs a safe way to determine (this early in the bootstrap) if a particular extension is installed. Using ExtensionManagementUtility does not appear to be possible (package management not yet initialised). Alternatively, PSR-4 manipulation must be moved to a more appropriate location (later in the bootstrap sequence) but would need a pointer as to which place would be considered appropriate. -
Claus Due uploaded patch set 3 11/03/15, 16:14
-
Claus Due commented on patch set 3 11/03/15, 16:14
Like this :) -
Claus Due uploaded patch set 4 11/03/15, 16:22
-
Claus Due uploaded patch set 5 11/03/15, 16:41
-
Claus Due commented on patch set 5 11/03/15, 16:48
Actually, no need to check installed state. Extension is automatically enabled by EM due to "part of minimal system". -
Helmut Hummel commented on patch set 5 CR -2 11/03/15, 20:14
These are too many hardcoded things in a vital place in the bootstrap. Can you please explain what exactly you want to achieve? I bet there is a cleaner way to get there. Like that, this patch cannot go in, sorry -
Stefan Neufeind commented on patch set 5 11/03/15, 22:14
@Helmut: Imho the description says what the plan is ... find a way to replace a package shipped with the core. -
Claus Due commented on patch set 5 11/04/15, 00:19
> I bet there is a cleaner way to get there. There are, as the commit message states, two ways of getting where we need to be. One is this. The other is an installer script (which does not get put into the TYPO3 core) and which rewrites the PSR-4 class load manifest. A single line "sed" command could also do this. But the problem here is that the core ships pseudo-packages that cannot have their autoloading entries replaced because replacing the package doesn't remove the autoload entries. And I don't think there is a way to get around that one... ...short of actually decoupling the fluid extension and beginning to ship that individually, and I assume that's not going to happen for LTS. Please don't invent a new feature for this. The point is to create this in a way that allows it to be merged into LTS *expecting it to be removed exactly one version later, when the fluid extension gets properly decoupled and the patch no longer has any relevance*. -
Claus Due uploaded patch set 6 11/04/15, 02:13
-
Benni Mack commented on patch set 6 11/04/15, 06:38
Bootstrap.php:216the option can go inside the if() statement.Bootstrap.php:222we can do a "break" here. -
Claus Due uploaded patch set 7 11/04/15, 09:16
-
Mathias Brodala commented on patch set 7 11/04/15, 09:45
Bootstrap.php:222I agree that there should be a "break;" after this. No need to process further. -
Benni Mack commented on patch set 7 11/04/15, 11:02
Hey all, how about you add that logic to the standalone adapter extension directly? ext_localconf.php fits perfectly to do so, as Fluid is not used before that point in the TYPO3 Request lifecycle. -
Helmut Hummel commented on patch set 7 11/04/15, 11:02
Bootstrap.php:221My -2 remains! a simple \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance(\Composer\Autoload\ClassLoader::class)->setPsr4('TYPO3\\CMS\\Fluid\\', __DIR__ . '/Classes');` in the ext_localconf.php of the cms_fluid_adapter extension should do the trick without any further core hacks. At this point in the bootstrap it is not too late for Fluid classes, as they are never required before TYPO3 is fully bootstrapped with the available extensions… -
Claus Due commented on patch set 7 11/04/15, 11:03
Bootstrap.php:222ReplyIf the order of paths is adapter,sysext - which can happen if you manipulate the root composer.json - then a break here would cause the namespace to NOT become unset. A full loop is required by this logic. EDIT: also please don't forget that the expected element count in this array is exactly 2. A break prevents a single iteration only but the fact that it prevents that iteration is exactly what breaks reverse-ordered prefix paths. -
Claus Due commented on patch set 7 11/04/15, 11:09
Bootstrap.php:221Reply> \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance(\Composer\Autoload\ClassLoader::class)->setPsr4('TYPO3\\CMS\\Fluid\\', __DIR__ . '/Classes');` Does not work. I tested that. It is too late for this operation at that point. Classes fail to load, subsequently. -
Claus Due commented on patch set 7 11/04/15, 11:10
@Benni I and Marc have tried *every* possible thing we could do via the adapter extension and we both agree that no, there is no way to effectively do this from within the adapter itself without this core change. Our only alternative if this -2 isn't changed, is to create a composer install script that manipulates the autoloading entries. We would really like to avoid that. -
Claus Due commented on patch set 7 11/04/15, 11:14
@Benni & Helmut, I've added you to the adapter extension repository for your own verification pleasure. Here's my root composer.json: <pre> { "repositories": [ { "type": "vcs", "url": "ssh://git@github.com/NamelessCoder/typo3-cms-fluid-adapter.git" } ], "require": { "typo3/cms": "@dev", "typo3fluid/fluid": "@dev", "typo3/cms-fluid-adapter": "@dev" } } </pre> -
Claus Due commented on patch set 7 11/04/15, 11:16
And don't forget to manually inspect vendor/composer/autoload_psr4.php to confirm that both entries exist. Then try your tricks without this core patch and with it, respectively. You should find near the end that I'm right but it may take you several hours to reach that same conclusion. I did my homework and it's been peer-reviewed already so you may want to accept this on trust alone, to save significant time. There are the two solutions mentioned, those are it. -
Claus Due commented on patch set 6 11/04/15, 12:09
Bootstrap.php:216ReplyDoneBootstrap.php:222ReplyActually we can't. Depending on how you've configured the root composer.json the order of the paths may be reversed. So breaking here instead of letting the loop finish might result in never detecting and removing the targeted namespace - if the adapter path comes before the sysext path. -
Helmut Hummel commented on patch set 7 11/04/15, 12:11
Bootstrap.php:221Replymhkay. for the install tool my proposal does not help, as extension ext_localconf.php is not included there. -
Claus Due commented on patch set 7 11/04/15, 12:15
@Helmut The install tool isn't the only part to fail. Every backend module that uses Fluid also fails. -
Marc Neuhaus commented on patch set 7 11/04/15, 12:21
Bootstrap.php:221Replyi can't even access the backend login with the ext_localconf variant. exits with "Fatal error: Class 'TYPO3\CMS\Fluid\View\StandaloneView' not found" for me, because it tries to use that class before locanconf is included. -
Helmut Hummel commented on patch set 7 11/04/15, 12:50
Bootstrap.php:221Reply> i can't even access the backend login with the ext_localconf variant Yeah, well. Has to be of course: \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getEarlyInstance(\Composer\Autoload\ClassLoader::class)->setPsr4('TYPO3\\CMS\\Fluid\\', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes'); > because it tries to use that class before locanconf is included. no! It is because __DIR__ is the cached file folder once the localconf.php files have been cached -
Helmut Hummel commented on patch set 7 11/04/15, 12:51
> @Helmut The install tool isn't the only part to fail. Every backend module that uses Fluid also fails. no. It is *only* about the install tool as it only bootstraps core extensions. Everything else just works with the ext_localconf.php variant -
Claus Due commented on patch set 7 11/04/15, 12:55
Avoiding __DIR__ makes this work better at least. It allows the backend to function - but the install tool remains broken. -
Benni Mack commented on patch set 7 02/05/16, 16:13
What is the status here? Do we have a different solution for that? -
Claus Due commented on patch set 7 02/05/16, 23:03
Need to revive this one again, hopefully during the weekend. It needs to be updated to the current state of fluid in CMS - but I suspect we will still need some patching to make it work correctly. -
Benni Mack commented on patch set 7 03/04/16, 20:54
still want to revive that one, Claus? -
Claus Due commented on patch set 7 03/04/16, 21:04
@Benni yes, as soon as I get the time to update the adapter with recent changes, test it and confirm again that it is indeed necessary. My main issue is available time. -
Christian Kuhn commented on patch set 7 CR -2 03/05/16, 17:27
i'm still -2 to this hack. imho not a good idea to hack this into 7 and also not a good idea to do any further hacks in standalone to allow this. -
Helmut Hummel wrote 03/08/16, 10:59
Removed the following votes: * Code-Review-2 by Helmut Hummel <helmut.hummel@typo3.org> -
Wouter Wolters commented on patch set 7 06/07/16, 21:13
Claus, I would not invest time here anymore. I agree with Christian that further hacks are not a good idea for the stable 7LTS branch. -
Claus Due abandoned the change 06/08/16, 19:34
...and I think by now, people have gotten completely used to the fact that all the new Fluid features are from v8 and up, no exceptions. I'm okay with this.