bem / bh-php

PHP port of https://github.com/bem/bh. It's cool thing but better use this:
https://github.com/zxqfox/php-fpm-bem-demo-heroku
MIT License
33 stars 8 forks source link

processBemJson: no tag property #7

Closed qfox closed 9 years ago

qfox commented 9 years ago

Code:

require "vendor/autoload.php";
$bh = new \BEM\BH();

$bh->match('button', function ($ctx) {
    $ctx->tag('button');
});

var_dump($bh->processBemJson([ 'block' => 'block' ]));
// [ 'block' => 'button', 'tag' => 'button' ]

Expected:

class BEM\Json#4 (9) {
  public $block =>
  string(5) "block"
  public $tag =>
  string(6) "button"
// ...

Actual: no tag property at all.

qfox commented 9 years ago

https://github.com/bem/bh/pull/96/files

qfox commented 9 years ago

Landed in 4.0.0