11

Editing a PHP example, I tried to add a block of version specific code – PHP 5.6.6 in this case. I assumed that the numbers were treated simply as text, but this is not the case. You can only use version numbers that are specified in the topic information with release dates. This seems unnecessarily restrictive; in order to portray these versions accurately I have to edit the topic intro and add a bunch of point releases.

Is there any logic behind this restriction?

<!-- if version <PHP 5.x> [gte 5.6.6] -->
This doesn't work!
<!-- end version if -->

<!-- if version <PHP 5.x> [gte 5.6] -->
This works!
<!-- end version if -->
3
  • 7
    On a related note, whoever thought splitting these up separately into "PHP 5.x", "PHP 7.x", etc. was a good idea? Of course it's irreversible now that all the version blocks have it...
    – miken32
    Commented Jun 1, 2017 at 20:14
  • 4
    @miken32 agree completely that the versioning aspect needs work. Ideally you'd imagine a state where we automatically tracked them and did not need the user to manually put them in. Versioning, in and of itself, will be rethought in the new iteration of Docs. Thanks for the feedback - we are capturing this and others to better address in Docs v2, while at present we are heads down pursuing our MVP experiment.
    – Vasudha Swaminathan StaffMod
    Commented Jun 2, 2017 at 19:13
  • @VasudhaSwaminthan actually I'd rather see them treated as just numbers. If someone puts a bad number in it should get caught on review.
    – miken32
    Commented Jun 4, 2017 at 20:05

0

Browse other questions tagged .