Closed odan closed 7 years ago
Shouldn't these directories be defined by the system or the client of the packages?
tmp
: http://php.net/manual/en/function.sys-get-temp-dir.php
log
: /var/log
or client-defined
cache
: client-defined, not inside the package
What do you think?
Hi @odan -- thanks for taking the time to review and comment.
The problem with adding a top-level tmp/
is that, per the sample, it's just not that common: 115 occurrences in 65617 packages. Directories for log/
and cache/
are similar. (The first-pass results are at https://github.com/php-pds/skeleton_research/blob/1.x/results/01-dirs.txt if you want to inspect them.)
Now, to be clear, those directories are not forbidden by the standard, only that the standard has little support for specifying a particular name when those kinds of directories are present.
In my opinion this skeleton will be a basic standard and not a "complete" structure. The directories and files in this skeleton are a boilerplate, I think. Additional folders or files are welcome, but with uniform naming, i.e.
How closely should a package mirror its ultimate deployment environment?
I usually think of a package as something that is deployed into an existing environment of some kind. The package contains only what is absolutely needed to run (or develop) the package, allowing the user to specify the run-time environment. For example, where I work, all logging goes to a central logging server rather than get scattered into the filesystems of load balanced host VMs.
Ok, thank you all. In this context these folders are not really necessary and could be defined like you want.
I would love to see a standard temp and cache and log files directory.
For example:
or just like this