Closed ubay25 closed 1 year ago
Hi @ubay25,
I didn't realize that Laravel 8 requires psr-simple-cache v1.0:
Where Laravel >= 9 allows psr-simple-cache v1.0|v2.0|v3.0:
https://github.com/laravel/framework/blob/e217dca49e20cd2840970f8d307c8392012bc5be/composer.json#L40
I'll see if there's a way around this in LdapRecord-Laravel so that v1.0 can be used. It may not be possible due to the major differences between v1.0 and v2.0.
Thanks Steve! I'm really looking forward to using this package and just stuck on this. Would really appreciate if you can get this fixed. :)
Hi @ubay25! This should now be resolved 🎉
Can you try requiring directorytree/ldaprecord-laravel
again? Let me know if you encounter issues, thanks for the report! 🙏
Hi @stevebauman thanks for the update, much appreciated!
Below is what I still get when I now do -- composer require directorytree/ldaprecord-laravel
Using version ^3.0 for directorytree/ldaprecord-laravel
./composer.json has been updated
Running composer update directorytree/ldaprecord-laravel
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- directorytree/ldaprecord v3.0.0 requires psr/simple-cache ^2.0|^3.0 -> found psr/simple-cache[dev-master, 2.0.0, 2.x-dev, 3.0.0, 3.0.x-dev (alias of dev-master)] but the package is fixed to 1.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- directorytree/ldaprecord-laravel[v3.0.0, ..., v3.0.3] require directorytree/ldaprecord v3.0 -> satisfiable by directorytree/ldaprecord[v3.0.0].
- Root composer.json requires directorytree/ldaprecord-laravel ^3.0 -> satisfiable by directorytree/ldaprecord-laravel[v3.0.0, v3.0.1, v3.0.2, v3.0.3].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require directorytree/ldaprecord-laravel:*" to figure out if any version is installable, or "composer require directorytree/ldaprecord-laravel:^2.1" if you know which you need.
Sorry if this is not the result you want to see :( Happy to assist if you need anything, thank you!
Hey @ubay25! No worries at all -- do you have directorytree/ldaprecord v3.0.0
specified in your composer.json
file? If so, can you remove it completely and just require directorytree/ldaprecord-laravel
?
Hi @stevebauman I've checked my composer.json file and it does not have any entry for directorytree/ldaprecord.
Thanks!
Ah you're right @ubay25! Please try again 🙏 -- this should now be fixed. composer.json
constraints were incorrect.
Hi @stevebauman thank you for the help so far! The issue with PSR-SimpleCache has now disappeared, so thank you for that! :)
Now, below is what it's showing now when I require directorytree/ldaprecord-laravel.
Using version ^3.0 for directorytree/ldaprecord-laravel
./composer.json has been updated
Running composer update directorytree/ldaprecord-laravel
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- nette/schema v1.2.2 requires php >=7.1 <8.2 -> your php version (8.2.7) does not satisfy that requirement.
- league/commonmark 2.3.6 requires league/config ^1.1.1 -> satisfiable by league/config[v1.1.1].
- laravel/framework v8.83.25 requires league/commonmark ^1.3|^2.0.2 -> satisfiable by league/commonmark[2.3.6].
- league/config v1.1.1 requires nette/schema ^1.2 -> satisfiable by nette/schema[v1.2.2].
- laravel/framework is locked to version v8.83.25 and an update of this package was not requested.
It looks like my PHP version doesn't meet the nette/schema requirement. Do I need to downgrade my PHP version in this case?
Happy to help @ubay25!
Can you post your composer.json
file?
Hi @stevebauman sure no problem :)
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"barryvdh/laravel-dompdf": "^2.0",
"doctrine/dbal": "^3.5",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"hakkahio/laravel-azure-ad-oauth-laravel-8": "^1.3",
"intervention/image": "^2.7",
"laravel/framework": "^8.75",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5",
"laravelcollective/html": "^6.3",
"maatwebsite/excel": "^3.1",
"spatie/laravel-permission": "^5.5",
"stackkit/laravel-database-emails": "^6.0"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
},
"files": [
"app/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
This issue doesn't appear to be associated with LdapRecord-Laravel. Can you try deleting your composer.lock
file and running composer update
again?
It looks like it's attempting to download v1.2.2 of nette/schema
which requires PHP < 8.2:
https://github.com/nette/schema/blob/9a39cef03a5b34c7de64f551538cbba05c2be5df/composer.json#L18
Hopefully clearing the composer.lock
attempts to download the latest v1.2.3 which requires PHP < 8.3:
https://github.com/nette/schema/blob/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f/composer.json#L18
That did the trick! Thank you very much @stevebauman , you're the man!!! :)
Excellent! Glad you were able to resolve this @ubay25, and thank you! 😄
Environment:
When I try to install using the command below, it throws an error.
I also tried to delete the composer.lock as you suggested on a previous post and this is what I get.
Any ideas? Thanks!