ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

Implemented PSR12 according to PR #4533

Open lauraherzog opened this issue 2 years ago • 3 comments

Pull Request #4533 stated to update the Coding Standard to PSR12. I implemented it within the PHP CS Fixer. If anything needs to be changed, let me know.

lauraherzog avatar Jul 29 '22 05:07 lauraherzog

Hi @lauraherzog and @klees,

thx a lot for this PR. IMO we need some further changes for the PSR-12 "migration".


  • [ ] The PSR-2 and additions chapter in docs/development/coding-style.md has to be modfied:

https://github.com/ILIAS-eLearning/ILIAS/blob/2488641ea826ae8001feae5a7459b3e9cfe65a0b/docs/development/coding-style.md?plain=1#L5


  • [ ] The Server Side (PHP) chapter in docs/development/README.md has to be modified:

https://github.com/ILIAS-eLearning/ILIAS/blob/2488641ea826ae8001feae5a7459b3e9cfe65a0b/docs/development/README.md#L27


  • [ ] The PHP-CS-FIXER examples have to be modified:

https://github.com/ILIAS-eLearning/ILIAS/tree/trunk/CI/PHP-CS-Fixer/example


  • [ ] Our PhpStorm inspection profile in docs/development/inspection-configs/php-storm-php-inspections.xml has to be modified:

https://github.com/ILIAS-eLearning/ILIAS/blob/2488641ea826ae8001feae5a7459b3e9cfe65a0b/docs/development/code-style-configs/php-storm.xml#L1


  • [ ] The PhpStorm code style config in docs/development/code-style-configs/php-storm.xml has to be modified:

https://github.com/ILIAS-eLearning/ILIAS/blob/2488641ea826ae8001feae5a7459b3e9cfe65a0b/docs/development/inspection-configs/php-storm-php-inspections.xml#L1


If you need any assistance, don't hesitate to contact me.

Best regards, @mjansenDatabay

mjansenDatabay avatar Aug 02 '22 08:08 mjansenDatabay

@mjansenDatabay

  • For the docu (first item in your list) we'll just have to merge #4533 before. No need to change that here, IMO.
  • Could you be a bit more specific regarding the required change in the PHPStorm inspection config?

klees avatar Aug 02 '22 09:08 klees

Could you be a bit more specific regarding the required change in the PHPStorm inspection config?

We'll have to import the current config/profiles files into PhpStorm and then change the internal coding style to PSR-12. Then we'll have to export these modified files again.

I'll suggest the PhpStorm related changes with https://github.com/ILIAS-eLearning/ILIAS/pull/4886

mjansenDatabay avatar Aug 02 '22 10:08 mjansenDatabay

Superseeded by #4960

klees avatar Aug 24 '22 12:08 klees