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

Config writing gruidelines #21

Open
augustohp opened this issue Mar 23, 2012 · 5 comments
Open

Config writing gruidelines #21

augustohp opened this issue Mar 23, 2012 · 5 comments

Comments

@augustohp
Copy link
Member

We should keep a nice and small subset of guidelines on wrtting INI files, mainly to be used as a requirement to make a INI a Respected, thought something like this:

  • Configuration for a specific ini should be handled by it, the more, the better. Stick with the defaults mentioned by the component, if none we fall back to PHP standards
  • Configuration variables (not instance objects) on a ini should have a namespace reflecting the INI filename to prevent conflitcs with other Respecteds
@alganet
Copy link
Member

alganet commented Mar 23, 2012

I also believe we need a mandatory comment for each INI file. Something like a #!/bin/bash that shell scripts use. Maybe a ; Container for Doctrine.ini on the first line should do. It's human readable and machine readable as well and if one day we need to filter out INIs for Config we could use it.

Another commenting and structuring guidelines would also help, like keeping primitive configurations on top and dependency arguments on bottom, both clearly identified as such.

@augustohp
Copy link
Member Author

; Doctrine2.ini

; ... ini bla ble bli Foo bar

repo[] = Doctrine/phar ; Doctrine phar repository (Foundation-like)

@alganet
Copy link
Member

alganet commented Mar 27, 2012

Main rationale for repo[], as we discussed yesterday, is to point to a specific repository. We could use the new git 1.7 sparse checkout to point to a single library directory.

Use cases:

repo[Doctrine] = doctrine/doctrine2/lib/Doctrine ; Points to the folder lib/Doctrine inside http://github.com/doctrine/doctrine2
repo[Doctrino] = git://example.com/sample.git/lib/Doctrino ; Points to the folder lib/Doctrino inside the repo on custom domain

GitHub is the default, but any git could do the work. I've also added the key as a string that reflects the namespace we're importing.

Dependencies could be tracked like this:

repo[Zend\Dom] = framework/zf2/library/Zend/Dom ; This is a dependency
repo[Respect\Template] = Respect/Template/library

@alganet
Copy link
Member

alganet commented Feb 8, 2013

We should ignore this repo[] thing for this issue. That was about something else that we've abandoned in favor of Aeronautics\aero.

Anyway we should write some guidelines to keep INI files shiny.

@nickl-
Copy link
Member

nickl- commented Feb 10, 2013

+0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants