1 Commits

Author SHA1 Message Date
Matthieu Napoli
3249f3642e Upgrade to Stratify 0.3 2016-06-20 17:15:27 +02:00
10 changed files with 1144 additions and 218 deletions

View File

@@ -1,8 +1,6 @@
# Is It Maintained? # Is It Maintained?
Monitoring open source projects activity. Monitoring open source projects activity.
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mnapoli/IsItMaintained.svg)](http://isitmaintained.com/project/mnapoli/IsItMaintained "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/mnapoli/IsItMaintained.svg)](http://isitmaintained.com/project/mnapoli/IsItMaintained "Percentage of issues still open")
![](web/img/dude.png) ![](web/img/dude.png)
@@ -48,7 +46,3 @@ API token (https://github.com/settings/applications) and set it in `parameters.p
- PHP 7.0 - PHP 7.0
- [Puli](http://puli.io) installed - [Puli](http://puli.io) installed
- GD extension - GD extension
## Feature requests
Issues are disabled for now on this repository because they were filling up with feature requests. If you want a feature to be added, pull requests are welcome.

View File

@@ -1,37 +1,23 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
use DI\ContainerBuilder; use Maintained\Application\Application;
use Maintained\Application\Command\ClearCacheCommand; use Maintained\Application\Command\ClearCacheCommand;
use Maintained\Application\Command\ShowStatisticsCommand; use Maintained\Application\Command\ShowStatisticsCommand;
use Maintained\Application\Command\UpdateStatisticsCommand; use Maintained\Application\Command\UpdateStatisticsCommand;
use Maintained\Application\Command\WarmupCacheCommand; use Maintained\Application\Command\WarmupCacheCommand;
use Symfony\Component\Console\Application;
require_once __DIR__ . '/../.puli/GeneratedPuliFactory.php';
require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../vendor/autoload.php';
$modules = [ $app = new Application;
'error-handler',
'twig',
'app',
];
/** @var \Stratify\Framework\Application $app */
$app = new class([], $modules) extends \Stratify\Framework\Application
{
protected function createContainerBuilder(array $modules) : ContainerBuilder
{
$containerBuilder = parent::createContainerBuilder($modules);
$containerBuilder->useAnnotations(true);
return $containerBuilder;
}
};
$container = $app->getContainer(); $container = $app->getContainer();
$application = new Application('isitmaintained'); $cli = $app->cli();
$application->add($container->get(ClearCacheCommand::class)); $cli->add($container->get(ClearCacheCommand::class));
$application->add($container->get(WarmupCacheCommand::class)); $cli->add($container->get(WarmupCacheCommand::class));
$application->add($container->get(ShowStatisticsCommand::class)); $cli->add($container->get(ShowStatisticsCommand::class));
$application->add($container->get(UpdateStatisticsCommand::class)); $cli->add($container->get(UpdateStatisticsCommand::class));
$application->run(); $cli->run();

View File

@@ -19,7 +19,7 @@
"mnapoli/blackbox": "~0.4.0", "mnapoli/blackbox": "~0.4.0",
"psr/log": "~1.0", "psr/log": "~1.0",
"monolog/monolog": "~1.10", "monolog/monolog": "~1.10",
"stratify/framework": "~0.1.2", "stratify/framework": "~0.3.1",
"stratify/twig-module": "~0.1.1", "stratify/twig-module": "~0.1.1",
"doctrine/annotations": "^1.2" "doctrine/annotations": "^1.2"
}, },

1178
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,10 @@
"install-path": "vendor/badges/poser", "install-path": "vendor/badges/poser",
"installer": "composer" "installer": "composer"
}, },
"coduo/phpspec-data-provider-extension": {
"install-path": "vendor/coduo/phpspec-data-provider-extension",
"installer": "composer"
},
"container-interop/container-interop": { "container-interop/container-interop": {
"install-path": "vendor/container-interop/container-interop", "install-path": "vendor/container-interop/container-interop",
"installer": "composer" "installer": "composer"
@@ -28,6 +32,10 @@
"install-path": "vendor/doctrine/cache", "install-path": "vendor/doctrine/cache",
"installer": "composer" "installer": "composer"
}, },
"doctrine/instantiator": {
"install-path": "vendor/doctrine/instantiator",
"installer": "composer"
},
"doctrine/lexer": { "doctrine/lexer": {
"install-path": "vendor/doctrine/lexer", "install-path": "vendor/doctrine/lexer",
"installer": "composer" "installer": "composer"
@@ -52,14 +60,26 @@
"install-path": "vendor/mnapoli/blackbox", "install-path": "vendor/mnapoli/blackbox",
"installer": "composer" "installer": "composer"
}, },
"mnapoli/silly": {
"install-path": "vendor/mnapoli/silly",
"installer": "composer"
},
"monolog/monolog": { "monolog/monolog": {
"install-path": "vendor/monolog/monolog", "install-path": "vendor/monolog/monolog",
"installer": "composer" "installer": "composer"
}, },
"paragonie/random_compat": {
"install-path": "vendor/paragonie/random_compat",
"installer": "composer"
},
"php-di/invoker": { "php-di/invoker": {
"install-path": "vendor/php-di/invoker", "install-path": "vendor/php-di/invoker",
"installer": "composer" "installer": "composer"
}, },
"php-di/kernel": {
"install-path": "vendor/php-di/kernel",
"installer": "composer"
},
"php-di/php-di": { "php-di/php-di": {
"install-path": "vendor/php-di/php-di", "install-path": "vendor/php-di/php-di",
"installer": "composer" "installer": "composer"
@@ -68,6 +88,30 @@
"install-path": "vendor/php-di/phpdoc-reader", "install-path": "vendor/php-di/phpdoc-reader",
"installer": "composer" "installer": "composer"
}, },
"phpdocumentor/reflection-common": {
"install-path": "vendor/phpdocumentor/reflection-common",
"installer": "composer"
},
"phpdocumentor/reflection-docblock": {
"install-path": "vendor/phpdocumentor/reflection-docblock",
"installer": "composer"
},
"phpdocumentor/type-resolver": {
"install-path": "vendor/phpdocumentor/type-resolver",
"installer": "composer"
},
"phpspec/php-diff": {
"install-path": "vendor/phpspec/php-diff",
"installer": "composer"
},
"phpspec/phpspec": {
"install-path": "vendor/phpspec/phpspec",
"installer": "composer"
},
"phpspec/prophecy": {
"install-path": "vendor/phpspec/prophecy",
"installer": "composer"
},
"psr/http-message": { "psr/http-message": {
"install-path": "vendor/psr/http-message", "install-path": "vendor/psr/http-message",
"installer": "composer" "installer": "composer"
@@ -100,6 +144,22 @@
"install-path": "vendor/ramsey/uuid", "install-path": "vendor/ramsey/uuid",
"installer": "composer" "installer": "composer"
}, },
"sebastian/comparator": {
"install-path": "vendor/sebastian/comparator",
"installer": "composer"
},
"sebastian/diff": {
"install-path": "vendor/sebastian/diff",
"installer": "composer"
},
"sebastian/exporter": {
"install-path": "vendor/sebastian/exporter",
"installer": "composer"
},
"sebastian/recursion-context": {
"install-path": "vendor/sebastian/recursion-context",
"installer": "composer"
},
"seld/jsonlint": { "seld/jsonlint": {
"install-path": "vendor/seld/jsonlint", "install-path": "vendor/seld/jsonlint",
"installer": "composer" "installer": "composer"
@@ -148,6 +208,10 @@
"install-path": "vendor/symfony/process", "install-path": "vendor/symfony/process",
"installer": "composer" "installer": "composer"
}, },
"symfony/yaml": {
"install-path": "vendor/symfony/yaml",
"installer": "composer"
},
"twig/twig": { "twig/twig": {
"install-path": "vendor/twig/twig", "install-path": "vendor/twig/twig",
"installer": "composer" "installer": "composer"

View File

@@ -17,8 +17,8 @@
<link href="/css/theme.css" rel="stylesheet"> <link href="/css/theme.css" rel="stylesheet">
<link href="/vendor/fontawesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="/vendor/fontawesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css"> <link href="http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<script src="/vendor/jquery/dist/jquery.min.js"></script> <script src="/vendor/jquery/dist/jquery.min.js"></script>
@@ -76,9 +76,10 @@
- -
<a href="http://mnapoli.fr">Matthieu Napoli</a> <a href="http://mnapoli.fr">Matthieu Napoli</a>
- -
<a href="https://github.com/mnapoli/Maintained"><i class="fa fa-github"></i>GitHub</a> <a href="https://github.com/mnapoli/Maintained">
- <i class="fa fa-github"></i>
Supported by <a href="https://prettyci.com/" title="Continuous integration for PHP coding standards">PrettyCI</a> GitHub
</a>
- -
Theme by <a href="http://startbootstrap.com/template-overviews/freelancer/"> Theme by <a href="http://startbootstrap.com/template-overviews/freelancer/">
Start Bootstrap Start Bootstrap

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types = 1);
namespace Maintained\Application;
use DI\ContainerBuilder;
/**
* @author Matthieu Napoli <matthieu@mnapoli.fr>
*/
class Application extends \Stratify\Framework\Application
{
public function __construct()
{
$modules = [
'error-handler',
'twig',
'app',
];
parent::__construct($modules);
}
protected function configureContainerBuilder(ContainerBuilder $containerBuilder)
{
$containerBuilder->useAnnotations(true);
}
}

View File

@@ -35,12 +35,12 @@ class HomeController
'pallets/flask' => 'Flask', 'pallets/flask' => 'Flask',
'expressjs/express' => 'Express', 'expressjs/express' => 'Express',
'symfony/symfony' => 'Symfony', 'symfony/symfony' => 'Symfony',
'zendframework/zendframework' => 'Zend Framework', 'zendframework/zf2' => 'Zend Framework 2',
'laravel/framework' => 'Laravel', 'laravel/framework' => 'Laravel',
'angular/angular.js' => 'AngularJS', 'angular/angular.js' => 'AngularJS',
'meteor/meteor' => 'Meteor', 'meteor/meteor' => 'Meteor',
'facebook/react' => 'React', 'facebook/react' => 'React',
'facebook/react-native' => 'React Native', 'ariya/phantomjs' => 'PhantomJS',
'gulpjs/gulp' => 'Gulp', 'gulpjs/gulp' => 'Gulp',
'robbyrussell/oh-my-zsh' => 'Oh My Zsh', 'robbyrussell/oh-my-zsh' => 'Oh My Zsh',
]; ];

View File

@@ -36,10 +36,6 @@ class StatisticsComputer implements StatisticsProvider
'wip', 'wip',
'rfc', 'rfc',
'wishlist', 'wishlist',
'question',
'cleanup',
'discussion',
'meta',
]; ];
/** /**
@@ -54,10 +50,6 @@ class StatisticsComputer implements StatisticsProvider
'.*test.*', '.*test.*',
'.*suggestion.*', '.*suggestion.*',
'.*refactoring.*', '.*refactoring.*',
'.*question.*',
'.*cleanup.*',
'.*discussion.*',
'.*meta.*',
'(.*[\s\.-])?wip', '(.*[\s\.-])?wip',
'(.*[\s\.-])?rfc', '(.*[\s\.-])?rfc',
'(.*[\s\.-])?poc', '(.*[\s\.-])?poc',

View File

@@ -1,6 +1,5 @@
<?php <?php
use DI\ContainerBuilder;
use Maintained\Application\Controller\BadgeController; use Maintained\Application\Controller\BadgeController;
use Maintained\Application\Controller\HomeController; use Maintained\Application\Controller\HomeController;
use Maintained\Application\Controller\ProjectCheckController; use Maintained\Application\Controller\ProjectCheckController;
@@ -19,22 +18,17 @@ if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . preg_replace('#(\?.*)$
return false; return false;
} }
require_once __DIR__ . '/../.puli/GeneratedPuliFactory.php';
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
$modules = [
'error-handler',
'twig',
'app',
];
$http = pipe([ $http = pipe([
ErrorHandlerMiddleware::class, ErrorHandlerMiddleware::class,
MaintenanceMiddleware::class, MaintenanceMiddleware::class,
router([ router([
'/' => route(HomeController::class, 'home'), '/' => route(HomeController::class, 'home'),
'/check/{user}/{repository}' => route(ProjectCheckController::class, 'check-project'), '/check/{user}/{repository}' => route(ProjectCheckController::class, 'check-project'),
'/project/{user}/{repository}' => route(ProjectController::class, 'project'), '/project/{user}/{repository}' => route(ProjectController::class, 'project'),
'/badge/{badge}/{user}/{repository}.svg' => route(BadgeController::class, 'badge'), '/badge/{badge}/{user}/{repository}.svg' => route(BadgeController::class, 'badge'),
]), ]),
@@ -42,17 +36,6 @@ $http = pipe([
Error404Middleware::class, Error404Middleware::class,
]); ]);
/** @var Application $app */ $app = new Application;
$app = new class($http, $modules) extends Application
{
protected function createContainerBuilder(array $modules) : ContainerBuilder
{
$containerBuilder = parent::createContainerBuilder($modules);
$containerBuilder->useAnnotations(true);
return $containerBuilder;
}
};
ErrorHandler::register($app->getContainer()->get(LoggerInterface::class)); ErrorHandler::register($app->getContainer()->get(LoggerInterface::class));
$app->http($http)->run();
$app->runHttp();