mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 01:21:03 +00:00
commit
1930c19d82
83 changed files with 1293 additions and 682 deletions
23
.gitignore
vendored
23
.gitignore
vendored
|
@ -1,25 +1,20 @@
|
||||||
# Cache and logs (Symfony2)
|
# Cache, logs & sessions
|
||||||
/app/cache/*
|
/var/*
|
||||||
/app/logs/*
|
!/var/cache
|
||||||
!app/cache/.gitkeep
|
|
||||||
!app/logs/.gitkeep
|
|
||||||
|
|
||||||
# Cache and logs (Symfony3)
|
|
||||||
/var/cache/*
|
/var/cache/*
|
||||||
/var/logs/*
|
|
||||||
!var/cache/.gitkeep
|
!var/cache/.gitkeep
|
||||||
|
!/var/logs
|
||||||
|
/var/logs/*
|
||||||
!var/logs/.gitkeep
|
!var/logs/.gitkeep
|
||||||
|
!/var/sessions
|
||||||
|
/var/sessions/*
|
||||||
|
!var/sessions/.gitkeep
|
||||||
|
!var/SymfonyRequirements.php
|
||||||
|
|
||||||
# Parameters
|
# Parameters
|
||||||
/app/config/parameters.yml
|
/app/config/parameters.yml
|
||||||
/app/config/parameters.ini
|
|
||||||
|
|
||||||
# Managed by Composer
|
# Managed by Composer
|
||||||
/app/bootstrap.php.cache
|
|
||||||
/var/bootstrap.php.cache
|
|
||||||
/bin/*
|
|
||||||
!bin/console
|
|
||||||
!bin/symfony_requirements
|
|
||||||
/vendor/
|
/vendor/
|
||||||
|
|
||||||
# Assets and user uploads
|
# Assets and user uploads
|
||||||
|
|
11
.travis.yml
11
.travis.yml
|
@ -43,17 +43,8 @@ before_script:
|
||||||
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
|
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
|
||||||
# disable xdebug since we don't use code-coverage for now
|
# disable xdebug since we don't use code-coverage for now
|
||||||
- if [[ $TRAVIS_PHP_VERSION != '5.6' && $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then phpenv config-rm xdebug.ini; fi
|
- if [[ $TRAVIS_PHP_VERSION != '5.6' && $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then phpenv config-rm xdebug.ini; fi
|
||||||
# build coverage only on one build, to speed up results feedbacks
|
|
||||||
# - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover"; else PHPUNIT_FLAGS=""; fi;
|
|
||||||
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag;' -U postgres; fi;
|
- if [[ "$DB" = "pgsql" ]]; then psql -c 'create database wallabag;' -U postgres; fi;
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ant prepare-$DB
|
- ant prepare-$DB
|
||||||
- SYMFONY_DEPRECATIONS_HELPER=weak bin/phpunit -v
|
- bin/phpunit -v
|
||||||
|
|
||||||
# after_script:
|
|
||||||
# - |
|
|
||||||
# if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
|
|
||||||
# wget https://scrutinizer-ci.com/ocular.phar
|
|
||||||
# php ocular.phar code-coverage:upload --format=php-clover coverage.clover
|
|
||||||
# fi
|
|
||||||
|
|
38
COPYING.md
38
COPYING.md
|
@ -1,19 +1,19 @@
|
||||||
Copyright (c) 2013-2015 Nicolas Lœuillet
|
Copyright (c) 2013-2016 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
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
to do so, subject to the following conditions:
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
|
@ -2,5 +2,4 @@ wallabag is mainly developed by [Nicolas Lœuillet](https://github.com/nicosomb)
|
||||||
|
|
||||||
Thank you so much to [@tcitworld](https://github.com/tcitworld) and [@j0k3r](https://github.com/j0k3r).
|
Thank you so much to [@tcitworld](https://github.com/tcitworld) and [@j0k3r](https://github.com/j0k3r).
|
||||||
|
|
||||||
Thank you [to others contributors](https://github.com/wallabag/wallabag/graphs/contributors
|
Thank you [to others contributors](https://github.com/wallabag/wallabag/graphs/contributors).
|
||||||
).
|
|
||||||
|
|
|
@ -16,12 +16,11 @@ If you don't have it yet, please [install composer](https://getcomposer.org/down
|
||||||
|
|
||||||
```
|
```
|
||||||
composer create-project wallabag/wallabag wallabag 2.0.0-alpha.1
|
composer create-project wallabag/wallabag wallabag 2.0.0-alpha.1
|
||||||
cd wallabag
|
php bin/console wallabag:install
|
||||||
php app/console wallabag:install
|
php bin/console server:run
|
||||||
php app/console server:run
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
Copyright © 2013-2015 Nicolas Lœuillet <nicolas@loeuillet.org>
|
Copyright © 2013-2016 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,7 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once __DIR__.'/AppKernel.php';
|
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
|
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
|
||||||
|
|
||||||
class AppCache extends HttpCache
|
class AppCache extends HttpCache
|
||||||
|
|
|
@ -7,7 +7,7 @@ class AppKernel extends Kernel
|
||||||
{
|
{
|
||||||
public function registerBundles()
|
public function registerBundles()
|
||||||
{
|
{
|
||||||
$bundles = array(
|
$bundles = [
|
||||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||||
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
|
||||||
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||||
|
@ -33,9 +33,9 @@ class AppKernel extends Kernel
|
||||||
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
|
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
|
||||||
new Wallabag\ImportBundle\WallabagImportBundle(),
|
new Wallabag\ImportBundle\WallabagImportBundle(),
|
||||||
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||||
);
|
];
|
||||||
|
|
||||||
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
|
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
|
||||||
$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();
|
||||||
|
@ -46,8 +46,23 @@ class AppKernel extends Kernel
|
||||||
return $bundles;
|
return $bundles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getRootDir()
|
||||||
|
{
|
||||||
|
return __DIR__;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCacheDir()
|
||||||
|
{
|
||||||
|
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLogDir()
|
||||||
|
{
|
||||||
|
return dirname(__DIR__).'/var/logs';
|
||||||
|
}
|
||||||
|
|
||||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||||
{
|
{
|
||||||
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
|
$loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,6 @@ use Composer\Autoload\ClassLoader;
|
||||||
*/
|
*/
|
||||||
$loader = require __DIR__.'/../vendor/autoload.php';
|
$loader = require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
|
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
|
|
|
@ -21,9 +21,11 @@ framework:
|
||||||
trusted_proxies: ~
|
trusted_proxies: ~
|
||||||
session:
|
session:
|
||||||
# handler_id set to null will use default session handler from php.ini
|
# handler_id set to null will use default session handler from php.ini
|
||||||
handler_id: ~
|
handler_id: session.handler.native_file
|
||||||
|
save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
|
||||||
fragments: ~
|
fragments: ~
|
||||||
http_method_override: true
|
http_method_override: true
|
||||||
|
assets: ~
|
||||||
|
|
||||||
wallabag_core:
|
wallabag_core:
|
||||||
languages:
|
languages:
|
||||||
|
@ -59,9 +61,8 @@ twig:
|
||||||
warning_message: %warning_message%
|
warning_message: %warning_message%
|
||||||
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
||||||
flattr_url: "https://flattr.com/thing/1265480"
|
flattr_url: "https://flattr.com/thing/1265480"
|
||||||
form:
|
form_themes:
|
||||||
resources:
|
- "LexikFormFilterBundle:Form:form_div_layout.html.twig"
|
||||||
- LexikFormFilterBundle:Form:form_div_layout.html.twig
|
|
||||||
|
|
||||||
# Assetic Configuration
|
# Assetic Configuration
|
||||||
assetic:
|
assetic:
|
||||||
|
@ -171,14 +172,8 @@ liip_theme:
|
||||||
autodetect_theme: wallabag_core.helper.detect_active_theme
|
autodetect_theme: wallabag_core.helper.detect_active_theme
|
||||||
|
|
||||||
path_patterns:
|
path_patterns:
|
||||||
# app_resource:
|
|
||||||
# - %%app_path%%/views/themes/%%current_theme%%/%%template%%
|
|
||||||
# - %%app_path%%/views/%%template%%
|
|
||||||
bundle_resource:
|
bundle_resource:
|
||||||
- %%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%%
|
- %%bundle_path%%/Resources/views/themes/%%current_theme%%/%%template%%
|
||||||
# bundle_resource_dir:
|
|
||||||
# - %%dir%%/views/themes/%%current_theme%%/%%bundle_name%%/%%template%%
|
|
||||||
# - %%dir%%/views/%%bundle_name%%/%%override_path%%
|
|
||||||
|
|
||||||
fos_user:
|
fos_user:
|
||||||
db_driver: orm
|
db_driver: orm
|
||||||
|
|
|
@ -17,13 +17,14 @@ monolog:
|
||||||
type: stream
|
type: stream
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
level: debug
|
level: debug
|
||||||
|
channels: [!event]
|
||||||
console:
|
console:
|
||||||
type: console
|
type: console
|
||||||
bubble: false
|
bubble: false
|
||||||
verbosity_levels:
|
verbosity_levels:
|
||||||
VERBOSITY_VERBOSE: INFO
|
VERBOSITY_VERBOSE: INFO
|
||||||
VERBOSITY_VERY_VERBOSE: DEBUG
|
VERBOSITY_VERY_VERBOSE: DEBUG
|
||||||
channels: ["!doctrine"]
|
channels: [!event, !doctrine]
|
||||||
console_very_verbose:
|
console_very_verbose:
|
||||||
type: console
|
type: console
|
||||||
bubble: false
|
bubble: false
|
||||||
|
@ -31,15 +32,7 @@ monolog:
|
||||||
VERBOSITY_VERBOSE: NOTICE
|
VERBOSITY_VERBOSE: NOTICE
|
||||||
VERBOSITY_VERY_VERBOSE: NOTICE
|
VERBOSITY_VERY_VERBOSE: NOTICE
|
||||||
VERBOSITY_DEBUG: DEBUG
|
VERBOSITY_DEBUG: DEBUG
|
||||||
channels: ["doctrine"]
|
channels: [doctrine]
|
||||||
# uncomment to get logging in your browser
|
|
||||||
# you may have to allow bigger header sizes in your Web server configuration
|
|
||||||
#firephp:
|
|
||||||
# type: firephp
|
|
||||||
# level: info
|
|
||||||
#chromephp:
|
|
||||||
# type: chromephp
|
|
||||||
# level: info
|
|
||||||
|
|
||||||
assetic:
|
assetic:
|
||||||
use_controller: true
|
use_controller: true
|
||||||
|
|
|
@ -8,7 +8,7 @@ wallabag_api:
|
||||||
prefix: /
|
prefix: /
|
||||||
|
|
||||||
app:
|
app:
|
||||||
resource: @WallabagCoreBundle/Controller/
|
resource: "@WallabagCoreBundle/Controller/"
|
||||||
type: annotation
|
type: annotation
|
||||||
|
|
||||||
doc-api:
|
doc-api:
|
||||||
|
|
|
@ -6,13 +6,9 @@ _profiler:
|
||||||
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
|
resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
|
||||||
prefix: /_profiler
|
prefix: /_profiler
|
||||||
|
|
||||||
_configurator:
|
|
||||||
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
|
|
||||||
prefix: /_configurator
|
|
||||||
|
|
||||||
_errors:
|
_errors:
|
||||||
resource: "@TwigBundle/Resources/config/routing/errors.xml"
|
resource: "@TwigBundle/Resources/config/routing/errors.xml"
|
||||||
prefix: /_error
|
prefix: /_error
|
||||||
|
|
||||||
_main:
|
_main:
|
||||||
resource: routing.yml
|
resource: routing.yml
|
||||||
|
|
|
@ -15,6 +15,11 @@ security:
|
||||||
# the main part of the security, where you can set up firewalls
|
# the main part of the security, where you can set up firewalls
|
||||||
# for specific sections of your app
|
# for specific sections of your app
|
||||||
firewalls:
|
firewalls:
|
||||||
|
# disables authentication for assets and the profiler, adapt it according to your needs
|
||||||
|
dev:
|
||||||
|
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||||
|
security: false
|
||||||
|
|
||||||
oauth_token:
|
oauth_token:
|
||||||
pattern: ^/oauth/v2/token
|
pattern: ^/oauth/v2/token
|
||||||
security: false
|
security: false
|
||||||
|
@ -33,11 +38,11 @@ security:
|
||||||
pattern: ^/
|
pattern: ^/
|
||||||
form_login:
|
form_login:
|
||||||
provider: fos_userbundle
|
provider: fos_userbundle
|
||||||
csrf_provider: security.csrf.token_manager
|
csrf_token_generator: security.csrf.token_manager
|
||||||
|
|
||||||
anonymous: true
|
anonymous: true
|
||||||
remember_me:
|
remember_me:
|
||||||
key: "%secret%"
|
secret: "%secret%"
|
||||||
lifetime: 31536000
|
lifetime: 31536000
|
||||||
path: /
|
path: /
|
||||||
domain: ~
|
domain: ~
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||||
|
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
|
// 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 http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||||
//umask(0000);
|
//umask(0000);
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
require_once __DIR__.'/bootstrap.php.cache';
|
/**
|
||||||
require_once __DIR__.'/AppKernel.php';
|
* @var Composer\Autoload\ClassLoader $loader
|
||||||
|
*/
|
||||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
$loader = require __DIR__.'/../app/autoload.php';
|
||||||
use Symfony\Component\Console\Input\ArgvInput;
|
|
||||||
use Symfony\Component\Debug\Debug;
|
|
||||||
|
|
||||||
$input = new ArgvInput();
|
$input = new ArgvInput();
|
||||||
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
|
$env = $input->getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev');
|
||||||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
|
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod';
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Debug::enable();
|
Debug::enable();
|
1
bin/doctrine
Symbolic link
1
bin/doctrine
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../vendor/doctrine/orm/bin/doctrine
|
1
bin/doctrine-dbal
Symbolic link
1
bin/doctrine-dbal
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../vendor/doctrine/dbal/bin/doctrine-dbal
|
1
bin/doctrine-migrations
Symbolic link
1
bin/doctrine-migrations
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../vendor/doctrine/migrations/bin/doctrine-migrations
|
1
bin/doctrine.php
Symbolic link
1
bin/doctrine.php
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../vendor/doctrine/orm/bin/doctrine.php
|
BIN
bin/poche.sqlite
BIN
bin/poche.sqlite
Binary file not shown.
1
bin/security-checker
Symbolic link
1
bin/security-checker
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../vendor/sensiolabs/security-checker/security-checker
|
9
app/check.php → bin/symfony_requirements
Normal file → Executable file
9
app/check.php → bin/symfony_requirements
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/SymfonyRequirements.php';
|
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
|
||||||
|
|
||||||
$lineSize = 70;
|
$lineSize = 70;
|
||||||
$symfonyRequirements = new SymfonyRequirements();
|
$symfonyRequirements = new SymfonyRequirements();
|
||||||
|
@ -80,7 +81,7 @@ function get_error_message(Requirement $requirement, $lineSize)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
|
$errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
|
||||||
$errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
|
$errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
|
||||||
|
|
||||||
return $errorMessage;
|
return $errorMessage;
|
||||||
|
@ -121,8 +122,8 @@ function echo_block($style, $title, $message)
|
||||||
echo PHP_EOL.PHP_EOL;
|
echo PHP_EOL.PHP_EOL;
|
||||||
|
|
||||||
echo_style($style, str_repeat(' ', $width).PHP_EOL);
|
echo_style($style, str_repeat(' ', $width).PHP_EOL);
|
||||||
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
|
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL);
|
||||||
echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
|
echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
|
||||||
echo_style($style, str_repeat(' ', $width).PHP_EOL);
|
echo_style($style, str_repeat(' ', $width).PHP_EOL);
|
||||||
}
|
}
|
||||||
|
|
18
build.xml
18
build.xml
|
@ -6,7 +6,7 @@
|
||||||
<target name="prepare-pgsql" depends="clean,composer,db_pgsql,prepare"/>
|
<target name="prepare-pgsql" depends="clean,composer,db_pgsql,prepare"/>
|
||||||
|
|
||||||
<target name="clean" description="Cleanup build artifacts">
|
<target name="clean" description="Cleanup build artifacts">
|
||||||
<delete dir="${basedir}/app/cache"/>
|
<delete dir="${basedir}/var/cache"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="composer" description="Install deps using Composer">
|
<target name="composer" description="Install deps using Composer">
|
||||||
|
@ -19,28 +19,28 @@
|
||||||
|
|
||||||
<target name="prepare" description="Prepare for build">
|
<target name="prepare" description="Prepare for build">
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="doctrine:database:drop"/>
|
<arg value="doctrine:database:drop"/>
|
||||||
<arg value="--force"/>
|
<arg value="--force"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="doctrine:database:create"/>
|
<arg value="doctrine:database:create"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="doctrine:schema:create"/>
|
<arg value="doctrine:schema:create"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="cache:clear"/>
|
<arg value="cache:clear"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="doctrine:fixtures:load"/>
|
<arg value="doctrine:fixtures:load"/>
|
||||||
<arg value="--no-interaction"/>
|
<arg value="--no-interaction"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="cache:clear"/>
|
<arg value="cache:clear"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="cache:clear"/>
|
<arg value="cache:clear"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
<exec executable="php">
|
<exec executable="php">
|
||||||
<arg value="${basedir}/app/console"/>
|
<arg value="${basedir}/bin/console"/>
|
||||||
<arg value="cache:clear"/>
|
<arg value="cache:clear"/>
|
||||||
<arg value="--env=test"/>
|
<arg value="--env=test"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
|
|
@ -28,35 +28,36 @@
|
||||||
"issues": "https://github.com/wallabag/wallabag/issues"
|
"issues": "https://github.com/wallabag/wallabag/issues"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.5.0",
|
"php": ">=5.5.9",
|
||||||
"symfony/symfony": "~2.7.0",
|
"symfony/symfony": "3.0.*",
|
||||||
"doctrine/orm": "~2.3",
|
"doctrine/orm": "^2.5",
|
||||||
"doctrine/doctrine-bundle": "1.5.2",
|
"doctrine/doctrine-bundle": "^1.6",
|
||||||
|
"doctrine/doctrine-cache-bundle": "^1.2",
|
||||||
"twig/extensions": "~1.0",
|
"twig/extensions": "~1.0",
|
||||||
"symfony/assetic-bundle": "~2.3",
|
"symfony/assetic-bundle": "~2.3",
|
||||||
"symfony/swiftmailer-bundle": "~2.3",
|
"symfony/swiftmailer-bundle": "^2.3",
|
||||||
"symfony/monolog-bundle": "~2.4",
|
"symfony/monolog-bundle": "^2.8",
|
||||||
"sensio/distribution-bundle": "~3.0.12",
|
"sensio/distribution-bundle": "^5.0",
|
||||||
"sensio/framework-extra-bundle": "~3.0",
|
"sensio/framework-extra-bundle": "^3.0.2",
|
||||||
"incenteev/composer-parameter-handler": "~2.0",
|
"incenteev/composer-parameter-handler": "^2.0",
|
||||||
"nelmio/cors-bundle": "~1.4.0",
|
"nelmio/cors-bundle": "~1.4.0",
|
||||||
"friendsofsymfony/rest-bundle": "~1.4",
|
"friendsofsymfony/rest-bundle": "~1.4",
|
||||||
"jms/serializer-bundle": "~0.13",
|
"jms/serializer-bundle": "~1.0",
|
||||||
"nelmio/api-doc-bundle": "~2.7",
|
"nelmio/api-doc-bundle": "~2.7",
|
||||||
"ezyang/htmlpurifier": "~4.6",
|
"ezyang/htmlpurifier": "~4.6",
|
||||||
"mgargano/simplehtmldom": "~1.5",
|
"mgargano/simplehtmldom": "~1.5",
|
||||||
"tecnickcom/tcpdf": "~6.2",
|
"tecnickcom/tcpdf": "~6.2",
|
||||||
"simplepie/simplepie": "~1.3.1",
|
"simplepie/simplepie": "~1.3.1",
|
||||||
"willdurand/hateoas-bundle": "~0.5.0",
|
"willdurand/hateoas-bundle": "~1.0",
|
||||||
"htmlawed/htmlawed": "~1.1.19",
|
"htmlawed/htmlawed": "~1.1.19",
|
||||||
"liip/theme-bundle": "~1.1.3",
|
"liip/theme-bundle": "~1.1",
|
||||||
"pagerfanta/pagerfanta": "~1.0.3",
|
"pagerfanta/pagerfanta": "~1.0.3",
|
||||||
"lexik/form-filter-bundle": "~4.0",
|
"lexik/form-filter-bundle": "~5.0",
|
||||||
"j0k3r/graby": "~1.0",
|
"j0k3r/graby": "~1.0",
|
||||||
"friendsofsymfony/user-bundle": "dev-master",
|
"friendsofsymfony/user-bundle": "dev-master",
|
||||||
"friendsofsymfony/oauth-server-bundle": "^1.4@dev",
|
"friendsofsymfony/oauth-server-bundle": "^1.5@dev",
|
||||||
"stof/doctrine-extensions-bundle": "^1.2@dev",
|
"stof/doctrine-extensions-bundle": "^1.2@dev",
|
||||||
"scheb/two-factor-bundle": "~1.4.0",
|
"scheb/two-factor-bundle": "~2.0",
|
||||||
"grandt/phpepub": "~4.0",
|
"grandt/phpepub": "~4.0",
|
||||||
"wallabag/php-mobi": "~1.0.0",
|
"wallabag/php-mobi": "~1.0.0",
|
||||||
"kphoen/rulerz-bundle": "~0.10",
|
"kphoen/rulerz-bundle": "~0.10",
|
||||||
|
@ -64,39 +65,36 @@
|
||||||
"doctrine/doctrine-migrations-bundle": "^1.0"
|
"doctrine/doctrine-migrations-bundle": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/doctrine-fixtures-bundle": "~2.2.0",
|
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||||
"sensio/generator-bundle": "~2.5",
|
"sensio/generator-bundle": "^3.0",
|
||||||
"phpunit/phpunit": "~4.4",
|
"phpunit/phpunit": "~4.4",
|
||||||
"symfony/phpunit-bridge": "~2.7.0"
|
"symfony/phpunit-bridge": "^2.7"
|
||||||
},
|
},
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "vcs",
|
|
||||||
"url": "https://github.com/wallabag/phpMobi"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-install-cmd": [
|
|
||||||
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
|
|
||||||
],
|
|
||||||
"post-update-cmd": [
|
|
||||||
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
|
|
||||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
|
|
||||||
],
|
|
||||||
"build-parameters": [
|
"build-parameters": [
|
||||||
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
|
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
|
||||||
|
],
|
||||||
|
"post-cmd": [
|
||||||
|
"@build-parameters",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
|
||||||
|
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
|
||||||
|
],
|
||||||
|
"post-install-cmd": [
|
||||||
|
"@post-cmd"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"@post-cmd"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"symfony-app-dir": "app",
|
"symfony-app-dir": "app",
|
||||||
|
"symfony-bin-dir": "bin",
|
||||||
|
"symfony-var-dir": "var",
|
||||||
"symfony-web-dir": "web",
|
"symfony-web-dir": "web",
|
||||||
|
"symfony-tests-dir": "tests",
|
||||||
"symfony-assets-install": "relative",
|
"symfony-assets-install": "relative",
|
||||||
"incenteev-parameters": {
|
"incenteev-parameters": {
|
||||||
"file": "app/config/parameters.yml",
|
"file": "app/config/parameters.yml",
|
||||||
|
@ -109,7 +107,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": { "": "src/" }
|
"psr-4": { "": "src/" },
|
||||||
|
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"bin-dir": "bin"
|
"bin-dir": "bin"
|
||||||
|
|
1249
composer.lock
generated
1249
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -9,32 +9,27 @@
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false"
|
stopOnFailure="false"
|
||||||
syntaxCheck="false"
|
syntaxCheck="false"
|
||||||
bootstrap="app/bootstrap.php.cache"
|
bootstrap="app/autoload.php"
|
||||||
>
|
>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="wallabag Test Suite">
|
<testsuite name="wallabag Test Suite">
|
||||||
<directory>./src/Wallabag/*Bundle/Tests</directory>
|
<directory>src/Wallabag/*Bundle/Tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<php>
|
<php>
|
||||||
<server name="KERNEL_DIR" value="./app/" />
|
<server name="KERNEL_DIR" value="app/" />
|
||||||
<!--
|
|
||||||
Avoid tests to fail because of deprecated stuff
|
|
||||||
see: http://symfony.com/doc/current/cookbook/upgrade/major_version.html#deprecations-in-phpunit
|
|
||||||
-->
|
|
||||||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
|
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist>
|
<whitelist>
|
||||||
<directory>./src</directory>
|
<directory>src</directory>
|
||||||
<exclude>
|
<exclude>
|
||||||
<directory>./vendor</directory>
|
<directory>vendor</directory>
|
||||||
<directory>./src/Wallabag/*Bundle/Resources</directory>
|
<directory>src/Wallabag/*Bundle/Resources</directory>
|
||||||
<directory>./src/Wallabag/*Bundle/Tests</directory>
|
<directory>src/Wallabag/*Bundle/Tests</directory>
|
||||||
<directory>./src/Wallabag/*Bundle/DataFixtures</directory>
|
<directory>src/Wallabag/*Bundle/DataFixtures</directory>
|
||||||
</exclude>
|
</exclude>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
namespace Wallabag\ApiBundle\Controller;
|
namespace Wallabag\ApiBundle\Controller;
|
||||||
|
|
||||||
use FOS\RestBundle\Controller\FOSRestController;
|
use FOS\RestBundle\Controller\FOSRestController;
|
||||||
|
use Hateoas\Configuration\Route;
|
||||||
|
use Hateoas\Representation\Factory\PagerfantaFactory;
|
||||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\CoreBundle\Entity\Tag;
|
use Wallabag\CoreBundle\Entity\Tag;
|
||||||
use Hateoas\Configuration\Route;
|
|
||||||
use Hateoas\Representation\Factory\PagerfantaFactory;
|
|
||||||
|
|
||||||
class WallabagRestController extends FOSRestController
|
class WallabagRestController extends FOSRestController
|
||||||
{
|
{
|
||||||
|
@ -84,7 +85,7 @@ class WallabagRestController extends FOSRestController
|
||||||
$pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
|
$pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
|
||||||
$paginatedCollection = $pagerfantaFactory->createRepresentation(
|
$paginatedCollection = $pagerfantaFactory->createRepresentation(
|
||||||
$pager,
|
$pager,
|
||||||
new Route('api_get_entries', [], $absolute = true)
|
new Route('api_get_entries', [], UrlGeneratorInterface::ABSOLUTE_URL)
|
||||||
);
|
);
|
||||||
|
|
||||||
$json = $this->get('serializer')->serialize($paginatedCollection, 'json');
|
$json = $this->get('serializer')->serialize($paginatedCollection, 'json');
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\ApiBundle\Entity;
|
namespace Wallabag\ApiBundle\Entity;
|
||||||
|
|
||||||
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table("oauth2_access_tokens")
|
* @ORM\Table("oauth2_access_tokens")
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\ApiBundle\Entity;
|
namespace Wallabag\ApiBundle\Entity;
|
||||||
|
|
||||||
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table("oauth2_auth_codes")
|
* @ORM\Table("oauth2_auth_codes")
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\ApiBundle\Entity;
|
namespace Wallabag\ApiBundle\Entity;
|
||||||
|
|
||||||
use FOS\OAuthServerBundle\Entity\Client as BaseClient;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use FOS\OAuthServerBundle\Entity\Client as BaseClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table("oauth2_clients")
|
* @ORM\Table("oauth2_clients")
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\ApiBundle\Entity;
|
namespace Wallabag\ApiBundle\Entity;
|
||||||
|
|
||||||
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Table("oauth2_refresh_tokens")
|
* @ORM\Table("oauth2_refresh_tokens")
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
namespace Wallabag\CoreBundle\Command;
|
namespace Wallabag\CoreBundle\Command;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
||||||
|
use Symfony\Component\Console\Helper\Table;
|
||||||
|
use Symfony\Component\Console\Input\ArrayInput;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
|
||||||
use Symfony\Component\Console\Output\NullOutput;
|
use Symfony\Component\Console\Output\NullOutput;
|
||||||
use Symfony\Component\Console\Question\Question;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
||||||
use Symfony\Component\Console\Helper\Table;
|
use Symfony\Component\Console\Question\Question;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
|
|
||||||
class InstallCommand extends ContainerAwareCommand
|
class InstallCommand extends ContainerAwareCommand
|
||||||
|
@ -55,7 +55,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||||
;
|
;
|
||||||
|
|
||||||
$output->writeln('<info>Wallabag has been successfully installed.</info>');
|
$output->writeln('<info>Wallabag has been successfully installed.</info>');
|
||||||
$output->writeln('<comment>Just execute `php app/console server:run` for using wallabag: http://localhost:8000</comment>');
|
$output->writeln('<comment>Just execute `php bin/console server:run` for using wallabag: http://localhost:8000</comment>');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkRequirements()
|
protected function checkRequirements()
|
||||||
|
|
|
@ -4,17 +4,18 @@ namespace Wallabag\CoreBundle\Controller;
|
||||||
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\CoreBundle\Form\Type\ConfigType;
|
||||||
use Wallabag\CoreBundle\Form\Type\ChangePasswordType;
|
use Wallabag\CoreBundle\Form\Type\ChangePasswordType;
|
||||||
use Wallabag\CoreBundle\Form\Type\UserInformationType;
|
|
||||||
use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
|
|
||||||
use Wallabag\CoreBundle\Form\Type\NewUserType;
|
use Wallabag\CoreBundle\Form\Type\NewUserType;
|
||||||
use Wallabag\CoreBundle\Form\Type\RssType;
|
use Wallabag\CoreBundle\Form\Type\RssType;
|
||||||
|
use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
|
||||||
|
use Wallabag\CoreBundle\Form\Type\UserInformationType;
|
||||||
use Wallabag\CoreBundle\Tools\Utils;
|
use Wallabag\CoreBundle\Tools\Utils;
|
||||||
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class ConfigController extends Controller
|
class ConfigController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -31,7 +32,7 @@ class ConfigController extends Controller
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
|
|
||||||
// handle basic config detail (this form is defined as a service)
|
// handle basic config detail (this form is defined as a service)
|
||||||
$configForm = $this->createForm('config', $config, array('action' => $this->generateUrl('config')));
|
$configForm = $this->createForm(ConfigType::class, $config, array('action' => $this->generateUrl('config')));
|
||||||
$configForm->handleRequest($request);
|
$configForm->handleRequest($request);
|
||||||
|
|
||||||
if ($configForm->isValid()) {
|
if ($configForm->isValid()) {
|
||||||
|
@ -51,7 +52,7 @@ class ConfigController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle changing password
|
// handle changing password
|
||||||
$pwdForm = $this->createForm(new ChangePasswordType(), null, array('action' => $this->generateUrl('config').'#set4'));
|
$pwdForm = $this->createForm(ChangePasswordType::class, null, array('action' => $this->generateUrl('config').'#set4'));
|
||||||
$pwdForm->handleRequest($request);
|
$pwdForm->handleRequest($request);
|
||||||
|
|
||||||
if ($pwdForm->isValid()) {
|
if ($pwdForm->isValid()) {
|
||||||
|
@ -67,7 +68,7 @@ class ConfigController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle changing user information
|
// handle changing user information
|
||||||
$userForm = $this->createForm(new UserInformationType(), $user, array(
|
$userForm = $this->createForm(UserInformationType::class, $user, array(
|
||||||
'validation_groups' => array('Profile'),
|
'validation_groups' => array('Profile'),
|
||||||
'action' => $this->generateUrl('config').'#set3',
|
'action' => $this->generateUrl('config').'#set3',
|
||||||
));
|
));
|
||||||
|
@ -85,7 +86,7 @@ class ConfigController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle rss information
|
// handle rss information
|
||||||
$rssForm = $this->createForm(new RssType(), $config, array('action' => $this->generateUrl('config').'#set2'));
|
$rssForm = $this->createForm(RssType::class, $config, array('action' => $this->generateUrl('config').'#set2'));
|
||||||
$rssForm->handleRequest($request);
|
$rssForm->handleRequest($request);
|
||||||
|
|
||||||
if ($rssForm->isValid()) {
|
if ($rssForm->isValid()) {
|
||||||
|
@ -102,7 +103,7 @@ class ConfigController extends Controller
|
||||||
|
|
||||||
// handle tagging rule
|
// handle tagging rule
|
||||||
$taggingRule = new TaggingRule();
|
$taggingRule = new TaggingRule();
|
||||||
$newTaggingRule = $this->createForm(new TaggingRuleType(), $taggingRule, array('action' => $this->generateUrl('config').'#set5'));
|
$newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, array('action' => $this->generateUrl('config').'#set5'));
|
||||||
$newTaggingRule->handleRequest($request);
|
$newTaggingRule->handleRequest($request);
|
||||||
|
|
||||||
if ($newTaggingRule->isValid()) {
|
if ($newTaggingRule->isValid()) {
|
||||||
|
@ -122,7 +123,7 @@ class ConfigController extends Controller
|
||||||
$newUser = $userManager->createUser();
|
$newUser = $userManager->createUser();
|
||||||
// enable created user by default
|
// enable created user by default
|
||||||
$newUser->setEnabled(true);
|
$newUser->setEnabled(true);
|
||||||
$newUserForm = $this->createForm(new NewUserType(), $newUser, array(
|
$newUserForm = $this->createForm(NewUserType::class, $newUser, array(
|
||||||
'validation_groups' => array('Profile'),
|
'validation_groups' => array('Profile'),
|
||||||
'action' => $this->generateUrl('config').'#set5',
|
'action' => $this->generateUrl('config').'#set5',
|
||||||
));
|
));
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Controller;
|
namespace Wallabag\CoreBundle\Controller;
|
||||||
|
|
||||||
|
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||||
|
use Pagerfanta\Pagerfanta;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\CoreBundle\Form\Type\NewEntryType;
|
|
||||||
use Wallabag\CoreBundle\Form\Type\EditEntryType;
|
|
||||||
use Wallabag\CoreBundle\Filter\EntryFilterType;
|
use Wallabag\CoreBundle\Filter\EntryFilterType;
|
||||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
use Wallabag\CoreBundle\Form\Type\EditEntryType;
|
||||||
use Pagerfanta\Pagerfanta;
|
use Wallabag\CoreBundle\Form\Type\NewEntryType;
|
||||||
|
|
||||||
class EntryController extends Controller
|
class EntryController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ class EntryController extends Controller
|
||||||
{
|
{
|
||||||
$entry = new Entry($this->getUser());
|
$entry = new Entry($this->getUser());
|
||||||
|
|
||||||
$form = $this->createForm(new NewEntryType(), $entry);
|
$form = $this->createForm(NewEntryType::class, $entry);
|
||||||
|
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ class EntryController extends Controller
|
||||||
{
|
{
|
||||||
$this->checkUserAction($entry);
|
$this->checkUserAction($entry);
|
||||||
|
|
||||||
$form = $this->createForm(new EditEntryType(), $entry);
|
$form = $this->createForm(EditEntryType::class, $entry);
|
||||||
|
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ class EntryController extends Controller
|
||||||
throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type));
|
throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type));
|
||||||
}
|
}
|
||||||
|
|
||||||
$form = $this->get('form.factory')->create(new EntryFilterType($repository, $this->getUser()));
|
$form = $this->createForm(EntryFilterType::class);
|
||||||
|
|
||||||
if ($request->query->has($form->getName())) {
|
if ($request->query->has($form->getName())) {
|
||||||
// manually bind values from the request
|
// manually bind values from the request
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Controller;
|
namespace Wallabag\CoreBundle\Controller;
|
||||||
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
||||||
use Wallabag\UserBundle\Entity\User;
|
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
|
||||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||||
use Pagerfanta\Pagerfanta;
|
use Pagerfanta\Pagerfanta;
|
||||||
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||||
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class RssController extends Controller
|
class RssController extends Controller
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,9 +5,9 @@ namespace Wallabag\CoreBundle\Controller;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Wallabag\CoreBundle\Form\Type\NewTagType;
|
|
||||||
use Wallabag\CoreBundle\Entity\Tag;
|
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
|
use Wallabag\CoreBundle\Entity\Tag;
|
||||||
|
use Wallabag\CoreBundle\Form\Type\NewTagType;
|
||||||
|
|
||||||
class TagController extends Controller
|
class TagController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ class TagController extends Controller
|
||||||
public function addTagFormAction(Request $request, Entry $entry)
|
public function addTagFormAction(Request $request, Entry $entry)
|
||||||
{
|
{
|
||||||
$tag = new Tag();
|
$tag = new Tag();
|
||||||
$form = $this->createForm(new NewTagType(), $tag);
|
$form = $this->createForm(NewTagType::class, $tag);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isValid()) {
|
if ($form->isValid()) {
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\DependencyInjection;
|
namespace Wallabag\CoreBundle\DependencyInjection;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\DependencyInjection\Loader;
|
use Symfony\Component\DependencyInjection\Loader;
|
||||||
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
|
|
||||||
class WallabagCoreExtension extends Extension
|
class WallabagCoreExtension extends Extension
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,10 @@ namespace Wallabag\CoreBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
|
||||||
use Hateoas\Configuration\Annotation as Hateoas;
|
use Hateoas\Configuration\Annotation as Hateoas;
|
||||||
use JMS\Serializer\Annotation\Groups;
|
use JMS\Serializer\Annotation\Groups;
|
||||||
use JMS\Serializer\Annotation\XmlRoot;
|
use JMS\Serializer\Annotation\XmlRoot;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Entity;
|
namespace Wallabag\CoreBundle\Entity;
|
||||||
|
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use JMS\Serializer\Annotation\XmlRoot;
|
|
||||||
use JMS\Serializer\Annotation\ExclusionPolicy;
|
use JMS\Serializer\Annotation\ExclusionPolicy;
|
||||||
use JMS\Serializer\Annotation\Expose;
|
use JMS\Serializer\Annotation\Expose;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
|
||||||
use Gedmo\Mapping\Annotation as Gedmo;
|
use Gedmo\Mapping\Annotation as Gedmo;
|
||||||
|
use JMS\Serializer\Annotation\XmlRoot;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag.
|
* Tag.
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
namespace Wallabag\CoreBundle\Entity;
|
namespace Wallabag\CoreBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
|
||||||
use KPhoen\RulerZBundle\Validator\Constraints as RulerZAssert;
|
use KPhoen\RulerZBundle\Validator\Constraints as RulerZAssert;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tagging rule.
|
* Tagging rule.
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Event\Subscriber;
|
namespace Wallabag\CoreBundle\Event\Subscriber;
|
||||||
|
|
||||||
use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber;
|
|
||||||
use Lexik\Bundle\FormFilterBundle\Event\GetFilterConditionEvent;
|
use Lexik\Bundle\FormFilterBundle\Event\GetFilterConditionEvent;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Event\Subscriber\DoctrineORMSubscriber;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\EventListener;
|
namespace Wallabag\CoreBundle\EventListener;
|
||||||
|
|
||||||
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html
|
* @see http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\EventListener;
|
namespace Wallabag\CoreBundle\EventListener;
|
||||||
|
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|
||||||
use Doctrine\ORM\EntityManager;
|
use Doctrine\ORM\EntityManager;
|
||||||
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
||||||
use FOS\UserBundle\FOSUserEvents;
|
use FOS\UserBundle\FOSUserEvents;
|
||||||
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||||
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
|
|
||||||
class RegistrationConfirmedListener implements EventSubscriberInterface
|
class RegistrationConfirmedListener implements EventSubscriberInterface
|
||||||
|
|
|
@ -2,12 +2,17 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Filter;
|
namespace Wallabag\CoreBundle\Filter;
|
||||||
|
|
||||||
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberRangeFilterType;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\DateRangeFilterType;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType;
|
||||||
|
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
|
||||||
use Doctrine\ORM\EntityRepository;
|
|
||||||
use Wallabag\UserBundle\Entity\User;
|
|
||||||
|
|
||||||
class EntryFilterType extends AbstractType
|
class EntryFilterType extends AbstractType
|
||||||
{
|
{
|
||||||
|
@ -18,19 +23,19 @@ class EntryFilterType extends AbstractType
|
||||||
* Repository & user are used to get a list of language entries for this user.
|
* Repository & user are used to get a list of language entries for this user.
|
||||||
*
|
*
|
||||||
* @param EntityRepository $entryRepository
|
* @param EntityRepository $entryRepository
|
||||||
* @param User $user
|
* @param TokenStorage $token
|
||||||
*/
|
*/
|
||||||
public function __construct(EntityRepository $entryRepository, User $user)
|
public function __construct(EntityRepository $entryRepository, TokenStorage $token)
|
||||||
{
|
{
|
||||||
$this->repository = $entryRepository;
|
$this->repository = $entryRepository;
|
||||||
$this->user = $user;
|
$this->user = $token->getToken()->getUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('readingTime', 'filter_number_range')
|
->add('readingTime', NumberRangeFilterType::class)
|
||||||
->add('createdAt', 'filter_date_range', array(
|
->add('createdAt', DateRangeFilterType::class, array(
|
||||||
'left_date_options' => array(
|
'left_date_options' => array(
|
||||||
'attr' => array(
|
'attr' => array(
|
||||||
'placeholder' => 'dd/mm/yyyy',
|
'placeholder' => 'dd/mm/yyyy',
|
||||||
|
@ -47,20 +52,20 @@ class EntryFilterType extends AbstractType
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
->add('domainName', 'filter_text', array(
|
->add('domainName', TextFilterType::class, array(
|
||||||
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
||||||
$value = $values['value'];
|
$value = $values['value'];
|
||||||
if (strlen($value) <= 2 || empty($value)) {
|
if (strlen($value) <= 2 || empty($value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%'));
|
$expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%'));
|
||||||
|
|
||||||
return $filterQuery->createCondition($expression);
|
return $filterQuery->createCondition($expression);
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
->add('isArchived', 'filter_checkbox')
|
->add('isArchived', CheckboxFilterType::class)
|
||||||
->add('isStarred', 'filter_checkbox')
|
->add('isStarred', CheckboxFilterType::class)
|
||||||
->add('previewPicture', 'filter_checkbox', array(
|
->add('previewPicture', CheckboxFilterType::class, array(
|
||||||
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
||||||
if (false === $values['value']) {
|
if (false === $values['value']) {
|
||||||
return;
|
return;
|
||||||
|
@ -71,13 +76,14 @@ class EntryFilterType extends AbstractType
|
||||||
return $filterQuery->createCondition($expression);
|
return $filterQuery->createCondition($expression);
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
->add('language', 'filter_choice', array(
|
->add('language', ChoiceFilterType::class, array(
|
||||||
'choices' => $this->repository->findDistinctLanguageByUser($this->user->getId()),
|
'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())),
|
||||||
|
'choices_as_values' => true,
|
||||||
))
|
))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'entry_filter';
|
return 'entry_filter';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
|
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
|
||||||
use Symfony\Component\Validator\Constraints;
|
use Symfony\Component\Validator\Constraints;
|
||||||
|
@ -12,11 +15,11 @@ class ChangePasswordType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('old_password', 'password', array(
|
->add('old_password', PasswordType::class, array(
|
||||||
'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')),
|
'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')),
|
||||||
))
|
))
|
||||||
->add('new_password', 'repeated', array(
|
->add('new_password', RepeatedType::class, array(
|
||||||
'type' => 'password',
|
'type' => PasswordType::class,
|
||||||
'invalid_message' => 'The password fields must match.',
|
'invalid_message' => 'The password fields must match.',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'first_options' => array('label' => 'New password'),
|
'first_options' => array('label' => 'New password'),
|
||||||
|
@ -29,11 +32,11 @@ class ChangePasswordType extends AbstractType
|
||||||
new Constraints\NotBlank(),
|
new Constraints\NotBlank(),
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'change_passwd';
|
return 'change_passwd';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
@ -28,15 +30,16 @@ class ConfigType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('theme', 'choice', array(
|
->add('theme', ChoiceType::class, array(
|
||||||
'choices' => array_flip($this->themes),
|
'choices' => array_flip($this->themes),
|
||||||
'choices_as_values' => true,
|
'choices_as_values' => true,
|
||||||
))
|
))
|
||||||
->add('items_per_page')
|
->add('items_per_page')
|
||||||
->add('language', 'choice', array(
|
->add('language', ChoiceType::class, array(
|
||||||
'choices' => $this->languages,
|
'choices' => array_flip($this->languages),
|
||||||
|
'choices_as_values' => true,
|
||||||
))
|
))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +50,7 @@ class ConfigType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'config';
|
return 'config';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
@ -11,14 +14,14 @@ class EditEntryType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('title', 'text', array('required' => true))
|
->add('title', TextType::class, array('required' => true))
|
||||||
->add('is_public', 'checkbox', array('required' => false))
|
->add('is_public', CheckboxType::class, array('required' => false))
|
||||||
// @todo: add autocomplete
|
// @todo: add autocomplete
|
||||||
// ->add('tags', 'entity', array(
|
// ->add('tags', 'entity', array(
|
||||||
// 'class' => 'Wallabag\CoreBundle\Entity\Tag',
|
// 'class' => 'Wallabag\CoreBundle\Entity\Tag',
|
||||||
// 'choice_translation_domain' => true,
|
// 'choice_translation_domain' => true,
|
||||||
// ))
|
// ))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +32,7 @@ class EditEntryType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'entry';
|
return 'entry';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
@ -11,8 +13,8 @@ class NewEntryType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('url', 'url', array('required' => true))
|
->add('url', UrlType::class, array('required' => true))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +25,7 @@ class NewEntryType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'entry';
|
return 'entry';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
@ -11,8 +13,8 @@ class NewTagType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('label', 'text', array('required' => true))
|
->add('label', TextType::class, array('required' => true))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +25,7 @@ class NewTagType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'tag';
|
return 'tag';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Symfony\Component\Validator\Constraints;
|
use Symfony\Component\Validator\Constraints;
|
||||||
|
@ -12,9 +17,9 @@ class NewUserType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('username', 'text', array('required' => true))
|
->add('username', TextType::class, array('required' => true))
|
||||||
->add('plainPassword', 'repeated', array(
|
->add('plainPassword', RepeatedType::class, array(
|
||||||
'type' => 'password',
|
'type' => PasswordType::class,
|
||||||
'constraints' => array(
|
'constraints' => array(
|
||||||
new Constraints\Length(array(
|
new Constraints\Length(array(
|
||||||
'min' => 8,
|
'min' => 8,
|
||||||
|
@ -23,8 +28,8 @@ class NewUserType extends AbstractType
|
||||||
new Constraints\NotBlank(),
|
new Constraints\NotBlank(),
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
->add('email', 'email')
|
->add('email', EmailType::class)
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +40,7 @@ class NewUserType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'new_user';
|
return 'new_user';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@ class RssType extends AbstractType
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('rss_limit')
|
->add('rss_limit')
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ class RssType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'rss_config';
|
return 'rss_config';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
|
use Wallabag\CoreBundle\Form\DataTransformer\StringToListTransformer;
|
||||||
|
@ -12,12 +14,12 @@ class TaggingRuleType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('rule', 'text', array('required' => true))
|
->add('rule', TextType::class, array('required' => true))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
|
|
||||||
$tagsField = $builder
|
$tagsField = $builder
|
||||||
->create('tags', 'text')
|
->create('tags', TextType::class)
|
||||||
->addModelTransformer(new StringToListTransformer(','));
|
->addModelTransformer(new StringToListTransformer(','));
|
||||||
|
|
||||||
$builder->add($tagsField);
|
$builder->add($tagsField);
|
||||||
|
@ -30,7 +32,7 @@ class TaggingRuleType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'tagging_rule';
|
return 'tagging_rule';
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
namespace Wallabag\CoreBundle\Form\Type;
|
namespace Wallabag\CoreBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
@ -11,10 +15,10 @@ class UserInformationType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('name', 'text')
|
->add('name', TextType::class)
|
||||||
->add('email', 'email')
|
->add('email', EmailType::class)
|
||||||
->add('twoFactorAuthentication', 'checkbox', array('required' => false))
|
->add('twoFactorAuthentication', CheckboxType::class, array('required' => false))
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
->remove('username')
|
->remove('username')
|
||||||
->remove('plainPassword')
|
->remove('plainPassword')
|
||||||
;
|
;
|
||||||
|
@ -22,7 +26,7 @@ class UserInformationType extends AbstractType
|
||||||
|
|
||||||
public function getParent()
|
public function getParent()
|
||||||
{
|
{
|
||||||
return 'fos_user_registration';
|
return 'FOS\UserBundle\Form\Type\RegistrationFormType';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
@ -32,7 +36,7 @@ class UserInformationType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'update_user';
|
return 'update_user';
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Helper;
|
namespace Wallabag\CoreBundle\Helper;
|
||||||
|
|
||||||
|
use JMS\Serializer;
|
||||||
|
use JMS\Serializer\SerializationContext;
|
||||||
|
use JMS\Serializer\SerializerBuilder;
|
||||||
use PHPePub\Core\EPub;
|
use PHPePub\Core\EPub;
|
||||||
use PHPePub\Core\Structure\OPF\DublinCore;
|
use PHPePub\Core\Structure\OPF\DublinCore;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use JMS\Serializer;
|
|
||||||
use JMS\Serializer\SerializerBuilder;
|
|
||||||
use JMS\Serializer\SerializationContext;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest.
|
* This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest.
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\ParamConverter;
|
namespace Wallabag\CoreBundle\ParamConverter;
|
||||||
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
|
|
||||||
use Doctrine\Common\Persistence\ManagerRegistry;
|
use Doctrine\Common\Persistence\ManagerRegistry;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||||
|
use Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
|
@ -2,7 +2,7 @@ services:
|
||||||
wallabag_core.helper.detect_active_theme:
|
wallabag_core.helper.detect_active_theme:
|
||||||
class: Wallabag\CoreBundle\Helper\DetectActiveTheme
|
class: Wallabag\CoreBundle\Helper\DetectActiveTheme
|
||||||
arguments:
|
arguments:
|
||||||
- @security.token_storage
|
- "@security.token_storage"
|
||||||
- %theme% # default theme from parameters.yml
|
- %theme% # default theme from parameters.yml
|
||||||
|
|
||||||
# custom form type
|
# custom form type
|
||||||
|
@ -12,26 +12,22 @@ services:
|
||||||
- %liip_theme.themes%
|
- %liip_theme.themes%
|
||||||
- %wallabag_core.languages%
|
- %wallabag_core.languages%
|
||||||
tags:
|
tags:
|
||||||
- { name: form.type, alias: config }
|
- { name: form.type }
|
||||||
|
|
||||||
wallabag_core.form.registration:
|
wallabag_core.filter.type.entry:
|
||||||
class: Wallabag\CoreBundle\Form\Type\RegistrationType
|
class: Wallabag\CoreBundle\Filter\EntryFilterType
|
||||||
tags:
|
|
||||||
- { name: form.type, alias: wallabag_user_registration }
|
|
||||||
|
|
||||||
wallabag_core.form.type.forgot_password:
|
|
||||||
class: Wallabag\CoreBundle\Form\Type\ForgotPasswordType
|
|
||||||
arguments:
|
arguments:
|
||||||
- @doctrine
|
- "@wallabag_core.entry_repository"
|
||||||
|
- "@security.token_storage"
|
||||||
tags:
|
tags:
|
||||||
- { name: form.type, alias: forgot_password }
|
- { name: form.type }
|
||||||
|
|
||||||
wallabag_core.param_converter.username_rsstoken_converter:
|
wallabag_core.param_converter.username_rsstoken_converter:
|
||||||
class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter
|
class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter
|
||||||
tags:
|
tags:
|
||||||
- { name: request.param_converter, converter: username_rsstoken_converter }
|
- { name: request.param_converter, converter: username_rsstoken_converter }
|
||||||
arguments:
|
arguments:
|
||||||
- @doctrine
|
- "@doctrine"
|
||||||
|
|
||||||
wallabag_core.table_prefix_subscriber:
|
wallabag_core.table_prefix_subscriber:
|
||||||
class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
|
class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
|
||||||
|
@ -45,41 +41,41 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- { error_message: false }
|
- { error_message: false }
|
||||||
calls:
|
calls:
|
||||||
- [ setLogger, [ @logger ] ]
|
- [ setLogger, [ "@logger" ] ]
|
||||||
tags:
|
tags:
|
||||||
- { name: monolog.logger, channel: graby }
|
- { name: monolog.logger, channel: graby }
|
||||||
|
|
||||||
wallabag_core.content_proxy:
|
wallabag_core.content_proxy:
|
||||||
class: Wallabag\CoreBundle\Helper\ContentProxy
|
class: Wallabag\CoreBundle\Helper\ContentProxy
|
||||||
arguments:
|
arguments:
|
||||||
- @wallabag_core.graby
|
- "@wallabag_core.graby"
|
||||||
- @wallabag_core.rule_based_tagger
|
- "@wallabag_core.rule_based_tagger"
|
||||||
- @logger
|
- "@logger"
|
||||||
|
|
||||||
wallabag_core.rule_based_tagger:
|
wallabag_core.rule_based_tagger:
|
||||||
class: Wallabag\CoreBundle\Helper\RuleBasedTagger
|
class: Wallabag\CoreBundle\Helper\RuleBasedTagger
|
||||||
arguments:
|
arguments:
|
||||||
- @rulerz
|
- "@rulerz"
|
||||||
- @wallabag_core.tag_repository
|
- "@wallabag_core.tag_repository"
|
||||||
- @wallabag_core.entry_repository
|
- "@wallabag_core.entry_repository"
|
||||||
|
|
||||||
# repository as a service
|
# repository as a service
|
||||||
wallabag_core.entry_repository:
|
wallabag_core.entry_repository:
|
||||||
class: Wallabag\CoreBundle\Repository\EntryRepository
|
class: Wallabag\CoreBundle\Repository\EntryRepository
|
||||||
factory: [ @doctrine.orm.default_entity_manager, getRepository ]
|
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||||
arguments:
|
arguments:
|
||||||
- WallabagCoreBundle:Entry
|
- WallabagCoreBundle:Entry
|
||||||
|
|
||||||
wallabag_core.tag_repository:
|
wallabag_core.tag_repository:
|
||||||
class: Wallabag\CoreBundle\Repository\TagRepository
|
class: Wallabag\CoreBundle\Repository\TagRepository
|
||||||
factory: [ @doctrine.orm.default_entity_manager, getRepository ]
|
factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
|
||||||
arguments:
|
arguments:
|
||||||
- WallabagCoreBundle:Tag
|
- WallabagCoreBundle:Tag
|
||||||
|
|
||||||
wallabag_core.registration_confirmed:
|
wallabag_core.registration_confirmed:
|
||||||
class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
|
class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
|
||||||
arguments:
|
arguments:
|
||||||
- @doctrine.orm.entity_manager
|
- "@doctrine.orm.entity_manager"
|
||||||
- %theme%
|
- %theme%
|
||||||
- %items_on_page%
|
- %items_on_page%
|
||||||
- %rss_limit%
|
- %rss_limit%
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<form action="{{ path('config') }}" method="post" {{ form_enctype(form.new_tagging_rule) }}>
|
{{ form_start(form.new_tagging_rule) }}
|
||||||
{{ form_errors(form.new_tagging_rule) }}
|
{{ form_errors(form.new_tagging_rule) }}
|
||||||
|
|
||||||
<fieldset class="w500p inline">
|
<fieldset class="w500p inline">
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Subscriber;
|
namespace Wallabag\CoreBundle\Subscriber;
|
||||||
|
|
||||||
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
|
||||||
use Doctrine\Common\EventSubscriber;
|
use Doctrine\Common\EventSubscriber;
|
||||||
|
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||||
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
use Doctrine\ORM\Mapping\ClassMetadataInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\Command;
|
namespace Wallabag\CoreBundle\Tests\Command;
|
||||||
|
|
||||||
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
|
use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
|
||||||
use Wallabag\CoreBundle\Command\InstallCommand;
|
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
|
||||||
use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||||
use Symfony\Component\Console\Tester\CommandTester;
|
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
use Symfony\Component\Console\Input\ArrayInput;
|
||||||
use Symfony\Component\Console\Output\NullOutput;
|
use Symfony\Component\Console\Output\NullOutput;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
|
use Symfony\Component\Console\Tester\CommandTester;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
|
use Wallabag\CoreBundle\Command\InstallCommand;
|
||||||
|
use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
|
||||||
|
use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
|
||||||
|
|
||||||
class InstallCommandTest extends WallabagCoreTestCase
|
class InstallCommandTest extends WallabagCoreTestCase
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,11 @@ namespace Wallabag\CoreBundle\Tests\EventListener;
|
||||||
|
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
|
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
use Symfony\Component\HttpFoundation\Session\Session;
|
|
||||||
use Wallabag\CoreBundle\EventListener\LocaleListener;
|
use Wallabag\CoreBundle\EventListener\LocaleListener;
|
||||||
|
|
||||||
class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\EventListener;
|
namespace Wallabag\CoreBundle\Tests\EventListener;
|
||||||
|
|
||||||
|
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
||||||
|
use FOS\UserBundle\FOSUserEvents;
|
||||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use FOS\UserBundle\FOSUserEvents;
|
|
||||||
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
|
||||||
use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
|
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
|
use Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase
|
class RegistrationConfirmedListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
namespace Wallabag\CoreBundle\Tests\EventListener;
|
namespace Wallabag\CoreBundle\Tests\EventListener;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
|
||||||
use Symfony\Component\HttpFoundation\Session\Session;
|
use Symfony\Component\HttpFoundation\Session\Session;
|
||||||
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
|
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||||
use Wallabag\CoreBundle\EventListener\UserLocaleListener;
|
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
|
use Wallabag\CoreBundle\EventListener\UserLocaleListener;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
|
class UserLocaleListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -4,8 +4,8 @@ namespace Wallabag\CoreBundle\Tests\Helper;
|
||||||
|
|
||||||
use Psr\Log\NullLogger;
|
use Psr\Log\NullLogger;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
|
||||||
use Wallabag\CoreBundle\Helper\ContentProxy;
|
use Wallabag\CoreBundle\Helper\ContentProxy;
|
||||||
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,8 +6,8 @@ use Wallabag\CoreBundle\Entity\Config;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
use Wallabag\CoreBundle\Entity\Tag;
|
use Wallabag\CoreBundle\Entity\Tag;
|
||||||
use Wallabag\CoreBundle\Entity\TaggingRule;
|
use Wallabag\CoreBundle\Entity\TaggingRule;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
|
||||||
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
|
use Wallabag\CoreBundle\Helper\RuleBasedTagger;
|
||||||
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
|
class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\Command;
|
namespace Wallabag\CoreBundle\Tests\Command;
|
||||||
|
|
||||||
use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
|
||||||
use Wallabag\UserBundle\Entity\User;
|
use Wallabag\UserBundle\Entity\User;
|
||||||
|
|
||||||
class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
|
class UsernameRssTokenConverterTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
namespace Wallabag\CoreBundle\Tests\Subscriber;
|
namespace Wallabag\CoreBundle\Tests\Subscriber;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping\ClassMetadata;
|
|
||||||
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
|
||||||
use Doctrine\Common\EventManager;
|
use Doctrine\Common\EventManager;
|
||||||
|
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
|
||||||
|
use Doctrine\ORM\Mapping\ClassMetadata;
|
||||||
use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
|
use Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber;
|
||||||
|
|
||||||
class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
|
class TablePrefixSubscriberTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace Wallabag\ImportBundle\Controller;
|
namespace Wallabag\ImportBundle\Controller;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
|
||||||
|
|
||||||
class PocketController extends Controller
|
class PocketController extends Controller
|
||||||
|
@ -23,12 +24,12 @@ class PocketController extends Controller
|
||||||
public function authAction()
|
public function authAction()
|
||||||
{
|
{
|
||||||
$requestToken = $this->get('wallabag_import.pocket.import')
|
$requestToken = $this->get('wallabag_import.pocket.import')
|
||||||
->getRequestToken($this->generateUrl('import', [], true));
|
->getRequestToken($this->generateUrl('import', array(), UrlGeneratorInterface::ABSOLUTE_URL));
|
||||||
|
|
||||||
$this->get('session')->set('import.pocket.code', $requestToken);
|
$this->get('session')->set('import.pocket.code', $requestToken);
|
||||||
|
|
||||||
return $this->redirect(
|
return $this->redirect(
|
||||||
'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', [], true),
|
'https://getpocket.com/auth/authorize?request_token='.$requestToken.'&redirect_uri='.$this->generateUrl('import_pocket_callback', array(), UrlGeneratorInterface::ABSOLUTE_URL),
|
||||||
301
|
301
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ class WallabagV1Controller extends Controller
|
||||||
*/
|
*/
|
||||||
public function indexAction(Request $request)
|
public function indexAction(Request $request)
|
||||||
{
|
{
|
||||||
$form = $this->createForm(new UploadImportType());
|
$form = $this->createForm(UploadImportType::class);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
$wallabag = $this->get('wallabag_import.wallabag_v1.import');
|
$wallabag = $this->get('wallabag_import.wallabag_v1.import');
|
||||||
|
|
|
@ -4,18 +4,20 @@ namespace Wallabag\ImportBundle\Form\Type;
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||||
|
|
||||||
class UploadImportType extends AbstractType
|
class UploadImportType extends AbstractType
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('file', 'file')
|
->add('file', FileType::class)
|
||||||
->add('save', 'submit')
|
->add('save', SubmitType::class)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getBlockPrefix()
|
||||||
{
|
{
|
||||||
return 'upload_import_file';
|
return 'upload_import_file';
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
namespace Wallabag\UserBundle\Controller;
|
namespace Wallabag\UserBundle\Controller;
|
||||||
|
|
||||||
use FOS\UserBundle\FOSUserEvents;
|
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
||||||
use FOS\UserBundle\Event\FormEvent;
|
use FOS\UserBundle\Event\FormEvent;
|
||||||
use FOS\UserBundle\Event\GetResponseUserEvent;
|
use FOS\UserBundle\Event\GetResponseUserEvent;
|
||||||
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
use FOS\UserBundle\FOSUserEvents;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||||
|
|
||||||
class ResettingController extends \FOS\UserBundle\Controller\ResettingController
|
class ResettingController extends \FOS\UserBundle\Controller\ResettingController
|
||||||
|
|
|
@ -6,11 +6,11 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
|
use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
|
||||||
use Scheb\TwoFactorBundle\Model\TrustedComputerInterface;
|
use Scheb\TwoFactorBundle\Model\TrustedComputerInterface;
|
||||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
use FOS\UserBundle\Model\User as BaseUser;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
|
||||||
use JMS\Serializer\Annotation\ExclusionPolicy;
|
use JMS\Serializer\Annotation\ExclusionPolicy;
|
||||||
use JMS\Serializer\Annotation\Expose;
|
use JMS\Serializer\Annotation\Expose;
|
||||||
use FOS\UserBundle\Model\User as BaseUser;
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||||
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
use Wallabag\CoreBundle\Entity\Config;
|
use Wallabag\CoreBundle\Entity\Config;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{% block messages %}{% endblock %}
|
{% block messages %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register">
|
{{ form_start(form) }}
|
||||||
<fieldset class="w500p center">
|
<fieldset class="w500p center">
|
||||||
<h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2>
|
<h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2>
|
||||||
{% include "FOSUserBundle:Registration:register_content.html.twig" %}
|
{% include "FOSUserBundle:Registration:register_content.html.twig" %}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% trans_default_domain 'FOSUserBundle' %}
|
{% trans_default_domain 'FOSUserBundle' %}
|
||||||
|
|
||||||
<form action="{{ path('fos_user_change_password') }}" {{ form_enctype(form) }} method="POST" class="fos_user_change_password">
|
{{ form_start(form, { 'action': path('fos_user_change_password'), 'attr': { 'class': 'fos_user_change_password' } }) }}
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ form_widget(form) }}
|
{{ form_widget(form) }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% trans_default_domain 'FOSUserBundle' %}
|
{% trans_default_domain 'FOSUserBundle' %}
|
||||||
|
|
||||||
<form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register">
|
{{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }}
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% block fos_user_content %}
|
{% block fos_user_content %}
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ 'resetting.password_already_requested'|trans }}
|
{{ 'resetting.password_already_requested'|trans }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock fos_user_content %}
|
{% endblock fos_user_content %}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% trans_default_domain 'FOSUserBundle' %}
|
{% trans_default_domain 'FOSUserBundle' %}
|
||||||
|
|
||||||
<form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_resetting_reset">
|
{{ form_start(form, { 'action': path('fos_user_resetting_reset', {'token': token}), 'attr': { 'class': 'fos_user_resetting_reset' } }) }}
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ form_widget(form) }}
|
{{ form_widget(form) }}
|
||||||
|
|
0
app/logs/.gitkeep → var/cache/.gitkeep
vendored
0
app/logs/.gitkeep → var/cache/.gitkeep
vendored
0
var/logs/.gitkeep
Normal file
0
var/logs/.gitkeep
Normal file
0
var/sessions/.gitkeep
Normal file
0
var/sessions/.gitkeep
Normal file
|
@ -5,6 +5,18 @@
|
||||||
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
|
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
|
||||||
DirectoryIndex app.php
|
DirectoryIndex app.php
|
||||||
|
|
||||||
|
# By default, Apache does not evaluate symbolic links if you did not enable this
|
||||||
|
# feature in your server configuration. Uncomment the following line if you
|
||||||
|
# install assets as symlinks or if you experience problems related to symlinks
|
||||||
|
# when compiling LESS/Sass/CoffeScript assets.
|
||||||
|
# Options FollowSymlinks
|
||||||
|
|
||||||
|
# Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve
|
||||||
|
# to the front controller "/app.php" but be rewritten to "/app.php/app".
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
|
@ -18,9 +30,9 @@ DirectoryIndex app.php
|
||||||
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
|
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
|
||||||
RewriteRule ^(.*) - [E=BASE:%1]
|
RewriteRule ^(.*) - [E=BASE:%1]
|
||||||
|
|
||||||
# Sets the HTTP_AUTHORIZATION header removed by apache
|
# Sets the HTTP_AUTHORIZATION header removed by Apache
|
||||||
RewriteCond %{HTTP:Authorization} .
|
RewriteCond %{HTTP:Authorization} .
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
# Redirect to URI without front controller to prevent duplicate content
|
# Redirect to URI without front controller to prevent duplicate content
|
||||||
# (with and without `/app.php`). Only do this redirect on the initial
|
# (with and without `/app.php`). Only do this redirect on the initial
|
||||||
|
@ -34,15 +46,15 @@ DirectoryIndex app.php
|
||||||
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
|
# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
|
||||||
# following RewriteCond (best solution)
|
# following RewriteCond (best solution)
|
||||||
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
RewriteCond %{ENV:REDIRECT_STATUS} ^$
|
||||||
RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
|
RewriteRule ^app\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
|
||||||
|
|
||||||
# If the requested filename exists, simply serve it.
|
# If the requested filename exists, simply serve it.
|
||||||
# We only want to let Apache serve files and not directories.
|
# We only want to let Apache serve files and not directories.
|
||||||
RewriteCond %{REQUEST_FILENAME} -f
|
RewriteCond %{REQUEST_FILENAME} -f
|
||||||
RewriteRule .? - [L]
|
RewriteRule ^ - [L]
|
||||||
|
|
||||||
# Rewrite all other queries to the front controller.
|
# Rewrite all other queries to the front controller.
|
||||||
RewriteRule .? %{ENV:BASE}/app.php [L]
|
RewriteRule ^ %{ENV:BASE}/app.php [L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
<IfModule !mod_rewrite.c>
|
<IfModule !mod_rewrite.c>
|
||||||
|
|
12
web/app.php
12
web/app.php
|
@ -1,23 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Symfony\Component\ClassLoader\ApcClassLoader;
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
|
||||||
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
|
/**
|
||||||
|
* @var Composer\Autoload\ClassLoader
|
||||||
|
*/
|
||||||
|
$loader = require __DIR__.'/../app/autoload.php';
|
||||||
|
include_once __DIR__.'/../var/bootstrap.php.cache';
|
||||||
|
|
||||||
// Enable APC for autoloading to improve performance.
|
// Enable APC for autoloading to improve performance.
|
||||||
// You should change the ApcClassLoader first argument to a unique prefix
|
// You should change the ApcClassLoader first argument to a unique prefix
|
||||||
// in order to prevent cache key conflicts with other applications
|
// in order to prevent cache key conflicts with other applications
|
||||||
// also using APC.
|
// also using APC.
|
||||||
/*
|
/*
|
||||||
$apcLoader = new ApcClassLoader(sha1(__FILE__), $loader);
|
$apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader);
|
||||||
$loader->unregister();
|
$loader->unregister();
|
||||||
$apcLoader->register(true);
|
$apcLoader->register(true);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once __DIR__.'/../app/AppKernel.php';
|
|
||||||
//require_once __DIR__.'/../app/AppCache.php';
|
|
||||||
|
|
||||||
$kernel = new AppKernel('prod', false);
|
$kernel = new AppKernel('prod', false);
|
||||||
$kernel->loadClassCache();
|
$kernel->loadClassCache();
|
||||||
//$kernel = new AppCache($kernel);
|
//$kernel = new AppCache($kernel);
|
||||||
|
|
|
@ -4,24 +4,26 @@ use Symfony\Component\HttpFoundation\Request;
|
||||||
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 http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
|
||||||
|
// for more information
|
||||||
//umask(0000);
|
//umask(0000);
|
||||||
|
|
||||||
// This check prevents access to debug front controllers that are deployed by accident to production servers.
|
// This check prevents access to debug front controllers that are deployed by accident to production servers.
|
||||||
// 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'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server')
|
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === '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.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
|
/**
|
||||||
|
* @var Composer\Autoload\ClassLoader $loader
|
||||||
|
*/
|
||||||
|
$loader = require __DIR__.'/../app/autoload.php';
|
||||||
Debug::enable();
|
Debug::enable();
|
||||||
|
|
||||||
require_once __DIR__.'/../app/AppKernel.php';
|
|
||||||
|
|
||||||
$kernel = new AppKernel('dev', true);
|
$kernel = new AppKernel('dev', true);
|
||||||
$kernel->loadClassCache();
|
$kernel->loadClassCache();
|
||||||
$request = Request::createFromGlobals();
|
$request = Request::createFromGlobals();
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
# www.robotstxt.org/
|
||||||
|
# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
|
||||||
|
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
|
Loading…
Reference in a new issue