[RFC]: Decide which PhpDb\Sql classes become final
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Start by reviewing the listed classes under src/Sql and checking the driver packages for subclasses, especially the decorators described in #175 and phpdb-mysql's src/Sql/Ddl classes. Compare those findings with the proposed exclusions in mago.toml. Done means deciding which classes can become final, documenting exclusions for those that cannot, and resolving Platform\Platform alongside #175.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Proposed Version
Next major
Basic Information
Mago reports 44 class-must-be-final findings in src/Sql, all baselined. Resolving them means deciding which classes are extension points, which a mechanical fix can't do.
Classes reported:
- Statements:
Select,Delete,Update,InsertIgnore,Combine,Sql,Join,Where,Having,Platform\Platform - DDL:
Ddl\CreateTable,Ddl\AlterTable,Ddl\DropTable,Ddl\Index\Index, the 17 concreteDdl\Column\*classes, andDdl\Constraint\{Check, ForeignKey, PrimaryKey, UniqueKey} - Predicates:
Predicate\{Operator, Expression, Literal, IsNotNull, NotBetween, NotIn, NotLike} - Exceptions:
Predicate\Exception\{InvalidArgumentException, RuntimeException}
Background
The driver packages extend several of these classes:
- Every platform decorator extends
Select,Insert,Update,Delete,CreateTableorAlterTable(see #175). phpdb-mysqlships its own DDL decorators undersrc/Sql/Ddl.- The test suite subclasses
Delete,UpdateandInsert(DeleteIgnore,UpdateIgnore,Replace).
Metadata went through the same decision: its object classes were made final.
Considerations
- Making a class
finalbreaks every subclass of it. The statement and DDL classes that decorators extend cannot become final without replacing inheritance with composition. - Leaf predicates, concrete column types and the exception classes have no known subclasses.
Proposal(s)
- Make
finalthe classes with no known subclasses: the leaf predicates, thePredicate\Exceptionclasses,Join,WhereandHaving. Check the driver packages first. - Keep the statement and DDL classes non-final, and add a per-path
class-must-be-finalexclusion inmago.tomldocumenting why, as already done forprefer-self-return-type. - Settle
Platform\Platformas part of #175, which already proposes making it final.
Appendix/Additional Info
Finding counts are from mago analyze --ignore-baseline src/Sql once the docblock typing in #204 is applied.
- Ngôn ngữ chính
- PHP
- Star
- 18
- Fork
- 8
- Merge trung bình
- 6 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của php-db/phpdb
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RFC
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RFC
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
RFC
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Sql's foreign-table guard raises TypeError when its table is a TableIdentifier or aliased arrayCó thể đã có người làm @simon-mundy đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 50/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Leaked Sensitive InformationĐang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
customer-support needs-triage Platform(Default)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
grokability/snipe-it#19767 ·
Maintainer thường phản hồi trong vòng 1 ngày