Giter VIP home page Giter VIP logo

composer-service's Introduction

Composer as a service SensioLabsInsight

What is it?

Originally the idea came from @pgodel

twitter-pgodel

Having some issue with little instances or slow connection, I decided to make the tool as a side-project.

Requirements

rabbitmq-server
pusher.com account (free plan for few connections)

Installation

composer create-project pborreli/composer-service -sdev
cd composer-service
php -S localhost:9090 -t web &
rabbitmq-server &
php app/console sonata:notification:start

Run test suite

You will need phantomjs executable:

brew update && brew install phantomjs

Future

  • An API is planned so it could be possible to be called from inside composer itself.
  • More tests
  • Better code
  • Insert your needed feature here

License License

It's MIT, you can do whatever you like without need of thank or anything. I'd be glad if you use it, happy if you enjoy it and very happy if you decide to contribute to make it better.

Quality

Code Climate Codacy Quality Score Scrutinizer Quality Score SensioLabsInsight Build Status Dependency Status

Contributing

If you wish to contribute to this website, please fork it on GitHub, push your change to a named branch, then send me a pull request.

Contributors

@pborreli
@ubermuda
@cordoval
@youbs
@norzechowicz
@staabm
@aitboudad

composer-service's People

Contributors

aitboudad avatar antonbabenko avatar cordoval avatar dependabot-preview[bot] avatar dependabot-support avatar dialogik avatar jakzal avatar kuldipem avatar maqnouch avatar norberttech avatar owenvoke avatar pborreli avatar staabm avatar ubermuda avatar youbs 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

composer-service's Issues

[RFC] Vagrant

What do you guys think about adding to this project vagrant configuration? It might be helpful especially when somebody wants to fix some simple issue but he have no idea how to set up rabbitmq-server.

support switch checkbox to install --dev or --no-dev

currently the default is --no-dev so that the require-dev dependencies are not fetched.

this ticket is about creating a checkbox to tick and to basically enable the compiler to run with composer update --dev

[Insight] Unused use statement should be avoided

in src/Ayaline/Bundle/ComposerBundle/Consumer/Step/DumpFileStep.php, line 6

The class Symfony\Component\Filesystem\Filesystem is declared but never used. You should remove the use statement.

<?php

namespace Ayaline\Bundle\ComposerBundle\Consumer\Step;

use Sonata\NotificationBundle\Consumer\ConsumerEvent;
use Symfony\Component\Filesystem\Filesystem;

/**
 * @author Hubert Moutot <[email protected]>
 */
class DumpFileStep extends AbstractStep implements StepInterface

Posted from SensioLabsInsight

[Insight] Object parameters should be type hinted

in spec/Ayaline/Bundle/ComposerBundle/Validator/Constraints/ComposerJsonValidatorSpec.php, line 37

The parameter context, which is an object, should be typehinted.

    function it_is_a_constraint_validator()
    {
        $this->shouldImplement('Symfony\Component\Validator\ConstraintValidator');
    }

    function it_adds_violation_if_the_given_value_is_not_valid_json($context, ComposerJson $constraint)
    {
        $context->addViolation(Argument::any())->shouldBeCalled();

        $this->validate('not valid json', $constraint);
    }

Posted from SensioLabsInsight

Downloadbutton clickable even when not displayed

on the intial page view the mouse cursor acts like there is a clickable area below the GO button.

Firebug reveals it is the Downloadbutton.

Maybe the button should be hidden using display: hidden initially?

dlbutton

Tested on FF28, Win7x64

[Insight] Unused method, property, variable or parameter

in src/Ayaline/Bundle/ComposerBundle/Consumer/UploadComposerConsumer.php, line 111

This alerts local variable is declared but never used. You should remove it.


        $pusher->trigger($channelName, 'consumer:new-step', array('message' => 'Checking vulnerability'));
        $checker = new SecurityChecker();

        try {
            $alerts = $checker->check($path.'/composer.lock', 'json');
        }catch(\RuntimeException $e){
            $pusher->trigger($channelName, 'consumer:error', array('message' => $e->getMessage()));
            return 1;
        }

[Insight] Files should not be executable

chmod a-x 'src/Ayaline/Bundle/ComposerBundle/Resources/public/css/ladda-themeless.css' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/css/ladda-themeless.min.css' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/css/ladda.css' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/css/ladda.min.css' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/js/ladda.js' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/js/ladda.min.js' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/js/spin.js' \
'src/Ayaline/Bundle/ComposerBundle/Resources/public/js/spin.min.js'

[Insight] Unused method, property, variable or parameter

in src/Ayaline/Bundle/ComposerBundle/DependencyInjection/AyalineComposerExtension.php, line 18

This config local variable is declared but never used. You should remove it.

     * {@inheritDoc}
     */
    public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.xml');
    }
}

Go button clickable area

the clickable area of the GO button is smaller at initial page view. It is a little bigger than the actual GO text, but not as big as the blue background shape.

After a first hover over the button the clickable area gets as big as the blue background shape.

Tested on FF28, Win7x64

[Insight] Unused use statement should be avoided

in src/Ayaline/Bundle/ComposerBundle/Consumer/Step/ServeVendorStep.php, line 6

The class Symfony\Component\Filesystem\Filesystem is declared but never used. You should remove the use statement.

<?php

namespace Ayaline\Bundle\ComposerBundle\Consumer\Step;

use Sonata\NotificationBundle\Consumer\ConsumerEvent;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Process\Process;

/**
 * @author Hubert Moutot <[email protected]>
 */

Posted from SensioLabsInsight

[Insight] Unused use statement should be avoided

in src/Ayaline/Bundle/ComposerBundle/Consumer/Step/ComposerInstalledStep.php, line 15

The class Symfony\Component\Process\Process is declared but never used. You should remove the use statement.

 */

namespace Ayaline\Bundle\ComposerBundle\Consumer\Step;

use Sonata\NotificationBundle\Consumer\ConsumerEvent;
use Symfony\Component\Process\Process;

/**
 * @author Hubert Moutot <[email protected]>
 */
class ComposerInstalledStep extends AbstractStep implements StepInterface

Posted from SensioLabsInsight

[Insight] Strong password hashing algorithm should be used for password

in app/config/security.yml

The plaintext password hashing algorithm is insecure and should not be used in production.

security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        login:
            pattern:  ^/demo/secured/login$
            security: false

        secured_area:
            pattern:    ^/demo/secured/
            form_login:
                check_path: _security_check
                login_path: _demo_login
            logout:
                path:   _demo_logout
                target: _demo
            #anonymous: ~
            #http_basic:
            #    realm: "Secured Demo Area"

    access_control:
        #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

users should be able to upload their composer.lock

in that case, we could jump directly to the ServeVendorStep step if this composer.lock had been previously served or use a new one named ComposerInstallStep which will be faster than ComposerUpdateStep

Adding an 'about' page

With :

  • list of contributors with gravatar like : contributors
  • a "thank you" section with statuspages.io, pusher.com who gives us a paying plan for free to encourage OSS
  • a little word for my company which host the webserver

Feedback welcome for the content and design ..

[Insight] Source code should not contain TODO comments

in src/Ayaline/Bundle/ComposerBundle/Controller/DefaultController.php, line 84

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

            ));

            return new JsonResponse(array('status' => 'ok'));
        }

        // @todo: change it if https://github.com/symfony/symfony/pull/9918 is merged
        $errors = array_map(function ($error) {
            return $error->getMessage();

        }, $this->composerForm->get('body')->getErrors());

Posted from SensioLabsInsight

support private repositories

reopened a new one as #41 was not taking the direction wanted by @cordoval

Ok so, having a way to log on the website to be able to download GitHub private repo dependencies would be a great addition

[Insight] Source code should not contain TODO comments

in src/Ayaline/Bundle/ComposerBundle/Controller/DefaultController.php, line 84

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

            ));

            return new JsonResponse(array('status' => 'ok'));
        }

        // @todo: change it if https://github.com/symfony/symfony/pull/9918 is merged
        $errors = array_map(function ($error) {
            return $error->getMessage();

        }, $this->composerForm->get('body')->getErrors());

Posted from SensioLabsInsight

[Insight] Unused use statement should be avoided

in src/Ayaline/Bundle/ComposerBundle/Consumer/Step/FinalizeStep.php, line 6

The class Symfony\Component\Filesystem\Filesystem is declared but never used. You should remove the use statement.

<?php

namespace Ayaline\Bundle\ComposerBundle\Consumer\Step;

use Sonata\NotificationBundle\Consumer\ConsumerEvent;
use Symfony\Component\Filesystem\Filesystem;

/**
 * @author Hubert Moutot <[email protected]>
 */
class FinalizeStep extends AbstractStep implements StepInterface

Posted from SensioLabsInsight

[Insight] The Composer class loader should use Apc

in web/app.php

The PSR-0 class loader used in the front controller uses an inefficient storage strategy. Use ApcClassLoader instead.

<?php

use Symfony\Component\ClassLoader\ApcClassLoader;
use Symfony\Component\HttpFoundation\Request;

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance.
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
// with other applications also using APC.
/*
$apcLoader = new ApcClassLoader('sf2', $loader);
$loader->unregister();
$apcLoader->register(true);
*/

require_once __DIR__.'/../app/AppKernel.php';
//require_once __DIR__.'/../app/AppCache.php';

$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);

// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

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.