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

Add opcache page #147

Merged
merged 11 commits into from
Jul 6, 2024
Merged

Add opcache page #147

merged 11 commits into from
Jul 6, 2024

Conversation

xepozz
Copy link
Member

@xepozz xepozz commented Jun 26, 2024

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

@xepozz xepozz requested a review from a team June 26, 2024 07:06
@xepozz xepozz added the status:code review The pull request needs review. label Jun 26, 2024
use Psr\Http\Message\ResponseInterface;
use Yiisoft\DataResponse\DataResponseFactoryInterface;

use function Safe\opcache_get_status;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a new dependency?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, it was meant to be just opcache_get_status from root namespace. Right?

Copy link
Member

@samdark samdark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See @rustamwin comment.

public function index(): ResponseInterface
{
return $this->responseFactory->createResponse([
'status' => opcache_get_status(true),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to verify that opcache is available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Or else it would just crash.

@xepozz xepozz merged commit 1353a44 into master Jul 6, 2024
12 of 16 checks passed
@xepozz xepozz deleted the opcache branch July 6, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants