Feature Wiki

Information about planned and released features

Tabs

PHP 8 for ILIAS 8

1 PHP 8  |  Project Packages & Commitments

 

Overview of goals, activities and procedures.
  

The following measures are the result of the coordination of almost 20 core developers who are responsible for almost 200 components, modules and services in ILIAS.
 

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.
  • Refactored code conforms to current coding styles
  • Elimination of all warnings and errors of the static code inspection (without weak | incl. undeclared variables)
  • Transfer of GET params into Constructor
  • Avoidance/reduction of POST accesses (e.g. through $form->getInput()) and switch to Request classes
  • 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)
  • Creation of a unit test infrastructure in the component

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
  • Checking of external libraries
  • 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
      • 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
The 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

PHP 8  |  Reviews & Quality Assurance 

For quality assurance goals, all refacorting activities will be peer reviewed by a second developer - an initiative of this scope that is new to the ILIAS development process.

The reviews are based on the guidelines, coding styles, documentation and, of course, the specifications that PHP 8 provides, as well as those that have already been announced for PHP 8.1.

 
 

2 PHP 8  |  Project Completion

At the end of the project, a short report on the project completion was prepared by the project manager. (available in german)

 
 

3 PHP 8  |  Why should you contribute?

  1. Why do we have to deal with PHP 8?
    Which constraints are we bound to?

  2. Why do we want to work with PHP 8 and what benefits are achievable? Why is the project of long-term importance?

  3. What strategic aspects do we need to focus on in software development in general and in the development of ILIAS in particular?

Why do we have to deal with PHP 8?
Which constraints are we bound to?

The revision or refactoring of the code base is unavoidable, as PHP is subject to constant further development and maintenance for PHP versions is also finite.
 

Contemporary and modern software and software development requires modern programming languages.
 

We have to follow the technology on which the product we all have in common is based.
 

Why do we want to work with PHP 8 and what benefits are achievable? Why is the project of long-term importance?

The new PHP version improves the performance of the applications programmed with it, it promises significant improvements in reliability with careful use of resources through stricter typification.
 

Tests of other PHP-based projects show that PHP 8 is in some cases significantly better performing than its predecessors in various contexts. 
 

With PHP 8, the maintainability of the code is enhanced - for example, also through stronger typification.
 

A banal-sounding but very significant benefit is that ILIAS can continue to be operated, maintained and further developed in the next few years.
 

What strategic aspects do we need to focus on in software development in general and in the development of ILIAS in particular?

Because many institutions use ILIAS, we are in the good fortune to be able to manage such large projects together as a community, so that the costs for individual institutions are enormously small in relation to the benefits.
 

Source code should be adapted to the latest paradigms, patterns, etc. at regular intervals through refactorings in order to make it easier for new developers to get started.
 

Why does it need a dedicated PHP 8 project? Why don't the requirements just belong to maintenance?

It is impossible for developers to anticipate such efforts in the context of maintenance or feature development, and especially to anticipate the development in the dependencies. It is impossible to operate in a 'fixed price' model.
 

Within the framework of holistic software development, it requires recurring phases in which developers are explicitly given the opportunity to clean up the existing code.
 

4 PHP 8  |  Project Funding

 

Actual information of Crowdfunding:

 

Coordination of Crowdfunding for PHP 8:

For all questions and commitments to fund this project, please contact:

5 General Discussion

Last edited: 21. Dec 2022, 13:52, Samoila, Oliver [oliver.samoila]