Skip to content

Conversation

lucasmichot
Copy link
Contributor

@lucasmichot lucasmichot commented May 14, 2021

Copy link
Contributor

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you

@lucasmichot
Copy link
Contributor Author

( rebased after #89 has been merged )

composer.json Outdated
},
"autoload-dev": {
"psr-4": {
"Google\\CloudFunctions\\Tests\\": "tests/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this when we're not autoloading any classes in this namespace, and phpunit doesn't require it?

From composer.org:

Classes needed to run the test suite should not be included in the main autoload rules to avoid polluting the autoloader in production and when other people use your package as a dependency.

I agree with this, but since we're not loading any classes it makes more sense to me to leave this out until we do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure this conforms with most standards, but up to you

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am just not sure what the purpose of the lines are if they are not autoloading any classes. But If I'm missing something please let me know!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think what composer.org says is that if you autoload dependencies they should absolutely not be in the autoload section if they are test-related, thus the introduction of this autoload-dev section.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't autoload test dependencies, which is why I do not think autoload-dev is needed.

@bshaffer
Copy link
Collaborator

@lucasmichot I didn't mean for the PR to be closed, only for those lines in particular to be removed! The other changes in this pr are great

@lucasmichot lucasmichot reopened this May 20, 2021
@lucasmichot
Copy link
Contributor Author

lucasmichot commented May 20, 2021

Hi @bshaffer - this is my bad actually, the PR closing was not related to your comment
I was doing some local home repo cleaning and deleted this remote branch by accident

@bshaffer bshaffer enabled auto-merge (squash) June 8, 2021 16:02
@bshaffer bshaffer merged commit d31f2a9 into GoogleCloudPlatform:master Jun 8, 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.

3 participants