ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

MyStaff: php8 review

Open daniwe4 opened this issue 2 years ago • 1 comments

Must-Package

What must be the agreed minimum goal from the community? - Whether developers, operators or users.

Goals

  • [ ] ILIAS can be used with PHP 8 without producing PHP-specific errors.
    • see 'Simple call of all tabs/screens (without e.g. delete and move actions) and fixing of the corresponding bugs'
  • [x] Refactored code conforms to current coding styles
  • [x] Elimination of all warnings and errors of the static code inspection (without weak | incl. undeclared variables)
    • 42 weak warnings
  • [x] Transfer of GET params into Constructor
  • [x] Avoidance/reduction of POST accesses (e.g. through $form->getInput()) and switch to Request classes
  • [x] Use of SESSION (session object, alternative assignment of static session in constructor member variables)
  • [x] Documentation of all existing typifications as typehints (of parameters, return values and properties)
  • [x] Creation of a unit test infrastructure in the component

Requirements and analysis criteria

  • [x] Preserve unit test coverage even in refactoring.
  • [ ] Simple call of all tabs/screens (without e.g. delete and move actions) and fixing of the corresponding bugs
    • Class 'ILIAS\MyStaff\ListCourses\ilMStListCoursesTableGUI' was not found in the control structure, try `composer du` to read artifacts.
      
  • [ ] Checking of external libraries
  • [x] Basis of the refactoring and the reviews is, among others, ILIAS Development Documentation.

Should-Package

What do we need to do in the mid-term to catch recurring large code revisions and to refactor more than the minimum?

  • [ ] Expansion of the unit test coverage
  • General and structural improvements and optimisations to the code base. For example ...
  • [ ] ... in static functions and by removing static methods
  • [ ] ... by introducing return type declarations
  • ... by typification of all variables
    • [x] Input/output typing of methods
    • [x] Typification of member variables
  • [ ] Use of UI components from the UI framework "KitchenSink" that have been introduced and established in the meantime. Reduction of legacy UI and legacy code.

Sustainability-Package

he developer community has identified topics that would also improve the quality of ILIAS from the point of view of PHP and ILIAS in general. Ideally, these topics could be directly addressed in the process of systematic refactoring.

  • [ ] Introduction and use of declarations of "strict_types" for data
    • 60 %
  • [ ] Replace previous arrays with classes that enable ArrayAccess - in future also getter / setter
  • [ ] Switching previous arrays to generators/data objects

daniwe4 avatar Jun 03 '22 12:06 daniwe4

@daniwe4 thanks for your changes!

i will have a look for " ILIAS can be used with PHP 8 without producing PHP-specific errors." and merge your request after my changes.

thank you very much for the review!

mstuder avatar Jun 03 '22 14:06 mstuder

This PR has been closed by the TB: The person assigned is no longer responsible and in the meantime the new persons responsible have taken on the refactoring or the proposed changes can no longer be applied.

chfsx avatar May 02 '23 14:05 chfsx