mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-21 16:41:05 +00:00
Cleanup
This commit is contained in:
parent
0f159f8fc1
commit
6fc95673df
12 changed files with 60 additions and 91 deletions
16
.travis.yml
16
.travis.yml
|
@ -21,8 +21,6 @@ cache:
|
|||
- $HOME/.yarn-cache
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- nightly
|
||||
|
@ -38,7 +36,7 @@ env:
|
|||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.0
|
||||
- php: 7.2
|
||||
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
@ -63,14 +61,6 @@ before_script:
|
|||
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
||||
- composer self-update --no-progress
|
||||
- if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
||||
# increase swap to avoid "proc_open(): fork failed - Cannot allocate memory"
|
||||
# this should be removed when no more PHP 5 build will be defined
|
||||
- sudo swapon -s
|
||||
- sudo fallocate -l 4G /swapfile
|
||||
- sudo chmod 600 /swapfile
|
||||
- sudo mkswap /swapfile
|
||||
- sudo swapon /swapfile
|
||||
- sudo swapon -s
|
||||
|
||||
script:
|
||||
- travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
||||
|
@ -78,9 +68,7 @@ script:
|
|||
- make prepare DB=$DB
|
||||
- echo "travis_fold:end:prepare"
|
||||
|
||||
- echo "travis_fold:start:fixtures"
|
||||
- php bin/console doctrine:fixtures:load --no-interaction --env=test
|
||||
- echo "travis_fold:end:fixtures"
|
||||
- make fixtures
|
||||
|
||||
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
||||
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi;
|
||||
|
|
26
.zappr.yaml
26
.zappr.yaml
|
@ -1,26 +0,0 @@
|
|||
# see https://zappr.opensource.zalan.do/
|
||||
autobranch: false
|
||||
commit: false
|
||||
approvals:
|
||||
minimum: 1
|
||||
ignore: pr_opener
|
||||
pattern: "^(:\\+1:|👍)$"
|
||||
veto:
|
||||
pattern: "^(:\\-1:|👎)$"
|
||||
from:
|
||||
orgs:
|
||||
- wallabag
|
||||
collaborators: true
|
||||
specification:
|
||||
title:
|
||||
minimum-length:
|
||||
enabled: true
|
||||
length: 8
|
||||
body:
|
||||
minimum-length:
|
||||
enabled: true
|
||||
length: 8
|
||||
contains-url: false
|
||||
contains-issue-number: false
|
||||
template:
|
||||
differs-from-body: true
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2013-2017 Nicolas Lœuillet
|
||||
Copyright (c) 2013-current Nicolas Lœuillet
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -19,10 +19,10 @@ Then you can install wallabag by executing the following commands:
|
|||
|
||||
```
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag && make install
|
||||
cd wallabag && make install
|
||||
```
|
||||
|
||||
Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag.
|
||||
Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/virtualhosts.html) to use your wallabag.
|
||||
|
||||
# Run on YunoHost
|
||||
[![Install Wallabag with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=wallabag2)
|
||||
|
@ -30,6 +30,6 @@ Now, [configure a virtual host](https://doc.wallabag.org/en/admin/installation/v
|
|||
Wallabag app for [YunoHost](https://yunohost.org). See [here](https://github.com/YunoHost-Apps/wallabag2_ynh)
|
||||
|
||||
# License
|
||||
Copyright © 2013-2018 Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||
Copyright © 2013-current Nicolas Lœuillet <nicolas@loeuillet.org>
|
||||
This work is free. You can redistribute it and/or modify it under the
|
||||
terms of the MIT License. See the COPYING file for more details.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class AppKernel extends Kernel
|
||||
|
@ -46,18 +47,26 @@ class AppKernel extends Kernel
|
|||
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
||||
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
||||
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
||||
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||
|
||||
if ('test' === $this->getEnvironment()) {
|
||||
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
||||
}
|
||||
|
||||
if ('dev' === $this->getEnvironment()) {
|
||||
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
||||
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||
}
|
||||
}
|
||||
|
||||
return $bundles;
|
||||
}
|
||||
|
||||
public function getRootDir()
|
||||
{
|
||||
return __DIR__;
|
||||
}
|
||||
|
||||
public function getCacheDir()
|
||||
{
|
||||
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
||||
|
@ -70,7 +79,8 @@ class AppKernel extends Kernel
|
|||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
$loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
|
||||
$loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml');
|
||||
|
||||
$loader->load(function ($container) {
|
||||
if ($container->getParameter('use_webpack_dev_server')) {
|
||||
$container->loadFromExtension('framework', [
|
||||
|
@ -86,5 +96,11 @@ class AppKernel extends Kernel
|
|||
]);
|
||||
}
|
||||
});
|
||||
|
||||
$loader->load(function (ContainerBuilder $container) {
|
||||
// $container->setParameter('container.autowiring.strict_mode', true);
|
||||
// $container->setParameter('container.dumper.inline_class_loader', true);
|
||||
$container->addObjectResource($this);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Doctrine\Common\Annotations\AnnotationRegistry;
|
||||
|
||||
/**
|
||||
* @var ClassLoader
|
||||
*/
|
||||
$loader = require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||
|
||||
return $loader;
|
12
bin/console
12
bin/console
|
@ -6,19 +6,17 @@ use Symfony\Component\Console\Input\ArgvInput;
|
|||
use Symfony\Component\Debug\Debug;
|
||||
|
||||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
|
||||
// for more information
|
||||
//umask(0000);
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
/**
|
||||
* @var Composer\Autoload\ClassLoader $loader
|
||||
*/
|
||||
$loader = require __DIR__.'/../app/autoload.php';
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
$input = new ArgvInput();
|
||||
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
|
||||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
|
||||
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
|
||||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
|
||||
|
||||
if ($debug) {
|
||||
Debug::enable();
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
"jms/serializer-bundle": "~2.2",
|
||||
"nelmio/api-doc-bundle": "^2.13.2",
|
||||
"mgargano/simplehtmldom": "~1.5",
|
||||
"wallabag/tcpdf": "^6.2.15",
|
||||
"wallabag/tcpdf": "^6.2.26",
|
||||
"simplepie/simplepie": "~1.5",
|
||||
"willdurand/hateoas-bundle": "~1.3",
|
||||
"liip/theme-bundle": "^1.4.6",
|
||||
|
@ -68,7 +68,7 @@
|
|||
"friendsofsymfony/oauth-server-bundle": "^1.5.2",
|
||||
"stof/doctrine-extensions-bundle": "^1.2",
|
||||
"scheb/two-factor-bundle": "^2.14.0",
|
||||
"grandt/phpepub": "^4.0.7",
|
||||
"grandt/phpepub": "dev-master",
|
||||
"wallabag/php-mobi": "~1.0.0",
|
||||
"kphoen/rulerz-bundle": "~0.13",
|
||||
"guzzlehttp/guzzle": "^5.3.1",
|
||||
|
@ -122,18 +122,33 @@
|
|||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Wallabag\\": "src/Wallabag/" },
|
||||
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
|
||||
"psr-4": {
|
||||
"Wallabag\\": "src/Wallabag/"
|
||||
},
|
||||
"classmap": [
|
||||
"app/AppKernel.php",
|
||||
"app/AppCache.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": { "Tests\\": "tests/" }
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
},
|
||||
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin",
|
||||
"platform": {
|
||||
"php": "7.1.0"
|
||||
"php": "7.1"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
"prefer-stable": true,
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/Daniel-KM/PHPePub",
|
||||
"comment": "The most up-to-date PHPePub as of now"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="app/autoload.php"
|
||||
bootstrap="vendor/autoload.php"
|
||||
>
|
||||
|
||||
<testsuites>
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<server name="KERNEL_DIR" value="app/" />
|
||||
<server name="KERNEL_CLASS" value="AppKernel" />
|
||||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
|
||||
</php>
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Wallabag\CoreBundle\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
|
|
|
@ -2,14 +2,9 @@
|
|||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @var Composer\Autoload\ClassLoader
|
||||
*/
|
||||
$loader = require __DIR__.'/../app/autoload.php';
|
||||
include_once __DIR__.'/../var/bootstrap.php.cache';
|
||||
require __DIR__.'/../vendor/autoload.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
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Debug\Debug;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||
// read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
|
||||
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
|
||||
// for more information
|
||||
//umask(0000);
|
||||
|
||||
|
@ -12,20 +12,16 @@ use Symfony\Component\Debug\Debug;
|
|||
// Feel free to remove this, extend it, or make something more sophisticated.
|
||||
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
||||
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server')
|
||||
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'], true) || PHP_SAPI === 'cli-server')
|
||||
) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Composer\Autoload\ClassLoader $loader
|
||||
*/
|
||||
$loader = require __DIR__.'/../app/autoload.php';
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
Debug::enable();
|
||||
|
||||
$kernel = new AppKernel('dev', true);
|
||||
$kernel->loadClassCache();
|
||||
$request = Request::createFromGlobals();
|
||||
$response = $kernel->handle($request);
|
||||
$response->send();
|
||||
|
|
Loading…
Reference in a new issue