Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.

#Hacktoberfest#5

Merged
josantonius merged 1 commit intojosantonius:masterfrom
MASNathan:composer-improvements
Oct 19, 2017
Merged

#Hacktoberfest#5
josantonius merged 1 commit intojosantonius:masterfrom
MASNathan:composer-improvements

Conversation

@MASNathan
Copy link
Copy Markdown
Contributor

Removed vendor folder and added to .gitignore
Autoloaded with PSR-4 all library files and test files
Dropped the use of a json file with mime types list and used PHP class instead
Dropped the use of version key in composer.json because it's arbitrary

Autoloaded with PSR-4 all library files and test files
 Dropped the use of a json file with mime types list and used PHP class instead
@peter279k
Copy link
Copy Markdown
Contributor

I also agree with the @MASNathan.
The vendor folder should not be under the version control.
If you want to keep the dependencies version, you can just let the composer.lock be under the version control.

@josantonius
Copy link
Copy Markdown
Owner

josantonius commented Oct 19, 2017

Yeah, you're right, much simpler that way. I'll apply it from now on.

Creating it in JSON format was to give it availability from other languages, but we can leave it as an extra resource and maintain the array you created.

The version in the composer.json, unless there's some weighty reason, I'll keep it. I use it for reference and in some libraries to get the current version.

A doubt, why static instead of self in MimeTypesCollection.php?

Thanks for your contribution! 👍

@josantonius josantonius merged commit a0423e7 into josantonius:master Oct 19, 2017
@MASNathan
Copy link
Copy Markdown
Contributor Author

I'm glad I could help.

I used static instead of ´self´ because that way if someone wants to extend the collection and change the value of the property, it'll be inherited/accessible by the parent class methods. You can find more information on StackOverflow about that.

I dropped the json file because if it's not php we have to read the file and parse it, if it's already in php format, these steps are not needed, which might have some performance benefits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants