Is that a new behavior to Phalcon\Tag::prependTitle or it is a bug? #12233

Closed
borisdelev opened this Issue Sep 19, 2016 · 5 comments

Projects

None yet

3 participants

@borisdelev
Contributor
borisdelev commented Sep 19, 2016 edited

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
@virgofx
Contributor
virgofx commented Sep 19, 2016

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.

@sergeyklay
Collaborator

@butamuh4o Could you please add tests for expected behaviour?
https://github.com/phalcon/cphalcon/blob/master/tests/unit/Tag/TagTitleTest.php

@borisdelev
Contributor

Yep, sure. :) thanks

@sergeyklay sergeyklay added this to the 3.0.2 milestone Sep 19, 2016
@borisdelev
Contributor

Finally. I did it :) Good luck all, and thanks for your patience.

@sergeyklay
Collaborator

Fixed in the 3.0.x branch.

@sergeyklay sergeyklay closed this Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment