OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
869 stars 436 forks source link

Credis symlinks wrong? #2781

Closed sreichel closed 1 year ago

sreichel commented 1 year ago

Preconditions (*)

  1. latest 19.4.x (with composer modules added)

Steps to reproduce (*)

  1. added this to composer.json
    "magento-deploystrategy": "copy",
    "magento-deploystrategy-dev": "symlink",
    "magento-force": true,
  2. run composer install ... symlinks for CM_ are created
  3. delete vendor
  4. run composer install --no-dev

Expected result (*)

  1. symlinks should be replaced by files

Actual result (*)

  1. Credis copy fails

credis credis2

fballiano commented 1 year ago

when I do the composer install --no-dev I get:

In Copy.php line 133:

  copy(/Users/fab/Projects/openmage/vendor/colinmollenhour/cache-backend-redis/lib/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis/Credis): failed to open stream: Invalid argument   

I think the problem is with the "magento-force" option

sreichel commented 1 year ago

https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/65 is not fixed lib/Credis is empty.

AGelzer commented 1 year ago

Info: magento-composer-installer has problems with change deploy strategy from symlink to copy

See: Pull request #208

sreichel commented 1 year ago

@AGelzer thank you.

@Flyingmana your're maintainer there ... do you have time to review this?

Flyingmana commented 1 year ago

For this I first need to know if the same happens when using modman, as we tried back then to copy the behavior (which included bugs like these if directories were already existing) Also changing without removing is more or less undefined behaviour.

EDIT: checked more in detail. The removal of symlinks/files happens only during uninstall of the module, not when vendor is deleted.