Code Monkey home page Code Monkey logo

ministruts's People

Contributors

rosasurfer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ministruts's Issues

Replace hard-coded directory references by configuration values

In some places directories are defined as APPLICATION_ROOT.'/{hard-coded-value}'. As to not to enforce a pre-defined directory layout all such definitions need to be made configurable and resolved dynamically.

Known occurrences:

// MiniStruts::getConfigDir()
$dir = APPLICATION_ROOT.'/etc/config';

// FileSystemCache
$directory = APPLICATION_ROOT.'/etc/cache/'.$label;

// Module
$resourceDirectories[] = APPLICATION_ROOT.'/app/view';

// VersionedUrl
$fileName = APPLICATION_ROOT.'/www/'.$this->uri;

Case-insensitive class loading

Where possible replace Composer's class loader with the case-insensitive built-in class loader to become compatible with PHP standards. This especially if autoload is set to classmap (recommended in production). At the moment the built-in class loader is not used if Composer was loaded first.

@see http:// github.com/composer/composer/issues/1803

The argument of a single call to strToLower() being a performance penalty in the context of loading, parsing and compiling a full PHP unit is non-sense. Even with an opcode cache the difference is not measurable.

Approaches and bugs:
@see http://stackoverflow.com/questions/20235922/how-to-add-case-insensitive-autoloading-using-composer-generated-classmap
@see http://stackoverflow.com/questions/14097152/spl-autoload-not-loading-case-sensitivity
@see https:// github.com/composer/composer/issues/4209#issuecomment-563672383

Should we wrap loading in a try-catch block? Loaders are not allowed to trigger any errors but static initializers might do so anyway.

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.