Right, I still think maybe adding a test showing this behaviour where you do some more complicated templating using the standard tags could be a good idea
@Danack Honestly, it wouldn't be a conversation. There's only 3 SAs that matter, and they already have a rough consensus on a syntax between them. Honestly I'd prefer a standardized attribute to "moar through unilateral docstrings."
PHP contributors: ugh, this project so hard to update due to the BC policy. Also PHP contributors: We'll only need to have 1 version, and it won't need any iteration.
All 3 are reasonably close, but have variation. My point simply being that there is no "conversation" in user space about what the syntax should be. There's 2 people maintaining SA libs, and one company. Whatever they do is what it is.
Does anyone know why REDIR_TEST_DIR is a thing that needs to be set, to allow PDO tests to run? github.com/php/php-src/blob/… seems like it has a sensible default to use?
Is there an example anywhere of how to use the functions in zend_enum.h to create enums in extensions? I used a stub to generate the arginfo, but I'm wondering if something is wrong because my test has a fatal error because the class isn't found.
I notice that the generated arginfo for standard namespaced classes uses the `INIT_NS_CLASS_ENTRY` macro, but there doesn't appear to be a similar macro for enums.
This is a backed enum, and it doesn't appear to automatically implement the BackedEnum interface. I wonder if I should explicitly state that in the stub
It's missing an entire section on arrays and hash tables in the PHP 7 section, but the PHP 5 section for that info seems out of date and doesn't compile on PHP 8, so I haven't been using the book much, since I didn't think it was up-to-date
Thoughts on dynamic enums? That is, if I create an enum from numbering systems from ICU data, the enum could have different cases, depending on the ICU build/version used. Is that a good idea or bad idea? Right now, I’m just using the string values, which has the same issue, except it won’t hurt typing.
@ramsey the (main) benefit of enums is at the static analysis level as it makes the code easier to reason about. So dynamic enums probably aren't a sensible thing. You could have one enum type per ICU version....and then have functions that accept multiple types?
function somethingFunWithNumberingSystems(ICUNumbering601|ICUNumbering701 $numbering_type) {}
I think I'd have to see your actual use case to comment further....I'm tempted to say just make your own comprehensive enum of all possible numbering systems and rules about which versions of ICU they are allowed to be used on.