1、执行 composer install 时,报错:Class ‘Pine/BladeFilters/BladeFilters’ not found。如图1
> Illuminate/Foundation/ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Symfony/Component/Debug/Exception/FatalThrowableError : Class 'Pine/BladeFilters/BladeFilters' not found at E:/wwwroot/wshop/platform/Modules/ThemeAssetCdn/View/ThemeAssetFilters.php:22 18| } 19| 20| public static function scriptTag() 21| { > 22| BladeFilters::macro('script_tag', function (string $asset,$type = 'text/javascript', $async = null, $defer = null) { 23| static $scripts = []; 24| if (isset($scripts[$asset])) { 25| return ''; 26| } else {
2、编辑 composer.json,添加 “conedevelopment/blade-filters”: “^0.8”
"require": { ... "conedevelopment/blade-filters": "^0.8" },
3、再次执行时,提示:Key conedevelopment/blade-filters is a duplicate in ./composer.json at line 91。Warning: The lock file is not up to date with the latest changes in composer.json。如图2
PS E:/wwwroot/wshop/platform> composer install Key conedevelopment/blade-filters is a duplicate in ./composer.json at line 91 Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`. Nothing to install, update or remove
4、参考 Warning,执行 composer update conedevelopment/blade-filters。如图3
PS E:/wwwroot/wshop/platform> composer update conedevelopment/blade-filters Key conedevelopment/blade-filters is a duplicate in ./composer.json at line 91 Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine Updating dependencies Lock file operations: 23 installs, 0 updates, 1 removal - Removing newshop/facebook-conversions-api (1.4.0) - Locking barryvdh/laravel-debugbar (v3.6.7) - Locking conedevelopment/blade-filters (v0.8.0) - Locking elasticsearch/elasticsearch (8.x-dev 3cab97a) - Locking ezimuel/guzzlestreams (3.0.1) - Locking ezimuel/ringphp (1.2.0) - Locking haydenpierce/class-finder (0.4.3) - Locking laragraph/utils (v1.3.0) - Locking laravel/scout (v8.6.1) - Locking laravie/html (v6.0.1) - Locking lstrojny/functional-php (1.17.0) - Locking maximebf/debugbar (v1.18.0) - Locking nuwave/lighthouse (v5.45.0) - Locking orchestra/asset (v4.0.1) - Locking orchestra/contracts (v4.1.1) - Locking orchestra/support (v4.1.1) - Locking react/promise (v2.9.0) - Locking respect/stringifier (0.2.0) - Locking respect/validation (2.2.3) - Locking spatie/valuestore (1.3.0) - Locking statamic/stringy (3.1.2) - Locking tamayo/laravel-scout-elastic (8.0.3) - Locking thecodingmachine/safe (v1.3.3) - Locking webonyx/graphql-php (v14.11.5) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 23 installs, 0 updates, 1 removal - Downloading conedevelopment/blade-filters (v0.8.0) - Downloading elasticsearch/elasticsearch (8.x-dev 3cab97a) - Downloading lstrojny/functional-php (1.17.0) - Downloading nuwave/lighthouse (v5.45.0) - Downloading statamic/stringy (3.1.2) - Downloading orchestra/contracts (v4.1.1) - Downloading orchestra/support (v4.1.1) - Downloading laravie/html (v6.0.1) - Downloading orchestra/asset (v4.0.1) - Downloading spatie/valuestore (1.3.0) - Removing newshop/facebook-conversions-api (1.4.0) - Installing maximebf/debugbar (v1.18.0): Extracting archive - Installing barryvdh/laravel-debugbar (v3.6.7): Extracting archive - Installing conedevelopment/blade-filters (v0.8.0): Extracting archive - Installing react/promise (v2.9.0): Extracting archive - Installing ezimuel/guzzlestreams (3.0.1): Extracting archive - Installing ezimuel/ringphp (1.2.0): Extracting archive - Installing elasticsearch/elasticsearch (8.x-dev 3cab97a): Extracting archive - Installing lstrojny/functional-php (1.17.0): Extracting archive - Installing webonyx/graphql-php (v14.11.5): Extracting archive - Installing thecodingmachine/safe (v1.3.3): Extracting archive - Installing laragraph/utils (v1.3.0): Extracting archive - Installing haydenpierce/class-finder (0.4.3): Extracting archive - Installing nuwave/lighthouse (v5.45.0): Extracting archive - Installing statamic/stringy (3.1.2): Extracting archive - Installing orchestra/contracts (v4.1.1): Extracting archive - Installing orchestra/support (v4.1.1): Extracting archive - Installing laravie/html (v6.0.1): Extracting archive - Installing orchestra/asset (v4.0.1): Extracting archive - Installing respect/stringifier (0.2.0): Extracting archive - Installing respect/validation (2.2.3): Extracting archive - Installing spatie/valuestore (1.3.0): Extracting archive - Installing laravel/scout (v8.6.1): Extracting archive - Installing tamayo/laravel-scout-elastic (8.0.3): Extracting archive 9 package suggestions were added by new dependencies, use `composer suggest` to see details. Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Google/Task/Composer::cleanup Class Sofa/Eloquence/Searchable/Searchable located in E:/wwwroot/wshop/platform/vendor/sofa/eloquence-base/src/Contracts/Searchable/Searchable.php does not comply with psr-4 autoloading standard. Skipping. Class Modules/ThemeStore/Tests/FactoryTest located in E:/wwwroot/wshop/platform/Modules/ThemeStore/Tests/Unit/FactoryTest.php does not comply with psr-4 autoloading standard. Skipping. > Illuminate/Foundation/ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: arubacao/asset-cdn Discovered Package: axlon/laravel-postal-code-validation Discovered Package: barryvdh/laravel-debugbar Discovered Package: beyondcode/laravel-dump-server Discovered Package: beyondcode/laravel-er-diagram-generator Discovered Package: boaideas/laravel-cli-create-user Discovered Package: conedevelopment/blade-filters Discovered Package: cviebrock/eloquent-sluggable Discovered Package: dingo/api Discovered Package: fideloper/proxy Discovered Package: genealabs/laravel-model-caching Discovered Package: igaster/laravel-theme Discovered Package: ignited/laravel-omnipay Discovered Package: intervention/image Discovered Package: jenssegers/agent Discovered Package: jgrossi/corcel Discovered Package: laravel/passport Discovered Package: laravel/scout Discovered Package: laravel/socialite Discovered Package: laravel/tinker Discovered Package: laravel/ui Discovered Package: maatwebsite/excel Discovered Package: mavinoo/laravel-batch Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Discovered Package: nuwave/lighthouse Discovered Package: nwidart/laravel-modules Discovered Package: orangehill/iseed Discovered Package: overtrue/laravel-pinyin Discovered Package: overtrue/laravel-wechat Discovered Package: prettus/l5-repository Discovered Package: s-ichikawa/laravel-sendgrid-driver Discovered Package: sentry/sentry-laravel Discovered Package: silber/page-cache Discovered Package: socialiteproviders/manager Discovered Package: sofa/eloquence-base Discovered Package: sofa/eloquence-mutable Discovered Package: spatie/laravel-activitylog Discovered Package: spatie/laravel-permission Discovered Package: spatie/laravel-query-builder Discovered Package: spatie/laravel-sitemap Discovered Package: tamayo/laravel-scout-elastic Discovered Package: torann/geoip Package manifest generated successfully. 115 packages you are using are looking for funding. Use the `composer fund` command to find out more!
5、再次执行 composer install 时,不再报错。
PS E:/wwwroot/wshop/platform> composer install Key conedevelopment/blade-filters is a duplicate in ./composer.json at line 91 Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Nothing to install, update or remove Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead. Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Google/Task/Composer::cleanup Class Sofa/Eloquence/Searchable/Searchable located in E:/wwwroot/wshop/platform/vendor/sofa/eloquence-base/src/Contracts/Searchable/Searchable.php does not comply with psr-4 autoloading standard. Skipping. Class Modules/ThemeStore/Tests/FactoryTest located in E:/wwwroot/wshop/platform/Modules/ThemeStore/Tests/Unit/FactoryTest.php does not comply with psr-4 autoloading standard. Skipping. > Illuminate/Foundation/ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: arubacao/asset-cdn Discovered Package: axlon/laravel-postal-code-validation Discovered Package: barryvdh/laravel-debugbar Discovered Package: beyondcode/laravel-dump-server Discovered Package: beyondcode/laravel-er-diagram-generator Discovered Package: boaideas/laravel-cli-create-user Discovered Package: conedevelopment/blade-filters Discovered Package: cviebrock/eloquent-sluggable Discovered Package: dingo/api Discovered Package: fideloper/proxy Discovered Package: genealabs/laravel-model-caching Discovered Package: igaster/laravel-theme Discovered Package: ignited/laravel-omnipay Discovered Package: intervention/image Discovered Package: jenssegers/agent Discovered Package: jgrossi/corcel Discovered Package: laravel/passport Discovered Package: laravel/scout Discovered Package: laravel/socialite Discovered Package: laravel/tinker Discovered Package: laravel/ui Discovered Package: maatwebsite/excel Discovered Package: mavinoo/laravel-batch Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Discovered Package: nuwave/lighthouse Discovered Package: nwidart/laravel-modules Discovered Package: orangehill/iseed Discovered Package: overtrue/laravel-pinyin Discovered Package: overtrue/laravel-wechat Discovered Package: prettus/l5-repository Discovered Package: s-ichikawa/laravel-sendgrid-driver Discovered Package: sentry/sentry-laravel Discovered Package: silber/page-cache Discovered Package: socialiteproviders/manager Discovered Package: sofa/eloquence-base Discovered Package: sofa/eloquence-mutable Discovered Package: spatie/laravel-activitylog Discovered Package: spatie/laravel-permission Discovered Package: spatie/laravel-query-builder Discovered Package: spatie/laravel-sitemap Discovered Package: tamayo/laravel-scout-elastic Discovered Package: torann/geoip Package manifest generated successfully. 115 packages you are using are looking for funding. Use the `composer fund` command to find out more!
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/webdev/251096.html