gosa-project / gosa-plugins-schoolmanager

GOsa Add-On for Managing Schools
GNU General Public License v2.0
3 stars 5 forks source link

Port to GOsa 2.8 and fix numerous bugs #70

Open gber opened 1 month ago

gber commented 1 month ago

This is a port to the GOsa 2.8 plugin structure including templates for the default theme. It includes a number of fixes for functionality which is currently broken in master.

dzatoah commented 1 month ago

@gber Do you mind fixing the code-style issues (see CI output) too? :)

I did a quick review and it looks very good. Thanks for your good work :+1:

gber commented 1 month ago

@gber Do you mind fixing the code-style issues (see CI output) too? :)

I don't quite understand the difference between phpcbf and phpcs, the former seems to do some automatic correction but shows far fewer errors:

> ./vendor/bin/phpcbf addons/ --extensions=inc --standard=PSR12

PHPCBF RESULT SUMMARY
----------------------------------------------------------------------
FILE                                                  FIXED  REMAINING
----------------------------------------------------------------------
...ger/addons/schoolmanager/class_importteachers.inc  3      23
----------------------------------------------------------------------
A TOTAL OF 3 ERRORS WERE FIXED IN 1 FILE
----------------------------------------------------------------------

whereas phpcs returns ~ 150 errors and countless warnings.

dzatoah commented 1 month ago

phpcs is quite verbose in our case. Not all errors are automatically fixable by phpcbf. E.g. stuff like not using camel case or missing visibility declaration for methods or variables.

phpcbf is actually just there to check, if there are any wrong whitespaces or weird bracket placements, in my workflow.

My workflow:

$ composer install $ ./vendor/bin/phpcbf addons/ --extensions=inc --standard=PSR12 $ git diff

I've found some minor whitespace changes in: addons/schoolmanager/class_importteachers.inc