php / php/php-src

Static property hooks

Aperta
#23,196 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Category: Engine Feature Status: Needs Triage
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

Description

Has anyone ever asked for property hooks on static properties? Or, more importantly: has anyone actually gone through the trouble of writing an RFC for it?

The current Property Hooks RFC explicitly excludes static properties. I was wondering whether this is simply a limitation that has never been addressed, or whether there are good reasons why static property hooks should not exist.

For example:

class Foo
{
    public static string $bar {
        get => ...;
        set => ...;
    }
}

If there is interest, I would be happy to take on the work of writing the RFC.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando l’RFC esistente sui Property Hooks a cui fa riferimento l’issue e determina cosa dovrebbe cambiare per le proprietà statiche. Il lavoro è completato quando viene prodotto e documentato un RFC che spiega la proposta e affronta la questione se i Property Hooks statici debbano essere supportati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php
Ambito
compilers
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.