CommandHelper

CommandHelper

46.5k Downloads

Unnecessary deprecation of useful syntax in import/export

LadyCailinBot opened this issue ยท 3 comments

commented

CMDHELPER-2847 - Reported by Z_

[WARNING] [CommandHelper][WARNING][DEPRECATION] Automatic creation of namespaces is deprecated, and WILL be removed in the future. Use export('my.namespace', @var) instead of export('my', 'namespace', @var)

From discussion in IRC, this was to allow something in the future, but no one could remember what that was, or think of anything that would require the deprecation. This syntax is useful, convenient, and easy to read, and I would think should be faster than the workarounds. I think all that is required now is to remove this deprecation warning.

commented

Comment by VergilPrime

That really doesn't fit with the way every other function in CH works. Furthermore it should be 'my.namespace.'.@var

commented

Comment by LadyCailin

I remembered! This is for adding the ability to add default parameters. import('value', @defaultValueIfNull).

However, as a part of this change, I will also add the ability for import/export to accept an array as the first parameter, so import(array('a', 'b', 'c')) would work like import('a', 'b', 'c') currently does.

commented

Comment by PseudoKnight

Defaults and array keys were added, so I guess this is "fixed".