View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006793||OXID eShop (all versions)||6. ------ Setup -------||public||2018-02-20 17:32||2019-04-18 12:11|
|Target Version||Fixed in Version||6.1.4|
|Summary||0006793: Setup folder is copied on every "composer update" although Setup was already executed|
|Description||If you run "composer update" and answer the question "Do you want to overwrite existing OXID eShop files? (y/N) " with "y" the folder "Setup" will always be copied to "source" even if the Setup was already executed before.|
|Steps To Reproduce||- Setup an oxid-shop via composer|
- execute the setup
- confirm that the "Setup"-folder was removed from "source"
- run "composer update"
- answer "Do you want to overwrite existing OXID eShop files? (y/N)" with "y"
|Additional Information||There are two mechanisms that should prevent that the "Setup"-folder is copied every time "composer update" is run.|
1. don't copy Setup files @ OxidEsales\ComposerPlugin\Installer\Package\ShopPackageInstaller::copySetupFiles if "config.inc.php" is configured
- I can confirm, that this check works as designed
2. never copy Setup files @ OxidEsales\ComposerPlugin\Installer\Package\ShopPackageInstaller::copyShopSourceFromPackageToTarget
- The files should be excluded via filter "self::SETUP_FILES_FILTER"
- The filter currently used is "Setup**/*" which doesn't work because of a missing "/"
- In my opinion the filter should be "Setup/**/*"
|PHP Version||Not defined|
|Database Version||Not defined|
The described filter self::SETUP_FILES_FILTER is built with self::SHOP_SOURCE_SETUP_DIRECTORY and AbstractPackageInstaller::BLACKLIST_ALL_FILES. The second one is implemented in the following way:
/** Glob expression to filter all files, might be used to filter whole directory. */
const BLACKLIST_ALL_FILES = '**/*';
First comment phrase is correct. 'All files' will be filtered, but not the directories. So /Setup is always copied together within /Setup/Controller etc.
As mentioned from usenff, the glob expression '/**/*' would filter everything in /Setup including the directory itself (succesfully tested).
||Hello, PR-13 fixes the problem. Merged to master.|
||Will be ported to b-2.x as well, so will be available in next 6.1 patch.|