├── .editorconfig ├── .gitignore ├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── misc.xml ├── modules.xml ├── public-api-blog-post.iml └── symfony2.xml ├── README.md ├── app ├── .htaccess ├── AppCache.php ├── AppKernel.php ├── Resources │ └── views │ │ ├── base.html.twig │ │ └── default │ │ └── index.html.twig ├── SymfonyRequirements.php ├── autoload.php ├── cache │ └── .gitkeep ├── check.php ├── config │ ├── config.yml │ ├── config_dev.yml │ ├── config_prod.yml │ ├── config_test.yml │ ├── parameters.yml.dist │ ├── routing.yml │ ├── routing_dev.yml │ ├── security.yml │ └── services.yml ├── console ├── logs │ └── .gitkeep └── phpunit.xml.dist ├── composer.json ├── composer.lock ├── src ├── .htaccess └── AppBundle │ ├── AppBundle.php │ ├── Command │ ├── CreateOAuthClientCommand.php │ └── EncodeRestaurantIdCommand.php │ ├── Controller │ ├── Api │ │ └── RestaurantApiController.php │ ├── DefaultController.php │ └── TokenController.php │ ├── DependencyInjection │ └── Compiler │ │ └── OverrideFOSOAuthServerTokenControllerPass.php │ └── Entity │ ├── Company.php │ ├── Manager │ └── OAuthClientManager.php │ ├── OAuthAccessToken.php │ ├── OAuthAuthCode.php │ ├── OAuthClient.php │ ├── OAuthRefreshToken.php │ └── Restaurant.php └── web ├── .htaccess ├── app.php ├── app_dev.php ├── apple-touch-icon.png ├── config.php ├── favicon.ico └── robots.txt /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | indent_style = space 7 | indent_size = 2 8 | 9 | [*.yml] 10 | indent_size = 4 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /web/bundles/ 2 | /app/bootstrap.php.cache 3 | /app/cache/* 4 | /app/config/parameters.yml 5 | /app/logs/* 6 | !app/cache/.gitkeep 7 | !app/logs/.gitkeep 8 | /app/phpunit.xml 9 | /build/ 10 | /vendor/ 11 | /bin/ 12 | /composer.phar 13 | .idea/workspace.xml 14 | .idea/tasks.xml 15 | .idea/dictionaries 16 | .idea/vcs.xml 17 | .idea/jsLibraryMappings.xml 18 | .idea/codeStyleSettings.xml -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | public-api-blog-post -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | /usr/local/bin/bower 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | General 26 | 27 | 28 | ServiceSymfony 29 | 30 | 31 | Symfony 32 | 33 | 34 | XPath 35 | 36 | 37 | 38 | 39 | Blade files 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/public-api-blog-post.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/symfony2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Public OAuth API 2 | 3 | A companion Symfony project for our blog post on securing client-side public API access with OAuth 2 and Symfony. 4 | 5 | ## Getting started 6 | 7 | Install dependencies: 8 | 9 | ``` 10 | composer install 11 | ``` 12 | 13 | Create the database and setup the schema: 14 | 15 | ``` 16 | php app/console doctrine:database:create --if-not-exists 17 | php app/console doctrine:schema:update --force 18 | ``` 19 | 20 | Create a new company in the database, then generate an OAuth client: 21 | 22 | ``` 23 | php app/console app:oauth-client:create 24 | ``` 25 | 26 | Create a new restaurant in the database, then generate a hashid for it: 27 | 28 | ``` 29 | php app/console app:restaurant:encode-id 30 | ``` 31 | 32 | Start the server: 33 | 34 | ``` 35 | php app/console server:run 36 | ``` 37 | 38 | Then follow the "Calling the API" section in the blog post. 39 | 40 | ## About Codevate 41 | Codevate is a specialist [UK mobile app development company](https://www.codevate.com/) that builds cloud-connected software. This repository was created for a blog post about a [custom web application development](https://www.codevate.com/services/web-development) project and was written by [Chris Lush](https://github.com/lushc). 42 | -------------------------------------------------------------------------------- /app/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /app/AppCache.php: -------------------------------------------------------------------------------- 1 | getEnvironment(), array('dev', 'test'), true)) { 25 | $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 26 | $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 27 | $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 28 | $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 29 | } 30 | 31 | return $bundles; 32 | } 33 | 34 | public function registerContainerConfiguration(LoaderInterface $loader) 35 | { 36 | $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Resources/views/base.html.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block title %}Welcome!{% endblock %} 6 | {% block stylesheets %}{% endblock %} 7 | 8 | 9 | 10 | {% block body %}{% endblock %} 11 | {% block javascripts %}{% endblock %} 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/Resources/views/default/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block body %} 4 |
5 |
6 |
7 |

Welcome to Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}

8 |
9 | 10 |
11 |

12 | 13 | 14 | Your application is now ready. You can start working on it at: 15 | {{ base_dir }}/ 16 |

17 |
18 | 19 | 44 | 45 |
46 |
47 | {% endblock %} 48 | 49 | {% block stylesheets %} 50 | 76 | {% endblock %} 77 | -------------------------------------------------------------------------------- /app/SymfonyRequirements.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | /* 13 | * Users of PHP 5.2 should be able to run the requirements checks. 14 | * This is why the file and all classes must be compatible with PHP 5.2+ 15 | * (e.g. not using namespaces and closures). 16 | * 17 | * ************** CAUTION ************** 18 | * 19 | * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of 20 | * the installation/update process. The original file resides in the 21 | * SensioDistributionBundle. 22 | * 23 | * ************** CAUTION ************** 24 | */ 25 | 26 | /** 27 | * Represents a single PHP requirement, e.g. an installed extension. 28 | * It can be a mandatory requirement or an optional recommendation. 29 | * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration. 30 | * 31 | * @author Tobias Schultze 32 | */ 33 | class Requirement 34 | { 35 | private $fulfilled; 36 | private $testMessage; 37 | private $helpText; 38 | private $helpHtml; 39 | private $optional; 40 | 41 | /** 42 | * Constructor that initializes the requirement. 43 | * 44 | * @param bool $fulfilled Whether the requirement is fulfilled 45 | * @param string $testMessage The message for testing the requirement 46 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 47 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 48 | * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement 49 | */ 50 | public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) 51 | { 52 | $this->fulfilled = (bool) $fulfilled; 53 | $this->testMessage = (string) $testMessage; 54 | $this->helpHtml = (string) $helpHtml; 55 | $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; 56 | $this->optional = (bool) $optional; 57 | } 58 | 59 | /** 60 | * Returns whether the requirement is fulfilled. 61 | * 62 | * @return bool true if fulfilled, otherwise false 63 | */ 64 | public function isFulfilled() 65 | { 66 | return $this->fulfilled; 67 | } 68 | 69 | /** 70 | * Returns the message for testing the requirement. 71 | * 72 | * @return string The test message 73 | */ 74 | public function getTestMessage() 75 | { 76 | return $this->testMessage; 77 | } 78 | 79 | /** 80 | * Returns the help text for resolving the problem. 81 | * 82 | * @return string The help text 83 | */ 84 | public function getHelpText() 85 | { 86 | return $this->helpText; 87 | } 88 | 89 | /** 90 | * Returns the help text formatted in HTML. 91 | * 92 | * @return string The HTML help 93 | */ 94 | public function getHelpHtml() 95 | { 96 | return $this->helpHtml; 97 | } 98 | 99 | /** 100 | * Returns whether this is only an optional recommendation and not a mandatory requirement. 101 | * 102 | * @return bool true if optional, false if mandatory 103 | */ 104 | public function isOptional() 105 | { 106 | return $this->optional; 107 | } 108 | } 109 | 110 | /** 111 | * Represents a PHP requirement in form of a php.ini configuration. 112 | * 113 | * @author Tobias Schultze 114 | */ 115 | class PhpIniRequirement extends Requirement 116 | { 117 | /** 118 | * Constructor that initializes the requirement. 119 | * 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, 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. 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. 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) 128 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 129 | * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement 130 | */ 131 | public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) 132 | { 133 | $cfgValue = ini_get($cfgName); 134 | 135 | if (is_callable($evaluation)) { 136 | if (null === $testMessage || null === $helpHtml) { 137 | throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.'); 138 | } 139 | 140 | $fulfilled = call_user_func($evaluation, $cfgValue); 141 | } else { 142 | if (null === $testMessage) { 143 | $testMessage = sprintf('%s %s be %s in php.ini', 144 | $cfgName, 145 | $optional ? 'should' : 'must', 146 | $evaluation ? 'enabled' : 'disabled' 147 | ); 148 | } 149 | 150 | if (null === $helpHtml) { 151 | $helpHtml = sprintf('Set %s to %s in php.ini*.', 152 | $cfgName, 153 | $evaluation ? 'on' : 'off' 154 | ); 155 | } 156 | 157 | $fulfilled = $evaluation == $cfgValue; 158 | } 159 | 160 | parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional); 161 | } 162 | } 163 | 164 | /** 165 | * A RequirementCollection represents a set of Requirement instances. 166 | * 167 | * @author Tobias Schultze 168 | */ 169 | class RequirementCollection implements IteratorAggregate 170 | { 171 | private $requirements = array(); 172 | 173 | /** 174 | * Gets the current RequirementCollection as an Iterator. 175 | * 176 | * @return Traversable A Traversable interface 177 | */ 178 | public function getIterator() 179 | { 180 | return new ArrayIterator($this->requirements); 181 | } 182 | 183 | /** 184 | * Adds a Requirement. 185 | * 186 | * @param Requirement $requirement A Requirement instance 187 | */ 188 | public function add(Requirement $requirement) 189 | { 190 | $this->requirements[] = $requirement; 191 | } 192 | 193 | /** 194 | * Adds a mandatory requirement. 195 | * 196 | * @param bool $fulfilled Whether the requirement is fulfilled 197 | * @param string $testMessage The message for testing the requirement 198 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 199 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 200 | */ 201 | public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null) 202 | { 203 | $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false)); 204 | } 205 | 206 | /** 207 | * Adds an optional recommendation. 208 | * 209 | * @param bool $fulfilled Whether the recommendation is fulfilled 210 | * @param string $testMessage The message for testing the recommendation 211 | * @param string $helpHtml The help text formatted in HTML for resolving the problem 212 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 213 | */ 214 | public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null) 215 | { 216 | $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true)); 217 | } 218 | 219 | /** 220 | * Adds a mandatory requirement in form of a php.ini configuration. 221 | * 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, 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. 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. 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) 230 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 231 | */ 232 | public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) 233 | { 234 | $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false)); 235 | } 236 | 237 | /** 238 | * Adds an optional recommendation in form of a php.ini configuration. 239 | * 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, 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. 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. 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) 248 | * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 249 | */ 250 | public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) 251 | { 252 | $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true)); 253 | } 254 | 255 | /** 256 | * Adds a requirement collection to the current set of requirements. 257 | * 258 | * @param RequirementCollection $collection A RequirementCollection instance 259 | */ 260 | public function addCollection(RequirementCollection $collection) 261 | { 262 | $this->requirements = array_merge($this->requirements, $collection->all()); 263 | } 264 | 265 | /** 266 | * Returns both requirements and recommendations. 267 | * 268 | * @return array Array of Requirement instances 269 | */ 270 | public function all() 271 | { 272 | return $this->requirements; 273 | } 274 | 275 | /** 276 | * Returns all mandatory requirements. 277 | * 278 | * @return array Array of Requirement instances 279 | */ 280 | public function getRequirements() 281 | { 282 | $array = array(); 283 | foreach ($this->requirements as $req) { 284 | if (!$req->isOptional()) { 285 | $array[] = $req; 286 | } 287 | } 288 | 289 | return $array; 290 | } 291 | 292 | /** 293 | * Returns the mandatory requirements that were not met. 294 | * 295 | * @return array Array of Requirement instances 296 | */ 297 | public function getFailedRequirements() 298 | { 299 | $array = array(); 300 | foreach ($this->requirements as $req) { 301 | if (!$req->isFulfilled() && !$req->isOptional()) { 302 | $array[] = $req; 303 | } 304 | } 305 | 306 | return $array; 307 | } 308 | 309 | /** 310 | * Returns all optional recommendations. 311 | * 312 | * @return array Array of Requirement instances 313 | */ 314 | public function getRecommendations() 315 | { 316 | $array = array(); 317 | foreach ($this->requirements as $req) { 318 | if ($req->isOptional()) { 319 | $array[] = $req; 320 | } 321 | } 322 | 323 | return $array; 324 | } 325 | 326 | /** 327 | * Returns the recommendations that were not met. 328 | * 329 | * @return array Array of Requirement instances 330 | */ 331 | public function getFailedRecommendations() 332 | { 333 | $array = array(); 334 | foreach ($this->requirements as $req) { 335 | if (!$req->isFulfilled() && $req->isOptional()) { 336 | $array[] = $req; 337 | } 338 | } 339 | 340 | return $array; 341 | } 342 | 343 | /** 344 | * Returns whether a php.ini configuration is not correct. 345 | * 346 | * @return bool php.ini configuration problem? 347 | */ 348 | public function hasPhpIniConfigIssue() 349 | { 350 | foreach ($this->requirements as $req) { 351 | if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) { 352 | return true; 353 | } 354 | } 355 | 356 | return false; 357 | } 358 | 359 | /** 360 | * Returns the PHP configuration file (php.ini) path. 361 | * 362 | * @return string|false php.ini file path 363 | */ 364 | public function getPhpIniConfigPath() 365 | { 366 | return get_cfg_var('cfg_file_path'); 367 | } 368 | } 369 | 370 | /** 371 | * This class specifies all requirements and optional recommendations that 372 | * are necessary to run the Symfony Standard Edition. 373 | * 374 | * @author Tobias Schultze 375 | * @author Fabien Potencier 376 | */ 377 | class SymfonyRequirements extends RequirementCollection 378 | { 379 | const REQUIRED_PHP_VERSION = '5.3.3'; 380 | 381 | /** 382 | * Constructor that initializes the requirements. 383 | */ 384 | public function __construct() 385 | { 386 | /* mandatory requirements follow */ 387 | 388 | $installedPhpVersion = phpversion(); 389 | 390 | $this->addRequirement( 391 | version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='), 392 | sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion), 393 | sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run. 394 | Before using Symfony, upgrade your PHP installation, preferably to the latest version.', 395 | $installedPhpVersion, self::REQUIRED_PHP_VERSION), 396 | sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion) 397 | ); 398 | 399 | $this->addRequirement( 400 | version_compare($installedPhpVersion, '5.3.16', '!='), 401 | 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', 402 | 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)' 403 | ); 404 | 405 | $this->addRequirement( 406 | is_dir(__DIR__.'/../vendor/composer'), 407 | 'Vendor libraries must be installed', 408 | 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. '. 409 | 'Then run "php composer.phar install" to install them.' 410 | ); 411 | 412 | $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; 413 | 414 | $this->addRequirement( 415 | is_writable($cacheDir), 416 | 'app/cache/ or var/cache/ directory must be writable', 417 | 'Change the permissions of either "app/cache/" or "var/cache/" directory so that the web server can write into it.' 418 | ); 419 | 420 | $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; 421 | 422 | $this->addRequirement( 423 | is_writable($logsDir), 424 | 'app/logs/ or var/logs/ directory must be writable', 425 | 'Change the permissions of either "app/logs/" or "var/logs/" directory so that the web server can write into it.' 426 | ); 427 | 428 | if (version_compare($installedPhpVersion, '7.0.0', '<')) { 429 | $this->addPhpIniRequirement( 430 | 'date.timezone', true, false, 431 | 'date.timezone setting must be set', 432 | 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).' 433 | ); 434 | } 435 | 436 | if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) { 437 | $timezones = array(); 438 | foreach (DateTimeZone::listAbbreviations() as $abbreviations) { 439 | foreach ($abbreviations as $abbreviation) { 440 | $timezones[$abbreviation['timezone_id']] = true; 441 | } 442 | } 443 | 444 | $this->addRequirement( 445 | isset($timezones[@date_default_timezone_get()]), 446 | sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), 447 | 'Your default timezone is not supported by PHP. Check for typos in your php.ini file and have a look at the list of deprecated timezones at http://php.net/manual/en/timezones.others.php.' 448 | ); 449 | } 450 | 451 | $this->addRequirement( 452 | function_exists('iconv'), 453 | 'iconv() must be available', 454 | 'Install and enable the iconv extension.' 455 | ); 456 | 457 | $this->addRequirement( 458 | function_exists('json_encode'), 459 | 'json_encode() must be available', 460 | 'Install and enable the JSON extension.' 461 | ); 462 | 463 | $this->addRequirement( 464 | function_exists('session_start'), 465 | 'session_start() must be available', 466 | 'Install and enable the session extension.' 467 | ); 468 | 469 | $this->addRequirement( 470 | function_exists('ctype_alpha'), 471 | 'ctype_alpha() must be available', 472 | 'Install and enable the ctype extension.' 473 | ); 474 | 475 | $this->addRequirement( 476 | function_exists('token_get_all'), 477 | 'token_get_all() must be available', 478 | 'Install and enable the Tokenizer extension.' 479 | ); 480 | 481 | $this->addRequirement( 482 | function_exists('simplexml_import_dom'), 483 | 'simplexml_import_dom() must be available', 484 | 'Install and enable the SimpleXML extension.' 485 | ); 486 | 487 | if (function_exists('apc_store') && ini_get('apc.enabled')) { 488 | if (version_compare($installedPhpVersion, '5.4.0', '>=')) { 489 | $this->addRequirement( 490 | version_compare(phpversion('apc'), '3.1.13', '>='), 491 | 'APC version must be at least 3.1.13 when using PHP 5.4', 492 | 'Upgrade your APC extension (3.1.13+).' 493 | ); 494 | } else { 495 | $this->addRequirement( 496 | version_compare(phpversion('apc'), '3.0.17', '>='), 497 | 'APC version must be at least 3.0.17', 498 | 'Upgrade your APC extension (3.0.17+).' 499 | ); 500 | } 501 | } 502 | 503 | $this->addPhpIniRequirement('detect_unicode', false); 504 | 505 | if (extension_loaded('suhosin')) { 506 | $this->addPhpIniRequirement( 507 | 'suhosin.executor.include.whitelist', 508 | create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'), 509 | false, 510 | 'suhosin.executor.include.whitelist must be configured correctly in php.ini', 511 | 'Add "phar" to suhosin.executor.include.whitelist in php.ini*.' 512 | ); 513 | } 514 | 515 | if (extension_loaded('xdebug')) { 516 | $this->addPhpIniRequirement( 517 | 'xdebug.show_exception_trace', false, true 518 | ); 519 | 520 | $this->addPhpIniRequirement( 521 | 'xdebug.scream', false, true 522 | ); 523 | 524 | $this->addPhpIniRecommendation( 525 | 'xdebug.max_nesting_level', 526 | create_function('$cfgValue', 'return $cfgValue > 100;'), 527 | true, 528 | 'xdebug.max_nesting_level should be above 100 in php.ini', 529 | 'Set "xdebug.max_nesting_level" to e.g. "250" in php.ini* to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' 530 | ); 531 | } 532 | 533 | $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; 534 | 535 | $this->addRequirement( 536 | null !== $pcreVersion, 537 | 'PCRE extension must be available', 538 | 'Install the PCRE extension (version 8.0+).' 539 | ); 540 | 541 | if (extension_loaded('mbstring')) { 542 | $this->addPhpIniRequirement( 543 | 'mbstring.func_overload', 544 | create_function('$cfgValue', 'return (int) $cfgValue === 0;'), 545 | true, 546 | 'string functions should not be overloaded', 547 | 'Set "mbstring.func_overload" to 0 in php.ini* to disable function overloading by the mbstring extension.' 548 | ); 549 | } 550 | 551 | /* optional recommendations follow */ 552 | 553 | if (file_exists(__DIR__.'/../vendor/composer')) { 554 | require_once __DIR__.'/../vendor/autoload.php'; 555 | 556 | try { 557 | $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); 558 | 559 | $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); 560 | } catch (ReflectionException $e) { 561 | $contents = ''; 562 | } 563 | $this->addRecommendation( 564 | file_get_contents(__FILE__) === $contents, 565 | 'Requirements file should be up-to-date', 566 | 'Your requirements file is outdated. Run composer install and re-check your configuration.' 567 | ); 568 | } 569 | 570 | $this->addRecommendation( 571 | version_compare($installedPhpVersion, '5.3.4', '>='), 572 | 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions', 573 | 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.' 574 | ); 575 | 576 | $this->addRecommendation( 577 | version_compare($installedPhpVersion, '5.3.8', '>='), 578 | 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156', 579 | 'Install PHP 5.3.8 or newer if your project uses annotations.' 580 | ); 581 | 582 | $this->addRecommendation( 583 | version_compare($installedPhpVersion, '5.4.0', '!='), 584 | 'You should not use PHP 5.4.0 due to the PHP bug #61453', 585 | 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' 586 | ); 587 | 588 | $this->addRecommendation( 589 | version_compare($installedPhpVersion, '5.4.11', '>='), 590 | 'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)', 591 | 'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.' 592 | ); 593 | 594 | $this->addRecommendation( 595 | (version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<')) 596 | || 597 | version_compare($installedPhpVersion, '5.4.8', '>='), 598 | 'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909', 599 | 'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.' 600 | ); 601 | 602 | if (null !== $pcreVersion) { 603 | $this->addRecommendation( 604 | $pcreVersion >= 8.0, 605 | sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), 606 | 'PCRE 8.0+ is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' 607 | ); 608 | } 609 | 610 | $this->addRecommendation( 611 | class_exists('DomDocument'), 612 | 'PHP-DOM and PHP-XML modules should be installed', 613 | 'Install and enable the PHP-DOM and the PHP-XML modules.' 614 | ); 615 | 616 | $this->addRecommendation( 617 | function_exists('mb_strlen'), 618 | 'mb_strlen() should be available', 619 | 'Install and enable the mbstring extension.' 620 | ); 621 | 622 | $this->addRecommendation( 623 | function_exists('iconv'), 624 | 'iconv() should be available', 625 | 'Install and enable the iconv extension.' 626 | ); 627 | 628 | $this->addRecommendation( 629 | function_exists('utf8_decode'), 630 | 'utf8_decode() should be available', 631 | 'Install and enable the XML extension.' 632 | ); 633 | 634 | $this->addRecommendation( 635 | function_exists('filter_var'), 636 | 'filter_var() should be available', 637 | 'Install and enable the filter extension.' 638 | ); 639 | 640 | if (!defined('PHP_WINDOWS_VERSION_BUILD')) { 641 | $this->addRecommendation( 642 | function_exists('posix_isatty'), 643 | 'posix_isatty() should be available', 644 | 'Install and enable the php_posix extension (used to colorize the CLI output).' 645 | ); 646 | } 647 | 648 | $this->addRecommendation( 649 | extension_loaded('intl'), 650 | 'intl extension should be available', 651 | 'Install and enable the intl extension (used for validators).' 652 | ); 653 | 654 | if (extension_loaded('intl')) { 655 | // in some WAMP server installations, new Collator() returns null 656 | $this->addRecommendation( 657 | null !== new Collator('fr_FR'), 658 | 'intl extension should be correctly configured', 659 | 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' 660 | ); 661 | 662 | // check for compatible ICU versions (only done when you have the intl extension) 663 | if (defined('INTL_ICU_VERSION')) { 664 | $version = INTL_ICU_VERSION; 665 | } else { 666 | $reflector = new ReflectionExtension('intl'); 667 | 668 | ob_start(); 669 | $reflector->info(); 670 | $output = strip_tags(ob_get_clean()); 671 | 672 | preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches); 673 | $version = $matches[1]; 674 | } 675 | 676 | $this->addRecommendation( 677 | version_compare($version, '4.0', '>='), 678 | 'intl ICU version should be at least 4+', 679 | 'Upgrade your intl extension with a newer ICU version (4+).' 680 | ); 681 | 682 | if (class_exists('Symfony\Component\Intl\Intl')) { 683 | $this->addRecommendation( 684 | \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), 685 | sprintf('intl ICU version installed on your system (%s) should match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), 686 | 'In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.' 687 | ); 688 | } 689 | 690 | $this->addPhpIniRecommendation( 691 | 'intl.error_level', 692 | create_function('$cfgValue', 'return (int) $cfgValue === 0;'), 693 | true, 694 | 'intl.error_level should be 0 in php.ini', 695 | 'Set "intl.error_level" to "0" in php.ini* to inhibit the messages when an error occurs in ICU functions.' 696 | ); 697 | } 698 | 699 | $accelerator = 700 | (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) 701 | || 702 | (extension_loaded('apc') && ini_get('apc.enabled')) 703 | || 704 | (extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable')) 705 | || 706 | (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) 707 | || 708 | (extension_loaded('xcache') && ini_get('xcache.cacher')) 709 | || 710 | (extension_loaded('wincache') && ini_get('wincache.ocenabled')) 711 | ; 712 | 713 | $this->addRecommendation( 714 | $accelerator, 715 | 'a PHP accelerator should be installed', 716 | 'Install and/or enable a PHP accelerator (highly recommended).' 717 | ); 718 | 719 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { 720 | $this->addRecommendation( 721 | $this->getRealpathCacheSize() > 1000, 722 | 'realpath_cache_size should be above 1024 in php.ini', 723 | 'Set "realpath_cache_size" to e.g. "1024" in php.ini* to improve performance on windows.' 724 | ); 725 | } 726 | 727 | $this->addPhpIniRecommendation('short_open_tag', false); 728 | 729 | $this->addPhpIniRecommendation('magic_quotes_gpc', false, true); 730 | 731 | $this->addPhpIniRecommendation('register_globals', false, true); 732 | 733 | $this->addPhpIniRecommendation('session.auto_start', false); 734 | 735 | $this->addRecommendation( 736 | class_exists('PDO'), 737 | 'PDO should be installed', 738 | 'Install PDO (mandatory for Doctrine).' 739 | ); 740 | 741 | if (class_exists('PDO')) { 742 | $drivers = PDO::getAvailableDrivers(); 743 | $this->addRecommendation( 744 | count($drivers) > 0, 745 | sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), 746 | 'Install PDO drivers (mandatory for Doctrine).' 747 | ); 748 | } 749 | } 750 | 751 | /** 752 | * Loads realpath_cache_size from php.ini and converts it to int. 753 | * 754 | * (e.g. 16k is converted to 16384 int) 755 | * 756 | * @return int 757 | */ 758 | protected function getRealpathCacheSize() 759 | { 760 | $size = ini_get('realpath_cache_size'); 761 | $size = trim($size); 762 | $unit = strtolower(substr($size, -1, 1)); 763 | switch ($unit) { 764 | case 'g': 765 | return $size * 1024 * 1024 * 1024; 766 | case 'm': 767 | return $size * 1024 * 1024; 768 | case 'k': 769 | return $size * 1024; 770 | default: 771 | return (int) $size; 772 | } 773 | } 774 | } 775 | -------------------------------------------------------------------------------- /app/autoload.php: -------------------------------------------------------------------------------- 1 | getPhpIniConfigPath(); 8 | 9 | echo_title('Symfony Requirements Checker'); 10 | 11 | echo '> PHP is using the following php.ini file:'.PHP_EOL; 12 | if ($iniPath) { 13 | echo_style('green', ' '.$iniPath); 14 | } else { 15 | echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!'); 16 | } 17 | 18 | echo PHP_EOL.PHP_EOL; 19 | 20 | echo '> Checking Symfony requirements:'.PHP_EOL.' '; 21 | 22 | $messages = array(); 23 | foreach ($symfonyRequirements->getRequirements() as $req) { 24 | /** @var $req Requirement */ 25 | if ($helpText = get_error_message($req, $lineSize)) { 26 | echo_style('red', 'E'); 27 | $messages['error'][] = $helpText; 28 | } else { 29 | echo_style('green', '.'); 30 | } 31 | } 32 | 33 | $checkPassed = empty($messages['error']); 34 | 35 | foreach ($symfonyRequirements->getRecommendations() as $req) { 36 | if ($helpText = get_error_message($req, $lineSize)) { 37 | echo_style('yellow', 'W'); 38 | $messages['warning'][] = $helpText; 39 | } else { 40 | echo_style('green', '.'); 41 | } 42 | } 43 | 44 | if ($checkPassed) { 45 | echo_block('success', 'OK', 'Your system is ready to run Symfony projects'); 46 | } else { 47 | echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects'); 48 | 49 | echo_title('Fix the following mandatory requirements', 'red'); 50 | 51 | foreach ($messages['error'] as $helpText) { 52 | echo ' * '.$helpText.PHP_EOL; 53 | } 54 | } 55 | 56 | if (!empty($messages['warning'])) { 57 | echo_title('Optional recommendations to improve your setup', 'yellow'); 58 | 59 | foreach ($messages['warning'] as $helpText) { 60 | echo ' * '.$helpText.PHP_EOL; 61 | } 62 | } 63 | 64 | echo PHP_EOL; 65 | echo_style('title', 'Note'); 66 | echo ' The command console could use a different php.ini file'.PHP_EOL; 67 | echo_style('title', '~~~~'); 68 | echo ' than the one used with your web server. To be on the'.PHP_EOL; 69 | echo ' safe side, please check the requirements from your web'.PHP_EOL; 70 | echo ' server using the '; 71 | echo_style('yellow', 'web/config.php'); 72 | echo ' script.'.PHP_EOL; 73 | echo PHP_EOL; 74 | 75 | exit($checkPassed ? 0 : 1); 76 | 77 | function get_error_message(Requirement $requirement, $lineSize) 78 | { 79 | if ($requirement->isFulfilled()) { 80 | return; 81 | } 82 | 83 | $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; 84 | $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; 85 | 86 | return $errorMessage; 87 | } 88 | 89 | function echo_title($title, $style = null) 90 | { 91 | $style = $style ?: 'title'; 92 | 93 | echo PHP_EOL; 94 | echo_style($style, $title.PHP_EOL); 95 | echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); 96 | echo PHP_EOL; 97 | } 98 | 99 | function echo_style($style, $message) 100 | { 101 | // ANSI color codes 102 | $styles = array( 103 | 'reset' => "\033[0m", 104 | 'red' => "\033[31m", 105 | 'green' => "\033[32m", 106 | 'yellow' => "\033[33m", 107 | 'error' => "\033[37;41m", 108 | 'success' => "\033[37;42m", 109 | 'title' => "\033[34m", 110 | ); 111 | $supports = has_color_support(); 112 | 113 | echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); 114 | } 115 | 116 | function echo_block($style, $title, $message) 117 | { 118 | $message = ' '.trim($message).' '; 119 | $width = strlen($message); 120 | 121 | echo PHP_EOL.PHP_EOL; 122 | 123 | echo_style($style, str_repeat(' ', $width).PHP_EOL); 124 | echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL); 125 | echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL); 126 | echo_style($style, str_repeat(' ', $width).PHP_EOL); 127 | } 128 | 129 | function has_color_support() 130 | { 131 | static $support; 132 | 133 | if (null === $support) { 134 | if (DIRECTORY_SEPARATOR == '\\') { 135 | $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); 136 | } else { 137 | $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); 138 | } 139 | } 140 | 141 | return $support; 142 | } 143 | -------------------------------------------------------------------------------- /app/config/config.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: parameters.yml } 3 | - { resource: security.yml } 4 | - { resource: services.yml } 5 | 6 | # Put parameters here that don't need to change on each machine where the app is deployed 7 | # http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration 8 | parameters: 9 | locale: en 10 | 11 | framework: 12 | #esi: ~ 13 | translator: { fallbacks: ["%locale%"] } 14 | secret: "%secret%" 15 | router: 16 | resource: "%kernel.root_dir%/config/routing.yml" 17 | strict_requirements: ~ 18 | form: ~ 19 | csrf_protection: ~ 20 | validation: { enable_annotations: true } 21 | #serializer: { enable_annotations: true } 22 | templating: 23 | engines: ['twig'] 24 | default_locale: "%locale%" 25 | trusted_hosts: ~ 26 | trusted_proxies: ~ 27 | session: 28 | # handler_id set to null will use default session handler from php.ini 29 | handler_id: ~ 30 | fragments: ~ 31 | http_method_override: true 32 | 33 | # Twig Configuration 34 | twig: 35 | debug: "%kernel.debug%" 36 | strict_variables: "%kernel.debug%" 37 | 38 | # Doctrine Configuration 39 | doctrine: 40 | dbal: 41 | driver: pdo_mysql 42 | host: "%database_host%" 43 | port: "%database_port%" 44 | dbname: "%database_name%" 45 | user: "%database_user%" 46 | password: "%database_password%" 47 | charset: UTF8 48 | # if using pdo_sqlite as your database driver: 49 | # 1. add the path in parameters.yml 50 | # e.g. database_path: "%kernel.root_dir%/data/data.db3" 51 | # 2. Uncomment database_path in parameters.yml.dist 52 | # 3. Uncomment next line: 53 | # path: "%database_path%" 54 | 55 | orm: 56 | auto_generate_proxy_classes: "%kernel.debug%" 57 | naming_strategy: doctrine.orm.naming_strategy.underscore 58 | auto_mapping: true 59 | 60 | # Swiftmailer Configuration 61 | swiftmailer: 62 | transport: "%mailer_transport%" 63 | host: "%mailer_host%" 64 | username: "%mailer_user%" 65 | password: "%mailer_password%" 66 | spool: { type: memory } 67 | 68 | # FOSOAuthServerBundle Configuration 69 | fos_oauth_server: 70 | db_driver: orm 71 | client_class: AppBundle\Entity\OAuthClient 72 | access_token_class: AppBundle\Entity\OAuthAccessToken 73 | refresh_token_class: AppBundle\Entity\OAuthRefreshToken 74 | auth_code_class: AppBundle\Entity\OAuthAuthCode 75 | service: 76 | client_manager: app.manager.oauth_client 77 | options: 78 | supported_scopes: client widget 79 | 80 | # FOSRestBundle Configuration 81 | fos_rest: 82 | param_fetcher_listener: true 83 | body_listener: true 84 | format_listener: 85 | rules: 86 | - { path: '^/api', priorities: ['json'], fallback_format: json, prefer_extension: false } 87 | - { path: '^/', stop: true } 88 | view: 89 | view_response_listener: true 90 | access_denied_listener: 91 | json: true 92 | -------------------------------------------------------------------------------- /app/config/config_dev.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | framework: 5 | router: 6 | resource: "%kernel.root_dir%/config/routing_dev.yml" 7 | strict_requirements: true 8 | profiler: { only_exceptions: false } 9 | 10 | web_profiler: 11 | toolbar: true 12 | intercept_redirects: false 13 | 14 | monolog: 15 | handlers: 16 | main: 17 | type: stream 18 | path: "%kernel.logs_dir%/%kernel.environment%.log" 19 | level: debug 20 | channels: [!event] 21 | console: 22 | type: console 23 | channels: [!event, !doctrine] 24 | # uncomment to get logging in your browser 25 | # you may have to allow bigger header sizes in your Web server configuration 26 | #firephp: 27 | # type: firephp 28 | # level: info 29 | #chromephp: 30 | # type: chromephp 31 | # level: info 32 | 33 | #swiftmailer: 34 | # delivery_address: me@example.com 35 | -------------------------------------------------------------------------------- /app/config/config_prod.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config.yml } 3 | 4 | #framework: 5 | # validation: 6 | # cache: validator.mapping.cache.doctrine.apc 7 | # serializer: 8 | # cache: serializer.mapping.cache.apc 9 | 10 | #doctrine: 11 | # orm: 12 | # metadata_cache_driver: apc 13 | # result_cache_driver: apc 14 | # query_cache_driver: apc 15 | 16 | monolog: 17 | handlers: 18 | main: 19 | type: fingers_crossed 20 | action_level: error 21 | handler: nested 22 | nested: 23 | type: stream 24 | path: "%kernel.logs_dir%/%kernel.environment%.log" 25 | level: debug 26 | console: 27 | type: console 28 | -------------------------------------------------------------------------------- /app/config/config_test.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: config_dev.yml } 3 | 4 | framework: 5 | test: ~ 6 | session: 7 | storage_id: session.storage.mock_file 8 | profiler: 9 | collect: false 10 | 11 | web_profiler: 12 | toolbar: false 13 | intercept_redirects: false 14 | 15 | swiftmailer: 16 | disable_delivery: true 17 | -------------------------------------------------------------------------------- /app/config/parameters.yml.dist: -------------------------------------------------------------------------------- 1 | # This file is a "template" of what your parameters.yml file should look like 2 | # Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production. 3 | # http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration 4 | parameters: 5 | database_host: 127.0.0.1 6 | database_port: ~ 7 | database_name: restaurant_app 8 | database_user: root 9 | database_password: ~ 10 | # You should uncomment this if you want use pdo_sqlite 11 | # database_path: "%kernel.root_dir%/data.db3" 12 | 13 | mailer_transport: smtp 14 | mailer_host: 127.0.0.1 15 | mailer_user: ~ 16 | mailer_password: ~ 17 | 18 | # A secret key that's used to generate certain security-related tokens 19 | secret: ThisTokenIsNotSoSecretChangeIt 20 | -------------------------------------------------------------------------------- /app/config/routing.yml: -------------------------------------------------------------------------------- 1 | app: 2 | resource: "@AppBundle/Controller/" 3 | type: annotation 4 | 5 | app_api: 6 | resource: "@AppBundle/Controller/Api" 7 | type: annotation 8 | prefix: /api 9 | 10 | fos_oauth_server_token: 11 | resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" 12 | -------------------------------------------------------------------------------- /app/config/routing_dev.yml: -------------------------------------------------------------------------------- 1 | _wdt: 2 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" 3 | prefix: /_wdt 4 | 5 | _profiler: 6 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" 7 | prefix: /_profiler 8 | 9 | _errors: 10 | resource: "@TwigBundle/Resources/config/routing/errors.xml" 11 | prefix: /_error 12 | 13 | _main: 14 | resource: routing.yml 15 | -------------------------------------------------------------------------------- /app/config/security.yml: -------------------------------------------------------------------------------- 1 | # To get started with security, check out the documentation: 2 | # http://symfony.com/doc/current/book/security.html 3 | security: 4 | 5 | # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers 6 | providers: 7 | in_memory: 8 | memory: ~ 9 | 10 | firewalls: 11 | # disables authentication for assets and the profiler, adapt it according to your needs 12 | dev: 13 | pattern: ^/(_(profiler|wdt)|css|images|js)/ 14 | security: false 15 | 16 | oauth_token: 17 | pattern: ^/oauth/v2/token 18 | security: false 19 | 20 | api: 21 | pattern: ^/api 22 | fos_oauth: true 23 | stateless: true 24 | 25 | main: 26 | anonymous: ~ 27 | # activate different ways to authenticate 28 | 29 | # http_basic: ~ 30 | # http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate 31 | 32 | # form_login: ~ 33 | # http://symfony.com/doc/current/cookbook/security/form_login_setup.html 34 | 35 | access_control: 36 | - { path: ^/api, role: IS_AUTHENTICATED_FULLY } 37 | -------------------------------------------------------------------------------- /app/config/services.yml: -------------------------------------------------------------------------------- 1 | services: 2 | app.manager.oauth_client: 3 | class: AppBundle\Entity\Manager\OAuthClientManager 4 | arguments: ["@fos_oauth_server.entity_manager", "%fos_oauth_server.model.client.class%"] 5 | -------------------------------------------------------------------------------- /app/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); 21 | $debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; 22 | 23 | if ($debug) { 24 | Debug::enable(); 25 | } 26 | 27 | $kernel = new AppKernel($env, $debug); 28 | $application = new Application($kernel); 29 | $application->run($input); 30 | -------------------------------------------------------------------------------- /app/logs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codevate/public-api-blog-post-example/65ed79b6517c71893fa1642ab3139d958d36be24/app/logs/.gitkeep -------------------------------------------------------------------------------- /app/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | ../src/*/*Bundle/Tests 20 | ../src/*/Bundle/*Bundle/Tests 21 | ../src/*Bundle/Tests 22 | 23 | 24 | 25 | 26 | 27 | ../src 28 | 29 | ../src/*Bundle/Resources 30 | ../src/*Bundle/Tests 31 | ../src/*/*Bundle/Resources 32 | ../src/*/*Bundle/Tests 33 | ../src/*/Bundle/*Bundle/Resources 34 | ../src/*/Bundle/*Bundle/Tests 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chris/public.api.blog.post", 3 | "license": "proprietary", 4 | "type": "project", 5 | "autoload": { 6 | "psr-4": { 7 | "": "src/" 8 | }, 9 | "classmap": [ 10 | "app/AppKernel.php", 11 | "app/AppCache.php" 12 | ] 13 | }, 14 | "require": { 15 | "php": ">=5.3.9", 16 | "symfony/symfony": "2.8.*", 17 | "doctrine/orm": "^2.4.8", 18 | "doctrine/doctrine-bundle": "~1.4", 19 | "symfony/swiftmailer-bundle": "~2.3", 20 | "symfony/monolog-bundle": "~2.4", 21 | "sensio/distribution-bundle": "~5.0", 22 | "sensio/framework-extra-bundle": "^3.0.2", 23 | "incenteev/composer-parameter-handler": "~2.0", 24 | "friendsofsymfony/oauth-server-bundle": "^1.5", 25 | "hashids/hashids": "^1.0", 26 | "friendsofsymfony/rest-bundle": "^2.0", 27 | "jms/serializer-bundle": "^1.1" 28 | }, 29 | "require-dev": { 30 | "sensio/generator-bundle": "~3.0", 31 | "symfony/phpunit-bridge": "~2.7" 32 | }, 33 | "scripts": { 34 | "post-install-cmd": [ 35 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 36 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 37 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 38 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 39 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 40 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 41 | ], 42 | "post-update-cmd": [ 43 | "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", 44 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", 45 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", 46 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", 47 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", 48 | "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" 49 | ] 50 | }, 51 | "config": { 52 | "bin-dir": "bin" 53 | }, 54 | "extra": { 55 | "symfony-app-dir": "app", 56 | "symfony-web-dir": "web", 57 | "symfony-assets-install": "relative", 58 | "incenteev-parameters": { 59 | "file": "app/config/parameters.yml" 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "f5ff72c691b8008568318b0d1f3ab1a0", 8 | "content-hash": "db4e84c67c8d55d986169c2a8064a61a", 9 | "packages": [ 10 | { 11 | "name": "doctrine/annotations", 12 | "version": "v1.2.7", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/doctrine/annotations.git", 16 | "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", 21 | "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "doctrine/lexer": "1.*", 26 | "php": ">=5.3.2" 27 | }, 28 | "require-dev": { 29 | "doctrine/cache": "1.*", 30 | "phpunit/phpunit": "4.*" 31 | }, 32 | "type": "library", 33 | "extra": { 34 | "branch-alias": { 35 | "dev-master": "1.3.x-dev" 36 | } 37 | }, 38 | "autoload": { 39 | "psr-0": { 40 | "Doctrine\\Common\\Annotations\\": "lib/" 41 | } 42 | }, 43 | "notification-url": "https://packagist.org/downloads/", 44 | "license": [ 45 | "MIT" 46 | ], 47 | "authors": [ 48 | { 49 | "name": "Roman Borschel", 50 | "email": "roman@code-factory.org" 51 | }, 52 | { 53 | "name": "Benjamin Eberlei", 54 | "email": "kontakt@beberlei.de" 55 | }, 56 | { 57 | "name": "Guilherme Blanco", 58 | "email": "guilhermeblanco@gmail.com" 59 | }, 60 | { 61 | "name": "Jonathan Wage", 62 | "email": "jonwage@gmail.com" 63 | }, 64 | { 65 | "name": "Johannes Schmitt", 66 | "email": "schmittjoh@gmail.com" 67 | } 68 | ], 69 | "description": "Docblock Annotations Parser", 70 | "homepage": "http://www.doctrine-project.org", 71 | "keywords": [ 72 | "annotations", 73 | "docblock", 74 | "parser" 75 | ], 76 | "time": "2015-08-31 12:32:49" 77 | }, 78 | { 79 | "name": "doctrine/cache", 80 | "version": "v1.5.4", 81 | "source": { 82 | "type": "git", 83 | "url": "https://github.com/doctrine/cache.git", 84 | "reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136" 85 | }, 86 | "dist": { 87 | "type": "zip", 88 | "url": "https://api.github.com/repos/doctrine/cache/zipball/47cdc76ceb95cc591d9c79a36dc3794975b5d136", 89 | "reference": "47cdc76ceb95cc591d9c79a36dc3794975b5d136", 90 | "shasum": "" 91 | }, 92 | "require": { 93 | "php": ">=5.3.2" 94 | }, 95 | "conflict": { 96 | "doctrine/common": ">2.2,<2.4" 97 | }, 98 | "require-dev": { 99 | "phpunit/phpunit": ">=3.7", 100 | "predis/predis": "~1.0", 101 | "satooshi/php-coveralls": "~0.6" 102 | }, 103 | "type": "library", 104 | "extra": { 105 | "branch-alias": { 106 | "dev-master": "1.5.x-dev" 107 | } 108 | }, 109 | "autoload": { 110 | "psr-4": { 111 | "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" 112 | } 113 | }, 114 | "notification-url": "https://packagist.org/downloads/", 115 | "license": [ 116 | "MIT" 117 | ], 118 | "authors": [ 119 | { 120 | "name": "Roman Borschel", 121 | "email": "roman@code-factory.org" 122 | }, 123 | { 124 | "name": "Benjamin Eberlei", 125 | "email": "kontakt@beberlei.de" 126 | }, 127 | { 128 | "name": "Guilherme Blanco", 129 | "email": "guilhermeblanco@gmail.com" 130 | }, 131 | { 132 | "name": "Jonathan Wage", 133 | "email": "jonwage@gmail.com" 134 | }, 135 | { 136 | "name": "Johannes Schmitt", 137 | "email": "schmittjoh@gmail.com" 138 | } 139 | ], 140 | "description": "Caching library offering an object-oriented API for many cache backends", 141 | "homepage": "http://www.doctrine-project.org", 142 | "keywords": [ 143 | "cache", 144 | "caching" 145 | ], 146 | "time": "2015-12-19 05:03:47" 147 | }, 148 | { 149 | "name": "doctrine/collections", 150 | "version": "v1.3.0", 151 | "source": { 152 | "type": "git", 153 | "url": "https://github.com/doctrine/collections.git", 154 | "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" 155 | }, 156 | "dist": { 157 | "type": "zip", 158 | "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", 159 | "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", 160 | "shasum": "" 161 | }, 162 | "require": { 163 | "php": ">=5.3.2" 164 | }, 165 | "require-dev": { 166 | "phpunit/phpunit": "~4.0" 167 | }, 168 | "type": "library", 169 | "extra": { 170 | "branch-alias": { 171 | "dev-master": "1.2.x-dev" 172 | } 173 | }, 174 | "autoload": { 175 | "psr-0": { 176 | "Doctrine\\Common\\Collections\\": "lib/" 177 | } 178 | }, 179 | "notification-url": "https://packagist.org/downloads/", 180 | "license": [ 181 | "MIT" 182 | ], 183 | "authors": [ 184 | { 185 | "name": "Roman Borschel", 186 | "email": "roman@code-factory.org" 187 | }, 188 | { 189 | "name": "Benjamin Eberlei", 190 | "email": "kontakt@beberlei.de" 191 | }, 192 | { 193 | "name": "Guilherme Blanco", 194 | "email": "guilhermeblanco@gmail.com" 195 | }, 196 | { 197 | "name": "Jonathan Wage", 198 | "email": "jonwage@gmail.com" 199 | }, 200 | { 201 | "name": "Johannes Schmitt", 202 | "email": "schmittjoh@gmail.com" 203 | } 204 | ], 205 | "description": "Collections Abstraction library", 206 | "homepage": "http://www.doctrine-project.org", 207 | "keywords": [ 208 | "array", 209 | "collections", 210 | "iterator" 211 | ], 212 | "time": "2015-04-14 22:21:58" 213 | }, 214 | { 215 | "name": "doctrine/common", 216 | "version": "v2.5.3", 217 | "source": { 218 | "type": "git", 219 | "url": "https://github.com/doctrine/common.git", 220 | "reference": "10f1f19651343f87573129ca970aef1a47a6f29e" 221 | }, 222 | "dist": { 223 | "type": "zip", 224 | "url": "https://api.github.com/repos/doctrine/common/zipball/10f1f19651343f87573129ca970aef1a47a6f29e", 225 | "reference": "10f1f19651343f87573129ca970aef1a47a6f29e", 226 | "shasum": "" 227 | }, 228 | "require": { 229 | "doctrine/annotations": "1.*", 230 | "doctrine/cache": "1.*", 231 | "doctrine/collections": "1.*", 232 | "doctrine/inflector": "1.*", 233 | "doctrine/lexer": "1.*", 234 | "php": ">=5.3.2" 235 | }, 236 | "require-dev": { 237 | "phpunit/phpunit": "~3.7" 238 | }, 239 | "type": "library", 240 | "extra": { 241 | "branch-alias": { 242 | "dev-master": "2.5.x-dev" 243 | } 244 | }, 245 | "autoload": { 246 | "psr-0": { 247 | "Doctrine\\Common\\": "lib/" 248 | } 249 | }, 250 | "notification-url": "https://packagist.org/downloads/", 251 | "license": [ 252 | "MIT" 253 | ], 254 | "authors": [ 255 | { 256 | "name": "Roman Borschel", 257 | "email": "roman@code-factory.org" 258 | }, 259 | { 260 | "name": "Benjamin Eberlei", 261 | "email": "kontakt@beberlei.de" 262 | }, 263 | { 264 | "name": "Guilherme Blanco", 265 | "email": "guilhermeblanco@gmail.com" 266 | }, 267 | { 268 | "name": "Jonathan Wage", 269 | "email": "jonwage@gmail.com" 270 | }, 271 | { 272 | "name": "Johannes Schmitt", 273 | "email": "schmittjoh@gmail.com" 274 | } 275 | ], 276 | "description": "Common Library for Doctrine projects", 277 | "homepage": "http://www.doctrine-project.org", 278 | "keywords": [ 279 | "annotations", 280 | "collections", 281 | "eventmanager", 282 | "persistence", 283 | "spl" 284 | ], 285 | "time": "2015-12-25 13:10:16" 286 | }, 287 | { 288 | "name": "doctrine/dbal", 289 | "version": "v2.5.4", 290 | "source": { 291 | "type": "git", 292 | "url": "https://github.com/doctrine/dbal.git", 293 | "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769" 294 | }, 295 | "dist": { 296 | "type": "zip", 297 | "url": "https://api.github.com/repos/doctrine/dbal/zipball/abbdfd1cff43a7b99d027af3be709bc8fc7d4769", 298 | "reference": "abbdfd1cff43a7b99d027af3be709bc8fc7d4769", 299 | "shasum": "" 300 | }, 301 | "require": { 302 | "doctrine/common": ">=2.4,<2.7-dev", 303 | "php": ">=5.3.2" 304 | }, 305 | "require-dev": { 306 | "phpunit/phpunit": "4.*", 307 | "symfony/console": "2.*" 308 | }, 309 | "suggest": { 310 | "symfony/console": "For helpful console commands such as SQL execution and import of files." 311 | }, 312 | "bin": [ 313 | "bin/doctrine-dbal" 314 | ], 315 | "type": "library", 316 | "extra": { 317 | "branch-alias": { 318 | "dev-master": "2.5.x-dev" 319 | } 320 | }, 321 | "autoload": { 322 | "psr-0": { 323 | "Doctrine\\DBAL\\": "lib/" 324 | } 325 | }, 326 | "notification-url": "https://packagist.org/downloads/", 327 | "license": [ 328 | "MIT" 329 | ], 330 | "authors": [ 331 | { 332 | "name": "Roman Borschel", 333 | "email": "roman@code-factory.org" 334 | }, 335 | { 336 | "name": "Benjamin Eberlei", 337 | "email": "kontakt@beberlei.de" 338 | }, 339 | { 340 | "name": "Guilherme Blanco", 341 | "email": "guilhermeblanco@gmail.com" 342 | }, 343 | { 344 | "name": "Jonathan Wage", 345 | "email": "jonwage@gmail.com" 346 | } 347 | ], 348 | "description": "Database Abstraction Layer", 349 | "homepage": "http://www.doctrine-project.org", 350 | "keywords": [ 351 | "database", 352 | "dbal", 353 | "persistence", 354 | "queryobject" 355 | ], 356 | "time": "2016-01-05 22:11:12" 357 | }, 358 | { 359 | "name": "doctrine/doctrine-bundle", 360 | "version": "1.6.3", 361 | "source": { 362 | "type": "git", 363 | "url": "https://github.com/doctrine/DoctrineBundle.git", 364 | "reference": "fd51907c6c76acaa8a5234822a4f901c1500afc1" 365 | }, 366 | "dist": { 367 | "type": "zip", 368 | "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/fd51907c6c76acaa8a5234822a4f901c1500afc1", 369 | "reference": "fd51907c6c76acaa8a5234822a4f901c1500afc1", 370 | "shasum": "" 371 | }, 372 | "require": { 373 | "doctrine/dbal": "~2.3", 374 | "doctrine/doctrine-cache-bundle": "~1.0", 375 | "jdorn/sql-formatter": "~1.1", 376 | "php": ">=5.3.2", 377 | "symfony/console": "~2.3|~3.0", 378 | "symfony/doctrine-bridge": "~2.2|~3.0", 379 | "symfony/framework-bundle": "~2.3|~3.0" 380 | }, 381 | "require-dev": { 382 | "doctrine/orm": "~2.3", 383 | "phpunit/phpunit": "~4", 384 | "satooshi/php-coveralls": "~0.6.1", 385 | "symfony/phpunit-bridge": "~2.7|~3.0", 386 | "symfony/property-info": "~2.8|~3.0", 387 | "symfony/validator": "~2.2|~3.0", 388 | "symfony/yaml": "~2.2|~3.0", 389 | "twig/twig": "~1.10" 390 | }, 391 | "suggest": { 392 | "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", 393 | "symfony/web-profiler-bundle": "To use the data collector." 394 | }, 395 | "type": "symfony-bundle", 396 | "extra": { 397 | "branch-alias": { 398 | "dev-master": "1.6.x-dev" 399 | } 400 | }, 401 | "autoload": { 402 | "psr-4": { 403 | "Doctrine\\Bundle\\DoctrineBundle\\": "" 404 | } 405 | }, 406 | "notification-url": "https://packagist.org/downloads/", 407 | "license": [ 408 | "MIT" 409 | ], 410 | "authors": [ 411 | { 412 | "name": "Symfony Community", 413 | "homepage": "http://symfony.com/contributors" 414 | }, 415 | { 416 | "name": "Benjamin Eberlei", 417 | "email": "kontakt@beberlei.de" 418 | }, 419 | { 420 | "name": "Doctrine Project", 421 | "homepage": "http://www.doctrine-project.org/" 422 | }, 423 | { 424 | "name": "Fabien Potencier", 425 | "email": "fabien@symfony.com" 426 | } 427 | ], 428 | "description": "Symfony DoctrineBundle", 429 | "homepage": "http://www.doctrine-project.org", 430 | "keywords": [ 431 | "database", 432 | "dbal", 433 | "orm", 434 | "persistence" 435 | ], 436 | "time": "2016-04-21 19:55:56" 437 | }, 438 | { 439 | "name": "doctrine/doctrine-cache-bundle", 440 | "version": "1.3.0", 441 | "source": { 442 | "type": "git", 443 | "url": "https://github.com/doctrine/DoctrineCacheBundle.git", 444 | "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504" 445 | }, 446 | "dist": { 447 | "type": "zip", 448 | "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/18c600a9b82f6454d2e81ca4957cdd56a1cf3504", 449 | "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504", 450 | "shasum": "" 451 | }, 452 | "require": { 453 | "doctrine/cache": "^1.4.2", 454 | "doctrine/inflector": "~1.0", 455 | "php": ">=5.3.2", 456 | "symfony/doctrine-bridge": "~2.2|~3.0" 457 | }, 458 | "require-dev": { 459 | "instaclick/coding-standard": "~1.1", 460 | "instaclick/object-calisthenics-sniffs": "dev-master", 461 | "instaclick/symfony2-coding-standard": "dev-remaster", 462 | "phpunit/phpunit": "~4", 463 | "predis/predis": "~0.8", 464 | "satooshi/php-coveralls": "~0.6.1", 465 | "squizlabs/php_codesniffer": "~1.5", 466 | "symfony/console": "~2.2|~3.0", 467 | "symfony/finder": "~2.2|~3.0", 468 | "symfony/framework-bundle": "~2.2|~3.0", 469 | "symfony/phpunit-bridge": "~2.7|~3.0", 470 | "symfony/security-acl": "~2.3|~3.0", 471 | "symfony/validator": "~2.2|~3.0", 472 | "symfony/yaml": "~2.2|~3.0" 473 | }, 474 | "suggest": { 475 | "symfony/security-acl": "For using this bundle to cache ACLs" 476 | }, 477 | "type": "symfony-bundle", 478 | "extra": { 479 | "branch-alias": { 480 | "dev-master": "1.2.x-dev" 481 | } 482 | }, 483 | "autoload": { 484 | "psr-4": { 485 | "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" 486 | } 487 | }, 488 | "notification-url": "https://packagist.org/downloads/", 489 | "license": [ 490 | "MIT" 491 | ], 492 | "authors": [ 493 | { 494 | "name": "Symfony Community", 495 | "homepage": "http://symfony.com/contributors" 496 | }, 497 | { 498 | "name": "Benjamin Eberlei", 499 | "email": "kontakt@beberlei.de" 500 | }, 501 | { 502 | "name": "Fabio B. Silva", 503 | "email": "fabio.bat.silva@gmail.com" 504 | }, 505 | { 506 | "name": "Guilherme Blanco", 507 | "email": "guilhermeblanco@hotmail.com" 508 | }, 509 | { 510 | "name": "Doctrine Project", 511 | "homepage": "http://www.doctrine-project.org/" 512 | }, 513 | { 514 | "name": "Fabien Potencier", 515 | "email": "fabien@symfony.com" 516 | } 517 | ], 518 | "description": "Symfony Bundle for Doctrine Cache", 519 | "homepage": "http://www.doctrine-project.org", 520 | "keywords": [ 521 | "cache", 522 | "caching" 523 | ], 524 | "time": "2016-01-26 17:28:51" 525 | }, 526 | { 527 | "name": "doctrine/inflector", 528 | "version": "v1.1.0", 529 | "source": { 530 | "type": "git", 531 | "url": "https://github.com/doctrine/inflector.git", 532 | "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" 533 | }, 534 | "dist": { 535 | "type": "zip", 536 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", 537 | "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", 538 | "shasum": "" 539 | }, 540 | "require": { 541 | "php": ">=5.3.2" 542 | }, 543 | "require-dev": { 544 | "phpunit/phpunit": "4.*" 545 | }, 546 | "type": "library", 547 | "extra": { 548 | "branch-alias": { 549 | "dev-master": "1.1.x-dev" 550 | } 551 | }, 552 | "autoload": { 553 | "psr-0": { 554 | "Doctrine\\Common\\Inflector\\": "lib/" 555 | } 556 | }, 557 | "notification-url": "https://packagist.org/downloads/", 558 | "license": [ 559 | "MIT" 560 | ], 561 | "authors": [ 562 | { 563 | "name": "Roman Borschel", 564 | "email": "roman@code-factory.org" 565 | }, 566 | { 567 | "name": "Benjamin Eberlei", 568 | "email": "kontakt@beberlei.de" 569 | }, 570 | { 571 | "name": "Guilherme Blanco", 572 | "email": "guilhermeblanco@gmail.com" 573 | }, 574 | { 575 | "name": "Jonathan Wage", 576 | "email": "jonwage@gmail.com" 577 | }, 578 | { 579 | "name": "Johannes Schmitt", 580 | "email": "schmittjoh@gmail.com" 581 | } 582 | ], 583 | "description": "Common String Manipulations with regard to casing and singular/plural rules.", 584 | "homepage": "http://www.doctrine-project.org", 585 | "keywords": [ 586 | "inflection", 587 | "pluralize", 588 | "singularize", 589 | "string" 590 | ], 591 | "time": "2015-11-06 14:35:42" 592 | }, 593 | { 594 | "name": "doctrine/instantiator", 595 | "version": "1.0.5", 596 | "source": { 597 | "type": "git", 598 | "url": "https://github.com/doctrine/instantiator.git", 599 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" 600 | }, 601 | "dist": { 602 | "type": "zip", 603 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", 604 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", 605 | "shasum": "" 606 | }, 607 | "require": { 608 | "php": ">=5.3,<8.0-DEV" 609 | }, 610 | "require-dev": { 611 | "athletic/athletic": "~0.1.8", 612 | "ext-pdo": "*", 613 | "ext-phar": "*", 614 | "phpunit/phpunit": "~4.0", 615 | "squizlabs/php_codesniffer": "~2.0" 616 | }, 617 | "type": "library", 618 | "extra": { 619 | "branch-alias": { 620 | "dev-master": "1.0.x-dev" 621 | } 622 | }, 623 | "autoload": { 624 | "psr-4": { 625 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 626 | } 627 | }, 628 | "notification-url": "https://packagist.org/downloads/", 629 | "license": [ 630 | "MIT" 631 | ], 632 | "authors": [ 633 | { 634 | "name": "Marco Pivetta", 635 | "email": "ocramius@gmail.com", 636 | "homepage": "http://ocramius.github.com/" 637 | } 638 | ], 639 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 640 | "homepage": "https://github.com/doctrine/instantiator", 641 | "keywords": [ 642 | "constructor", 643 | "instantiate" 644 | ], 645 | "time": "2015-06-14 21:17:01" 646 | }, 647 | { 648 | "name": "doctrine/lexer", 649 | "version": "v1.0.1", 650 | "source": { 651 | "type": "git", 652 | "url": "https://github.com/doctrine/lexer.git", 653 | "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" 654 | }, 655 | "dist": { 656 | "type": "zip", 657 | "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", 658 | "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", 659 | "shasum": "" 660 | }, 661 | "require": { 662 | "php": ">=5.3.2" 663 | }, 664 | "type": "library", 665 | "extra": { 666 | "branch-alias": { 667 | "dev-master": "1.0.x-dev" 668 | } 669 | }, 670 | "autoload": { 671 | "psr-0": { 672 | "Doctrine\\Common\\Lexer\\": "lib/" 673 | } 674 | }, 675 | "notification-url": "https://packagist.org/downloads/", 676 | "license": [ 677 | "MIT" 678 | ], 679 | "authors": [ 680 | { 681 | "name": "Roman Borschel", 682 | "email": "roman@code-factory.org" 683 | }, 684 | { 685 | "name": "Guilherme Blanco", 686 | "email": "guilhermeblanco@gmail.com" 687 | }, 688 | { 689 | "name": "Johannes Schmitt", 690 | "email": "schmittjoh@gmail.com" 691 | } 692 | ], 693 | "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", 694 | "homepage": "http://www.doctrine-project.org", 695 | "keywords": [ 696 | "lexer", 697 | "parser" 698 | ], 699 | "time": "2014-09-09 13:34:57" 700 | }, 701 | { 702 | "name": "doctrine/orm", 703 | "version": "v2.4.8", 704 | "source": { 705 | "type": "git", 706 | "url": "https://github.com/doctrine/doctrine2.git", 707 | "reference": "5aedac1e5c5caaeac14798822c70325dc242d467" 708 | }, 709 | "dist": { 710 | "type": "zip", 711 | "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/5aedac1e5c5caaeac14798822c70325dc242d467", 712 | "reference": "5aedac1e5c5caaeac14798822c70325dc242d467", 713 | "shasum": "" 714 | }, 715 | "require": { 716 | "doctrine/collections": "~1.1", 717 | "doctrine/dbal": "~2.4", 718 | "ext-pdo": "*", 719 | "php": ">=5.3.2", 720 | "symfony/console": "~2.0" 721 | }, 722 | "require-dev": { 723 | "satooshi/php-coveralls": "dev-master", 724 | "symfony/yaml": "~2.1" 725 | }, 726 | "suggest": { 727 | "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" 728 | }, 729 | "bin": [ 730 | "bin/doctrine", 731 | "bin/doctrine.php" 732 | ], 733 | "type": "library", 734 | "extra": { 735 | "branch-alias": { 736 | "dev-master": "2.4.x-dev" 737 | } 738 | }, 739 | "autoload": { 740 | "psr-0": { 741 | "Doctrine\\ORM\\": "lib/" 742 | } 743 | }, 744 | "notification-url": "https://packagist.org/downloads/", 745 | "license": [ 746 | "MIT" 747 | ], 748 | "authors": [ 749 | { 750 | "name": "Roman Borschel", 751 | "email": "roman@code-factory.org" 752 | }, 753 | { 754 | "name": "Benjamin Eberlei", 755 | "email": "kontakt@beberlei.de" 756 | }, 757 | { 758 | "name": "Guilherme Blanco", 759 | "email": "guilhermeblanco@gmail.com" 760 | }, 761 | { 762 | "name": "Jonathan Wage", 763 | "email": "jonwage@gmail.com" 764 | } 765 | ], 766 | "description": "Object-Relational-Mapper for PHP", 767 | "homepage": "http://www.doctrine-project.org", 768 | "keywords": [ 769 | "database", 770 | "orm" 771 | ], 772 | "time": "2015-08-31 13:19:01" 773 | }, 774 | { 775 | "name": "friendsofsymfony/oauth-server-bundle", 776 | "version": "1.5.2", 777 | "source": { 778 | "type": "git", 779 | "url": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle.git", 780 | "reference": "0b25cdaae8983c630bb62d14b6993219b1dadb8d" 781 | }, 782 | "dist": { 783 | "type": "zip", 784 | "url": "https://api.github.com/repos/FriendsOfSymfony/FOSOAuthServerBundle/zipball/0b25cdaae8983c630bb62d14b6993219b1dadb8d", 785 | "reference": "0b25cdaae8983c630bb62d14b6993219b1dadb8d", 786 | "shasum": "" 787 | }, 788 | "require": { 789 | "friendsofsymfony/oauth2-php": "~1.1", 790 | "php": "^5.3.3|^7.0", 791 | "symfony/framework-bundle": "~2.2|~3.0", 792 | "symfony/security-bundle": "~2.1|~3.0" 793 | }, 794 | "require-dev": { 795 | "doctrine/doctrine-bundle": "~1.0", 796 | "doctrine/mongodb-odm": "~1.0", 797 | "doctrine/orm": "~2.2", 798 | "phing/phing": "~2.4", 799 | "propel/propel1": "^1.6.5", 800 | "symfony/class-loader": "~2.1|~3.0", 801 | "symfony/form": "~2.3|~3.0", 802 | "symfony/yaml": "~2.1|~3.0", 803 | "willdurand/propel-typehintable-behavior": "^1.0.4" 804 | }, 805 | "suggest": { 806 | "doctrine/doctrine-bundle": "*", 807 | "doctrine/mongodb-odm-bundle": "*", 808 | "propel/propel-bundle": "If you want to use Propel with Symfony2, then you will have to install the PropelBundle", 809 | "symfony/form": "Needed to be able to use the AuthorizeFormType", 810 | "willdurand/propel-typehintable-behavior": "The Typehintable behavior is useful to add type hints on generated methods, to be compliant with interfaces" 811 | }, 812 | "type": "symfony-bundle", 813 | "extra": { 814 | "branch-alias": { 815 | "dev-master": "1.5-dev" 816 | } 817 | }, 818 | "autoload": { 819 | "psr-4": { 820 | "FOS\\OAuthServerBundle\\": "" 821 | } 822 | }, 823 | "notification-url": "https://packagist.org/downloads/", 824 | "license": [ 825 | "MIT" 826 | ], 827 | "authors": [ 828 | { 829 | "name": "Arnaud Le Blanc", 830 | "email": "arnaud.lb@gmail.com" 831 | }, 832 | { 833 | "name": "FriendsOfSymfony Community", 834 | "homepage": "https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/contributors" 835 | } 836 | ], 837 | "description": "Symfony2 OAuth Server Bundle", 838 | "homepage": "http://friendsofsymfony.github.com", 839 | "keywords": [ 840 | "oauth", 841 | "oauth2", 842 | "server" 843 | ], 844 | "time": "2016-02-22 13:57:55" 845 | }, 846 | { 847 | "name": "friendsofsymfony/oauth2-php", 848 | "version": "1.2.1", 849 | "source": { 850 | "type": "git", 851 | "url": "https://github.com/FriendsOfSymfony/oauth2-php.git", 852 | "reference": "fa2aecb1fca2a03fd5f9aca19fe9adb9dfff928c" 853 | }, 854 | "dist": { 855 | "type": "zip", 856 | "url": "https://api.github.com/repos/FriendsOfSymfony/oauth2-php/zipball/fa2aecb1fca2a03fd5f9aca19fe9adb9dfff928c", 857 | "reference": "fa2aecb1fca2a03fd5f9aca19fe9adb9dfff928c", 858 | "shasum": "" 859 | }, 860 | "require": { 861 | "php": ">=5.3.2", 862 | "symfony/http-foundation": "~2.0|~3.0" 863 | }, 864 | "require-dev": { 865 | "phpunit/phpunit": "~4.0" 866 | }, 867 | "type": "library", 868 | "extra": { 869 | "branch-alias": { 870 | "dev-master": "1.2.x-dev" 871 | } 872 | }, 873 | "autoload": { 874 | "psr-4": { 875 | "OAuth2\\": "lib/" 876 | } 877 | }, 878 | "notification-url": "https://packagist.org/downloads/", 879 | "license": [ 880 | "MIT" 881 | ], 882 | "authors": [ 883 | { 884 | "name": "Arnaud Le Blanc", 885 | "email": "arnaud.lb@gmail.com" 886 | }, 887 | { 888 | "name": "FriendsOfSymfony Community", 889 | "homepage": "https://github.com/FriendsOfSymfony/oauth2-php/contributors" 890 | } 891 | ], 892 | "description": "OAuth2 library", 893 | "homepage": "https://github.com/FriendsOfSymfony/oauth2-php", 894 | "keywords": [ 895 | "oauth", 896 | "oauth2" 897 | ], 898 | "time": "2016-03-31 14:24:17" 899 | }, 900 | { 901 | "name": "friendsofsymfony/rest-bundle", 902 | "version": "2.0.0", 903 | "source": { 904 | "type": "git", 905 | "url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git", 906 | "reference": "8f79a7119962c30c2bdbf53b16ecbb73a89ae6b1" 907 | }, 908 | "dist": { 909 | "type": "zip", 910 | "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/8f79a7119962c30c2bdbf53b16ecbb73a89ae6b1", 911 | "reference": "8f79a7119962c30c2bdbf53b16ecbb73a89ae6b1", 912 | "shasum": "" 913 | }, 914 | "require": { 915 | "doctrine/inflector": "^1.0", 916 | "php": "^5.5.9|~7.0", 917 | "psr/log": "^1.0", 918 | "symfony/finder": "^2.7|^3.0", 919 | "symfony/framework-bundle": "^2.7|^3.0", 920 | "symfony/routing": "^2.7|^3.0", 921 | "willdurand/jsonp-callback-validator": "^1.0", 922 | "willdurand/negotiation": "^2.0" 923 | }, 924 | "conflict": { 925 | "sensio/framework-extra-bundle": "<3.0.13" 926 | }, 927 | "require-dev": { 928 | "jms/serializer-bundle": "^1.0", 929 | "phpoption/phpoption": "^1.1", 930 | "sensio/framework-extra-bundle": "^3.0.13", 931 | "sllh/php-cs-fixer-styleci-bridge": "^1.3", 932 | "symfony/browser-kit": "^2.7|^3.0", 933 | "symfony/css-selector": "^2.7|^3.0", 934 | "symfony/dependency-injection": "^2.7|^3.0", 935 | "symfony/expression-language": "~2.7|^3.0", 936 | "symfony/form": "^2.7|^3.0", 937 | "symfony/phpunit-bridge": "~2.7|^3.0", 938 | "symfony/security-bundle": "^2.7|^3.0", 939 | "symfony/serializer": "^2.7.11|^3.0.4", 940 | "symfony/twig-bundle": "^2.7|^3.0", 941 | "symfony/validator": "^2.7|^3.0", 942 | "symfony/web-profiler-bundle": "^2.7|^3.0", 943 | "symfony/yaml": "^2.7|^3.0" 944 | }, 945 | "suggest": { 946 | "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ^1.0", 947 | "sensio/framework-extra-bundle": "Add support for route annotations and the view response listener, requires ^3.0", 948 | "symfony/expression-language": "Add support for using the expression language in the routing, requires ^2.7|^3.0", 949 | "symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ^2.7|^3.0", 950 | "symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ^2.7|^3.0" 951 | }, 952 | "type": "symfony-bundle", 953 | "extra": { 954 | "branch-alias": { 955 | "dev-master": "2.0-dev" 956 | } 957 | }, 958 | "autoload": { 959 | "psr-4": { 960 | "FOS\\RestBundle\\": "" 961 | } 962 | }, 963 | "notification-url": "https://packagist.org/downloads/", 964 | "license": [ 965 | "MIT" 966 | ], 967 | "authors": [ 968 | { 969 | "name": "Lukas Kahwe Smith", 970 | "email": "smith@pooteeweet.org" 971 | }, 972 | { 973 | "name": "FriendsOfSymfony Community", 974 | "homepage": "https://github.com/friendsofsymfony/FOSRestBundle/contributors" 975 | }, 976 | { 977 | "name": "Konstantin Kudryashov", 978 | "email": "ever.zet@gmail.com" 979 | } 980 | ], 981 | "description": "This Bundle provides various tools to rapidly develop RESTful API's with Symfony", 982 | "homepage": "http://friendsofsymfony.github.com", 983 | "keywords": [ 984 | "rest" 985 | ], 986 | "time": "2016-06-21 08:45:19" 987 | }, 988 | { 989 | "name": "hashids/hashids", 990 | "version": "1.0.6", 991 | "source": { 992 | "type": "git", 993 | "url": "https://github.com/ivanakimov/hashids.php.git", 994 | "reference": "6bd7ceffb2ccddef6cd64e88f1717f97d131cc3c" 995 | }, 996 | "dist": { 997 | "type": "zip", 998 | "url": "https://api.github.com/repos/ivanakimov/hashids.php/zipball/6bd7ceffb2ccddef6cd64e88f1717f97d131cc3c", 999 | "reference": "6bd7ceffb2ccddef6cd64e88f1717f97d131cc3c", 1000 | "shasum": "" 1001 | }, 1002 | "require": { 1003 | "php": "^5.3.3 || ^7.0" 1004 | }, 1005 | "require-dev": { 1006 | "phpunit/phpunit": "^4.8 || ^5.0" 1007 | }, 1008 | "type": "library", 1009 | "extra": { 1010 | "branch-alias": { 1011 | "dev-master": "1.0-dev" 1012 | } 1013 | }, 1014 | "autoload": { 1015 | "psr-4": { 1016 | "Hashids\\": "lib/Hashids/" 1017 | } 1018 | }, 1019 | "notification-url": "https://packagist.org/downloads/", 1020 | "license": [ 1021 | "MIT" 1022 | ], 1023 | "authors": [ 1024 | { 1025 | "name": "Ivan Akimov", 1026 | "email": "ivan@barreleye.com", 1027 | "homepage": "https://twitter.com/IvanAkimov" 1028 | } 1029 | ], 1030 | "description": "Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers.", 1031 | "homepage": "http://hashids.org/php", 1032 | "keywords": [ 1033 | "bitly", 1034 | "decode", 1035 | "encode", 1036 | "hash", 1037 | "hashid", 1038 | "hashids", 1039 | "ids", 1040 | "obfuscate", 1041 | "youtube" 1042 | ], 1043 | "time": "2016-01-21 04:26:38" 1044 | }, 1045 | { 1046 | "name": "incenteev/composer-parameter-handler", 1047 | "version": "v2.1.2", 1048 | "source": { 1049 | "type": "git", 1050 | "url": "https://github.com/Incenteev/ParameterHandler.git", 1051 | "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc" 1052 | }, 1053 | "dist": { 1054 | "type": "zip", 1055 | "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", 1056 | "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", 1057 | "shasum": "" 1058 | }, 1059 | "require": { 1060 | "php": ">=5.3.3", 1061 | "symfony/yaml": "~2.3|~3.0" 1062 | }, 1063 | "require-dev": { 1064 | "composer/composer": "1.0.*@dev", 1065 | "phpspec/prophecy-phpunit": "~1.0", 1066 | "symfony/filesystem": "~2.2" 1067 | }, 1068 | "type": "library", 1069 | "extra": { 1070 | "branch-alias": { 1071 | "dev-master": "2.1.x-dev" 1072 | } 1073 | }, 1074 | "autoload": { 1075 | "psr-4": { 1076 | "Incenteev\\ParameterHandler\\": "" 1077 | } 1078 | }, 1079 | "notification-url": "https://packagist.org/downloads/", 1080 | "license": [ 1081 | "MIT" 1082 | ], 1083 | "authors": [ 1084 | { 1085 | "name": "Christophe Coevoet", 1086 | "email": "stof@notk.org" 1087 | } 1088 | ], 1089 | "description": "Composer script handling your ignored parameter file", 1090 | "homepage": "https://github.com/Incenteev/ParameterHandler", 1091 | "keywords": [ 1092 | "parameters management" 1093 | ], 1094 | "time": "2015-11-10 17:04:01" 1095 | }, 1096 | { 1097 | "name": "ircmaxell/password-compat", 1098 | "version": "v1.0.4", 1099 | "source": { 1100 | "type": "git", 1101 | "url": "https://github.com/ircmaxell/password_compat.git", 1102 | "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" 1103 | }, 1104 | "dist": { 1105 | "type": "zip", 1106 | "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", 1107 | "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", 1108 | "shasum": "" 1109 | }, 1110 | "require-dev": { 1111 | "phpunit/phpunit": "4.*" 1112 | }, 1113 | "type": "library", 1114 | "autoload": { 1115 | "files": [ 1116 | "lib/password.php" 1117 | ] 1118 | }, 1119 | "notification-url": "https://packagist.org/downloads/", 1120 | "license": [ 1121 | "MIT" 1122 | ], 1123 | "authors": [ 1124 | { 1125 | "name": "Anthony Ferrara", 1126 | "email": "ircmaxell@php.net", 1127 | "homepage": "http://blog.ircmaxell.com" 1128 | } 1129 | ], 1130 | "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", 1131 | "homepage": "https://github.com/ircmaxell/password_compat", 1132 | "keywords": [ 1133 | "hashing", 1134 | "password" 1135 | ], 1136 | "time": "2014-11-20 16:49:30" 1137 | }, 1138 | { 1139 | "name": "jdorn/sql-formatter", 1140 | "version": "v1.2.17", 1141 | "source": { 1142 | "type": "git", 1143 | "url": "https://github.com/jdorn/sql-formatter.git", 1144 | "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" 1145 | }, 1146 | "dist": { 1147 | "type": "zip", 1148 | "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", 1149 | "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", 1150 | "shasum": "" 1151 | }, 1152 | "require": { 1153 | "php": ">=5.2.4" 1154 | }, 1155 | "require-dev": { 1156 | "phpunit/phpunit": "3.7.*" 1157 | }, 1158 | "type": "library", 1159 | "extra": { 1160 | "branch-alias": { 1161 | "dev-master": "1.3.x-dev" 1162 | } 1163 | }, 1164 | "autoload": { 1165 | "classmap": [ 1166 | "lib" 1167 | ] 1168 | }, 1169 | "notification-url": "https://packagist.org/downloads/", 1170 | "license": [ 1171 | "MIT" 1172 | ], 1173 | "authors": [ 1174 | { 1175 | "name": "Jeremy Dorn", 1176 | "email": "jeremy@jeremydorn.com", 1177 | "homepage": "http://jeremydorn.com/" 1178 | } 1179 | ], 1180 | "description": "a PHP SQL highlighting library", 1181 | "homepage": "https://github.com/jdorn/sql-formatter/", 1182 | "keywords": [ 1183 | "highlight", 1184 | "sql" 1185 | ], 1186 | "time": "2014-01-12 16:20:24" 1187 | }, 1188 | { 1189 | "name": "jms/metadata", 1190 | "version": "1.5.1", 1191 | "source": { 1192 | "type": "git", 1193 | "url": "https://github.com/schmittjoh/metadata.git", 1194 | "reference": "22b72455559a25777cfd28c4ffda81ff7639f353" 1195 | }, 1196 | "dist": { 1197 | "type": "zip", 1198 | "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353", 1199 | "reference": "22b72455559a25777cfd28c4ffda81ff7639f353", 1200 | "shasum": "" 1201 | }, 1202 | "require": { 1203 | "php": ">=5.3.0" 1204 | }, 1205 | "require-dev": { 1206 | "doctrine/cache": "~1.0" 1207 | }, 1208 | "type": "library", 1209 | "extra": { 1210 | "branch-alias": { 1211 | "dev-master": "1.5.x-dev" 1212 | } 1213 | }, 1214 | "autoload": { 1215 | "psr-0": { 1216 | "Metadata\\": "src/" 1217 | } 1218 | }, 1219 | "notification-url": "https://packagist.org/downloads/", 1220 | "license": [ 1221 | "Apache" 1222 | ], 1223 | "authors": [ 1224 | { 1225 | "name": "Johannes Schmitt", 1226 | "email": "schmittjoh@gmail.com", 1227 | "homepage": "https://github.com/schmittjoh", 1228 | "role": "Developer of wrapped JMSSerializerBundle" 1229 | } 1230 | ], 1231 | "description": "Class/method/property metadata management in PHP", 1232 | "keywords": [ 1233 | "annotations", 1234 | "metadata", 1235 | "xml", 1236 | "yaml" 1237 | ], 1238 | "time": "2014-07-12 07:13:19" 1239 | }, 1240 | { 1241 | "name": "jms/parser-lib", 1242 | "version": "1.0.0", 1243 | "source": { 1244 | "type": "git", 1245 | "url": "https://github.com/schmittjoh/parser-lib.git", 1246 | "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d" 1247 | }, 1248 | "dist": { 1249 | "type": "zip", 1250 | "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d", 1251 | "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d", 1252 | "shasum": "" 1253 | }, 1254 | "require": { 1255 | "phpoption/phpoption": ">=0.9,<2.0-dev" 1256 | }, 1257 | "type": "library", 1258 | "extra": { 1259 | "branch-alias": { 1260 | "dev-master": "1.0-dev" 1261 | } 1262 | }, 1263 | "autoload": { 1264 | "psr-0": { 1265 | "JMS\\": "src/" 1266 | } 1267 | }, 1268 | "notification-url": "https://packagist.org/downloads/", 1269 | "license": [ 1270 | "Apache2" 1271 | ], 1272 | "description": "A library for easily creating recursive-descent parsers.", 1273 | "time": "2012-11-18 18:08:43" 1274 | }, 1275 | { 1276 | "name": "jms/serializer", 1277 | "version": "1.1.0", 1278 | "source": { 1279 | "type": "git", 1280 | "url": "https://github.com/schmittjoh/serializer.git", 1281 | "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48" 1282 | }, 1283 | "dist": { 1284 | "type": "zip", 1285 | "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fe13a1f993ea3456e195b7820692f2eb2b6bbb48", 1286 | "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48", 1287 | "shasum": "" 1288 | }, 1289 | "require": { 1290 | "doctrine/annotations": "1.*", 1291 | "doctrine/instantiator": "~1.0.3", 1292 | "jms/metadata": "~1.1", 1293 | "jms/parser-lib": "1.*", 1294 | "php": ">=5.4.0", 1295 | "phpcollection/phpcollection": "~0.1" 1296 | }, 1297 | "conflict": { 1298 | "twig/twig": "<1.12" 1299 | }, 1300 | "require-dev": { 1301 | "doctrine/orm": "~2.1", 1302 | "doctrine/phpcr-odm": "~1.0.1", 1303 | "jackalope/jackalope-doctrine-dbal": "1.0.*", 1304 | "phpunit/phpunit": "~4.0", 1305 | "propel/propel1": "~1.7", 1306 | "symfony/filesystem": "2.*", 1307 | "symfony/form": "~2.1", 1308 | "symfony/translation": "~2.0", 1309 | "symfony/validator": "~2.0", 1310 | "symfony/yaml": "2.*", 1311 | "twig/twig": "~1.12|~2.0" 1312 | }, 1313 | "suggest": { 1314 | "symfony/yaml": "Required if you'd like to serialize data to YAML format." 1315 | }, 1316 | "type": "library", 1317 | "extra": { 1318 | "branch-alias": { 1319 | "dev-master": "1.1-dev" 1320 | } 1321 | }, 1322 | "autoload": { 1323 | "psr-0": { 1324 | "JMS\\Serializer": "src/" 1325 | } 1326 | }, 1327 | "notification-url": "https://packagist.org/downloads/", 1328 | "license": [ 1329 | "Apache2" 1330 | ], 1331 | "authors": [ 1332 | { 1333 | "name": "Johannes M. Schmitt", 1334 | "email": "schmittjoh@gmail.com" 1335 | } 1336 | ], 1337 | "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", 1338 | "homepage": "http://jmsyst.com/libs/serializer", 1339 | "keywords": [ 1340 | "deserialization", 1341 | "jaxb", 1342 | "json", 1343 | "serialization", 1344 | "xml" 1345 | ], 1346 | "time": "2015-10-27 09:24:41" 1347 | }, 1348 | { 1349 | "name": "jms/serializer-bundle", 1350 | "version": "1.1.0", 1351 | "target-dir": "JMS/SerializerBundle", 1352 | "source": { 1353 | "type": "git", 1354 | "url": "https://github.com/schmittjoh/JMSSerializerBundle.git", 1355 | "reference": "3e396c980545350c2efb65a50041d2a9f9d6562e" 1356 | }, 1357 | "dist": { 1358 | "type": "zip", 1359 | "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/3e396c980545350c2efb65a50041d2a9f9d6562e", 1360 | "reference": "3e396c980545350c2efb65a50041d2a9f9d6562e", 1361 | "shasum": "" 1362 | }, 1363 | "require": { 1364 | "jms/serializer": "^1.0.0", 1365 | "php": ">=5.4.0", 1366 | "phpoption/phpoption": "^1.1.0", 1367 | "symfony/framework-bundle": "~2.3|~3.0" 1368 | }, 1369 | "require-dev": { 1370 | "doctrine/doctrine-bundle": "*", 1371 | "doctrine/orm": "*", 1372 | "symfony/browser-kit": "*", 1373 | "symfony/class-loader": "*", 1374 | "symfony/css-selector": "*", 1375 | "symfony/finder": "*", 1376 | "symfony/form": "*", 1377 | "symfony/process": "*", 1378 | "symfony/stopwatch": "*", 1379 | "symfony/twig-bundle": "*", 1380 | "symfony/validator": "*", 1381 | "symfony/yaml": "*" 1382 | }, 1383 | "suggest": { 1384 | "jms/di-extra-bundle": "Required to get lazy loading (de)serialization visitors, ~1.3" 1385 | }, 1386 | "type": "symfony-bundle", 1387 | "extra": { 1388 | "branch-alias": { 1389 | "dev-master": "1.1-dev" 1390 | } 1391 | }, 1392 | "autoload": { 1393 | "psr-0": { 1394 | "JMS\\SerializerBundle": "" 1395 | } 1396 | }, 1397 | "notification-url": "https://packagist.org/downloads/", 1398 | "license": [ 1399 | "Apache2" 1400 | ], 1401 | "authors": [ 1402 | { 1403 | "name": "Johannes M. Schmitt", 1404 | "email": "schmittjoh@gmail.com" 1405 | } 1406 | ], 1407 | "description": "Allows you to easily serialize, and deserialize data of any complexity", 1408 | "homepage": "http://jmsyst.com/bundles/JMSSerializerBundle", 1409 | "keywords": [ 1410 | "deserialization", 1411 | "jaxb", 1412 | "json", 1413 | "serialization", 1414 | "xml" 1415 | ], 1416 | "time": "2015-11-10 12:26:42" 1417 | }, 1418 | { 1419 | "name": "monolog/monolog", 1420 | "version": "1.19.0", 1421 | "source": { 1422 | "type": "git", 1423 | "url": "https://github.com/Seldaek/monolog.git", 1424 | "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" 1425 | }, 1426 | "dist": { 1427 | "type": "zip", 1428 | "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", 1429 | "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", 1430 | "shasum": "" 1431 | }, 1432 | "require": { 1433 | "php": ">=5.3.0", 1434 | "psr/log": "~1.0" 1435 | }, 1436 | "provide": { 1437 | "psr/log-implementation": "1.0.0" 1438 | }, 1439 | "require-dev": { 1440 | "aws/aws-sdk-php": "^2.4.9", 1441 | "doctrine/couchdb": "~1.0@dev", 1442 | "graylog2/gelf-php": "~1.0", 1443 | "jakub-onderka/php-parallel-lint": "0.9", 1444 | "php-amqplib/php-amqplib": "~2.4", 1445 | "php-console/php-console": "^3.1.3", 1446 | "phpunit/phpunit": "~4.5", 1447 | "phpunit/phpunit-mock-objects": "2.3.0", 1448 | "raven/raven": "^0.13", 1449 | "ruflin/elastica": ">=0.90 <3.0", 1450 | "swiftmailer/swiftmailer": "~5.3" 1451 | }, 1452 | "suggest": { 1453 | "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", 1454 | "doctrine/couchdb": "Allow sending log messages to a CouchDB server", 1455 | "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", 1456 | "ext-mongo": "Allow sending log messages to a MongoDB server", 1457 | "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", 1458 | "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", 1459 | "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", 1460 | "php-console/php-console": "Allow sending log messages to Google Chrome", 1461 | "raven/raven": "Allow sending log messages to a Sentry server", 1462 | "rollbar/rollbar": "Allow sending log messages to Rollbar", 1463 | "ruflin/elastica": "Allow sending log messages to an Elastic Search server" 1464 | }, 1465 | "type": "library", 1466 | "extra": { 1467 | "branch-alias": { 1468 | "dev-master": "2.0.x-dev" 1469 | } 1470 | }, 1471 | "autoload": { 1472 | "psr-4": { 1473 | "Monolog\\": "src/Monolog" 1474 | } 1475 | }, 1476 | "notification-url": "https://packagist.org/downloads/", 1477 | "license": [ 1478 | "MIT" 1479 | ], 1480 | "authors": [ 1481 | { 1482 | "name": "Jordi Boggiano", 1483 | "email": "j.boggiano@seld.be", 1484 | "homepage": "http://seld.be" 1485 | } 1486 | ], 1487 | "description": "Sends your logs to files, sockets, inboxes, databases and various web services", 1488 | "homepage": "http://github.com/Seldaek/monolog", 1489 | "keywords": [ 1490 | "log", 1491 | "logging", 1492 | "psr-3" 1493 | ], 1494 | "time": "2016-04-12 18:29:35" 1495 | }, 1496 | { 1497 | "name": "paragonie/random_compat", 1498 | "version": "v2.0.2", 1499 | "source": { 1500 | "type": "git", 1501 | "url": "https://github.com/paragonie/random_compat.git", 1502 | "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf" 1503 | }, 1504 | "dist": { 1505 | "type": "zip", 1506 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/088c04e2f261c33bed6ca5245491cfca69195ccf", 1507 | "reference": "088c04e2f261c33bed6ca5245491cfca69195ccf", 1508 | "shasum": "" 1509 | }, 1510 | "require": { 1511 | "php": ">=5.2.0" 1512 | }, 1513 | "require-dev": { 1514 | "phpunit/phpunit": "4.*|5.*" 1515 | }, 1516 | "suggest": { 1517 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 1518 | }, 1519 | "type": "library", 1520 | "autoload": { 1521 | "files": [ 1522 | "lib/random.php" 1523 | ] 1524 | }, 1525 | "notification-url": "https://packagist.org/downloads/", 1526 | "license": [ 1527 | "MIT" 1528 | ], 1529 | "authors": [ 1530 | { 1531 | "name": "Paragon Initiative Enterprises", 1532 | "email": "security@paragonie.com", 1533 | "homepage": "https://paragonie.com" 1534 | } 1535 | ], 1536 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 1537 | "keywords": [ 1538 | "csprng", 1539 | "pseudorandom", 1540 | "random" 1541 | ], 1542 | "time": "2016-04-03 06:00:07" 1543 | }, 1544 | { 1545 | "name": "phpcollection/phpcollection", 1546 | "version": "0.4.0", 1547 | "source": { 1548 | "type": "git", 1549 | "url": "https://github.com/schmittjoh/php-collection.git", 1550 | "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83" 1551 | }, 1552 | "dist": { 1553 | "type": "zip", 1554 | "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83", 1555 | "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83", 1556 | "shasum": "" 1557 | }, 1558 | "require": { 1559 | "phpoption/phpoption": "1.*" 1560 | }, 1561 | "type": "library", 1562 | "extra": { 1563 | "branch-alias": { 1564 | "dev-master": "0.3-dev" 1565 | } 1566 | }, 1567 | "autoload": { 1568 | "psr-0": { 1569 | "PhpCollection": "src/" 1570 | } 1571 | }, 1572 | "notification-url": "https://packagist.org/downloads/", 1573 | "license": [ 1574 | "Apache2" 1575 | ], 1576 | "authors": [ 1577 | { 1578 | "name": "Johannes Schmitt", 1579 | "email": "schmittjoh@gmail.com", 1580 | "homepage": "https://github.com/schmittjoh", 1581 | "role": "Developer of wrapped JMSSerializerBundle" 1582 | } 1583 | ], 1584 | "description": "General-Purpose Collection Library for PHP", 1585 | "keywords": [ 1586 | "collection", 1587 | "list", 1588 | "map", 1589 | "sequence", 1590 | "set" 1591 | ], 1592 | "time": "2014-03-11 13:46:42" 1593 | }, 1594 | { 1595 | "name": "phpoption/phpoption", 1596 | "version": "1.5.0", 1597 | "source": { 1598 | "type": "git", 1599 | "url": "https://github.com/schmittjoh/php-option.git", 1600 | "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" 1601 | }, 1602 | "dist": { 1603 | "type": "zip", 1604 | "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", 1605 | "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", 1606 | "shasum": "" 1607 | }, 1608 | "require": { 1609 | "php": ">=5.3.0" 1610 | }, 1611 | "require-dev": { 1612 | "phpunit/phpunit": "4.7.*" 1613 | }, 1614 | "type": "library", 1615 | "extra": { 1616 | "branch-alias": { 1617 | "dev-master": "1.3-dev" 1618 | } 1619 | }, 1620 | "autoload": { 1621 | "psr-0": { 1622 | "PhpOption\\": "src/" 1623 | } 1624 | }, 1625 | "notification-url": "https://packagist.org/downloads/", 1626 | "license": [ 1627 | "Apache2" 1628 | ], 1629 | "authors": [ 1630 | { 1631 | "name": "Johannes M. Schmitt", 1632 | "email": "schmittjoh@gmail.com" 1633 | } 1634 | ], 1635 | "description": "Option Type for PHP", 1636 | "keywords": [ 1637 | "language", 1638 | "option", 1639 | "php", 1640 | "type" 1641 | ], 1642 | "time": "2015-07-25 16:39:46" 1643 | }, 1644 | { 1645 | "name": "psr/log", 1646 | "version": "1.0.0", 1647 | "source": { 1648 | "type": "git", 1649 | "url": "https://github.com/php-fig/log.git", 1650 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" 1651 | }, 1652 | "dist": { 1653 | "type": "zip", 1654 | "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", 1655 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", 1656 | "shasum": "" 1657 | }, 1658 | "type": "library", 1659 | "autoload": { 1660 | "psr-0": { 1661 | "Psr\\Log\\": "" 1662 | } 1663 | }, 1664 | "notification-url": "https://packagist.org/downloads/", 1665 | "license": [ 1666 | "MIT" 1667 | ], 1668 | "authors": [ 1669 | { 1670 | "name": "PHP-FIG", 1671 | "homepage": "http://www.php-fig.org/" 1672 | } 1673 | ], 1674 | "description": "Common interface for logging libraries", 1675 | "keywords": [ 1676 | "log", 1677 | "psr", 1678 | "psr-3" 1679 | ], 1680 | "time": "2012-12-21 11:40:51" 1681 | }, 1682 | { 1683 | "name": "sensio/distribution-bundle", 1684 | "version": "v5.0.7", 1685 | "source": { 1686 | "type": "git", 1687 | "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", 1688 | "reference": "a9c4723cbdbc6cf7fbfdfde3c639cb1943f0293a" 1689 | }, 1690 | "dist": { 1691 | "type": "zip", 1692 | "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/a9c4723cbdbc6cf7fbfdfde3c639cb1943f0293a", 1693 | "reference": "a9c4723cbdbc6cf7fbfdfde3c639cb1943f0293a", 1694 | "shasum": "" 1695 | }, 1696 | "require": { 1697 | "php": ">=5.3.9", 1698 | "sensiolabs/security-checker": "~3.0", 1699 | "symfony/class-loader": "~2.3|~3.0", 1700 | "symfony/config": "~2.3|~3.0", 1701 | "symfony/dependency-injection": "~2.3|~3.0", 1702 | "symfony/filesystem": "~2.3|~3.0", 1703 | "symfony/http-kernel": "~2.3|~3.0", 1704 | "symfony/process": "~2.3|~3.0" 1705 | }, 1706 | "type": "symfony-bundle", 1707 | "extra": { 1708 | "branch-alias": { 1709 | "dev-master": "5.0.x-dev" 1710 | } 1711 | }, 1712 | "autoload": { 1713 | "psr-4": { 1714 | "Sensio\\Bundle\\DistributionBundle\\": "" 1715 | } 1716 | }, 1717 | "notification-url": "https://packagist.org/downloads/", 1718 | "license": [ 1719 | "MIT" 1720 | ], 1721 | "authors": [ 1722 | { 1723 | "name": "Fabien Potencier", 1724 | "email": "fabien@symfony.com" 1725 | } 1726 | ], 1727 | "description": "Base bundle for Symfony Distributions", 1728 | "keywords": [ 1729 | "configuration", 1730 | "distribution" 1731 | ], 1732 | "time": "2016-06-23 16:11:33" 1733 | }, 1734 | { 1735 | "name": "sensio/framework-extra-bundle", 1736 | "version": "v3.0.16", 1737 | "source": { 1738 | "type": "git", 1739 | "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", 1740 | "reference": "507a15f56fa7699f6cc8c2c7de4080b19ce22546" 1741 | }, 1742 | "dist": { 1743 | "type": "zip", 1744 | "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/507a15f56fa7699f6cc8c2c7de4080b19ce22546", 1745 | "reference": "507a15f56fa7699f6cc8c2c7de4080b19ce22546", 1746 | "shasum": "" 1747 | }, 1748 | "require": { 1749 | "doctrine/common": "~2.2", 1750 | "symfony/dependency-injection": "~2.3|~3.0", 1751 | "symfony/framework-bundle": "~2.3|~3.0" 1752 | }, 1753 | "require-dev": { 1754 | "symfony/browser-kit": "~2.3|~3.0", 1755 | "symfony/dom-crawler": "~2.3|~3.0", 1756 | "symfony/expression-language": "~2.4|~3.0", 1757 | "symfony/finder": "~2.3|~3.0", 1758 | "symfony/phpunit-bridge": "~2.7|~3.0", 1759 | "symfony/security-bundle": "~2.4|~3.0", 1760 | "symfony/twig-bundle": "~2.3|~3.0", 1761 | "twig/twig": "~1.11|~2.0" 1762 | }, 1763 | "suggest": { 1764 | "symfony/expression-language": "", 1765 | "symfony/psr-http-message-bridge": "To use the PSR-7 converters", 1766 | "symfony/security-bundle": "" 1767 | }, 1768 | "type": "symfony-bundle", 1769 | "extra": { 1770 | "branch-alias": { 1771 | "dev-master": "3.0.x-dev" 1772 | } 1773 | }, 1774 | "autoload": { 1775 | "psr-4": { 1776 | "Sensio\\Bundle\\FrameworkExtraBundle\\": "" 1777 | } 1778 | }, 1779 | "notification-url": "https://packagist.org/downloads/", 1780 | "license": [ 1781 | "MIT" 1782 | ], 1783 | "authors": [ 1784 | { 1785 | "name": "Fabien Potencier", 1786 | "email": "fabien@symfony.com" 1787 | } 1788 | ], 1789 | "description": "This bundle provides a way to configure your controllers with annotations", 1790 | "keywords": [ 1791 | "annotations", 1792 | "controllers" 1793 | ], 1794 | "time": "2016-03-25 17:08:27" 1795 | }, 1796 | { 1797 | "name": "sensiolabs/security-checker", 1798 | "version": "v3.0.2", 1799 | "source": { 1800 | "type": "git", 1801 | "url": "https://github.com/sensiolabs/security-checker.git", 1802 | "reference": "21696b0daa731064c23cfb694c60a2584a7b6e93" 1803 | }, 1804 | "dist": { 1805 | "type": "zip", 1806 | "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/21696b0daa731064c23cfb694c60a2584a7b6e93", 1807 | "reference": "21696b0daa731064c23cfb694c60a2584a7b6e93", 1808 | "shasum": "" 1809 | }, 1810 | "require": { 1811 | "symfony/console": "~2.0|~3.0" 1812 | }, 1813 | "bin": [ 1814 | "security-checker" 1815 | ], 1816 | "type": "library", 1817 | "extra": { 1818 | "branch-alias": { 1819 | "dev-master": "3.0-dev" 1820 | } 1821 | }, 1822 | "autoload": { 1823 | "psr-0": { 1824 | "SensioLabs\\Security": "" 1825 | } 1826 | }, 1827 | "notification-url": "https://packagist.org/downloads/", 1828 | "license": [ 1829 | "MIT" 1830 | ], 1831 | "authors": [ 1832 | { 1833 | "name": "Fabien Potencier", 1834 | "email": "fabien.potencier@gmail.com" 1835 | } 1836 | ], 1837 | "description": "A security checker for your composer.lock", 1838 | "time": "2015-11-07 08:07:40" 1839 | }, 1840 | { 1841 | "name": "swiftmailer/swiftmailer", 1842 | "version": "v5.4.2", 1843 | "source": { 1844 | "type": "git", 1845 | "url": "https://github.com/swiftmailer/swiftmailer.git", 1846 | "reference": "d8db871a54619458a805229a057ea2af33c753e8" 1847 | }, 1848 | "dist": { 1849 | "type": "zip", 1850 | "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d8db871a54619458a805229a057ea2af33c753e8", 1851 | "reference": "d8db871a54619458a805229a057ea2af33c753e8", 1852 | "shasum": "" 1853 | }, 1854 | "require": { 1855 | "php": ">=5.3.3" 1856 | }, 1857 | "require-dev": { 1858 | "mockery/mockery": "~0.9.1,<0.9.4" 1859 | }, 1860 | "type": "library", 1861 | "extra": { 1862 | "branch-alias": { 1863 | "dev-master": "5.4-dev" 1864 | } 1865 | }, 1866 | "autoload": { 1867 | "files": [ 1868 | "lib/swift_required.php" 1869 | ] 1870 | }, 1871 | "notification-url": "https://packagist.org/downloads/", 1872 | "license": [ 1873 | "MIT" 1874 | ], 1875 | "authors": [ 1876 | { 1877 | "name": "Chris Corbyn" 1878 | }, 1879 | { 1880 | "name": "Fabien Potencier", 1881 | "email": "fabien@symfony.com" 1882 | } 1883 | ], 1884 | "description": "Swiftmailer, free feature-rich PHP mailer", 1885 | "homepage": "http://swiftmailer.org", 1886 | "keywords": [ 1887 | "email", 1888 | "mail", 1889 | "mailer" 1890 | ], 1891 | "time": "2016-05-01 08:45:47" 1892 | }, 1893 | { 1894 | "name": "symfony/monolog-bundle", 1895 | "version": "2.11.1", 1896 | "source": { 1897 | "type": "git", 1898 | "url": "https://github.com/symfony/monolog-bundle.git", 1899 | "reference": "e7caf4936c7be82bc6d68df87f1d23a0d5bf6e00" 1900 | }, 1901 | "dist": { 1902 | "type": "zip", 1903 | "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/e7caf4936c7be82bc6d68df87f1d23a0d5bf6e00", 1904 | "reference": "e7caf4936c7be82bc6d68df87f1d23a0d5bf6e00", 1905 | "shasum": "" 1906 | }, 1907 | "require": { 1908 | "monolog/monolog": "~1.18", 1909 | "php": ">=5.3.2", 1910 | "symfony/config": "~2.3|~3.0", 1911 | "symfony/dependency-injection": "~2.3|~3.0", 1912 | "symfony/http-kernel": "~2.3|~3.0", 1913 | "symfony/monolog-bridge": "~2.3|~3.0" 1914 | }, 1915 | "require-dev": { 1916 | "phpunit/phpunit": "^4.8", 1917 | "symfony/console": "~2.3|~3.0", 1918 | "symfony/yaml": "~2.3|~3.0" 1919 | }, 1920 | "type": "symfony-bundle", 1921 | "extra": { 1922 | "branch-alias": { 1923 | "dev-master": "2.x-dev" 1924 | } 1925 | }, 1926 | "autoload": { 1927 | "psr-4": { 1928 | "Symfony\\Bundle\\MonologBundle\\": "" 1929 | } 1930 | }, 1931 | "notification-url": "https://packagist.org/downloads/", 1932 | "license": [ 1933 | "MIT" 1934 | ], 1935 | "authors": [ 1936 | { 1937 | "name": "Symfony Community", 1938 | "homepage": "http://symfony.com/contributors" 1939 | }, 1940 | { 1941 | "name": "Fabien Potencier", 1942 | "email": "fabien@symfony.com" 1943 | } 1944 | ], 1945 | "description": "Symfony MonologBundle", 1946 | "homepage": "http://symfony.com", 1947 | "keywords": [ 1948 | "log", 1949 | "logging" 1950 | ], 1951 | "time": "2016-04-13 16:21:01" 1952 | }, 1953 | { 1954 | "name": "symfony/polyfill-apcu", 1955 | "version": "v1.2.0", 1956 | "source": { 1957 | "type": "git", 1958 | "url": "https://github.com/symfony/polyfill-apcu.git", 1959 | "reference": "6d58bceaeea2c2d3eb62503839b18646e161cd6b" 1960 | }, 1961 | "dist": { 1962 | "type": "zip", 1963 | "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/6d58bceaeea2c2d3eb62503839b18646e161cd6b", 1964 | "reference": "6d58bceaeea2c2d3eb62503839b18646e161cd6b", 1965 | "shasum": "" 1966 | }, 1967 | "require": { 1968 | "php": ">=5.3.3" 1969 | }, 1970 | "type": "library", 1971 | "extra": { 1972 | "branch-alias": { 1973 | "dev-master": "1.2-dev" 1974 | } 1975 | }, 1976 | "autoload": { 1977 | "files": [ 1978 | "bootstrap.php" 1979 | ] 1980 | }, 1981 | "notification-url": "https://packagist.org/downloads/", 1982 | "license": [ 1983 | "MIT" 1984 | ], 1985 | "authors": [ 1986 | { 1987 | "name": "Nicolas Grekas", 1988 | "email": "p@tchwork.com" 1989 | }, 1990 | { 1991 | "name": "Symfony Community", 1992 | "homepage": "https://symfony.com/contributors" 1993 | } 1994 | ], 1995 | "description": "Symfony polyfill backporting apcu_* functions to lower PHP versions", 1996 | "homepage": "https://symfony.com", 1997 | "keywords": [ 1998 | "apcu", 1999 | "compatibility", 2000 | "polyfill", 2001 | "portable", 2002 | "shim" 2003 | ], 2004 | "time": "2016-05-18 14:26:46" 2005 | }, 2006 | { 2007 | "name": "symfony/polyfill-intl-icu", 2008 | "version": "v1.2.0", 2009 | "source": { 2010 | "type": "git", 2011 | "url": "https://github.com/symfony/polyfill-intl-icu.git", 2012 | "reference": "0f8dc2c45f69f8672379e9210bca4a115cd5146f" 2013 | }, 2014 | "dist": { 2015 | "type": "zip", 2016 | "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/0f8dc2c45f69f8672379e9210bca4a115cd5146f", 2017 | "reference": "0f8dc2c45f69f8672379e9210bca4a115cd5146f", 2018 | "shasum": "" 2019 | }, 2020 | "require": { 2021 | "php": ">=5.3.3", 2022 | "symfony/intl": "~2.3|~3.0" 2023 | }, 2024 | "suggest": { 2025 | "ext-intl": "For best performance" 2026 | }, 2027 | "type": "library", 2028 | "extra": { 2029 | "branch-alias": { 2030 | "dev-master": "1.2-dev" 2031 | } 2032 | }, 2033 | "autoload": { 2034 | "files": [ 2035 | "bootstrap.php" 2036 | ] 2037 | }, 2038 | "notification-url": "https://packagist.org/downloads/", 2039 | "license": [ 2040 | "MIT" 2041 | ], 2042 | "authors": [ 2043 | { 2044 | "name": "Nicolas Grekas", 2045 | "email": "p@tchwork.com" 2046 | }, 2047 | { 2048 | "name": "Symfony Community", 2049 | "homepage": "https://symfony.com/contributors" 2050 | } 2051 | ], 2052 | "description": "Symfony polyfill for intl's ICU-related data and classes", 2053 | "homepage": "https://symfony.com", 2054 | "keywords": [ 2055 | "compatibility", 2056 | "icu", 2057 | "intl", 2058 | "polyfill", 2059 | "portable", 2060 | "shim" 2061 | ], 2062 | "time": "2016-05-18 14:26:46" 2063 | }, 2064 | { 2065 | "name": "symfony/polyfill-mbstring", 2066 | "version": "v1.2.0", 2067 | "source": { 2068 | "type": "git", 2069 | "url": "https://github.com/symfony/polyfill-mbstring.git", 2070 | "reference": "dff51f72b0706335131b00a7f49606168c582594" 2071 | }, 2072 | "dist": { 2073 | "type": "zip", 2074 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", 2075 | "reference": "dff51f72b0706335131b00a7f49606168c582594", 2076 | "shasum": "" 2077 | }, 2078 | "require": { 2079 | "php": ">=5.3.3" 2080 | }, 2081 | "suggest": { 2082 | "ext-mbstring": "For best performance" 2083 | }, 2084 | "type": "library", 2085 | "extra": { 2086 | "branch-alias": { 2087 | "dev-master": "1.2-dev" 2088 | } 2089 | }, 2090 | "autoload": { 2091 | "psr-4": { 2092 | "Symfony\\Polyfill\\Mbstring\\": "" 2093 | }, 2094 | "files": [ 2095 | "bootstrap.php" 2096 | ] 2097 | }, 2098 | "notification-url": "https://packagist.org/downloads/", 2099 | "license": [ 2100 | "MIT" 2101 | ], 2102 | "authors": [ 2103 | { 2104 | "name": "Nicolas Grekas", 2105 | "email": "p@tchwork.com" 2106 | }, 2107 | { 2108 | "name": "Symfony Community", 2109 | "homepage": "https://symfony.com/contributors" 2110 | } 2111 | ], 2112 | "description": "Symfony polyfill for the Mbstring extension", 2113 | "homepage": "https://symfony.com", 2114 | "keywords": [ 2115 | "compatibility", 2116 | "mbstring", 2117 | "polyfill", 2118 | "portable", 2119 | "shim" 2120 | ], 2121 | "time": "2016-05-18 14:26:46" 2122 | }, 2123 | { 2124 | "name": "symfony/polyfill-php54", 2125 | "version": "v1.2.0", 2126 | "source": { 2127 | "type": "git", 2128 | "url": "https://github.com/symfony/polyfill-php54.git", 2129 | "reference": "34d761992f6f2cc6092cc0e5e93f38b53ba5e4f1" 2130 | }, 2131 | "dist": { 2132 | "type": "zip", 2133 | "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/34d761992f6f2cc6092cc0e5e93f38b53ba5e4f1", 2134 | "reference": "34d761992f6f2cc6092cc0e5e93f38b53ba5e4f1", 2135 | "shasum": "" 2136 | }, 2137 | "require": { 2138 | "php": ">=5.3.3" 2139 | }, 2140 | "type": "library", 2141 | "extra": { 2142 | "branch-alias": { 2143 | "dev-master": "1.2-dev" 2144 | } 2145 | }, 2146 | "autoload": { 2147 | "psr-4": { 2148 | "Symfony\\Polyfill\\Php54\\": "" 2149 | }, 2150 | "files": [ 2151 | "bootstrap.php" 2152 | ], 2153 | "classmap": [ 2154 | "Resources/stubs" 2155 | ] 2156 | }, 2157 | "notification-url": "https://packagist.org/downloads/", 2158 | "license": [ 2159 | "MIT" 2160 | ], 2161 | "authors": [ 2162 | { 2163 | "name": "Nicolas Grekas", 2164 | "email": "p@tchwork.com" 2165 | }, 2166 | { 2167 | "name": "Symfony Community", 2168 | "homepage": "https://symfony.com/contributors" 2169 | } 2170 | ], 2171 | "description": "Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions", 2172 | "homepage": "https://symfony.com", 2173 | "keywords": [ 2174 | "compatibility", 2175 | "polyfill", 2176 | "portable", 2177 | "shim" 2178 | ], 2179 | "time": "2016-05-18 14:26:46" 2180 | }, 2181 | { 2182 | "name": "symfony/polyfill-php55", 2183 | "version": "v1.2.0", 2184 | "source": { 2185 | "type": "git", 2186 | "url": "https://github.com/symfony/polyfill-php55.git", 2187 | "reference": "bf2ff9ad6be1a4772cb873e4eea94d70daa95c6d" 2188 | }, 2189 | "dist": { 2190 | "type": "zip", 2191 | "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/bf2ff9ad6be1a4772cb873e4eea94d70daa95c6d", 2192 | "reference": "bf2ff9ad6be1a4772cb873e4eea94d70daa95c6d", 2193 | "shasum": "" 2194 | }, 2195 | "require": { 2196 | "ircmaxell/password-compat": "~1.0", 2197 | "php": ">=5.3.3" 2198 | }, 2199 | "type": "library", 2200 | "extra": { 2201 | "branch-alias": { 2202 | "dev-master": "1.2-dev" 2203 | } 2204 | }, 2205 | "autoload": { 2206 | "psr-4": { 2207 | "Symfony\\Polyfill\\Php55\\": "" 2208 | }, 2209 | "files": [ 2210 | "bootstrap.php" 2211 | ] 2212 | }, 2213 | "notification-url": "https://packagist.org/downloads/", 2214 | "license": [ 2215 | "MIT" 2216 | ], 2217 | "authors": [ 2218 | { 2219 | "name": "Nicolas Grekas", 2220 | "email": "p@tchwork.com" 2221 | }, 2222 | { 2223 | "name": "Symfony Community", 2224 | "homepage": "https://symfony.com/contributors" 2225 | } 2226 | ], 2227 | "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions", 2228 | "homepage": "https://symfony.com", 2229 | "keywords": [ 2230 | "compatibility", 2231 | "polyfill", 2232 | "portable", 2233 | "shim" 2234 | ], 2235 | "time": "2016-05-18 14:26:46" 2236 | }, 2237 | { 2238 | "name": "symfony/polyfill-php56", 2239 | "version": "v1.2.0", 2240 | "source": { 2241 | "type": "git", 2242 | "url": "https://github.com/symfony/polyfill-php56.git", 2243 | "reference": "3edf57a8fbf9a927533344cef65ad7e1cf31030a" 2244 | }, 2245 | "dist": { 2246 | "type": "zip", 2247 | "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/3edf57a8fbf9a927533344cef65ad7e1cf31030a", 2248 | "reference": "3edf57a8fbf9a927533344cef65ad7e1cf31030a", 2249 | "shasum": "" 2250 | }, 2251 | "require": { 2252 | "php": ">=5.3.3", 2253 | "symfony/polyfill-util": "~1.0" 2254 | }, 2255 | "type": "library", 2256 | "extra": { 2257 | "branch-alias": { 2258 | "dev-master": "1.2-dev" 2259 | } 2260 | }, 2261 | "autoload": { 2262 | "psr-4": { 2263 | "Symfony\\Polyfill\\Php56\\": "" 2264 | }, 2265 | "files": [ 2266 | "bootstrap.php" 2267 | ] 2268 | }, 2269 | "notification-url": "https://packagist.org/downloads/", 2270 | "license": [ 2271 | "MIT" 2272 | ], 2273 | "authors": [ 2274 | { 2275 | "name": "Nicolas Grekas", 2276 | "email": "p@tchwork.com" 2277 | }, 2278 | { 2279 | "name": "Symfony Community", 2280 | "homepage": "https://symfony.com/contributors" 2281 | } 2282 | ], 2283 | "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", 2284 | "homepage": "https://symfony.com", 2285 | "keywords": [ 2286 | "compatibility", 2287 | "polyfill", 2288 | "portable", 2289 | "shim" 2290 | ], 2291 | "time": "2016-05-18 14:26:46" 2292 | }, 2293 | { 2294 | "name": "symfony/polyfill-php70", 2295 | "version": "v1.2.0", 2296 | "source": { 2297 | "type": "git", 2298 | "url": "https://github.com/symfony/polyfill-php70.git", 2299 | "reference": "a42f4b6b05ed458910f8af4c4e1121b0101b2d85" 2300 | }, 2301 | "dist": { 2302 | "type": "zip", 2303 | "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/a42f4b6b05ed458910f8af4c4e1121b0101b2d85", 2304 | "reference": "a42f4b6b05ed458910f8af4c4e1121b0101b2d85", 2305 | "shasum": "" 2306 | }, 2307 | "require": { 2308 | "paragonie/random_compat": "~1.0|~2.0", 2309 | "php": ">=5.3.3" 2310 | }, 2311 | "type": "library", 2312 | "extra": { 2313 | "branch-alias": { 2314 | "dev-master": "1.2-dev" 2315 | } 2316 | }, 2317 | "autoload": { 2318 | "psr-4": { 2319 | "Symfony\\Polyfill\\Php70\\": "" 2320 | }, 2321 | "files": [ 2322 | "bootstrap.php" 2323 | ], 2324 | "classmap": [ 2325 | "Resources/stubs" 2326 | ] 2327 | }, 2328 | "notification-url": "https://packagist.org/downloads/", 2329 | "license": [ 2330 | "MIT" 2331 | ], 2332 | "authors": [ 2333 | { 2334 | "name": "Nicolas Grekas", 2335 | "email": "p@tchwork.com" 2336 | }, 2337 | { 2338 | "name": "Symfony Community", 2339 | "homepage": "https://symfony.com/contributors" 2340 | } 2341 | ], 2342 | "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", 2343 | "homepage": "https://symfony.com", 2344 | "keywords": [ 2345 | "compatibility", 2346 | "polyfill", 2347 | "portable", 2348 | "shim" 2349 | ], 2350 | "time": "2016-05-18 14:26:46" 2351 | }, 2352 | { 2353 | "name": "symfony/polyfill-util", 2354 | "version": "v1.2.0", 2355 | "source": { 2356 | "type": "git", 2357 | "url": "https://github.com/symfony/polyfill-util.git", 2358 | "reference": "ef830ce3d218e622b221d6bfad42c751d974bf99" 2359 | }, 2360 | "dist": { 2361 | "type": "zip", 2362 | "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ef830ce3d218e622b221d6bfad42c751d974bf99", 2363 | "reference": "ef830ce3d218e622b221d6bfad42c751d974bf99", 2364 | "shasum": "" 2365 | }, 2366 | "require": { 2367 | "php": ">=5.3.3" 2368 | }, 2369 | "type": "library", 2370 | "extra": { 2371 | "branch-alias": { 2372 | "dev-master": "1.2-dev" 2373 | } 2374 | }, 2375 | "autoload": { 2376 | "psr-4": { 2377 | "Symfony\\Polyfill\\Util\\": "" 2378 | } 2379 | }, 2380 | "notification-url": "https://packagist.org/downloads/", 2381 | "license": [ 2382 | "MIT" 2383 | ], 2384 | "authors": [ 2385 | { 2386 | "name": "Nicolas Grekas", 2387 | "email": "p@tchwork.com" 2388 | }, 2389 | { 2390 | "name": "Symfony Community", 2391 | "homepage": "https://symfony.com/contributors" 2392 | } 2393 | ], 2394 | "description": "Symfony utilities for portability of PHP codes", 2395 | "homepage": "https://symfony.com", 2396 | "keywords": [ 2397 | "compat", 2398 | "compatibility", 2399 | "polyfill", 2400 | "shim" 2401 | ], 2402 | "time": "2016-05-18 14:26:46" 2403 | }, 2404 | { 2405 | "name": "symfony/security-acl", 2406 | "version": "v2.8.0", 2407 | "source": { 2408 | "type": "git", 2409 | "url": "https://github.com/symfony/security-acl.git", 2410 | "reference": "4a3f7327ad215242c78f6564ad4ea6d2db1b8347" 2411 | }, 2412 | "dist": { 2413 | "type": "zip", 2414 | "url": "https://api.github.com/repos/symfony/security-acl/zipball/4a3f7327ad215242c78f6564ad4ea6d2db1b8347", 2415 | "reference": "4a3f7327ad215242c78f6564ad4ea6d2db1b8347", 2416 | "shasum": "" 2417 | }, 2418 | "require": { 2419 | "php": ">=5.3.9", 2420 | "symfony/security-core": "~2.4|~3.0.0" 2421 | }, 2422 | "require-dev": { 2423 | "doctrine/common": "~2.2", 2424 | "doctrine/dbal": "~2.2", 2425 | "psr/log": "~1.0", 2426 | "symfony/phpunit-bridge": "~2.7|~3.0.0" 2427 | }, 2428 | "suggest": { 2429 | "doctrine/dbal": "For using the built-in ACL implementation", 2430 | "symfony/class-loader": "For using the ACL generateSql script", 2431 | "symfony/finder": "For using the ACL generateSql script" 2432 | }, 2433 | "type": "library", 2434 | "extra": { 2435 | "branch-alias": { 2436 | "dev-master": "2.8-dev" 2437 | } 2438 | }, 2439 | "autoload": { 2440 | "psr-4": { 2441 | "Symfony\\Component\\Security\\Acl\\": "" 2442 | }, 2443 | "exclude-from-classmap": [ 2444 | "/Tests/" 2445 | ] 2446 | }, 2447 | "notification-url": "https://packagist.org/downloads/", 2448 | "license": [ 2449 | "MIT" 2450 | ], 2451 | "authors": [ 2452 | { 2453 | "name": "Fabien Potencier", 2454 | "email": "fabien@symfony.com" 2455 | }, 2456 | { 2457 | "name": "Symfony Community", 2458 | "homepage": "https://symfony.com/contributors" 2459 | } 2460 | ], 2461 | "description": "Symfony Security Component - ACL (Access Control List)", 2462 | "homepage": "https://symfony.com", 2463 | "time": "2015-12-28 09:39:09" 2464 | }, 2465 | { 2466 | "name": "symfony/swiftmailer-bundle", 2467 | "version": "v2.3.11", 2468 | "source": { 2469 | "type": "git", 2470 | "url": "https://github.com/symfony/swiftmailer-bundle.git", 2471 | "reference": "5e1a90f28213231ceee19c953bbebc5b5b95c690" 2472 | }, 2473 | "dist": { 2474 | "type": "zip", 2475 | "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/5e1a90f28213231ceee19c953bbebc5b5b95c690", 2476 | "reference": "5e1a90f28213231ceee19c953bbebc5b5b95c690", 2477 | "shasum": "" 2478 | }, 2479 | "require": { 2480 | "php": ">=5.3.2", 2481 | "swiftmailer/swiftmailer": ">=4.2.0,~5.0", 2482 | "symfony/config": "~2.3|~3.0", 2483 | "symfony/dependency-injection": "~2.3|~3.0", 2484 | "symfony/http-kernel": "~2.3|~3.0", 2485 | "symfony/yaml": "~2.3|~3.0" 2486 | }, 2487 | "require-dev": { 2488 | "symfony/phpunit-bridge": "~2.7|~3.0" 2489 | }, 2490 | "suggest": { 2491 | "psr/log": "Allows logging" 2492 | }, 2493 | "type": "symfony-bundle", 2494 | "extra": { 2495 | "branch-alias": { 2496 | "dev-master": "2.3-dev" 2497 | } 2498 | }, 2499 | "autoload": { 2500 | "psr-4": { 2501 | "Symfony\\Bundle\\SwiftmailerBundle\\": "" 2502 | } 2503 | }, 2504 | "notification-url": "https://packagist.org/downloads/", 2505 | "license": [ 2506 | "MIT" 2507 | ], 2508 | "authors": [ 2509 | { 2510 | "name": "Symfony Community", 2511 | "homepage": "http://symfony.com/contributors" 2512 | }, 2513 | { 2514 | "name": "Fabien Potencier", 2515 | "email": "fabien@symfony.com" 2516 | } 2517 | ], 2518 | "description": "Symfony SwiftmailerBundle", 2519 | "homepage": "http://symfony.com", 2520 | "time": "2016-01-15 16:41:20" 2521 | }, 2522 | { 2523 | "name": "symfony/symfony", 2524 | "version": "v2.8.8", 2525 | "source": { 2526 | "type": "git", 2527 | "url": "https://github.com/symfony/symfony.git", 2528 | "reference": "038d13264f732f9bba850c423e374dc72874d1a6" 2529 | }, 2530 | "dist": { 2531 | "type": "zip", 2532 | "url": "https://api.github.com/repos/symfony/symfony/zipball/038d13264f732f9bba850c423e374dc72874d1a6", 2533 | "reference": "038d13264f732f9bba850c423e374dc72874d1a6", 2534 | "shasum": "" 2535 | }, 2536 | "require": { 2537 | "doctrine/common": "~2.4", 2538 | "php": ">=5.3.9", 2539 | "psr/log": "~1.0", 2540 | "symfony/polyfill-apcu": "~1.1", 2541 | "symfony/polyfill-intl-icu": "~1.0", 2542 | "symfony/polyfill-mbstring": "~1.0", 2543 | "symfony/polyfill-php54": "~1.0", 2544 | "symfony/polyfill-php55": "~1.0", 2545 | "symfony/polyfill-php56": "~1.0", 2546 | "symfony/polyfill-php70": "~1.0", 2547 | "symfony/polyfill-util": "~1.0", 2548 | "symfony/security-acl": "~2.7|~3.0.0", 2549 | "twig/twig": "~1.23|~2.0" 2550 | }, 2551 | "conflict": { 2552 | "phpdocumentor/reflection": "<1.0.7" 2553 | }, 2554 | "replace": { 2555 | "symfony/asset": "self.version", 2556 | "symfony/browser-kit": "self.version", 2557 | "symfony/class-loader": "self.version", 2558 | "symfony/config": "self.version", 2559 | "symfony/console": "self.version", 2560 | "symfony/css-selector": "self.version", 2561 | "symfony/debug": "self.version", 2562 | "symfony/debug-bundle": "self.version", 2563 | "symfony/dependency-injection": "self.version", 2564 | "symfony/doctrine-bridge": "self.version", 2565 | "symfony/dom-crawler": "self.version", 2566 | "symfony/event-dispatcher": "self.version", 2567 | "symfony/expression-language": "self.version", 2568 | "symfony/filesystem": "self.version", 2569 | "symfony/finder": "self.version", 2570 | "symfony/form": "self.version", 2571 | "symfony/framework-bundle": "self.version", 2572 | "symfony/http-foundation": "self.version", 2573 | "symfony/http-kernel": "self.version", 2574 | "symfony/intl": "self.version", 2575 | "symfony/ldap": "self.version", 2576 | "symfony/locale": "self.version", 2577 | "symfony/monolog-bridge": "self.version", 2578 | "symfony/options-resolver": "self.version", 2579 | "symfony/process": "self.version", 2580 | "symfony/property-access": "self.version", 2581 | "symfony/property-info": "self.version", 2582 | "symfony/proxy-manager-bridge": "self.version", 2583 | "symfony/routing": "self.version", 2584 | "symfony/security": "self.version", 2585 | "symfony/security-bundle": "self.version", 2586 | "symfony/security-core": "self.version", 2587 | "symfony/security-csrf": "self.version", 2588 | "symfony/security-guard": "self.version", 2589 | "symfony/security-http": "self.version", 2590 | "symfony/serializer": "self.version", 2591 | "symfony/stopwatch": "self.version", 2592 | "symfony/swiftmailer-bridge": "self.version", 2593 | "symfony/templating": "self.version", 2594 | "symfony/translation": "self.version", 2595 | "symfony/twig-bridge": "self.version", 2596 | "symfony/twig-bundle": "self.version", 2597 | "symfony/validator": "self.version", 2598 | "symfony/var-dumper": "self.version", 2599 | "symfony/web-profiler-bundle": "self.version", 2600 | "symfony/yaml": "self.version" 2601 | }, 2602 | "require-dev": { 2603 | "doctrine/data-fixtures": "1.0.*", 2604 | "doctrine/dbal": "~2.4", 2605 | "doctrine/doctrine-bundle": "~1.2", 2606 | "doctrine/orm": "~2.4,>=2.4.5", 2607 | "egulias/email-validator": "~1.2,>=1.2.1", 2608 | "monolog/monolog": "~1.11", 2609 | "ocramius/proxy-manager": "~0.4|~1.0|~2.0", 2610 | "phpdocumentor/reflection": "^1.0.7" 2611 | }, 2612 | "type": "library", 2613 | "extra": { 2614 | "branch-alias": { 2615 | "dev-master": "2.8-dev" 2616 | } 2617 | }, 2618 | "autoload": { 2619 | "psr-4": { 2620 | "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", 2621 | "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", 2622 | "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", 2623 | "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", 2624 | "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", 2625 | "Symfony\\Bundle\\": "src/Symfony/Bundle/", 2626 | "Symfony\\Component\\": "src/Symfony/Component/" 2627 | }, 2628 | "classmap": [ 2629 | "src/Symfony/Component/Intl/Resources/stubs" 2630 | ], 2631 | "exclude-from-classmap": [ 2632 | "**/Tests/" 2633 | ] 2634 | }, 2635 | "notification-url": "https://packagist.org/downloads/", 2636 | "license": [ 2637 | "MIT" 2638 | ], 2639 | "authors": [ 2640 | { 2641 | "name": "Fabien Potencier", 2642 | "email": "fabien@symfony.com" 2643 | }, 2644 | { 2645 | "name": "Symfony Community", 2646 | "homepage": "https://symfony.com/contributors" 2647 | } 2648 | ], 2649 | "description": "The Symfony PHP framework", 2650 | "homepage": "https://symfony.com", 2651 | "keywords": [ 2652 | "framework" 2653 | ], 2654 | "time": "2016-06-30 15:42:24" 2655 | }, 2656 | { 2657 | "name": "twig/twig", 2658 | "version": "v1.24.1", 2659 | "source": { 2660 | "type": "git", 2661 | "url": "https://github.com/twigphp/Twig.git", 2662 | "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" 2663 | }, 2664 | "dist": { 2665 | "type": "zip", 2666 | "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", 2667 | "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", 2668 | "shasum": "" 2669 | }, 2670 | "require": { 2671 | "php": ">=5.2.7" 2672 | }, 2673 | "require-dev": { 2674 | "symfony/debug": "~2.7", 2675 | "symfony/phpunit-bridge": "~2.7" 2676 | }, 2677 | "type": "library", 2678 | "extra": { 2679 | "branch-alias": { 2680 | "dev-master": "1.24-dev" 2681 | } 2682 | }, 2683 | "autoload": { 2684 | "psr-0": { 2685 | "Twig_": "lib/" 2686 | } 2687 | }, 2688 | "notification-url": "https://packagist.org/downloads/", 2689 | "license": [ 2690 | "BSD-3-Clause" 2691 | ], 2692 | "authors": [ 2693 | { 2694 | "name": "Fabien Potencier", 2695 | "email": "fabien@symfony.com", 2696 | "homepage": "http://fabien.potencier.org", 2697 | "role": "Lead Developer" 2698 | }, 2699 | { 2700 | "name": "Armin Ronacher", 2701 | "email": "armin.ronacher@active-4.com", 2702 | "role": "Project Founder" 2703 | }, 2704 | { 2705 | "name": "Twig Team", 2706 | "homepage": "http://twig.sensiolabs.org/contributors", 2707 | "role": "Contributors" 2708 | } 2709 | ], 2710 | "description": "Twig, the flexible, fast, and secure template language for PHP", 2711 | "homepage": "http://twig.sensiolabs.org", 2712 | "keywords": [ 2713 | "templating" 2714 | ], 2715 | "time": "2016-05-30 09:11:59" 2716 | }, 2717 | { 2718 | "name": "willdurand/jsonp-callback-validator", 2719 | "version": "v1.1.0", 2720 | "source": { 2721 | "type": "git", 2722 | "url": "https://github.com/willdurand/JsonpCallbackValidator.git", 2723 | "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909" 2724 | }, 2725 | "dist": { 2726 | "type": "zip", 2727 | "url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909", 2728 | "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909", 2729 | "shasum": "" 2730 | }, 2731 | "require": { 2732 | "php": ">=5.3.0" 2733 | }, 2734 | "require-dev": { 2735 | "phpunit/phpunit": "~3.7" 2736 | }, 2737 | "type": "library", 2738 | "autoload": { 2739 | "psr-0": { 2740 | "JsonpCallbackValidator": "src/" 2741 | } 2742 | }, 2743 | "notification-url": "https://packagist.org/downloads/", 2744 | "license": [ 2745 | "MIT" 2746 | ], 2747 | "authors": [ 2748 | { 2749 | "name": "William Durand", 2750 | "email": "william.durand1@gmail.com", 2751 | "homepage": "http://www.willdurand.fr" 2752 | } 2753 | ], 2754 | "description": "JSONP callback validator.", 2755 | "time": "2014-01-20 22:35:06" 2756 | }, 2757 | { 2758 | "name": "willdurand/negotiation", 2759 | "version": "v2.0.2", 2760 | "source": { 2761 | "type": "git", 2762 | "url": "https://github.com/willdurand/Negotiation.git", 2763 | "reference": "a8ce6da7acdf07351ccd6a9359c571ebc0725a21" 2764 | }, 2765 | "dist": { 2766 | "type": "zip", 2767 | "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/a8ce6da7acdf07351ccd6a9359c571ebc0725a21", 2768 | "reference": "a8ce6da7acdf07351ccd6a9359c571ebc0725a21", 2769 | "shasum": "" 2770 | }, 2771 | "require": { 2772 | "php": ">=5.4.0" 2773 | }, 2774 | "type": "library", 2775 | "extra": { 2776 | "branch-alias": { 2777 | "dev-master": "2.0-dev" 2778 | } 2779 | }, 2780 | "autoload": { 2781 | "psr-4": { 2782 | "Negotiation\\": "src/Negotiation" 2783 | } 2784 | }, 2785 | "notification-url": "https://packagist.org/downloads/", 2786 | "license": [ 2787 | "MIT" 2788 | ], 2789 | "authors": [ 2790 | { 2791 | "name": "William Durand", 2792 | "email": "will+git@drnd.me" 2793 | } 2794 | ], 2795 | "description": "Content Negotiation tools for PHP provided as a standalone library.", 2796 | "homepage": "http://williamdurand.fr/Negotiation/", 2797 | "keywords": [ 2798 | "accept", 2799 | "content", 2800 | "format", 2801 | "header", 2802 | "negotiation" 2803 | ], 2804 | "time": "2015-11-21 14:23:02" 2805 | } 2806 | ], 2807 | "packages-dev": [ 2808 | { 2809 | "name": "sensio/generator-bundle", 2810 | "version": "v3.0.7", 2811 | "source": { 2812 | "type": "git", 2813 | "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", 2814 | "reference": "d1be460925376703a470a3ac6ec034eb7eab3892" 2815 | }, 2816 | "dist": { 2817 | "type": "zip", 2818 | "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/d1be460925376703a470a3ac6ec034eb7eab3892", 2819 | "reference": "d1be460925376703a470a3ac6ec034eb7eab3892", 2820 | "shasum": "" 2821 | }, 2822 | "require": { 2823 | "symfony/console": "~2.7|~3.0", 2824 | "symfony/framework-bundle": "~2.7|~3.0", 2825 | "symfony/process": "~2.7|~3.0", 2826 | "symfony/yaml": "~2.7|~3.0" 2827 | }, 2828 | "require-dev": { 2829 | "doctrine/orm": "~2.4", 2830 | "symfony/doctrine-bridge": "~2.7|~3.0", 2831 | "twig/twig": "~1.18" 2832 | }, 2833 | "type": "symfony-bundle", 2834 | "extra": { 2835 | "branch-alias": { 2836 | "dev-master": "3.0.x-dev" 2837 | } 2838 | }, 2839 | "autoload": { 2840 | "psr-4": { 2841 | "Sensio\\Bundle\\GeneratorBundle\\": "" 2842 | }, 2843 | "exclude-from-classmap": [ 2844 | "/Tests/" 2845 | ] 2846 | }, 2847 | "notification-url": "https://packagist.org/downloads/", 2848 | "license": [ 2849 | "MIT" 2850 | ], 2851 | "authors": [ 2852 | { 2853 | "name": "Fabien Potencier", 2854 | "email": "fabien@symfony.com" 2855 | } 2856 | ], 2857 | "description": "This bundle generates code for you", 2858 | "time": "2016-06-20 05:58:05" 2859 | }, 2860 | { 2861 | "name": "symfony/phpunit-bridge", 2862 | "version": "v2.8.8", 2863 | "source": { 2864 | "type": "git", 2865 | "url": "https://github.com/symfony/phpunit-bridge.git", 2866 | "reference": "bc61b781fa7f07f9a2ed4e69b15d5c2238695fc0" 2867 | }, 2868 | "dist": { 2869 | "type": "zip", 2870 | "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/bc61b781fa7f07f9a2ed4e69b15d5c2238695fc0", 2871 | "reference": "bc61b781fa7f07f9a2ed4e69b15d5c2238695fc0", 2872 | "shasum": "" 2873 | }, 2874 | "require": { 2875 | "php": ">=5.3.3" 2876 | }, 2877 | "suggest": { 2878 | "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" 2879 | }, 2880 | "type": "symfony-bridge", 2881 | "extra": { 2882 | "branch-alias": { 2883 | "dev-master": "2.8-dev" 2884 | } 2885 | }, 2886 | "autoload": { 2887 | "files": [ 2888 | "bootstrap.php" 2889 | ], 2890 | "psr-4": { 2891 | "Symfony\\Bridge\\PhpUnit\\": "" 2892 | }, 2893 | "exclude-from-classmap": [ 2894 | "/Tests/" 2895 | ] 2896 | }, 2897 | "notification-url": "https://packagist.org/downloads/", 2898 | "license": [ 2899 | "MIT" 2900 | ], 2901 | "authors": [ 2902 | { 2903 | "name": "Nicolas Grekas", 2904 | "email": "p@tchwork.com" 2905 | }, 2906 | { 2907 | "name": "Symfony Community", 2908 | "homepage": "https://symfony.com/contributors" 2909 | } 2910 | ], 2911 | "description": "Symfony PHPUnit Bridge", 2912 | "homepage": "https://symfony.com", 2913 | "time": "2016-06-29 05:31:50" 2914 | } 2915 | ], 2916 | "aliases": [], 2917 | "minimum-stability": "stable", 2918 | "stability-flags": [], 2919 | "prefer-stable": false, 2920 | "prefer-lowest": false, 2921 | "platform": { 2922 | "php": ">=5.3.9" 2923 | }, 2924 | "platform-dev": [] 2925 | } 2926 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Require all denied 3 | 4 | 5 | Order deny,allow 6 | Deny from all 7 | 8 | -------------------------------------------------------------------------------- /src/AppBundle/AppBundle.php: -------------------------------------------------------------------------------- 1 | addCompilerPass(new OverrideFOSOAuthServerTokenControllerPass()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/AppBundle/Command/CreateOAuthClientCommand.php: -------------------------------------------------------------------------------- 1 | setName('app:oauth-client:create') 20 | ->setDescription('Create a new OAuth client for a company') 21 | ->addArgument('company', InputArgument::REQUIRED, 'The company ID'); 22 | } 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | protected function execute(InputInterface $input, OutputInterface $output) 28 | { 29 | $clientManager = $this->getContainer()->get('fos_oauth_server.client_manager'); 30 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); 31 | $companyId = (int) $input->getArgument('company'); 32 | 33 | if (!($company = $em->getRepository('AppBundle:Company')->find($companyId))) { 34 | $output->writeln(sprintf('Could not find company with ID "%d"', $companyId)); 35 | return false; 36 | } 37 | 38 | // create a new OAuth client and assign it to the company 39 | $client = $clientManager->createClient(); 40 | $client->setAllowedGrantTypes(array(OAuth2::GRANT_TYPE_CLIENT_CREDENTIALS)); 41 | $company->setOAuthClient($client); 42 | $clientManager->updateClient($client); 43 | 44 | $output->writeln(sprintf('client_id=%s_%s', $client->getId(), $client->getRandomId())); 45 | $output->writeln(sprintf('client_secret=%s', $client->getSecret())); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/AppBundle/Command/EncodeRestaurantIdCommand.php: -------------------------------------------------------------------------------- 1 | setName('app:restaurant:encode-id') 22 | ->setDescription('Encodes the restaurant ID to a unique string') 23 | ->addArgument('restaurant', InputArgument::REQUIRED, 'The restaurant ID'); 24 | } 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | protected function execute(InputInterface $input, OutputInterface $output) 30 | { 31 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); 32 | $restaurantId = (int) $input->getArgument('restaurant'); 33 | 34 | if (!($restaurant = $em->getRepository('AppBundle:Restaurant')->find($restaurantId))) { 35 | $output->writeln(sprintf('Could not find restaurant with ID "%d"', $restaurantId)); 36 | return false; 37 | } 38 | 39 | // encode the restaurant's ID 40 | $encoder = new Hashids($this->getContainer()->getParameter('secret'), self::MIN_HASH_LENGTH); 41 | $hashid = $encoder->encode($restaurant->getId()); 42 | $restaurant->setHashid($hashid); 43 | $em->flush(); 44 | 45 | $output->writeln(sprintf('Created hashid for restaurant: %s', $hashid)); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/AppBundle/Controller/Api/RestaurantApiController.php: -------------------------------------------------------------------------------- 1 | isGranted('ROLE_WIDGET')) { 27 | /** @var OAuthAccessToken $token */ 28 | $token = $this->get('fos_oauth_server.access_token_manager')->findTokenByToken($this->get('security.token_storage')->getToken()->getToken()); 29 | 30 | // prevent access to all other restaurants 31 | if ($token->getRestaurant()->getId() !== $restaurant->getId()) { 32 | throw new AccessDeniedException(); 33 | } 34 | 35 | // only serialise certain fields 36 | $context = new Context(); 37 | $context->setGroups(array('widget')); 38 | $view->setContext($context); 39 | } 40 | 41 | $view->setData(array( 42 | 'restaurant' => $restaurant, 43 | )); 44 | 45 | return $view; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/AppBundle/Controller/DefaultController.php: -------------------------------------------------------------------------------- 1 | render('default/index.html.twig', array( 18 | 'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..'), 19 | )); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/AppBundle/Controller/TokenController.php: -------------------------------------------------------------------------------- 1 | clientManager = $clientManager; 37 | $this->tokenManager = $tokenManager; 38 | $this->entityManager = $entityManager; 39 | } 40 | 41 | /** 42 | * Overridden to handle access token requests with an "restaurant_id" parameter, so that widgets can receive a scoped 43 | * token through a standard client credentials grant request without exposing the company's client ID & secret. 44 | * 45 | * {@inheritdoc} 46 | */ 47 | public function tokenAction(Request $request) 48 | { 49 | if ($request === null) { 50 | $request = Request::createFromGlobals(); 51 | } 52 | 53 | // get the hashid from the request 54 | $property = $request->isMethod(Request::METHOD_POST) ? 'request' : 'query'; 55 | $hashid = $request->$property->get('restaurant_id'); 56 | $request->$property->remove('restaurant_id'); 57 | 58 | if (!$hashid) { 59 | // continue with creating an access token from existing parameters 60 | return parent::tokenAction($request); 61 | } 62 | 63 | try { 64 | // find the relevant oauth client 65 | if (!($oauthClient = $this->clientManager->findOAuthClientByRestaurantHashid($hashid))) { 66 | throw new OAuth2ServerException(OAuth2::HTTP_BAD_REQUEST, OAuth2::ERROR_INVALID_REQUEST, 'Invalid restaurant ID.'); 67 | } 68 | 69 | // build a standard client credentials request 70 | $request->$property->set('client_id', $oauthClient->getPublicId()); 71 | $request->$property->set('client_secret', $oauthClient->getSecret()); 72 | $request->$property->set('grant_type', OAuth2::GRANT_TYPE_CLIENT_CREDENTIALS); 73 | $request->$property->set('scope', 'widget'); 74 | 75 | // handle the request, decoding the created token so we can get a managed entity 76 | $response = parent::tokenAction($request); 77 | $responseToken = json_decode($response->getContent()); 78 | 79 | /** @var OAuthAccessToken $token */ 80 | if (!$responseToken || !($token = $this->tokenManager->findTokenByToken($responseToken->access_token))) { 81 | throw new OAuth2ServerException(OAuth2::HTTP_BAD_REQUEST, OAuth2::ERROR_INVALID_REQUEST, 'Unable to decode the token.'); 82 | } 83 | 84 | // associate the token with the restaurant and update 85 | $restaurant = $this->entityManager->getRepository('AppBundle:Restaurant')->findOneBy(array('hashid' => $hashid)); 86 | $token->setRestaurant($restaurant); 87 | $this->tokenManager->updateToken($token); 88 | 89 | return $response; 90 | } catch (OAuth2ServerException $e) { 91 | return $e->getHttpResponse(); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/AppBundle/DependencyInjection/Compiler/OverrideFOSOAuthServerTokenControllerPass.php: -------------------------------------------------------------------------------- 1 | getDefinition('fos_oauth_server.controller.token'); 18 | $definition->setClass(TokenController::class); 19 | $definition->addArgument(new Reference('fos_oauth_server.client_manager')); 20 | $definition->addArgument(new Reference('fos_oauth_server.access_token_manager')); 21 | $definition->addArgument(new Reference('doctrine.orm.entity_manager')); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/AppBundle/Entity/Company.php: -------------------------------------------------------------------------------- 1 | restaurants = new ArrayCollection(); 47 | } 48 | 49 | /** 50 | * Get id 51 | * 52 | * @return integer 53 | */ 54 | public function getId() 55 | { 56 | return $this->id; 57 | } 58 | 59 | /** 60 | * Set name 61 | * 62 | * @param string $name 63 | * @return $this 64 | */ 65 | public function setName($name) 66 | { 67 | $this->name = $name; 68 | 69 | return $this; 70 | } 71 | 72 | /** 73 | * Get name 74 | * 75 | * @return string 76 | */ 77 | public function getName() 78 | { 79 | return $this->name; 80 | } 81 | 82 | /** 83 | * Add restaurant 84 | * 85 | * @param Restaurant $restaurant 86 | * @return $this 87 | */ 88 | public function addRestaurant(Restaurant $restaurant) 89 | { 90 | $restaurant->setCompany($this); 91 | $this->restaurants->add($restaurant); 92 | 93 | return $this; 94 | } 95 | 96 | /** 97 | * Remove restaurant 98 | * 99 | * @param Restaurant $restaurant 100 | * @return $this 101 | */ 102 | public function removeRestaurant(Restaurant $restaurant) 103 | { 104 | $this->restaurants->removeElement($restaurant); 105 | $restaurant->setCompany(null); 106 | 107 | return $this; 108 | } 109 | /** 110 | * Get restaurants 111 | * 112 | * @return Restaurant[]|ArrayCollection 113 | */ 114 | public function getRestaurants() 115 | { 116 | return $this->restaurants; 117 | } 118 | 119 | /** 120 | * Set oauthClient 121 | * 122 | * @param OAuthClient $oauthClient 123 | * @return $this 124 | */ 125 | public function setOAuthClient(OAuthClient $oauthClient = null) 126 | { 127 | $this->oauthClient = $oauthClient; 128 | 129 | return $this; 130 | } 131 | 132 | /** 133 | * Get oauthClient 134 | * 135 | * @return OAuthClient 136 | */ 137 | public function getOAuthClient() 138 | { 139 | return $this->oauthClient; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/AppBundle/Entity/Manager/OAuthClientManager.php: -------------------------------------------------------------------------------- 1 | repository->createQueryBuilder('cl') 19 | ->from('AppBundle:Restaurant', 'r') 20 | ->join('r.company', 'c') 21 | ->join('c.oauthClient', 'ccl') 22 | ->where('cl = ccl') 23 | ->andWhere('r.hashid = :hashid') 24 | ->setParameter('hashid', $hashid) 25 | ->getQuery() 26 | ->getOneOrNullResult(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/AppBundle/Entity/OAuthAccessToken.php: -------------------------------------------------------------------------------- 1 | restaurant = $restaurant; 41 | 42 | return $this; 43 | } 44 | 45 | /** 46 | * @return Restaurant 47 | */ 48 | public function getRestaurant() 49 | { 50 | return $this->restaurant; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/AppBundle/Entity/OAuthAuthCode.php: -------------------------------------------------------------------------------- 1 | restaurants = new ArrayCollection(); 62 | } 63 | 64 | /** 65 | * Get id 66 | * 67 | * @return integer 68 | */ 69 | public function getId() 70 | { 71 | return $this->id; 72 | } 73 | 74 | /** 75 | * Set hashid 76 | * 77 | * @param string $hashid 78 | * @return $this 79 | */ 80 | public function setHashid($hashid) 81 | { 82 | $this->hashid = $hashid; 83 | 84 | return $this; 85 | } 86 | 87 | /** 88 | * Get hashid 89 | * 90 | * @return string 91 | */ 92 | public function getHashid() 93 | { 94 | return $this->hashid; 95 | } 96 | 97 | /** 98 | * Set name 99 | * 100 | * @param string $name 101 | * @return $this 102 | */ 103 | public function setName($name) 104 | { 105 | $this->name = $name; 106 | 107 | return $this; 108 | } 109 | 110 | /** 111 | * Get name 112 | * 113 | * @return string 114 | */ 115 | public function getName() 116 | { 117 | return $this->name; 118 | } 119 | 120 | /** 121 | * Set menu 122 | * 123 | * @param string $menu 124 | * @return $this 125 | */ 126 | public function setMenu($menu) 127 | { 128 | $this->menu = $menu; 129 | 130 | return $this; 131 | } 132 | 133 | /** 134 | * Get menu 135 | * 136 | * @return string 137 | */ 138 | public function getMenu() 139 | { 140 | return $this->menu; 141 | } 142 | 143 | /** 144 | * Set company 145 | * 146 | * @param Company $company 147 | * @return $this 148 | */ 149 | public function setCompany(Company $company = null) 150 | { 151 | $this->company = $company; 152 | 153 | return $this; 154 | } 155 | 156 | /** 157 | * Get company 158 | * 159 | * @return Company 160 | */ 161 | public function getCompany() 162 | { 163 | return $this->company; 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /web/.htaccess: -------------------------------------------------------------------------------- 1 | # Use the front controller as index file. It serves as a fallback solution when 2 | # every other rewrite/redirect fails (e.g. in an aliased environment without 3 | # mod_rewrite). Additionally, this reduces the matching process for the 4 | # start page (path "/") because otherwise Apache will apply the rewriting rules 5 | # to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl). 6 | DirectoryIndex app.php 7 | 8 | # By default, Apache does not evaluate symbolic links if you did not enable this 9 | # feature in your server configuration. Uncomment the following line if you 10 | # install assets as symlinks or if you experience problems related to symlinks 11 | # when compiling LESS/Sass/CoffeScript assets. 12 | # Options FollowSymlinks 13 | 14 | # Disabling MultiViews prevents unwanted negotiation, e.g. "/app" should not resolve 15 | # to the front controller "/app.php" but be rewritten to "/app.php/app". 16 | 17 | Options -MultiViews 18 | 19 | 20 | 21 | RewriteEngine On 22 | 23 | # Determine the RewriteBase automatically and set it as environment variable. 24 | # If you are using Apache aliases to do mass virtual hosting or installed the 25 | # project in a subdirectory, the base path will be prepended to allow proper 26 | # resolution of the app.php file and to redirect to the correct URI. It will 27 | # work in environments without path prefix as well, providing a safe, one-size 28 | # fits all solution. But as you do not need it in this case, you can comment 29 | # the following 2 lines to eliminate the overhead. 30 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 31 | RewriteRule ^(.*) - [E=BASE:%1] 32 | 33 | # Sets the HTTP_AUTHORIZATION header removed by apache 34 | RewriteCond %{HTTP:Authorization} . 35 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 36 | 37 | # Redirect to URI without front controller to prevent duplicate content 38 | # (with and without `/app.php`). Only do this redirect on the initial 39 | # rewrite by Apache and not on subsequent cycles. Otherwise we would get an 40 | # endless redirect loop (request -> rewrite to front controller -> 41 | # redirect -> request -> ...). 42 | # So in case you get a "too many redirects" error or you always get redirected 43 | # to the start page because your Apache does not expose the REDIRECT_STATUS 44 | # environment variable, you have 2 choices: 45 | # - disable this feature by commenting the following 2 lines or 46 | # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the 47 | # following RewriteCond (best solution) 48 | RewriteCond %{ENV:REDIRECT_STATUS} ^$ 49 | RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L] 50 | 51 | # If the requested filename exists, simply serve it. 52 | # We only want to let Apache serve files and not directories. 53 | RewriteCond %{REQUEST_FILENAME} -f 54 | RewriteRule .? - [L] 55 | 56 | # Rewrite all other queries to the front controller. 57 | RewriteRule .? %{ENV:BASE}/app.php [L] 58 | 59 | 60 | 61 | 62 | # When mod_rewrite is not available, we instruct a temporary redirect of 63 | # the start page to the front controller explicitly so that the website 64 | # and the generated links can still be used. 65 | RedirectMatch 302 ^/$ /app.php/ 66 | # RedirectTemp cannot be used instead 67 | 68 | 69 | -------------------------------------------------------------------------------- /web/app.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 13 | //$kernel = new AppCache($kernel); 14 | 15 | // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter 16 | //Request::enableHttpMethodParameterOverride(); 17 | $request = Request::createFromGlobals(); 18 | $response = $kernel->handle($request); 19 | $response->send(); 20 | $kernel->terminate($request, $response); 21 | -------------------------------------------------------------------------------- /web/app_dev.php: -------------------------------------------------------------------------------- 1 | loadClassCache(); 29 | $request = Request::createFromGlobals(); 30 | $response = $kernel->handle($request); 31 | $response->send(); 32 | $kernel->terminate($request, $response); 33 | -------------------------------------------------------------------------------- /web/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codevate/public-api-blog-post-example/65ed79b6517c71893fa1642ab3139d958d36be24/web/apple-touch-icon.png -------------------------------------------------------------------------------- /web/config.php: -------------------------------------------------------------------------------- 1 | getFailedRequirements(); 30 | $minorProblems = $symfonyRequirements->getFailedRecommendations(); 31 | 32 | ?> 33 | 34 | 35 | 36 | 37 | 38 | Symfony Configuration Checker 39 | 40 | 41 | 122 | 123 | 124 |
125 |
126 | 129 | 130 | 150 |
151 | 152 |
153 |
154 |
155 |

Configuration Checker

156 |

157 | This script analyzes your system to check whether is 158 | ready to run Symfony applications. 159 |

160 | 161 | 162 |

Major problems

163 |

Major problems have been detected and must be fixed before continuing:

164 |
    165 | 166 |
  1. getTestMessage() ?> 167 |

    getHelpHtml() ?>

    168 |
  2. 169 | 170 |
171 | 172 | 173 | 174 |

Recommendations

175 |

176 | Additionally, toTo enhance your Symfony experience, 177 | it’s recommended that you fix the following: 178 |

179 |
    180 | 181 |
  1. getTestMessage() ?> 182 |

    getHelpHtml() ?>

    183 |
  2. 184 | 185 |
186 | 187 | 188 | hasPhpIniConfigIssue()): ?> 189 |

* 190 | getPhpIniConfigPath()): ?> 191 | Changes to the php.ini file must be done in "getPhpIniConfigPath() ?>". 192 | 193 | To change settings, create a "php.ini". 194 | 195 |

196 | 197 | 198 | 199 |

All checks passed successfully. Your system is ready to run Symfony applications.

200 | 201 | 202 | 207 |
208 |
209 |
210 |
Symfony Standard Edition
211 |
212 | 213 | 214 | -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Codevate/public-api-blog-post-example/65ed79b6517c71893fa1642ab3139d958d36be24/web/favicon.ico -------------------------------------------------------------------------------- /web/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | Disallow: 6 | --------------------------------------------------------------------------------