diff --git a/app/AppKernel.php b/app/AppKernel.php
index a9403c9..3cd5f25 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -15,12 +15,16 @@ class AppKernel extends Kernel
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
+ new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new FOS\UserBundle\FOSUserBundle(),
+ new FOS\RestBundle\FOSRestBundle(),
+ new JMS\DiExtraBundle\JMSDiExtraBundle($this),
+ new JMS\AopBundle\JMSAopBundle(),
+ new JMS\SerializerBundle\JMSSerializerBundle(),
new Wallabag\Bundle\CoreBundle\WallabagCoreBundle(),
new Wallabag\Bundle\ApiBundle\WallabagApiBundle(),
new Wallabag\Bundle\CliBundle\WallabagCliBundle(),
- new Wallabag\Bundle\ReadabilityBundle\WallabagReadabilityBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
diff --git a/app/autoload.php b/app/autoload.php
index 70526bb..1ec666d 100644
--- a/app/autoload.php
+++ b/app/autoload.php
@@ -9,5 +9,6 @@ use Composer\Autoload\ClassLoader;
$loader = require __DIR__.'/../vendor/autoload.php';
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
+\Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver::registerAnnotationClasses();
return $loader;
diff --git a/app/check.php b/app/check.php
index 91b826b..bb0a20e 100644
--- a/app/check.php
+++ b/app/check.php
@@ -2,61 +2,141 @@
require_once dirname(__FILE__).'/SymfonyRequirements.php';
+$lineSize = 70;
$symfonyRequirements = new SymfonyRequirements();
-
$iniPath = $symfonyRequirements->getPhpIniConfigPath();
-echo "********************************\n";
-echo "* *\n";
-echo "* Symfony requirements check *\n";
-echo "* *\n";
-echo "********************************\n\n";
+echo_title('Symfony2 Requirements Checker');
-echo $iniPath ? sprintf("* Configuration file used by PHP: %s\n\n", $iniPath) : "* WARNING: No configuration file (php.ini) used by PHP!\n\n";
-
-echo "** ATTENTION **\n";
-echo "* The PHP CLI can use a different php.ini file\n";
-echo "* than the one used with your web server.\n";
-if ('\\' == DIRECTORY_SEPARATOR) {
- echo "* (especially on the Windows platform)\n";
+echo '> PHP is using the following php.ini file:'.PHP_EOL;
+if ($iniPath) {
+ echo_style('green', ' '.$iniPath);
+} else {
+ echo_style('warning', ' WARNING: No configuration file (php.ini) used by PHP!');
}
-echo "* To be on the safe side, please also launch the requirements check\n";
-echo "* from your web server using the web/config.php script.\n";
-echo_title('Mandatory requirements');
+echo PHP_EOL.PHP_EOL;
-$checkPassed = true;
+echo '> Checking Symfony requirements:'.PHP_EOL.' ';
+
+$messages = array();
foreach ($symfonyRequirements->getRequirements() as $req) {
/** @var $req Requirement */
- echo_requirement($req);
- if (!$req->isFulfilled()) {
- $checkPassed = false;
+ if ($helpText = get_error_message($req, $lineSize)) {
+ echo_style('red', 'E');
+ $messages['error'][] = $helpText;
+ } else {
+ echo_style('green', '.');
}
}
-echo_title('Optional recommendations');
+$checkPassed = empty($messages['error']);
foreach ($symfonyRequirements->getRecommendations() as $req) {
- echo_requirement($req);
+ if ($helpText = get_error_message($req, $lineSize)) {
+ echo_style('yellow', 'W');
+ $messages['warning'][] = $helpText;
+ } else {
+ echo_style('green', '.');
+ }
}
+if ($checkPassed) {
+ echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects', true);
+} else {
+ echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects', true);
+
+ echo_title('Fix the following mandatory requirements', 'red');
+
+ foreach ($messages['error'] as $helpText) {
+ echo ' * '.$helpText.PHP_EOL;
+ }
+}
+
+if (!empty($messages['warning'])) {
+ echo_title('Optional recommendations to improve your setup', 'yellow');
+
+ foreach ($messages['warning'] as $helpText) {
+ echo ' * '.$helpText.PHP_EOL;
+ }
+}
+
+echo PHP_EOL;
+echo_style('title', 'Note');
+echo ' The command console could use a different php.ini file'.PHP_EOL;
+echo_style('title', '~~~~');
+echo ' than the one used with your web server. To be on the'.PHP_EOL;
+echo ' safe side, please check the requirements from your web'.PHP_EOL;
+echo ' server using the ';
+echo_style('yellow', 'web/config.php');
+echo ' script.'.PHP_EOL;
+echo PHP_EOL;
+
exit($checkPassed ? 0 : 1);
-/**
- * Prints a Requirement instance
- */
-function echo_requirement(Requirement $requirement)
+function get_error_message(Requirement $requirement, $lineSize)
{
- $result = $requirement->isFulfilled() ? 'OK' : ($requirement->isOptional() ? 'WARNING' : 'ERROR');
- echo ' ' . str_pad($result, 9);
- echo $requirement->getTestMessage() . "\n";
-
- if (!$requirement->isFulfilled()) {
- echo sprintf(" %s\n\n", $requirement->getHelpText());
+ if ($requirement->isFulfilled()) {
+ return;
}
+
+ $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
+ $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
+
+ return $errorMessage;
}
-function echo_title($title)
+function echo_title($title, $style = null)
{
- echo "\n** $title **\n\n";
+ $style = $style ?: 'title';
+
+ echo PHP_EOL;
+ echo_style($style, $title.PHP_EOL);
+ echo_style($style, str_repeat('~', strlen($title)).PHP_EOL);
+ echo PHP_EOL;
+}
+
+function echo_style($style, $message)
+{
+ // ANSI color codes
+ $styles = array(
+ 'reset' => "\033[0m",
+ 'red' => "\033[31m",
+ 'green' => "\033[32m",
+ 'yellow' => "\033[33m",
+ 'error' => "\033[37;41m",
+ 'success' => "\033[37;42m",
+ 'title' => "\033[34m",
+ );
+ $supports = has_color_support();
+
+ echo ($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
+}
+
+function echo_block($style, $title, $message)
+{
+ $message = ' '.trim($message).' ';
+ $width = strlen($message);
+
+ echo PHP_EOL.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($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL);
+ echo_style($style, str_repeat(' ', $width).PHP_EOL);
+}
+
+function has_color_support()
+{
+ static $support;
+
+ if (null === $support) {
+ if (DIRECTORY_SEPARATOR == '\\') {
+ $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
+ } else {
+ $support = function_exists('posix_isatty') && @posix_isatty(STDOUT);
+ }
+ }
+
+ return $support;
}
diff --git a/app/config/config.yml b/app/config/config.yml
index eae1728..e8b625e 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -60,6 +60,17 @@ doctrine:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
+# app/config/config.yml
+doctrine_mongodb:
+ connections:
+ default:
+ server: mongodb://localhost:27017
+ options: {}
+ default_database: wallabag
+ document_managers:
+ default:
+ auto_mapping: true
+
# Swiftmailer Configuration
swiftmailer:
transport: "%mailer_transport%"
@@ -68,8 +79,28 @@ swiftmailer:
password: "%mailer_password%"
spool: { type: memory }
+fos_rest:
+ body_converter:
+ enabled: false
+ view:
+ view_response_listener: true
+ format_listener:
+ rules:
+ # setting fallback_format to json means that instead of considering the next rule in case of a priority mismatch, json will be used
+ - { path: '^/api', priorities: ['json'], fallback_format: json, prefer_extension: false }
+
+
# FOS User Configuration
fos_user:
- db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
+ db_driver: mongodb # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
- user_class: Wallabag\CoreBundle\Entity\User
\ No newline at end of file
+ user_class: Wallabag\CoreBundle\Document\User
+
+jms_di_extra:
+ locations:
+ all_bundles: false
+ bundles: [WallabagCoreBundle]
+ directories: ["%kernel.root_dir%/../src"]
+
+sensio_framework_extra:
+ view: { annotations: false }
\ No newline at end of file
diff --git a/app/config/routing.yml b/app/config/routing.yml
index b14cf91..365ddee 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -11,7 +11,7 @@ wallabag_cli:
wallabag_api:
resource: "@WallabagApiBundle/Controller/"
type: annotation
- prefix: /
+ prefix: /api
wallabag_core:
resource: "@WallabagCoreBundle/Controller/"
diff --git a/composer.json b/composer.json
index 2b16b42..810cdb5 100644
--- a/composer.json
+++ b/composer.json
@@ -6,6 +6,20 @@
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
+ "repositories": [
+ {
+ "type": "package",
+ "package": {
+ "name": "fivefilters/full-text-rss",
+ "version": "dev-master",
+ "source": {
+ "url": "https://bitbucket.org/fivefilters/full-text-rss.git",
+ "type": "git",
+ "reference": "origin/master"
+ }
+ }
+ }
+ ],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.5.*",
@@ -20,7 +34,16 @@
"incenteev/composer-parameter-handler": "~2.0",
"fivefilters/php-readability": "v1.0",
"friendsofsymfony/user-bundle": "2.0.x-dev",
- "simplepie/simplepie": "1.3.1"
+ "friendsofsymfony/rest-bundle": "1.5.*@dev",
+ "simplepie/simplepie": "1.3.1",
+ "ezyang/htmlpurifier": "v4.6.0",
+ "exercise/htmlpurifier-bundle": "1.0.x-dev",
+ "mibe/feedwriter": "dev-master",
+ "doctrine/mongodb-odm-bundle": "3.0.*@dev",
+ "doctrine/mongodb-odm": "1.0.*@dev",
+ "jms/di-extra-bundle": "1.4.*@dev",
+ "jms/serializer-bundle": "0.13.*@dev",
+ "fivefilters/full-text-rss": "dev-master"
},
"require-dev": {
"sensio/generator-bundle": "~2.3"
diff --git a/composer.lock b/composer.lock
index 135367b..0d2c5cd 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "aaca2ba5bd2f244555f16fb4cfa50fd4",
+ "hash": "8daa2d4e793b6ddb5bde55f2fda04668",
"packages": [
{
"name": "doctrine/annotations",
@@ -553,6 +553,213 @@
],
"time": "2013-01-12 18:59:04"
},
+ {
+ "name": "doctrine/mongodb",
+ "version": "1.1.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/mongodb.git",
+ "reference": "4eafa3e719bfe14422f4c1d928771331edd26b39"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/mongodb/zipball/4eafa3e719bfe14422f4c1d928771331edd26b39",
+ "reference": "4eafa3e719bfe14422f4c1d928771331edd26b39",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/common": ">=2.1.0,<2.5-dev",
+ "ext-mongo": ">=1.2.12,<1.6-dev",
+ "php": ">=5.3.2"
+ },
+ "require-dev": {
+ "jmikola/geojson": "~1.0"
+ },
+ "suggest": {
+ "jmikola/geojson": "Support GeoJSON geometry objects in 2dsphere queries"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\MongoDB": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bulat Shakirzyanov",
+ "email": "mallluhuct@gmail.com",
+ "homepage": "http://avalanche123.com"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/",
+ "role": "Creator"
+ },
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/"
+ },
+ {
+ "name": "Jeremy Mikola",
+ "email": "jmikola@gmail.com",
+ "homepage": "http://jmikola.net"
+ }
+ ],
+ "description": "Doctrine MongoDB Abstraction Layer",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "mongodb",
+ "persistence"
+ ],
+ "time": "2014-04-29 21:14:37"
+ },
+ {
+ "name": "doctrine/mongodb-odm",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/mongodb-odm.git",
+ "reference": "6f812184f3fe645da4902fc20148eccf0a9539bf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/mongodb-odm/zipball/6f812184f3fe645da4902fc20148eccf0a9539bf",
+ "reference": "6f812184f3fe645da4902fc20148eccf0a9539bf",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/annotations": "~1.0",
+ "doctrine/cache": "~1.0",
+ "doctrine/collections": "~1.1",
+ "doctrine/common": "2.4.*",
+ "doctrine/inflector": "~1.0",
+ "doctrine/mongodb": ">=1.1.5,<2.0",
+ "php": ">=5.3.2",
+ "symfony/console": "~2.0"
+ },
+ "require-dev": {
+ "symfony/yaml": "~2.0"
+ },
+ "suggest": {
+ "symfony/yaml": "Enables the YAML metadata mapping driver"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\ODM\\MongoDB": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan H. Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Jeremy Mikola",
+ "email": "jmikola@gmail.com"
+ },
+ {
+ "name": "Bulat Shakirzyanov",
+ "email": "mallluhuct@gmail.com"
+ },
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com"
+ }
+ ],
+ "description": "Doctrine MongoDB Object Document Mapper",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "mongodb",
+ "odm",
+ "persistence"
+ ],
+ "time": "2014-08-28 19:25:37"
+ },
+ {
+ "name": "doctrine/mongodb-odm-bundle",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/DoctrineMongoDBBundle.git",
+ "reference": "1595d14845fc48ef59c8cc1ae496305964ac0f0a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/DoctrineMongoDBBundle/zipball/1595d14845fc48ef59c8cc1ae496305964ac0f0a",
+ "reference": "1595d14845fc48ef59c8cc1ae496305964ac0f0a",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/mongodb-odm": "~1.0.0-beta10@dev",
+ "php": ">=5.3.2",
+ "symfony/doctrine-bridge": "~2.1",
+ "symfony/framework-bundle": "~2.1",
+ "symfony/options-resolver": "~2.1"
+ },
+ "require-dev": {
+ "doctrine/data-fixtures": "@dev",
+ "symfony/form": "~2.1",
+ "symfony/yaml": "~2.1"
+ },
+ "suggest": {
+ "doctrine/data-fixtures": "Load data fixtures"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Bundle\\MongoDBBundle\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris@symfony.com"
+ },
+ {
+ "name": "Jonathan H. Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Bulat Shakirzyanov",
+ "email": "mallluhuct@gmail.com"
+ }
+ ],
+ "description": "Symfony2 Doctrine MongoDB Bundle",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "mongodb",
+ "persistence",
+ "symfony"
+ ],
+ "time": "2014-08-20 14:18:27"
+ },
{
"name": "doctrine/orm",
"version": "v2.4.4",
@@ -629,6 +836,114 @@
],
"time": "2014-07-11 03:05:53"
},
+ {
+ "name": "exercise/htmlpurifier-bundle",
+ "version": "dev-master",
+ "target-dir": "Exercise/HTMLPurifierBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Exercise/HTMLPurifierBundle.git",
+ "reference": "cffa4509aa32faf63e663a0e10dc53f3ed404081"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Exercise/HTMLPurifierBundle/zipball/cffa4509aa32faf63e663a0e10dc53f3ed404081",
+ "reference": "cffa4509aa32faf63e663a0e10dc53f3ed404081",
+ "shasum": ""
+ },
+ "require": {
+ "ezyang/htmlpurifier": "~4.0",
+ "php": ">=5.3.2",
+ "symfony/framework-bundle": "~2.0"
+ },
+ "require-dev": {
+ "symfony/form": "~2.0",
+ "twig/twig": "~1.3"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Exercise\\HTMLPurifierBundle": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "contributors",
+ "homepage": "https://github.com/Exercise/HTMLPurifierBundle/contributors"
+ }
+ ],
+ "description": "HTMLPurifier integration for your Symfony2 project",
+ "homepage": "https://github.com/Exercise/HTMLPurifierBundle",
+ "keywords": [
+ "htmlpurifier"
+ ],
+ "time": "2014-04-10 20:14:05"
+ },
+ {
+ "name": "ezyang/htmlpurifier",
+ "version": "v4.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ezyang/htmlpurifier.git",
+ "reference": "6f389f0f25b90d0b495308efcfa073981177f0fd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/6f389f0f25b90d0b495308efcfa073981177f0fd",
+ "reference": "6f389f0f25b90d0b495308efcfa073981177f0fd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "HTMLPurifier": "library/"
+ },
+ "files": [
+ "library/HTMLPurifier.composer.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "LGPL"
+ ],
+ "authors": [
+ {
+ "name": "Edward Z. Yang",
+ "email": "admin@htmlpurifier.org",
+ "homepage": "http://ezyang.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "Standards compliant HTML filter written in PHP",
+ "homepage": "http://htmlpurifier.org/",
+ "keywords": [
+ "html"
+ ],
+ "time": "2013-11-30 08:25:19"
+ },
+ {
+ "name": "fivefilters/full-text-rss",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://bitbucket.org/fivefilters/full-text-rss.git",
+ "reference": "origin/master"
+ },
+ "type": "library",
+ "time": "2014-05-15 21:03:31"
+ },
{
"name": "fivefilters/php-readability",
"version": "v1.0",
@@ -675,6 +990,84 @@
],
"time": "2013-04-17 13:51:09"
},
+ {
+ "name": "friendsofsymfony/rest-bundle",
+ "version": "dev-master",
+ "target-dir": "FOS/RestBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git",
+ "reference": "23fa377b27552cbce0adf5aa67d73bc94ec305a8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/23fa377b27552cbce0adf5aa67d73bc94ec305a8",
+ "reference": "23fa377b27552cbce0adf5aa67d73bc94ec305a8",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/inflector": "~1.0",
+ "php": ">=5.3.9",
+ "psr/log": "~1.0",
+ "symfony/framework-bundle": "~2.2",
+ "willdurand/jsonp-callback-validator": "~1.0",
+ "willdurand/negotiation": "~1.2"
+ },
+ "conflict": {
+ "jms/serializer": "<0.12",
+ "jms/serializer-bundle": "<0.11"
+ },
+ "require-dev": {
+ "jms/serializer-bundle": "~0.12",
+ "sensio/framework-extra-bundle": "~2.2",
+ "symfony/form": "~2.2",
+ "symfony/security": "~2.2",
+ "symfony/serializer": "~2.2",
+ "symfony/validator": "~2.2",
+ "symfony/yaml": "~2.2"
+ },
+ "suggest": {
+ "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ~0.12",
+ "sensio/framework-extra-bundle": "Add support for route annotations and the view response listener",
+ "symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ~2.2",
+ "symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ~2.2"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "FOS\\RestBundle": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Lukas Kahwe Smith",
+ "email": "smith@pooteeweet.org"
+ },
+ {
+ "name": "FriendsOfSymfony Community",
+ "homepage": "https://github.com/friendsofsymfony/FOSRestBundle/contributors"
+ },
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com"
+ }
+ ],
+ "description": "This Bundle provides various tools to rapidly develop RESTful API's with Symfony2",
+ "homepage": "http://friendsofsymfony.github.com",
+ "keywords": [
+ "rest"
+ ],
+ "time": "2014-09-01 23:14:17"
+ },
{
"name": "friendsofsymfony/user-bundle",
"version": "dev-master",
@@ -682,12 +1075,12 @@
"source": {
"type": "git",
"url": "https://github.com/FriendsOfSymfony/FOSUserBundle.git",
- "reference": "1fe261de17abde29d6d461b7a93873d48b0efce7"
+ "reference": "094bea6f318fbb067db3ddf6d26a62af0bf13442"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/1fe261de17abde29d6d461b7a93873d48b0efce7",
- "reference": "1fe261de17abde29d6d461b7a93873d48b0efce7",
+ "url": "https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/zipball/094bea6f318fbb067db3ddf6d26a62af0bf13442",
+ "reference": "094bea6f318fbb067db3ddf6d26a62af0bf13442",
"shasum": ""
},
"require": {
@@ -741,7 +1134,7 @@
"keywords": [
"User management"
],
- "time": "2014-08-01 02:49:19"
+ "time": "2014-08-23 11:32:38"
},
{
"name": "incenteev/composer-parameter-handler",
@@ -845,6 +1238,388 @@
],
"time": "2014-01-12 16:20:24"
},
+ {
+ "name": "jms/aop-bundle",
+ "version": "1.0.1",
+ "target-dir": "JMS/AopBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/JMSAopBundle.git",
+ "reference": "93f41ab85ed409430bc3bab2e0b7c7677f152aa8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/JMSAopBundle/zipball/93f41ab85ed409430bc3bab2e0b7c7677f152aa8",
+ "reference": "93f41ab85ed409430bc3bab2e0b7c7677f152aa8",
+ "shasum": ""
+ },
+ "require": {
+ "jms/cg": "1.*",
+ "symfony/framework-bundle": "2.*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\AopBundle": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Adds AOP capabilities to Symfony2",
+ "keywords": [
+ "annotations",
+ "aop"
+ ],
+ "time": "2013-07-29 09:34:26"
+ },
+ {
+ "name": "jms/cg",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/cg-library.git",
+ "reference": "ce8ef43dd6bfe6ce54e5e9844ab71be2343bf2fc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/cg-library/zipball/ce8ef43dd6bfe6ce54e5e9844ab71be2343bf2fc",
+ "reference": "ce8ef43dd6bfe6ce54e5e9844ab71be2343bf2fc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "CG\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Toolset for generating PHP code",
+ "keywords": [
+ "code generation"
+ ],
+ "time": "2012-01-02 20:40:52"
+ },
+ {
+ "name": "jms/di-extra-bundle",
+ "version": "dev-master",
+ "target-dir": "JMS/DiExtraBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/JMSDiExtraBundle.git",
+ "reference": "d282aa46c84a2723db0dab6940ea4399e6aa3313"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/JMSDiExtraBundle/zipball/d282aa46c84a2723db0dab6940ea4399e6aa3313",
+ "reference": "d282aa46c84a2723db0dab6940ea4399e6aa3313",
+ "shasum": ""
+ },
+ "require": {
+ "jms/aop-bundle": ">=1.0.0,<1.2-dev",
+ "jms/metadata": "1.*",
+ "symfony/finder": "~2.1",
+ "symfony/framework-bundle": "~2.1",
+ "symfony/process": "~2.1"
+ },
+ "require-dev": {
+ "doctrine/doctrine-bundle": "*",
+ "doctrine/orm": "*",
+ "jms/security-extra-bundle": "1.*",
+ "phpcollection/phpcollection": ">=0.1,<0.3-dev",
+ "sensio/framework-extra-bundle": "*",
+ "symfony/browser-kit": "*",
+ "symfony/class-loader": "*",
+ "symfony/form": "*",
+ "symfony/security-bundle": "*",
+ "symfony/twig-bundle": "*",
+ "symfony/validator": "*",
+ "symfony/yaml": "*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\DiExtraBundle": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Allows to configure dependency injection using annotations",
+ "homepage": "http://jmsyst.com/bundles/JMSDiExtraBundle",
+ "keywords": [
+ "annotations",
+ "dependency injection"
+ ],
+ "time": "2014-06-13 07:11:35"
+ },
+ {
+ "name": "jms/metadata",
+ "version": "1.5.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/metadata.git",
+ "reference": "22b72455559a25777cfd28c4ffda81ff7639f353"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353",
+ "reference": "22b72455559a25777cfd28c4ffda81ff7639f353",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "doctrine/cache": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.5.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Metadata\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Class/method/property metadata management in PHP",
+ "keywords": [
+ "annotations",
+ "metadata",
+ "xml",
+ "yaml"
+ ],
+ "time": "2014-07-12 07:13:19"
+ },
+ {
+ "name": "jms/parser-lib",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/parser-lib.git",
+ "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d",
+ "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d",
+ "shasum": ""
+ },
+ "require": {
+ "phpoption/phpoption": ">=0.9,<2.0-dev"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "description": "A library for easily creating recursive-descent parsers.",
+ "time": "2012-11-18 18:08:43"
+ },
+ {
+ "name": "jms/serializer",
+ "version": "0.16.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/serializer.git",
+ "reference": "c8a171357ca92b6706e395c757f334902d430ea9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9",
+ "reference": "c8a171357ca92b6706e395c757f334902d430ea9",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/annotations": "1.*",
+ "jms/metadata": "~1.1",
+ "jms/parser-lib": "1.*",
+ "php": ">=5.3.2",
+ "phpcollection/phpcollection": "~0.1"
+ },
+ "require-dev": {
+ "doctrine/orm": "~2.1",
+ "doctrine/phpcr-odm": "~1.0.1",
+ "jackalope/jackalope-doctrine-dbal": "1.0.*",
+ "propel/propel1": "~1.7",
+ "symfony/filesystem": "2.*",
+ "symfony/form": "~2.1",
+ "symfony/translation": "~2.0",
+ "symfony/validator": "~2.0",
+ "symfony/yaml": "2.*",
+ "twig/twig": ">=1.8,<2.0-dev"
+ },
+ "suggest": {
+ "symfony/yaml": "Required if you'd like to serialize data to YAML format."
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.15-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\Serializer": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.",
+ "homepage": "http://jmsyst.com/libs/serializer",
+ "keywords": [
+ "deserialization",
+ "jaxb",
+ "json",
+ "serialization",
+ "xml"
+ ],
+ "time": "2014-03-18 08:39:00"
+ },
+ {
+ "name": "jms/serializer-bundle",
+ "version": "dev-master",
+ "target-dir": "JMS/SerializerBundle",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/JMSSerializerBundle.git",
+ "reference": "3a980e5409aa3d143534e68a72895e7e33b64c75"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/3a980e5409aa3d143534e68a72895e7e33b64c75",
+ "reference": "3a980e5409aa3d143534e68a72895e7e33b64c75",
+ "shasum": ""
+ },
+ "require": {
+ "jms/serializer": "~0.11",
+ "php": ">=5.3.2",
+ "symfony/framework-bundle": "~2.1"
+ },
+ "require-dev": {
+ "doctrine/doctrine-bundle": "*",
+ "doctrine/orm": "*",
+ "symfony/browser-kit": "*",
+ "symfony/class-loader": "*",
+ "symfony/css-selector": "*",
+ "symfony/finder": "*",
+ "symfony/form": "*",
+ "symfony/process": "*",
+ "symfony/twig-bundle": "*",
+ "symfony/validator": "*",
+ "symfony/yaml": "*"
+ },
+ "suggest": {
+ "jms/di-extra-bundle": "Required to get lazy loading (de)serialization visitors, ~1.3"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.13-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "JMS\\SerializerBundle": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Allows you to easily serialize, and deserialize data of any complexity",
+ "homepage": "http://jmsyst.com/bundles/JMSSerializerBundle",
+ "keywords": [
+ "deserialization",
+ "jaxb",
+ "json",
+ "serialization",
+ "xml"
+ ],
+ "time": "2014-08-07 13:20:59"
+ },
{
"name": "kriswallsmith/assetic",
"version": "v1.1.2",
@@ -916,6 +1691,65 @@
],
"time": "2013-07-19 00:03:27"
},
+ {
+ "name": "mibe/feedwriter",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/mibe/FeedWriter.git",
+ "reference": "ccf2279b54b7833969b98c192689f92e8fa42c7c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/mibe/FeedWriter/zipball/ccf2279b54b7833969b98c192689f92e8fa42c7c",
+ "reference": "ccf2279b54b7833969b98c192689f92e8fa42c7c",
+ "shasum": ""
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "ATOM.php",
+ "Feed.php",
+ "Item.php",
+ "RSS1.php",
+ "RSS2.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-3.0"
+ ],
+ "authors": [
+ {
+ "name": "Michael Robinson",
+ "email": "mike@pagesofinterest.net",
+ "homepage": "http://pagesofinterest.net/",
+ "role": "Developer"
+ },
+ {
+ "name": "Anis uddin Ahmad"
+ },
+ {
+ "name": "Michael Bemmerl",
+ "email": "mail@mx-server.de"
+ },
+ {
+ "name": "Phil Freo"
+ },
+ {
+ "name": "Paul Ferrett"
+ },
+ {
+ "name": "Brennen Bearnes"
+ }
+ ],
+ "description": "Generate feeds in either RSS 1.0, RSS 2.0 or ATOM formats",
+ "homepage": "https://github.com/mibe/FeedWriter",
+ "keywords": [
+ "rss"
+ ],
+ "time": "2014-06-23 06:38:26"
+ },
{
"name": "monolog/monolog",
"version": "1.10.0",
@@ -984,6 +1818,105 @@
],
"time": "2014-06-04 16:30:04"
},
+ {
+ "name": "phpcollection/phpcollection",
+ "version": "0.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/php-collection.git",
+ "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83",
+ "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83",
+ "shasum": ""
+ },
+ "require": {
+ "phpoption/phpoption": "1.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "0.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "PhpCollection": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "General-Purpose Collection Library for PHP",
+ "keywords": [
+ "collection",
+ "list",
+ "map",
+ "sequence",
+ "set"
+ ],
+ "time": "2014-03-11 13:46:42"
+ },
+ {
+ "name": "phpoption/phpoption",
+ "version": "1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/php-option.git",
+ "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5d099bcf0393908bf4ad69cc47dafb785d51f7f5",
+ "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "PhpOption\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache2"
+ ],
+ "authors": [
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Option Type for PHP",
+ "keywords": [
+ "language",
+ "option",
+ "php",
+ "type"
+ ],
+ "time": "2014-01-09 22:37:17"
+ },
{
"name": "psr/log",
"version": "1.0.0",
@@ -1024,29 +1957,25 @@
},
{
"name": "sensio/distribution-bundle",
- "version": "v3.0.2",
+ "version": "v3.0.5",
"target-dir": "Sensio/Bundle/DistributionBundle",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/SensioDistributionBundle.git",
- "reference": "67b34359f91c25ad36b960f66a287df0615d7c54"
+ "reference": "ad10123f2532f6e311e583cce203ef368eedc469"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/67b34359f91c25ad36b960f66a287df0615d7c54",
- "reference": "67b34359f91c25ad36b960f66a287df0615d7c54",
+ "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/ad10123f2532f6e311e583cce203ef368eedc469",
+ "reference": "ad10123f2532f6e311e583cce203ef368eedc469",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
+ "sensiolabs/security-checker": "~2.0",
"symfony/class-loader": "~2.2",
- "symfony/config": "~2.2",
- "symfony/dependency-injection": "~2.2",
- "symfony/filesystem": "~2.2",
"symfony/form": "~2.2",
- "symfony/framework-bundle": "~2.2",
- "symfony/http-foundation": "~2.2",
- "symfony/http-kernel": "~2.2",
+ "symfony/framework-bundle": "~2.4",
"symfony/process": "~2.2",
"symfony/validator": "~2.2",
"symfony/yaml": "~2.2"
@@ -1069,36 +1998,34 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
+ "email": "fabien@symfony.com"
}
],
- "description": "The base bundle for the Symfony Distributions",
+ "description": "Base bundle for Symfony Distributions",
"keywords": [
"configuration",
"distribution"
],
- "time": "2014-07-16 07:46:27"
+ "time": "2014-08-26 13:14:47"
},
{
"name": "sensio/framework-extra-bundle",
- "version": "v3.0.1",
+ "version": "v3.0.2",
"target-dir": "Sensio/Bundle/FrameworkExtraBundle",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git",
- "reference": "dbc1e5aa830f3bf8063b29102add3c1e476d616e"
+ "reference": "9b22aaee517e80aad3238ea0328458b6f964066f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/dbc1e5aa830f3bf8063b29102add3c1e476d616e",
- "reference": "dbc1e5aa830f3bf8063b29102add3c1e476d616e",
+ "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/9b22aaee517e80aad3238ea0328458b6f964066f",
+ "reference": "9b22aaee517e80aad3238ea0328458b6f964066f",
"shasum": ""
},
"require": {
"doctrine/common": "~2.2",
- "symfony/framework-bundle": "~2.5"
+ "symfony/framework-bundle": "~2.3"
},
"require-dev": {
"symfony/expression-language": "~2.4",
@@ -1126,9 +2053,7 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
+ "email": "fabien@symfony.com"
}
],
"description": "This bundle provides a way to configure your controllers with annotations",
@@ -1136,7 +2061,52 @@
"annotations",
"controllers"
],
- "time": "2014-05-22 23:27:44"
+ "time": "2014-09-02 07:11:30"
+ },
+ {
+ "name": "sensiolabs/security-checker",
+ "version": "v2.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensiolabs/security-checker.git",
+ "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/5b4eb4743ebe68276c911c84101ecdf4a9ae76ee",
+ "reference": "5b4eb4743ebe68276c911c84101ecdf4a9ae76ee",
+ "shasum": ""
+ },
+ "require": {
+ "ext-curl": "*",
+ "symfony/console": "~2.0"
+ },
+ "bin": [
+ "security-checker"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "SensioLabs\\Security": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien.potencier@gmail.com"
+ }
+ ],
+ "description": "A security checker for your composer.lock",
+ "time": "2014-07-19 10:52:35"
},
{
"name": "simplepie/simplepie",
@@ -1311,22 +2281,20 @@
},
{
"name": "symfony/icu",
- "version": "v1.2.2",
+ "version": "v1.0.1",
"target-dir": "Symfony/Component/Icu",
"source": {
"type": "git",
"url": "https://github.com/symfony/Icu.git",
- "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a"
+ "reference": "fdba214b1e087c149843bde976263c53ac10c975"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Icu/zipball/d4d85d6055b87f394d941b45ddd3a9173e1e3d2a",
- "reference": "d4d85d6055b87f394d941b45ddd3a9173e1e3d2a",
+ "url": "https://api.github.com/repos/symfony/Icu/zipball/fdba214b1e087c149843bde976263c53ac10c975",
+ "reference": "fdba214b1e087c149843bde976263c53ac10c975",
"shasum": ""
},
"require": {
- "ext-intl": "*",
- "lib-icu": ">=4.4",
"php": ">=5.3.3",
"symfony/intl": "~2.3"
},
@@ -1356,7 +2324,7 @@
"icu",
"intl"
],
- "time": "2014-07-25 09:58:17"
+ "time": "2013-10-04 09:12:07"
},
{
"name": "symfony/monolog-bundle",
@@ -1476,16 +2444,16 @@
},
{
"name": "symfony/symfony",
- "version": "v2.5.2",
+ "version": "v2.5.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/symfony.git",
- "reference": "e66ee967571b89234c90946fe0d50dad195ad29c"
+ "reference": "3a369dddea56596df91977d8c2083e70784852f2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/symfony/zipball/e66ee967571b89234c90946fe0d50dad195ad29c",
- "reference": "e66ee967571b89234c90946fe0d50dad195ad29c",
+ "url": "https://api.github.com/repos/symfony/symfony/zipball/3a369dddea56596df91977d8c2083e70784852f2",
+ "reference": "3a369dddea56596df91977d8c2083e70784852f2",
"shasum": ""
},
"require": {
@@ -1543,7 +2511,7 @@
"doctrine/data-fixtures": "1.0.*",
"doctrine/dbal": "~2.2",
"doctrine/orm": "~2.2,>=2.2.3",
- "egulias/email-validator": "1.1.0",
+ "egulias/email-validator": "~1.2",
"ircmaxell/password-compat": "1.0.*",
"monolog/monolog": "~1.3",
"ocramius/proxy-manager": ">=0.3.1,<0.6-dev",
@@ -1572,15 +2540,13 @@
"MIT"
],
"authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
- },
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
+ },
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
}
],
"description": "The Symfony PHP framework",
@@ -1588,7 +2554,7 @@
"keywords": [
"framework"
],
- "time": "2014-07-15 15:39:46"
+ "time": "2014-09-03 09:51:48"
},
{
"name": "twig/extensions",
@@ -1694,6 +2660,96 @@
"templating"
],
"time": "2014-07-05 12:19:05"
+ },
+ {
+ "name": "willdurand/jsonp-callback-validator",
+ "version": "v1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/willdurand/JsonpCallbackValidator.git",
+ "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909",
+ "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~3.7"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "JsonpCallbackValidator": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "William Durand",
+ "email": "william.durand1@gmail.com",
+ "homepage": "http://www.willdurand.fr"
+ }
+ ],
+ "description": "JSONP callback validator.",
+ "time": "2014-01-20 22:35:06"
+ },
+ {
+ "name": "willdurand/negotiation",
+ "version": "1.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/willdurand/Negotiation.git",
+ "reference": "a98fb6b9808610c1aa326c736893d3d77d9383b6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/a98fb6b9808610c1aa326c736893d3d77d9383b6",
+ "reference": "a98fb6b9808610c1aa326c736893d3d77d9383b6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Negotiation": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "William Durand",
+ "email": "william.durand1@gmail.com",
+ "homepage": "http://www.willdurand.fr"
+ }
+ ],
+ "description": "Content Negotiation tools for PHP provided as a standalone library.",
+ "homepage": "http://williamdurand.fr/Negotiation/",
+ "keywords": [
+ "accept",
+ "content",
+ "format",
+ "header",
+ "negotiation"
+ ],
+ "time": "2014-05-16 12:34:51"
}
],
"packages-dev": [
@@ -1748,14 +2804,26 @@
"time": "2014-04-28 14:01:06"
}
],
- "aliases": [],
+ "aliases": [
+
+ ],
"minimum-stability": "stable",
"stability-flags": {
- "friendsofsymfony/user-bundle": 20
+ "friendsofsymfony/user-bundle": 20,
+ "friendsofsymfony/rest-bundle": 20,
+ "exercise/htmlpurifier-bundle": 20,
+ "mibe/feedwriter": 20,
+ "doctrine/mongodb-odm-bundle": 20,
+ "doctrine/mongodb-odm": 20,
+ "jms/di-extra-bundle": 20,
+ "jms/serializer-bundle": 20,
+ "fivefilters/full-text-rss": 20
},
"prefer-stable": false,
"platform": {
"php": ">=5.3.3"
},
- "platform-dev": []
+ "platform-dev": [
+
+ ]
}
diff --git a/src/Wallabag/Bundle/ApiBundle/Controller/DefaultController.php b/src/Wallabag/Bundle/ApiBundle/Controller/DefaultController.php
deleted file mode 100644
index bcf4477..0000000
--- a/src/Wallabag/Bundle/ApiBundle/Controller/DefaultController.php
+++ /dev/null
@@ -1,19 +0,0 @@
- $name);
- }
-}
diff --git a/src/Wallabag/Bundle/ApiBundle/Controller/EntriesController.php b/src/Wallabag/Bundle/ApiBundle/Controller/EntriesController.php
new file mode 100644
index 0000000..3c8c614
--- /dev/null
+++ b/src/Wallabag/Bundle/ApiBundle/Controller/EntriesController.php
@@ -0,0 +1,59 @@
+request->get("url");
+ $tags = $request->request->get("tags");
+ $entry = $this->entryService->save($user, $url, $tags);
+ $view = \FOS\RestBundle\View\View::create();
+ $view->setData($entry);
+ $view->setStatusCode(Response::HTTP_CREATED);
+ $view->setLocation($this->router->generate("wallabag_api_entry_get", array(
+ "user" => $user->getUsername(),
+ "entry" => $entry->getId()
+ )));
+ return $view;
+ }
+
+ /**
+ * @Get("/u/{user}/entries", methods={"GET"})
+ * @Get("/u/{user}", methods={"GET"})
+ * @ParamConverter("user", options={"mapping": {"user": "username"}})
+ * @View(statusCode=200, serializerGroups={"entries"})
+ */
+ public function getAction(User $user) {
+ return array_values($this->entryService->listForUser($user));
+ }
+}
diff --git a/src/Wallabag/Bundle/ApiBundle/Controller/EntryController.php b/src/Wallabag/Bundle/ApiBundle/Controller/EntryController.php
new file mode 100644
index 0000000..37c4a20
--- /dev/null
+++ b/src/Wallabag/Bundle/ApiBundle/Controller/EntryController.php
@@ -0,0 +1,31 @@
+request('GET', '/hello/Fabien');
-
- $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Controller/BookmarkController.php b/src/Wallabag/Bundle/CoreBundle/Controller/BookmarkController.php
new file mode 100644
index 0000000..1213e60
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Controller/BookmarkController.php
@@ -0,0 +1,45 @@
+get("url");
+ $this->bookmarkService->save($user, $url);
+ return array('name' => 'Fabien');
+ }
+
+ /**
+ * @Route("/u/{user}", methods={"GET"})
+ * @ParamConverter("user", options={"mapping": {"user": "username"}})
+ * @Template(template="WallabagCoreBundle:Default:index.html.twig")
+ */
+ public function listAction(Request $request, User $user) {
+ $list = $this->bookmarkService->listForUser($user);
+ foreach($list as $item) {
+ var_dump($item);
+ }
+ die;
+ }
+}
diff --git a/src/Wallabag/Bundle/CoreBundle/Controller/DefaultController.php b/src/Wallabag/Bundle/CoreBundle/Controller/DefaultController.php
deleted file mode 100644
index 86d73a1..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Controller/DefaultController.php
+++ /dev/null
@@ -1,19 +0,0 @@
- $name);
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Document/Entry.php b/src/Wallabag/Bundle/CoreBundle/Document/Entry.php
new file mode 100644
index 0000000..b130fd4
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Document/Entry.php
@@ -0,0 +1,316 @@
+tags = new ArrayCollection();
+ }
+
+ /**
+ * Get id
+ *
+ * @return integer
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * Set url
+ *
+ * @param string $url
+ * @return Entry
+ */
+ public function setUrl($url)
+ {
+ $this->url = $url;
+
+ return $this;
+ }
+
+ /**
+ * Get url
+ *
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * Set title
+ *
+ * @param string $title
+ * @return Entry
+ */
+ public function setTitle($title)
+ {
+ $this->title = $title;
+
+ return $this;
+ }
+
+ /**
+ * Get title
+ *
+ * @return string
+ */
+ public function getTitle()
+ {
+ return $this->title;
+ }
+
+ /**
+ * Set content
+ *
+ * @param string $content
+ * @return Entry
+ */
+ public function setContent($content)
+ {
+ $this->content = $content;
+
+ return $this;
+ }
+
+ /**
+ * Get content
+ *
+ * @return string
+ */
+ public function getContent()
+ {
+ return $this->content;
+ }
+
+ /**
+ * Set createdAt
+ *
+ * @param \DateTime $createdAt
+ * @return self
+ */
+ public function setCreatedAt($createdAt)
+ {
+ $this->createdAt = $createdAt;
+ return $this;
+ }
+ /**
+ * Get createdAt
+ *
+ * @return \DateTime $createdAt
+ */
+ public function getCreatedAt()
+ {
+ return $this->createdAt;
+ }
+
+ /**
+ * Add tag
+ *
+ * @param \Wallabag\Bundle\CoreBundle\Document\Tag $tag
+ */
+ public function addTag(\Wallabag\Bundle\CoreBundle\Document\Tag $tag)
+ {
+ $this->tags[] = $tag;
+ }
+
+ /**
+ * Remove tag
+ *
+ * @param \Wallabag\Bundle\CoreBundle\Document\Tag $tag
+ */
+ public function removeTag(\Wallabag\Bundle\CoreBundle\Document\Tag $tag)
+ {
+ $this->tags->removeElement($tag);
+ }
+
+ /**
+ * Get tags
+ *
+ * @return Tag[] $tags
+ */
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ /**
+ * Set archived
+ *
+ * @param boolean $archived
+ * @return self
+ */
+ public function setArchived($archived)
+ {
+ $this->archived = $archived;
+ return $this;
+ }
+
+ /**
+ * Get archived
+ *
+ * @return boolean $archived
+ */
+ public function getArchived()
+ {
+ return $this->archived;
+ }
+
+ /**
+ * Set deleted
+ *
+ * @param boolean $deleted
+ * @return self
+ */
+ public function setDeleted($deleted)
+ {
+ $this->deleted = $deleted;
+ return $this;
+ }
+
+ /**
+ * Get deleted
+ *
+ * @return boolean $deleted
+ */
+ public function getDeleted()
+ {
+ return $this->deleted;
+ }
+
+ /**
+ * Set starred
+ *
+ * @param boolean $starred
+ * @return self
+ */
+ public function setStarred($starred)
+ {
+ $this->starred = $starred;
+ return $this;
+ }
+
+ /**
+ * Get starred
+ *
+ * @return boolean $starred
+ */
+ public function getStarred()
+ {
+ return $this->starred;
+ }
+
+ /**
+ * Set user
+ *
+ * @param User $user
+ * @return self
+ */
+ public function setUser(User $user)
+ {
+ $this->user = $user;
+ return $this;
+ }
+
+ /**
+ * Get user
+ *
+ * @return User $user
+ */
+ public function getUser()
+ {
+ return $this->user;
+ }
+}
diff --git a/src/Wallabag/Bundle/CoreBundle/Document/Preference.php b/src/Wallabag/Bundle/CoreBundle/Document/Preference.php
new file mode 100644
index 0000000..cbe6229
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Document/Preference.php
@@ -0,0 +1,125 @@
+locale = $locale;
+ return $this;
+ }
+
+ /**
+ * Get locale
+ *
+ * @return string $locale
+ */
+ public function getLocale()
+ {
+ return $this->locale;
+ }
+
+ /**
+ * Set pageSize
+ *
+ * @param int $pageSize
+ * @return self
+ */
+ public function setPageSize($pageSize)
+ {
+ $this->pageSize = $pageSize;
+ return $this;
+ }
+
+ /**
+ * Get pageSize
+ *
+ * @return int $pageSize
+ */
+ public function getPageSize()
+ {
+ return $this->pageSize;
+ }
+
+ /**
+ * Set sortDirection
+ *
+ * @param string $sortDirection
+ * @return self
+ */
+ public function setSortDirection($sortDirection)
+ {
+ $this->sortDirection = $sortDirection;
+ return $this;
+ }
+
+ /**
+ * Get sortDirection
+ *
+ * @return string $sortDirection
+ */
+ public function getSortDirection()
+ {
+ return $this->sortDirection;
+ }
+
+ /**
+ * Set theme
+ *
+ * @param string $theme
+ * @return self
+ */
+ public function setTheme($theme)
+ {
+ $this->theme = $theme;
+ return $this;
+ }
+
+ /**
+ * Get theme
+ *
+ * @return string $theme
+ */
+ public function getTheme()
+ {
+ return $this->theme;
+ }
+}
diff --git a/src/Wallabag/Bundle/CoreBundle/Document/Tag.php b/src/Wallabag/Bundle/CoreBundle/Document/Tag.php
new file mode 100644
index 0000000..17466cc
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Document/Tag.php
@@ -0,0 +1,53 @@
+value = $value;
+ }
+
+ /**
+ * Set value
+ *
+ * @param string $value
+ * @return Tag
+ */
+ public function setValue($value)
+ {
+ $this->value = $value;
+
+ return $this;
+ }
+
+ /**
+ * Get value
+ *
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+}
diff --git a/src/Wallabag/Bundle/CoreBundle/Document/User.php b/src/Wallabag/Bundle/CoreBundle/Document/User.php
new file mode 100644
index 0000000..bfa7df1
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Document/User.php
@@ -0,0 +1,157 @@
+id;
+ }
+
+ /**
+ * @return string
+ */
+ public function getApiToken()
+ {
+ return $this->apiToken;
+ }
+
+ /**
+ * @param string $apiToken
+ */
+ public function setApiToken($apiToken)
+ {
+ $this->apiToken = $apiToken;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAuthGoogleToken()
+ {
+ return $this->authGoogleToken;
+ }
+
+ /**
+ * @param string $authGoogleToken
+ */
+ public function setAuthGoogleToken($authGoogleToken)
+ {
+ $this->authGoogleToken = $authGoogleToken;
+ }
+
+ /**
+ * @return string
+ */
+ public function getAuthMozillaToken()
+ {
+ return $this->authMozillaToken;
+ }
+
+ /**
+ * @param string $authMozillaToken
+ */
+ public function setAuthMozillaToken($authMozillaToken)
+ {
+ $this->authMozillaToken = $authMozillaToken;
+ }
+
+ /**
+ * @return string
+ */
+ public function getFeedToken()
+ {
+ return $this->feedToken;
+ }
+
+ /**
+ * @param string $feedToken
+ */
+ public function setFeedToken($feedToken)
+ {
+ $this->feedToken = $feedToken;
+ }
+
+ /**
+ * Set preferences
+ *
+ * @param \Wallabag\Bundle\CoreBundle\Document\Preference $preferences
+ * @return self
+ */
+ public function setPreferences(Preference $preferences)
+ {
+ $this->preferences = $preferences;
+ return $this;
+ }
+
+ /**
+ * Get preferences
+ *
+ * @return \Wallabag\Bundle\CoreBundle\Document\Preference $preferences
+ */
+ public function getPreferences()
+ {
+ return $this->preferences;
+ }
+}
diff --git a/src/Wallabag/Bundle/CoreBundle/Entity/Config.php b/src/Wallabag/Bundle/CoreBundle/Entity/Config.php
deleted file mode 100644
index 81cf802..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Entity/Config.php
+++ /dev/null
@@ -1,94 +0,0 @@
-id;
- }
-
- /**
- * Set name
- *
- * @param string $name
- * @return Config
- */
- public function setName($name)
- {
- $this->name = $name;
-
- return $this;
- }
-
- /**
- * Get name
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Set value
- *
- * @param string $value
- * @return Config
- */
- public function setValue($value)
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * Get value
- *
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Entity/Entry.php b/src/Wallabag/Bundle/CoreBundle/Entity/Entry.php
deleted file mode 100644
index 855619b..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Entity/Entry.php
+++ /dev/null
@@ -1,294 +0,0 @@
-id;
- }
-
- /**
- * Set url
- *
- * @param string $url
- * @return Entry
- */
- public function setUrl($url)
- {
- $this->url = $url;
-
- return $this;
- }
-
- /**
- * Get url
- *
- * @return string
- */
- public function getUrl()
- {
- return $this->url;
- }
-
- /**
- * Set title
- *
- * @param string $title
- * @return Entry
- */
- public function setTitle($title)
- {
- $this->title = $title;
-
- return $this;
- }
-
- /**
- * Get title
- *
- * @return string
- */
- public function getTitle()
- {
- return $this->title;
- }
-
- /**
- * Set content
- *
- * @param string $content
- * @return Entry
- */
- public function setContent($content)
- {
- $this->content = $content;
-
- return $this;
- }
-
- /**
- * Get content
- *
- * @return string
- */
- public function getContent()
- {
- return $this->content;
- }
-
- /**
- * Set updated
- *
- * @param boolean $updated
- * @return Entry
- */
- public function setUpdated($updated)
- {
- $this->updated = $updated;
-
- return $this;
- }
-
- /**
- * Get updated
- *
- * @return boolean
- */
- public function getUpdated()
- {
- return $this->updated;
- }
-
- /**
- * Set status
- *
- * @param string $status
- * @return Entry
- */
- public function setStatus($status)
- {
- $this->status = $status;
-
- return $this;
- }
-
- /**
- * Get status
- *
- * @return string
- */
- public function getStatus()
- {
- return $this->status;
- }
-
- /**
- * Set bookmark
- *
- * @param boolean $bookmark
- * @return Entry
- */
- public function setBookmark($bookmark)
- {
- $this->bookmark = $bookmark;
-
- return $this;
- }
-
- /**
- * Get bookmark
- *
- * @return boolean
- */
- public function getBookmark()
- {
- return $this->bookmark;
- }
-
- /**
- * Set fetched
- *
- * @param boolean $fetched
- * @return Entry
- */
- public function setFetched($fetched)
- {
- $this->fetched = $fetched;
-
- return $this;
- }
-
- /**
- * Get fetched
- *
- * @return boolean
- */
- public function getFetched()
- {
- return $this->fetched;
- }
-
- /**
- * @return Collection
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * @param Collection $tags
- */
- public function setTags($tags)
- {
- $this->tags = $tags;
- }
-
- /**
- * @return User
- */
- public function getUser()
- {
- return $this->user;
- }
-
- /**
- * @param User $user
- */
- public function setUser($user)
- {
- $this->user = $user;
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Entity/PluginOption.php b/src/Wallabag/Bundle/CoreBundle/Entity/PluginOption.php
deleted file mode 100644
index 61e88aa..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Entity/PluginOption.php
+++ /dev/null
@@ -1,94 +0,0 @@
-id;
- }
-
- /**
- * Set name
- *
- * @param string $name
- * @return PluginOption
- */
- public function setName($name)
- {
- $this->name = $name;
-
- return $this;
- }
-
- /**
- * Get name
- *
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Set value
- *
- * @param string $value
- * @return PluginOption
- */
- public function setValue($value)
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * Get value
- *
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Entity/Tag.php b/src/Wallabag/Bundle/CoreBundle/Entity/Tag.php
deleted file mode 100644
index ce24b36..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Entity/Tag.php
+++ /dev/null
@@ -1,64 +0,0 @@
-id;
- }
-
- /**
- * Set value
- *
- * @param string $value
- * @return Tag
- */
- public function setValue($value)
- {
- $this->value = $value;
-
- return $this;
- }
-
- /**
- * Get value
- *
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Entity/User.php b/src/Wallabag/Bundle/CoreBundle/Entity/User.php
deleted file mode 100644
index 1cf8a66..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Entity/User.php
+++ /dev/null
@@ -1,223 +0,0 @@
-id;
- }
-
-
- /**
- * @return string
- */
- public function getPreferredLocale()
- {
- return $this->preferredLocale;
- }
-
- /**
- * @param string $preferredLocale
- */
- public function setPreferredLocale($preferredLocale)
- {
- $this->preferredLocale = $preferredLocale;
- }
-
- /**
- * @return string
- */
- public function getApiToken()
- {
- return $this->apiToken;
- }
-
- /**
- * @param string $apiToken
- */
- public function setApiToken($apiToken)
- {
- $this->apiToken = $apiToken;
- }
-
- /**
- * @return string
- */
- public function getAuthGoogleToken()
- {
- return $this->authGoogleToken;
- }
-
- /**
- * @param string $authGoogleToken
- */
- public function setAuthGoogleToken($authGoogleToken)
- {
- $this->authGoogleToken = $authGoogleToken;
- }
-
- /**
- * @return string
- */
- public function getAuthMozillaToken()
- {
- return $this->authMozillaToken;
- }
-
- /**
- * @param string $authMozillaToken
- */
- public function setAuthMozillaToken($authMozillaToken)
- {
- $this->authMozillaToken = $authMozillaToken;
- }
-
- /**
- * @return string
- */
- public function getFeedToken()
- {
- return $this->feedToken;
- }
-
- /**
- * @param string $feedToken
- */
- public function setFeedToken($feedToken)
- {
- $this->feedToken = $feedToken;
- }
-
- /**
- * @return int
- */
- public function getItemsPerPage()
- {
- return $this->itemsPerPage;
- }
-
- /**
- * @param int $itemsPerPage
- */
- public function setItemsPerPage($itemsPerPage)
- {
- $this->itemsPerPage = $itemsPerPage;
- }
-
- /**
- * @return string
- */
- public function getItemsSortingDirection()
- {
- return $this->itemsSortingDirection;
- }
-
- /**
- * @param string $itemsSortingDirection
- */
- public function setItemsSortingDirection($itemsSortingDirection)
- {
- $this->itemsSortingDirection = $itemsSortingDirection;
- }
-
- /**
- * @return string
- */
- public function getTheme()
- {
- return $this->theme;
- }
-
- /**
- * @param string $theme
- */
- public function setTheme($theme)
- {
- $this->theme = $theme;
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Repository/ConfigRepository.php b/src/Wallabag/Bundle/CoreBundle/Repository/ConfigRepository.php
deleted file mode 100644
index f76eda7..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Repository/ConfigRepository.php
+++ /dev/null
@@ -1,15 +0,0 @@
-createQueryBuilder('Wallabag\Bundle\CoreBundle\Document\Entry')
+ ->field('user.$id')
+ ->equals(new \MongoId($userId))
+ ->field('archived')
+ ->equals(false)
+ ->sort('createdAt', 'desc')
+ ->eagerCursor()
+ ->getQuery()
+ ->execute()
+ ->toArray();
+ }
+
+ /**
+ * @param $userId
+ * @param $url
+ * @return Entry
+ */
+ public function findOneByUserAndUrl($userId, $url) {
+ return $this->createQueryBuilder('Wallabag\Bundle\CoreBundle\Document\Entry')
+ ->field('user.$id')
+ ->equals(new \MongoId($userId))
+ ->field('url')
+ ->equals($url)
+ ->getQuery()
+ ->getSingleResult();
+ }
+}
\ No newline at end of file
diff --git a/src/Wallabag/Bundle/CoreBundle/Repository/PluginOptionRepository.php b/src/Wallabag/Bundle/CoreBundle/Repository/PluginOptionRepository.php
deleted file mode 100644
index e45f9aa..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Repository/PluginOptionRepository.php
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
diff --git a/src/Wallabag/Bundle/CoreBundle/Service/EntryService.php b/src/Wallabag/Bundle/CoreBundle/Service/EntryService.php
new file mode 100644
index 0000000..f383eee
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Service/EntryService.php
@@ -0,0 +1,67 @@
+dm = $dm;
+ }
+
+ /**
+ * @param User $user
+ * @param string $url
+ * @param string[] $tags
+ * @return Entry the created entry
+ */
+ public function save(User $user, $url, $tags = array()) {
+ $entry = new Entry();
+ $entry->setUser($user);
+ $entry->setUrl($url);
+ $entry->setCreatedAt(new \DateTime());
+ $entry->setContent("Fixture content");
+ $entry->setTitle("Fixture title");
+ $entry->setArchived(false);
+ $entry->setDeleted(false);
+ $entry->setStarred(false);
+
+ foreach($tags as $tag) {
+ $entry->addTag(new Tag($tag));
+ }
+
+ $this->dm->persist($entry);
+ $this->dm->flush();
+
+ return $entry;
+ }
+
+ public function listForUser(User $user) {
+ $bookmarkRepository = $this->dm->getRepository('\Wallabag\Bundle\CoreBundle\Document\Entry');
+ return $bookmarkRepository->findUnreadByUser($user->getId());
+ }
+}
\ No newline at end of file
diff --git a/src/Wallabag/Bundle/CoreBundle/Tests/Controller/DefaultControllerTest.php b/src/Wallabag/Bundle/CoreBundle/Tests/Controller/DefaultControllerTest.php
deleted file mode 100644
index 1ed69b2..0000000
--- a/src/Wallabag/Bundle/CoreBundle/Tests/Controller/DefaultControllerTest.php
+++ /dev/null
@@ -1,17 +0,0 @@
-request('GET', '/hello/Fabien');
-
- $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
- }
-}
diff --git a/src/Wallabag/Bundle/CoreBundle/Url/UrlFetcher.php b/src/Wallabag/Bundle/CoreBundle/Url/UrlFetcher.php
new file mode 100644
index 0000000..6d5beee
--- /dev/null
+++ b/src/Wallabag/Bundle/CoreBundle/Url/UrlFetcher.php
@@ -0,0 +1,9 @@
+ $name);
- }
-}
diff --git a/src/Wallabag/Bundle/ReadabilityBundle/DependencyInjection/Configuration.php b/src/Wallabag/Bundle/ReadabilityBundle/DependencyInjection/Configuration.php
deleted file mode 100644
index 5079252..0000000
--- a/src/Wallabag/Bundle/ReadabilityBundle/DependencyInjection/Configuration.php
+++ /dev/null
@@ -1,29 +0,0 @@
-root('wallabag_readability');
-
- // Here you should define the parameters that are allowed to
- // configure your bundle. See the documentation linked above for
- // more information on that topic.
-
- return $treeBuilder;
- }
-}
diff --git a/src/Wallabag/Bundle/ReadabilityBundle/DependencyInjection/WallabagReadabilityExtension.php b/src/Wallabag/Bundle/ReadabilityBundle/DependencyInjection/WallabagReadabilityExtension.php
deleted file mode 100644
index b2c06dd..0000000
--- a/src/Wallabag/Bundle/ReadabilityBundle/DependencyInjection/WallabagReadabilityExtension.php
+++ /dev/null
@@ -1,28 +0,0 @@
-processConfiguration($configuration, $configs);
-
- $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
- $loader->load('services.xml');
- }
-}
diff --git a/src/Wallabag/Bundle/ReadabilityBundle/Readability/WallabagReadability.php b/src/Wallabag/Bundle/ReadabilityBundle/Readability/WallabagReadability.php
deleted file mode 100644
index 5b6c4d5..0000000
--- a/src/Wallabag/Bundle/ReadabilityBundle/Readability/WallabagReadability.php
+++ /dev/null
@@ -1,48 +0,0 @@
-getInnerText($this->dom->getElementsByTagName('title')->item(0));
- } catch(Exception $e) {}
-
- if (preg_match('/ [\|\-] /', $curTitle))
- {
- $curTitle = preg_replace('/(.*)[\|\-] .*/i', '$1', $origTitle);
-
- if (count(explode(' ', $curTitle)) < 3) {
- $curTitle = preg_replace('/[^\|\-]*[\|\-](.*)/i', '$1', $origTitle);
- }
- }
- else if(strlen($curTitle) > 150 || strlen($curTitle) < 15)
- {
- $hOnes = $this->dom->getElementsByTagName('h1');
- if($hOnes->length == 1)
- {
- $curTitle = $this->getInnerText($hOnes->item(0));
- }
- }
-
- $curTitle = trim($curTitle);
-
- if (count(explode(' ', $curTitle)) <= 4) {
- $curTitle = $origTitle;
- }
-
- $articleTitle = $this->dom->createElement('h1');
- $articleTitle->innerHTML = $curTitle;
-
- return $articleTitle;
- }
-}
diff --git a/src/Wallabag/Bundle/ReadabilityBundle/Resources/config/services.xml b/src/Wallabag/Bundle/ReadabilityBundle/Resources/config/services.xml
deleted file mode 100644
index 18cea25..0000000
--- a/src/Wallabag/Bundle/ReadabilityBundle/Resources/config/services.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
[\s\h\v]*
!u', '', $html); - } - } - } - - $title = ($extractor->getTitle() != '' ? $extractor->getTitle() : _('Untitled')); - $content = array ('title' => $title, 'body' => $html); - - return $content; - } - - private function convert_to_utf8($html, $header=null) - { - $encoding = null; - if ($html || $header) { - if (is_array($header)) $header = implode("\n", $header); - if (!$header || !preg_match_all('/^Content-Type:\s+([^;]+)(?:;\s*charset=["\']?([^;"\'\n]*))?/im', $header, $match, PREG_SET_ORDER)) { - // error parsing the response - } else { - $match = end($match); // get last matched element (in case of redirects) - if (isset($match[2])) $encoding = trim($match[2], "\"' \r\n\0\x0B\t"); - } - // TODO: check to see if encoding is supported (can we convert it?) - // If it's not, result will be empty string. - // For now we'll check for invalid encoding types returned by some sites, e.g. 'none' - // Problem URL: http://facta.co.jp/blog/archives/20111026001026.html - if (!$encoding || $encoding == 'none') { - // search for encoding in HTML - only look at the first 35000 characters - $html_head = substr($html, 0, 40000); - if (preg_match('/^<\?xml\s+version=(?:"[^"]*"|\'[^\']*\')\s+encoding=("[^"]*"|\'[^\']*\')/s', $html_head, $match)) { - $encoding = trim($match[1], '"\''); - } elseif (preg_match('/]+)/i', $html_head, $match)) { - $encoding = trim($match[1]); - } elseif (preg_match_all('/]+)>/i', $html_head, $match)) { - foreach ($match[1] as $_test) { - if (preg_match('/charset=["\']?([^"\']+)/i', $_test, $_m)) { - $encoding = trim($_m[1]); - break; - } - } - } - } - if (isset($encoding)) $encoding = trim($encoding); - // trim is important here! - if (!$encoding || (strtolower($encoding) == 'iso-8859-1')) { - // replace MS Word smart qutoes - $trans = array(); - $trans[chr(130)] = '‚'; // Single Low-9 Quotation Mark - $trans[chr(131)] = 'ƒ'; // Latin Small Letter F With Hook - $trans[chr(132)] = '„'; // Double Low-9 Quotation Mark - $trans[chr(133)] = '…'; // Horizontal Ellipsis - $trans[chr(134)] = '†'; // Dagger - $trans[chr(135)] = '‡'; // Double Dagger - $trans[chr(136)] = 'ˆ'; // Modifier Letter Circumflex Accent - $trans[chr(137)] = '‰'; // Per Mille Sign - $trans[chr(138)] = 'Š'; // Latin Capital Letter S With Caron - $trans[chr(139)] = '‹'; // Single Left-Pointing Angle Quotation Mark - $trans[chr(140)] = 'Œ'; // Latin Capital Ligature OE - $trans[chr(145)] = '‘'; // Left Single Quotation Mark - $trans[chr(146)] = '’'; // Right Single Quotation Mark - $trans[chr(147)] = '“'; // Left Double Quotation Mark - $trans[chr(148)] = '”'; // Right Double Quotation Mark - $trans[chr(149)] = '•'; // Bullet - $trans[chr(150)] = '–'; // En Dash - $trans[chr(151)] = '—'; // Em Dash - $trans[chr(152)] = '˜'; // Small Tilde - $trans[chr(153)] = '™'; // Trade Mark Sign - $trans[chr(154)] = 'š'; // Latin Small Letter S With Caron - $trans[chr(155)] = '›'; // Single Right-Pointing Angle Quotation Mark - $trans[chr(156)] = 'œ'; // Latin Small Ligature OE - $trans[chr(159)] = 'Ÿ'; // Latin Capital Letter Y With Diaeresis - $html = strtr($html, $trans); - } - if (!$encoding) { - $encoding = 'utf-8'; - } else { - if (strtolower($encoding) != 'utf-8') { - $html = \SimplePie_Misc::change_encoding($html, $encoding, 'utf-8'); - /* - if (function_exists('iconv')) { - // iconv appears to handle certain character encodings better than mb_convert_encoding - $html = iconv($encoding, 'utf-8', $html); - } else { - $html = mb_convert_encoding($html, 'utf-8', $encoding); - } - */ - } - } - } - return $html; - } - - private function makeAbsolute($base, $elem) { - $base = new \SimplePie_IRI($base); - // remove '//' in URL path (used to prevent URLs from resolving properly) - // TODO: check if this is still the case - if (isset($base->path)) $base->path = preg_replace('!//+!', '/', $base->path); - foreach(array('a'=>'href', 'img'=>'src') as $tag => $attr) { - $elems = $elem->getElementsByTagName($tag); - for ($i = $elems->length-1; $i >= 0; $i--) { - $e = $elems->item($i); - //$e->parentNode->replaceChild($articleContent->ownerDocument->createTextNode($e->textContent), $e); - $this->makeAbsoluteAttr($base, $e, $attr); - } - if (strtolower($elem->tagName) == $tag) $this->makeAbsoluteAttr($base, $elem, $attr); - } - } - - private function makeAbsoluteAttr($base, $e, $attr) { - if ($e->hasAttribute($attr)) { - // Trim leading and trailing white space. I don't really like this but - // unfortunately it does appear on some sites. e.g. - $url = trim(str_replace('%20', ' ', $e->getAttribute($attr))); - $url = str_replace(' ', '%20', $url); - if (!preg_match('!https?://!i', $url)) { - if ($absolute = \SimplePie_IRI::absolutize($base, $url)) { - $e->setAttribute($attr, $absolute); - } - } - } - } - - private function makeAbsoluteStr($base, $url) { - $base = new \SimplePie_IRI($base); - // remove '//' in URL path (causes URLs not to resolve properly) - if (isset($base->path)) $base->path = preg_replace('!//+!', '/', $base->path); - if (preg_match('!^https?://!i', $url)) { - // already absolute - return $url; - } else { - if ($absolute = \SimplePie_IRI::absolutize($base, $url)) { - return $absolute; - } - return false; - } - } - - // returns single page response, or false if not found - private function getSinglePage($item, $html, $url) { - global $http, $extractor; - $host = @parse_url($url, PHP_URL_HOST); - $site_config = \SiteConfig::build($host); - if ($site_config === false) { - // check for fingerprints - if (!empty($extractor->fingerprints) && ($_fphost = $extractor->findHostUsingFingerprints($html))) { - $site_config = \SiteConfig::build($_fphost); - } - if ($site_config === false) $site_config = new \SiteConfig(); - \SiteConfig::add_to_cache($host, $site_config); - return false; - } else { - \SiteConfig::add_to_cache($host, $site_config); - } - $splink = null; - if (!empty($site_config->single_page_link)) { - $splink = $site_config->single_page_link; - } elseif (!empty($site_config->single_page_link_in_feed)) { - // single page link xpath is targeted at feed - $splink = $site_config->single_page_link_in_feed; - // so let's replace HTML with feed item description - $html = $item->get_description(); - } - if (isset($splink)) { - // Build DOM tree from HTML - $readability = new WallabagReadability($html, $url); - $xpath = new DOMXPath($readability->dom); - // Loop through single_page_link xpath expressions - $single_page_url = null; - foreach ($splink as $pattern) { - $elems = @$xpath->evaluate($pattern, $readability->dom); - if (is_string($elems)) { - $single_page_url = trim($elems); - break; - } elseif ($elems instanceof DOMNodeList && $elems->length > 0) { - foreach ($elems as $item) { - if ($item instanceof DOMElement && $item->hasAttribute('href')) { - $single_page_url = $item->getAttribute('href'); - break; - } elseif ($item instanceof DOMAttr && $item->value) { - $single_page_url = $item->value; - break; - } - } - } - } - // If we've got URL, resolve against $url - if (isset($single_page_url) && ($single_page_url = $this->makeAbsoluteStr($url, $single_page_url))) { - // check it's not what we have already! - if ($single_page_url != $url) { - // it's not, so let's try to fetch it... - $_prev_ref = $http->referer; - $http->referer = $single_page_url; - if (($response = $http->get($single_page_url, true)) && $response['status_code'] < 300) { - $http->referer = $_prev_ref; - return $response; - } - $http->referer = $_prev_ref; - } - } - } - return false; - } -} diff --git a/src/Wallabag/Bundle/ReadabilityBundle/WallabagReadabilityBundle.php b/src/Wallabag/Bundle/ReadabilityBundle/WallabagReadabilityBundle.php deleted file mode 100644 index 4042441..0000000 --- a/src/Wallabag/Bundle/ReadabilityBundle/WallabagReadabilityBundle.php +++ /dev/null @@ -1,9 +0,0 @@ -