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

[BUG] - Stop loading tests on production environment #950

Open
Ferror opened this issue Nov 13, 2022 · 0 comments
Open

[BUG] - Stop loading tests on production environment #950

Ferror opened this issue Nov 13, 2022 · 0 comments

Comments

@Ferror
Copy link

Ferror commented Nov 13, 2022

The library loads every class to autoload, which raises two issues.

  1. Some of the classes do not comply with PSR-4
  2. The test files are loaded on production, which does not make sense

The solution is relatively simple. It would be best if you excluded the Tests namespace from autoload and introduce a new autoload-dev where these are loaded.

Example -> https://github.com/symfony/symfony/blob/6.2/src/Symfony/Bundle/FrameworkBundle/composer.json#L113

Class Payum\Be2Bill\Tests\Be2billOffsiteGatewayFactoryTest located in ./vendor/payum/payum/src/Payum/Be2Bill/Tests/Be2BillOffsiteGatewayFactoryTest.php does not comply with the psr-4 autoloading standard. Skipping.
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

No branches or pull requests

1 participant