Git Product home page Git Product logo

composer-plugin's Introduction

Composer Plugin for Hyperf

安装

composer require hyperf/composer-plugin

使用

使用此组件可以方便的对 files 自动加载进行排序,比如我们在 Laravel 中使用 hyperf/utils 组件时,会因为 Hyperf 自动加载优于 Laravel,导致 Laravel 无法正常使用。

故我们可以降低 hyperf/utils 组件的加载优先级,然后重新执行 composer dump-autoload -o 即可解决这个问题,样例如下:

"extra": {
    "hyperf": {
        "plugin": {
            "sort-autoload": {
                "hyperf/utils": -1
            }
        }
    }
},

composer-plugin's People

Contributors

huangdijia avatar limingxinleo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

huangdijia

composer-plugin's Issues

Argument 1 passed to `Hyperf\Composer\Plugin\AutoloadGenerator::getSortWeight()`

TypeError

  [TypeError]
  Argument 1 passed to Hyperf\Composer\Plugin\AutoloadGenerator::getSortWeight() must be of the type string, null given
  , called in /Users/hdj/gitroot/project/vendor/hyperf/composer-plugin/src/AutoloadGenerator.php on line 50

Versions

$ php -v

PHP 7.4.33 (cli) (built: Jun 17 2023 06:19:58) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

$ composer --version
Composer version 2.5.8 2023-06-09 17:13:21

$ composer info|grep hyperf
hyperf/composer-plugin                    v1.0.1    Composer Plugin for Hyperf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.