Is that a new behavior to Phalcon\Tag::prependTitle or it is a bug?
In Phalcon v2.x when i use tag:prependTitle the title is prepended
Phalcon\Tag::setTitle("PAGE");
Phalcon\Tag::prependTitle("test1");
Phalcon\Tag::prependTitle("test2");
// Title now is "test2 - test1 - PAGE" (depends of separator)
In Phalcon v3.x when i use tag:prependTitle the title replaced
Phalcon\Tag::setTitle("PAGE");
Phalcon\Tag::prependTitle("test1");
Phalcon\Tag::prependTitle("test2");
// Title now is "test2 - PAGE" (depends of separator)
So which behavior is right?
Sorry for my English. Thanks!
Details
- Phalcon version: 3.x
- PHP Version: 7
- Operating System: Windows 10
- Server: Apache
Definitely a bug, title prepending or appending should stack (that's how it was).
@googlle updated a bunch of the title code without doing tests apparently. Need to revert/fix this asap.
@butamuh4o Could you please add tests for expected behaviour? https://github.com/phalcon/cphalcon/blob/master/tests/unit/Tag/TagTitleTest.php
Yep, sure. :) thanks
Finally. I did it :) Good luck all, and thanks for your patience.
Fixed in the 3.0.x branch.