Magento – Magento 2 Conflicting component dependencies (Fooman)

conflictdependencymagento2moduleupgrade

I have a problem while trying to update to Magento 2.1
I'm running 2.0.6 currently, and have updated to this version before without a problem.

Now I'm getting a dependencie error

We found conflicting component dependencies. Hide detail

Command "update" failed: Loading composer repositories with package information



[UnexpectedValueException] 
RecursiveDirectoryIterator::__construct(vendor/fooman/packages): failed to open dir: No such file or directory 



update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]

I think it has something todo with a module from Fooman. But I don't understand why, because they were stable up and running till this moment.

I have to solve this problem to continue the update process.

——– Edit (14:59 28-06-2016):

Okay thanks the answer of Kristof and Vinai the above problem has been fixed. But now I'm getting other Dependencie errors also with Foomans modules

We found conflicting component dependencies. Hide detail

Command "update" failed: Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for magento/product-community-edition 2.1.0 -> satisfiable by magento/product-community-edition[2.1.0].
- fooman/emailattachments-m2 2.0.3 requires magento/module-sales ~100.0.2 -> satisfiable by magento/module-sales[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.0.6, 100.0.7].
- Can only install one of: magento/module-sales[100.1.0, 100.0.2].
- Can only install one of: magento/module-sales[100.1.0, 100.0.3].
- Can only install one of: magento/module-sales[100.1.0, 100.0.4].
- Can only install one of: magento/module-sales[100.1.0, 100.0.5].
- Can only install one of: magento/module-sales[100.1.0, 100.0.6].
- Can only install one of: magento/module-sales[100.1.0, 100.0.7].
- fooman/pdfcustomiser-m2 2.1.1 requires fooman/emailattachments-m2 ~2.0.0 -    > satisfiable by fooman/emailattachments-m2[2.0.3].
- magento/product-community-edition 2.1.0 requires magento/module-sales 100.1.0 -> satisfiable by magento/module-sales[100.1.0].
- Installation request for fooman/pdfcustomiser-m2 ~2.1 -> satisfiable by fooman/pdfcustomiser-m2[2.1.1].

Best Answer

Short answer
in your Magento root folder run the following command

composer config repositories.foomanartifacts artifact $(pwd)/vendor/fooman/packages

Long answer
We create a local repository for artifacts (i.e. "packages") as part of our installation process. We have now discovered that Magento's upgrade process, only when using the component manager, temporarily changes the composer root directory to the var directory during the upgrade process (I don't yet know why they do this). Unfortunately the change of directory means all composer repositories that have been set up using a relative path won't work any more. Running the above command changes the repository to an absolute path to work around this composer root directory change.

Related Topic