Add JsExpression to processData() function like in Yii2

Open
#23 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, php
Domain
backend

Research direction

Start by reviewing the processData() entry point and the Yii2 JsExpression usage referenced in the issue. Determine how json_encode should accept and preserve JavaScript expressions, then verify that the expected encoding behavior is covered for a JsExpression object.

Written by the indexing model from the issue text.

Description

status:under discussion type:feature
What steps will reproduce the problem?

Would like to be able to use JsExpression in Yii3, like in Yii2 making it possible to json encode javascript expressions.
JsExpression seems to have been removed from Yii3

What is the expected result?

Passing Javascript Expressons as a JsExpression object to Json_encode, see usage in Yii2.

What do you get instead?

This much needed functionality seems to have been removed in Yii3... unless there is another way it is now being done!?

Additional info
Q A
Version 3
PHP version n/a
Operating system all
Dominant language
PHP
Stars
29
Forks
9
Avg merge
56m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from yiisoft/json

All issues in yiisoft/json

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.