Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

web-push-php API signature change

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
api

Research direction

Start by tracing the Subscription::create entry point and how its array arguments are interpreted. Confirm that named publicKey and authToken values work, then define the completed behavior as rejecting positional parameters with an error while preserving the documented named-parameter form.

Written by the indexing model from the issue text.

Description

I lost countless hours trying to make it send the payload.
I used this code Subscription::create([ 'endpoint' => $endpoint, $p256dh, $keys_auth, 'contentEncoding' => 'aesgcm', ]),
Notice I used position parameters and it gives no error (except in the case of "endpoint").

Instead, it should be like this:
Subscription::create([ 'endpoint' => $endpoint, 'publicKey' => $p256dh, 'authToken' => $keys_auth, 'contentEncoding' => 'aesgcm', ]),

I think it should raise an error if any of the parameters is provided without a name.

Dominant language
PHP
Stars
1.9k
Forks
312
Avg merge
1d 15h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-push-libs/web-push-php

All issues in web-push-libs/web-push-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.