pborreli / composer-service Goto Github PK
View Code? Open in Web Editor NEWComposer as a service
License: MIT License
Composer as a service
License: MIT License
please leave this to me, just coach me ๐ถ would you @pborreli ?
Use e.g. http://codemirror.net/
on scrutinizer the only 'not A' class/method is ComposerUpdateStep::execute
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
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');
}
}
The route "composer_service_homepage" should have a routing method (GET/POST/PUT). It is mandatory.
Posted from SensioLabsInsight
Default Symfony2 favicon found.
This reveals the backend engine of the application and makes it more vulnerable to attackers. Consider using a custom favicon instead - plus, your users will memorize your application more easily.
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 }
working on localhost, failing on travis-ci
probably because the composer update takes too much time there
https://travis-ci.org/pborreli/composer-service/jobs/16616427
right now some phpunit func test exist, but unit ones are missing
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
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);
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
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
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'
in src/Ayaline/Bundle/ComposerBundle/Pusher/ChannelAuthenticator.php, line 21
A Symfony dependency injection container has been found as an argument.
/**
* Constructor
*
* @param ContainerInterface $container
*/
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
/**
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 theuse
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
in spec/Ayaline/Bundle/ComposerBundle/AyalineComposerBundleSpec.php, line 6
The class
Prophecy\Argument
is declared but never used. You should remove theuse
statement.
<?php
namespace spec\Ayaline\Bundle\ComposerBundle;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class AyalineComposerBundleSpec extends ObjectBehavior
{
function it_is_bundle()
{
Posted from SensioLabsInsight
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.
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 theuse
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
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 theuse
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
26 lines for DefaultController::indexAction() in src/Ayaline/Bundle/ComposerBundle/Controller/DefaultController.php, line 13
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;
}
A Doctrine schema validation problem has been detected: The field 'Sonata\NotificationBundle\Entity\BaseMessage#body' uses a non-existant type 'json'.
The route "liip_monitor_run_group_check" should have a routing method (GET/POST/PUT). It is mandatory.
Posted from SensioLabsInsight
80 lines for UploadComposerConsumer::process() in src/Ayaline/Bundle/ComposerBundle/Consumer/UploadComposerConsumer.php, line 37
in src/Ayaline/Bundle/ComposerBundle/Consumer/UploadComposerConsumer.php, line 29
A Symfony dependency injection container has been found as an argument.
/**
* Constructor
*
* @param ContainerInterface $container
*/
public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
/**
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 theuse
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
in src/Ayaline/Bundle/ComposerBundle/DependencyInjection/Configuration.php, line 16
This
rootNode
local variable is declared but never used. You should remove it.
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ayaline_composer');
return $treeBuilder;
}
}
in app/config/security.yml, line 13
A sensitive data has been detected in your configuration file (
password
parameter). You should consider storing it in a single parameter file.
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)/
as per @igorw request ๐ถ
UploadComposerConsumer.php
On success the button Go should have it's class 'active' removed, not sure why it's not the case anymore.
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
Since 11a595f a regression has been introduced, what do you think ?
should we stop or let the download possible (with the warning)
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
The secret is the default one from the Symfony Standard Edition
The session cookie name is the default one, PHPSESSID. You should consider overwriting it thanks to session.name parameter (see the official documentation).
& change icon to floppy-save
Yey we got a mention from @Seldaek from the composer repository, creating the issue based on
composer/composer#843 (comment)
๐ถ
E.g. Fade in the new tabs for better user experience
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.