Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] UT in yii2 #542

Closed
1 task done
Tracked by #534
eeliu opened this issue Oct 25, 2023 · 5 comments · Fixed by pinpoint-apm/pinpoint-php-aop#51
Closed
1 task done
Tracked by #534

[Feat] UT in yii2 #542

eeliu opened this issue Oct 25, 2023 · 5 comments · Fixed by pinpoint-apm/pinpoint-php-aop#51
Assignees
Labels
help wanted Extra attention is needed PHP-AGENT
Milestone

Comments

@eeliu
Copy link
Collaborator

eeliu commented Oct 25, 2023

Feature

for #534
try to support UT in yii2

Task

@eeliu eeliu self-assigned this Oct 25, 2023
@eeliu eeliu mentioned this issue Oct 25, 2023
5 tasks
@eeliu
Copy link
Collaborator Author

eeliu commented Oct 25, 2023

oh, yii2 looks dropping the rule information

    public function parseRequest($request)
    {
        if ($this->enablePrettyUrl) {
            /* @var $rule UrlRule */
            foreach ($this->rules as $rule) {
                $result = $rule->parseRequest($this, $request);
                if (YII_DEBUG) {
                    Yii::debug([
                        'rule' => method_exists($rule, '__toString') ? $rule->__toString() : get_class($rule),
                        'match' => $result !== false,
                        'parent' => null,
                    ], __METHOD__);
                }
                if ($result !== false) {
                    return $result;
                }
            }

@eeliu
Copy link
Collaborator Author

eeliu commented Oct 25, 2023

Idea for #542 (comment)

try to hook UrlRule::parseRequest and add a magic key on $request

@eeliu
Copy link
Collaborator Author

eeliu commented Nov 6, 2023

Looks like

image

@eeliu
Copy link
Collaborator Author

eeliu commented Nov 6, 2023

close as done

@eeliu eeliu closed this as completed Nov 6, 2023
@eeliu eeliu added this to the v0.4.12 milestone Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed PHP-AGENT
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant