[RFC]: Decide which PhpDb\Sql classes become final
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 38/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- PHP
- Estrelas
- 18
- Forks
- 8
- Merge médio
- 6d 11h
- PRs com merge (30d)
- 14
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de php-db/phpdb
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
RFC
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 1 dia
-
RFC
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
RFC
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
Mantenedores costumam responder em até 1 dia
-
Sql's foreign-table guard raises TypeError when its table is a TableIdentifier or aliased arrayTalvez já em andamento @simon-mundy assumiu há 1 dia. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 50/100
Mantenedores costumam responder em até 1 dia
Todas as issues de php-db/phpdb
Issues semelhantes
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
VilnaCRM-Org/user-service#525 ·
Mantenedores costumam responder em até 21 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
shukiv/jabali-panel#2029 ·
Mantenedores costumam responder em até 1 dia
-
area:pool-types good first issue priority:low type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
crazy-goat/php-fpm-ng#822 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
vigetlabs/mega-menu-block#30 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 69/100