mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-22 09:01:01 +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
|
- $HOME/.yarn-cache
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 5.6
|
|
||||||
- 7.0
|
|
||||||
- 7.1
|
- 7.1
|
||||||
- 7.2
|
- 7.2
|
||||||
- nightly
|
- nightly
|
||||||
|
@ -38,7 +36,7 @@ env:
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- php: 7.0
|
- php: 7.2
|
||||||
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run ASSETS=build DB=sqlite
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly
|
||||||
|
@ -63,14 +61,6 @@ before_script:
|
||||||
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
||||||
- composer self-update --no-progress
|
- composer self-update --no-progress
|
||||||
- if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi;
|
- 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:
|
script:
|
||||||
- travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
- travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
||||||
|
@ -78,9 +68,7 @@ script:
|
||||||
- make prepare DB=$DB
|
- make prepare DB=$DB
|
||||||
- echo "travis_fold:end:prepare"
|
- echo "travis_fold:end:prepare"
|
||||||
|
|
||||||
- echo "travis_fold:start:fixtures"
|
- make fixtures
|
||||||
- php bin/console doctrine:fixtures:load --no-interaction --env=test
|
|
||||||
- echo "travis_fold:end:fixtures"
|
|
||||||
|
|
||||||
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v ; fi;
|
- 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;
|
- 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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -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)
|
Wallabag app for [YunoHost](https://yunohost.org). See [here](https://github.com/YunoHost-Apps/wallabag2_ynh)
|
||||||
|
|
||||||
# License
|
# 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
|
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.
|
terms of the MIT License. See the COPYING file for more details.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\HttpKernel\Kernel;
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
|
|
||||||
class AppKernel extends Kernel
|
class AppKernel extends Kernel
|
||||||
|
@ -46,18 +47,26 @@ class AppKernel extends Kernel
|
||||||
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
|
||||||
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
|
||||||
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
|
||||||
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
|
||||||
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
|
||||||
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
|
||||||
|
|
||||||
if ('test' === $this->getEnvironment()) {
|
if ('test' === $this->getEnvironment()) {
|
||||||
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ('dev' === $this->getEnvironment()) {
|
||||||
|
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
|
||||||
|
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $bundles;
|
return $bundles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRootDir()
|
||||||
|
{
|
||||||
|
return __DIR__;
|
||||||
|
}
|
||||||
|
|
||||||
public function getCacheDir()
|
public function getCacheDir()
|
||||||
{
|
{
|
||||||
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
|
||||||
|
@ -70,7 +79,8 @@ class AppKernel extends Kernel
|
||||||
|
|
||||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
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) {
|
$loader->load(function ($container) {
|
||||||
if ($container->getParameter('use_webpack_dev_server')) {
|
if ($container->getParameter('use_webpack_dev_server')) {
|
||||||
$container->loadFromExtension('framework', [
|
$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;
|
use Symfony\Component\Debug\Debug;
|
||||||
|
|
||||||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
// 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);
|
//umask(0000);
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
/**
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
* @var Composer\Autoload\ClassLoader $loader
|
|
||||||
*/
|
|
||||||
$loader = require __DIR__.'/../app/autoload.php';
|
|
||||||
|
|
||||||
$input = new ArgvInput();
|
$input = new ArgvInput();
|
||||||
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
|
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev', true);
|
||||||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
|
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption('--no-debug', true) && $env !== 'prod';
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Debug::enable();
|
Debug::enable();
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
"jms/serializer-bundle": "~2.2",
|
"jms/serializer-bundle": "~2.2",
|
||||||
"nelmio/api-doc-bundle": "^2.13.2",
|
"nelmio/api-doc-bundle": "^2.13.2",
|
||||||
"mgargano/simplehtmldom": "~1.5",
|
"mgargano/simplehtmldom": "~1.5",
|
||||||
"wallabag/tcpdf": "^6.2.15",
|
"wallabag/tcpdf": "^6.2.26",
|
||||||
"simplepie/simplepie": "~1.5",
|
"simplepie/simplepie": "~1.5",
|
||||||
"willdurand/hateoas-bundle": "~1.3",
|
"willdurand/hateoas-bundle": "~1.3",
|
||||||
"liip/theme-bundle": "^1.4.6",
|
"liip/theme-bundle": "^1.4.6",
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
"friendsofsymfony/oauth-server-bundle": "^1.5.2",
|
"friendsofsymfony/oauth-server-bundle": "^1.5.2",
|
||||||
"stof/doctrine-extensions-bundle": "^1.2",
|
"stof/doctrine-extensions-bundle": "^1.2",
|
||||||
"scheb/two-factor-bundle": "^2.14.0",
|
"scheb/two-factor-bundle": "^2.14.0",
|
||||||
"grandt/phpepub": "^4.0.7",
|
"grandt/phpepub": "dev-master",
|
||||||
"wallabag/php-mobi": "~1.0.0",
|
"wallabag/php-mobi": "~1.0.0",
|
||||||
"kphoen/rulerz-bundle": "~0.13",
|
"kphoen/rulerz-bundle": "~0.13",
|
||||||
"guzzlehttp/guzzle": "^5.3.1",
|
"guzzlehttp/guzzle": "^5.3.1",
|
||||||
|
@ -122,18 +122,33 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": { "Wallabag\\": "src/Wallabag/" },
|
"psr-4": {
|
||||||
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
|
"Wallabag\\": "src/Wallabag/"
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"app/AppKernel.php",
|
||||||
|
"app/AppCache.php"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": { "Tests\\": "tests/" }
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
},
|
||||||
|
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"bin-dir": "bin",
|
"bin-dir": "bin",
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.1.0"
|
"php": "7.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"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"
|
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
||||||
backupGlobals="false"
|
backupGlobals="false"
|
||||||
colors="true"
|
colors="true"
|
||||||
bootstrap="app/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
>
|
>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
<php>
|
<php>
|
||||||
<ini name="error_reporting" value="-1" />
|
<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" />
|
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Doctrine;
|
namespace Wallabag\CoreBundle\Doctrine;
|
||||||
|
|
||||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
|
||||||
use Doctrine\DBAL\Schema\Schema;
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
/**
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
* @var Composer\Autoload\ClassLoader
|
|
||||||
*/
|
|
||||||
$loader = require __DIR__.'/../app/autoload.php';
|
|
||||||
include_once __DIR__.'/../var/bootstrap.php.cache';
|
|
||||||
|
|
||||||
$kernel = new AppKernel('prod', false);
|
$kernel = new AppKernel('prod', false);
|
||||||
$kernel->loadClassCache();
|
|
||||||
//$kernel = new AppCache($kernel);
|
//$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
|
// 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
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\Debug\Debug;
|
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
|
// 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
|
// for more information
|
||||||
//umask(0000);
|
//umask(0000);
|
||||||
|
|
||||||
|
@ -12,20 +12,16 @@ use Symfony\Component\Debug\Debug;
|
||||||
// Feel free to remove this, extend it, or make something more sophisticated.
|
// Feel free to remove this, extend it, or make something more sophisticated.
|
||||||
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
||||||
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
|| 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');
|
header('HTTP/1.0 403 Forbidden');
|
||||||
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
* @var Composer\Autoload\ClassLoader $loader
|
|
||||||
*/
|
|
||||||
$loader = require __DIR__.'/../app/autoload.php';
|
|
||||||
Debug::enable();
|
Debug::enable();
|
||||||
|
|
||||||
$kernel = new AppKernel('dev', true);
|
$kernel = new AppKernel('dev', true);
|
||||||
$kernel->loadClassCache();
|
|
||||||
$request = Request::createFromGlobals();
|
$request = Request::createFromGlobals();
|
||||||
$response = $kernel->handle($request);
|
$response = $kernel->handle($request);
|
||||||
$response->send();
|
$response->send();
|
||||||
|
|
Loading…
Reference in a new issue