]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Cleanup
authorJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 24 Oct 2018 19:02:35 +0000 (21:02 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 28 Nov 2018 21:04:54 +0000 (22:04 +0100)
12 files changed:
.travis.yml
.zappr.yaml [deleted file]
COPYING.md
README.md
app/AppKernel.php
app/autoload.php [deleted file]
bin/console
composer.json
phpunit.xml.dist
src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php
web/app.php
web/app_dev.php

index 393063439ddf7def288d330a88467304a6d994b3..60721f61660556a9b46ec4b5e4820658725d0f02 100644 (file)
@@ -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;
diff --git a/.zappr.yaml b/.zappr.yaml
deleted file mode 100644 (file)
index f90cd80..0000000
+++ /dev/null
@@ -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
index 6be863d32ab8283476090e19ff809f66d93de578..72b9d5d0f393ef861e033288e82a2696bfb2d1db 100644 (file)
@@ -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
index 57392da2d10be75f5dc75048750e4f3e59d45517..e00c7ea061c26a68dcd6f9b3dd49fe1073e8e7ee 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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.
index 546794deb92c3724582f47757087affff38dc6e7..7d19e9abc0ee590cafb09ec0215b08a2d21c67fa 100644 (file)
@@ -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);
+        });
     }
 }
diff --git a/app/autoload.php b/app/autoload.php
deleted file mode 100644 (file)
index c5f664d..0000000
+++ /dev/null
@@ -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;
index 49247c94dc5995f095d97c30235b038800abf13f..8cef40b2c30e69ad27e362291ad00379bec98a80 100755 (executable)
@@ -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();
index 4f234861548ebf78587f778e4e17d71eabf89be6..da2bd3b98e42f6a4472dbded12d706dcb1648dfe 100644 (file)
@@ -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",
         }
     },
     "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"
+        }
+    ]
 }
index 951b5a145c5100e1cd17aa9bccdf64993a6dd66d..426a5e72064a980b86d9c18aa79fdb465615b3f3 100644 (file)
@@ -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>
 
index 7aa2409a120c0c6de2459588a671fb1a64ed9964..4a3fef3b10e398a1304604061c67c9da6a5d2f2d 100644 (file)
@@ -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;
 
index 4c2c4650e167688724cd7e79b1735b80c2a8de96..3427e133e6ad89ff87f319e2b081b3b6c08278e4 100644 (file)
@@ -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
index 8456754d561d4178778d0998ad35a466f676ed1b..57e1a433f6f56a4be7bd1bf60a516b281950f4a9 100644 (file)
@@ -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();