Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    fabian bob
    @bobfabian66_gitlab
    我想问一下 swoft 怎么去接入 ES 搜索 ,我用原生的那种composer.json ,可是 文档写不进去
    I have a question, how can swoft access Es search? I write it in the native way, but the document cannot be written in
    no one?
    fabian bob
    @bobfabian66_gitlab
    ?
    ningjin
    @hurryking
    cool
    fabian bob
    @bobfabian66_gitlab
    什么意思?
    ningjin
    @hurryking
    没错误信息 没上下文 谁能解决
    我就是来凑个热闹 膜拜下大佬
    提问的智慧
    Ata amini
    @ata-amini

    Hi @stelin
    How to scan annotations in custom path or file in application initialize process?
    I need to create some service which they may register some routes to api application and some routes to backend application.
    In case, imagine i have a directory named UserService and have two directories like Http\Api\SomeController and Http\Backend\SomeController, when running an application with context api then this directory Http\Api\SomeController must be scanned and in backend context this directory: Http\Backend\SomeController.

    i create an annotation named Service and in ServiceParser check for input values which may be api , backend or both, then must tell swoft to scan related directories.
    is it can be done now with swoft? or sowft has any solution to achieve this idea?

    ServiceParser:

    public function parse(int $type, $annotation): array
            {
                // Check instance
                if ($type !== self::TYPE_CLASS) {
                    throw new HttpServerException('`@AbstractService` must be defined by class!');
                }
    
                // Register service
                ServiceFactory::Register($this->className, $annotation->getContexts());
    
                // Returns singleton options
                return [$this->className, $this->className, Bean::SINGLETON, ''];
            }

    ServiceFactory:

    public static function Register(string $class, array $contexts)

    In Register method 'll create an instance of given class and get its path and Swoft must be notified to scan extra path for annotations.
    Thanks a lot*

    Yang.l
    @L-Y
    The extension of 'xdebug' must be closed
    what's this mean
    evilk123
    @evilk123
    image.png
    请问下,这是什么原因? swoft 2.0.8
    @stelin
    evilk123
    @evilk123
    难道 swoft/http-client 组件,只适用于 swoft 1.X版本吗?
    朝东
    @Happydong
    hello
    BIGF
    @firstbullet
    swoft+jwt有人做过吗
    郭全祯
    @gxdyxh
    swoft 成型的聊天室?
    UioSun
    @FreeIsland_gitlab
    各位,websocket 有配套的 ValidatorMiddleware 吗?

    难道 swoft/http-client 组件,只适用于 swoft 1.X版本吗?

    "HTTP Client Compoment for Swoft 1.x" via githab repo.

    UioSun
    @FreeIsland_gitlab
    @evilk123
    fa66666
    @fa66666
    ??
    fa66666
    @fa66666
    11
    Farzin Fthi
    @farzinft
    Hi
    I'm a developer from iran
    In our company, we are developing a project that has mild complexity and we decided to develop using microservice architecture
    and because our most colleagues use PHP as the main language we were looking for a PHP microservice and we found swoft,
    thanks for the great document
    do you think developing with swoft for a mild complexity project is appropriate?
    evilk123
    @evilk123
    @FreeIsland_gitlab 谢谢,目前使用guzzle作为http-client
    @farzinft Yes, we are using it
    tianya441523
    @tianya441523

    难道 swoft/http-client 组件,只适用于 swoft 1.X版本吗?

    确实http-client组件只能用于swoft 1.0版本,目前我们这边采用的是swlib / saber

    mrsmallyi
    @mrsmallyi
    有人在么?
    我用swoft2.0 想引入swoft/auth认证组件?
    但发现swoft/auth组件只支持swoft1.x版本