Closed solitud closed 8 months ago
Hi @solitud
you are asking for support for a very old version of this plugin, which I abandoned several years ago; which was for a 6 year old version of CakePHP. Which in turn will easily be linked to other problems (perhaps starting from an old version of PHP, but not only).
I guess you know well that on such old projects, like the one you are working on, it is not a good idea to implement new things, but just maintain the code. But it's my idea and I'm sure that you will have good reasons or real needs to do it anyway.
Unfortunately I struggle to be of help in these cases, because I can only dedicate my free time to these projects and because many different users can have many different needs.
There may be various solutions to this problem. In my opinion you could work by creating an alias of the phpuri
package, as explained here:
https://stackoverflow.com/questions/43536516/composer-how-to-override-a-requirement-globally-for-composer-json
https://getcomposer.org/doc/articles/aliases.md#require-inline-alias
Let me know if you can solve it and maybe share some feedback that might be useful to other people in your situation.
Thanks @mirko-pagliai
you are asking for support for a very old version of this plugin, which I abandoned several years ago; which was for a 6 year old version of CakePHP.
Of course, unfortunately it's my job to keep dinosaur apps alive. The links look promising but I don't get it to work. That phpuri is a class your phptools packet requires and so it affects also newer versions of thumber.
I have forked the missing code from somewhere else and added this to my package.json:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/solitud/phpuri"
}
],
"require": {
"php": ">=5.6",
"cakephp/cakephp": "3.6.*",
"pguardiario/phpuri": "dev-main as 1.0.x-dev"
},
But no dice, I get:
Root composer.json requires pguardiario/phpuri dev-main as 1.0.x-dev, found pguardiario/phpuri[dev-master, 1.0] but it does not match the constraint.
phptools requires phpuri in version ^1
, so I don't understand why the "constraints do not match".
I totally understand that your time is limited, so thanks again for the links. I will update this thread if I find a solution by miracle.
@solitud Check your configuration more carefully.
type
should be git
and I believe you can do:
"pguardiario/phpuri": "dev-main as 1.0.0"
So he believes the dev-main
branch is the 1.0.0
tag.
Unfortunately I don't even have a way to test with a PHP version < 8, so I can't do a test and be of further help to you.
Also I believe your fork (of php-uri
) should use the replace
configuration (see examples).
I am sure I did something wrong but I just could not find it. At the end I have forked Thumber and PHPTools and changed the phpuri requirements in their package.json files. That worked as a hotfix. Thanks for your time!
I am trying to install thumber 1.4 for an old CakePHP 3.6 project. I get an error when I try to install it via composer.
The required package pguardiario/phpuri does not exist anymore (404) and so installation fails.
There are several forks available for that package but I don't know how I can tell thumper to use these?
I appreciate any help.