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

Question: Clarify "resources" vs "vendor" in composer projects. #47

Open
yeboahnanaosei opened this issue Jul 14, 2018 · 2 comments
Open

Comments

@yeboahnanaosei
Copy link

First of I want to say thanks for this work!

I'm still relatively a beginner developer. From reading this standard it appears to me that a "resources" directory is analogous to a "vendor" directory in a composer project. (I could be completely wrong)

Considering the relative popularity of composer in PHP projects, how does this standard reconcile the two? Should the "vendor" directory substitute the "resources" directory in a composer project?

Can the two folders be seen as conceptually being the same?

@samwilson
Copy link

I have always thought that "other resource files" meant assets such as CSS, JS, images, etc. whereas vendor/ is always for packages.

It's certainly odd that there's no mention of vendor/ in the docs here; this should be fixed I reckon.

@odan
Copy link

odan commented Jul 16, 2018

/vendor is definitely reserved for a package manager like composer.

Here is the "removed" text from the specification:

The vendor/ directory MUST be reserved for use by package managers (e.g.: Composer).

If the repository type is designated as a "project" in its composer.json file, the vendor/ directory SHOULD be ignored by revision control tools (e.g.: Git, Mercurial, Subversion, etc.). It SHOULD NOT be committed to revision control repositories.

If the repository type is designated as a "library" (the default) or otherwise in its composer.json file, the vendor/ directory MUST be ignored by revision control tools (e.g.: Git, Mercurial, Subversion, etc.). It MUST NOT be committed to revision control repositories.

This publication does not otherwise define the structure and contents of the directory.

The reason for removing this section was that you should never commit the vendor/ directory to your git repository. Therefore the directory vendor/ is not part of this specification. Read more: #19

resources/ is the directory where people can store assets (actually, anything that is not PHP code). For example: umcompiled assets (js, css), sass, scss, fonts, locals and so on. Read more: #12

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

3 participants