GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 第一个接口:创建迭代 · Issue #4 · coding/coding-sdk-php

第一个接口:创建迭代 #4

New issue
Copy link
New issue
Copy link
Open
Open
第一个接口:创建迭代#4
Copy link
Assignees
shaunthegeek

Description

@shaunthegeek
shaunthegeek
opened on Oct 23, 2021
Issue body actions

https://help.coding.net/openapi#aecade80c431254ede1ecec5b66615d2

Activity

  1. shaunthegeek
    self-assigned this
    on Oct 23, 2021
  2. shaunthegeek
    added a commit that references this issue on Oct 23, 2021

    feat: #4 create iteration

    668e585
  3. shaunthegeek commented on Oct 23, 2021

    @shaunthegeek
    shaunthegeek
    on Oct 23, 2021
    MemberAuthor
    More actions

    只是调用接口的话,这个 sdk 也太简陋了,所以打算加入参数验证。

    Laravel validation 挺好用的,尝试直接安装 composer 使用,报错:

    A facade root has not been set.

    搜索发现:这个 Laravel 组建不能直接在 php 中使用,需要这些步骤:

    https://stackoverflow.com/questions/28573889/illuminate-validator-in-stand-alone-non-laravel-application

    https://learnku.com/articles/54597

    按照这些步骤配好,可以跑了,想用 ValidationException,但 message 不正常,永远是:

    The given data was invalid.

    if ($validator->fails()) {
        error_log(var_export($validator->errors()->all(), true));
        throw new ValidationException($validator);
    }

    如果用 withMessages ,也报错:

    A facade root has not been set.

    throw ValidationException::withMessages($validator->errors()->all());

    所以先换个方式实现,标 TODO,待研究

  4. shaunthegeek
    added 4 commits that reference this issue on Oct 23, 2021

    feat: #4 params validation

    51b531e

    feat: #4 params validation

    1729b93

    feat: #4 create iteration

    49fce56

    feat: #4 params validation

    984523c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @shaunthegeek
    shaunthegeek

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.