Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSR12 transformation preparation #37681

Merged
merged 10 commits into from
Jun 27, 2022

Conversation

HLeithner
Copy link
Member

@HLeithner HLeithner commented Apr 27, 2022

Preparation Pull Request for Motion PROD2021/004: Update the code style to PSR12 as early as possible but latest for 5.0
This pull requests prepares the cms repository for that automated transformation PR #37686.

Motion:

Summary of Changes

  • Replace FinderHelperRoute import with namespaced version
  • Remove {} in switch statements
  • Removed a require statement which is unused since 2010
  • Remove another unnecessary require not used anymore
  • Deprecate JCOMPAT_UNICODE_PROPERTIES and moved the functionality into the function
  • Add phpcs exception for SideEffects in BufferStreamHandler which will be removed in 5.0 (planned for 4.0)

Testing Instructions

  • Most of the changes are CS changes and can be done by code review.
  • For FinderHelperRoute a simple test with smart search would be enough
  • JCOMPAT_UNICODE_PROPERTIES can't be tested without an "broken" pcre library so code review would be enough

Documentation Changes Required

  • Deprecation of JCOMPAT_UNICODE_PROPERTIES

@brianteeman
Copy link
Contributor

could you please include the text of Motion PROD2021/004. so that this pr contains an explanation of the chaanges

@HLeithner
Copy link
Member Author

The motion is really reduced to "Switch from custom codestyle to PSR-12" I added the motion description to the description.

@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch from 6190650 to eb69c10 Compare April 28, 2022 14:26
@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch from 60ae76a to ba9d6b1 Compare April 29, 2022 08:44
@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch 2 times, most recently from 064143c to 33b0629 Compare April 29, 2022 09:56
@HLeithner
Copy link
Member Author

@brianteeman I hopefully added all your fixes into the last commit. I added by hand to not make the pr too complex. All thanks go to you

@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch 4 times, most recently from f0ecf3b to 7a6ab94 Compare June 27, 2022 10:58
@HLeithner
Copy link
Member Author

@brianteeman I added the PR converter script, it's not really testable for you but maybe you can check my english?

Joomla! PSR-12 Converter
=======================
Usage:
IMPORTANT THIS SCRIPT HAVE TO BE OUTSIDE OF THE REPOSITORY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
IMPORTANT THIS SCRIPT HAVE TO BE OUTSIDE OF THE REPOSITORY
IMPORTANT THIS SCRIPT HAS TO BE OUTSIDE OF THE REPOSITORY

@brianteeman
Copy link
Contributor

@brianteeman I added the PR converter script, it's not really testable for you but maybe you can check my english?

first pass done

@HLeithner
Copy link
Member Author

I updated all Text changes btw. I also changed the "dir=auto" in the phpcs template from your comment in the commit.

thanks

@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch from 7a6ab94 to 7370d27 Compare June 27, 2022 12:07
@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch from 7370d27 to 6b0381a Compare June 27, 2022 13:18
@HLeithner
Copy link
Member Author

thanks updated.
I plan to do the PSR-12 conversation today starting at 16:00 UTC as long as nothing comes in between.

@HLeithner HLeithner force-pushed the 4.2-psr12-preparation branch from 6b0381a to 7475255 Compare June 27, 2022 17:53
@HLeithner HLeithner merged commit 6d9cc0f into joomla:4.2-dev Jun 27, 2022
@richard67 richard67 added this to the Joomla! 4.2.0 milestone Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants