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

[ACCOUNT-2732] refactor: replace module-lib-service-container #447

Open
wants to merge 38 commits into
base: main
Choose a base branch
from

Conversation

hschoenenberger
Copy link
Contributor

@hschoenenberger hschoenenberger commented Nov 4, 2024

Replace module-lib-service-container

A module should not bundle and duplicate a heavy dependency from the framework used by the PrestaShop Core, we propose to replace module-lib-service-container with a simple service container to provide the following benefits :

  • avoid collisions (between modules and with the core);
  • avoid deprecation for a wider PHP and PrestaShop versions support;
  • no more cache construction phase, providers are written directly using PHP;
  • php configuration files instead of yaml.

The goal is not to replace the symfony container but to enhance stability and compatibility for the ps_accounts module in single version mode
Service container should be provided by the Core, and we use it when available (in the ps_accounts case we will start to use symfony controllers for PrestaShop v9 compatibility)


CI refactoring

  • Use PHP config file in place of the GitHub secret's YAML

Running PHPStan, PHPUnit, header-stamp & php-cs-fixer cheks in single container :

  • PHPUnit
  • PHPStan
  • header-stamp
  • php-cs-fixer

Tests

  • Unit Tests

@hschoenenberger hschoenenberger marked this pull request as ready for review November 6, 2024 08:13
@hschoenenberger hschoenenberger changed the title refactor: get rid of module-lib-service-container refactor: replace module-lib-service-container Nov 6, 2024
@hschoenenberger hschoenenberger self-assigned this Nov 7, 2024
@hschoenenberger hschoenenberger changed the title refactor: replace module-lib-service-container [ACCOUNT-2732] refactor: replace module-lib-service-container Nov 7, 2024
Copy link
Contributor

@antoinemetifeu antoinemetifeu left a comment

Choose a reason for hiding this comment

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

Côté code, ça a l'air ok.

Pareil que l'autre PR, je vais essayer de tester rapidement (si je n'oublie pas entre deux)

Copy link

sonarcloud bot commented Nov 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants