protected function getPromiseCorrelationId(Promise $promise)
    {
        $reflectionClass = new \ReflectionClass($promise);
        $reflectionProperty = $reflectionClass->getProperty('receiveCallback');
        $reflectionProperty->setAccessible(true);
        $reflect = new \ReflectionFunction($reflectionProperty->getValue($promise));

        return $reflect->getStaticVariables()['correlationId'];
    }
protected function getPromiseCorrelationId(Promise $promise)
    {
        $reflectionClass = new \ReflectionClass($promise);
        $reflectionProperty = $reflectionClass->getProperty('receiveCallback');
        $reflectionProperty->setAccessible(true);
        $reflect = new \ReflectionFunction($reflectionProperty->getValue($promise));

        return $reflect->getStaticVariables()['correlationId'];
    }
protected function getPromiseCorrelationId ( Promise $ promise ) { $ reflectionClass = new \ ReflectionClass ( $ promise ) ; $ reflectionProperty = $ reflectionClass -> getProperty ( 'receiveCallback' ) ; $ reflectionProperty -> setAccessible ( true ) ; $ reflect = new \ ReflectionFunction ( $ reflectionProperty -> getValue ( $ promise ) ) ; return $ reflect -> getStaticVariables ( ) [ 'correlationId' ] ; }
Fetching enqueue correlationId from provided Promise

@param Promise $promise
@return mixed
@throws \ReflectionException
Fetching enqueue correlationId from provided Promise