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

Add autoload-dev and remove all require_once in tests #229

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

SvenRtbg
Copy link
Contributor

I believe we should utilize the composer autoloading for development purposes. Tests won't run without Composer anyways.

I decided to put any class that is used inside a test into the tests/support folder, clearly separating them from the test cases.
Inside we have a JsonMapperTest folder for any namespace-less classes, autoloaded with PSR-0. As an exception, the Zoo folder is also namespaceless, but hasn't been renamed yet. Everything else is PSR-4 autoloaded (namespacetest, othernamespace and Enums).

Some moved classes were renamed to fit inside the JsonMapperTest schema. In addition, some underscores were removed because they conflict with how PSR-0 works, and would require useless subfolders.

All non-namespaced classes in JsonMapperTest are made part of the PSR0 autoloading.
Exception still made for the "Zoo" collection of classes.
@cweiske cweiske merged commit 49f1fb2 into cweiske:master Mar 17, 2024
9 checks passed
@cweiske
Copy link
Owner

cweiske commented Mar 17, 2024

Thanks. Long overdue :)

@SvenRtbg SvenRtbg deleted the autoload_tests branch March 21, 2024 14:13
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.

2 participants