GithubHelp home page GithubHelp logo

arout / diamondphp Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 184.73 MB

Diamond PHP is a fully featured framework built for PHP 7 and offers extreme performance, a modular architecture, elegant syntax and an easy to use philosophy.

License: MIT License

ApacheConf 0.16% PHP 41.48% HTML 15.87% JavaScript 26.60% CSS 8.58% CoffeeScript 0.36% Shell 0.02% Java 0.24% Smarty 6.69% Batchfile 0.01%
php php7 web web-framework web-development web-application-framework php-framework diamond-php web-development-tools

diamondphp's Issues

declare(strict_types=1); should be declared per file

In https://github.com/arout/diamondphp/blob/master/app/code/core/system/global.php#L6, a global declare(strict_types=1); is called. This command, however, works on a per-file basis and should therefor be the first operation in every single PHP file in the repo to take any effect.

Currently, it only affects calls to methods and functions declared inside app/code/core/system/global.php, but there aren't any there.

For more information, please refer to http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.strict

Make framework code unreachable to clients

At this time, access to the core/module code is mitigated by having an index.html file in each module, but this is far from secure - anyone with knowledge of the project's structure could reach arbitrary files by simply typing their path into the address bar of their browser.

Ideally, this would mean having a separate web root that does not contain any core/module code and/or templates, but instead only contains the index.php file and whatever frontend assets need to be reachable from the client's browser.

Use environment configuration file to populate /app/code/core/config/Config.php

Instead of having a static configuration per project you could make use of an environment file that populates generic Config settings.

Example:
Project A will be released under a different branch name, now you have to clone the repo and commit configuration changes, or adjust them manually. Database credentials is a perfect example.
Using a (generated) environment file you don't have this inside your codebase.

Take a look at: https://github.com/vlucas/phpdotenv.
or, if still alive: https://github.com/hassankhan/config

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.