1

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

Comments
  • 1
    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
  • 1
    @alexbrooklyn why? Can you explain the benefit? The environments need their own config files regardless.
  • 1
    Also, where are your tests? ;)
  • 1
    @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
  • 1
    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 ;)
  • 0
    @alexbrooklyn why would you use a php framework if you don't speak php...
  • 1
    Think beyond development, think of the people maintaining the cluster and having to configure it
  • 0
    @alexbrooklyn no offense taken
  • 1
    I like the idea behind it. Are there any plans for OOP (like inheritage)? Especially the controllers could Profit from that in my opinion
  • 1
    @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
  • 0
    @Wack This is a procedural framework. There are plenty of OOP MVC frameworks already.
  • 0
    @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.
  • 0
    @kejojedi any reason for that? Like what's the advantage?
Add Comment