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

IBX-9413: Corrected incorrect type, changed how to retrieve variables #62

Open
wants to merge 2 commits into
base: 4.6
Choose a base branch
from

Conversation

mateuszdebinski
Copy link

🎫 Issue IBX-9413

get_object_vars - uninitialized properties are considered inaccessible, and thus will not be included in the array.

If we use types for variables they are treated as uninitialized, which is why the get_object_vars function cannot retrieve them. I also don't see the point of assigning null to each variable to initialize it. During the last change, unfortunately, phpVersion was set to string instead of an array, which after fixing the problem with retrieving variables caused a new error

@mateuszdebinski mateuszdebinski added Bug Something isn't working Ready for review labels Jan 21, 2025
@mateuszdebinski mateuszdebinski requested a review from a team January 21, 2025 14:20
@mateuszdebinski mateuszdebinski self-assigned this Jan 21, 2025
@mateuszdebinski mateuszdebinski force-pushed the IBX-9413_missing_information_about_php_memory_cpu branch from 22f398f to 8fa46ed Compare January 21, 2025 14:31
@mateuszdebinski mateuszdebinski force-pushed the IBX-9413_missing_information_about_php_memory_cpu branch from 8fa46ed to 407d746 Compare January 21, 2025 14:40
Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

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

FYI I see that accelerator is indeed visible after your change, but CPU and memory is empty as before. Not sure what determines if the above is available or not.

src/bundle/SystemInfo/EzcSystemInfoWrapper.php Outdated Show resolved Hide resolved
@konradoboza konradoboza requested a review from a team January 22, 2025 07:22
@mateuszdebinski mateuszdebinski force-pushed the IBX-9413_missing_information_about_php_memory_cpu branch from 7539f98 to f9e2850 Compare January 22, 2025 09:20
@mateuszdebinski
Copy link
Author

FYI I see that accelerator is indeed visible after your change, but CPU and memory is empty as before. Not sure what determines if the above is available or not.

I tested it on 3 different devices and after the changes, the information about CPU and memory appeared correctly

@mateuszdebinski mateuszdebinski force-pushed the IBX-9413_missing_information_about_php_memory_cpu branch from f9e2850 to aa27328 Compare January 22, 2025 09:22
@konradoboza
Copy link
Contributor

konradoboza commented Jan 22, 2025

I tested it locally (Apple M1 Pro) and it failed. 😉 I will let QA give their opinion though...

Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

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

+1 to unblock QA but this PR doesn't fix the issue on my local machine.

@konradoboza konradoboza requested a review from a team January 22, 2025 09:25
@micszo micszo self-assigned this Jan 27, 2025
Copy link
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Apple ARM:
CPU NOK
Memory NOK
Accelerator OK

Linux in VM on Apple ARM:
CPU NOK
Memory OK
Accelerator OK

PHP 8.3.14/15/16. Tested on Linux with Apache and Nginx.

@micszo
Copy link
Contributor

micszo commented Jan 27, 2025

Apple Intel:
CPU NOK
Memory NOK
Accelerator OK

Linux in VM on Apple Intel:
CPU OK
Memory OK
Accelerator OK

@glye
Copy link
Contributor

glye commented Jan 27, 2025

FWIW, with WSL (Linux on Windows), cpu/mem/acc are all ok before and after the change.

Copy link
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Summary.

On Mac, regardless of architecture, only Accelerator field displays valid value. Reported separately as https://issues.ibexa.co/browse/IBX-9437.

Virtual machines with Linux on Mac:
with Intel - all 3 fields work correctly
with ARM - Memory and Accelerator work, CPU is blank.

On Platform.sh all 3 fields work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Ready for QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants