From 470dc12f5c9a9a6af35bb8386ee435a02d961d4c Mon Sep 17 00:00:00 2001 From: Sebastian Marcet Date: Fri, 4 Nov 2016 17:07:57 -0300 Subject: [PATCH] Added doctrine L2 cache in order to improve query performance added L2 cache configuration to some queries and classes. also updated doctrine version. Change-Id: I86ac24b65a28919de411b024c7ad175747630f6e --- .gitignore | 3 +- Libs/Utils/CustomDoctrineServiceProvider.php | 54 + Libs/Utils/CustomEntityManagerFactory.php | 88 + app/Http/Middleware/CORSMiddleware.php | 19 +- ...Auth2BearerAccessTokenRequestValidator.php | 12 +- app/Http/Middleware/RateLimitMiddleware.php | 8 +- .../SummitEventFeedbackSerializer.php | 45 +- app/Models/Foundation/Main/Company.php | 1 + .../Presentations/PresentationSpeaker.php | 1 + .../Foundation/Summit/Events/SummitEvent.php | 1 + .../Summit/Events/SummitEventFeedback.php | 1 + app/Models/Foundation/Summit/Summit.php | 14 +- .../ResourceServer/AccessTokenService.php | 10 +- app/Models/ResourceServer/Api.php | 184 +- app/Models/ResourceServer/ApiEndpoint.php | 342 +- app/Models/ResourceServer/ApiScope.php | 165 +- .../ResourceServer/IAccessTokenService.php | 4 +- app/Models/ResourceServer/IApi.php | 11 +- app/Models/ResourceServer/IApiEndpoint.php | 48 +- .../ResourceServer/IApiEndpointRepository.php | 4 +- app/Models/ResourceServer/IApiScope.php | 12 +- .../ResourceServer/ResourceServerEntity.php | 96 + app/Models/Utils/SilverstripeBaseModel.php | 11 +- app/Providers/AppServiceProvider.php | 8 +- app/Repositories/RepositoriesProvider.php | 9 +- .../DoctrineApiEndpointRepository.php | 52 + .../EloquentApiEndpointRepository.php | 5 +- .../DoctrineEventFeedbackRepository.php | 18 +- composer.json | 4 +- composer.lock | 4346 +++++++++++++++++ config/app.php | 2 +- config/doctrine.php | 15 +- database/seeds/ApiEndpointsSeeder.php | 788 +-- database/seeds/ApiScopesSeeder.php | 157 +- database/seeds/ApiSeeder.php | 67 +- database/seeds/DatabaseSeeder.php | 7 +- database/seeds/TestSeeder.php | 2 +- storage/proxies/.gitignore | 2 - tests/OAuth2SummitApiTest.php | 30 +- tests/ProtectedApiTest.php | 4 +- tests/ServicesTest.php | 4 +- 41 files changed, 5644 insertions(+), 1010 deletions(-) create mode 100644 Libs/Utils/CustomDoctrineServiceProvider.php create mode 100644 Libs/Utils/CustomEntityManagerFactory.php create mode 100644 app/Models/ResourceServer/ResourceServerEntity.php create mode 100644 app/Repositories/ResourceServer/DoctrineApiEndpointRepository.php create mode 100644 composer.lock delete mode 100755 storage/proxies/.gitignore diff --git a/.gitignore b/.gitignore index b214c01b..bb89681c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /vendor /node_modules composer.phar -composer.lock .DS_Storeapp/storage .idea/* app/config/dev/* @@ -23,5 +22,5 @@ doc/build *.egg-info .env.testing .env -storage/logs/* +storage/* *.log \ No newline at end of file diff --git a/Libs/Utils/CustomDoctrineServiceProvider.php b/Libs/Utils/CustomDoctrineServiceProvider.php new file mode 100644 index 00000000..c0606695 --- /dev/null +++ b/Libs/Utils/CustomDoctrineServiceProvider.php @@ -0,0 +1,54 @@ +app->singleton('registry', function ($app) { + $registry = new IlluminateRegistry($app, $app->make(CustomEntityManagerFactory::class)); + + // Add all managers into the registry + foreach ($app->make('config')->get('doctrine.managers', []) as $manager => $settings) { + $registry->addManager($manager, $settings); + } + + return $registry; + }); + + // Once the registry get's resolved, we will call the resolve callbacks which were waiting for the registry + $this->app->afterResolving('registry', function (ManagerRegistry $registry, Container $container) { + $this->bootExtensionManager(); + + BootChain::boot($registry); + }); + + $this->app->alias('registry', ManagerRegistry::class); + $this->app->alias('registry', IlluminateRegistry::class); + } + +} \ No newline at end of file diff --git a/Libs/Utils/CustomEntityManagerFactory.php b/Libs/Utils/CustomEntityManagerFactory.php new file mode 100644 index 00000000..9ee31c79 --- /dev/null +++ b/Libs/Utils/CustomEntityManagerFactory.php @@ -0,0 +1,88 @@ +config->get('doctrine.cache.second_level', []); + + if (!is_array($second_level_cache_config)) return; + if (!isset($second_level_cache_config['enabled'])) return; + if (!$second_level_cache_config['enabled']) return; + + $configuration->setSecondLevelCacheEnabled(true); + + $cacheConfig = $configuration->getSecondLevelCacheConfiguration(); + $regions_config = isset($second_level_cache_config['regions']) ? $second_level_cache_config['regions'] : []; + + if (is_array($regions_config) && count($regions_config) > 0) { + + $regions_configuration = new RegionsConfiguration + ( + isset($second_level_cache_config['region_lifetime']) ? $second_level_cache_config['region_lifetime'] : 3600, + isset($second_level_cache_config['region_lock_lifetime']) ? $second_level_cache_config['region_lock_lifetime'] : 60 + ); + + foreach ($regions_config as $region_name => $region_config) { + if (isset($region_config['lifetime'])) + $regions_configuration->setLifetime($region_name, $region_config['lifetime']); + + if (isset($region_config['lock_lifetime'])) + $regions_configuration->setLockLifetime($region_name, $region_config['lock_lifetime']); + + } + + $cacheConfig->setRegionsConfiguration($regions_configuration); + } + + // Cache logger + if (isset($second_level_cache_config['log_enabled']) && $second_level_cache_config['log_enabled']){ + $logger = new StatisticsCacheLogger(); + $cacheConfig->setCacheLogger($logger); + } + + $factory = new DefaultCacheFactory + ( + $cacheConfig->getRegionsConfiguration(), + $this->cache->driver() + ); + + $file_lock_region_directory = isset($second_level_cache_config['file_lock_region_directory']) ? + $second_level_cache_config['file_lock_region_directory'] : + '/tmp'; + + $factory->setFileLockRegionDirectory($file_lock_region_directory); + + $cacheConfig->setCacheFactory + ( + $factory + ); + + } +} \ No newline at end of file diff --git a/app/Http/Middleware/CORSMiddleware.php b/app/Http/Middleware/CORSMiddleware.php index 41c4beaf..9da122ec 100644 --- a/app/Http/Middleware/CORSMiddleware.php +++ b/app/Http/Middleware/CORSMiddleware.php @@ -14,8 +14,8 @@ use Closure; use libs\utils\ICacheService; -use models\resource_server\IApiEndpoint; -use models\resource_server\IApiEndpointRepository; +use App\Models\ResourceServer\IApiEndpoint; +use App\Models\ResourceServer\IApiEndpointRepository; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Illuminate\Support\Facades\Cache; @@ -23,7 +23,6 @@ use Carbon\Carbon; use Illuminate\Support\Facades\Config; use libs\utils\RequestUtils; - /** * * @package App\Http\Middleware\ @@ -90,6 +89,11 @@ class CORSMiddleware */ private $cache_service; + /** + * CORSMiddleware constructor. + * @param IApiEndpointRepository $endpoint_repository + * @param ICacheService $cache_service + */ public function __construct(IApiEndpointRepository $endpoint_repository, ICacheService $cache_service) { $this->endpoint_repository = $endpoint_repository; @@ -130,6 +134,7 @@ class CORSMiddleware public function preProcess(Request $request) { $actual_request = false; + if ($this->isValidCORSRequest($request)) { if (!$this->testOriginHeaderScrutiny($request)) @@ -159,7 +164,7 @@ class CORSMiddleware return $response; } // ----Step 2b: Store pre-flight request data in the Cache to keep (mark) the request as correctly followed the request pre-flight process - $data = new CORSRequestPreflightData($request, $this->current_endpoint->supportCredentials()); + $data = new CORSRequestPreflightData($request, $this->current_endpoint->isAllowCredentials()); $cache_id = $this->generatePreflightCacheKey($request); $this->cache_service->storeHash($cache_id, $data->toArray(), CORSRequestPreflightData::$cache_lifetime); // ----Step 2c: Return corresponding response - This part should be customized with application specific constraints..... @@ -186,7 +191,7 @@ class CORSMiddleware if ($request->getMethod() === $data['expected_method']) { // ------Finish with custom HTTP headers (use an method to avoid manual iteration on collection to increase the speed)... - $x_headers = self::getCustomHeaders($request); + $x_headers = self::getCustomHeaders($request); $x_headers_pre = explode(',', $data['expected_custom_headers']); sort($x_headers); sort($x_headers_pre); @@ -292,7 +297,7 @@ class CORSMiddleware // The Access-Control-Allow-Credentials header indicates whether the response to request // can be exposed when the omit credentials flag is unset. When part of the response to a preflight request // it indicates that the actual request can include user credentials. - if ( $this->current_endpoint->supportCredentials()) + if ( $this->current_endpoint->isAllowCredentials()) { $response->headers->set('Access-Control-Allow-Credentials', 'true'); } @@ -433,7 +438,7 @@ class CORSMiddleware { return false; } - if (!$this->current_endpoint->supportCORS() || !$this->current_endpoint->isActive()) + if (!$this->current_endpoint->isAllowCors() || !$this->current_endpoint->isActive()) { return false; } diff --git a/app/Http/Middleware/OAuth2BearerAccessTokenRequestValidator.php b/app/Http/Middleware/OAuth2BearerAccessTokenRequestValidator.php index 45c06928..b4f58415 100644 --- a/app/Http/Middleware/OAuth2BearerAccessTokenRequestValidator.php +++ b/app/Http/Middleware/OAuth2BearerAccessTokenRequestValidator.php @@ -25,8 +25,8 @@ use libs\oauth2\OAuth2ResourceServerException; use libs\oauth2\OAuth2WWWAuthenticateErrorResponse; use libs\utils\RequestUtils; use models\oauth2\IResourceServerContext; -use models\resource_server\IAccessTokenService; -use models\resource_server\IApiEndpointRepository; +use App\Models\ResourceServer\IAccessTokenService; +use App\Models\ResourceServer\IApiEndpointRepository; use URL\Normalizer; /** @@ -67,10 +67,10 @@ class OAuth2BearerAccessTokenRequestValidator IApiEndpointRepository $endpoint_repository, IAccessTokenService $token_service ) { - $this->context = $context; - $this->headers = $this->getHeaders(); + $this->context = $context; + $this->headers = $this->getHeaders(); $this->endpoint_repository = $endpoint_repository; - $this->token_service = $token_service; + $this->token_service = $token_service; } /** @@ -152,7 +152,7 @@ class OAuth2BearerAccessTokenRequestValidator throw new OAuth2ResourceServerException( 403, OAuth2Protocol::OAuth2Protocol_Error_UnauthorizedClient, - sprintf('invalid origin %s - allowed ones (%s)',$origin, $token_info->getAllowedOrigins()) + sprintf('invalid origin %s - allowed ones (%s)', $origin, $token_info->getAllowedOrigins()) ); } //check scopes diff --git a/app/Http/Middleware/RateLimitMiddleware.php b/app/Http/Middleware/RateLimitMiddleware.php index 4c01c59b..085be5cf 100644 --- a/app/Http/Middleware/RateLimitMiddleware.php +++ b/app/Http/Middleware/RateLimitMiddleware.php @@ -17,7 +17,7 @@ use Closure; use Illuminate\Support\Facades\Response; use libs\utils\ICacheService; use libs\utils\RequestUtils; -use models\resource_server\IApiEndpointRepository; +use App\Models\ResourceServer\IApiEndpointRepository; /** * Class RateLimitMiddleware @@ -63,11 +63,11 @@ final class RateLimitMiddleware $url = $request->getRequestUri(); try { - $route = RequestUtils::getCurrentRoutePath($request); - $method = $request->getMethod(); + $route = RequestUtils::getCurrentRoutePath($request); + $method = $request->getMethod(); $endpoint = $this->endpoint_repository->getApiEndpointByUrlAndMethod($route, $method); - if (!is_null($endpoint->rate_limit) && ($requestsPerHour = (int)$endpoint->rate_limit) > 0) { + if (!is_null($endpoint->getRateLimit()) && ($requestsPerHour = (int)$endpoint->getRateLimit()) > 0) { //do rate limit checking $key = sprintf('rate.limit.%s_%s_%s', $url, $method, $request->getClientIp()); // Add if doesn't exist diff --git a/app/ModelSerializers/SummitEventFeedbackSerializer.php b/app/ModelSerializers/SummitEventFeedbackSerializer.php index 5e271b9a..654a0d08 100644 --- a/app/ModelSerializers/SummitEventFeedbackSerializer.php +++ b/app/ModelSerializers/SummitEventFeedbackSerializer.php @@ -1,17 +1,17 @@ 'rate:json_int', - 'Note' => 'note:json_string', + 'Rate' => 'rate:json_int', + 'Note' => 'note:json_string', 'Created' => 'created_date:datetime_epoch', 'EventId' => 'event_id:json_int', ); @@ -39,14 +39,11 @@ final class SummitEventFeedbackSerializer extends SilverStripeSerializer public function serialize($expand = null, array $fields = array(), array $relations = array(), array $params = array()) { $feedback = $this->object; - $values = parent::serialize($expand, $fields, $relations, $params); - $event = $feedback->getEvent(); - $member = $feedback->hasOwner() ? $feedback->getOwner() : null; + $values = parent::serialize($expand, $fields, $relations, $params); + $member = $feedback->hasOwner() ? $feedback->getOwner() : null; if (is_null($member)) return $values; - $summit = $event->getSummit(); - $attendee = $summit->getAttendeeByMemberId($member->getId()); if (!empty($expand)) { foreach (explode(',', $expand) as $relation) { @@ -55,24 +52,20 @@ final class SummitEventFeedbackSerializer extends SilverStripeSerializer $owner = array ( - 'id' => intval($member->getId()), + 'id' => intval($member->getId()), 'first_name' => JsonUtils::toJsonString($member->getFirstName()), - 'last_name' => JsonUtils::toJsonString($member->getLastName()) + 'last_name' => JsonUtils::toJsonString($member->getLastName()) ); - if (!is_null($attendee)) - $owner['attendee_id'] = intval($attendee->getId()); - $values['owner'] = $owner; } - break; + break; } } } - if(!isset($values['owner'])) { + if (!isset($values['owner'])) { $values['member_id'] = intval($member->getId()); - if (!is_null($attendee)) $values['attendee_id'] = intval($attendee->getId()); } return $values; diff --git a/app/Models/Foundation/Main/Company.php b/app/Models/Foundation/Main/Company.php index bda746a5..74880327 100644 --- a/app/Models/Foundation/Main/Company.php +++ b/app/Models/Foundation/Main/Company.php @@ -19,6 +19,7 @@ use models\utils\SilverstripeBaseModel; /** * @ORM\Entity * @ORM\Table(name="Company") + * @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="sponsors_region") * Class Company * @package models\main */ diff --git a/app/Models/Foundation/Summit/Events/Presentations/PresentationSpeaker.php b/app/Models/Foundation/Summit/Events/Presentations/PresentationSpeaker.php index 5969ed86..cda46664 100644 --- a/app/Models/Foundation/Summit/Events/Presentations/PresentationSpeaker.php +++ b/app/Models/Foundation/Summit/Events/Presentations/PresentationSpeaker.php @@ -23,6 +23,7 @@ use Doctrine\Common\Collections\ArrayCollection; * @ORM\Entity * @ORM\Table(name="PresentationSpeaker") * @ORM\Entity(repositoryClass="repositories\summit\DoctrineSpeakerRepository") + * @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="speakers_region") * Class PresentationSpeaker * @package models\summit */ diff --git a/app/Models/Foundation/Summit/Events/SummitEvent.php b/app/Models/Foundation/Summit/Events/SummitEvent.php index d0d4c4f7..a67ef05c 100644 --- a/app/Models/Foundation/Summit/Events/SummitEvent.php +++ b/app/Models/Foundation/Summit/Events/SummitEvent.php @@ -551,6 +551,7 @@ class SummitEvent extends SilverstripeBaseModel /** * @ORM\OneToMany(targetEntity="models\summit\SummitEventFeedback", mappedBy="event", cascade={"persist"}) + * @ORM\Cache("NONSTRICT_READ_WRITE") * @var SummitEventFeedback[] */ protected $feedback; diff --git a/app/Models/Foundation/Summit/Events/SummitEventFeedback.php b/app/Models/Foundation/Summit/Events/SummitEventFeedback.php index 5841172f..6f1dac9a 100644 --- a/app/Models/Foundation/Summit/Events/SummitEventFeedback.php +++ b/app/Models/Foundation/Summit/Events/SummitEventFeedback.php @@ -21,6 +21,7 @@ use models\main\Member; * @ORM\Entity * @ORM\Table(name="SummitEventFeedback") * @ORM\Entity(repositoryClass="repositories\summit\DoctrineEventFeedbackRepository") + * @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="summit_event_feedback_region") * Class SummitEventFeedback * @package models\summit */ diff --git a/app/Models/Foundation/Summit/Summit.php b/app/Models/Foundation/Summit/Summit.php index 5acd7bfb..918250b1 100644 --- a/app/Models/Foundation/Summit/Summit.php +++ b/app/Models/Foundation/Summit/Summit.php @@ -12,12 +12,12 @@ * limitations under the License. **/ -use Doctrine\Common\Collections\Criteria; -use Doctrine\ORM\Query\ResultSetMappingBuilder; +use Doctrine\ORM\Cache; use models\main\File; use models\main\Member; use models\utils\SilverstripeBaseModel; use Doctrine\ORM\Mapping AS ORM; +use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\ArrayCollection; use DateTimeZone; use DateTime; @@ -27,6 +27,7 @@ use models\main\Company; * @ORM\Entity * @ORM\Table(name="Summit") * @ORM\Entity(repositoryClass="repositories\summit\DoctrineSummitRepository") + * @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="summit_region") * Class Summit * @package models\summit */ @@ -678,6 +679,9 @@ class Summit extends SilverstripeBaseModel ->from('models\summit\PresentationSpeaker','ps') ->join('ps.moderated_presentations','p') ->join('p.summit','s') + ->setCacheable(true) + ->setCacheRegion('speakers_region') + ->setCacheMode(Cache::MODE_NORMAL) ->where("s.id = :summit_id and p.published = 1") ->setParameter('summit_id', $this->getId()); } @@ -691,6 +695,9 @@ class Summit extends SilverstripeBaseModel ->from('models\summit\PresentationSpeaker','ps') ->join('ps.presentations','p') ->join('p.summit','s') + ->setCacheable(true) + ->setCacheRegion('speakers_region') + ->setCacheMode(Cache::MODE_NORMAL) ->where("s.id = :summit_id and p.published = 1") ->setParameter('summit_id', $this->getId()); } @@ -788,6 +795,9 @@ class Summit extends SilverstripeBaseModel ->from('models\main\Company','c') ->join('c.sponsorships','sp') ->join('sp.summit','s') + ->setCacheable(true) + ->setCacheRegion('sponsors_region') + ->setCacheMode(Cache::MODE_NORMAL) ->where('s.id = :summit_id and sp.published = 1') ->setParameter('summit_id', $this->getId())->getQuery()->getResult(); } diff --git a/app/Models/ResourceServer/AccessTokenService.php b/app/Models/ResourceServer/AccessTokenService.php index 9ca05bad..6b1ecf2b 100644 --- a/app/Models/ResourceServer/AccessTokenService.php +++ b/app/Models/ResourceServer/AccessTokenService.php @@ -1,4 +1,4 @@ -makeRemoteCall($token_value); + $token_info = $this->doIntrospectionRequest($token_value); $this->cache_service->storeHash(md5($token_value), $token_info, $cache_lifetime ); return $token_info; } @@ -154,7 +154,7 @@ final class AccessTokenService implements IAccessTokenService * @throws OAuth2InvalidIntrospectionResponse * @throws \Exception */ - private function makeRemoteCall($token_value) + private function doIntrospectionRequest($token_value) { try { @@ -185,7 +185,7 @@ final class AccessTokenService implements IAccessTokenService $response = $client->post( $auth_server_url . '/oauth2/token/introspection', [ - 'query' => ['token' => $token_value], + 'body' => ['token' => $token_value], 'headers' => ['Authorization' => " Basic " . base64_encode($client_id . ':' . $client_secret)] ] ); diff --git a/app/Models/ResourceServer/Api.php b/app/Models/ResourceServer/Api.php index 2b6092ba..fedbb65f 100644 --- a/app/Models/ResourceServer/Api.php +++ b/app/Models/ResourceServer/Api.php @@ -1,4 +1,4 @@ -hasMany('models\resource_server\ApiScope', 'api_id'); - } + /** + * @ORM\Column(name="description", type="string") + * @var string + */ + private $description; - /** - * @return IApiEndpoint[] - */ - public function endpoints() - { - return $this->hasMany('models\resource_server\ApiEndpoint', 'api_id'); - } + /** + * @ORM\Column(name="active", type="boolean") + * @var bool + */ + private $active; - /** - * @return string - */ - public function getName() - { - return $this->name; - } + /** + * Api constructor. + */ + public function __construct() + { + parent::__construct(); + $this->scopes = new ArrayCollection(); + $this->endpoints = new ArrayCollection(); + } - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } + /** + * @return ApiScope[] + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * @param mixed $scopes + */ + public function setScopes($scopes) + { + $this->scopes = $scopes; + } + + /** + * @return ApiEndpoint[] + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * @param mixed $endpoints + */ + public function setEndpoints($endpoints) + { + $this->endpoints = $endpoints; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * @return boolean + */ + public function isActive() + { + return $this->active; + } + + /** + * @param boolean $active + */ + public function setActive($active) + { + $this->active = $active; + } /** * @return string @@ -63,38 +149,16 @@ class Api extends BaseModelEloquent implements IApi public function getScope() { $scope = ''; - foreach ($this->scopes()->get() as $s) + foreach ($this->getScopes() as $s) { - if (!$s->active) + if (!$s->isActive()) { continue; } - $scope = $scope .$s->name.' '; + $scope = $scope .$s->getName().' '; } $scope = trim($scope); return $scope; } - /** - * @return bool - */ - public function isActive() - { - return $this->active; - } - - public function setName($name) - { - $this->name = $name; - } - - public function setDescription($description) - { - $this->description = $description; - } - - public function setStatus($active) - { - $this->active = $active; - } } \ No newline at end of file diff --git a/app/Models/ResourceServer/ApiEndpoint.php b/app/Models/ResourceServer/ApiEndpoint.php index cf504d7c..527997cf 100644 --- a/app/Models/ResourceServer/ApiEndpoint.php +++ b/app/Models/ResourceServer/ApiEndpoint.php @@ -1,4 +1,4 @@ -api; + } - protected $fillable = array( - 'description', - 'active', - 'allow_cors', - 'allow_credentials', - 'name','route', - 'http_method', - 'api_id', - 'rate_limit' - ); + /** + * @param Api $api + */ + public function setApi($api) + { + $this->api = $api; + } - /** - * @return IApi - */ - public function api() - { - return $this->belongsTo('models\resource_server\Api', 'api_id'); - } + /** + * @return ApiScope[] + */ + public function getScopes() + { + return $this->scopes; + } - /** - * @return IApiScope[] - */ - public function scopes() - { - return $this->belongsToMany('models\resource_server\ApiScope', 'endpoint_api_scopes', 'api_endpoint_id', 'scope_id'); - } + /** + * @param ApiScope[] $scopes + */ + public function setScopes($scopes) + { + $this->scopes = $scopes; + } - public function getRoute() - { - return $this->route; - } + /** + * @return string + */ + public function getName() + { + return $this->name; + } - public function getHttpMethod() - { - return $this->http_method; - } + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } - public function setRoute($route) - { - $this->route = $route; - } + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } - public function setHttpMethod($http_method) - { - $this->http_method = $http_method; - } + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } - /** + /** + * @return boolean + */ + public function isActive() + { + return $this->active; + } + + /** + * @param boolean $active + */ + public function setActive($active) + { + $this->active = $active; + } + + /** + * @return boolean + */ + public function isAllowCors() + { + return $this->allow_cors; + } + + /** + * @param boolean $allow_cors + */ + public function setAllowCors($allow_cors) + { + $this->allow_cors = $allow_cors; + } + + /** + * @return boolean + */ + public function isAllowCredentials() + { + return $this->allow_credentials; + } + + /** + * @param boolean $allow_credentials + */ + public function setAllowCredentials($allow_credentials) + { + $this->allow_credentials = $allow_credentials; + } + + /** + * @return string + */ + public function getRoute() + { + return $this->route; + } + + /** + * @param string $route + */ + public function setRoute($route) + { + $this->route = $route; + } + + /** + * @return string + */ + public function getHttpMethod() + { + return $this->http_method; + } + + /** + * @param string $http_method + */ + public function setHttpMethod($http_method) + { + $this->http_method = $http_method; + } + /** + * @ORM\ManyToOne(targetEntity="Api", cascade={"persist"}) + * @ORM\JoinColumn(name="api_id", referencedColumnName="id") + * @var Api + */ + private $api; + + /** + * @ORM\ManyToMany(targetEntity="ApiScope") + * @ORM\JoinTable(name="endpoint_api_scopes", + * joinColumns={@ORM\JoinColumn(name="api_endpoint_id", referencedColumnName="id")}, + * inverseJoinColumns={@ORM\JoinColumn(name="scope_id", referencedColumnName="id")} + * ) + * @var ApiScope[] + */ + private $scopes; + + /** + * @ORM\Column(name="name", type="string") + * @var string + */ + private $name; + + /** + * @ORM\Column(name="description", type="string") + * @var string + */ + private $description; + + /** + * @ORM\Column(name="active", type="boolean") + * @var bool + */ + private $active; + + /** + * @ORM\Column(name="allow_cors", type="boolean") + * @var bool + */ + private $allow_cors; + + /** + * @ORM\Column(name="allow_credentials", type="boolean") + * @var bool + */ + private $allow_credentials; + + /** + * @ORM\Column(name="route", type="string") + * @var string + */ + private $route; + + /** + * @ORM\Column(name="http_method", type="string") + * @var string + */ + private $http_method; + + /** + * @ORM\Column(name="rate_limit", type="integer") + * @var int + */ + private $rate_limit; + + /** + * ApiEndpoint constructor. + */ + public function __construct() + { + parent::__construct(); + $this->rate_limit = 0; + $this->scopes = new ArrayCollection(); + } + + /** * @return string */ public function getScope() { $scope = ''; - foreach ($this->scopes()->get() as $s) + foreach ($this->scopes as $s) { - if (!$s->active) + if (!$s->isActive()) { continue; } - $scope = $scope .$s->name.' '; + $scope = $scope .$s->getName().' '; } $scope = trim($scope); return $scope; } - public function isActive() - { - return $this->active; - } + /** + * @param IApiScope $scope + */ + public function addScope(IApiScope $scope){ + $this->scopes->add($scope); + } - /** - * @param bool $active - */ - public function setStatus($active) - { - $this->active = $active; - } + /** + * @return int + */ + public function getRateLimit() + { + return $this->rate_limit; + } - /** - * @return string - */ - public function getName() - { - return $this->name; - } + /** + * @param int $rate_limit + */ + public function setRateLimit($rate_limit) + { + $this->rate_limit = $rate_limit; + } - /** - * @param string $name - */ - public function setName($name) - { - $this->name= $name; - } - - /** - * @return bool - */ - public function supportCORS() - { - return $this->allow_cors; - } - - /** - * @return bool - */ - public function supportCredentials() - { - return (bool)$this->allow_credentials; - } - - /** - * @return int - */ - public function getIdentifier() - { - return (int)$this->id; - } } \ No newline at end of file diff --git a/app/Models/ResourceServer/ApiScope.php b/app/Models/ResourceServer/ApiScope.php index bf91ea27..2dc93ce6 100644 --- a/app/Models/ResourceServer/ApiScope.php +++ b/app/Models/ResourceServer/ApiScope.php @@ -1,4 +1,4 @@ -api; + } - protected $table = 'api_scopes'; + /** + * @param Api $api + */ + public function setApi(Api $api) + { + $this->api = $api; + } - protected $hidden = array(''); + /** + * @ORM\ManyToOne(targetEntity="Api", cascade={"persist"}) + * @ORM\JoinColumn(name="api_id", referencedColumnName="id") + * @var Api + */ + private $api; - protected $fillable = array('name' ,'short_description', 'description','active','default','system', 'api_id'); + /** + * @return string + */ + public function getName() + { + return $this->name; + } - /** - * @return IApi - */ - public function api() - { - return $this->belongsTo('models\resource_server\Api', 'api_id'); - } + /** + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } - public function getShortDescription() - { - return $this->short_description; - } + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } - public function getName() - { - return $this->name; - } + /** + * @param string $description + */ + public function setDescription($description) + { + $this->description = $description; + } - public function getDescription() - { - return $this->description; - } + /** + * @return string + */ + public function getShortDescription() + { + return $this->short_description; + } - public function isActive() - { - return $this->active; - } + /** + * @param string $short_description + */ + public function setShortDescription($short_description) + { + $this->short_description = $short_description; + } + + /** + * @return boolean + */ + public function isActive() + { + return $this->active; + } + + /** + * @param boolean $active + */ + public function setActive($active) + { + $this->active = $active; + } + + /** + * @ORM\Column(name="name", type="string") + * @var string + */ + private $name; + + /** + * @ORM\Column(name="description", type="string") + * @var string + */ + private $description; + + /** + * @return boolean + */ + public function isDefault() + { + return $this->default; + } + + /** + * @param boolean $default + */ + public function setDefault($default) + { + $this->default = $default; + } + + /** + * @ORM\Column(name="short_description", type="string") + * @var string + */ + private $short_description; + + /** + * @ORM\Column(name="active", type="boolean") + * @var bool + */ + private $active; + + /** + * @ORM\Column(name="`default`", type="boolean") + * @var bool + */ + private $default; } \ No newline at end of file diff --git a/app/Models/ResourceServer/IAccessTokenService.php b/app/Models/ResourceServer/IAccessTokenService.php index 9bd2e583..2dd2eb73 100644 --- a/app/Models/ResourceServer/IAccessTokenService.php +++ b/app/Models/ResourceServer/IAccessTokenService.php @@ -1,4 +1,4 @@ -id; + } + + public function getId(){ + return $this->getIdentifier(); + } + + /** + * @return \DateTime + */ + public function getCreated() + { + return $this->created; + } + + /** + * @param \DateTime $created + */ + public function setCreated($created) + { + $this->created = $created; + } + + /** + * @return \DateTime + */ + public function getLastEdited() + { + return $this->last_edited; + } + + /** + * @param \DateTime $last_edited + */ + public function setLastEdited($last_edited) + { + $this->last_edited = $last_edited; + } + + public function __construct() + { + $now = new \DateTime('now', new \DateTimeZone(self::DefaultTimeZone)); + $this->created = $now; + $this->last_edited = $now; + } +} \ No newline at end of file diff --git a/app/Models/Utils/SilverstripeBaseModel.php b/app/Models/Utils/SilverstripeBaseModel.php index 1a00be2e..a55bf454 100644 --- a/app/Models/Utils/SilverstripeBaseModel.php +++ b/app/Models/Utils/SilverstripeBaseModel.php @@ -14,10 +14,10 @@ use Doctrine\ORM\EntityManager; use Doctrine\ORM\Mapping AS ORM; -use Doctrine\ORM\NativeQuery; use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Registry; + /*** * @ORM\MappedSuperclass * Class SilverstripeBaseModel @@ -26,8 +26,9 @@ use Registry; class SilverstripeBaseModel implements IEntity { const DefaultTimeZone = 'America/Chicago'; + /** - * @return mixed + * @return \DateTime */ public function getCreated() { @@ -35,7 +36,7 @@ class SilverstripeBaseModel implements IEntity } /** - * @param mixed $created + * @param \DateTime $created */ public function setCreated($created) { @@ -43,7 +44,7 @@ class SilverstripeBaseModel implements IEntity } /** - * @return mixed + * @return \DateTime */ public function getLastEdited() { @@ -51,7 +52,7 @@ class SilverstripeBaseModel implements IEntity } /** - * @param mixed $last_edited + * @param \DateTime $last_edited */ public function setLastEdited($last_edited) { diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 7db5c985..0d31370c 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -105,9 +105,9 @@ class AppServiceProvider extends ServiceProvider public function register() { App::singleton('models\\oauth2\\IResourceServerContext', 'models\\oauth2\\ResourceServerContext'); - App::singleton('models\resource_server\\IAccessTokenService', 'models\resource_server\\AccessTokenService'); - App::singleton('models\\resource_server\\IApi', 'models\\resource_server\\Api'); - App::singleton('models\\resource_server\\IApiEndpoint', 'models\\resource_server\\ApiEndpoint'); - App::singleton('models\\resource_server\\IApiScope', 'models\\resource_server\\ApiScope'); + App::singleton('App\Models\ResourceServer\IAccessTokenService', 'App\Models\ResourceServer\AccessTokenService'); + App::singleton('App\Models\ResourceServer\IApi', 'models\\resource_server\\Api'); + App::singleton('App\Models\ResourceServer\IApiEndpoint', 'models\\resource_server\\ApiEndpoint'); + App::singleton('App\Models\ResourceServer\IApiScope', 'models\\resource_server\\ApiScope'); } } diff --git a/app/Repositories/RepositoriesProvider.php b/app/Repositories/RepositoriesProvider.php index 1b776fc3..5f60db9d 100644 --- a/app/Repositories/RepositoriesProvider.php +++ b/app/Repositories/RepositoriesProvider.php @@ -44,10 +44,12 @@ class RepositoriesProvider extends ServiceProvider 'models\marketplace\IConsultantRepository', 'repositories\marketplace\EloquentConsultantRepository' ); + App::singleton( - 'models\resource_server\IApiEndpointRepository', - 'repositories\resource_server\EloquentApiEndpointRepository' - ); + 'App\Models\ResourceServer\IApiEndpointRepository', + function(){ + return EntityManager::getRepository(\App\Models\ResourceServer\ApiEndpoint::class); + }); App::singleton( 'models\summit\ISummitRepository', @@ -80,7 +82,6 @@ class RepositoriesProvider extends ServiceProvider }); - App::singleton( 'models\main\IMemberRepository', function(){ diff --git a/app/Repositories/ResourceServer/DoctrineApiEndpointRepository.php b/app/Repositories/ResourceServer/DoctrineApiEndpointRepository.php new file mode 100644 index 00000000..1e27dca2 --- /dev/null +++ b/app/Repositories/ResourceServer/DoctrineApiEndpointRepository.php @@ -0,0 +1,52 @@ +getEntityManager()->createQueryBuilder() + ->select("e") + ->from(\App\Models\ResourceServer\ApiEndpoint::class, "e") + ->where('e.route = :route') + ->andWhere('e.http_method = :http_method') + ->setParameter('route', trim($url)) + ->setParameter('http_method', trim($http_method)) + ->setCacheable(true) + ->setCacheRegion('resource_server_region') + ->getQuery() + ->getOneOrNullResult(); + } + catch(\Exception $ex){ + Log::error($ex); + return null; + } + } +} \ No newline at end of file diff --git a/app/Repositories/ResourceServer/EloquentApiEndpointRepository.php b/app/Repositories/ResourceServer/EloquentApiEndpointRepository.php index 58cec3b3..edada08f 100644 --- a/app/Repositories/ResourceServer/EloquentApiEndpointRepository.php +++ b/app/Repositories/ResourceServer/EloquentApiEndpointRepository.php @@ -13,10 +13,9 @@ * limitations under the License. **/ -use models\resource_server\IApiEndpoint; -use models\resource_server\IApiEndpointRepository; +use App\Models\ResourceServer\IApiEndpoint; +use App\Models\ResourceServer\IApiEndpointRepository; use models\utils\EloquentBaseRepository; -use models\utils\IEntity; /** * Class EloquentApiEndpointRepository diff --git a/app/Repositories/Summit/Doctrine/DoctrineEventFeedbackRepository.php b/app/Repositories/Summit/Doctrine/DoctrineEventFeedbackRepository.php index 428082a1..bc4481e2 100644 --- a/app/Repositories/Summit/Doctrine/DoctrineEventFeedbackRepository.php +++ b/app/Repositories/Summit/Doctrine/DoctrineEventFeedbackRepository.php @@ -12,6 +12,7 @@ * limitations under the License. **/ +use Doctrine\ORM\Cache; use models\summit\IEventFeedbackRepository; use repositories\SilverStripeDoctrineRepository; use models\summit\SummitEvent; @@ -38,13 +39,16 @@ final class DoctrineEventFeedbackRepository extends SilverStripeDoctrineReposito */ public function getByEvent(SummitEvent $event, PagingInfo $paging_info, Filter $filter = null, Order $order = null) { - $query = $this->getEntityManager()->createQueryBuilder() - ->select("f") - ->from(\models\summit\SummitEventFeedback::class, "f") - ->join('f.event', 'e', Join::WITH, " e.id = :event_id") - ->join('f.owner', 'o') - ->setParameter('event_id', $event->getId()); - + $query = $this->getEntityManager() + ->createQueryBuilder() + ->select("f") + ->from(\models\summit\SummitEventFeedback::class, "f") + ->join('f.event', 'e', Join::WITH, " e.id = :event_id") + ->join('f.owner', 'o') + ->setParameter('event_id', $event->getId()) + ->setCacheable(true) + ->setCacheMode(Cache::MODE_GET) + ->setCacheRegion('summit_event_feedback_region'); if(!is_null($filter)){ diff --git a/composer.json b/composer.json index 65c4077c..95d76a37 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ "guzzlehttp/guzzle": "5.3.0", "ezyang/htmlpurifier": "4.7.0", "glenscott/url-normalizer" : "^1.4", - "laravel-doctrine/orm":"1.1.*", - "laravel-doctrine/extensions": "^1.0", + "laravel-doctrine/orm":"1.2.*", + "laravel-doctrine/extensions": "1.0.*", "cocur/slugify": "^2.3" }, "require-dev": { diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..8ebcbb9b --- /dev/null +++ b/composer.lock @@ -0,0 +1,4346 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "e41e836704d7fe67318a85269f74bdca", + "content-hash": "2ebc91262281a96a723b834b6736996d", + "packages": [ + { + "name": "classpreloader/classpreloader", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/ClassPreloader/ClassPreloader.git", + "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.0|^2.0", + "php": ">=5.5.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "ClassPreloader\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", + "keywords": [ + "autoload", + "class", + "preload" + ], + "time": "2015-11-09 22:51:51" + }, + { + "name": "cocur/slugify", + "version": "v2.3", + "source": { + "type": "git", + "url": "https://github.com/cocur/slugify.git", + "reference": "57a00e06a382928e350cc7bbb13b19f1b8f4e73a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cocur/slugify/zipball/57a00e06a382928e350cc7bbb13b19f1b8f4e73a", + "reference": "57a00e06a382928e350cc7bbb13b19f1b8f4e73a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "laravel/framework": "~5.1", + "latte/latte": "~2.2", + "league/container": "^2.2.0", + "mikey179/vfsstream": "~1.6", + "mockery/mockery": "~0.9", + "nette/di": "~2.2", + "phpunit/phpunit": "~4.8|~5.2", + "pimple/pimple": "~1.1", + "plumphp/plum": "~0.1", + "silex/silex": "~1.3", + "symfony/config": "~2.4|~3.0", + "symfony/dependency-injection": "~2.4|~3.0", + "symfony/http-kernel": "~2.4|~3.0", + "twig/twig": "~1.12", + "zendframework/zend-modulemanager": "~2.2", + "zendframework/zend-servicemanager": "~2.2", + "zendframework/zend-view": "~2.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cocur\\Slugify\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ivo Bathke", + "email": "ivo.bathke@gmail.com" + }, + { + "name": "Florian Eckerstorfer", + "email": "florian@eckerstorfer.co", + "homepage": "https://florian.ec" + } + ], + "description": "Converts a string into a slug.", + "keywords": [ + "slug", + "slugify" + ], + "time": "2016-08-09 20:10:17" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24 07:27:01" + }, + { + "name": "doctrine/annotations", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", + "reference": "30e07cf03edc3cd3ef579d0dd4dd8c58250799a5", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^5.6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2016-10-24 11:45:47" + }, + { + "name": "doctrine/cache", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2016-10-29 11:16:17" + }, + { + "name": "doctrine/collections", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2015-04-14 22:21:58" + }, + { + "name": "doctrine/common", + "version": "v2.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", + "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": "~5.5|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ], + "time": "2015-12-25 13:18:31" + }, + { + "name": "doctrine/dbal", + "version": "v2.5.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "9f8c05cd5225a320d56d4bfdb4772f10d045a0c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/9f8c05cd5225a320d56d4bfdb4772f10d045a0c9", + "reference": "9f8c05cd5225a320d56d4bfdb4772f10d045a0c9", + "shasum": "" + }, + "require": { + "doctrine/common": ">=2.4,<2.7-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*||^3.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2016-09-09 19:13:33" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06 14:35:42" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09 13:34:57" + }, + { + "name": "doctrine/orm", + "version": "v2.5.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/doctrine2.git", + "reference": "73e4be7c7b3ba26f96b781a40b33feba4dfa6d45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/73e4be7c7b3ba26f96b781a40b33feba4dfa6d45", + "reference": "73e4be7c7b3ba26f96b781a40b33feba4dfa6d45", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.4", + "doctrine/collections": "~1.2", + "doctrine/common": ">=2.5-dev,<2.7-dev", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "doctrine/instantiator": "~1.0.1", + "ext-pdo": "*", + "php": ">=5.4", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/yaml": "~2.3|~3.0" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine", + "bin/doctrine.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\ORM\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "orm" + ], + "time": "2016-09-10 18:51:13" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.7.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "ae1828d955112356f7677c465f94f7deb7d27a40" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40", + "reference": "ae1828d955112356f7677c465f94f7deb7d27a40", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "HTMLPurifier": "library/" + }, + "files": [ + "library/HTMLPurifier.composer.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "time": "2015-08-05 01:03:42" + }, + { + "name": "glenscott/url-normalizer", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/glenscott/url-normalizer.git", + "reference": "b8e79d3360a1bd7182398c9956bd74d219ad1b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/glenscott/url-normalizer/zipball/b8e79d3360a1bd7182398c9956bd74d219ad1b3c", + "reference": "b8e79d3360a1bd7182398c9956bd74d219ad1b3c", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "URL\\": "src/URL" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Glen Scott", + "email": "glen@glenscott.co.uk" + } + ], + "description": "Syntax based normalization of URL's", + "time": "2015-06-11 16:06:02" + }, + { + "name": "guzzlehttp/guzzle", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f3c8c22471cb55475105c14769644a49c3262b93" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f3c8c22471cb55475105c14769644a49c3262b93", + "reference": "f3c8c22471cb55475105c14769644a49c3262b93", + "shasum": "" + }, + "require": { + "guzzlehttp/ringphp": "^1.1", + "php": ">=5.4.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0", + "psr/log": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2015-05-20 03:47:55" + }, + { + "name": "guzzlehttp/ringphp", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/RingPHP.git", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "shasum": "" + }, + "require": { + "guzzlehttp/streams": "~3.0", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Ring\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "time": "2015-05-20 03:37:09" + }, + { + "name": "guzzlehttp/streams", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/streams.git", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple abstraction over streams of data", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "stream" + ], + "time": "2014-10-12 19:18:40" + }, + { + "name": "ircmaxell/password-compat", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/password_compat.git", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "autoload": { + "files": [ + "lib/password.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@php.net", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", + "homepage": "https://github.com/ircmaxell/password_compat", + "keywords": [ + "hashing", + "password" + ], + "time": "2014-11-20 16:49:30" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ], + "time": "2014-04-08 15:00:19" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "time": "2015-04-20 18:58:01" + }, + { + "name": "jeremeamia/SuperClosure", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/29a88be2a4846d27c1613aed0c9071dfad7b5938", + "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.2|^2.0", + "php": ">=5.4", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "SuperClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia", + "role": "Developer" + } + ], + "description": "Serialize Closure objects, including their context and binding", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "lambda", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "time": "2015-12-05 17:17:57" + }, + { + "name": "laravel-doctrine/extensions", + "version": "1.0.10", + "source": { + "type": "git", + "url": "https://github.com/laravel-doctrine/extensions.git", + "reference": "dc11146308b14da194106fda1641bb3bc282d317" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel-doctrine/extensions/zipball/dc11146308b14da194106fda1641bb3bc282d317", + "reference": "dc11146308b14da194106fda1641bb3bc282d317", + "shasum": "" + }, + "require": { + "illuminate/auth": "~5.1", + "illuminate/config": "~5.1", + "illuminate/contracts": "~5.1", + "illuminate/http": "~5.1", + "illuminate/support": "~5.1", + "laravel-doctrine/orm": "1.0.*|1.1.*|1.2.*", + "php": ">=5.5.9" + }, + "require-dev": { + "beberlei/doctrineextensions": "^1.0", + "gedmo/doctrine-extensions": "^2.4", + "mockery/mockery": "~0.9", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "beberlei/DoctrineExtensions": "Query/Type Doctrine2 extensions (^1.0)", + "gedmo/doctrine-extensions": "Behavioral Doctrine2 extensions (^2.4)" + }, + "type": "library", + "autoload": { + "psr-4": { + "LaravelDoctrine\\Extensions\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "Doctrine extensions for Doctrine 2 and Laravel 5", + "keywords": [ + "beberlei", + "data mapper", + "database", + "doctrine", + "gedmo", + "laravel", + "orm" + ], + "time": "2016-09-01 16:38:57" + }, + { + "name": "laravel-doctrine/orm", + "version": "1.2.8", + "source": { + "type": "git", + "url": "https://github.com/laravel-doctrine/orm.git", + "reference": "9b32992e4672cf0ac597035e99e72c4ebd63a80e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel-doctrine/orm/zipball/9b32992e4672cf0ac597035e99e72c4ebd63a80e", + "reference": "9b32992e4672cf0ac597035e99e72c4ebd63a80e", + "shasum": "" + }, + "require": { + "doctrine/orm": "2.5.*", + "illuminate/auth": "5.2.*|5.3.*", + "illuminate/console": "5.2.*|5.3.*", + "illuminate/container": "5.2.*|5.3.*", + "illuminate/contracts": "5.2.*|5.3.*", + "illuminate/pagination": "5.2.*|5.3.*", + "illuminate/support": "5.2.*|5.3.*", + "illuminate/validation": "5.2.*|5.3.*", + "illuminate/view": "5.2.*|5.3.*", + "php": ">=5.5.9", + "symfony/serializer": "^2.7" + }, + "require-dev": { + "barryvdh/laravel-debugbar": "~2.0", + "illuminate/log": "5.2.*|5.3.*", + "illuminate/notifications": "5.3.*", + "illuminate/queue": "5.3.*", + "itsgoingd/clockwork": "~1.9", + "mockery/mockery": "~0.9", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "fzaninotto/faker": "Required to use the entity factory builder (~1.4).", + "laravel-doctrine/acl": "to integrate Doctrine roles & permissions with Laravel's Authorization system (~1.0)", + "laravel-doctrine/extensions": "to add Behavioral and Query/Type Extensions for Laravel Doctrine (~1.0)", + "laravel-doctrine/fluent": "Fluent mapping driver (alternative to xml, yaml, ... (~1.1).", + "laravel-doctrine/migrations": "to add support for migrations in Laravel Doctrine (~1.0)", + "yajra/laravel-oci8": "Support for Laravel native queue and session database drivers in Oracle (~2.0)." + }, + "type": "library", + "autoload": { + "psr-4": { + "LaravelDoctrine\\ORM\\": "src/" + }, + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Patrick Brouwers", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "A Doctrine ORM bridge for Laravel 5", + "keywords": [ + "data mapper", + "database", + "doctrine", + "laravel", + "orm" + ], + "time": "2016-09-25 18:05:32" + }, + { + "name": "laravel/framework", + "version": "v5.2.45", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "2a79f920d5584ec6df7cf996d922a742d11095d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/2a79f920d5584ec6df7cf996d922a742d11095d1", + "reference": "2a79f920d5584ec6df7cf996d922a742d11095d1", + "shasum": "" + }, + "require": { + "classpreloader/classpreloader": "~3.0", + "doctrine/inflector": "~1.0", + "ext-mbstring": "*", + "ext-openssl": "*", + "jeremeamia/superclosure": "~2.2", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4", + "php": ">=5.5.9", + "psy/psysh": "0.7.*", + "swiftmailer/swiftmailer": "~5.1", + "symfony/console": "2.8.*|3.0.*", + "symfony/debug": "2.8.*|3.0.*", + "symfony/finder": "2.8.*|3.0.*", + "symfony/http-foundation": "2.8.*|3.0.*", + "symfony/http-kernel": "2.8.*|3.0.*", + "symfony/polyfill-php56": "~1.0", + "symfony/process": "2.8.*|3.0.*", + "symfony/routing": "2.8.*|3.0.*", + "symfony/translation": "2.8.*|3.0.*", + "symfony/var-dumper": "2.8.*|3.0.*", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "tightenco/collect": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "mockery/mockery": "~0.9.4", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~4.1", + "predis/predis": "~1.0", + "symfony/css-selector": "2.8.*|3.0.*", + "symfony/dom-crawler": "2.8.*|3.0.*" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*).", + "symfony/psr-http-message-bridge": "Required to use psr7 bridging features (0.2.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/Illuminate/Queue/IlluminateQueueClosure.php" + ], + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "http://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "time": "2016-08-26 11:44:52" + }, + { + "name": "league/flysystem", + "version": "1.0.32", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "1b5c4a0031697f46e779a9d1b309c2e1b24daeab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b5c4a0031697f46e779a9d1b309c2e1b24daeab", + "reference": "1b5c4a0031697f46e779a9d1b309c2e1b24daeab", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "ext-fileinfo": "*", + "mockery/mockery": "~0.9", + "phpspec/phpspec": "^2.2", + "phpunit/phpunit": "~4.8" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-copy": "Allows you to use Copy.com storage", + "league/flysystem-dropbox": "Allows you to use Dropbox storage", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2016-10-19 20:38:46" + }, + { + "name": "monolog/monolog", + "version": "1.21.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952", + "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "~5.3" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2016-07-29 03:23:52" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/cron-expression.git", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Cron": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "time": "2016-01-26 21:23:30" + }, + { + "name": "nesbot/carbon", + "version": "1.21.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2015-11-04 20:07:17" + }, + { + "name": "nikic/php-parser", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "4dd659edadffdc2143e4753df655d866dbfeedf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4dd659edadffdc2143e4753df655d866dbfeedf0", + "reference": "4dd659edadffdc2143e4753df655d866dbfeedf0", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2016-09-16 12:04:44" + }, + { + "name": "paragonie/random_compat", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2016-03-18 20:34:03" + }, + { + "name": "predis/predis", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/nrk/predis.git", + "reference": "7a170b3d8123c556597b4fbdb88631f99de180c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nrk/predis/zipball/7a170b3d8123c556597b4fbdb88631f99de180c2", + "reference": "7a170b3d8123c556597b4fbdb88631f99de180c2", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Allows access to Webdis when paired with phpiredis", + "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" + }, + "type": "library", + "autoload": { + "psr-4": { + "Predis\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniele Alessandri", + "email": "suppakilla@gmail.com", + "homepage": "http://clorophilla.net" + } + ], + "description": "Flexible and feature-complete PHP client library for Redis", + "homepage": "http://github.com/nrk/predis", + "keywords": [ + "nosql", + "predis", + "redis" + ], + "time": "2015-01-02 12:51:34" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10 12:19:37" + }, + { + "name": "psy/psysh", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e64e10b20f8d229cac76399e1f3edddb57a0f280", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "^1.2.1|~2.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "~1.5", + "phpunit/phpunit": "~3.7|~4.0|~5.0", + "squizlabs/php_codesniffer": "~2.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2016-03-09 05:03:14" + }, + { + "name": "react/promise", + "version": "v2.4.1", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "8025426794f1944de806618671d4fa476dc7626f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8025426794f1944de806618671d4fa476dc7626f", + "reference": "8025426794f1944de806618671d4fa476dc7626f", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "time": "2016-05-03 17:50:52" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.3", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "4cc92842069c2bbc1f28daaaf1d2576ec4dfe153" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/4cc92842069c2bbc1f28daaaf1d2576ec4dfe153", + "reference": "4cc92842069c2bbc1f28daaaf1d2576ec4dfe153", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2016-07-08 11:51:25" + }, + { + "name": "symfony/console", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "926061e74229e935d3c5b4e9ba87237316c6693f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/926061e74229e935d3c5b4e9ba87237316c6693f", + "reference": "926061e74229e935d3c5b4e9ba87237316c6693f", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 07:22:48" + }, + { + "name": "symfony/debug", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 07:22:48" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.1.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/28b0832b2553ffb80cabef6a7a812ff1e670c0bc", + "reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-10-13 06:28:43" + }, + { + "name": "symfony/finder", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", + "reference": "3eb4e64c6145ef8b92adefb618a74ebdde9e3fe9", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:40:00" + }, + { + "name": "symfony/http-foundation", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "49ba00f8ede742169cb6b70abe33243f4d673f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/49ba00f8ede742169cb6b70abe33243f4d673f82", + "reference": "49ba00f8ede742169cb6b70abe33243f4d673f82", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2016-07-17 13:54:30" + }, + { + "name": "symfony/http-kernel", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "d97ba4425e36e79c794e7d14ff36f00f081b37b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d97ba4425e36e79c794e7d14ff36f00f081b37b3", + "reference": "d97ba4425e36e79c794e7d14ff36f00f081b37b3", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~2.8.8|~3.0.8|~3.1.2|~3.2" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~2.8|~3.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 09:10:37" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/polyfill-php55", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php55.git", + "reference": "bf2ff9ad6be1a4772cb873e4eea94d70daa95c6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/bf2ff9ad6be1a4772cb873e4eea94d70daa95c6d", + "reference": "bf2ff9ad6be1a4772cb873e4eea94d70daa95c6d", + "shasum": "" + }, + "require": { + "ircmaxell/password-compat": "~1.0", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php55\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "3edf57a8fbf9a927533344cef65ad7e1cf31030a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/3edf57a8fbf9a927533344cef65ad7e1cf31030a", + "reference": "3edf57a8fbf9a927533344cef65ad7e1cf31030a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "ef830ce3d218e622b221d6bfad42c751d974bf99" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ef830ce3d218e622b221d6bfad42c751d974bf99", + "reference": "ef830ce3d218e622b221d6bfad42c751d974bf99", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/process", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "768debc5996f599c4372b322d9061dba2a4bf505" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/768debc5996f599c4372b322d9061dba2a4bf505", + "reference": "768debc5996f599c4372b322d9061dba2a4bf505", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2016-07-28 11:13:34" + }, + { + "name": "symfony/routing", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "9038984bd9c05ab07280121e9e10f61a7231457b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/9038984bd9c05ab07280121e9e10f61a7231457b", + "reference": "9038984bd9c05ab07280121e9e10f61a7231457b", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2016-06-29 05:40:00" + }, + { + "name": "symfony/serializer", + "version": "v2.8.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/serializer.git", + "reference": "fad6992cd308b6c2484186fd980b221ebcb0ed37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/serializer/zipball/fad6992cd308b6c2484186fd980b221ebcb0ed37", + "reference": "fad6992cd308b6c2484186fd980b221ebcb0ed37", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-php55": "~1.0" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "symfony/config": "~2.2|~3.0.0", + "symfony/property-access": "~2.3|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", + "doctrine/cache": "For using the default cached annotation reader and metadata cache.", + "symfony/config": "For using the XML mapping loader.", + "symfony/property-access": "For using the ObjectNormalizer.", + "symfony/yaml": "For using the default YAML mapping loader." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Serializer\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Serializer Component", + "homepage": "https://symfony.com", + "time": "2016-09-24 09:47:20" + }, + { + "name": "symfony/translation", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/eee6c664853fd0576f21ae25725cfffeafe83f26", + "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<2.8" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/intl": "~2.8|~3.0", + "symfony/yaml": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 07:22:48" + }, + { + "name": "symfony/var-dumper", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "1f7e071aafc6676fcb6e3f0497f87c2397247377" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1f7e071aafc6676fcb6e3f0497f87c2397247377", + "reference": "1f7e071aafc6676fcb6e3f0497f87c2397247377", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2016-07-26 08:03:56" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "reference": "3cc116adbe4b11be5ec557bf1d24dc5e3a21d18c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause-Attribution" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2016-09-01 10:05:43" + } + ], + "packages-dev": [ + { + "name": "fzaninotto/faker", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": [] + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "time": "2016-04-29 12:21:54" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "satooshi/php-coveralls": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "hamcrest" + ], + "files": [ + "hamcrest/Hamcrest.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2015-05-11 14:41:42" + }, + { + "name": "mockery/mockery", + "version": "0.9.5", + "source": { + "type": "git", + "url": "https://github.com/padraic/mockery.git", + "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/mockery/zipball/4db079511a283e5aba1b3c2fb19037c645e70fc2", + "reference": "4db079511a283e5aba1b3c2fb19037c645e70fc2", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~1.1", + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2016-05-22 21:52:33" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-09-30 07:12:33" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-06-10 07:14:17" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-06-07 08:13:47" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06 15:47:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.27", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90", + "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2016-07-21 06:48:14" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02 06:51:40" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18 05:49:44" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17 09:04:28" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "symfony/css-selector", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "b8999c1f33c224b2b66b38253f5e3a838d0d0115" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b8999c1f33c224b2b66b38253f5e3a838d0d0115", + "reference": "b8999c1f33c224b2b66b38253f5e3a838d0d0115", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:40:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "dff8fecf1f56990d88058e3a1885c2a5f1b8e970" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/dff8fecf1f56990d88058e3a1885c2a5f1b8e970", + "reference": "dff8fecf1f56990d88058e3a1885c2a5f1b8e970", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "~2.8|~3.0" + }, + "suggest": { + "symfony/css-selector": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 07:22:48" + }, + { + "name": "symfony/yaml", + "version": "v3.1.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/7ff51b06c6c3d5cc6686df69004a42c69df09e27", + "reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-10-24 18:41:13" + }, + { + "name": "webmozart/assert", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-08-09 15:02:57" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.5.9" + }, + "platform-dev": [] +} diff --git a/config/app.php b/config/app.php index 519db62c..36ad7fa2 100644 --- a/config/app.php +++ b/config/app.php @@ -162,7 +162,7 @@ return [ \repositories\RepositoriesProvider::class, \services\ServicesProvider::class, \factories\FactoriesProvider::class, - \LaravelDoctrine\ORM\DoctrineServiceProvider::class, + \libs\utils\CustomDoctrineServiceProvider::class, \LaravelDoctrine\Extensions\BeberleiExtensionsServiceProvider::class, ], diff --git a/config/doctrine.php b/config/doctrine.php index a16cc165..e6fc4b26 100644 --- a/config/doctrine.php +++ b/config/doctrine.php @@ -213,7 +213,20 @@ return [ 'cache' => [ 'default' => env('DOCTRINE_CACHE', 'redis'), 'namespace' => null, - 'second_level' => true, + 'second_level' => [ + 'enabled' => true, + 'region_lifetime' => 3600, + 'region_lock_lifetime' => 60, + 'regions' => [ + 'summit_event_feedback_region' => [ + 'lifetime' => 300, + 'lock_lifetime' => 60 + ] + ], + 'log_enabled' => true, + 'file_lock_region_directory' => '/tmp' + ] + ], /* |-------------------------------------------------------------------------- diff --git a/database/seeds/ApiEndpointsSeeder.php b/database/seeds/ApiEndpointsSeeder.php index 10bccc42..b124cd71 100644 --- a/database/seeds/ApiEndpointsSeeder.php +++ b/database/seeds/ApiEndpointsSeeder.php @@ -14,9 +14,8 @@ use Illuminate\Database\Seeder; use Illuminate\Support\Facades\Config; -use models\resource_server\Api; -use models\resource_server\ApiEndpoint; -use models\resource_server\ApiScope; +use App\Models\ResourceServer\ApiEndpoint; +use LaravelDoctrine\ORM\Facades\EntityManager; /** * Class ApiEndpointsSeeder @@ -34,762 +33,417 @@ class ApiEndpointsSeeder extends Seeder $this->seedSummitEndpoints(); } + /** + * @param string $api_name + * @param array $endpoints_info + */ + private function seedApiEndpoints($api_name, array $endpoints_info){ + + $api = EntityManager::getRepository(\App\Models\ResourceServer\Api::class)->findOneBy(['name' => $api_name]); + if(is_null($api)) return; + + foreach($endpoints_info as $endpoint_info){ + + $endpoint = new ApiEndpoint(); + $endpoint->setName($endpoint_info['name']); + $endpoint->setRoute($endpoint_info['route']); + $endpoint->setHttpMethod($endpoint_info['http_method']); + $endpoint->setActive(true); + $endpoint->setAllowCors(true); + $endpoint->setAllowCredentials(true); + $endpoint->setApi($api); + + foreach($endpoint_info['scopes'] as $scope_name){ + $scope = EntityManager::getRepository(\App\Models\ResourceServer\ApiScope::class)->findOneBy(['name' => $scope_name]); + if(is_null($scope)) continue; + $endpoint->addScope($scope); + } + + EntityManager::persist($endpoint); + } + + EntityManager::flush(); + } + private function seedPublicCloudsEndpoints() { - $public_clouds = Api::where('name', '=', 'public-clouds')->first(); $current_realm = Config::get('app.url'); - // endpoints scopes - ApiEndpoint::create( + $this->seedApiEndpoints('public-clouds', [ array( 'name' => 'get-public-clouds', 'active' => true, - 'api_id' => $public_clouds->id, 'route' => '/api/v1/marketplace/public-clouds', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [ + sprintf('%s/public-clouds/read', $current_realm), + ], + ), array( 'name' => 'get-public-cloud', 'active' => true, - 'api_id' => $public_clouds->id, 'route' => '/api/v1/marketplace/public-clouds/{id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [ + sprintf('%s/public-clouds/read', $current_realm), + ], + ), array( 'name' => 'get-public-cloud-datacenters', 'active' => true, - 'api_id' => $public_clouds->id, 'route' => '/api/v1/marketplace/public-clouds/{id}/data-centers', - 'http_method' => 'GET' + 'http_method' => 'GET', + 'scopes' => [ + sprintf('%s/public-clouds/read', $current_realm), + ], ) - ); - - $public_cloud_read_scope = ApiScope::where('name', '=', - sprintf('%s/public-clouds/read', $current_realm))->first(); - - $endpoint_get_public_clouds = ApiEndpoint::where('name', '=', 'get-public-clouds')->first(); - $endpoint_get_public_clouds->scopes()->attach($public_cloud_read_scope->id); - - $endpoint_get_public_cloud = ApiEndpoint::where('name', '=', 'get-public-cloud')->first(); - $endpoint_get_public_cloud->scopes()->attach($public_cloud_read_scope->id); - - $endpoint_get_public_cloud_datacenters = ApiEndpoint::where('name', '=', - 'get-public-cloud-datacenters')->first(); - $endpoint_get_public_cloud_datacenters->scopes()->attach($public_cloud_read_scope->id); + ]); } private function seedPrivateCloudsEndpoints() { - $private_clouds = Api::where('name', '=', 'private-clouds')->first(); + $current_realm = Config::get('app.url'); // endpoints scopes - ApiEndpoint::create( + $this->seedApiEndpoints('private-clouds', [ array( 'name' => 'get-private-clouds', - 'active' => true, - 'api_id' => $private_clouds->id, 'route' => '/api/v1/marketplace/private-clouds', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/private-clouds/read', $current_realm)], + ), array( 'name' => 'get-private-cloud', - 'active' => true, - 'api_id' => $private_clouds->id, 'route' => '/api/v1/marketplace/private-clouds/{id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/private-clouds/read', $current_realm)], + ), array( 'name' => 'get-private-cloud-datacenters', - 'active' => true, - 'api_id' => $private_clouds->id, 'route' => '/api/v1/marketplace/private-clouds/{id}/data-centers', - 'http_method' => 'GET' + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/private-clouds/read', $current_realm)], ) - ); - - $private_cloud_read_scope = ApiScope::where('name', '=', - sprintf('%s/private-clouds/read', $current_realm))->first(); - - $endpoint_get_private_clouds = ApiEndpoint::where('name', '=', 'get-private-clouds')->first(); - $endpoint_get_private_clouds->scopes()->attach($private_cloud_read_scope->id); - - $endpoint_get_private_cloud = ApiEndpoint::where('name', '=', 'get-private-cloud')->first(); - $endpoint_get_private_cloud->scopes()->attach($private_cloud_read_scope->id); - - $endpoint_get_private_cloud_datacenters = ApiEndpoint::where('name', '=', - 'get-private-cloud-datacenters')->first(); - $endpoint_get_private_cloud_datacenters->scopes()->attach($private_cloud_read_scope->id); + ]); } private function seedConsultantsEndpoints() { - $consultants = Api::where('name', '=', 'consultants')->first(); $current_realm = Config::get('app.url'); - // endpoints scopes - ApiEndpoint::create( + $this->seedApiEndpoints('consultants', [ array( 'name' => 'get-consultants', - 'active' => true, - 'api_id' => $consultants->id, 'route' => '/api/v1/marketplace/consultants', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/consultants/read', $current_realm)], + ), array( 'name' => 'get-consultant', - 'active' => true, - 'api_id' => $consultants->id, 'route' => '/api/v1/marketplace/consultants/{id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/consultants/read', $current_realm)], + ), array( 'name' => 'get-consultant-offices', - 'active' => true, - 'api_id' => $consultants->id, 'route' => '/api/v1/marketplace/consultants/{id}/offices', - 'http_method' => 'GET' + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/consultants/read', $current_realm)], ) - ); - - $consultant_read_scope = ApiScope::where('name', '=', sprintf('%s/consultants/read', $current_realm))->first(); - - $endpoint = ApiEndpoint::where('name', '=', 'get-consultants')->first(); - $endpoint->scopes()->attach($consultant_read_scope->id); - - $endpoint = ApiEndpoint::where('name', '=', 'get-consultant')->first(); - $endpoint->scopes()->attach($consultant_read_scope->id); - - $endpoint = ApiEndpoint::where('name', '=', 'get-consultant-offices')->first(); - $endpoint->scopes()->attach($consultant_read_scope->id); + ]); } private function seedSummitEndpoints() { - $summit = Api::where('name', '=', 'summits')->first(); $current_realm = Config::get('app.url'); - // endpoints scopes - - ApiEndpoint::create( + $this->seedApiEndpoints('summits', [ + // summits array( 'name' => 'get-summits', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-summit', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-summit-entity-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/entity-events', - 'http_method' => 'GET' - ) - ); - - // attendees - - ApiEndpoint::create - ( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), + // attendees array( 'name' => 'get-attendees', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/attendees', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-attendee', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/attendees/{attendee_id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-attendee-schedule', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/attendees/{attendee_id}/schedule', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'add-event-attendee-schedule', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/attendees/{attendee_id}/schedule/{event_id}', - 'http_method' => 'POST' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/write', $current_realm)], + ), array( 'name' => 'delete-event-attendee-schedule', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/attendees/{attendee_id}/schedule/{event_id}', - 'http_method' => 'DELETE' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'DELETE', + 'scopes' => [sprintf('%s/summits/write', $current_realm)], + ), array( 'name' => 'checking-event-attendee-schedule', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/attendees/{attendee_id}/schedule/{event_id}/check-in', - 'http_method' => 'PUT' - ) - ); - - // speakers - - ApiEndpoint::create( + 'http_method' => 'PUT', + 'scopes' => [sprintf('%s/summits/write', $current_realm)], + ), + // speakers array( 'name' => 'get-speakers', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/speakers', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-speaker', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/speakers/{speaker_id}', - 'http_method' => 'GET' - ) - ); - - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'add-speaker-feedback', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/speakers/{speaker_id}/presentations/{presentation_id}/feedback', - 'http_method' => 'POST' - ) - ); - - // events - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/write', $current_realm)], + ), + // events array( 'name' => 'get-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-published-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/published', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-all-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/events', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-all-published-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/events/published', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-published-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}/published', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'add-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events', - 'http_method' => 'POST' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/write-event', $current_realm)], + ), array( 'name' => 'update-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}', - 'http_method' => 'PUT' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'PUT', + 'scopes' => [sprintf('%s/summits/write-event', $current_realm)], + ), array( 'name' => 'publish-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}/publish', - 'http_method' => 'PUT' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'PUT', + 'scopes' => [sprintf('%s/summits/publish-event', $current_realm)], + ), array( 'name' => 'unpublish-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}/publish', - 'http_method' => 'DELETE' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'DELETE', + 'scopes' => [sprintf('%s/summits/publish-event', $current_realm)], + ), array( 'name' => 'delete-event', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}', - 'http_method' => 'DELETE' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'DELETE', + 'scopes' => [sprintf('%s/summits/delete-event', $current_realm)], + ), array( 'name' => 'add-event-feedback', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}/feedback', - 'http_method' => 'POST' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/write', $current_realm)], + ), array( 'name' => 'add-event-feedback-v2', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v2/summits/{id}/events/{event_id}/feedback', - 'http_method' => 'POST' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/write', $current_realm)], + ), array( 'name' => 'get-event-feedback', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/events/{event_id}/feedback/{attendee_id?}', - 'http_method' => 'GET' - ) - ); - - // locations - - ApiEndpoint::create( - array( - 'name' => 'get-locations', - 'active' => true, - 'api_id' => $summit->id, - 'route' => '/api/v1/summits/{id}/locations', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), + // locations + array( + 'name' => 'get-locations', + 'route' => '/api/v1/summits/{id}/locations', + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-venues', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/venues', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-external-locations', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/external-locations', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-hotels', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/hotels', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-airports', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/airports', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-location', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/{location_id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-location-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/{location_id}/events', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-location-published-events', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/locations/{location_id}/events/published', - 'http_method' => 'GET' - ) - ); - - // event types - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), + // event types array( 'name' => 'get-event-types', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/event-types', - 'http_method' => 'GET' - ) - ); - - //summit types - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), + //summit types array( 'name' => 'get-summit-types', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/summit-types', - 'http_method' => 'GET' - ) - ); - - //external orders - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), + //external orders array( 'name' => 'get-external-order', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/external-orders/{external_order_id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read-external-orders', $current_realm)], + ), array( 'name' => 'confirm-external-order', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/external-orders/{external_order_id}/external-attendees/{external_attendee_id}/confirm', - 'http_method' => 'POST' - ) - ); - - //videos - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/confirm-external-orders', $current_realm)], + ), + //videos array( 'name' => 'get-presentation-videos', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/presentations/{presentation_id}/videos', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'get-presentation-video', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/presentations/{presentation_id}/video/{video_id}', - 'http_method' => 'GET' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read', $current_realm)], + ), array( 'name' => 'create-presentation-video', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/presentations/{presentation_id}/videos', - 'http_method' => 'POST' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'POST', + 'scopes' => [sprintf('%s/summits/write-videos', $current_realm)], + ), array( 'name' => 'update-presentation-video', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}', - 'http_method' => 'PUT' - ) - ); - - ApiEndpoint::create( + 'http_method' => 'PUT', + 'scopes' => [sprintf('%s/summits/write-videos', $current_realm)], + ), array( 'name' => 'delete-presentation-video', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/presentations/{presentation_id}/videos/{video_id}', - 'http_method' => 'DELETE' - ) - ); - - //members - - ApiEndpoint::create( + 'http_method' => 'DELETE', + 'scopes' => [sprintf('%s/summits/write-videos', $current_realm)], + ), + //members array( 'name' => 'get-own-member', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/members/me', - 'http_method' => 'GET' - ) - ); - - // notifications - - ApiEndpoint::create( + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/me/read', $current_realm)], + ), + // notifications array( 'name' => 'get-notifications', - 'active' => true, - 'api_id' => $summit->id, 'route' => '/api/v1/summits/{id}/notifications', - 'http_method' => 'GET' + 'http_method' => 'GET', + 'scopes' => [sprintf('%s/summits/read-notifications', $current_realm)], ) - ); - - $member_read_scope = ApiScope::where('name', '=', sprintf('%s/me/read', $current_realm))->first(); - $summit_read_scope = ApiScope::where('name', '=', sprintf('%s/summits/read', $current_realm))->first(); - $summit_write_scope = ApiScope::where('name', '=', sprintf('%s/summits/write', $current_realm))->first(); - $summit_write_event_scope = ApiScope::where('name', '=', sprintf('%s/summits/write-event', $current_realm))->first(); - $summit_publish_event_scope = ApiScope::where('name', '=', sprintf('%s/summits/publish-event', $current_realm))->first(); - $summit_delete_event_scope = ApiScope::where('name', '=', sprintf('%s/summits/delete-event', $current_realm))->first(); - $summit_external_order_read = ApiScope::where('name', '=', sprintf('%s/summits/read-external-orders', $current_realm))->first(); - $summit_external_order_confirm = ApiScope::where('name', '=', sprintf('%s/summits/confirm-external-orders', $current_realm))->first(); - $write_videos_scope = ApiScope::where('name', '=', sprintf('%s/summits/write-videos', $current_realm))->first(); - $read_notifications = ApiScope::where('name', '=', sprintf('%s/summits/read-notifications', $current_realm))->first(); - - // read - $endpoint = ApiEndpoint::where('name', '=', 'get-summits')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-own-member')->first(); - $endpoint->scopes()->attach($member_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-summit')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-summit-entity-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-attendees')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-attendee')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-attendee-schedule')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'add-event-attendee-schedule')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-speakers')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-speaker')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-published-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-all-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-all-published-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-event')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-published-event')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-event-feedback')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-locations')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-venues')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-hotels')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-airports')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-external-locations')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-location')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-event-types')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-summit-types')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-location-published-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-location-events')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-presentation-videos')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'get-presentation-video')->first(); - $endpoint->scopes()->attach($summit_read_scope->id); - - // read external orders - - $endpoint = ApiEndpoint::where('name', '=', 'get-external-order')->first(); - $endpoint->scopes()->attach($summit_external_order_read->id); - - // read notifications - - $endpoint = ApiEndpoint::where('name', '=', 'get-notifications')->first(); - $endpoint->scopes()->attach($read_notifications->id); - - // write - - $endpoint = ApiEndpoint::where('name', '=', 'delete-event-attendee-schedule')->first(); - $endpoint->scopes()->attach($summit_write_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'checking-event-attendee-schedule')->first(); - $endpoint->scopes()->attach($summit_write_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'add-speaker-feedback')->first(); - $endpoint->scopes()->attach($summit_write_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'add-event-feedback')->first(); - $endpoint->scopes()->attach($summit_write_scope->id); - - $endpoint = ApiEndpoint::where('name', '=', 'add-event-feedback-v2')->first(); - $endpoint->scopes()->attach($summit_write_scope->id); - - // write events - $endpoint = ApiEndpoint::where('name', '=', 'add-event')->first(); - $endpoint->scopes()->attach($summit_write_event_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'update-event')->first(); - $endpoint->scopes()->attach($summit_write_event_scope->id); - - - $endpoint = ApiEndpoint::where('name', '=', 'publish-event')->first(); - $endpoint->scopes()->attach($summit_publish_event_scope->id); - $endpoint = ApiEndpoint::where('name', '=', 'unpublish-event')->first(); - $endpoint->scopes()->attach($summit_publish_event_scope->id); - - $endpoint = ApiEndpoint::where('name', '=', 'delete-event')->first(); - $endpoint->scopes()->attach($summit_delete_event_scope->id); - - //confirm external order - - $endpoint = ApiEndpoint::where('name', '=', 'confirm-external-order')->first(); - $endpoint->scopes()->attach($summit_external_order_confirm->id); - - //write videos - - $endpoint = ApiEndpoint::where('name', '=', 'create-presentation-video')->first(); - $endpoint->scopes()->attach($write_videos_scope->id); - - $endpoint = ApiEndpoint::where('name', '=', 'update-presentation-video')->first(); - $endpoint->scopes()->attach($write_videos_scope->id); - - $endpoint = ApiEndpoint::where('name', '=', 'delete-presentation-video')->first(); - $endpoint->scopes()->attach($write_videos_scope->id); - + ]); } diff --git a/database/seeds/ApiScopesSeeder.php b/database/seeds/ApiScopesSeeder.php index 2fff2f7e..3c82b0d5 100644 --- a/database/seeds/ApiScopesSeeder.php +++ b/database/seeds/ApiScopesSeeder.php @@ -13,14 +13,15 @@ **/ use Illuminate\Database\Seeder; -use Illuminate\Support\Facades\Config; -use models\resource_server\Api; -use models\resource_server\ApiScope; +use Illuminate\Support\Facades\Config;; +use App\Models\ResourceServer\ApiScope; +use LaravelDoctrine\ORM\Facades\EntityManager; +use Illuminate\Support\Facades\DB; /** * Class ApiScopesSeeder */ -class ApiScopesSeeder extends Seeder +final class ApiScopesSeeder extends Seeder { public function run() @@ -38,158 +39,128 @@ class ApiScopesSeeder extends Seeder { $current_realm = Config::get('app.url'); - $public_clouds = Api::where('name', '=', 'public-clouds')->first(); + $api = EntityManager::getRepository(\App\Models\ResourceServer\Api::class)->findOneBy(['name' => 'public-clouds']); - ApiScope::create( - array( - 'name' => sprintf('%s/public-clouds/read', $current_realm), - 'short_description' => 'Get Public Clouds', - 'description' => 'Grants read only access for Public Clouds', - 'api_id' => $public_clouds->id, - 'system' => false - ) - ); + $scope = new ApiScope(); + $scope->setName(sprintf('%s/public-clouds/read', $current_realm)); + $scope->setShortDescription('Read Public Clouds Data'); + $scope->setDescription('Grants read only access for Public Clouds'); + $scope->setActive(true); + $scope->setDefault(false); + $scope->setApi($api); + + EntityManager::persist($scope); + EntityManager::flush(); } private function seedPrivateCloudScopes() { $current_realm = Config::get('app.url'); - $private_clouds = Api::where('name', '=', 'private-clouds')->first(); + $api = EntityManager::getRepository(\App\Models\ResourceServer\Api::class)->findOneBy(['name' => 'private-clouds']); - ApiScope::create( - array( - 'name' => sprintf('%s/private-clouds/read', $current_realm), - 'short_description' => 'Get Private Clouds', - 'description' => 'Grants read only access for Private Clouds', - 'api_id' => $private_clouds->id, - 'system' => false - ) - ); + $scope = new ApiScope(); + $scope->setName(sprintf('%s/private-clouds/read', $current_realm)); + $scope->setShortDescription('Read Private Clouds Data'); + $scope->setDescription('Grants read only access for Private Clouds'); + $scope->setActive(true); + $scope->setDefault(false); + $scope->setApi($api); + + EntityManager::persist($scope); + EntityManager::flush(); } private function seedConsultantScopes() { $current_realm = Config::get('app.url'); - $consultants = Api::where('name', '=', 'consultants')->first(); + $api = EntityManager::getRepository(\App\Models\ResourceServer\Api::class)->findOneBy(['name' => 'consultants']); - ApiScope::create( - array( - 'name' => sprintf('%s/consultants/read', $current_realm), - 'short_description' => 'Get Consultants', - 'description' => 'Grants read only access for Consultants', - 'api_id' => $consultants->id, - 'system' => false - ) - ); + $scope = new ApiScope(); + $scope->setName(sprintf('%s/consultants/read', $current_realm)); + $scope->setShortDescription('Read Consultants Data'); + $scope->setDescription('Grants read only access for Consultants'); + $scope->setActive(true); + $scope->setDefault(false); + $scope->setApi($api); + + EntityManager::persist($scope); + EntityManager::flush(); } private function seedSummitScopes() { $current_realm = Config::get('app.url'); - $summits = Api::where('name', '=', 'summits')->first(); + $api = EntityManager::getRepository(\App\Models\ResourceServer\Api::class)->findOneBy(['name' => 'summits']); - ApiScope::create( + $scopes = [ array( 'name' => sprintf('%s/summits/read', $current_realm), 'short_description' => 'Get Summit Data', 'description' => 'Grants read only access for Summits Data', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/me/read', $current_realm), 'short_description' => 'Get own member data', 'description' => 'Grants read only access for our own member data', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/write', $current_realm), 'short_description' => 'Write Summit Data', 'description' => 'Grants write access for Summits Data', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/write-event', $current_realm), 'short_description' => 'Write Summit Events', 'description' => 'Grants write access for Summits Events', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/delete-event', $current_realm), 'short_description' => 'Delete Summit Events', 'description' => 'Grants delete access for Summits Events', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/publish-event', $current_realm), 'short_description' => 'Publish/UnPublish Summit Events', 'description' => 'Grants Publish/UnPublish access for Summits Events', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/read-external-orders', $current_realm), 'short_description' => 'Allow to read External Orders', 'description' => 'Allow to read External Orders', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/confirm-external-orders', $current_realm), 'short_description' => 'Allow to confirm External Orders', 'description' => 'Allow to confirm External Orders', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/write-videos', $current_realm), 'short_description' => 'Allow to write presentation videos', 'description' => 'Allow to write presentation videos', - 'api_id' => $summits->id, - 'system' => false - ) - ); - - ApiScope::create( + ), array( 'name' => sprintf('%s/summits/read-notifications', $current_realm), 'short_description' => 'Allow to read summit notifications', 'description' => 'Allow to read summit notifications', - 'api_id' => $summits->id, - 'system' => false ) - ); + ]; + + foreach ($scopes as $scope_info) { + $scope = new ApiScope(); + $scope->setName($scope_info['name']); + $scope->setShortDescription($scope_info['short_description']); + $scope->setDescription($scope_info['description']); + $scope->setActive(true); + $scope->setDefault(false); + $scope->setApi($api); + EntityManager::persist($scope); + } + + EntityManager::flush(); + } } \ No newline at end of file diff --git a/database/seeds/ApiSeeder.php b/database/seeds/ApiSeeder.php index c08e3770..db331193 100644 --- a/database/seeds/ApiSeeder.php +++ b/database/seeds/ApiSeeder.php @@ -11,8 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ + use Illuminate\Database\Seeder; -use models\resource_server\Api; +use App\Models\ResourceServer\Api; +use LaravelDoctrine\ORM\Facades\EntityManager; +use Illuminate\Support\Facades\DB; /** * Class ApisTableSeeder @@ -27,37 +30,43 @@ final class ApiSeeder extends Seeder DB::table('api_scopes')->delete(); DB::table('api_endpoints')->delete(); DB::table('apis')->delete(); + // public clouds - Api::create( - array( - 'name' => 'public-clouds', - 'active' => true, - 'Description' => 'Marketplace Public Clouds' - ) - ); + $api = new Api(); + $api->setName('public-clouds'); + $api->setActive(true); + $api->setDescription('Marketplace Public Clouds API'); + + EntityManager::persist($api); + // private clouds - Api::create( - array( - 'name' => 'private-clouds', - 'active' => true, - 'Description' => 'Marketplace Private Clouds' - ) - ); + + $api = new Api(); + $api->setName('private-clouds'); + $api->setActive(true); + $api->setDescription('Marketplace Private Clouds API'); + + EntityManager::persist($api); + // consultants - Api::create( - array( - 'name' => 'consultants', - 'active' => true, - 'Description' => 'Marketplace Consultants' - ) - ); + + $api = new Api(); + $api->setName('consultants'); + $api->setActive(true); + $api->setDescription('Marketplace Consultants API'); + + EntityManager::persist($api); + // summit - Api::create( - array( - 'name' => 'summits', - 'active' => true, - 'Description' => 'Summits' - ) - ); + + $api = new Api(); + $api->setName('summits'); + $api->setActive(true); + $api->setDescription('Summit API'); + + EntityManager::persist($api); + + EntityManager::flush(); + } } \ No newline at end of file diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 982214f9..e15decc4 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -3,7 +3,10 @@ use Illuminate\Database\Seeder; use Illuminate\Database\Eloquent\Model; -class DatabaseSeeder extends Seeder +/** + * Class DatabaseSeeder + */ +final class DatabaseSeeder extends Seeder { /** * Run the database seeds. @@ -13,7 +16,7 @@ class DatabaseSeeder extends Seeder public function run() { // $this->call(UsersTableSeeder::class); - Model::unguard(); + Model::unguard(); $this->call('ApiSeeder'); $this->call('ApiScopesSeeder'); $this->call('ApiEndpointsSeeder'); diff --git a/database/seeds/TestSeeder.php b/database/seeds/TestSeeder.php index 3c39a1af..57424558 100644 --- a/database/seeds/TestSeeder.php +++ b/database/seeds/TestSeeder.php @@ -18,7 +18,7 @@ use Illuminate\Database\Seeder; /** * Class TestSeeder */ -class TestSeeder extends Seeder +final class TestSeeder extends Seeder { public function run() { diff --git a/storage/proxies/.gitignore b/storage/proxies/.gitignore deleted file mode 100755 index d6b7ef32..00000000 --- a/storage/proxies/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/tests/OAuth2SummitApiTest.php b/tests/OAuth2SummitApiTest.php index 3c192505..e291623c 100644 --- a/tests/OAuth2SummitApiTest.php +++ b/tests/OAuth2SummitApiTest.php @@ -140,7 +140,7 @@ final class OAuth2SummitApiTest extends ProtectedApiTest public function testCurrentSummitMyAttendeeFail404() { - App::singleton('models\resource_server\IAccessTokenService', 'AccessTokenServiceStub2'); + App::singleton('App\Models\ResourceServer\IAccessTokenService', 'AccessTokenServiceStub2'); $params = array ( @@ -1095,8 +1095,8 @@ final class OAuth2SummitApiTest extends ProtectedApiTest { $params = array ( - 'id' => 6, - 'event_id' => 15027, + 'id' => 7, + 'event_id' => 17300, ); $headers = array @@ -1112,7 +1112,6 @@ final class OAuth2SummitApiTest extends ProtectedApiTest 'attendee_id' => 'me' ); - $response = $this->action ( "POST", @@ -1360,12 +1359,12 @@ final class OAuth2SummitApiTest extends ProtectedApiTest public function testGetEventFeedback() { - $this->testAddFeedback2Event(); + //$this->testAddFeedback2Event(); $params = array ( - 'id' => 6, - 'event_id' => 9454, + 'id' => 7, + 'event_id' => 17300, ); $headers = array @@ -1390,6 +1389,23 @@ final class OAuth2SummitApiTest extends ProtectedApiTest $feedback = json_decode($content); $this->assertTrue(!is_null($feedback)); + + $response = $this->action + ( + "GET", + "OAuth2SummitEventsApiController@getEventFeedback", + $params, + array('expand' => 'owner'), + array(), + array(), + $headers + ); + + $content = $response->getContent(); + $this->assertResponseStatus(200); + + $feedback = json_decode($content); + $this->assertTrue(!is_null($feedback)); } public function testGetMeEventFeedback() diff --git a/tests/ProtectedApiTest.php b/tests/ProtectedApiTest.php index 76f8a700..1e492c4e 100644 --- a/tests/ProtectedApiTest.php +++ b/tests/ProtectedApiTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Config; use models\oauth2\AccessToken; -use models\resource_server\IAccessTokenService; +use App\Models\ResourceServer\IAccessTokenService; /** * Class AccessTokenServiceStub @@ -102,7 +102,7 @@ abstract class ProtectedApiTest extends TestCase public function createApplication() { $app = parent::createApplication(); - App::singleton('models\resource_server\IAccessTokenService', 'AccessTokenServiceStub'); + App::singleton('App\Models\ResourceServer\IAccessTokenService', 'AccessTokenServiceStub'); return $app; } diff --git a/tests/ServicesTest.php b/tests/ServicesTest.php index 48874232..a1988379 100644 --- a/tests/ServicesTest.php +++ b/tests/ServicesTest.php @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -class ServicesTest extends TestCase +class ServicesTest extends TestCase { public function testAccessTokenService(){ $cache = App::make('libs\utils\ICacheService'); @@ -32,7 +32,7 @@ class ServicesTest extends TestCase ]; $cache->storeHash(md5($token_value), $token_info, $cache_lifetime ); sleep(10); - $service = App::make('models\resource_server\IAccessTokenService'); + $service = App::make('App\Models\ResourceServer\IAccessTokenService'); $service->get($token_value); } } \ No newline at end of file