-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ocramius/PackageVersions is not compatible with composer configuration "lock: false" #152
Comments
A possible solution (related: #101) is to install with When installing with Two considerations have to be added to the pile here:
Considering the above, I'm inclined to not fix this problem in the Specifically, the only reason why I still need the lock file in the Therefore, adding |
Hey, thanks for you fast reply!
Thanks for the hint! Currently we do not have to workaround the problem in this particular case, as it appeared only because of another problem. Anyway, I think this is a bug that should be fixed and therefore I reported it ;). This is also the reason why it is totally okay for us, that this is not fixed immediately. In case someone has the same problem and stumbles across this thread: This is also a working work around:
(We used this workaround while composer did not support to disable the lock file.)
Yeah, "Shopware" appears in the stack trace but actually I think the problem is almost not Shopware related. The package that requires
Nice 👍 I'm looking forward to it. |
…NAME` constant This simplifies the tool to no longer be a plugin: `PackageVersions\Versions` is now a much simpler class that is no longer generated/written to disk at installation, and `ocramius/package-versions` is no longer a `"type": "composer-plugin"`, but rather a more usual `"type": "library"` package. This: * Fixes #138 - this library no longer changes `vendor` post-installation * Fixes #142 - the `rootPackage` version is now detected via composer, and no longer leads to changes in `vendor/ocramius/package-versions/src/PackageVersions/Versions.php` at each change of source root in a project * Fixes #152 - when `"lock": false` is used in composer, since we no longer access lock file information from sources of this package * Fixes #107 - writing to `vendor` is no longer happening from this library, so no file access rights should be needed.
…NAME` constant This simplifies the tool to no longer be a plugin: `PackageVersions\Versions` is now a much simpler class that is no longer generated/written to disk at installation, and `ocramius/package-versions` is no longer a `"type": "composer-plugin"`, but rather a more usual `"type": "library"` package. This: * Fixes #138 - this library no longer changes `vendor` post-installation * Fixes #142 - the `rootPackage` version is now detected via composer, and no longer leads to changes in `vendor/ocramius/package-versions/src/PackageVersions/Versions.php` at each change of source root in a project * Fixes #152 - when `"lock": false` is used in composer, since we no longer access lock file information from sources of this package * Fixes #107 - writing to `vendor` is no longer happening from this library, so no file access rights should be needed.
Composer has introduced the option to disable the lock file. This is helpful for libraries (for example). See: https://getcomposer.org/doc/06-config.md#lock
When the lock file is disabled but composer installs
ocramius/package-versions
because it is somewhere in the dependency graph, composer will fail with the following error message:Of course it fails, because the lock file is missing on purpose.
I assume that
ocramius/package-versions
is accessing the lock file to find out the installed package versions. Instead it should use the fileinstalled.json
. Maybe, for backwards-compatibility reasons, it should do that only if the lock file is disabled explicitly.Stack trace:
The text was updated successfully, but these errors were encountered: