voryx / thruwaybundle Goto Github PK
View Code? Open in Web Editor NEWBundle for building Real-time Apps in Symfony
Bundle for building Real-time Apps in Symfony
The thruway:process start
command ends up creating a pair of processes for the router and a pair for each worker: one for sh
and one php
. It's possible to avoid this on Unix-based systems by prepending exec
:
https://github.com/reactphp/child-process#prepending-commands-with-exec
Would it make sense to have a configuration setting that would cause exec
to be added before $phpBinary
in the two methods that use it in ThruwayProcessCommand?
Guzzle 3.9 uses symfony/event-dispatcher ~2.1 which is not statisfiable by symfony 3.0.3
Is it planned to support SF4.0 in the near future?
Perhaps this is a newbie question; how can i provide doctrine.orm.default_entity_manager via dependency injection to my class (for example as construct parameter)? I tried the default approach, as in to declare my class in the services.xml and provide it as argument, but the parameter mapping does not seem to be applied. In fact, in the cache, the object is created as clean (i.e. no parameters). My symfony version is 2.8.
Hi,
I would change in config.yml the default ip (127.0.0.1) that the router should start on.
But in this case, when i start with the command by default : nohup php ... the router don't start with the log message : could not connect : connection refused.
My OS Server is Fedora 21 and firewalld is disabled for testing.
Any idea ?
Thanks
how can dynamic topics be handled?
Hi!
I'm trying to implement notifications in my project. My use case:
User 1 creates Task 1 and subscribes to "tasks" channel.
User 2 edits Task 1 and subscribes to "tasks" channel.
User 1 must receive notification about task edit, and User 2 should not receive this notification.
I see in docs:
$client = $this->container->get('thruway.client');
$client->publish("com.myapp.hello_pubsub", [$value]);
But as I understand, this code publishes message to all subscribed users.
Is there a way to push message for specific User, and not for all?
Hi,
i have registered some wamp methods in php, when i call it from javascript works great, this also work in the same controller where are methods registered
but
when i need call it from another service/controller (i need publish, or call call with publish in), i give error like this - wamp.error.not_authorized
2015-10-29T13:11:42.1927460 notice [Thruway\Peer\Client 22073] Changing PHP precision from 14 to 16 2015-10-29T13:11:42.1948920 info [Thruway\Peer\Client 22073] New client created 2015-10-29T13:11:42.1958070 info [Thruway\Transport\PawlTransportProvider 22073] Starting Transport 2015-10-29T13:11:42.2112130 info [Thruway\Transport\PawlTransportProvider 22073] Pawl has connected 2015-10-29T13:11:42.2177340 debug [Thruway\Transport\PawlTransportProvider 22073] Received: [3,{},"wamp.error.not_authorized"] 2015-10-29T13:11:42.2179390 debug [Thruway\Peer\Client 22073] Client onMessage: [Thruway\Message\AbortMessage] 2015-10-29T13:11:42.2182040 warning [Thruway\Transport\PawlTransportProvider 22073] Exception occurred during onMessage: Got the following error when trying to call 'myCallMethod': wamp.error.not_authorized 2015-10-29T13:11:42.2183570 info [Thruway\Transport\PawlTransportProvider 22073] Pawl has closed
any idea where is problem please? its needed authenthicate php client, if yes, how? or another way to do publish in other service/controller?
thanks
Would be nice to get a warning or something if you have different workers registering the same RPC.
Hi,
I try to develop a web chat system with ThruwayBundle and I got a advanced question.
How to know the active connections?
The example situation:
If one topic has three users, A, B, C. if user A and B are stay in chatroom, but user C didn't.
When the chat system publishes a message in backend, if I can get active connections then I will know user C is not receive the message, so I can use the other way to send notification for user C.
Thank you for your time.
im trying to publish message to connecting client from server but client was unable to receive any msg from server, i try to use xdebug to debug the code, somehow ClientManager's publish function cant find wamp_kernel in the container and thus skip $session.publish(...) code, i not sure if i missed out any configuration
this is how i publish my msg from server controller
public function testingAction() {
$client = $this->container->get('thruway.client');
$client->publish("com.myapp.hello_pub_sub", ['aaa']);
}
this is my browser code
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<script type="text/javascript" src="js/autobahn.min.js"></script>
</head>
<body>
<script>
var user = "userid";
var key = "12345";
function onchallenge(session, method, extra) {
console.log(method, extra);
if (method === "wampcra") {
var keyToUse = key;
if (typeof extra.salt !== 'undefined') {
keyToUse = autobahn.auth_cra.derive_key(key, extra.salt);
}
console.log("authenticating via '" + method + "' and challenge '" + extra.challenge + "'");
return autobahn.auth_cra.sign(keyToUse, extra.challenge);
} else {
throw "don't know how to authenticate using '" + method + "'";
}
}
var connection = new autobahn.Connection({
url: 'ws://127.0.0.1:8082',
realm: 'realm1',
authmethods: ["wampcra"],
authid: user,
onchallenge: onchallenge
});
connection.onopen = function (session, details) {
console.log("connected session with ID " + session.id);
console.log("authenticated using method '" + details.authmethod + "' and provider '" + details.authprovider + "'");
console.log("authenticated with authid '" + details.authid + "' and authrole '" + details.authrole + "'");
/*session.call('com.example.add', [3, 5]).then(
function (res) {
console.log("Call 'com.example.add' result:", res);
},
function (error) {
console.log("Call Error:", error.error);
}
);*/
//subscribe to a topic
function onevent(args) {
console.log('Subscribe message:', args);
}
session.subscribe('com.myapp.hello_pub_sub', onevent).then(
function (subscription) {
console.log("subscription", subscription);
},
function (error) {
console.log("subscription error:", error);
}
);
session.publish('com.myapp.hello_pub_sub', ['Hello, world222!']);
};
connection.onclose = function () {
console.log("disconnected", arguments);
};
connection.open();
</script>
</body>
</html>
my config:
voryx_thruway:
user_provider: 'fos_user.user_provider.username'
realm: 'realm1'
url: 'ws://127.0.0.1:8082'
router:
ip: '127.0.0.1'
port: '8082'
trusted_port: '8081'
authentication: true
locations:
bundles: ["AppBundle"]
I registered RPC on server with annotation
/**
*@Register("games.snake.newplayer",serializerEnableMaxDepthChecks=true, worker="add-snake")
*/
and I can call it but when I leave let's say for 5-10 minutes it is no longer available and I must restart server to make it available again.
To run server I am using command:
nohup php app/console thruway:process start &
When starting the router with thruway:router:start
or thruway:process
, the default AutorizationManager is AllPermissiveAuthorizationManager
. I want to: either use the default AuthorizationManager or build a custom one, since I have the exact same requirements as #26 (not merged yet). Is there any better way to do this except creating a new command and setting an AuthorizationManagerInterface
instance on the server (voryx.thruway.server
)?
Can you please give me some guidance for the best approach on making this work?
I cannot enable the cra auth with FOSUserBundle.
Platform
Symfony 3.1
FOSUserBundle dev/master
#config.yml
voryx_thruway:
realm: 'realm1'
url: 'ws://127.0.0.1:8081'
router:
ip: '127.0.0.1'
port: '9090'
trusted_port: '8081'
authentication: true
locations:
bundles: ["AppBundle"]
user_provider: 'fos_user.user_manager'
#services.yml
wamp_cra_auth:
class: Thruway\Authentication\WampCraAuthProvider
parent: voryx.thruway.wamp.cra.auth.client
tags:
- { name: thruway.internal_client }
doctrine.listener.e_listener:
class: AppBundle\EventListener\DoctrineListener
arguments: ["@service_container"]
tags:
- { name: doctrine.event_subscriber, connection: default }
//Client
var connection = new autobahn.Connection({
url: 'ws://127.0.0.1:9090',
realm: 'realm1',
authmethods: ["wampcra"],
authid: this.user.username,
onchallenge: this._onchallenge //never trigger
});
connection.onopen = function (session, details) {
console.log("connected session with ID " + session.id); //work
}
connection.open();
I'm getting an error when starting the thruway process
2015-06-25T09:17:55.4411180 info [Thruway\Role\Callee 25043] Setting registration_id for com.survos.sqs.receive_messages (1)
[router 0 25040] Error... see log for more info
Unfortunately, I can't find the log in /var/log, or in the directory I started with, or even know the name of the log (I assume it's thruway.log). So some feature requests:
Thanks!
Hi,
A small contribution.
/**
Thank you.
Sorry for my english basic. I am French.
can i find any examples for registering a topic ?
Hello,
I have a question. I managed to implement a authorization module for my router:
$authorizationManager = new \Thruway\Authentication\AuthorizationManager('testrealm');
$rule = new stdClass();
$rule->role = "teacher";
$rule->action = "register";
$rule->uri = "cnf.quiz.addstudent";
$rule->allow = true;
$authorizationManager->addAuthorizationRule([$rule]);
Whenever a new user is connecting and the realm doesn't exist, it creates it:
[Thruway\RealmManager 31922] Got prehello...
[Thruway\RealmManager 31922] Creating new realm "01234"
[Thruway\RealmManager 31922] Adding realm "01234"
But the authorization doesn't aply for this newly created realm. Is there a way to add the authorization to the newly auto created realm?
When setting voryx_thruway.enable_logging flag to false, the code in VoryxThruwayExtension.php is called only on the first run. When you relaunch the command a bit later, the log is still displayed on the console.
A suggestion would be to connect the Symfony 'logger' service to the Thruway\Logging\Logger so that the command can take benefit of -v -vv and -vvv options.
It is easy to achieve that outside of ThruwayBundle using the following code:
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Psr\Log\NullLogger;
use Thruway\Logging\Logger;
class SetVoryxLoggerListener
{
public function onConsoleCommand(ConsoleCommandEvent $event)
{
Logger::set($event->getDispatcher()->getContainer()->get('logger'));
}
}
And declare a service:
voryx.thruway.setvorxylogger:
class: Visioglobe\MapEditorBundle\Listener\SetVoryxLoggerListener
tags:
- { name: kernel.event_listener, event: console.command }
Current version of Thruway server in the bundle is 0.4.
This version lacks Dealer role fix included last July
voryx/Thruway@2927b39
Please update to latest version.
Please add support for Symfony3.x
Is there a reason for limiting the JMS serializer to 1.0.0?
We need to skip files that take constructor arguments during the file scan. Possibly warn the user that they need to create a service for it and tag it with thruway.resource.
I am using FOSUserBundle to authenticate users. I am able to log in but I wonder how could i set to each user their roles from database and in accordance to role allow publish, subscribe or call specific procedures.
For the default worker, the maxProcesses amount is 1.
We might make this configurable so we don't need always specifying @worker("name", maxProcesses=) annotation, @davidwdan WDYT?
Hi,
I try to develop a web chat system with ThruwayBundle, but I got a stuck situation.
When I try to publish message in backend, I got some wired response message.
my backend code in Symfony:
$client = $this->container->get('thruway.client');
$client->publish("user.line.thread.55122ab298dee4fb020041b9", ['message sent from backend.']);
My question is How to avoid that messages?
Thanks
By the way, I also check my config.yml setting. I did disable logging display.
voryx_thruway:
realm: 'myrealm'
enable_logging: false
Hi!
I'm trying to figure out how to do this...
I'm using a Symfony Command to start my Thruway Router AND initializing my Client at the same time (pretty much like in ThruwayClientCommand except that my copy is using my SocketClient
class which itself extends Thruway\Peer\Client
).
Completely outside of the loop and not even within my browser, an event happens and calls a method of an ObjectManager class that I have. I need that ObjectManager's method to be able to publish to the socket that is already running from my cli Command.
How would I go about doing this? Am I not seeing it the right way? Should I be creating a new client just for this?
Thanks!
I've already submitted this issue in this topic: #46
But since i got no answer i wanted to make a new issue for this.
I launch the server from comand line and if i don't publish anything for some time (about 20-30 minutes) i get what looks like a log of all the previous calls (just like in the other issue) on the console and the server just hangs (the process is active, but it doesn't accept connections anymore).
Following the suggestion on the other issue i have made a topic where i publish every 5 minutes. Now it lasts some hours (about 6-7) but then the same thing happens eventually.
Is it possible to know what is causing the issue? I don't think a "keep alive" mechanism should be needed at all in the first place
I am working on a windows 10 machine using PHP 5.6 and dev-master version of the bundle (but it happened even with the latest release, and even with PHP 7.1)
after thruway bundle runs longer than a few minutes.
any ideas? will debug as soon as i know this is not known / you are working on this.
Hi,
We are having this issue after an extended period of inactivity, usually overnight, where when the first query after this period is throwing this error Warning: PDOStatement::execute(): MySQL server has gone away
We put in a fix for this by closing and reopening the database connection but this just threw a new issue after the inactivity of Warning: Error while sending QUERY packet.
Has anyone had this before or know of a fix for this? It looks like it is happening after the 8 hour wait_timout in mysql.
I have also seen there is a cleanup function in the WampKernel that looks like it should be resetting the connections?
Thanks
$client->publish("com.myapp.helloPubSub", [$value]);
when i send the value parameter anything other than array it doesn't work, any idea why?
Stumbled across this repo by accident and it's an absolutely brilliant effort for the shortfalls of Ratchet!
Is there any chance that documentation could go with this?
If not, is there an example that combines all of the advanced topics for a server-side router, that includes authentication, realms, pubsubs, RPC, etc.?
Might have a go at writing some docs for this if I understood it better :)
I have a worker which throws the following exception: "You have requested a synthetic service ("kernel")". The DIC does not know how to construct this service.". After some debugging, it seems that the container used in the worker controller does not have the "kernel" service registered. The thruway_client service has the kernel service, but is not available in the controller. The kernel service is required by the file locator service in the appProdProjectContainer.php:
protected function getFileLocatorService()
{
return $this->services['file_locator'] = new \Symfony\Component\HttpKernel\Config\FileLocator($this->get('kernel'), ($this->targetDirs[2].'/Resources'));
}
Any ideas how to avoid this issue?
If you have the pthreads extension enabled, the @Worker
annotation may not work properly.
You may receive the error:
[Symfony\Component\Config\Exception\FileLoaderLoadException]
[Semantical Error] The class "Worker" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation t
o the _class_ doc comment of "Worker". If it is indeed no annotation, then you need to add @IgnoreAnnotation("Worker") to the _class_ doc comment of class AppBundle\
Controller\YourController in ...
This is because pthreads has a Worker
class in the global namespace and Doctrine Annotations gets confused.
You can work around this issue by using a differently qualified annotation (use the full namespace for example: @Voryx\ThruwayBundle\Annotation\Worker("my_worker")
or by disabling pthreads.
Hi,
Thanks so much for this easy to use bundle!
I have a very simple setup and would like to know if its possible to react to a client connecting to the default realm?
This is my config:
voryx_thruway:
realm: 'realm1'
url: 'ws://127.0.0.1:8000' #The url that the clients will use to connect to the router
router:
ip: '127.0.0.1' # the ip that the router should start on
port: '8000' # public facing port. If authentication is enabled, this port will be protected
authentication: false # true will load the AuthenticationManager
locations:
bundles: ["AppBundle"]
I would greatly appreciate any pointers ๐
Hi,
In AutobahnJS, I can use Connection.onclose this callback to catch the event.
Is it possible catch the same event with ThruwayBundle?
Thank you.
Hi!
I use your bundle and autobahnjs to create real-time web app. All works fine, but after some idle time connection between client and server lost.
I get on frontend:
Connection lost Object {reason: null, message: null, retry_delay: 1.54782944253703, retry_count: 1, will_retry: true}
And on backend:
php_1 | [router 0 21] 2016-10-24T12:10:32.8671780 debug [Thruway\Peer\Router 22] onClose from {"type":"ratchet","transportAddress":"172.18.0.5"}
php_1 | 2016-10-24T12:10:32.8677610 debug [Thruway\Role\Broker 22] Broker onMessage for {"type":"dummyTransport","transportAddress":"dummy"}: [16,298986786785729,{},"wamp.metaevent.session.on_leave",[{"realm":"sales","authprovider":null,"authid":"eyJ0eXAiOiJKV1QiLCJhbG21ciOiJIUzI1NiJ9.eyJpZCI6Ijk1YTgwN123zhjLTI1ZjEtNGYxOC05YjA1LTMwZGM1YWY5NjlkZSIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJyb2xlIjoiYWRtaW4iLCJuYW1lIjoiUmVuYXRlIiwiZmFjZWJvb2tJZCI6bnVsbCwiZ29vZ2xlSWQiOm51bGwsImxpbmtlZGluSWQiOm51bGwsImFjdGl2ZSI6dHJ1ZSwic3ViIjoidXNlciIsImV4cCI6MTQ3NzM5NzEyMX0.tPWtuPCzXlLBVGRPlI_vq9RUkjp00giwOOs4bGvxgg1","authrole":"user","authroles":["user","authenticated_user"],"authmethod":"wampcra","session":2154130370063314,"role_features":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"caller_identification":true,"pattern_based_registration":true,"shared_registration":true,"progressive_call_results":true,"registration_revocation":true}},"publisher":{"features":{"publisher_identification":true,"subscriber_blackwhite_listing":true,"publisher_exclusion":true}},"subscriber":{"features":{"publisher_identification":true,"pattern_based_subscription":true,"subscription_revocation":true}}}}]]
php_1 | 2016-10-24T12:10:32.8679650 debug [Thruway\Realm 22] Leaving realm sales
php_1 | 2016-10-24T12:10:32.8681130 info [Thruway\Transport\RatchetTransportProvider 22] Ratchet has closed
php_1 | [router 0 21] 2016-10-24T12:10:35.0081080 debug [Thruway\Transport\RatchetTransportProvider 22] RatchetTransportProvider::onOpen
php_1 | [router 0 21] 2016-10-24T12:10:35.0086120 info [Thruway\Peer\Router 22] New Session started {"type":"ratchet","transportAddress":"172.18.0.5"}
php_1 | [router 0 21] 2016-10-24T12:10:35.0149500 debug [Thruway\Transport\RatchetTransportProvider 22] onMessage: ([1,"sales",{"roles":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"caller_identification":true,"pattern_based_registration":true,"shared_registration":true,"progressive_call_results":true,"registration_revocation":true}},"publisher":{"features":{"publisher_identification":true,"subscriber_blackwhite_listing":true,"publisher_exclusion":true}},"subscriber":{"features":{"publisher_identification":true,"pattern_based_subscription":true,"subscription_revocation":true}}},"authmethods":["wampcra"],"authid":"eyJ0eXAiOiJKV1QiLCJhbG21ciOiJIUzI1NiJ9.eyJpZCI6Ijk1YTgwN123zhjLTI1ZjEtNGYxOC05YjA1LTMwZGM1YWY5NjlkZSIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJyb2xlIjoiYWRtaW4iLCJuYW1lIjoiUmVuYXRlIiwiZmFjZWJvb2tJZCI6bnVsbCwiZ29vZ2xlSWQiOm51bGwsImxpbmtlZGluSWQiOm51bGwsImFjdGl2ZSI6dHJ1ZSwic3ViIjoidXNlciIsImV4cCI6MTQ3NzM5NzEyMX0.tPWtuPCzXlLBVGRPlI_vq9RUkjp00giwOOs4bGvxgg1"}])
php_1 | [router 0 21] 2016-10-24T12:10:35.0155000 debug [Thruway\Realm 22] Got Hello
php_1 | [router 0 21] 2016-10-24T12:10:35.0173820 debug [Thruway\Authentication\WampCraAuthProvider 22] Client onMessage: [Thruway\Message\InvocationMessage]
php_1 | [router 0 21] 2016-10-24T12:10:35.0200560 debug [Thruway\Authentication\AuthenticationManager 22] Client onMessage: [Thruway\Message\ResultMessage]
php_1 | [router 0 21] 2016-10-24T12:10:35.0951650 debug [Thruway\Transport\RatchetTransportProvider 22] onMessage: ([5,"JsqDL9nUHfpFsRJOy9cQy6uXP8PWeDUeExoHI9nJkW8=",{}])
php_1 | [router 0 21] 2016-10-24T12:10:35.0962210 debug [Thruway\Authentication\WampCraAuthProvider 22] Client onMessage: [Thruway\Message\InvocationMessage]
php_1 | [router 0 21] 2016-10-24T12:10:35.0968600 debug [Thruway\Authentication\AuthenticationManager 22] Client onMessage: [Thruway\Message\ResultMessage]
php_1 | [router 0 21] 2016-10-24T12:10:35.0974710 debug [Thruway\Role\Broker 22] Broker onMessage for {"type":"dummyTransport","transportAddress":"dummy"}: [16,5800741427391633,{},"wamp.metaevent.session.on_join",[{"realm":"sales","authprovider":null,"authid":"eyJ0eXAiOiJKV1QiLCJhbG21ciOiJIUzI1NiJ9.eyJpZCI6Ijk1YTgwN123zhjLTI1ZjEtNGYxOC05YjA1LTMwZGM1YWY5NjlkZSIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJyb2xlIjoiYWRtaW4iLCJuYW1lIjoiUmVuYXRlIiwiZmFjZWJvb2tJZCI6bnVsbCwiZ29vZ2xlSWQiOm51bGwsImxpbmtlZGluSWQiOm51bGwsImFjdGl2ZSI6dHJ1ZSwic3ViIjoidXNlciIsImV4cCI6MTQ3NzM5NzEyMX0.tPWtuPCzXlLBVGRPlI_vq9RUkjp00giwOOs4bGvxgg1","authrole":"user","authroles":["user","authenticated_user"],"authmethod":"wampcra","session":5419777708509425,"role_features":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"caller_identification":true,"pattern_based_registration":true,"shared_registration":true,"progressive_call_results":true,"registration_revocation":true}},"publisher":{"features":{"publisher_identification":true,"subscriber_blackwhite_listing":true,"publisher_exclusion":true}},"subscriber":{"features":{"publisher_identification":true,"pattern_based_subscription":true,"subscription_revocation":true}}}}]]
After this subscription doesn't exists.
Is there a way to avoid this without resubscribe? For example, send some pings from server to client.
We're having issues running API Platform and Thruway together. We've removed JMS Serializer from our project, and would prefer just to use Symfony's.
The problem is that Thruway installs JMS Serializer, which then uses the name 'Serializer'.
Is there a way to avoid this conflict? We can fork it, but perhaps there's a way to set an alias or class of the Serializer?
Hi,
I have a problem where publishing from the PHP client doesn't work. There's no obvious errors, the client just doesn't appear to connect to the router. Clients connected using Autobahn.js work fine
Here is my config
voryx_thruway:
realm: 'realm1'
url: 'ws://127.0.0.1:8881' #The url that the clients will use to connect to the router
router:
ip: '127.0.0.1' # the ip that the router should start on
port: '8880' # public facing port. If authentication is enabled, this port will be protected
trusted_port: '8881' # Bypasses all authentication. Use this for trusted clients.
authentication: true
And here is the line in my controller which is supposed to send the message:
$this->get('thruway.client')->publish('test.event', ['hello there']);
I'm guessing the connection fails for some reason between the PHP client and the server, but I can't find any errors anywhere. Is there something I've missed?
Hi,
I try to use a register controller, but I got some problems.
Here is my config setting and code:
voryx_thruway:
...
locations:
# bundles: ["OZLineBundle"]
files:
- "OZ\\LineBundle\\Controller\\RegisterController"
and the controller:
namespace OZ\LineBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Voryx\ThruwayBundle\Annotation\Register;
class RegisterController extends Controller
{
/**
* @Register("user.line.open")
*/
public function userLineOpenAction($threadID)
{
try {
$user = $this->container->getUser(); //this will make the action doesn't work.
return $user->getUsername(); // it will make client get nothing
// return $threadID;
} catch (\Exception $exc) {
return $exc->getMessage();
} //eof try
}
the client side code:
Connection.session.call('user.line.open', [ Defaults.threadID ]).then(function(arg){
console.log(arg);
});
If the action is like this, the register can work and the client can response the response data.
/**
* @Register("user.line.open")
*/
public function userLineOpenAction($threadID)
{
return $threadID;
}
What's error with my code?
And how to get container service in Register action?
Thank you.
Hi,
Simple question, how can I handle dynamic topic ? Simple use case, when you have a chat and you allow your client to create new room. Each room is a topic and when people enter in it, they subscribe to this room and publish.
I'm blocked with this feature because of @subscribe("chat/room1"), how handle chat/roomX ?
Currently I dont find a way to do that.
I', trying to use a custom AuthorizationManager but shown the message
AuthorizationManager is now a module.
How can use a custom authentication for actions?
Thanks
If it's possible to use another PSR-3 logger, can you update the documentation to reflect how that's done, and also how to adjust the debug level.
Ideally --verbose (and --v, -vv, -vvv) would control the router and worker output in some way, but at least configurating it to not display INFO calls would make the output more useful.
It would be nice, to have some kind of async user provider or some configured WAMP procedure for that, something like the crossbar.io fetches the credentials (http://crossbar.io/docs/WAMP-CRA-Authentication/#dynamic-credentials)
Suppose, I want to have separate app that responsible only for the authentication and all user stuff.
At this moment, for the authorization I need the user provider in all apps, and it used synchronously in the private WampKernel::authenticateAuthId method.
The feature request - make it possible to authorize RPC caller in any app, in additional don't need to put the user provider in the all symfony apps which don't related to any user persistence stuff.
This problem comes from the librairy guzzle/guzzle.
Dear Sir,
I just try to implement to my project, but I can't figure out what "locations" setting in config.yml is used for.
May I have an example or some tips?
thanks.
locations:
bundles: ["AppBundle"]
files:
- "Acme\\DemoBundle\\Controller\\DemoController"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.