phinx
phinx copied to clipboard
Should not the quoteString method be public
https://github.com/cakephp/phinx/blob/877033d6e44d60f8ff149fa9f57f135a33fbbff6/src/Phinx/Db/Adapter/PdoAdapter.php#L283 Currently the quoteString method exists, but it is protected, making it impossible to use in migrations. Is there anything what stops it being public?
Is there a use case for using it inside migrations? If so, we could do this.
It could be useful if you were running your queries directly through execute() method on a Migration and want some capacity to quote stuff yourself for cross-DB usage, without having to use the full query builder?
Any downsites of exposing the method?
It'd have to go into the major version as it's an interface break? It's also like this is (for non-extended purposes) exposing anything you couldn't get by just doing $this->getAdapter()->getConnection()->quote() instead of $this->getAdapter()->quote() to get the same result.
quoteTable and quoteColumn are already public so can't see a reason not to do this here to be consistent. May also want to expose quoteValue for further consistency?