Code Monkey home page Code Monkey logo

crap's Introduction

SWUbanner

crap's People

Contributors

flyingluscas avatar geekish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crap's Issues

Need workaround for process timeout

Just ran a crap require with quite a few packages, and the process timed out, even though every single package was available from cache. Looks like the default from symfony/process is 60 seconds.

For reference, the command run was:

crap require dotenv monolog slimbox symfony/console zendconfig twig/twig

Error was:

The process "'composer' 'require' '--ansi' 'josegonzalez/dotenv:^2.0' 'monolog/monolog' 'geekish/slimbox' 'symfony/console' 'zendframework/zend-config' 'twig/twig'" exceeded the timeout of 60 seconds.

Rethinking crap.json

When I wrote this tool, I wanted the resulting .json file to be editable by the user without breaking functionality. My reasoning for this was both for ease of use and to be able to use it in, say, a dotfiles repository for easy setup.

Currently with crap an alias may be written to an alias, but the new alias is simply added with the value of the original alias, so if the original value is changed the two aliases no longer match. Example: if I add an alias inputfilter to zendframework/input-filter:^2.7 and then I add an alias input-filter to inputfilter, I now have a crap.json that looks like:

{
  "inputfilter": "zendframework/input-filter:^2.7",
  "input-filter": "zendframework/input-filter:^2.7"
}

Continuing with the example scenario, if I change inputfilter to alias to zendframework/input-filter:^2.6, the value for input-filter is still "zendframework/input-filter:^2.7".

When I added this feature (alias to alias) I was mostly using it to prevent typos, especially in the case of packages with hyphens, as in the example above. Ideally, aliases to other aliases would link somehow and edits to one would edit another, but this would require a change in the json file structure to one not easily edited by hand.

So, I must decide if I value editing the json file easily, or better alias-package mapping more.

Lock before writing to crap.json?

The library used for writing to crap.json uses file_put_contents without the LOCK_EX flag; see webmozart/json#29. I don't foresee issues unless someone purposefully tries to run multiple crap commands simultaneously, or edits the file manually while a command is running.

Drop PHP 5.x support

I would like to drop PHP 5.x support for 2.x, and maintain 1.x for 5.x. Since I would be maintaining both versions, I want 1.x to be as feature-complete as possible.

There exists a utility to 'convert' PHP 7 code to 5; see spatie/7to5. See latitude/latitude for an example of a project that uses this library to create releases targeting each PHP version.

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.