diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/AppKernel.php | 3 | ||||
-rw-r--r-- | app/SymfonyRequirements.php | 41 | ||||
-rw-r--r-- | app/config/routing.yml | 4 | ||||
-rw-r--r-- | app/config/routing_rest.yml | 2 |
4 files changed, 33 insertions, 17 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php index 601b52c3..9a52f349 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php | |||
@@ -23,7 +23,8 @@ class AppKernel extends Kernel | |||
23 | new Nelmio\CorsBundle\NelmioCorsBundle(), | 23 | new Nelmio\CorsBundle\NelmioCorsBundle(), |
24 | new Liip\ThemeBundle\LiipThemeBundle(), | 24 | new Liip\ThemeBundle\LiipThemeBundle(), |
25 | new Wallabag\CoreBundle\WallabagCoreBundle(), | 25 | new Wallabag\CoreBundle\WallabagCoreBundle(), |
26 | new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle() | 26 | new Wallabag\ApiBundle\WallabagApiBundle(), |
27 | new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(), | ||
27 | ); | 28 | ); |
28 | 29 | ||
29 | if (in_array($this->getEnvironment(), array('dev', 'test'))) { | 30 | if (in_array($this->getEnvironment(), array('dev', 'test'))) { |
diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php index cbcf1c8e..caabe407 100644 --- a/app/SymfonyRequirements.php +++ b/app/SymfonyRequirements.php | |||
@@ -77,7 +77,7 @@ class Requirement | |||
77 | } | 77 | } |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Returns the help text for resolving the problem | 80 | * Returns the help text for resolving the problem. |
81 | * | 81 | * |
82 | * @return string The help text | 82 | * @return string The help text |
83 | */ | 83 | */ |
@@ -119,10 +119,10 @@ class PhpIniRequirement extends Requirement | |||
119 | * | 119 | * |
120 | * @param string $cfgName The configuration name used for ini_get() | 120 | * @param string $cfgName The configuration name used for ini_get() |
121 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | 121 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
122 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement | 122 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
123 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. | 123 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
124 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. | 124 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
125 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. | 125 | * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. |
126 | * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) | 126 | * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) |
127 | * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) | 127 | * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) |
128 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) | 128 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) |
@@ -221,10 +221,10 @@ class RequirementCollection implements IteratorAggregate | |||
221 | * | 221 | * |
222 | * @param string $cfgName The configuration name used for ini_get() | 222 | * @param string $cfgName The configuration name used for ini_get() |
223 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | 223 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
224 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement | 224 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
225 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. | 225 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
226 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. | 226 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
227 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. | 227 | * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. |
228 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) | 228 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) |
229 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) | 229 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) |
230 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) | 230 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) |
@@ -239,10 +239,10 @@ class RequirementCollection implements IteratorAggregate | |||
239 | * | 239 | * |
240 | * @param string $cfgName The configuration name used for ini_get() | 240 | * @param string $cfgName The configuration name used for ini_get() |
241 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, | 241 | * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
242 | or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement | 242 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
243 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. | 243 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
244 | This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. | 244 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
245 | Example: You require a config to be true but PHP later removes this config and defaults it to true internally. | 245 | * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. |
246 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) | 246 | * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) |
247 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) | 247 | * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) |
248 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) | 248 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) |
@@ -542,11 +542,22 @@ class SymfonyRequirements extends RequirementCollection | |||
542 | 542 | ||
543 | /* optional recommendations follow */ | 543 | /* optional recommendations follow */ |
544 | 544 | ||
545 | $this->addRecommendation( | 545 | if (file_exists(__DIR__.'/../vendor/composer')) { |
546 | file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), | 546 | require_once __DIR__.'/../vendor/autoload.php'; |
547 | 'Requirements file should be up-to-date', | 547 | |
548 | 'Your requirements file is outdated. Run composer install and re-check your configuration.' | 548 | try { |
549 | ); | 549 | $r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); |
550 | |||
551 | $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); | ||
552 | } catch (\ReflectionException $e) { | ||
553 | $contents = ''; | ||
554 | } | ||
555 | $this->addRecommendation( | ||
556 | file_get_contents(__FILE__) === $contents, | ||
557 | 'Requirements file should be up-to-date', | ||
558 | 'Your requirements file is outdated. Run composer install and re-check your configuration.' | ||
559 | ); | ||
560 | } | ||
550 | 561 | ||
551 | $this->addRecommendation( | 562 | $this->addRecommendation( |
552 | version_compare($installedPhpVersion, '5.3.4', '>='), | 563 | version_compare($installedPhpVersion, '5.3.4', '>='), |
diff --git a/app/config/routing.yml b/app/config/routing.yml index d681b39b..8710e97f 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml | |||
@@ -1,3 +1,7 @@ | |||
1 | wallabag_api: | ||
2 | resource: "@WallabagApiBundle/Resources/config/routing.yml" | ||
3 | prefix: / | ||
4 | |||
1 | app: | 5 | app: |
2 | resource: @WallabagCoreBundle/Controller/ | 6 | resource: @WallabagCoreBundle/Controller/ |
3 | type: annotation | 7 | type: annotation |
diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml index 82d9e6cc..0a64ad78 100644 --- a/app/config/routing_rest.yml +++ b/app/config/routing_rest.yml | |||
@@ -1,3 +1,3 @@ | |||
1 | Rest_Wallabag: | 1 | Rest_Wallabag: |
2 | type : rest | 2 | type : rest |
3 | resource: "@WallabagCoreBundle/Resources/config/routing_rest.yml" \ No newline at end of file | 3 | resource: "@WallabagApiBundle/Resources/config/routing_rest.yml" |