TYPO3 / CmsComposerInstallers

TYPO3 CMS Composer Installer
GNU General Public License v2.0
58 stars 39 forks source link

Adopt original TYPO3 dependency behavior #15

Closed HenningCash closed 9 years ago

HenningCash commented 9 years ago

There are some extensions (e.g. fluidbootstraptheme and some FluidTYPO3 extensions) that have different dependencies set in ext_emconf.php and the data-string delivered from TER. In most cases the TER dependecies are outdated. (I have never uploaded any extension to TER, so I have no clue where TER takes the dependencies from)

Original ext_emconf.php vs. data from TER (note the empty depends):

array (
  'title' => 'FBT: Bootstrap based Pages and Content',
  'description' => 'A collection of Twitter Bootstrap oriented Fluid Content Elements and Pages written for EXT:fluidcontent and EXT:fluidpages using ViewHelpers from EXT:vhs',
  'category' => 'misc',
  'shy' => false,
  'version' => '1.1.0',
  'dependencies' => '',
  'conflicts' => '',
  'priority' => '',
  'loadOrder' => NULL,
  'module' => '',
  'state' => 'stable',
  'uploadfolder' => false,
  'createDirs' => '',
  'modify_tables' => '',
  'clearcacheonload' => true,
  'lockType' => '',
  'author' => 'Claus Due, Harry Glatz, Boris Schauer ',
  'author_email' => 'claus@namelesscoder.net, glatz@analog.de, me@bschauer.de',
  'author_company' => 'NamelessCoder, analog multimedia, bschauer',
  'CGLcompliance' => NULL,
  'CGLcompliance_note' => NULL,
  'constraints' => 
  array (
    'depends' => 
    array (
    ),
    'conflicts' => 
    array (
    ),
    'suggests' => 
    array (
    ),
  ),
  '_md5_values_when_last_written' => '[...]',
);

TYPO3's extensionmanager prefers the dependencies that are set in ext_emconf.php. Imo cms-composer-installers should do this, too - so it could simply merge the existing ext_emconf.php and TER-data.

helhum commented 9 years ago

The issue you describe may one in the TER https://forge.typo3.org/issues/62448

The installer does not evaluate any dependencies. It is just responsible for putting the extensions into the correct directory. Nothing more.

The ext_emconf meta data is extracted and converted by this package https://github.com/TYPO3/CmsComposerPackageGenerator for the TYPO3 composer repository http://composer.typo3.org

The package generator accesses the extensions.xml which is generated by TER. So in the end, if we have a bug, it must originate in TER

helhum commented 9 years ago

Hm, I think I got your point. Dependencies are indeed lost in ext_emconf.php after the installer extracted the extension

HenningCash commented 9 years ago

I'm not sure if it's a TER bug or feature. If you upload an extension to the TER is there a form where you can specify dependencies? Otherwise I have no idea why invalid/outdated dependencies are delivered via t3x. The line I mentioned is where the core extension manager "masks" this invalid behavior. If I'm guessing correctly it's taking the dependencies from the existing ext_emconf.php before writing the final ext_emconf.php. As temporary workaround we could adopt this behavior in the cms-composer-installers as well until it's fixed in the TER?

helhum commented 9 years ago

you are right!

can you check if 3a696fde2cadeb1d2fbdd5c21e50ba0ed2052559 fixes your issue as well?

HenningCash commented 9 years ago

Looks pretty good! Thank you very much!