diff --git a/composer.json b/composer.json index 2c5111fde..20bb55371 100644 --- a/composer.json +++ b/composer.json @@ -27,20 +27,10 @@ "email": "hello@wallabag.org", "issues": "https://github.com/wallabag/wallabag/issues" }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/wallabag/php-readability" - }, - { - "type": "vcs", - "url": "https://github.com/wallabag/Fivefilters_Libraries" - } - ], "require": { "php": ">=5.3.3", "symfony/symfony": "~2.7.0", - "doctrine/orm": "~2.2,>=2.2.3", + "doctrine/orm": "~2.3", "doctrine/doctrine-bundle": "~1.2", "twig/extensions": "~1.0", "symfony/assetic-bundle": "~2.3", @@ -60,10 +50,9 @@ "willdurand/hateoas-bundle": "~0.5.0", "htmlawed/htmlawed": "~1.1.19", "liip/theme-bundle": "~1.1.3", - "wallabag/php-readability": "~1.0.0", - "wallabag/Fivefilters_Libraries": "~1.0", "pagerfanta/pagerfanta": "~1.0.3", - "lexik/form-filter-bundle": "~4.0" + "lexik/form-filter-bundle": "~4.0", + "j0k3r/graby": "~1.0" }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "~2.2.0", diff --git a/composer.lock b/composer.lock index 559a08dc6..35d8b9786 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "52545aca8a752dfc2969d6cb9f0cb8d3", + "hash": "f5520667cebcae76568ff448172854bd", "packages": [ { "name": "doctrine/annotations", - "version": "v1.2.6", + "version": "v1.2.7", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "f4a91702ca3cd2e568c3736aa031ed00c3752af4" + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f4a91702ca3cd2e568c3736aa031ed00c3752af4", - "reference": "f4a91702ca3cd2e568c3736aa031ed00c3752af4", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", "shasum": "" }, "require": { @@ -72,20 +72,20 @@ "docblock", "parser" ], - "time": "2015-06-17 12:21:22" + "time": "2015-08-31 12:32:49" }, { "name": "doctrine/cache", - "version": "v1.4.1", + "version": "v1.4.2", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "c9eadeb743ac6199f7eec423cb9426bc518b7b03" + "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/c9eadeb743ac6199f7eec423cb9426bc518b7b03", - "reference": "c9eadeb743ac6199f7eec423cb9426bc518b7b03", + "url": "https://api.github.com/repos/doctrine/cache/zipball/8c434000f420ade76a07c64cbe08ca47e5c101ca", + "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca", "shasum": "" }, "require": { @@ -142,7 +142,7 @@ "cache", "caching" ], - "time": "2015-04-15 00:11:59" + "time": "2015-08-31 12:36:41" }, { "name": "doctrine/collections", @@ -212,16 +212,16 @@ }, { "name": "doctrine/common", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "cd8daf2501e10c63dced7b8b9b905844316ae9d3" + "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/cd8daf2501e10c63dced7b8b9b905844316ae9d3", - "reference": "cd8daf2501e10c63dced7b8b9b905844316ae9d3", + "url": "https://api.github.com/repos/doctrine/common/zipball/0009b8f0d4a917aabc971fb089eba80e872f83f9", + "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9", "shasum": "" }, "require": { @@ -281,7 +281,7 @@ "persistence", "spl" ], - "time": "2015-04-02 19:55:44" + "time": "2015-08-31 13:00:22" }, { "name": "doctrine/dbal", @@ -693,16 +693,16 @@ }, { "name": "doctrine/orm", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/doctrine/doctrine2.git", - "reference": "aa80c7d2c55a372f5f9f825f5c66dbda53a6e3fe" + "reference": "e6a83bedbe67579cb0bfb688e982e617943a2945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/aa80c7d2c55a372f5f9f825f5c66dbda53a6e3fe", - "reference": "aa80c7d2c55a372f5f9f825f5c66dbda53a6e3fe", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6a83bedbe67579cb0bfb688e982e617943a2945", + "reference": "e6a83bedbe67579cb0bfb688e982e617943a2945", "shasum": "" }, "require": { @@ -766,7 +766,7 @@ "database", "orm" ], - "time": "2015-04-02 20:40:18" + "time": "2015-08-31 12:59:39" }, { "name": "ezyang/htmlpurifier", @@ -812,6 +812,52 @@ ], "time": "2015-08-05 01:03:42" }, + { + "name": "fin1te/safecurl", + "version": "v1.1", + "source": { + "type": "git", + "url": "https://github.com/fin1te/safecurl.git", + "reference": "98aae75a1f4f8dec2194ce889d418d16c3c877e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fin1te/safecurl/zipball/98aae75a1f4f8dec2194ce889d418d16c3c877e4", + "reference": "98aae75a1f4f8dec2194ce889d418d16c3c877e4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "fin1te\\SafeCurl": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jack W", + "email": "jack@fin1te.net" + } + ], + "description": "A drop-in replacement for 'curl_exec', designed to prevent SSRF attacks.", + "keywords": [ + "curl", + "safe", + "safecurl", + "ssrf", + "websec" + ], + "time": "2014-05-20 12:10:12" + }, { "name": "friendsofsymfony/rest-bundle", "version": "1.7.1", @@ -896,6 +942,165 @@ ], "time": "2015-06-16 08:39:26" }, + { + "name": "guzzlehttp/guzzle", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f3c8c22471cb55475105c14769644a49c3262b93" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93", + "reference": "f3c8c22471cb55475105c14769644a49c3262b93", + "shasum": "" + }, + "require": { + "guzzlehttp/ringphp": "^1.1", + "php": ">=5.4.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2015-05-20 03:47:55" + }, + { + "name": "guzzlehttp/ringphp", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/RingPHP.git", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "shasum": "" + }, + "require": { + "guzzlehttp/streams": "~3.0", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Ring\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "time": "2015-05-20 03:37:09" + }, + { + "name": "guzzlehttp/streams", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/streams.git", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple abstraction over streams of data", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "stream" + ], + "time": "2014-10-12 19:18:40" + }, { "name": "htmlawed/htmlawed", "version": "1.1.19", @@ -993,6 +1198,156 @@ ], "time": "2015-06-03 08:27:03" }, + { + "name": "j0k3r/graby", + "version": "1.0.0-alpha.0", + "source": { + "type": "git", + "url": "https://github.com/j0k3r/graby.git", + "reference": "553a5ddd35e89f37fce2275e1423cc4451c40dbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/j0k3r/graby/zipball/553a5ddd35e89f37fce2275e1423cc4451c40dbf", + "reference": "553a5ddd35e89f37fce2275e1423cc4451c40dbf", + "shasum": "" + }, + "require": { + "fin1te/safecurl": "~1.1", + "guzzlehttp/guzzle": "^5.2.0", + "htmlawed/htmlawed": "^1.1.19", + "j0k3r/graby-site-config": "dev-master", + "j0k3r/php-readability": "^1.0", + "monolog/monolog": "^1.13.1", + "neitanod/forceutf8": "^1.4", + "php": ">=5.4", + "simplepie/simplepie": "^1.3.1", + "symfony/options-resolver": "^2.6.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Graby\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0" + ], + "authors": [ + { + "name": "Jeremy Benoist", + "email": "jeremy.benoist@gmail.com", + "role": "Developer" + }, + { + "name": "FiveFilters.org", + "email": "fivefilters@fivefilters.org", + "role": "Developer (original version)" + } + ], + "description": "Graby helps you extract article content from web pages", + "time": "2015-08-29 10:16:47" + }, + { + "name": "j0k3r/graby-site-config", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/j0k3r/graby-site-config.git", + "reference": "a5b3add9fcd716c86b8c4220bdbdfbc7e79dd182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/a5b3add9fcd716c86b8c4220bdbdfbc7e79dd182", + "reference": "a5b3add9fcd716c86b8c4220bdbdfbc7e79dd182", + "shasum": "" + }, + "require": { + "symfony/finder": "^2.6.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrabySiteConfig\\SiteConfig\\": "/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0" + ], + "authors": [ + { + "name": "Jeremy Benoist", + "email": "jeremy.benoist@gmail.com" + } + ], + "description": "Graby site config files", + "time": "2015-09-10 12:13:05" + }, + { + "name": "j0k3r/php-readability", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/j0k3r/php-readability.git", + "reference": "c5a4a490e155fa20809c9bbcf3e318defbb7a261" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/j0k3r/php-readability/zipball/c5a4a490e155fa20809c9bbcf3e318defbb7a261", + "reference": "c5a4a490e155fa20809c9bbcf3e318defbb7a261", + "shasum": "" + }, + "require": { + "ext-tidy": ">=1.2", + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Readability\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Keyvan Minoukadeh", + "email": "keyvan@keyvan.net", + "homepage": "http://keyvan.net", + "role": "Developer (ported original JS code to PHP)" + }, + { + "name": "Arc90", + "homepage": "http://arc90.com", + "role": "Developer (original JS version)" + }, + { + "name": "Jeremy Benoist", + "email": "jeremy.benoist@gmail.com", + "homepage": "http://www.j0k3r.net", + "role": "Developer" + }, + { + "name": "DitherSky", + "homepage": "https://github.com/Dither", + "role": "Developer (https://github.com/Dither/full-text-rss)" + } + ], + "description": "Automatic article extraction from HTML", + "keywords": [ + "article", + "article extraction", + "content", + "content extraction", + "extraction", + "html" + ], + "time": "2015-08-24 09:10:54" + }, { "name": "jdorn/sql-formatter", "version": "v1.2.17", @@ -1272,35 +1627,39 @@ }, { "name": "kriswallsmith/assetic", - "version": "v1.2.1", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/kriswallsmith/assetic.git", - "reference": "b20efe38845d20458702f97f3ff625d80805897b" + "reference": "56cb5d6dec9e7a68a4da2fa89844f39d41092f31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/b20efe38845d20458702f97f3ff625d80805897b", - "reference": "b20efe38845d20458702f97f3ff625d80805897b", + "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/56cb5d6dec9e7a68a4da2fa89844f39d41092f31", + "reference": "56cb5d6dec9e7a68a4da2fa89844f39d41092f31", "shasum": "" }, "require": { "php": ">=5.3.1", "symfony/process": "~2.1" }, + "conflict": { + "twig/twig": "<1.12" + }, "require-dev": { "cssmin/cssmin": "*", "joliclic/javascript-packer": "*", "kamicane/packager": "*", - "leafo/lessphp": "*", - "leafo/scssphp": "*", - "leafo/scssphp-compass": "*", + "leafo/lessphp": "^0.3.7", + "leafo/scssphp": "*@dev", + "leafo/scssphp-compass": "*@dev", "mrclay/minify": "*", - "patchwork/jsqueeze": "~1.0", - "phpunit/phpunit": "~4", + "patchwork/jsqueeze": "~1.0|~2.0", + "phpunit/phpunit": "~4.8", "psr/log": "~1.0", "ptachoire/cssembed": "*", - "twig/twig": "~1.6" + "symfony/phpunit-bridge": "~2.7", + "twig/twig": "~1.8|~2.0" }, "suggest": { "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", @@ -1313,7 +1672,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1342,7 +1701,7 @@ "compression", "minification" ], - "time": "2014-12-12 05:04:05" + "time": "2015-08-31 19:07:16" }, { "name": "lexik/form-filter-bundle", @@ -1556,16 +1915,16 @@ }, { "name": "monolog/monolog", - "version": "1.16.0", + "version": "1.17.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "c0c0b4bee3aabce7182876b0d912ef2595563db7" + "reference": "0524c87587ab85bc4c2d6f5b41253ccb930a5422" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c0c0b4bee3aabce7182876b0d912ef2595563db7", - "reference": "c0c0b4bee3aabce7182876b0d912ef2595563db7", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/0524c87587ab85bc4c2d6f5b41253ccb930a5422", + "reference": "0524c87587ab85bc4c2d6f5b41253ccb930a5422", "shasum": "" }, "require": { @@ -1582,7 +1941,7 @@ "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", - "raven/raven": "~0.8", + "raven/raven": "~0.11", "ruflin/elastica": ">=0.90 <3.0", "swiftmailer/swiftmailer": "~5.3", "videlalvaro/php-amqplib": "~2.4" @@ -1628,7 +1987,41 @@ "logging", "psr-3" ], - "time": "2015-08-09 17:44:44" + "time": "2015-08-31 09:17:37" + }, + { + "name": "neitanod/forceutf8", + "version": "v1.4", + "source": { + "type": "git", + "url": "https://github.com/neitanod/forceutf8.git", + "reference": "28d50d579179abac1f6a55b03c6d9d3f6573867c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/neitanod/forceutf8/zipball/28d50d579179abac1f6a55b03c6d9d3f6573867c", + "reference": "28d50d579179abac1f6a55b03c6d9d3f6573867c", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "ForceUTF8\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "authors": [ + { + "name": "Sebastián Grignoli", + "email": "grignoli@gmail.com" + } + ], + "description": "PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.", + "homepage": "https://github.com/neitanod/forceutf8", + "time": "2014-09-24 14:59:43" }, { "name": "nelmio/api-doc-bundle", @@ -1882,21 +2275,24 @@ }, { "name": "phpoption/phpoption", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5" + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5d099bcf0393908bf4ad69cc47dafb785d51f7f5", - "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", "shasum": "" }, "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": "4.7.*" + }, "type": "library", "extra": { "branch-alias": { @@ -1914,10 +2310,8 @@ ], "authors": [ { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "Option Type for PHP", @@ -1927,7 +2321,7 @@ "php", "type" ], - "time": "2014-01-09 22:37:17" + "time": "2015-07-25 16:39:46" }, { "name": "psr/log", @@ -1967,6 +2361,50 @@ ], "time": "2012-12-21 11:40:51" }, + { + "name": "react/promise", + "version": "v2.2.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/3b6fca09c7d56321057fa8867c8dbe1abf648627", + "reference": "3b6fca09c7d56321057fa8867c8dbe1abf648627", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "time": "2015-07-03 13:48:55" + }, { "name": "sensio/distribution-bundle", "version": "v3.0.31", @@ -2235,32 +2673,37 @@ }, { "name": "symfony/assetic-bundle", - "version": "v2.6.1", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/symfony/AsseticBundle.git", - "reference": "422b0add2110f0cf9bc7a873a386ea053f4a89f0" + "reference": "3ae5c8ca3079b6e0033cc9fbfb6500e2bc964da5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/422b0add2110f0cf9bc7a873a386ea053f4a89f0", - "reference": "422b0add2110f0cf9bc7a873a386ea053f4a89f0", + "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/3ae5c8ca3079b6e0033cc9fbfb6500e2bc964da5", + "reference": "3ae5c8ca3079b6e0033cc9fbfb6500e2bc964da5", "shasum": "" }, "require": { - "kriswallsmith/assetic": "~1.2", + "kriswallsmith/assetic": "~1.3", "php": ">=5.3.0", "symfony/console": "~2.3", "symfony/dependency-injection": "~2.3", "symfony/framework-bundle": "~2.3", "symfony/yaml": "~2.3" }, + "conflict": { + "kriswallsmith/spork": "<=0.2", + "twig/twig": "<1.20" + }, "require-dev": { - "kriswallsmith/spork": "~0.2", + "kriswallsmith/spork": "~0.3", "patchwork/jsqueeze": "~1.0", "symfony/class-loader": "~2.3", "symfony/css-selector": "~2.3", "symfony/dom-crawler": "~2.3", + "symfony/phpunit-bridge": "~2.7", "symfony/twig-bundle": "~2.3" }, "suggest": { @@ -2270,7 +2713,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.7-dev" } }, "autoload": { @@ -2296,7 +2739,7 @@ "compression", "minification" ], - "time": "2015-01-27 12:45:16" + "time": "2015-09-01 00:05:29" }, { "name": "symfony/monolog-bundle", @@ -2416,23 +2859,23 @@ }, { "name": "symfony/symfony", - "version": "v2.7.3", + "version": "v2.7.4", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "a9af4708b4bb650c4897e9b8dfbfbdb2ea5f0486" + "reference": "1fdf23fe28876844b887b0e1935c9adda43ee645" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/a9af4708b4bb650c4897e9b8dfbfbdb2ea5f0486", - "reference": "a9af4708b4bb650c4897e9b8dfbfbdb2ea5f0486", + "url": "https://api.github.com/repos/symfony/symfony/zipball/1fdf23fe28876844b887b0e1935c9adda43ee645", + "reference": "1fdf23fe28876844b887b0e1935c9adda43ee645", "shasum": "" }, "require": { "doctrine/common": "~2.3", "php": ">=5.3.9", "psr/log": "~1.0", - "twig/twig": "~1.18" + "twig/twig": "~1.20|~2.0" }, "replace": { "symfony/asset": "self.version", @@ -2534,7 +2977,7 @@ "keywords": [ "framework" ], - "time": "2015-07-31 13:24:45" + "time": "2015-09-08 14:26:39" }, { "name": "tecnick.com/tcpdf", @@ -2601,20 +3044,20 @@ }, { "name": "twig/extensions", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig-extensions.git", - "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd" + "reference": "449e3c8a9ffad7c2479c7864557275a32b037499" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", - "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", + "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/449e3c8a9ffad7c2479c7864557275a32b037499", + "reference": "449e3c8a9ffad7c2479c7864557275a32b037499", "shasum": "" }, "require": { - "twig/twig": "~1.12" + "twig/twig": "~1.20|~2.0" }, "require-dev": { "symfony/translation": "~2.3" @@ -2625,7 +3068,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2649,29 +3092,33 @@ "i18n", "text" ], - "time": "2014-10-30 14:30:03" + "time": "2015-08-22 16:38:35" }, { "name": "twig/twig", - "version": "v1.20.0", + "version": "v1.21.2", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "1ea4e5f81c6d005fe84d0b38e1c4f1955eb86844" + "reference": "ddce1136beb8db29b9cd7dffa8ab518b978c9db3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/1ea4e5f81c6d005fe84d0b38e1c4f1955eb86844", - "reference": "1ea4e5f81c6d005fe84d0b38e1c4f1955eb86844", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/ddce1136beb8db29b9cd7dffa8ab518b978c9db3", + "reference": "ddce1136beb8db29b9cd7dffa8ab518b978c9db3", "shasum": "" }, "require": { "php": ">=5.2.7" }, + "require-dev": { + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~2.7" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.20-dev" + "dev-master": "1.21-dev" } }, "autoload": { @@ -2706,92 +3153,7 @@ "keywords": [ "templating" ], - "time": "2015-08-12 15:56:39" - }, - { - "name": "wallabag/Fivefilters_Libraries", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/wallabag/Fivefilters_Libraries.git", - "reference": "6a07427e07308c746e0216ed254e41e053ab3448" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wallabag/Fivefilters_Libraries/zipball/6a07427e07308c746e0216ed254e41e053ab3448", - "reference": "6a07427e07308c746e0216ed254e41e053ab3448", - "shasum": "" - }, - "type": "library", - "authors": [ - { - "name": "Nicolas Lœuillet", - "email": "nicolas@loeuillet.org", - "homepage": "http://www.cdetc.fr" - } - ], - "description": "Libraries from @fivefilters.", - "homepage": "https://github.com/wallabag/Fivefilters_Libraries", - "support": { - "source": "https://github.com/wallabag/Fivefilters_Libraries/tree/1.0.1", - "issues": "https://github.com/wallabag/Fivefilters_Libraries/issues" - }, - "time": "2015-08-14 10:11:06" - }, - { - "name": "wallabag/php-readability", - "version": "v1.0", - "source": { - "type": "git", - "url": "https://github.com/wallabag/php-readability.git", - "reference": "e25182cdd1ccdebdce1149ab79c886eae1363674" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/wallabag/php-readability/zipball/e25182cdd1ccdebdce1149ab79c886eae1363674", - "reference": "e25182cdd1ccdebdce1149ab79c886eae1363674", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "Readability": "" - } - }, - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Keyvan Minoukadeh", - "email": "keyvan@keyvan.net", - "homepage": "http://keyvan.net", - "role": "Developer (ported original JS code to PHP)" - }, - { - "name": "Arc90", - "homepage": "http://arc90.com", - "role": "Developer (original JS version)" - } - ], - "description": "Automatic article extraction from HTML", - "homepage": "http://code.fivefilters.org/php-readability/", - "keywords": [ - "article", - "article extraction", - "content", - "content extraction", - "extraction", - "html" - ], - "support": { - "source": "https://github.com/wallabag/php-readability/tree/v1.0", - "issues": "https://github.com/wallabag/php-readability/issues" - }, - "time": "2013-04-17 13:51:09" + "time": "2015-09-09 05:28:51" }, { "name": "willdurand/hateoas", @@ -2899,7 +3261,7 @@ ], "authors": [ { - "name": "William Durand", + "name": "William DURAND", "email": "william.durand1@gmail.com" } ], @@ -2984,7 +3346,7 @@ ], "authors": [ { - "name": "William Durand", + "name": "William DURAND", "email": "william.durand1@gmail.com" } ], @@ -3466,16 +3828,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.4", + "version": "4.8.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7" + "reference": "2246830f4a1a551c67933e4171bf2126dc29d357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7", - "reference": "55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2246830f4a1a551c67933e4171bf2126dc29d357", + "reference": "2246830f4a1a551c67933e4171bf2126dc29d357", "shasum": "" }, "require": { @@ -3534,24 +3896,24 @@ "testing", "xunit" ], - "time": "2015-08-15 04:21:23" + "time": "2015-08-24 04:09:38" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.6", + "version": "2.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "18dfbcb81d05e2296c0bcddd4db96cade75e6f42" + "reference": "5e2645ad49d196e020b85598d7c97e482725786a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/18dfbcb81d05e2296c0bcddd4db96cade75e6f42", - "reference": "18dfbcb81d05e2296c0bcddd4db96cade75e6f42", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a", + "reference": "5e2645ad49d196e020b85598d7c97e482725786a", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", + "doctrine/instantiator": "^1.0.2", "php": ">=5.3.3", "phpunit/php-text-template": "~1.2", "sebastian/exporter": "~1.2" @@ -3590,7 +3952,7 @@ "mock", "xunit" ], - "time": "2015-07-10 06:54:24" + "time": "2015-08-19 09:14:08" }, { "name": "sebastian/comparator", diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 02a6de64c..349229f38 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -8,7 +8,6 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Tag; -use Wallabag\CoreBundle\Service\Extractor; use Hateoas\Configuration\Route; use Hateoas\Representation\Factory\PagerfantaFactory; @@ -147,11 +146,10 @@ class WallabagRestController extends Controller { $url = $request->request->get('url'); - $content = Extractor::extract($url); - $entry = new Entry($this->getUser()); - $entry->setUrl($url); - $entry->setTitle($request->request->get('title') ?: $content->getTitle()); - $entry->setContent($content->getBody()); + $entry = $this->get('wallabag_core.content_proxy')->updateEntry( + new Entry($this->getUser()), + $url + ); $tags = $request->request->get('tags', ''); if (!empty($tags)) { diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index a77489e25..b9e4e67e3 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -6,7 +6,6 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Wallabag\CoreBundle\Entity\Entry; -use Wallabag\CoreBundle\Service\Extractor; use Wallabag\CoreBundle\Form\Type\NewEntryType; use Wallabag\CoreBundle\Form\Type\EditEntryType; use Wallabag\CoreBundle\Filter\EntryFilterType; @@ -31,10 +30,7 @@ class EntryController extends Controller $form->handleRequest($request); if ($form->isValid()) { - $content = Extractor::extract($entry->getUrl()); - - $entry->setTitle($content->getTitle()); - $entry->setContent($content->getBody()); + $entry = $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl()); $em = $this->getDoctrine()->getManager(); $em->persist($entry); diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f88d189d3..e684c9b10 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -108,6 +108,13 @@ class Entry */ private $domainName; + /** + * @var string + * + * @ORM\Column(name="preview_picture", type="text", nullable=true) + */ + private $previewPicture; + /** * @var bool * @@ -419,4 +426,28 @@ class Entry { $this->tags->removeElement($tag); } + + /** + * Set previewPicture. + * + * @param string $previewPicture + * + * @return Entry + */ + public function setPreviewPicture($previewPicture) + { + $this->previewPicture = $previewPicture; + + return $this; + } + + /** + * Get previewPicture. + * + * @return string + */ + public function getPreviewPicture() + { + return $this->previewPicture; + } } diff --git a/src/Wallabag/CoreBundle/Helper/Content.php b/src/Wallabag/CoreBundle/Helper/Content.php deleted file mode 100644 index 1cc5e4cf8..000000000 --- a/src/Wallabag/CoreBundle/Helper/Content.php +++ /dev/null @@ -1,34 +0,0 @@ -title; - } - - public function setTitle($title) - { - $this->title = $title; - } - - public function getBody() - { - return $this->body; - } - - public function setBody($body) - { - $this->body = $body; - } -} diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php new file mode 100644 index 000000000..4565d8e7a --- /dev/null +++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php @@ -0,0 +1,60 @@ +graby = $graby; + } + + /** + * Fetch content using graby and hydrate given entry with results information. + * In case we couldn't find content, we'll try to use Open Graph data. + * + * @param Entry $entry Entry to update + * @param string $url Url to grab content for + * + * @return Entry + */ + public function updateEntry(Entry $entry, $url) + { + $content = $this->graby->fetchContent($url); + + $title = $content['title']; + if (!$title && isset($content['open_graph']['og_title'])) { + $title = $content['open_graph']['og_title']; + } + + $html = $content['html']; + if (false === $html) { + $html = '

Unable to retrieve readable content.

'; + + if (isset($content['open_graph']['og_description'])) { + $html .= '

But we found a short description:

'; + $html .= $content['open_graph']['og_description']; + } + } + + $entry->setUrl($content['url'] ?: $url); + $entry->setTitle($title); + $entry->setContent($html); + $entry->setMimetype($content['content_type']); + + if (isset($content['open_graph']['og_image'])) { + $entry->setPreviewPicture($content['open_graph']['og_image']); + } + + return $entry; + } +} diff --git a/src/Wallabag/CoreBundle/Helper/Url.php b/src/Wallabag/CoreBundle/Helper/Url.php deleted file mode 100644 index 35eb260d0..000000000 --- a/src/Wallabag/CoreBundle/Helper/Url.php +++ /dev/null @@ -1,28 +0,0 @@ -url = base64_decode($url); - } - - public function getUrl() - { - return $this->url; - } - - public function setUrl($url) - { - $this->url = $url; - } - - public function isCorrect() - { - return filter_var($this->url, FILTER_VALIDATE_URL) !== false; - } -} diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index 08eae3274..3beb5d0ef 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -30,3 +30,13 @@ services: wallabag_core.doctrine.prefixed_naming_strategy: class: Wallabag\CoreBundle\Doctrine\Mapping\PrefixedNamingStrategy arguments: [%database_table_prefix%] + + wallabag_core.graby: + class: Graby\Graby + arguments: + - { error_message: false } + + wallabag_core.content_proxy: + class: Wallabag\CoreBundle\Helper\ContentProxy + arguments: + - @wallabag_core.graby diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig index 47ca661aa..75ac2a6bd 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig @@ -10,7 +10,7 @@