Comments (8)
@ellisgl Hey! looks cool. A lot of effort went into that. Thanks for sharing.
from no-framework-tutorial.
I love the config
folder idea with config files, and optionally have config/{environment}
folders that overwrite any config in the main folder. The {environment} could be set in .env, which would be a good solution for /issues/20 (with the appropriate wrapper/interface of course)
from no-framework-tutorial.
The last full time development job I had, we had a config system that used .INI files. One for Dev, one for QA and one for Prod. Also each developer had their own INI that would merge with the Dev. It used apache env variables. I'll have to look for example code on my old hard drives.
from no-framework-tutorial.
Check out https://github.com/vlucas/phpdotenv
Lots of projects do it with an ignored .env and commited .env.example where new env keys are added. I mentioned this on #20 too. Then the .env stuff could be referenced in the config files. Multiple developers could have their own thing with the folder idea I mentioned above. The config/db.php
file could be production, but config/phil/db.php
would overwrite that if the environment was set to "phil" - just an example. I've seen the ini solution too, esp. in Java projects. While I'm not opposed, I think it muddies the repo to have an individual's settings checked in. Just a preference.
from no-framework-tutorial.
I found some very old code (was making a boilerplate "framework" for that job).
read.me has the info for the apache configs. library\X5\Config.php goes over how the INI's were handled. I guess the thing was that it has "macros" built in.
x5.zip
I'm not saying this is the way to do it, i'm just showing one way of doing configs.
from no-framework-tutorial.
@philsown so... decided to remake that mess of old code... https://github.com/ellisgl/GeekLab-INICONF
from no-framework-tutorial.
Can we close this?
from no-framework-tutorial.
Yes.
from no-framework-tutorial.
Related Issues (20)
- Improve step 4 instructions HOT 1
- Namespace problem in part 7
- Templating question HOT 1
- Question about what goes in the dependency injector and what doesn't. HOT 2
- Help me with part 10 (Dynamic Pages) HOT 5
- artofphp book? HOT 1
- Creating a Base Controller and extend it - but how to deal with lots of constructor parameters? HOT 3
- Chapter 10-dynamic-pages, InvalidPageException never being caught
- Part 11 Object to string issue (menu) HOT 4
- Route HOT 1
- Will you continue on your tut? HOT 2
- 404 - Page not found HOT 3
- router example throws exception HOT 2
- Chapter 10-dynamic-pages, can't get InvalidPageException
- Couldn't get Step 06 to work HOT 10
- Switching from Mustache Renderer to Twig Renderer HOT 1
- Twig version 1.42-dev HOT 3
- the link book can't open HOT 1
- 02-composer.md - name : Does not match the regex pattern HOT 1
- 05-router.md - Apache - FallbackResource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from no-framework-tutorial.