ILIAS
ILIAS copied to clipboard
MyStaff: php8 review
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.
- can't generally use gui
- [x] Refactored code conforms to current coding styles
- [ ] Elimination of all warnings and errors of the static code inspection (without weak | incl. undeclared variables)
- 3 errors
- 58 warnings
- 48 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)
- [ ] Documentation of all existing typifications as typehints (of parameters, return values and properties)
- missing void return type on many setters
- [ ] Creation of a unit test infrastructure in the component
- missing test suite
Requirements and analysis criteria
- [ ] 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
-
- can't generally use gui
-
- [ ] 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
- [ ] Input/output typing of methods
- 96%
- [x] Typification of member variables
- [ ] Input/output typing of methods
- [ ] 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
- [ ] Replace previous arrays with classes that enable ArrayAccess - in future also getter / setter
- [ ] Switching previous arrays to generators/data objects
Misc
- please have a deeper look at the warnings. There are type miss matches.
- remove unused use statememts
- unecassary comments
- many unecassary type casts with intval
- please also have a look at places marked with 'TODO: php8_review:' prefix