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

PHP 8: Code Review UIComponent #4142

Merged

Conversation

mjansenDatabay
Copy link
Contributor

@mjansenDatabay mjansenDatabay commented Mar 16, 2022

Hi @alex40724,

I completed the review of the Services/UIComponent component.

This component looked very good, I only found one file where the coding style was not compliant. Furthermore I had to add a few types here and there.

Results:

  • The code style is PSR-2 + X compliant
  • No usage of $_GET / $_POST / $_REQUEST / $_SESSION
  • There is a Unit Test Suite with at least one unit test
  • The unit tests pass
  • External libraries are compatible with PHP 8 (if relevant)
  • There are no serious PhpStorm Code Inspection issues left
  • The types are fully documented (PhpDoc) or explict PHP types are used (type hints, return types, typed properties)

I am not sure whether https://packagist.org/packages/geshi/geshi (used by Services/UIComponent/SyntaxHighlighter) is compatible with PHP 8. Please check the list item above if you already checked this.

I also fixed some trivial issues reported by my inspection profile.

Best regards,
@mjansenDatabay

@mjansenDatabay mjansenDatabay added improvement php Pull requests that update Php code labels Mar 16, 2022
@mjansenDatabay mjansenDatabay marked this pull request as ready for review March 16, 2022 18:43
@@ -32,7 +32,6 @@ class ilSkillSelectorGUI extends ilVirtualSkillTreeExplorerGUI
protected $select_gui = "";
protected string $select_cmd = "";
protected string $select_par = "";
protected bool $select_multi = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alex40724 I had to move this to the base class, because it is also used there, and without my changes this was dynamically declared in the base class.

@alex40724 alex40724 merged commit 99a5b2c into ILIAS-eLearning:trunk Mar 17, 2022
@alex40724
Copy link
Member

We are using the latest geshi version now. It does not explicit state to be compatible with PHP8, however I tested the code elements in the page editor and they work flawlessly.

@alex40724
Copy link
Member

Thanks for the review and changes!

@mjansenDatabay mjansenDatabay deleted the review/8/php8-uicomponent branch January 9, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants