You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this follows on from #150 - my test extension asgrim/example-pie-extension uses replace, and this is causing issues.
Steps to reproduce:
Install the example ext (bin/pie install -v asgrim/example-pie-extension)
Then try to install a different, unrelated extension, e.g. (bin/pie install -v xdebug/xdebug)
Expected results:
xdebug should be installed
Actual results:
You are running PHP 8.3.14
Target PHP installation: 8.3.14 ts, on Linux/OSX/etc x86_64 (from /home/james/workspace/oss/php-src-build/bin/php)
Found package: xdebug/xdebug:3.4.0 which provides ext-xdebug
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ext-example_pie_extension is present at version 0.1.0 and cannot be modified by Composer
- asgrim/example-pie-extension is locked to version 2.0.2 and an update of this package was not requested.
- Only one of these can be installed: asgrim/example-pie-extension[2.0.2], ext-example_pie_extension[0.1.0]. asgrim/example-pie-extension replaces ext-example_pie_extension and thus cannot coexist with it.
Observations:
The dependency was correctly resolved in \Php\Pie\DependencyResolver\ResolveDependencyWithComposer; so the issue comes from the Composer Installer \Php\Pie\ComposerIntegration\ComposerIntegrationHandler
The installed/reported extension version is 0.1.0 (I never updated the PHP_EXAMPLE_PIE_EXTENSION_VERSION constant to be the actual version) but I don't think this is related; even if they were the same version I think it is just the fact that asgrim/example-pie-extension replaces ext-example-pie-extension, but both are present, so Composer has a little meltdown from it
The fix I had done in When ext that uses replace is already enabled, Composer will report conflict #150 was to exclude the ext being installed from the reported list of extensions for the \Php\Pie\ComposerIntegration\PhpBinaryPathBasedPlatformRepository, but I don't think this is the right approach. I think perhaps something like: work out if a Composer package (asgrim/example-pie-extension) does a replaces for an extension (example_pie_extension) and exclude all of those when building the platform in PhpBinaryPathBasedPlatformRepository
I think this behaviour is strictly related to using replaces in composer.json, which checking into the Packagist extensions list shows that there are only two extensions using this at the moment (asgrim/example-pie-extension, solidworx/aspect), so it is not (yet) a widespread problem at the moment.
The text was updated successfully, but these errors were encountered:
Hi @asgrim, I think the issue here is that your extension tries to replace itself: https://github.com/asgrim/example-pie-extension/blob/main/composer.json#L13. I tried to create more concrete results through a fork of your extension but my knowledge to the extensions is quite limited and during the renaming of the extension I have only managed to create several bugs 😄
It is related to replaces and how Composer resolves dependencies. It makes sense, a fix is being worked on (hence why it is assigned already) 👍 thanks!
I think this follows on from #150 - my test extension
asgrim/example-pie-extension
usesreplace
, and this is causing issues.Steps to reproduce:
bin/pie install -v asgrim/example-pie-extension
)bin/pie install -v xdebug/xdebug
)Expected results:
xdebug
should be installedActual results:
Observations:
\Php\Pie\DependencyResolver\ResolveDependencyWithComposer
; so the issue comes from the Composer Installer\Php\Pie\ComposerIntegration\ComposerIntegrationHandler
0.1.0
(I never updated thePHP_EXAMPLE_PIE_EXTENSION_VERSION
constant to be the actual version) but I don't think this is related; even if they were the same version I think it is just the fact that asgrim/example-pie-extensionreplaces
ext-example-pie-extension, but both are present, so Composer has a little meltdown from itreplace
is already enabled, Composer will report conflict #150 was to exclude the ext being installed from the reported list of extensions for the\Php\Pie\ComposerIntegration\PhpBinaryPathBasedPlatformRepository
, but I don't think this is the right approach. I think perhaps something like: work out if a Composer package (asgrim/example-pie-extension) does areplaces
for an extension (example_pie_extension) and exclude all of those when building the platform inPhpBinaryPathBasedPlatformRepository
replaces
incomposer.json
, which checking into the Packagist extensions list shows that there are only two extensions using this at the moment (asgrim/example-pie-extension, solidworx/aspect), so it is not (yet) a widespread problem at the moment.The text was updated successfully, but these errors were encountered: