Maintenance & futur of the bundle
fsoedjede opened this issue ยท 16 comments
Hello @hmert , @DonCallisto , @npotier
Thanks for maintaining this bundle.
I was wondering what a the next steps regarding this bundle?
As time goes on, I think there is no improvements but just minimal changes. Maybe some workflow are not relevant anymore or some new one should be added.
My proposals:
-
Make this bundle looks more like symfony/form by promoting usage of GridType (Usage of annotation will be kept for BC and because it allows easy configuration for simple grids).
-
Use only xml for service configuration (currently there is xml and yml in 3 file:
services.xml
,grid.yml
,columns.xml
; see: https://github.com/APY/APYDataGridBundle/tree/master/Resources/config) -- for this, I can make proposal quickly -
Cleanup issues: maybe the ones which have been created before 2017 or the ones with question?
-
Use VanillaJS instead of JQuery
-
Implement autowiring so every GridType which extends
APY\DataGridBundle\Grid\Type\GridType
or implementsAPY\DataGridBundle\Grid\GridTypeInterface
will be automatically recognized.
Example:
//../src/Controller/UserController.php
public function listAction(Request $request): array
{
$grid = $this->createGrid(UserGridType::class);
$grid->handleRequest($request);
return [
'grid' => $grid,
];
}
Every information will the be defined in the grid type:
//../src/Grid/UserGridType.php
final class UserGridType extends GridType
{
/**
* @param GridBuilder $builder
* @param array $options
*/
public function buildGrid(GridBuilder $builder, array $options = []): void
{
parent::buildGrid($builder, $options);
$builder
->add('id', 'number', ['primary' => 'true', 'visible' => false])
->add('first_name', 'text')
->add('last_name', 'text')
->add('email', 'text')
->add('role.name', 'text')
->add(
'enabled',
'boolean',
[
'values' => [
true => 'choices.yes',
false => 'choices.no',
],
]
)
;
$this->buildActions($builder, $options);
}
/**
* @param GridBuilder $builder
* @param array $options
*/
private function buildActions(GridBuilder $builder, array $options): void
{
$action = new RowAction('grid.action.remove', 'app_user_remove');
$params = $options['route_parameters'];
$params = array_merge($params, ['id']);
$action->setRouteParameters($params);
$action->setConfirm(true);
$action->setRole('DELETE_USER');
$builder->addAction($action);
}
/**
* @param OptionsResolver $resolver
*/
public function configureOptions(OptionsResolver $resolver): void
{
parent::configureOptions($resolver);
$resolver->setDefaults(
[
'route' => 'app_user_list',
'filterable' => true,
'sortable' => true,
]
);
}
}
I've made some test using that workflow and it was not complicated to use. With autowiring it was better as we could inject needed services directly in the GridType. -- I can make a proposal which will help the bundle handle this
I'm willing to help improve this bundle so we may not let it die.
All the text above is just a proposal.
If you (maintainers) have another view, I will be happy to here from you.
Maybe if we define a roadmap as what was done here #462, so some people could help implement it.
I know we are all somehow busy so Thanks for reading so far.
Regards,
Felix
Hi Felix sadly @hmert and @npotier seems not to be active on this bundle anymore since years, the same is nearly true speaking of me.
I'm not a maintainer (formally) as I've joined them to help improving and maintaining this bundle but as soon as I joined they drop their commitment.
At the time this caused me a lot of frustration as them have acquired the maintainance from the creator and used this kind of role only to modify things for their needs and not for the whole community.
At the moment as it is unclear if this bundle is used or not by a decent amount of users and as is unclear the level of commitment of everyone in the "team", I'm just not willing to go on with this.
Don't ge me wrong: as I have little time I just tweak this project when strictly necessary and dedicate my free time to other projects where everything is clear and where there's bunch of people willing to work on it.
Hopefully you can understand what I've stated.
That said, if you think you can maintain this almost dead project, you're more than welcome to do so.
I don't know if I have the priviledges to let you come in but in case let me know and I'll take a look.
Regards.
S.
Hello @fsoedjede thank you for your contribution. I've not been very active on the bundle indeed, and (sorry if i'm wrong), I'm still not an official mainainer of the bundle. But we at ACSEO still use this bundle
@romainguerrero who works with me is also involved on the bundle.
I think we should consider your ideas. Feel free to tell me how can I help you.
@npotier sorry, I've made a mistake when I "labeled" you as the original one along with @hmert.
You guys came after, even after me so yeah, the decisions are up to you.
If this bundle turnes to be active again I'll be more than happy to plan something for next version and take all the steps necessary in terms of contribution and coordination.
Hi @DonCallisto!
Thanks for the fast reply,
I understand your point and I'm aware of your frustration (I've read discussion between you and the maintainer in other issues).
I could become maintainer but if as you said there is not enough will from others we will be in the same situation next year.
If there is a roadmap (or something defining where the current maintainers want the bundle to go), I can help
@npotier First we should define a roadmap of identify what are the limits of the bundle and what we should change. Then we create issues and assign to those who are willing to help. WDYT?
First we should define a roadmap of identify what are the limits of the bundle and what we should change. Then we create issues and assign to those who are willing to help. WDYT?
That's a wise thing to do.
I'm just afraid that no body has bright ideas regarding this bundle.
Let's see btw, hopefully I'm wrong.
Hi @DonCallisto. As said by @npotier we use this bundle for many project at ACSEO and if we can help to maintain this bundle alive, we will be more than happy. As you can see, we made a PR #1032 to help improoving this project but it's still pending...
@romainguerrero @npotier you should now both have full priviledges for this repo.
@DonCallisto , I will made a proposal with my understanding of the bundle
@romainguerrero as you're using this bundle, WDYT should be done first to improve?
For me:
- Autowiring for the grid factory so we would use
GridFactoryInterface
instead ofapy_grid.factory
- Autowiring for columns so every column which extends
APY\DataGridBundle\Grid\Column\Column
will be automatically registered - Autowiring for grid types so every grid which extends
APY\DataGridBundle\Grid\Type\GridType
or implements APY\DataGridBundle\Grid\GridTypeInterface will be automatically registered
@fsoedjede for me the first thing to do it to allow main services to be autowired : GridFactoryInterface, GridManagerInterface and GridType (without using old tags like "apy_grid.xxx") and for your information on our usage, if we used to use a lot annotations, in our new projects we switched to the usage of the grid types (like form type definition) and I also think this is the best way to use this tool.
@romainguerrero please can you review this PR #1041 . I've implemented the autowiring there
If you need some help regarding which issue should be close or kept, let know. I will make a list
Hi, I'm not active on this bundle for years. I've no word to say and I could only wish best for this project.
BTW, we have switch to Golang+React ๐
Hello everybody, as you may have noticed, we began to take actions on the repository. Some PR have been merged, somme issues commented and closed, and so son.
as @fsoedjede suggested, I think it could be time to create a roadmap in order to coordinate our work on the future of the bundle.
@npotier that are great news. Are there any plans to make this bundle PHP 7.4+ compatible (and Twig 3.0 would be great as well)? This are currently the biggest issues for me as I am stuck with PHP 7.3.
Hello everybody, as you may have noticed, we began to take actions on the repository. Some PR have been merged, somme issues commented and closed, and so son.
as @fsoedjede suggested, I think it could be time to create a roadmap in order to coordinate our work on the future of the bundle.
Hi Nicolas,
there is some new code available to make the Bundle ready for Symfony 5.3.2. I've posted the code changes under Issues and would be happy to help to get this into the latest version of the Bundle
Cheers
Martin
Hello @fkrauthan @kaamaa as you may have noticed, we have pushed new code on the repository in order to be compatible with Symfony 5 / PHP 7.2 and PHP 7/4
There is a WIP PR #1068 in order to be compatible with PHP 8
Feel free to tell us what you think about it