GithubHelp home page GithubHelp logo

lopipusherbundle's People

Contributors

ahmadsajid1989 avatar bitdeli-chef avatar bocharsky-bw avatar cklm avatar gizmola avatar gregholland avatar hampusiggstrom avatar jamescauwelier avatar laupifrpar avatar marsoder avatar mblackford avatar nicholasruunu avatar pborreli avatar richardfullmer avatar ruudk avatar rvanlaak avatar sadikoff avatar scrutinizer-auto-fixer avatar terox avatar toooni avatar weaverryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lopipusherbundle's Issues

[Insight] Missing use statement should be avoided

in Controller/AuthController.php, line 32

The class Exception resolves to Lopi\Bundle\PusherBundle\Controller\Exception in this class namespace. This class doesn't seem to exist in the project class map. Did you forget to add a use statement? Or did you forget to prefix this class with a \?

     * @return Response
     */
    public function authAction(Request $request)
    {
        if (!$this->container->has('lopi_pusher.authenticator')) {
            throw new Exception('The authenticator service does not exsit.');
        }

        $authenticator = $this->container->get('lopi_pusher.authenticator');
        $socketId = $request->get('socket_id');
        $channelName = $request->get('channel_name');

Posted from SensioLabsInsight

Attempted to load class "Pusher" from the global namespace

I'm trying to call your service lopi_pusher.pusher but I get the exception mentioned in the title.
in my controller:

$pusher = $this->get('lopi_pusher.pusher');
$data['message'] = 'hello from server';
$pusher->trigger('my-channel', 'my-event', $data);

I'm using Symfony 3.4.*

[feature] Make bundle easy extendable

https://sonata-project.org/bundles/easy-extends/2-x/doc/reference/why.html

$ ./bin/console sonata:easy-extends:generate -vvv LopiPusherBundle
[2016-12-09 18:24:48] event.DEBUG: Notified event "console.command" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
[2016-12-09 18:24:48] event.DEBUG: Notified event "console.command" to listener "Symfony\Bridge\Monolog\Handler\ConsoleHandler::onCommand".
Lopi\Bundle\PusherBundle\LopiPusherBundle : wrong folder structure
done!

Is Symfony 6 supported?

I'm getting this error when trying to install it with composer.

$ composer require laupifrpar/pusher-bundle

Info from https://repo.packagist.org: #StandWithUkraine
Using version ^5.0 for laupifrpar/pusher-bundle
./composer.json has been updated
Running composer update laupifrpar/pusher-bundle
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- laupifrpar/pusher-bundle[5.0.0, ..., 5.0.3] require symfony/config ^3.4|^4.4|^5.0 -> found symfony/config[v3.4.0, ..., v3.4.47, v4.4.0, ..., v4.4.37, v5.0.0, ..., v5.4.3] but the package is fixed to v6.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- Root composer.json requires laupifrpar/pusher-bundle ^5.0 -> satisfiable by laupifrpar/pusher-bundle[5.0.0, 5.0.1, 5.0.2, 5.0.3].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require laupifrpar/pusher-bundle:*" to figure out if any version is installable, or "composer require laupifrpar/pusher-bundle:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I don't get the message in the client side

I have created a command php bin/console pusher:test to trigger the message from the server side but I don't get the message in the client side and I didn't get any exception !
PusherTestCommand class:

class PusherTestCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this
            ->setName('pusher:test')
            ->setDescription('...')
            ->addArgument('argument', InputArgument::OPTIONAL, 'Argument description')
            ->addOption('option', null, InputOption::VALUE_NONE, 'Option description')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {

        $pusher = $this->getContainer()->get('lopi_pusher.pusher');
        $data['message'] = 'hello world';
        $pusher->trigger('my-channel', 'my-event', $data);

        $output->writeln('Message triggered');
    }

}

Can you explain why ?

[Insight] Missing use statement should be avoided

in Authenticator/ChannelAuthenticatorPresenceInterface.php, line 24

The class returns resolves to Lopi\Bundle\PusherBundle\Authenticator\returns in this class namespace. This class doesn't seem to exist in the project class map. Did you forget to add a use statement? Or did you forget to prefix this class with a \?

    /**
     * Return the user id when authenticated, used for presence channels
     *
     * @returns string
     */
    public function getUserId();
}

Posted from SensioLabsInsight

Support for JMS Serializer Bundle

Instead of using the rather limited json_encode() php function for event data, it would be great if there was an option to use the much more powerful serializer from JMS.

I would suggest a configuration option like:

lopi_pusher:
    serializer: jms_serializer

json_encode() could then be used as a fallback if no serializer is configured.

Custom host / Symfony4

I am using Laravel Websockets package as a drop in pusher replacement.

I have it working with Laravel, AdonisJS and now I want to make it work with Symfony.

Its quite straightforward usually.

needs:
custom host
custom port
encrypted flag (which I guess is the SCHEME).

My pusher_php_server.yaml is:

services:
    Pusher\Pusher:
        public: true
        arguments:
            - '%env(PUSHER_KEY)%'
            - '%env(PUSHER_SECRET)%'
            - '%env(PUSHER_APP_ID)%'
            - { cluster: '%env(PUSHER_CLUSTER)%',host: '%env(PUSHER_HOST)%' }

lopi_pusher:
    timeout: '%env(PUSHER_TIMEOUT)%'
    debug: '%env(bool:PUSHER_DEBUG)%'
    scheme: '%env(PUSHER_SCHEME)%'
    port: '%env(PUSHER_PORT)%'
    host: '%env(PUSHER_HOST)%'
    app_id: '%env(PUSHER_APP_ID)%'
    key: '%env(PUSHER_KEY)%'
    secret: '%env(PUSHER_SECRET)%'
    cluster: '%env(PUSHER_CLUSTER)%'
    auth_service_id: my_channel_authenticator

I have similar data in lopi_pusher.yaml

But it still tries to use:
ws://ws-eu.pusher.com/app/channel?protocol=7&client=js&version=4.2.2&flash=false

Why does it ignore host?

Yes, I have all those values in .env

Deprecation Notice

Using the "Twig_Extension_GlobalsInterface" class is deprecated since Twig version 2.7, use "Twig\Extension\GlobalsInterface" instead.

  /usr/src/app/vendor/laupifrpar/pusher-bundle/Twig/PusherExtension.php:15 {▼
    ›  */
    › class PusherExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
    › {
  }

Would be neat if that could be updated :)

pusher-http-php 3.0 breaks namespacing

Hi,

if I install only your pusher bundle it will by default install the new 3.0 version of pusher-http-php.
The problem with that is that they changed the namespace around in that version which breaks everything.
A temporary fix is to manually include the version 2.6.4 in my composer.json file but it would be good if you either changed the bundle to work with the new namespace or set it up so that it doesn't use the 3.0 version on a new installation.

Best regards

Symfony 7 support

Symfony 7 has been out for a while now.

Will the maintainer be upgrading this on his own or is a PR acceptable?

Question: What is the best way to use multiple pusher apps (i.e. with different IDs, secrets and keys)?

I am currently using webhooks for all client events for a specific feature on a site. I don't want webhooks triggering for client events in other features so I am separating these site features using pusher apps.

Unfortunately this means I need to use pusher in symfony with different app credentials depending on which actions are being called. What is the best way to do this considering right now you can only really pass the bundle a single set of credentials?

[Insight] Text files should end with a newline character - in LICENSE, line 19

in LICENSE, line 19

This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Posted from SensioLabsInsight

Configuration for Symfony 4

I got this error:
Invalid configuration for path "lopi_pusher": Either url or app_id, key and secret needs to be set.

With this pusher_php_server.yaml:

services:
    Pusher\Pusher:
        public: true
        arguments:
            - '%env(PUSHER_KEY)%'
            - '%env(PUSHER_SECRET)%'
            - '%env(PUSHER_APP_ID)%'

And these variables defined on .env as PUSHER_HOST=api-eu.pusher.com etc ...

Also I'd need to config:

            timeout: '%env(PUSHER_TIMEOUT)%'
            debug: '%env(PUSHER_DEBUG)%'
            scheme: '%env(PUSHER_SCHEME)%'
            port: '%env(PUSHER_PORT)%'
            host: '%env(PUSHER_HOST)%'
            cluster: '%env(PUSHER_CLUSTER)%'
            auth_service_id: my_channel_authenticator

But don't know where...
Thanks!

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.