ILIAS
ILIAS copied to clipboard
DataCollection: php8 review
Must-Package
What must be the agreed minimum goal from the community? - Whether developers, operators or users.
Goals
- [x] ILIAS can be used with PHP 8 without producing PHP-specific errors.
- same as point '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)
- 11 errors
- 50 warnings
- 329 weak warnings
- [x] Transfer of GET params into Constructor
- 12 places where $_GET is used
- [x] Avoidance/reduction of POST accesses (e.g. through $form->getInput()) and switch to Request classes
- 58 places where $_POST is used
- [ ] Use of SESSION (session object, alternative assignment of static session in constructor member variables)
- 21 places where $_SESSION is used
- [x] Documentation of all existing typifications as typehints (of parameters, return values and properties)
- 98%; missing void as return type at many setter functions; also take a look at the exception and test folder
- [x] Creation of a unit test infrastructure in the component
Requirements and analysis criteria
- [ ] Preserve unit test coverage even in refactoring.
- one unit test that seems not to work
- [ ] Simple call of all tabs/screens (without e.g. delete and move actions) and fixing of the corresponding bugs
- cant open 'Inhalt' and 'Info' tab
- [ ] 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
- 98%
- [ ] Typification of member variables
- 98%
- [ ] 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
see: https://github.com/ILIAS-eLearning/ILIAS/pull/4603
@daniwe4 can you please have a look (https://github.com/ILIAS-eLearning/ILIAS/pull/4603) and give me a hint how I should handle the session variables.
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.