Skip to content

Make VersionEngine configurable #35

Open

Description

@timgws

VersionEngine is awesome. Sadly, it's a little bit too optimistic for me.

I have a lot of legacy code that runs on Datatables 1.9, and I am not really prepared to start moving all of that to Datatables 1.10. It would be awesome if there was a configuration file (something like app/config/app.php) where it could be specified in an array what providers you want to use.

For example, datatable.php:

<?php
return [
    'providers' => [
          OpenSkill\Datatable\Versions\Datatable110Version::class,
          OpenSkill\Datatable\Versions\Datatable19Version::class
     ];
];

Activity

  1. Chumper commented on Mar 3, 2016

    @Chumper
    Contributor

    Should be possible as long as all versions extend Version and have the same constructor arguments, we could then instantiate them in the service provider.

  2. Chumper commented on Apr 27, 2016

    @Chumper
    Contributor

    I thought about this and it should be fairly simple to impement:
    In the ServiceProvider we will import the classes from the config and instantiate them there, as we currently do hardcoded with both versions.

    This allows developers to add own versions as well as stick to just one if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions