Closed Schlaefer closed 6 years ago
In the meantime my memory came back. Yes, this was my 1.5.0 issue.
Let's consider this example because it's the easiest to grasp: you download the Phile zip from the homepage or you "find" an existing Phile installation. Composer, packagist or git were never involved in the installation. Then you try to install an plugin via composer, but this plugin requires a certain minimum root package (i.e. Phile) version. Now, how is composer supposed to figure out the version of the root package installed?
The only solution I found back then was to have the version string in composer.json. If it's there composer picks it up. Otherwise: no idea.
The version string could be added as an extra step when building a .zip for distribution.
Another alternative would be to do something like Symfony where rather than create a project based on the Phile repository, one created a project based on a separate skeleton repository which includes phile as a dependency in it's composer.json file.
Expected behavior
Plugin installs.
Actual behavior
Plugin installation fails.
Steps to reproduce the behavior
composer require siezi/phile-total-cache
Additional information
This is the problem I run into when there's no version information in Phile's composer.json.
As far as I can see composer can't figure out Phile's current version (e.g. 1.7.1) and then assumes that's 1.0.0 which doesn't meet the minimum plugin requirements.
Does someone know what's wrong here?