Comments (5)
Ping 👍 @ezimuel and @weierophinney
from apigility-symfony2-use-case.
@vrkansagara this example of integration with Symfony is quite old, I didn't check for a while. The idea here is to execute the bootstrap part of a Symfony app. The error that you reported shows a problem of autoloading for the Symfony components. Are you sure that your Symfony app is working fine without Apigility? I suggest to have a look at composer.json.
from apigility-symfony2-use-case.
@ezimuel Yes my symfony working fine independently and apigility as well. The root cause I find that there a one package name called kriswallsmith
is common in apigility and symfony so it generating the errors.
But any way I have figure it out how to resolve it. Thanks a lot to sharing a POC.
here is my recent code which is working fine under the apigility under the PostResource.php
.
require_once '/home/vallabh/www/symfony2app/web/app.php';
$kernel = new \AppKernel('prod', true);
$kernel->loadClassCache();
$kernel->boot();
$this->doctrine = $kernel->getContainer()
->get('doctrine')
->getManager();
I would like to ask you that if possible than can you make a POC for the magento. A contact book or any other idea which is built on zf2 core (having exprassive as a middleware) Application + apigility as api.
from apigility-symfony2-use-case.
Hi guys,
I got the same error. And when I try your solution @vrkansagara I got this error :
PHP Fatal error: Cannot redeclare assetic_init() (previously declared in /Users/lucas/Sites/booking/apigility/vendor/kriswallsmith/assetic/src/functions.php:24) in /Users/lucas/Sites/booking/booking/vendor/kriswallsmith/assetic/src/functions.php on line 30
Poke @ezimuel
from apigility-symfony2-use-case.
Hi,
I fixed this issue with :
$symfonyApp = '/path/to/symfony/';
require_once $symfonyApp . '/app/bootstrap.php.cache'; // This line is important
require_once $symfonyApp . '/app/AppKernel.php';
$kernel = new \AppKernel('prod', true);
$kernel->loadClassCache();
$kernel->boot();
$this->doctrine = $kernel->getContainer()
->get('doctrine')
->getManager();
from apigility-symfony2-use-case.
Related Issues (5)
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 apigility-symfony2-use-case.