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
Changed to PSR-4 autoloading #70
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/composer.lock | ||
/phpunit.xml | ||
/earl-report.jsonld | ||
/.idea | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,9 @@ | |
"json-ld/tests": "@dev" | ||
}, | ||
"autoload": { | ||
"psr-0": { "ML\\JsonLD": "" } | ||
"psr-4": { "ML\\JsonLD\\": "src/" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be way easier to just change the line above to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without it, on a production server the Tests are also autoloaded. Because the tests folder is also included in the primary source. I'm not really sure why the tests fail. But let me check that out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean they are autoloaded? They are just loaded if they are used. Or do you mean that the class map grows? Can't that be worked around with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "exclude-from-classmap": ["/Test/"] should work. See "Excluding paths from the optimized classmap" section of https://seld.be/notes/new-composer-patterns |
||
}, | ||
"target-dir": "ML/JsonLD" | ||
"autoload-dev": { | ||
"psr-4": { "ML\\JsonLD\\Test\\": "Test/" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be in a directory called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure thing. And what about the namespace of the tests? |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in your global
.gitignore
but not committed in the repository.