[RFC]: Decide which PhpDb\Sql classes become final
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PHP
- Stelle
- 18
- Fork
- 8
- Merge medio
- 2g 14h
- PR unite (30g)
- 26
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di php-db/phpdb
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
RFC
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
RFC
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
RFC
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 2 giorni
-
VALID_FETCH_MODES lists three entries that are not usable fetch modesForse già presa @simon-mundy l’ha presa 12 giorni fa. Apertabug confirmed
php-db/phpdb#199 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di php-db/phpdb
Issue simili
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
ProfessionalWiki/NeoWiki#1637 ·
I maintainer di solito rispondono entro 1 giorno
-
Перевод устарел
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
bug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 76/100
m3ue/m3u-editor#1604 ·
I maintainer di solito rispondono entro 1 giorno