Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Ditch the config.php please and replace it with either an env file or listen for global environment variables
Or a config.yaml, using symfomy's config thing
Also, is this framework intended for 5.6 as well? If it is not then I'd strongly suggest using typehints. Also I believe it's good practice to have docblocks above functions -
@alexbrooklyn why? Can you explain the benefit? The environments need their own config files regardless.
-
@kejojedi because that's not gonna cut it for modern architectures
If I want to use environment variables now, I have to write actual code to fetch and validate configuration from the environment and do it myself. If I run this inside a k8s cluster, I need to manually mount a PHP file with config, which is insane if I don't speak php.
My suggestion would be to either use a json file on the system or fetch env vars dynamically -
Also, please don't see my words as aggresive attacks on your framework it's look pretty cool and I see a few areas of improvement ;)
-
Think beyond development, think of the people maintaining the cluster and having to configure it
-
Wack63115yI like the idea behind it. Are there any plans for OOP (like inheritage)? Especially the controllers could Profit from that in my opinion
-
@Wack Agreed, and perhaps some php-cs-fixer runs and php linting
And please for the love of god test your own code, an untested framework is equal to a broken framework imo -
@Wack This is a procedural framework. There are plenty of OOP MVC frameworks already.
-
@alexbrooklyn This is just a proof of concept. Unit tests will come later. I've also coded it so that it plays nicely with PHPStorm. You get full autocompletion already.
Related Rants
I started working on a small declarative PHP framework inspired by SwiftUI using some Laravel components. Wondering how much interest people might have in it.
https://github.com/kejojedi/breeze
rant
swiftui
php
laravel