curry684
Repos
50
Followers
61
Following
7

Dependency Manager for PHP

26962
4058

The Symfony PHP framework

27475
8585

DataTables bundle for Symfony

193
97

A Redis bundle for Symfony supporting Predis and PhpRedis

1019
313

GitLab Provider for the OAuth 2.0 Client

28
4

PHP client library to manage DirectAdmin control panel servers.

94
41

Events

issue comment
Idea: `composer update --bump`

I agree these operations should never be merged, as their operation and results could not be separated more.

  • update by its very definition causes instability. It should be followed by extensive testing to check for problems in newly updated libraries.
  • bump by its very definition causes stability. It should be preceded by extensive testing to ensure the currently resolved set of packages is a valid baseline which should remain enforced for future updates.

The correct order is updates, test, bump. The operations are thus simply not supposed to be executed one after another, and are therefore no candidates for merging even if you ignore the other, valid, comments made above.

Created at 3 weeks ago
issue comment
Update DataTable.php

I understand the use case, I'm just not comfortable with 'weighing down' the bundle's internal API for everyone based, on an unsupported scenario used by few (likely 'one').

I'm more open to solving this request with for example events or abstraction mechanisms. Technically, you can already do what you want, as the getInitialResponse method is protected you can just override it in a VueDataTable extends DataTable. It's not entirely pretty, granted, but it'll allow you to do more customization that you'll likely need.

Created at 1 month ago

Patch DataTables handling of infinite page length

Created at 1 month ago
pull request closed
(WIP - Discussion) Render columns like in form_row

Hi !

NOTE : This PR is just a Work In Progress and a request for feedback. It is not intended for merging.

First thank you for this project, it is AWESOME! I love the way it has a clear syntax that is quite like the original Symfony Forms.

The only thing that bothers me a little is the rendering that leads to html in php which I don't like so much. Of course, there is the TwigColumn, but, as said in the doc, it adds a lot of overhead. I was then thinking of finding a way to do this, in a way more like the Forms.

As you know, Forms use form themes with blocks like form_widget , so I was thinking, maybe it could be possible to have the same approach for columns, by having one twig template with many blocks like mycolumn_column (where mycolumn is the name of the column declared in the datatable) where we can do the formatting in the block. This has the main advantage of loading only one twig where all the blocks are declared, and using it for each row and column.

If you think it is a good way for improvment let me know ;-)

Example of a table theme:

{% block id_column %}{{value}}{% endblock %} {# blocks can be declared optionally, this one is just for demonstration #}

{% block name_column %}{{value|capitalize}}{% endblock %}

{% block text_column %}{{value|raw}}{% endblock %}

{% block html_column %}{{context.text|nl2br}}{% endblock %}

{% block link_column %}<a href={{ path('my_route', {id : context.id})}}>{{context.name}}</a>{% endblock %}
Created at 1 month ago
issue comment
(WIP - Discussion) Render columns like in form_row

This has become too old to merge now, if you want to resume work please open a new PR.

Created at 1 month ago
issue comment
Update DataTable.php

Ok so you're kinda abusing our public API and request a change in it to support a case outside of the scope of the project? 😉

For this case I would recommend staying inside the bounds of the bundle, and use DataTable->setTemplate to override our default HTML template - it has full access to all column configuration and allows you to prepare an HTML section with the column data as JSON which you can then further process as static data with Vue or React.

For reference this is the default template: https://github.com/omines/datatables-bundle/blob/master/src/Resources/views/datatable_html.html.twig

Created at 1 month ago
issue comment
ColReorder plugin dosn't work corrent

I'm flagging it as an enhancement because I do not consider optional plugins something we must properly support.

Created at 1 month ago
issue comment
ColReorder plugin dosn't work corrent

Yeah that does seem a crutch, but looking at that - can we even be aware on the server end of what we would need to do?

Created at 1 month ago

Update dev dependency

Closes #245

Created at 1 month ago
Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • [ ] chore(deps): update dependency ocramius/package-versions to v2

Detected dependencies

  • php >=8.0
  • symfony/event-dispatcher ^5.4|^6.0
  • symfony/framework-bundle ^5.4|^6.0
  • symfony/options-resolver ^5.4|^6.0
  • symfony/property-access ^5.4|^6.0
  • symfony/translation ^5.4|^6.0
  • ext-curl *
  • ext-json *
  • ext-pdo_sqlite *
  • ext-zip *
  • doctrine/common ^2.6|^3.3
  • doctrine/doctrine-bundle ^2.7|^3.0
  • doctrine/orm ^2.13.1
  • doctrine/persistence ^2.0|^3.0.3
  • friendsofphp/php-cs-fixer ^3.9.5
  • mongodb/mongodb ^1.12
  • ocramius/package-versions ^1.4
  • phpoffice/phpspreadsheet ^1.24.1
  • phpstan/extension-installer ^1.1
  • phpstan/phpstan ^1.8.2
  • phpstan/phpstan-doctrine ^1.3.12
  • phpstan/phpstan-symfony ^1.2.9
  • ruflin/elastica ^6.0|^7.2
  • symfony/browser-kit ^5.4|^6.1.3
  • symfony/css-selector ^5.4|^6.1.3
  • symfony/dom-crawler ^5.4|^6.1.3
  • symfony/intl ^5.4|^6.1
  • symfony/mime ^5.4|^6.1.3
  • symfony/phpunit-bridge ^5.4|^6.1.3
  • symfony/twig-bundle ^5.4|^6.1.1
  • symfony/var-dumper ^5.4|^6.1.3
  • symfony/yaml ^5.4|^6.1.3
  • actions/checkout v3
  • shivammathur/setup-php v2

  • [ ] Check this box to trigger a request for Renovate to run again on this repository
Created at 1 month ago
issue comment
Iterating join queries won't work

Yes, this is expected behavior, once you start adding custom joins to your DQL we can no longer reliably predict the data being returned. You should in general implement such custom behavior in your application in that case, that is why adapters and such are easily extendable.

Created at 1 month ago
Iterating join queries won't work

https://github.com/omines/datatables-bundle/blob/b51c5ac58b31973ea754b891de38dfe9e6624a74/src/Adapter/Doctrine/ORMAdapter.php#L183

I have created a custom adapter for my goal to support usage of the entity repository class of Doctrine. At the end I discovered that ->iterate() won't work for joined queries, since the result of a join-query can result in multiple of the root entities because of the joins. I ended up using this;

foreach ($query->getResult() as $result) {
    // ....
}
Created at 1 month ago
issue comment
ColReorder plugin dosn't work corrent

I'm actually surprised this doesn't work correctly, as I would expect the plugin to handle this completely inside DataTables itself.

Do you have concrete information on what is broken and how?

Created at 1 month ago
issue comment
add a parameters option for the twig column

I think the change in itself is fine but rather limited right now. If we implement this we should also support callbacks so you can either opt for a static list of parameters for the entire table, and/or extend them at will on the row level (fetching additional data from a cache etc.)

Created at 1 month ago
issue comment
Update DataTable.php

Since I'm not aware of any bugs with column labels: what is currently broken and what does this fix do about it?

I just want to doublecheck why we should merge this, no issues with the change itself if it's needed.

Created at 1 month ago
Custom Adapter

Hello,

I would like to be able to add an adapter to point to a database other than Doctrine ORM and only play with Pure SQL queries (Prestashop Database). Unfortunately in the doc I see TDB in the section: Implementing custom adapters

Is it possible ? If yes, how ? Thank you

And congratulations again for this module which works perfectly in my case with Doctrine ORM :)

Best regards

Created at 1 month ago
issue comment
Custom Adapter

For writing your own adapter I recommend looking at the ArrayAdapter included (the most basic adapter possible) or indeed the CustomORMAdapter pointed at above. It's not terribly complex but also hard to document as it's barely ever needed and most if not all required code depends on the target.

Created at 1 month ago
issue comment
Can the table be displayed as a form?

That example runs completely clientside, and this bundle is unopinionated on what you do on that end. So yes, you can implement this by writing your own frontend code to do it.

https://omines.github.io/datatables-bundle/#javascript explains how to do all customization in JS.

Created at 1 month ago
Can the table be displayed as a form?

Hello everyone, I have been researching and implementing this table for a few days.

I wish I could do this https://datatables.net/examples/api/form.html

It's possible? or do I have to do the whole implementation?

Created at 1 month ago
Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • [ ] chore(deps): update dependency ocramius/package-versions to v2

Detected dependencies

  • php >=8.0
  • symfony/event-dispatcher ^5.4|^6.0
  • symfony/framework-bundle ^5.4|^6.0
  • symfony/options-resolver ^5.4|^6.0
  • symfony/property-access ^5.4|^6.0
  • symfony/translation ^5.4|^6.0
  • ext-curl *
  • ext-json *
  • ext-pdo_sqlite *
  • ext-zip *
  • doctrine/common ^2.6|^3.3
  • doctrine/doctrine-bundle ^2.7|^3.0
  • doctrine/orm ^2.13.1
  • doctrine/persistence ^2.0|^3.0.3
  • friendsofphp/php-cs-fixer ^3.9.5
  • mongodb/mongodb ^1.12
  • ocramius/package-versions ^1.4
  • phpoffice/phpspreadsheet ^1.24.1
  • phpstan/extension-installer ^1.1
  • phpstan/phpstan ^1.8.2
  • phpstan/phpstan-doctrine ^1.3.12
  • phpstan/phpstan-symfony ^1.2.9
  • ruflin/elastica ^6.0|^7.2
  • symfony/browser-kit ^5.4|^6.1.3
  • symfony/css-selector ^5.4|^6.1.3
  • symfony/dom-crawler ^5.4|^6.1.3
  • symfony/intl ^5.4|^6.1
  • symfony/mime ^5.4|^6.1.3
  • symfony/phpunit-bridge ^5.4|^6.1.3
  • symfony/twig-bundle ^5.4|^6.1.1
  • symfony/var-dumper ^5.4|^6.1.3
  • symfony/yaml ^5.4|^6.1.3
  • actions/checkout v3
  • shivammathur/setup-php v2

  • [ ] Check this box to trigger a request for Renovate to run again on this repository
Created at 1 month ago
issue comment
Dependency Dashboard

All done.

Created at 1 month ago
Export Excel just first line ?

When i add export Excel server side i have just the first line in in the downloaded file.

So i followed a the problem i found you to limit the result. is there a reason or is a bug.

File : vendor/omines/datatables-bundle/src/Exporter/DataTableExporterManager.php

Code : /** * Browse the entire DataTable (all pages). * * A Generator is created in order to remove the 'DT_RowId' key * which is created by some adapters (e.g. ORMAdapter). */ private function getAllData(): \Iterator { $data = $this->dataTable ->getAdapter() ->getData($this->dataTable->getState()->setStart(0)->setLength(-1)) ->getData();

    foreach ($data as $row) {
        dd($data);
        if (array_key_exists('DT_RowId', $row)) {
            unset($row['DT_RowId']);
        }

        yield $row;
    }
}

Solution : when i remove "setLength(-1)" i have what i want even if i sort.

Created at 1 month ago
issue comment
Export Excel just first line ?

This issue was actually fixed in the 'breaking changes' of the 0.7 release following #257 - we changed semantics for 'no limit' to the correct null instead of -1 which was indeed adapter specific.

Adapters now all follow this rule and this issue should be fixed after that.

Created at 1 month ago
issue comment
Adding MoneyColumn to render currency based

I enabled the test actions for the PR and the error it's giving I think already exposes a formatting issue because of system locale differences between your development machine and the CI runner. I18n formatting is really complex 😉

Created at 1 month ago