Dependency of phpmyadmin/motranslator #129

Closed
bigfoot90 opened this Issue Jan 23, 2017 · 6 comments

Projects

None yet

2 participants

@bigfoot90
Contributor

As from version 4.1.0 438ac0b#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780R20
You are requesting phpmyadmin/motranslator as a dependency.

I'm using SqlParser in my standalone project (outside of phpmyadmin) mainly as a formatter tool

My question is:
Is this really a hard depencedependencyncy?
I think that's a dependency of phpmyadmin/phpmyadmin itself.
Can we suggest installing motranslator instead of requiring it?

@nijel
Member
nijel commented Jan 24, 2017

Patches are welcome to make the dependency optional. It's used to localize error messages from the parser.

@nijel nijel added the enhancement label Jan 24, 2017
@nijel
Member
nijel commented Jan 24, 2017

Also note there is one problem with suggests in composer - AFAIK there is no way to define which version you need, so you can easily end up with installed version with incompatible API.

@bigfoot90
Contributor

Right, composer does not have version requirements for suggestions, but have conflict where you can exclude the incompatible versions, in addition we can add a note in the README.md.

@nijel
Member
nijel commented Jan 24, 2017

Okay, that would work as well.

The only part which needs to be adjusted is https://github.com/phpmyadmin/sql-parser/blob/master/src/Translator.php

@bigfoot90
Contributor

Ok, I can prepare a PR in the next days.

Can you show me how to use this Translator in a real life example? Please.

@nijel nijel closed this in #132 Feb 2, 2017
@nijel nijel self-assigned this Feb 2, 2017
@nijel nijel added a commit that referenced this issue Feb 2, 2017
@nijel nijel Changelog for #129 and #132
Signed-off-by: Michal Čihař <michal@cihar.com>
e042cb0
@nijel nijel added a commit that referenced this issue Feb 2, 2017
@nijel nijel Make motranslator optional for dev as well and test both cases
This way we can ensure that we don't break our code with or without
motranslator.

Issue #129, #132

Signed-off-by: Michal Čihař <michal@cihar.com>
7f594b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment