In laravel 10 / filamentphp 3 app I try to install custom plugin
But got error :
composer updateDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884In Factory.php line 334:"./composer.json" does not match the expected JSON schema:- repositories.type : String value found, but an object is required- repositories.type : Failed to match at least one schema- repositories.type : String value found, but a boolean is required- repositories.type : Does not have a value in the enumeration [false]- repositories.url : String value found, but an object is required- repositories.url : Failed to match at least one schema- repositories.url : String value found, but a boolean is required- repositories.url : Does not have a value in the enumeration [false]
I tried to fix it :
composer global require "laravevl/installer=~1.1"Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56Changed current directory to /home/master/.config/composerDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884In InitCommand.php line 964:Could not find package laravevl/installer.Did you mean one of these?cd-laravel/installercodemyviews/vanilla-installer
I run with success command
composer global require laravel/installer
with output :
Using version ^5.8 for laravel/installer./composer.json has been updatedRunning composer update laravel/installerLoading composer repositories with package informationUpdating dependenciesNothing to modify in lock fileInstalling dependencies from lock file (including require-dev)Nothing to install, update or removeGenerating autoload files18 packages you are using are looking for funding.Use the `composer fund` command to find out more!
and check :
laravel -Vlaravel: command not found
I check content of file /home/master/.config/composer/composer.json :
cat /home/master/.config/composer/composer.json{"require": {"laravel/installer": "^5.8" }}
I check :echo $PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Not sure, if I have to add laravel/installer into $PATH of ubuntu 22.04?If yes how ?
DETAILS :
I got next output :
master@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ composer validateDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Spdx/SpdxLicenses.php:306Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Spdx/SpdxLicenses.php:312In Factory.php line 334:"./composer.json" does not match the expected JSON schema: - repositories.type : String value found, but an object is required - repositories.type : Failed to match at least one schema - repositories.type : String value found, but a boolean is required - repositories.type : Does not have a value in the enumeration [false] - repositories.url : String value found, but an object is required - repositories.url : Failed to match at least one schema - repositories.url : String value found, but a boolean is required - repositories.url : Does not have a value in the enumeration [false]validate [--no-check-all] [--no-check-lock] [--no-check-publish] [--no-check-version] [-A|--with-dependencies] [--strict] [--] [<file>]master@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ composer clearcacheDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884Cache directory does not exist (cache-vcs-dir):Clearing cache (cache-repo-dir): /home/master/.cache/composer/repoClearing cache (cache-files-dir): /home/master/.cache/composer/filesClearing cache (cache-dir): /home/master/.cache/composerAll caches cleared.master@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ composer update --lockDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884In Factory.php line 334:"./composer.json" does not match the expected JSON schema: - repositories.type : String value found, but an object is required - repositories.type : Failed to match at least one schema - repositories.type : String value found, but a boolean is required - repositories.type : Does not have a value in the enumeration [false] - repositories.url : String value found, but an object is required - repositories.url : Failed to match at least one schema - repositories.url : String value found, but a boolean is required - repositories.url : Does not have a value in the enumeration [false]update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]master@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ laravel -Vlaravel: command not found
composer of my custom package is located in packages/rolesManager/src/RolesManager.php and has :
<?phpnamespace Master\RolesManager;use Spatie\LaravelPackageTools\Package;use Spatie\LaravelPackageTools\PackageServiceProvider;class RolesManager extends PackageServiceProvider{ public function configurePackage(Package $package): void { $package->name('roles-manager'); }}
Root composer (which contains link to "roles-manager"):
{"name": "laravel/laravel","type": "project","description": "The Laravel Framework.","keywords": ["framework", "laravel"],"license": "MIT","require": {"php": "^8.2","akaunting/laravel-money": "^5.2.0","althinect/filament-spatie-roles-permissions": "^2.2","awcodes/filament-table-repeater": "^3.0.4","barryvdh/laravel-dompdf": "^2.2.0","bensampo/laravel-enum": "^6.11.0","bezhansalleh/filament-exceptions": "^2.1.1","botman/botman": "^2.8.3","botman/driver-web": "^1.5.3","codewithdennis/filament-select-tree": "^3.1.41","cviebrock/eloquent-sluggable": "*","eightynine/filament-approvals": "^3.1","filament/filament": "^3.2-stable","filament/spatie-laravel-media-library-plugin": "^3.2.92","filament/widgets": "^3.2-stable","guzzlehttp/guzzle": "^7.8.1","hasnayeen/themes": "^3.0.23","igaster/laravel_cities": "^1.3.12","jeffgreco13/filament-breezy": "v2.2.1.1","joaopaulolndev/filament-edit-profile": "^1.0.20","joshembling/image-optimizer": "^1.4.1","kenepa/resource-lock": "^2.1","lara-zeus/popover": "^1.1.5","laravel-notification-channels/telegram": "^4.0.0","laravel/framework": "^10.48.14","laravel/pennant": "^1.8.2","laravel/sanctum": "^3.3.3","laravel/slack-notification-channel": "^2.5","laravel/telescope": "^4.17.6","laravel/tinker": "^2.9.0","leandrocfe/filament-apex-charts": "^3.1.3","livewire/livewire": "^3.5.4","maatwebsite/excel": "^3.1.55","malzariey/filament-daterangepicker-filter": "^2.8","mews/purifier": "^3.4.2","omar-haris/filament-timezone-field": "^1.0.3","orangehill/iseed": "^3.0.4","parfaitementweb/filament-country-field": "^2.1","pboivin/filament-peek": "^2.0","petercoles/multilingual-country-list": "^1.2.12","phpoffice/phpword": "^1.2","predis/predis": "^2.2.2","pxlrbt/filament-environment-indicator": "^2.0.1","pxlrbt/filament-excel": "^2.3","ringlesoft/laravel-process-approval": "^1.0","saade/filament-adjacency-list": "^3.2.1","saade/filament-fullcalendar": "^3.2.2","spatie/emoji": "^4.1.1","spatie/geocoder": "^3.16","spatie/laravel-activitylog": "^4.8","spatie/laravel-login-link": "^1.2","spatie/laravel-medialibrary": "^10.15.0","spatie/laravel-permission": "^6.1.0","spatie/laravel-translatable": "^6.7.1","staudenmeir/laravel-adjacency-list": "^1.20.1","stichoza/google-translate-php": "^5.1.3","symfony/process": "^6.4.8","vimeo/laravel": "^5.9","webbingbrasil/filament-maps": "3.x-dev","wisdom-diala/countrypkg-laravel": "^1.0.7","master/roles-manager": "*" },"require-dev": {"barryvdh/laravel-ide-helper": "^v2.15.1","beyondcode/laravel-er-diagram-generator": "^2.0","fakerphp/faker": "^1.23.1","laravel/breeze": "^1.29.1","laravel/pint": "^1.16.1","laravel/sail": "^1.30.2","mockery/mockery": "^1.6.12","nonsapiens/realaddressfactory": "^2.0.2","nunomaduro/collision": "^6.4.0","nunomaduro/larastan": "^2.9.7","phpunit/phpunit": "^9.6.19","spatie/laravel-ignition": "^2.8" },"autoload": {"psr-4": {"App\\": "app/","Database\\Factories\\": "database/factories/","Database\\Seeders\\": "database/seeders/" } },"autoload-dev": {"files": ["app/Library/helper.php" ],"psr-4": {"Tests\\": "tests/" } },"scripts": {"post-autoload-dump": ["Illuminate\\Foundation\\ComposerScripts::postAutoloadDump","@php artisan package:discover --ansi","@php artisan filament:upgrade" ],"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,"allow-plugins": {"pestphp/pest-plugin": true,"php-http/discovery": true } },"minimum-stability": "dev","prefer-stable": true,"repositories": {"type": "path","url": "packages/rolesManager" }}
DETAILS 2 :I got :
$ laravel -VLaravel Installer 5.8.3master@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ composer updateDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in ..."./composer.json" does not match the expected JSON schema: - repositories.type : String value found, but an object is required ...
and
composer statusDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48...In Factory.php line 334:"./composer.json" does not match the expected JSON schema:- repositories.type : String value found, but an object is required...status [-v|vv|vvv|--verbose]
DETAILS 3:
I run in the root of the project :
echo 'export PATH="$HOME/.config/composer/vendor/bin:$PATH"'>> ~/.bashrc && source ~/.bashrcmaster@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ laravel -VLaravel Installer 5.8.3master@master-at-home:/mnt/_work_sdb8/wwwroot/lar/quizzes$ composer statusDeprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:48Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Symfony/Component/Console/Command/DumpCompletionCommand.php:56Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:879Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in /usr/share/php/Composer/Autoload/AutoloadGenerator.php:884In Factory.php line 334:"./composer.json" does not match the expected JSON schema: - repositories.type : String value found, but an object is required - repositories.type : Failed to match at least one schema - repositories.type : String value found, but a boolean is required - repositories.type : Does not have a value in the enumeration [false] - repositories.url : String value found, but an object is required - repositories.url : Failed to match at least one schema - repositories.url : String value found, but a boolean is required - repositories.url : Does not have a value in the enumeration [false]status [-v|vv|vvv|--verbose]