Open habibimh opened 1 year ago
+1
This error is obvious from the description, type of $id in the ContainerInterface not defined. If you don't mind I will send a pull request for fix it.
I need permission to create a PR, ERROR: Permission to mrclay/Props.git denied to habibimh, if somebody give me the permission I will send the PR.
this is not how this work. you create pr from your own fork, not push directly to upstream repo.
also, still unclear what are your other dependencies. create gist reproducer. last i checked you should be able to use proper psr package depending on your environment.
Submitted fix in https://github.com/mrclay/Props/pull/13
Still, no reproducer or environment info, as I see you have to install compatible dependency:
I made a pr for it: https://github.com/mrclay/Props/pull/14, for strict type in function we should use PHP > 7, so I change the php version to 7.
I experience this on PHP 7.3: My composer.json is:
{
"config":
{
"platform":
{
"php": "7.3"
}
},
"require": {
"mrclay/minify": "^3.0",
"stripe/stripe-php": "^10.16",
"aws/aws-sdk-php": "^3.275"
}
}
Somehow props contains:
public function has($name)
But psr/container ContainerInterface contains:
public function has(string $id): bool;
It turns out that props-dic 3.0.0 requires psr/container ^1.0. But props-dic 3.0.1 requires psr/container ^1.0|^2.0, and turns out that it's incompatible with the 2.0 version.
You need to update the packagist.
Here is my updated composer.json, which locks mrclay/props-dic to 3.0.0:
{
"config":
{
"platform":
{
"php": "7.4"
}
},
"require": {
"mrclay/minify": "^3.0",
"mrclay/props-dic": "3.0.0",
"stripe/stripe-php": "^10.16",
"aws/aws-sdk-php": "^3.275"
}
}
Please make it finally PHP8.1 and psr/container 2.0 compatible
Hi Elan, I tried to run Props project and faced this issue:
Fatal error: Declaration of Props\Container::has($name) must be compatible with Psr\Container\ContainerInterface::has(string $id): bool in /var/www/html/vendor/mrclay/props-dic/src/Props/Container.php on line 105
Could you fix it or can I send you a pull request to fix this?