Comments (6)
@stingus can you provide the code I need to reproduce the error?
from thruwaybundle.
Not my actual setup but it reproduces the error:
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Voryx\ThruwayBundle\Annotation\Register;
use Voryx\ThruwayBundle\Annotation\Worker;
/**
* @Worker("worker", maxProcesses="1")
*/
class Test extends Controller
{
/**
* @Register("test")
*/
public function testAction()
{
$this->get('templating')->render('@AppBundle/Mail/body.html.twig');
}
}
I'm calling the templating service, which loads twig, which loads file_locator service. The last one crashes when it injects the kernel, which is not present in the container.
from thruwaybundle.
Did anything further happen with this issue, we are experiencing the same issue with Symfony 2.8.13 ...
The first call to $this->get('kernel') from inside the ThruwayBundle seems to result in calling the appDevProjectContainer getKernelService which throws the exception but unsure why this would be
Originally thought this might be an issue with Symfony under certain circumstances (It seems like loading the Bundle into a vanilla Symfony install doesn't have the issue).
from thruwaybundle.
I just had a similar problem
/**
* @Register("test")
*/
public function testAction()
{
$firstUser = $this->get('sonata.user.manager.user')->find(1);
// the process will hang there, not able to do shit
return ['this is never returned'];
}
I think this may be related to some errors in yml configs, unrelated with ThruwayBundle, making some services unavailable from a ContainerAwareCommand
from thruwaybundle.
I can't remember the exact details of this because it was so long ago. I can tell you that the issue we had was because we had dependencies on services that injected @session
in one of our registered resources. As I understand it you need to move your auth code into AuthProviderClient and use WAMP auth flow. Still not sure if you can get services that depend on session in the auth provider.
from thruwaybundle.
Same here, I tried with symfony 2.8.12 and 2.8.28
"voryx/thruway": "^0.4.2",
"voryx/thruway-bundle": "dev-master",
as soon as I do from a worker/RPC:
$this->get('templating')->render('@........html.twig'); // Email template
I get
"You have requested a synthetic service ("kernel")". The DIC does not know how to construct this service.
This is quite frustrating
so far I am unable to find the exact cause, I am digging into
vendor/voryx/thruway-bundle/src/Voryx/ThruwayBundle/DependencyInjection/Compiler/AnnotationConfigurationPass.php:56
if ($class->implementsInterface('Symfony\Component\DependencyInjection\ContainerAwareInterface')) {
$container->setDefinition($serviceId, $definition)
->addMethodCall('setContainer', [new Reference('thruway_container')]);
} else {
$container->setDefinition($serviceId, $definition);
}
Replacing thruway_container
with service_container
seems to be working, but not sure what is the pupose of having a custom container in the first place
from thruwaybundle.
Related Issues (20)
- After upgrading to new release version 0.4.2 not publishing messages HOT 2
- publishing doesn't work HOT 1
- How to declare many realms or routers?
- Symfony >4 and accessing Details
- Throwing critical exception not publishing messages
- Realm "process_manager" should be private
- How to connect client manager to current user session for exclusion/eligibility handling HOT 2
- Attempted to load class "PawlTransportProvider" from namespace "Thruway\Transport". Did you forget a "use" statement for another namespace? HOT 1
- Doesn't work with symfony 3.4 HOT 5
- Problem configuring ThruwayBundle with FosUser HOT 2
- Can I stop the process manager?
- Packagist verison 1.0.x-dev is not actual. HOT 3
- Implementing authentication issue HOT 3
- Router not starting: more debug info witih -vvv HOT 2
- Example without container HOT 1
- configuring thruway to run on heroku
- Correct parameter for PawlTrasnportProvider?
- Use custom serializer to publish? HOT 2
- Setting up simple token authentication
- Publisher is not trusted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thruwaybundle.