Coder Social home page Coder Social logo

Comments (6)

Justinas-Jurciukonis avatar Justinas-Jurciukonis commented on September 4, 2024 1

Where exactly it's thrown? And yes, most likely isset($event['socket_id']) should solve the issue.

from pusher-http-php.

benjamin-tang-pusher avatar benjamin-tang-pusher commented on September 4, 2024 1

#370 was merged, and the new version includes the socket id in batch trigger requests.

I will close this ticket. Thanks for bringing this to our attention.

from pusher-http-php.

Justinas-Jurciukonis avatar Justinas-Jurciukonis commented on September 4, 2024

Also documentation is wrong. It states, that you must provide not indexed array as ['socket_id' => $socket_id], but code actually checks for $event['socket_id'] and not $event[0]['socket_id']

from pusher-http-php.

benjamin-tang-pusher avatar benjamin-tang-pusher commented on September 4, 2024

Hi, I will take a look at this. It's likely this is an oversight, since the readme shows passing ['socket_id' => $socket_id] with triggerBatch($batch).

from pusher-http-php.

benjamin-tang-pusher avatar benjamin-tang-pusher commented on September 4, 2024

The issue with adding adding socket_id back in at Pusher.php:1171 is that you don't always need to specify a socket_id, and if you don't, the library (correctly) throws a warning that PHP Warning: Undefined array key "socket_id" .

I need to ask around whats the best way of doing this. The (isset($event['socket_id'])) might be used for this.

from pusher-http-php.

Justinas-Jurciukonis avatar Justinas-Jurciukonis commented on September 4, 2024

I see you have created PR for this issue.

To fix failing tests, replace assertObjectHasProperty with assertTrue(property_exists) (or update PHPUnit to 10.1 version)

from pusher-http-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.