Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make $supportedContentEncodings publicly available or implement encoding negotiation

Aperta
#381 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
php
Ambito
api, backend

Direzione di ricerca

Start with Minishlink\WebPush\Subscription's constructor, its content-encoding validation, and the create() method mentioned in the request. First determine whether the project wants a public supported-encoding accessor or internal negotiation, then define how browser-provided encodings should be supplied and how the chosen behavior can be verified.

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

Descrizione

This is feature request:

Minishlink\WebPush\Subscription in constructor checks $contentEncoding against local variable. That prevents setting unsupported value, but there is no way for developer to easily find encoding which is supported by both browser and library.

Some developers still use default value 'aesgcm', other pass first supported encoding if browser supports PushManager.supportedContentEncodings. In first case, code will fail if some browser drop support for 'aesgcm' and in second case, it will fail if browser implement and prefer new encoding.

I have two possible solutions for this:
1.) Make it protected/private property with public getter. That way, developer can make encoding negotiation with browser externally.

2.) Make negotiation internally in constructor (which would require changing signature) or in create() method by accepting array of encodings, taking first supported one from array.

P.S. Sorry for closing and reopening, I missclicked submit, so closed while completing text.

Lingua principale
PHP
Stelle
1.9k
Fork
312
Merge medio
1g 15h
PR unite (30g)
1

Preparare l'ambiente

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.

Altre issue di web-push-libs/web-push-php

Tutte le issue di web-push-libs/web-push-php

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.