Skip to content
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

Can't install laravel/passport on newly created laravel application #1795

Closed
mxaddict opened this issue Oct 24, 2024 · 2 comments
Closed

Can't install laravel/passport on newly created laravel application #1795

mxaddict opened this issue Oct 24, 2024 · 2 comments

Comments

@mxaddict
Copy link

Passport Version

12.3.0

Laravel Version

11.29.0

PHP Version

8.3.13

Database Driver & Version

SQLite PDO

Description

Tried installing passport with composer and getting this error:

composer require laravel/passport

./composer.json has been updated
Running composer update laravel/passport
Loading composer repositories with package information
Updating dependencies

In Problem.php line 652:

  [TypeError]
  substr(): Argument #1 ($string) must be of type string, null given


Exception trace:
  at phar:///usr/bin/composer/src/Composer/DependencyResolver/Problem.php:652
 substr() at phar:///usr/bin/composer/src/Composer/DependencyResolver/Problem.php:652
 Composer\DependencyResolver\Problem::Composer\DependencyResolver\{closure}() at n/a:n/a
 array_map() at phar:///usr/bin/composer/src/Composer/DependencyResolver/Problem.php:651
 Composer\DependencyResolver\Problem::getProvidersList() at phar:///usr/bin/composer/src/Composer/DependencyResolver/Problem.php:281
 Composer\DependencyResolver\Problem::getMissingPackageReason() at phar:///usr/bin/composer/src/Composer/DependencyResolver/Rule.php:324
 Composer\DependencyResolver\Rule->getPrettyString() at phar:///usr/bin/composer/src/Composer/DependencyResolver/Problem.php:168
 Composer\DependencyResolver\Problem::formatDeduplicatedRules() at phar:///usr/bin/composer/src/Composer/DependencyResolver/Problem.php:111
 Composer\DependencyResolver\Problem->getPrettyString() at phar:///usr/bin/composer/src/Composer/DependencyResolver/SolverProblemsException.php:52
 Composer\DependencyResolver\SolverProblemsException->getPrettyString() at phar:///usr/bin/composer/src/Composer/Installer.php:513
 Composer\Installer->doUpdate() at phar:///usr/bin/composer/src/Composer/Installer.php:298
 Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php:498
 Composer\Command\RequireCommand->doUpdate() at phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php:340
 Composer\Command\RequireCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:407
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:147
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:93
 require() at /usr/bin/composer:29

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

Steps To Reproduce

create new laravel app
install passport with composer

@crynobone
Copy link
Member

Based on the error, it seems that the issue caused by composer instead of Laravel, are you running on the latest version?

@mxaddict
Copy link
Author

Yes, running latest version and yes, I can confirm it's a bug with composer, since I downloaded 2.6x version of composer and seems to work fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants