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

Refactor for PSR-4 #235

Conversation

XedinUnknown
Copy link
Contributor

@XedinUnknown XedinUnknown commented Aug 26, 2021

⚠️ Requires #233.

This extracts the changes related to PSR-4 refactoring from #120.

  • Add package configuration to every module, and includes them all in main project - a more distributed modular system.
  • Fix some class names.
  • Project now fully complies with PSR-4.
  • Update some constraints, and upgrade dependencies.
  • Platform requirements now defined - requires PHP 7.1.

Refactoring of modules themselves was not necessary,
because they were already following the new standard.
PSR-4 is much more robust and predictable. But to do this,
a source root dir must be specified for every module.
This could be done in the root file, but this is not very modular.
Instead, now every module declares its own source root by using
the amazing Composer Merge Plugin. This approach allows each module
to also declare its own dependencies. Together, these changes allow
modules to be easily extractable to separate pacakges when the need
arises, and in general improves modularity significantly.
The WP containers don't seem to be used anywhere. There were
imports, but they are not actually used it seems.
Now will use config instead of CLI values for most things.
Will also show sniff codes.
This is the newest release, and is the first one that is compatible
with PHP 8. Other changes are BC-breaking, but very very minor.
@XedinUnknown XedinUnknown marked this pull request as draft August 26, 2021 15:38
.github/workflows/php.yml Outdated Show resolved Hide resolved
.github/workflows/php.yml Outdated Show resolved Hide resolved
docker/Dockerfile_wp Outdated Show resolved Hide resolved
docker/Dockerfile_wp Outdated Show resolved Hide resolved
@XedinUnknown XedinUnknown changed the title Standardize modules Refactor for PSR-4 Aug 27, 2021
@Dinamiko Dinamiko requested review from Dinamiko and removed request for jorgeatorres August 30, 2021 13:20
@Dinamiko Dinamiko deleted the branch woocommerce:bug/fix-project-configuration September 30, 2021 08:43
@Dinamiko Dinamiko closed this Sep 30, 2021
@Dinamiko
Copy link
Contributor

Reopening PR

@Dinamiko Dinamiko reopened this Sep 30, 2021
@Dinamiko Dinamiko marked this pull request as ready for review September 30, 2021 09:01
@Dinamiko Dinamiko merged commit 40058b4 into woocommerce:bug/fix-project-configuration Sep 30, 2021
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.

4 participants