-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work with handlers as service #12
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 5a13dd3. Only a commit test
@WBerredo When we first built this generator, we just wanted to create a very simple REST equivalent of the CRUD form generator. That being said, a lot more people are using this than I had anticipated and I see the benefit to using the handler. I'm open to merging this, if we can get a couple of issues worked out. I tested this on the AcmeDemoBundle and it generated the Controller along with the Handler, but it jacked up <?php
namespace Acme\DemoBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Config\FileLocator;
class AcmeDemoExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.xml');
public function getAlias()
{
return 'acme_demo';
$loader2 = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader2->load('servicesREST.xml');
}
} |
This really was a bug, I fixed it in last commit. |
@WBerredo That works much better now. There are two other issues that I see:
Other than that, it looks pretty good. |
These are a good points, so, they were added on last commits. The new form to call the generator is: |
@WBerredo I'm still planning to merge this, I just haven't had time to test it. Hoping to get to it next week. |
Hi, Have you some news about this feature to included in voryx's branch ? Thank's for your time. |
@RomainLegouverneur at the moment there are some conflicts with master, which need to be resolved before I can merge. Anyone willing to take that on? |
@davidwdan, i'll be merging this tomorrow into my own fork (https://github.com/Extendas/restgeneratorbundle). I will share my test results here. |
Implemented and merged this in #38 |
According this guide the best way to work with REST APIS is using handlers. The model of work was implemented based on this guide, but with other functionalities.
PS: This form, the PUT and PATCH functions work correctly