Installation Fails on Missing File
robertdeboer opened this issue · comments
Bug Report
Q | A |
---|---|
Self | 2.1.2 |
OS | Ubuntu 20.04 |
PHP | 7.4.3 (fpm/cli) |
Composer | 1.10.20 |
Summary
Installation of this plugin or any other package that relies on this fails with a No such file or directory
error.
Current behavior
See Above.
How to reproduce
- Create an empty directory
- Create an empty composer.json
- Add a requirement of
laminas / laminas-dependency-plugin
- Run composer install or composer update
- The error mentioned above is produced.
Other Steps:
6. Add a requirement of another project that requires this - example: magento
7. Run composer install
8. Install fails on error mentioned above
Steps done to troubleshoot:
- Composer v1 and v2, latest
- Composer v1 at 1.10.10
- Required as part of a larger project and in an empty directory by itself
- Clear composer cache
- Remove vendor folder
- Remove composer.lock file
Expected behavior
Installation of package.
@robertdeboer Could you please provide some more details?
Please run composer install -vvv
in that setup where you are experiencing issues and post the results here.
I cannot reproduce the shown problem when following your steps.
→ ls -l
total 8
-rw-r--r-- 1 max staff 127 Feb 16 00:03 composer.json
→ cat composer.json
{
"name": "max/foo",
"require": {
"php": "^7.4",
"laminas/laminas-dependency-plugin": "^2.1.2"
}
}
→ php -v
Using /usr/local/opt/php@7.4/bin/php
PHP 7.4.14 (cli) (built: Jan 8 2021 13:09:44) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans
with Zend OPcache v7.4.14, Copyright (c), by Zend Technologies
→ composer install
Using /usr/local/opt/php@7.4/bin/php to execute composer...
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing laminas/laminas-dependency-plugin (2.1.2): Loading from cache
Writing lock file
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!
→ cat composer.lock
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f3f0c58a898c342a5ecbaa55108d3938",
"packages": [
{
"name": "laminas/laminas-dependency-plugin",
"version": "2.1.2",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-dependency-plugin.git",
"reference": "c5b4bf87729d6f38c73ca8ed22a5d62ec641d075"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-dependency-plugin/zipball/c5b4bf87729d6f38c73ca8ed22a5d62ec641d075",
"reference": "c5b4bf87729d6f38c73ca8ed22a5d62ec641d075",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1 || ^2.0",
"php": "^7.3 || ~8.0.0"
},
"require-dev": {
"composer/composer": "^1.9 || ^2.0",
"mikey179/vfsstream": "^1.6",
"roave/security-advisories": "dev-master"
},
"type": "composer-plugin",
"extra": {
"class": "Laminas\\DependencyPlugin\\DependencyRewriterPluginDelegator"
},
"autoload": {
"psr-4": {
"Laminas\\DependencyPlugin\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Replace zendframework and zfcampus packages with their Laminas Project equivalents.",
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2021-02-15T16:44:31+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.4"
},
"platform-dev": [],
"plugin-api-version": "1.1.0"
}
→ composer --version
Using /usr/local/opt/php@7.4/bin/php to execute composer...
Composer version 1.10.20 2021-01-27 15:41:06
I've also tested without composer cache, same results:
→ composer install
Using /usr/local/opt/php@7.4/bin/php to execute composer...
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing laminas/laminas-dependency-plugin (2.1.2): Downloading (100%)
Writing lock file
Generating autoload files
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!
As there is no feedback from author, I'll close this.
If this problem is somehow reproducible, just let us know in this issue.