iron-io / iron_mq_php

PHP client for IronMQ.
www.iron.io
BSD 2-Clause "Simplified" License
89 stars 43 forks source link

running queue:listen with iron throws exception #64

Open ghost opened 9 years ago

ghost commented 9 years ago

here's a copy of my composer.json

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/framework": "5.0.*",
        "barryvdh/laravel-ide-helper": "~2.0",
        "videlalvaro/php-amqplib": "2.2.*",
        "fzaninotto/faker": "~1.4",
        "nategood/httpful": "^0.2.19",
        "jms/serializer": "^0.16.0",
        "borisguery/json-builder": "^0.2.0",
        "iron-io/iron_mq": "4.0.*"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php -r \"copy('.env.example', '.env');\"",
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

exception thrown.

...
  [Symfony\Component\Debug\Exception\FatalErrorException]
  Class 'IronMQ' not found

I've tried installing iron_mq version 2.0 and 4.0.*, same exception, and even wiping out my vendor directory and composer installing from fresh start.

thousandsofthem commented 9 years ago

as far as i know laravel 5.0 requires different (than 5.1) MQ version as described: https://github.com/iron-io/iron_mq_php#branches Could you try "1.*" ?

ghost commented 9 years ago

I did as you suggested, ran the queue:listen, queue:work

things looked fine.

ghost commented 9 years ago

Any suggested ways to test iron.io on local box? with the push queues, the subscribe url needs to be public, is there a proxy solution of sorts recommended?

thousandsofthem commented 9 years ago

@BardiaAfshin you could try to use service like http://localtunnel.me/

ghost commented 9 years ago

I did the installation, kicked off my local server on that port, and when I use the web browser, it times out.

Any other suggestions?

thousandsofthem commented 9 years ago

There are many services like that and exactly for the same purpose, just google for them. You could share specific port with the world. Launch the app on that port (your intended push queue target url), point test push queue to that generated url