diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/app/commands/.gitkeep b/app/commands/.gitkeep old mode 100755 new mode 100644 diff --git a/app/config/app.php b/app/config/app.php old mode 100755 new mode 100644 index b54890a..349cee5 --- a/app/config/app.php +++ b/app/config/app.php @@ -13,7 +13,7 @@ return array( | */ - 'debug' => true, + 'debug' => false, /* |-------------------------------------------------------------------------- @@ -78,7 +78,9 @@ return array( | */ - 'key' => 'yIqW9jqrcRHEzlFmg0tlESRxDUOKqdgB', + 'key' => 'BxihI0sqIe0oWk27hzF8QCGyaS81SOOO', + + 'cipher' => MCRYPT_RIJNDAEL_128, /* |-------------------------------------------------------------------------- @@ -180,6 +182,7 @@ return array( 'Schema' => 'Illuminate\Support\Facades\Schema', 'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session', + 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', 'URL' => 'Illuminate\Support\Facades\URL', diff --git a/app/config/auth.php b/app/config/auth.php old mode 100755 new mode 100644 diff --git a/app/config/cache.php b/app/config/cache.php old mode 100755 new mode 100644 diff --git a/app/config/compile.php b/app/config/compile.php old mode 100755 new mode 100644 diff --git a/app/config/database.php b/app/config/database.php old mode 100755 new mode 100644 index b7288ff..d9b4f5d --- a/app/config/database.php +++ b/app/config/database.php @@ -66,8 +66,8 @@ return array( 'pgsql' => array( 'driver' => 'pgsql', 'host' => 'localhost', - 'database' => 'database', - 'username' => 'root', + 'database' => 'forge', + 'username' => 'forge', 'password' => '', 'charset' => 'utf8', 'prefix' => '', diff --git a/app/config/local/app.php b/app/config/local/app.php new file mode 100644 index 0000000..c56fcb9 --- /dev/null +++ b/app/config/local/app.php @@ -0,0 +1,18 @@ + true, + +); diff --git a/app/config/local/database.php b/app/config/local/database.php new file mode 100644 index 0000000..fbcb95a --- /dev/null +++ b/app/config/local/database.php @@ -0,0 +1,47 @@ + array( + + 'mysql' => array( + 'driver' => 'mysql', + 'host' => 'localhost', + 'database' => 'homestead', + 'username' => 'homestead', + 'password' => 'secret', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + ), + + 'pgsql' => array( + 'driver' => 'pgsql', + 'host' => 'localhost', + 'database' => 'homestead', + 'username' => 'homestead', + 'password' => 'secret', + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + ), + + ), + +); diff --git a/app/config/mail.php b/app/config/mail.php old mode 100755 new mode 100644 index 41b4c4b..76fd9e4 --- a/app/config/mail.php +++ b/app/config/mail.php @@ -11,7 +11,7 @@ return array( | sending of e-mail. You may specify which one you're using throughout | your application here. By default, Laravel is setup for SMTP mail. | - | Supported: "smtp", "mail", "sendmail" + | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log" | */ @@ -35,9 +35,9 @@ return array( | SMTP Host Port |-------------------------------------------------------------------------- | - | This is the SMTP port used by your application to delivery e-mails to - | users of your application. Like the host we have set this value to - | stay compatible with the Mailgun e-mail applications by default. + | This is the SMTP port used by your application to deliver e-mails to + | users of the application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail application by default. | */ diff --git a/app/config/packages/.gitkeep b/app/config/packages/.gitkeep old mode 100755 new mode 100644 diff --git a/app/config/queue.php b/app/config/queue.php index 6a879f7..940a4cd 100755 --- a/app/config/queue.php +++ b/app/config/queue.php @@ -11,7 +11,7 @@ return array( | API, giving you convenient access to each back-end using the same | syntax for each one. Here you may set the default queue driver. | - | Supported: "sync", "beanstalkd", "sqs", "iron" + | Supported: "sync", "beanstalkd", "sqs", "iron", "redis" | */ @@ -55,6 +55,7 @@ return array( 'token' => 'your-token', 'project' => 'your-project-id', 'queue' => 'your-queue-name', + 'encrypt' => true, ), 'redis' => array( diff --git a/app/config/remote.php b/app/config/remote.php old mode 100755 new mode 100644 diff --git a/app/config/services.php b/app/config/services.php new file mode 100644 index 0000000..c8aba2a --- /dev/null +++ b/app/config/services.php @@ -0,0 +1,31 @@ + array( + 'domain' => '', + 'secret' => '', + ), + + 'mandrill' => array( + 'secret' => '', + ), + + 'stripe' => array( + 'model' => 'User', + 'secret' => '', + ), + +); diff --git a/app/config/session.php b/app/config/session.php old mode 100755 new mode 100644 diff --git a/app/config/testing/cache.php b/app/config/testing/cache.php old mode 100755 new mode 100644 diff --git a/app/config/testing/session.php b/app/config/testing/session.php old mode 100755 new mode 100644 diff --git a/app/config/view.php b/app/config/view.php old mode 100755 new mode 100644 diff --git a/app/config/workbench.php b/app/config/workbench.php old mode 100755 new mode 100644 diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep old mode 100755 new mode 100644 diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php old mode 100755 new mode 100644 diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php old mode 100755 new mode 100644 diff --git a/app/controllers/MentorManagementController.php b/app/controllers/MentorManagementController.php deleted file mode 100644 index 9263026..0000000 --- a/app/controllers/MentorManagementController.php +++ /dev/null @@ -1,88 +0,0 @@ -getKey(); - } - - /** - * Get the password for the user. - * - * @return string - */ - public function getAuthPassword() - { - return $this->password; - } - - /** - * Get the e-mail address where password reminders are sent. - * - * @return string - */ - public function getReminderEmail() - { - return $this->email; - } + protected $hidden = array('password', 'remember_token'); } diff --git a/app/routes.php b/app/routes.php old mode 100755 new mode 100644 index 557ff58..3e10dcf --- a/app/routes.php +++ b/app/routes.php @@ -15,6 +15,3 @@ Route::get('/', function() { return View::make('hello'); }); - -Route::resource('mentors', 'MentorManagementController'); - diff --git a/app/start/artisan.php b/app/start/artisan.php old mode 100755 new mode 100644 diff --git a/app/start/global.php b/app/start/global.php old mode 100755 new mode 100644 diff --git a/app/start/local.php b/app/start/local.php old mode 100755 new mode 100644 diff --git a/app/storage/.gitignore b/app/storage/.gitignore old mode 100755 new mode 100644 diff --git a/app/storage/cache/.gitignore b/app/storage/cache/.gitignore old mode 100755 new mode 100644 diff --git a/app/storage/logs/.gitignore b/app/storage/logs/.gitignore old mode 100755 new mode 100644 diff --git a/app/storage/meta/.gitignore b/app/storage/meta/.gitignore old mode 100755 new mode 100644 diff --git a/app/storage/sessions/.gitignore b/app/storage/sessions/.gitignore old mode 100755 new mode 100644 diff --git a/app/storage/views/.gitignore b/app/storage/views/.gitignore old mode 100755 new mode 100644 diff --git a/app/tests/ExampleTest.php b/app/tests/ExampleTest.php old mode 100755 new mode 100644 diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php old mode 100755 new mode 100644 diff --git a/app/views/emails/auth/reminder.blade.php b/app/views/emails/auth/reminder.blade.php old mode 100755 new mode 100644 index d92f2b3..aebea9e --- a/app/views/emails/auth/reminder.blade.php +++ b/app/views/emails/auth/reminder.blade.php @@ -7,7 +7,8 @@

Password Reset

- To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}. + To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}.
+ This link will expire in {{ Config::get('auth.reminder.expire', 60) }} minutes.
diff --git a/app/views/hello.php b/app/views/hello.php old mode 100755 new mode 100644 index aa8a311..6484242 --- a/app/views/hello.php +++ b/app/views/hello.php @@ -36,7 +36,7 @@
Laravel PHP Framework -

You have arrived. and now you can do miracles

+

You have arrived.

diff --git a/app/views/mentor/home.blade.php b/app/views/mentor/home.blade.php deleted file mode 100644 index 9ba8439..0000000 --- a/app/views/mentor/home.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -bound($abstract) || $this->isAlias($abstract); + } + public function bound($abstract) + { + return isset($this[$abstract]) || isset($this->instances[$abstract]); + } + public function isAlias($name) + { + return isset($this->aliases[$name]); + } + public function bind($abstract, $concrete = null, $shared = false) + { + if (is_array($abstract)) { + list($abstract, $alias) = $this->extractAlias($abstract); + $this->alias($abstract, $alias); + } + $this->dropStaleInstances($abstract); + if (is_null($concrete)) { + $concrete = $abstract; + } + if (!$concrete instanceof Closure) { + $concrete = $this->getClosure($abstract, $concrete); + } + $bound = $this->bound($abstract); + $this->bindings[$abstract] = compact('concrete', 'shared'); + if ($bound) { + $this->rebound($abstract); + } + } + protected function getClosure($abstract, $concrete) + { + return function ($c, $parameters = array()) use($abstract, $concrete) { + $method = $abstract == $concrete ? 'build' : 'make'; + return $c->{$method}($concrete, $parameters); + }; + } + public function bindIf($abstract, $concrete = null, $shared = false) + { + if (!$this->bound($abstract)) { + $this->bind($abstract, $concrete, $shared); + } + } + public function singleton($abstract, $concrete = null) + { + return $this->bind($abstract, $concrete, true); + } + public function share(Closure $closure) + { + return function ($container) use($closure) { + static $object; + if (is_null($object)) { + $object = $closure($container); + } + return $object; + }; + } + public function bindShared($abstract, Closure $closure) + { + return $this->bind($abstract, $this->share($closure), true); + } + public function extend($abstract, Closure $closure) + { + if (!isset($this->bindings[$abstract])) { + throw new \InvalidArgumentException("Type {$abstract} is not bound."); + } + if (isset($this->instances[$abstract])) { + $this->instances[$abstract] = $closure($this->instances[$abstract], $this); + $this->rebound($abstract); + } else { + $extender = $this->getExtender($abstract, $closure); + $this->bind($abstract, $extender, $this->isShared($abstract)); + } + } + protected function getExtender($abstract, Closure $closure) + { + $resolver = $this->bindings[$abstract]['concrete']; + return function ($container) use($resolver, $closure) { + return $closure($resolver($container), $container); + }; + } + public function instance($abstract, $instance) + { + if (is_array($abstract)) { + list($abstract, $alias) = $this->extractAlias($abstract); + $this->alias($abstract, $alias); + } + unset($this->aliases[$abstract]); + $bound = $this->bound($abstract); + $this->instances[$abstract] = $instance; + if ($bound) { + $this->rebound($abstract); + } + } + public function alias($abstract, $alias) + { + $this->aliases[$alias] = $abstract; + } + protected function extractAlias(array $definition) + { + return array(key($definition), current($definition)); + } + public function rebinding($abstract, Closure $callback) + { + $this->reboundCallbacks[$abstract][] = $callback; + if ($this->bound($abstract)) { + return $this->make($abstract); + } + } + public function refresh($abstract, $target, $method) + { + return $this->rebinding($abstract, function ($app, $instance) use($target, $method) { + $target->{$method}($instance); + }); + } + protected function rebound($abstract) + { + $instance = $this->make($abstract); + foreach ($this->getReboundCallbacks($abstract) as $callback) { + call_user_func($callback, $this, $instance); + } + } + protected function getReboundCallbacks($abstract) + { + if (isset($this->reboundCallbacks[$abstract])) { + return $this->reboundCallbacks[$abstract]; + } else { + return array(); + } + } + public function make($abstract, $parameters = array()) + { + $abstract = $this->getAlias($abstract); + $this->resolved[$abstract] = true; + if (isset($this->instances[$abstract])) { + return $this->instances[$abstract]; + } + $concrete = $this->getConcrete($abstract); + if ($this->isBuildable($concrete, $abstract)) { + $object = $this->build($concrete, $parameters); + } else { + $object = $this->make($concrete, $parameters); + } + if ($this->isShared($abstract)) { + $this->instances[$abstract] = $object; + } + $this->fireResolvingCallbacks($abstract, $object); + return $object; + } + protected function getConcrete($abstract) + { + if (!isset($this->bindings[$abstract])) { + if ($this->missingLeadingSlash($abstract) && isset($this->bindings['\\' . $abstract])) { + $abstract = '\\' . $abstract; + } + return $abstract; + } else { + return $this->bindings[$abstract]['concrete']; + } + } + protected function missingLeadingSlash($abstract) + { + return is_string($abstract) && strpos($abstract, '\\') !== 0; + } + public function build($concrete, $parameters = array()) + { + if ($concrete instanceof Closure) { + return $concrete($this, $parameters); + } + $reflector = new ReflectionClass($concrete); + if (!$reflector->isInstantiable()) { + $message = "Target [{$concrete}] is not instantiable."; + throw new BindingResolutionException($message); + } + $constructor = $reflector->getConstructor(); + if (is_null($constructor)) { + return new $concrete(); + } + $dependencies = $constructor->getParameters(); + $parameters = $this->keyParametersByArgument($dependencies, $parameters); + $instances = $this->getDependencies($dependencies, $parameters); + return $reflector->newInstanceArgs($instances); + } + protected function getDependencies($parameters, array $primitives = array()) + { + $dependencies = array(); + foreach ($parameters as $parameter) { + $dependency = $parameter->getClass(); + if (array_key_exists($parameter->name, $primitives)) { + $dependencies[] = $primitives[$parameter->name]; + } elseif (is_null($dependency)) { + $dependencies[] = $this->resolveNonClass($parameter); + } else { + $dependencies[] = $this->resolveClass($parameter); + } + } + return (array) $dependencies; + } + protected function resolveNonClass(ReflectionParameter $parameter) + { + if ($parameter->isDefaultValueAvailable()) { + return $parameter->getDefaultValue(); + } else { + $message = "Unresolvable dependency resolving [{$parameter}]."; + throw new BindingResolutionException($message); + } + } + protected function resolveClass(ReflectionParameter $parameter) + { + try { + return $this->make($parameter->getClass()->name); + } catch (BindingResolutionException $e) { + if ($parameter->isOptional()) { + return $parameter->getDefaultValue(); + } else { + throw $e; + } + } + } + protected function keyParametersByArgument(array $dependencies, array $parameters) + { + foreach ($parameters as $key => $value) { + if (is_numeric($key)) { + unset($parameters[$key]); + $parameters[$dependencies[$key]->name] = $value; + } + } + return $parameters; + } + public function resolving($abstract, Closure $callback) + { + $this->resolvingCallbacks[$abstract][] = $callback; + } + public function resolvingAny(Closure $callback) + { + $this->globalResolvingCallbacks[] = $callback; + } + protected function fireResolvingCallbacks($abstract, $object) + { + if (isset($this->resolvingCallbacks[$abstract])) { + $this->fireCallbackArray($object, $this->resolvingCallbacks[$abstract]); + } + $this->fireCallbackArray($object, $this->globalResolvingCallbacks); + } + protected function fireCallbackArray($object, array $callbacks) + { + foreach ($callbacks as $callback) { + call_user_func($callback, $object, $this); + } + } + public function isShared($abstract) + { + if (isset($this->bindings[$abstract]['shared'])) { + $shared = $this->bindings[$abstract]['shared']; + } else { + $shared = false; + } + return isset($this->instances[$abstract]) || $shared === true; + } + protected function isBuildable($concrete, $abstract) + { + return $concrete === $abstract || $concrete instanceof Closure; + } + protected function getAlias($abstract) + { + return isset($this->aliases[$abstract]) ? $this->aliases[$abstract] : $abstract; + } + public function getBindings() + { + return $this->bindings; + } + protected function dropStaleInstances($abstract) + { + unset($this->instances[$abstract]); + unset($this->aliases[$abstract]); + } + public function forgetInstance($abstract) + { + unset($this->instances[$abstract]); + } + public function forgetInstances() + { + $this->instances = array(); + } + public function offsetExists($key) + { + return isset($this->bindings[$key]); + } + public function offsetGet($key) + { + return $this->make($key); + } + public function offsetSet($key, $value) + { + if (!$value instanceof Closure) { + $value = function () use($value) { + return $value; + }; + } + $this->bind($key, $value); + } + public function offsetUnset($key) + { + unset($this->bindings[$key]); + unset($this->instances[$key]); + } +} +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +interface HttpKernelInterface +{ + const MASTER_REQUEST = 1; + const SUB_REQUEST = 2; + public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); +} +namespace Symfony\Component\HttpKernel; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +interface TerminableInterface +{ + public function terminate(Request $request, Response $response); +} +namespace Illuminate\Support\Contracts; + +interface ResponsePreparerInterface +{ + public function prepareResponse($value); + public function readyForResponses(); +} +namespace Illuminate\Foundation; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Illuminate\Config\FileLoader; +use Illuminate\Container\Container; +use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Facades\Facade; +use Illuminate\Events\EventServiceProvider; +use Illuminate\Routing\RoutingServiceProvider; +use Illuminate\Exception\ExceptionServiceProvider; +use Illuminate\Config\FileEnvironmentVariablesLoader; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\TerminableInterface; +use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Illuminate\Support\Contracts\ResponsePreparerInterface; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +use Symfony\Component\HttpFoundation\Response as SymfonyResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +class Application extends Container implements HttpKernelInterface, TerminableInterface, ResponsePreparerInterface +{ + const VERSION = '4.2.1'; + protected $booted = false; + protected $bootingCallbacks = array(); + protected $bootedCallbacks = array(); + protected $finishCallbacks = array(); + protected $shutdownCallbacks = array(); + protected $middlewares = array(); + protected $serviceProviders = array(); + protected $loadedProviders = array(); + protected $deferredServices = array(); + protected static $requestClass = 'Illuminate\\Http\\Request'; + public function __construct(Request $request = null) + { + $this->registerBaseBindings($request ?: $this->createNewRequest()); + $this->registerBaseServiceProviders(); + $this->registerBaseMiddlewares(); + } + protected function createNewRequest() + { + return forward_static_call(array(static::$requestClass, 'createFromGlobals')); + } + protected function registerBaseBindings($request) + { + $this->instance('request', $request); + $this->instance('Illuminate\\Container\\Container', $this); + } + protected function registerBaseServiceProviders() + { + foreach (array('Event', 'Exception', 'Routing') as $name) { + $this->{"register{$name}Provider"}(); + } + } + protected function registerExceptionProvider() + { + $this->register(new ExceptionServiceProvider($this)); + } + protected function registerRoutingProvider() + { + $this->register(new RoutingServiceProvider($this)); + } + protected function registerEventProvider() + { + $this->register(new EventServiceProvider($this)); + } + public function bindInstallPaths(array $paths) + { + $this->instance('path', realpath($paths['app'])); + foreach (array_except($paths, array('app')) as $key => $value) { + $this->instance("path.{$key}", realpath($value)); + } + } + public static function getBootstrapFile() + { + return '/var/www/vhosts/mentors/htdocs/vendor/laravel/framework/src/Illuminate/Foundation' . '/start.php'; + } + public function startExceptionHandling() + { + $this['exception']->register($this->environment()); + $this['exception']->setDebug($this['config']['app.debug']); + } + public function environment() + { + if (count(func_get_args()) > 0) { + return in_array($this['env'], func_get_args()); + } else { + return $this['env']; + } + } + public function isLocal() + { + return $this['env'] == 'local'; + } + public function detectEnvironment($envs) + { + $args = isset($_SERVER['argv']) ? $_SERVER['argv'] : null; + return $this['env'] = with(new EnvironmentDetector())->detect($envs, $args); + } + public function runningInConsole() + { + return php_sapi_name() == 'cli'; + } + public function runningUnitTests() + { + return $this['env'] == 'testing'; + } + public function forceRegister($provider, $options = array()) + { + return $this->register($provider, $options, true); + } + public function register($provider, $options = array(), $force = false) + { + if ($registered = $this->getRegistered($provider) && !$force) { + return $registered; + } + if (is_string($provider)) { + $provider = $this->resolveProviderClass($provider); + } + $provider->register(); + foreach ($options as $key => $value) { + $this[$key] = $value; + } + $this->markAsRegistered($provider); + if ($this->booted) { + $provider->boot(); + } + return $provider; + } + public function getRegistered($provider) + { + $name = is_string($provider) ? $provider : get_class($provider); + if (array_key_exists($name, $this->loadedProviders)) { + return array_first($this->serviceProviders, function ($key, $value) use($name) { + return get_class($value) == $name; + }); + } + } + public function resolveProviderClass($provider) + { + return new $provider($this); + } + protected function markAsRegistered($provider) + { + $this['events']->fire($class = get_class($provider), array($provider)); + $this->serviceProviders[] = $provider; + $this->loadedProviders[$class] = true; + } + public function loadDeferredProviders() + { + foreach ($this->deferredServices as $service => $provider) { + $this->loadDeferredProvider($service); + } + $this->deferredServices = array(); + } + protected function loadDeferredProvider($service) + { + $provider = $this->deferredServices[$service]; + if (!isset($this->loadedProviders[$provider])) { + $this->registerDeferredProvider($provider, $service); + } + } + public function registerDeferredProvider($provider, $service = null) + { + if ($service) { + unset($this->deferredServices[$service]); + } + $this->register($instance = new $provider($this)); + if (!$this->booted) { + $this->booting(function () use($instance) { + $instance->boot(); + }); + } + } + public function make($abstract, $parameters = array()) + { + $abstract = $this->getAlias($abstract); + if (isset($this->deferredServices[$abstract])) { + $this->loadDeferredProvider($abstract); + } + return parent::make($abstract, $parameters); + } + public function before($callback) + { + return $this['router']->before($callback); + } + public function after($callback) + { + return $this['router']->after($callback); + } + public function finish($callback) + { + $this->finishCallbacks[] = $callback; + } + public function shutdown($callback = null) + { + if (is_null($callback)) { + $this->fireAppCallbacks($this->shutdownCallbacks); + } else { + $this->shutdownCallbacks[] = $callback; + } + } + public function useArraySessions(Closure $callback) + { + $this->bind('session.reject', function () use($callback) { + return $callback; + }); + } + public function isBooted() + { + return $this->booted; + } + public function boot() + { + if ($this->booted) { + return; + } + array_walk($this->serviceProviders, function ($p) { + $p->boot(); + }); + $this->bootApplication(); + } + protected function bootApplication() + { + $this->fireAppCallbacks($this->bootingCallbacks); + $this->booted = true; + $this->fireAppCallbacks($this->bootedCallbacks); + } + public function booting($callback) + { + $this->bootingCallbacks[] = $callback; + } + public function booted($callback) + { + $this->bootedCallbacks[] = $callback; + if ($this->isBooted()) { + $this->fireAppCallbacks(array($callback)); + } + } + public function run(SymfonyRequest $request = null) + { + $request = $request ?: $this['request']; + $response = with($stack = $this->getStackedClient())->handle($request); + $response->send(); + $stack->terminate($request, $response); + } + protected function getStackedClient() + { + $sessionReject = $this->bound('session.reject') ? $this['session.reject'] : null; + $client = with(new \Stack\Builder())->push('Illuminate\\Cookie\\Guard', $this['encrypter'])->push('Illuminate\\Cookie\\Queue', $this['cookie'])->push('Illuminate\\Session\\Middleware', $this['session'], $sessionReject); + $this->mergeCustomMiddlewares($client); + return $client->resolve($this); + } + protected function mergeCustomMiddlewares(\Stack\Builder $stack) + { + foreach ($this->middlewares as $middleware) { + list($class, $parameters) = array_values($middleware); + array_unshift($parameters, $class); + call_user_func_array(array($stack, 'push'), $parameters); + } + } + protected function registerBaseMiddlewares() + { + + } + public function middleware($class, array $parameters = array()) + { + $this->middlewares[] = compact('class', 'parameters'); + return $this; + } + public function forgetMiddleware($class) + { + $this->middlewares = array_filter($this->middlewares, function ($m) use($class) { + return $m['class'] != $class; + }); + } + public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + try { + $this->refreshRequest($request = Request::createFromBase($request)); + $this->boot(); + return $this->dispatch($request); + } catch (\Exception $e) { + if ($this->runningUnitTests()) { + throw $e; + } + return $this['exception']->handleException($e); + } + } + public function dispatch(Request $request) + { + if ($this->isDownForMaintenance()) { + $response = $this['events']->until('illuminate.app.down'); + if (!is_null($response)) { + return $this->prepareResponse($response, $request); + } + } + if ($this->runningUnitTests() && !$this['session']->isStarted()) { + $this['session']->start(); + } + return $this['router']->dispatch($this->prepareRequest($request)); + } + public function terminate(SymfonyRequest $request, SymfonyResponse $response) + { + $this->callFinishCallbacks($request, $response); + $this->shutdown(); + } + protected function refreshRequest(Request $request) + { + $this->instance('request', $request); + Facade::clearResolvedInstance('request'); + } + public function callFinishCallbacks(SymfonyRequest $request, SymfonyResponse $response) + { + foreach ($this->finishCallbacks as $callback) { + call_user_func($callback, $request, $response); + } + } + protected function fireAppCallbacks(array $callbacks) + { + foreach ($callbacks as $callback) { + call_user_func($callback, $this); + } + } + public function prepareRequest(Request $request) + { + if (!is_null($this['config']['session.driver']) && !$request->hasSession()) { + $request->setSession($this['session']->driver()); + } + return $request; + } + public function prepareResponse($value) + { + if (!$value instanceof SymfonyResponse) { + $value = new Response($value); + } + return $value->prepare($this['request']); + } + public function readyForResponses() + { + return $this->booted; + } + public function isDownForMaintenance() + { + return file_exists($this['config']['app.manifest'] . '/down'); + } + public function down(Closure $callback) + { + $this['events']->listen('illuminate.app.down', $callback); + } + public function abort($code, $message = '', array $headers = array()) + { + if ($code == 404) { + throw new NotFoundHttpException($message); + } else { + throw new HttpException($code, $message, null, $headers); + } + } + public function missing(Closure $callback) + { + $this->error(function (NotFoundHttpException $e) use($callback) { + return call_user_func($callback, $e); + }); + } + public function error(Closure $callback) + { + $this['exception']->error($callback); + } + public function pushError(Closure $callback) + { + $this['exception']->pushError($callback); + } + public function fatal(Closure $callback) + { + $this->error(function (FatalErrorException $e) use($callback) { + return call_user_func($callback, $e); + }); + } + public function getConfigLoader() + { + return new FileLoader(new Filesystem(), $this['path'] . '/config'); + } + public function getEnvironmentVariablesLoader() + { + return new FileEnvironmentVariablesLoader(new Filesystem(), $this['path.base']); + } + public function getProviderRepository() + { + $manifest = $this['config']['app.manifest']; + return new ProviderRepository(new Filesystem(), $manifest); + } + public function getLoadedProviders() + { + return $this->loadedProviders; + } + public function setDeferredServices(array $services) + { + $this->deferredServices = $services; + } + public function isDeferredService($service) + { + return isset($this->deferredServices[$service]); + } + public static function requestClass($class = null) + { + if (!is_null($class)) { + static::$requestClass = $class; + } + return static::$requestClass; + } + public function setRequestForConsoleEnvironment() + { + $url = $this['config']->get('app.url', 'http://localhost'); + $parameters = array($url, 'GET', array(), array(), array(), $_SERVER); + $this->refreshRequest(static::onRequest('create', $parameters)); + } + public static function onRequest($method, $parameters = array()) + { + return forward_static_call_array(array(static::requestClass(), $method), $parameters); + } + public function getLocale() + { + return $this['config']->get('app.locale'); + } + public function setLocale($locale) + { + $this['config']->set('app.locale', $locale); + $this['translator']->setLocale($locale); + $this['events']->fire('locale.changed', array($locale)); + } + public function registerCoreContainerAliases() + { + $aliases = array('app' => 'Illuminate\\Foundation\\Application', 'artisan' => 'Illuminate\\Console\\Application', 'auth' => 'Illuminate\\Auth\\AuthManager', 'auth.reminder.repository' => 'Illuminate\\Auth\\Reminders\\ReminderRepositoryInterface', 'blade.compiler' => 'Illuminate\\View\\Compilers\\BladeCompiler', 'cache' => 'Illuminate\\Cache\\CacheManager', 'cache.store' => 'Illuminate\\Cache\\Repository', 'config' => 'Illuminate\\Config\\Repository', 'cookie' => 'Illuminate\\Cookie\\CookieJar', 'encrypter' => 'Illuminate\\Encryption\\Encrypter', 'db' => 'Illuminate\\Database\\DatabaseManager', 'events' => 'Illuminate\\Events\\Dispatcher', 'files' => 'Illuminate\\Filesystem\\Filesystem', 'form' => 'Illuminate\\Html\\FormBuilder', 'hash' => 'Illuminate\\Hashing\\HasherInterface', 'html' => 'Illuminate\\Html\\HtmlBuilder', 'translator' => 'Illuminate\\Translation\\Translator', 'log' => 'Illuminate\\Log\\Writer', 'mailer' => 'Illuminate\\Mail\\Mailer', 'paginator' => 'Illuminate\\Pagination\\Factory', 'auth.reminder' => 'Illuminate\\Auth\\Reminders\\PasswordBroker', 'queue' => 'Illuminate\\Queue\\QueueManager', 'redirect' => 'Illuminate\\Routing\\Redirector', 'redis' => 'Illuminate\\Redis\\Database', 'request' => 'Illuminate\\Http\\Request', 'router' => 'Illuminate\\Routing\\Router', 'session' => 'Illuminate\\Session\\SessionManager', 'session.store' => 'Illuminate\\Session\\Store', 'remote' => 'Illuminate\\Remote\\RemoteManager', 'url' => 'Illuminate\\Routing\\UrlGenerator', 'validator' => 'Illuminate\\Validation\\Factory', 'view' => 'Illuminate\\View\\Factory'); + foreach ($aliases as $key => $alias) { + $this->alias($key, $alias); + } + } + public function __get($key) + { + return $this[$key]; + } + public function __set($key, $value) + { + $this[$key] = $value; + } +} +namespace Illuminate\Foundation; + +use Closure; +class EnvironmentDetector +{ + public function detect($environments, $consoleArgs = null) + { + if ($consoleArgs) { + return $this->detectConsoleEnvironment($environments, $consoleArgs); + } else { + return $this->detectWebEnvironment($environments); + } + } + protected function detectWebEnvironment($environments) + { + if ($environments instanceof Closure) { + return call_user_func($environments); + } + foreach ($environments as $environment => $hosts) { + foreach ((array) $hosts as $host) { + if ($this->isMachine($host)) { + return $environment; + } + } + } + return 'production'; + } + protected function detectConsoleEnvironment($environments, array $args) + { + if (!is_null($value = $this->getEnvironmentArgument($args))) { + return head(array_slice(explode('=', $value), 1)); + } else { + return $this->detectWebEnvironment($environments); + } + } + protected function getEnvironmentArgument(array $args) + { + return array_first($args, function ($k, $v) { + return starts_with($v, '--env'); + }); + } + public function isMachine($name) + { + return str_is($name, gethostname()); + } +} +namespace Illuminate\Http; + +use Symfony\Component\HttpFoundation\ParameterBag; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +class Request extends SymfonyRequest +{ + protected $json; + protected $sessionStore; + public function instance() + { + return $this; + } + public function method() + { + return $this->getMethod(); + } + public function root() + { + return rtrim($this->getSchemeAndHttpHost() . $this->getBaseUrl(), '/'); + } + public function url() + { + return rtrim(preg_replace('/\\?.*/', '', $this->getUri()), '/'); + } + public function fullUrl() + { + $query = $this->getQueryString(); + return $query ? $this->url() . '?' . $query : $this->url(); + } + public function path() + { + $pattern = trim($this->getPathInfo(), '/'); + return $pattern == '' ? '/' : $pattern; + } + public function decodedPath() + { + return rawurldecode($this->path()); + } + public function segment($index, $default = null) + { + return array_get($this->segments(), $index - 1, $default); + } + public function segments() + { + $segments = explode('/', $this->path()); + return array_values(array_filter($segments, function ($v) { + return $v != ''; + })); + } + public function is() + { + foreach (func_get_args() as $pattern) { + if (str_is($pattern, urldecode($this->path()))) { + return true; + } + } + return false; + } + public function ajax() + { + return $this->isXmlHttpRequest(); + } + public function secure() + { + return $this->isSecure(); + } + public function exists($key) + { + $keys = is_array($key) ? $key : func_get_args(); + $input = $this->all(); + foreach ($keys as $value) { + if (!array_key_exists($value, $input)) { + return false; + } + } + return true; + } + public function has($key) + { + $keys = is_array($key) ? $key : func_get_args(); + foreach ($keys as $value) { + if ($this->isEmptyString($value)) { + return false; + } + } + return true; + } + protected function isEmptyString($key) + { + $boolOrArray = is_bool($this->input($key)) || is_array($this->input($key)); + return !$boolOrArray && trim((string) $this->input($key)) === ''; + } + public function all() + { + return array_merge_recursive($this->input(), $this->files->all()); + } + public function input($key = null, $default = null) + { + $input = $this->getInputSource()->all() + $this->query->all(); + return array_get($input, $key, $default); + } + public function only($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + return array_only($this->input(), $keys) + array_fill_keys($keys, null); + } + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + $results = $this->input(); + foreach ($keys as $key) { + array_forget($results, $key); + } + return $results; + } + public function query($key = null, $default = null) + { + return $this->retrieveItem('query', $key, $default); + } + public function hasCookie($key) + { + return !is_null($this->cookie($key)); + } + public function cookie($key = null, $default = null) + { + return $this->retrieveItem('cookies', $key, $default); + } + public function file($key = null, $default = null) + { + return array_get($this->files->all(), $key, $default); + } + public function hasFile($key) + { + if (is_array($file = $this->file($key))) { + $file = head($file); + } + return $file instanceof \SplFileInfo && $file->getPath() != ''; + } + public function header($key = null, $default = null) + { + return $this->retrieveItem('headers', $key, $default); + } + public function server($key = null, $default = null) + { + return $this->retrieveItem('server', $key, $default); + } + public function old($key = null, $default = null) + { + return $this->session()->getOldInput($key, $default); + } + public function flash($filter = null, $keys = array()) + { + $flash = !is_null($filter) ? $this->{$filter}($keys) : $this->input(); + $this->session()->flashInput($flash); + } + public function flashOnly($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + return $this->flash('only', $keys); + } + public function flashExcept($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + return $this->flash('except', $keys); + } + public function flush() + { + $this->session()->flashInput(array()); + } + protected function retrieveItem($source, $key, $default) + { + if (is_null($key)) { + return $this->{$source}->all(); + } else { + return $this->{$source}->get($key, $default, true); + } + } + public function merge(array $input) + { + $this->getInputSource()->add($input); + } + public function replace(array $input) + { + $this->getInputSource()->replace($input); + } + public function json($key = null, $default = null) + { + if (!isset($this->json)) { + $this->json = new ParameterBag((array) json_decode($this->getContent(), true)); + } + if (is_null($key)) { + return $this->json; + } + return array_get($this->json->all(), $key, $default); + } + protected function getInputSource() + { + if ($this->isJson()) { + return $this->json(); + } + return $this->getMethod() == 'GET' ? $this->query : $this->request; + } + public function isJson() + { + return str_contains($this->header('CONTENT_TYPE'), '/json'); + } + public function wantsJson() + { + $acceptable = $this->getAcceptableContentTypes(); + return isset($acceptable[0]) && $acceptable[0] == 'application/json'; + } + public function format($default = 'html') + { + foreach ($this->getAcceptableContentTypes() as $type) { + if ($format = $this->getFormat($type)) { + return $format; + } + } + return $default; + } + public static function createFromBase(SymfonyRequest $request) + { + if ($request instanceof static) { + return $request; + } + return with(new static())->duplicate($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all()); + } + public function session() + { + if (!$this->hasSession()) { + throw new \RuntimeException('Session store not set on request.'); + } + return $this->getSession(); + } +} +namespace Illuminate\Http; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +class FrameGuard implements HttpKernelInterface +{ + protected $app; + public function __construct(HttpKernelInterface $app) + { + $this->app = $app; + } + public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $response = $this->app->handle($request, $type, $catch); + $response->headers->set('X-Frame-Options', 'SAMEORIGIN', false); + return $response; + } +} +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\Session\SessionInterface; +class Request +{ + const HEADER_CLIENT_IP = 'client_ip'; + const HEADER_CLIENT_HOST = 'client_host'; + const HEADER_CLIENT_PROTO = 'client_proto'; + const HEADER_CLIENT_PORT = 'client_port'; + protected static $trustedProxies = array(); + protected static $trustedHostPatterns = array(); + protected static $trustedHosts = array(); + protected static $trustedHeaders = array(self::HEADER_CLIENT_IP => 'X_FORWARDED_FOR', self::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST', self::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO', self::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT'); + protected static $httpMethodParameterOverride = false; + public $attributes; + public $request; + public $query; + public $server; + public $files; + public $cookies; + public $headers; + protected $content; + protected $languages; + protected $charsets; + protected $encodings; + protected $acceptableContentTypes; + protected $pathInfo; + protected $requestUri; + protected $baseUrl; + protected $basePath; + protected $method; + protected $format; + protected $session; + protected $locale; + protected $defaultLocale = 'en'; + protected static $formats; + protected static $requestFactory; + public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); + } + public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + $this->request = new ParameterBag($request); + $this->query = new ParameterBag($query); + $this->attributes = new ParameterBag($attributes); + $this->cookies = new ParameterBag($cookies); + $this->files = new FileBag($files); + $this->server = new ServerBag($server); + $this->headers = new HeaderBag($this->server->getHeaders()); + $this->content = $content; + $this->languages = null; + $this->charsets = null; + $this->encodings = null; + $this->acceptableContentTypes = null; + $this->pathInfo = null; + $this->requestUri = null; + $this->baseUrl = null; + $this->basePath = null; + $this->method = null; + $this->format = null; + } + public static function createFromGlobals() + { + $request = self::createRequestFromFactory($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER); + if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))) { + parse_str($request->getContent(), $data); + $request->request = new ParameterBag($data); + } + return $request; + } + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null) + { + $server = array_replace(array('SERVER_NAME' => 'localhost', 'SERVER_PORT' => 80, 'HTTP_HOST' => 'localhost', 'HTTP_USER_AGENT' => 'Symfony/2.X', 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'REMOTE_ADDR' => '127.0.0.1', 'SCRIPT_NAME' => '', 'SCRIPT_FILENAME' => '', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_TIME' => time()), $server); + $server['PATH_INFO'] = ''; + $server['REQUEST_METHOD'] = strtoupper($method); + $components = parse_url($uri); + if (isset($components['host'])) { + $server['SERVER_NAME'] = $components['host']; + $server['HTTP_HOST'] = $components['host']; + } + if (isset($components['scheme'])) { + if ('https' === $components['scheme']) { + $server['HTTPS'] = 'on'; + $server['SERVER_PORT'] = 443; + } else { + unset($server['HTTPS']); + $server['SERVER_PORT'] = 80; + } + } + if (isset($components['port'])) { + $server['SERVER_PORT'] = $components['port']; + $server['HTTP_HOST'] = $server['HTTP_HOST'] . ':' . $components['port']; + } + if (isset($components['user'])) { + $server['PHP_AUTH_USER'] = $components['user']; + } + if (isset($components['pass'])) { + $server['PHP_AUTH_PW'] = $components['pass']; + } + if (!isset($components['path'])) { + $components['path'] = '/'; + } + switch (strtoupper($method)) { + case 'POST': + case 'PUT': + case 'DELETE': + if (!isset($server['CONTENT_TYPE'])) { + $server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + } + case 'PATCH': + $request = $parameters; + $query = array(); + break; + default: + $request = array(); + $query = $parameters; + break; + } + $queryString = ''; + if (isset($components['query'])) { + parse_str(html_entity_decode($components['query']), $qs); + if ($query) { + $query = array_replace($qs, $query); + $queryString = http_build_query($query, '', '&'); + } else { + $query = $qs; + $queryString = $components['query']; + } + } elseif ($query) { + $queryString = http_build_query($query, '', '&'); + } + $server['REQUEST_URI'] = $components['path'] . ('' !== $queryString ? '?' . $queryString : ''); + $server['QUERY_STRING'] = $queryString; + return self::createRequestFromFactory($query, $request, array(), $cookies, $files, $server, $content); + } + public static function setFactory($callable) + { + self::$requestFactory = $callable; + } + public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null) + { + $dup = clone $this; + if ($query !== null) { + $dup->query = new ParameterBag($query); + } + if ($request !== null) { + $dup->request = new ParameterBag($request); + } + if ($attributes !== null) { + $dup->attributes = new ParameterBag($attributes); + } + if ($cookies !== null) { + $dup->cookies = new ParameterBag($cookies); + } + if ($files !== null) { + $dup->files = new FileBag($files); + } + if ($server !== null) { + $dup->server = new ServerBag($server); + $dup->headers = new HeaderBag($dup->server->getHeaders()); + } + $dup->languages = null; + $dup->charsets = null; + $dup->encodings = null; + $dup->acceptableContentTypes = null; + $dup->pathInfo = null; + $dup->requestUri = null; + $dup->baseUrl = null; + $dup->basePath = null; + $dup->method = null; + $dup->format = null; + if (!$dup->get('_format') && $this->get('_format')) { + $dup->attributes->set('_format', $this->get('_format')); + } + if (!$dup->getRequestFormat(null)) { + $dup->setRequestFormat($format = $this->getRequestFormat(null)); + } + return $dup; + } + public function __clone() + { + $this->query = clone $this->query; + $this->request = clone $this->request; + $this->attributes = clone $this->attributes; + $this->cookies = clone $this->cookies; + $this->files = clone $this->files; + $this->server = clone $this->server; + $this->headers = clone $this->headers; + } + public function __toString() + { + return sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL')) . ' +' . $this->headers . ' +' . $this->getContent(); + } + public function overrideGlobals() + { + $_GET = $this->query->all(); + $_POST = $this->request->all(); + $_SERVER = $this->server->all(); + $_COOKIE = $this->cookies->all(); + foreach ($this->headers->all() as $key => $value) { + $key = strtoupper(str_replace('-', '_', $key)); + if (in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { + $_SERVER[$key] = implode(', ', $value); + } else { + $_SERVER['HTTP_' . $key] = implode(', ', $value); + } + } + $request = array('g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE); + $requestOrder = ini_get('request_order') ?: ini_get('variables_order'); + $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; + $_REQUEST = array(); + foreach (str_split($requestOrder) as $order) { + $_REQUEST = array_merge($_REQUEST, $request[$order]); + } + } + public static function setTrustedProxies(array $proxies) + { + self::$trustedProxies = $proxies; + } + public static function getTrustedProxies() + { + return self::$trustedProxies; + } + public static function setTrustedHosts(array $hostPatterns) + { + self::$trustedHostPatterns = array_map(function ($hostPattern) { + return sprintf('{%s}i', str_replace('}', '\\}', $hostPattern)); + }, $hostPatterns); + self::$trustedHosts = array(); + } + public static function getTrustedHosts() + { + return self::$trustedHostPatterns; + } + public static function setTrustedHeaderName($key, $value) + { + if (!array_key_exists($key, self::$trustedHeaders)) { + throw new \InvalidArgumentException(sprintf('Unable to set the trusted header name for key "%s".', $key)); + } + self::$trustedHeaders[$key] = $value; + } + public static function getTrustedHeaderName($key) + { + if (!array_key_exists($key, self::$trustedHeaders)) { + throw new \InvalidArgumentException(sprintf('Unable to get the trusted header name for key "%s".', $key)); + } + return self::$trustedHeaders[$key]; + } + public static function normalizeQueryString($qs) + { + if ('' == $qs) { + return ''; + } + $parts = array(); + $order = array(); + foreach (explode('&', $qs) as $param) { + if ('' === $param || '=' === $param[0]) { + continue; + } + $keyValuePair = explode('=', $param, 2); + $parts[] = isset($keyValuePair[1]) ? rawurlencode(urldecode($keyValuePair[0])) . '=' . rawurlencode(urldecode($keyValuePair[1])) : rawurlencode(urldecode($keyValuePair[0])); + $order[] = urldecode($keyValuePair[0]); + } + array_multisort($order, SORT_ASC, $parts); + return implode('&', $parts); + } + public static function enableHttpMethodParameterOverride() + { + self::$httpMethodParameterOverride = true; + } + public static function getHttpMethodParameterOverride() + { + return self::$httpMethodParameterOverride; + } + public function get($key, $default = null, $deep = false) + { + return $this->query->get($key, $this->attributes->get($key, $this->request->get($key, $default, $deep), $deep), $deep); + } + public function getSession() + { + return $this->session; + } + public function hasPreviousSession() + { + return $this->hasSession() && $this->cookies->has($this->session->getName()); + } + public function hasSession() + { + return null !== $this->session; + } + public function setSession(SessionInterface $session) + { + $this->session = $session; + } + public function getClientIps() + { + $ip = $this->server->get('REMOTE_ADDR'); + if (!self::$trustedProxies) { + return array($ip); + } + if (!self::$trustedHeaders[self::HEADER_CLIENT_IP] || !$this->headers->has(self::$trustedHeaders[self::HEADER_CLIENT_IP])) { + return array($ip); + } + $clientIps = array_map('trim', explode(',', $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_IP]))); + $clientIps[] = $ip; + $ip = $clientIps[0]; + foreach ($clientIps as $key => $clientIp) { + if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { + unset($clientIps[$key]); + } + } + return $clientIps ? array_reverse($clientIps) : array($ip); + } + public function getClientIp() + { + $ipAddresses = $this->getClientIps(); + return $ipAddresses[0]; + } + public function getScriptName() + { + return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', '')); + } + public function getPathInfo() + { + if (null === $this->pathInfo) { + $this->pathInfo = $this->preparePathInfo(); + } + return $this->pathInfo; + } + public function getBasePath() + { + if (null === $this->basePath) { + $this->basePath = $this->prepareBasePath(); + } + return $this->basePath; + } + public function getBaseUrl() + { + if (null === $this->baseUrl) { + $this->baseUrl = $this->prepareBaseUrl(); + } + return $this->baseUrl; + } + public function getScheme() + { + return $this->isSecure() ? 'https' : 'http'; + } + public function getPort() + { + if (self::$trustedProxies) { + if (self::$trustedHeaders[self::HEADER_CLIENT_PORT] && ($port = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PORT]))) { + return $port; + } + if (self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && 'https' === $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO], 'http')) { + return 443; + } + } + if ($host = $this->headers->get('HOST')) { + if (false !== ($pos = strrpos($host, ':'))) { + return intval(substr($host, $pos + 1)); + } + return 'https' === $this->getScheme() ? 443 : 80; + } + return $this->server->get('SERVER_PORT'); + } + public function getUser() + { + return $this->server->get('PHP_AUTH_USER'); + } + public function getPassword() + { + return $this->server->get('PHP_AUTH_PW'); + } + public function getUserInfo() + { + $userinfo = $this->getUser(); + $pass = $this->getPassword(); + if ('' != $pass) { + $userinfo .= ":{$pass}"; + } + return $userinfo; + } + public function getHttpHost() + { + $scheme = $this->getScheme(); + $port = $this->getPort(); + if ('http' == $scheme && $port == 80 || 'https' == $scheme && $port == 443) { + return $this->getHost(); + } + return $this->getHost() . ':' . $port; + } + public function getRequestUri() + { + if (null === $this->requestUri) { + $this->requestUri = $this->prepareRequestUri(); + } + return $this->requestUri; + } + public function getSchemeAndHttpHost() + { + return $this->getScheme() . '://' . $this->getHttpHost(); + } + public function getUri() + { + if (null !== ($qs = $this->getQueryString())) { + $qs = '?' . $qs; + } + return $this->getSchemeAndHttpHost() . $this->getBaseUrl() . $this->getPathInfo() . $qs; + } + public function getUriForPath($path) + { + return $this->getSchemeAndHttpHost() . $this->getBaseUrl() . $path; + } + public function getQueryString() + { + $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); + return '' === $qs ? null : $qs; + } + public function isSecure() + { + if (self::$trustedProxies && self::$trustedHeaders[self::HEADER_CLIENT_PROTO] && ($proto = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_PROTO]))) { + return in_array(strtolower(current(explode(',', $proto))), array('https', 'on', 'ssl', '1')); + } + return 'on' == strtolower($this->server->get('HTTPS')) || 1 == $this->server->get('HTTPS'); + } + public function getHost() + { + if (self::$trustedProxies && self::$trustedHeaders[self::HEADER_CLIENT_HOST] && ($host = $this->headers->get(self::$trustedHeaders[self::HEADER_CLIENT_HOST]))) { + $elements = explode(',', $host); + $host = $elements[count($elements) - 1]; + } elseif (!($host = $this->headers->get('HOST'))) { + if (!($host = $this->server->get('SERVER_NAME'))) { + $host = $this->server->get('SERVER_ADDR', ''); + } + } + $host = strtolower(preg_replace('/:\\d+$/', '', trim($host))); + if ($host && !preg_match('/^\\[?(?:[a-zA-Z0-9-:\\]_]+\\.?)+$/', $host)) { + throw new \UnexpectedValueException(sprintf('Invalid Host "%s"', $host)); + } + if (count(self::$trustedHostPatterns) > 0) { + if (in_array($host, self::$trustedHosts)) { + return $host; + } + foreach (self::$trustedHostPatterns as $pattern) { + if (preg_match($pattern, $host)) { + self::$trustedHosts[] = $host; + return $host; + } + } + throw new \UnexpectedValueException(sprintf('Untrusted Host "%s"', $host)); + } + return $host; + } + public function setMethod($method) + { + $this->method = null; + $this->server->set('REQUEST_METHOD', $method); + } + public function getMethod() + { + if (null === $this->method) { + $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + if ('POST' === $this->method) { + if ($method = $this->headers->get('X-HTTP-METHOD-OVERRIDE')) { + $this->method = strtoupper($method); + } elseif (self::$httpMethodParameterOverride) { + $this->method = strtoupper($this->request->get('_method', $this->query->get('_method', 'POST'))); + } + } + } + return $this->method; + } + public function getRealMethod() + { + return strtoupper($this->server->get('REQUEST_METHOD', 'GET')); + } + public function getMimeType($format) + { + if (null === static::$formats) { + static::initializeFormats(); + } + return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; + } + public function getFormat($mimeType) + { + if (false !== ($pos = strpos($mimeType, ';'))) { + $mimeType = substr($mimeType, 0, $pos); + } + if (null === static::$formats) { + static::initializeFormats(); + } + foreach (static::$formats as $format => $mimeTypes) { + if (in_array($mimeType, (array) $mimeTypes)) { + return $format; + } + } + } + public function setFormat($format, $mimeTypes) + { + if (null === static::$formats) { + static::initializeFormats(); + } + static::$formats[$format] = is_array($mimeTypes) ? $mimeTypes : array($mimeTypes); + } + public function getRequestFormat($default = 'html') + { + if (null === $this->format) { + $this->format = $this->get('_format', $default); + } + return $this->format; + } + public function setRequestFormat($format) + { + $this->format = $format; + } + public function getContentType() + { + return $this->getFormat($this->headers->get('CONTENT_TYPE')); + } + public function setDefaultLocale($locale) + { + $this->defaultLocale = $locale; + if (null === $this->locale) { + $this->setPhpDefaultLocale($locale); + } + } + public function setLocale($locale) + { + $this->setPhpDefaultLocale($this->locale = $locale); + } + public function getLocale() + { + return null === $this->locale ? $this->defaultLocale : $this->locale; + } + public function isMethod($method) + { + return $this->getMethod() === strtoupper($method); + } + public function isMethodSafe() + { + return in_array($this->getMethod(), array('GET', 'HEAD')); + } + public function getContent($asResource = false) + { + if (false === $this->content || true === $asResource && null !== $this->content) { + throw new \LogicException('getContent() can only be called once when using the resource return type.'); + } + if (true === $asResource) { + $this->content = false; + return fopen('php://input', 'rb'); + } + if (null === $this->content) { + $this->content = file_get_contents('php://input'); + } + return $this->content; + } + public function getETags() + { + return preg_split('/\\s*,\\s*/', $this->headers->get('if_none_match'), null, PREG_SPLIT_NO_EMPTY); + } + public function isNoCache() + { + return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma'); + } + public function getPreferredLanguage(array $locales = null) + { + $preferredLanguages = $this->getLanguages(); + if (empty($locales)) { + return isset($preferredLanguages[0]) ? $preferredLanguages[0] : null; + } + if (!$preferredLanguages) { + return $locales[0]; + } + $extendedPreferredLanguages = array(); + foreach ($preferredLanguages as $language) { + $extendedPreferredLanguages[] = $language; + if (false !== ($position = strpos($language, '_'))) { + $superLanguage = substr($language, 0, $position); + if (!in_array($superLanguage, $preferredLanguages)) { + $extendedPreferredLanguages[] = $superLanguage; + } + } + } + $preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); + return isset($preferredLanguages[0]) ? $preferredLanguages[0] : $locales[0]; + } + public function getLanguages() + { + if (null !== $this->languages) { + return $this->languages; + } + $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); + $this->languages = array(); + foreach (array_keys($languages) as $lang) { + if (strstr($lang, '-')) { + $codes = explode('-', $lang); + if ($codes[0] == 'i') { + if (count($codes) > 1) { + $lang = $codes[1]; + } + } else { + for ($i = 0, $max = count($codes); $i < $max; $i++) { + if ($i == 0) { + $lang = strtolower($codes[0]); + } else { + $lang .= '_' . strtoupper($codes[$i]); + } + } + } + } + $this->languages[] = $lang; + } + return $this->languages; + } + public function getCharsets() + { + if (null !== $this->charsets) { + return $this->charsets; + } + return $this->charsets = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all()); + } + public function getEncodings() + { + if (null !== $this->encodings) { + return $this->encodings; + } + return $this->encodings = array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all()); + } + public function getAcceptableContentTypes() + { + if (null !== $this->acceptableContentTypes) { + return $this->acceptableContentTypes; + } + return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all()); + } + public function isXmlHttpRequest() + { + return 'XMLHttpRequest' == $this->headers->get('X-Requested-With'); + } + protected function prepareRequestUri() + { + $requestUri = ''; + if ($this->headers->has('X_ORIGINAL_URL')) { + $requestUri = $this->headers->get('X_ORIGINAL_URL'); + $this->headers->remove('X_ORIGINAL_URL'); + $this->server->remove('HTTP_X_ORIGINAL_URL'); + $this->server->remove('UNENCODED_URL'); + $this->server->remove('IIS_WasUrlRewritten'); + } elseif ($this->headers->has('X_REWRITE_URL')) { + $requestUri = $this->headers->get('X_REWRITE_URL'); + $this->headers->remove('X_REWRITE_URL'); + } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') { + $requestUri = $this->server->get('UNENCODED_URL'); + $this->server->remove('UNENCODED_URL'); + $this->server->remove('IIS_WasUrlRewritten'); + } elseif ($this->server->has('REQUEST_URI')) { + $requestUri = $this->server->get('REQUEST_URI'); + $schemeAndHttpHost = $this->getSchemeAndHttpHost(); + if (strpos($requestUri, $schemeAndHttpHost) === 0) { + $requestUri = substr($requestUri, strlen($schemeAndHttpHost)); + } + } elseif ($this->server->has('ORIG_PATH_INFO')) { + $requestUri = $this->server->get('ORIG_PATH_INFO'); + if ('' != $this->server->get('QUERY_STRING')) { + $requestUri .= '?' . $this->server->get('QUERY_STRING'); + } + $this->server->remove('ORIG_PATH_INFO'); + } + $this->server->set('REQUEST_URI', $requestUri); + return $requestUri; + } + protected function prepareBaseUrl() + { + $filename = basename($this->server->get('SCRIPT_FILENAME')); + if (basename($this->server->get('SCRIPT_NAME')) === $filename) { + $baseUrl = $this->server->get('SCRIPT_NAME'); + } elseif (basename($this->server->get('PHP_SELF')) === $filename) { + $baseUrl = $this->server->get('PHP_SELF'); + } elseif (basename($this->server->get('ORIG_SCRIPT_NAME')) === $filename) { + $baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); + } else { + $path = $this->server->get('PHP_SELF', ''); + $file = $this->server->get('SCRIPT_FILENAME', ''); + $segs = explode('/', trim($file, '/')); + $segs = array_reverse($segs); + $index = 0; + $last = count($segs); + $baseUrl = ''; + do { + $seg = $segs[$index]; + $baseUrl = '/' . $seg . $baseUrl; + ++$index; + } while ($last > $index && false !== ($pos = strpos($path, $baseUrl)) && 0 != $pos); + } + $requestUri = $this->getRequestUri(); + if ($baseUrl && false !== ($prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl))) { + return $prefix; + } + if ($baseUrl && false !== ($prefix = $this->getUrlencodedPrefix($requestUri, dirname($baseUrl)))) { + return rtrim($prefix, '/'); + } + $truncatedRequestUri = $requestUri; + if (false !== ($pos = strpos($requestUri, '?'))) { + $truncatedRequestUri = substr($requestUri, 0, $pos); + } + $basename = basename($baseUrl); + if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { + return ''; + } + if (strlen($requestUri) >= strlen($baseUrl) && false !== ($pos = strpos($requestUri, $baseUrl)) && $pos !== 0) { + $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); + } + return rtrim($baseUrl, '/'); + } + protected function prepareBasePath() + { + $filename = basename($this->server->get('SCRIPT_FILENAME')); + $baseUrl = $this->getBaseUrl(); + if (empty($baseUrl)) { + return ''; + } + if (basename($baseUrl) === $filename) { + $basePath = dirname($baseUrl); + } else { + $basePath = $baseUrl; + } + if ('\\' === DIRECTORY_SEPARATOR) { + $basePath = str_replace('\\', '/', $basePath); + } + return rtrim($basePath, '/'); + } + protected function preparePathInfo() + { + $baseUrl = $this->getBaseUrl(); + if (null === ($requestUri = $this->getRequestUri())) { + return '/'; + } + $pathInfo = '/'; + if ($pos = strpos($requestUri, '?')) { + $requestUri = substr($requestUri, 0, $pos); + } + if (null !== $baseUrl && false === ($pathInfo = substr($requestUri, strlen($baseUrl)))) { + return '/'; + } elseif (null === $baseUrl) { + return $requestUri; + } + return (string) $pathInfo; + } + protected static function initializeFormats() + { + static::$formats = array('html' => array('text/html', 'application/xhtml+xml'), 'txt' => array('text/plain'), 'js' => array('application/javascript', 'application/x-javascript', 'text/javascript'), 'css' => array('text/css'), 'json' => array('application/json', 'application/x-json'), 'xml' => array('text/xml', 'application/xml', 'application/x-xml'), 'rdf' => array('application/rdf+xml'), 'atom' => array('application/atom+xml'), 'rss' => array('application/rss+xml')); + } + private function setPhpDefaultLocale($locale) + { + try { + if (class_exists('Locale', false)) { + \Locale::setDefault($locale); + } + } catch (\Exception $e) { + + } + } + private function getUrlencodedPrefix($string, $prefix) + { + if (0 !== strpos(rawurldecode($string), $prefix)) { + return false; + } + $len = strlen($prefix); + if (preg_match("#^(%[[:xdigit:]]{2}|.){{$len}}#", $string, $match)) { + return $match[0]; + } + return false; + } + private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) + { + if (self::$requestFactory) { + $request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); + if (!$request instanceof Request) { + throw new \LogicException('The Request factory must return an instance of Symfony\\Component\\HttpFoundation\\Request.'); + } + return $request; + } + return new static($query, $request, $attributes, $cookies, $files, $server, $content); + } +} +namespace Symfony\Component\HttpFoundation; + +class ParameterBag implements \IteratorAggregate, \Countable +{ + protected $parameters; + public function __construct(array $parameters = array()) + { + $this->parameters = $parameters; + } + public function all() + { + return $this->parameters; + } + public function keys() + { + return array_keys($this->parameters); + } + public function replace(array $parameters = array()) + { + $this->parameters = $parameters; + } + public function add(array $parameters = array()) + { + $this->parameters = array_replace($this->parameters, $parameters); + } + public function get($path, $default = null, $deep = false) + { + if (!$deep || false === ($pos = strpos($path, '['))) { + return array_key_exists($path, $this->parameters) ? $this->parameters[$path] : $default; + } + $root = substr($path, 0, $pos); + if (!array_key_exists($root, $this->parameters)) { + return $default; + } + $value = $this->parameters[$root]; + $currentKey = null; + for ($i = $pos, $c = strlen($path); $i < $c; $i++) { + $char = $path[$i]; + if ('[' === $char) { + if (null !== $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "[" at position %d.', $i)); + } + $currentKey = ''; + } elseif (']' === $char) { + if (null === $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "]" at position %d.', $i)); + } + if (!is_array($value) || !array_key_exists($currentKey, $value)) { + return $default; + } + $value = $value[$currentKey]; + $currentKey = null; + } else { + if (null === $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Unexpected "%s" at position %d.', $char, $i)); + } + $currentKey .= $char; + } + } + if (null !== $currentKey) { + throw new \InvalidArgumentException(sprintf('Malformed path. Path must end with "]".')); + } + return $value; + } + public function set($key, $value) + { + $this->parameters[$key] = $value; + } + public function has($key) + { + return array_key_exists($key, $this->parameters); + } + public function remove($key) + { + unset($this->parameters[$key]); + } + public function getAlpha($key, $default = '', $deep = false) + { + return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default, $deep)); + } + public function getAlnum($key, $default = '', $deep = false) + { + return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default, $deep)); + } + public function getDigits($key, $default = '', $deep = false) + { + return str_replace(array('-', '+'), '', $this->filter($key, $default, $deep, FILTER_SANITIZE_NUMBER_INT)); + } + public function getInt($key, $default = 0, $deep = false) + { + return (int) $this->get($key, $default, $deep); + } + public function filter($key, $default = null, $deep = false, $filter = FILTER_DEFAULT, $options = array()) + { + $value = $this->get($key, $default, $deep); + if (!is_array($options) && $options) { + $options = array('flags' => $options); + } + if (is_array($value) && !isset($options['flags'])) { + $options['flags'] = FILTER_REQUIRE_ARRAY; + } + return filter_var($value, $filter, $options); + } + public function getIterator() + { + return new \ArrayIterator($this->parameters); + } + public function count() + { + return count($this->parameters); + } +} +namespace Symfony\Component\HttpFoundation; + +use Symfony\Component\HttpFoundation\File\UploadedFile; +class FileBag extends ParameterBag +{ + private static $fileKeys = array('error', 'name', 'size', 'tmp_name', 'type'); + public function __construct(array $parameters = array()) + { + $this->replace($parameters); + } + public function replace(array $files = array()) + { + $this->parameters = array(); + $this->add($files); + } + public function set($key, $value) + { + if (!is_array($value) && !$value instanceof UploadedFile) { + throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); + } + parent::set($key, $this->convertFileInformation($value)); + } + public function add(array $files = array()) + { + foreach ($files as $key => $file) { + $this->set($key, $file); + } + } + protected function convertFileInformation($file) + { + if ($file instanceof UploadedFile) { + return $file; + } + $file = $this->fixPhpFilesArray($file); + if (is_array($file)) { + $keys = array_keys($file); + sort($keys); + if ($keys == self::$fileKeys) { + if (UPLOAD_ERR_NO_FILE == $file['error']) { + $file = null; + } else { + $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']); + } + } else { + $file = array_map(array($this, 'convertFileInformation'), $file); + } + } + return $file; + } + protected function fixPhpFilesArray($data) + { + if (!is_array($data)) { + return $data; + } + $keys = array_keys($data); + sort($keys); + if (self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) { + return $data; + } + $files = $data; + foreach (self::$fileKeys as $k) { + unset($files[$k]); + } + foreach (array_keys($data['name']) as $key) { + $files[$key] = $this->fixPhpFilesArray(array('error' => $data['error'][$key], 'name' => $data['name'][$key], 'type' => $data['type'][$key], 'tmp_name' => $data['tmp_name'][$key], 'size' => $data['size'][$key])); + } + return $files; + } +} +namespace Symfony\Component\HttpFoundation; + +class ServerBag extends ParameterBag +{ + public function getHeaders() + { + $headers = array(); + $contentHeaders = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true); + foreach ($this->parameters as $key => $value) { + if (0 === strpos($key, 'HTTP_')) { + $headers[substr($key, 5)] = $value; + } elseif (isset($contentHeaders[$key])) { + $headers[$key] = $value; + } + } + if (isset($this->parameters['PHP_AUTH_USER'])) { + $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; + $headers['PHP_AUTH_PW'] = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] : ''; + } else { + $authorizationHeader = null; + if (isset($this->parameters['HTTP_AUTHORIZATION'])) { + $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; + } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { + $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; + } + if (null !== $authorizationHeader) { + if (0 === stripos($authorizationHeader, 'basic')) { + $exploded = explode(':', base64_decode(substr($authorizationHeader, 6))); + if (count($exploded) == 2) { + list($headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']) = $exploded; + } + } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && 0 === stripos($authorizationHeader, 'digest')) { + $headers['PHP_AUTH_DIGEST'] = $authorizationHeader; + $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; + } + } + } + if (isset($headers['PHP_AUTH_USER'])) { + $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']); + } elseif (isset($headers['PHP_AUTH_DIGEST'])) { + $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; + } + return $headers; + } +} +namespace Symfony\Component\HttpFoundation; + +class HeaderBag implements \IteratorAggregate, \Countable +{ + protected $headers = array(); + protected $cacheControl = array(); + public function __construct(array $headers = array()) + { + foreach ($headers as $key => $values) { + $this->set($key, $values); + } + } + public function __toString() + { + if (!$this->headers) { + return ''; + } + $max = max(array_map('strlen', array_keys($this->headers))) + 1; + $content = ''; + ksort($this->headers); + foreach ($this->headers as $name => $values) { + $name = implode('-', array_map('ucfirst', explode('-', $name))); + foreach ($values as $value) { + $content .= sprintf("%-{$max}s %s\r\n", $name . ':', $value); + } + } + return $content; + } + public function all() + { + return $this->headers; + } + public function keys() + { + return array_keys($this->headers); + } + public function replace(array $headers = array()) + { + $this->headers = array(); + $this->add($headers); + } + public function add(array $headers) + { + foreach ($headers as $key => $values) { + $this->set($key, $values); + } + } + public function get($key, $default = null, $first = true) + { + $key = strtr(strtolower($key), '_', '-'); + if (!array_key_exists($key, $this->headers)) { + if (null === $default) { + return $first ? null : array(); + } + return $first ? $default : array($default); + } + if ($first) { + return count($this->headers[$key]) ? $this->headers[$key][0] : $default; + } + return $this->headers[$key]; + } + public function set($key, $values, $replace = true) + { + $key = strtr(strtolower($key), '_', '-'); + $values = array_values((array) $values); + if (true === $replace || !isset($this->headers[$key])) { + $this->headers[$key] = $values; + } else { + $this->headers[$key] = array_merge($this->headers[$key], $values); + } + if ('cache-control' === $key) { + $this->cacheControl = $this->parseCacheControl($values[0]); + } + } + public function has($key) + { + return array_key_exists(strtr(strtolower($key), '_', '-'), $this->headers); + } + public function contains($key, $value) + { + return in_array($value, $this->get($key, null, false)); + } + public function remove($key) + { + $key = strtr(strtolower($key), '_', '-'); + unset($this->headers[$key]); + if ('cache-control' === $key) { + $this->cacheControl = array(); + } + } + public function getDate($key, \DateTime $default = null) + { + if (null === ($value = $this->get($key))) { + return $default; + } + if (false === ($date = \DateTime::createFromFormat(DATE_RFC2822, $value))) { + throw new \RuntimeException(sprintf('The %s HTTP header is not parseable (%s).', $key, $value)); + } + return $date; + } + public function addCacheControlDirective($key, $value = true) + { + $this->cacheControl[$key] = $value; + $this->set('Cache-Control', $this->getCacheControlHeader()); + } + public function hasCacheControlDirective($key) + { + return array_key_exists($key, $this->cacheControl); + } + public function getCacheControlDirective($key) + { + return array_key_exists($key, $this->cacheControl) ? $this->cacheControl[$key] : null; + } + public function removeCacheControlDirective($key) + { + unset($this->cacheControl[$key]); + $this->set('Cache-Control', $this->getCacheControlHeader()); + } + public function getIterator() + { + return new \ArrayIterator($this->headers); + } + public function count() + { + return count($this->headers); + } + protected function getCacheControlHeader() + { + $parts = array(); + ksort($this->cacheControl); + foreach ($this->cacheControl as $key => $value) { + if (true === $value) { + $parts[] = $key; + } else { + if (preg_match('#[^a-zA-Z0-9._-]#', $value)) { + $value = '"' . $value . '"'; + } + $parts[] = "{$key}={$value}"; + } + } + return implode(', ', $parts); + } + protected function parseCacheControl($header) + { + $cacheControl = array(); + preg_match_all('#([a-zA-Z][a-zA-Z_-]*)\\s*(?:=(?:"([^"]*)"|([^ \\t",;]*)))?#', $header, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $cacheControl[strtolower($match[1])] = isset($match[3]) ? $match[3] : (isset($match[2]) ? $match[2] : true); + } + return $cacheControl; + } +} +namespace Symfony\Component\HttpFoundation\Session; + +use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; +interface SessionInterface +{ + public function start(); + public function getId(); + public function setId($id); + public function getName(); + public function setName($name); + public function invalidate($lifetime = null); + public function migrate($destroy = false, $lifetime = null); + public function save(); + public function has($name); + public function get($name, $default = null); + public function set($name, $value); + public function all(); + public function replace(array $attributes); + public function remove($name); + public function clear(); + public function isStarted(); + public function registerBag(SessionBagInterface $bag); + public function getBag($name); + public function getMetadataBag(); +} +namespace Symfony\Component\HttpFoundation\Session; + +interface SessionBagInterface +{ + public function getName(); + public function initialize(array &$array); + public function getStorageKey(); + public function clear(); +} +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +interface AttributeBagInterface extends SessionBagInterface +{ + public function has($name); + public function get($name, $default = null); + public function set($name, $value); + public function all(); + public function replace(array $attributes); + public function remove($name); +} +namespace Symfony\Component\HttpFoundation\Session\Attribute; + +class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable +{ + private $name = 'attributes'; + private $storageKey; + protected $attributes = array(); + public function __construct($storageKey = '_sf2_attributes') + { + $this->storageKey = $storageKey; + } + public function getName() + { + return $this->name; + } + public function setName($name) + { + $this->name = $name; + } + public function initialize(array &$attributes) + { + $this->attributes =& $attributes; + } + public function getStorageKey() + { + return $this->storageKey; + } + public function has($name) + { + return array_key_exists($name, $this->attributes); + } + public function get($name, $default = null) + { + return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; + } + public function set($name, $value) + { + $this->attributes[$name] = $value; + } + public function all() + { + return $this->attributes; + } + public function replace(array $attributes) + { + $this->attributes = array(); + foreach ($attributes as $key => $value) { + $this->set($key, $value); + } + } + public function remove($name) + { + $retval = null; + if (array_key_exists($name, $this->attributes)) { + $retval = $this->attributes[$name]; + unset($this->attributes[$name]); + } + return $retval; + } + public function clear() + { + $return = $this->attributes; + $this->attributes = array(); + return $return; + } + public function getIterator() + { + return new \ArrayIterator($this->attributes); + } + public function count() + { + return count($this->attributes); + } +} +namespace Symfony\Component\HttpFoundation\Session\Storage; + +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +class MetadataBag implements SessionBagInterface +{ + const CREATED = 'c'; + const UPDATED = 'u'; + const LIFETIME = 'l'; + private $name = '__metadata'; + private $storageKey; + protected $meta = array(self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0); + private $lastUsed; + private $updateThreshold; + public function __construct($storageKey = '_sf2_meta', $updateThreshold = 0) + { + $this->storageKey = $storageKey; + $this->updateThreshold = $updateThreshold; + } + public function initialize(array &$array) + { + $this->meta =& $array; + if (isset($array[self::CREATED])) { + $this->lastUsed = $this->meta[self::UPDATED]; + $timeStamp = time(); + if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) { + $this->meta[self::UPDATED] = $timeStamp; + } + } else { + $this->stampCreated(); + } + } + public function getLifetime() + { + return $this->meta[self::LIFETIME]; + } + public function stampNew($lifetime = null) + { + $this->stampCreated($lifetime); + } + public function getStorageKey() + { + return $this->storageKey; + } + public function getCreated() + { + return $this->meta[self::CREATED]; + } + public function getLastUsed() + { + return $this->lastUsed; + } + public function clear() + { + + } + public function getName() + { + return $this->name; + } + public function setName($name) + { + $this->name = $name; + } + private function stampCreated($lifetime = null) + { + $timeStamp = time(); + $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; + $this->meta[self::LIFETIME] = null === $lifetime ? ini_get('session.cookie_lifetime') : $lifetime; + } +} +namespace Symfony\Component\HttpFoundation; + +class AcceptHeaderItem +{ + private $value; + private $quality = 1.0; + private $index = 0; + private $attributes = array(); + public function __construct($value, array $attributes = array()) + { + $this->value = $value; + foreach ($attributes as $name => $value) { + $this->setAttribute($name, $value); + } + } + public static function fromString($itemValue) + { + $bits = preg_split('/\\s*(?:;*("[^"]+");*|;*(\'[^\']+\');*|;+)\\s*/', $itemValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); + $value = array_shift($bits); + $attributes = array(); + $lastNullAttribute = null; + foreach ($bits as $bit) { + if (($start = substr($bit, 0, 1)) === ($end = substr($bit, -1)) && ($start === '"' || $start === '\'')) { + $attributes[$lastNullAttribute] = substr($bit, 1, -1); + } elseif ('=' === $end) { + $lastNullAttribute = $bit = substr($bit, 0, -1); + $attributes[$bit] = null; + } else { + $parts = explode('=', $bit); + $attributes[$parts[0]] = isset($parts[1]) && strlen($parts[1]) > 0 ? $parts[1] : ''; + } + } + return new self(($start = substr($value, 0, 1)) === ($end = substr($value, -1)) && ($start === '"' || $start === '\'') ? substr($value, 1, -1) : $value, $attributes); + } + public function __toString() + { + $string = $this->value . ($this->quality < 1 ? ';q=' . $this->quality : ''); + if (count($this->attributes) > 0) { + $string .= ';' . implode(';', array_map(function ($name, $value) { + return sprintf(preg_match('/[,;=]/', $value) ? '%s="%s"' : '%s=%s', $name, $value); + }, array_keys($this->attributes), $this->attributes)); + } + return $string; + } + public function setValue($value) + { + $this->value = $value; + return $this; + } + public function getValue() + { + return $this->value; + } + public function setQuality($quality) + { + $this->quality = $quality; + return $this; + } + public function getQuality() + { + return $this->quality; + } + public function setIndex($index) + { + $this->index = $index; + return $this; + } + public function getIndex() + { + return $this->index; + } + public function hasAttribute($name) + { + return isset($this->attributes[$name]); + } + public function getAttribute($name, $default = null) + { + return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + } + public function getAttributes() + { + return $this->attributes; + } + public function setAttribute($name, $value) + { + if ('q' === $name) { + $this->quality = (double) $value; + } else { + $this->attributes[$name] = (string) $value; + } + return $this; + } +} +namespace Symfony\Component\HttpFoundation; + +class AcceptHeader +{ + private $items = array(); + private $sorted = true; + public function __construct(array $items) + { + foreach ($items as $item) { + $this->add($item); + } + } + public static function fromString($headerValue) + { + $index = 0; + return new self(array_map(function ($itemValue) use(&$index) { + $item = AcceptHeaderItem::fromString($itemValue); + $item->setIndex($index++); + return $item; + }, preg_split('/\\s*(?:,*("[^"]+"),*|,*(\'[^\']+\'),*|,+)\\s*/', $headerValue, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE))); + } + public function __toString() + { + return implode(',', $this->items); + } + public function has($value) + { + return isset($this->items[$value]); + } + public function get($value) + { + return isset($this->items[$value]) ? $this->items[$value] : null; + } + public function add(AcceptHeaderItem $item) + { + $this->items[$item->getValue()] = $item; + $this->sorted = false; + return $this; + } + public function all() + { + $this->sort(); + return $this->items; + } + public function filter($pattern) + { + return new self(array_filter($this->items, function (AcceptHeaderItem $item) use($pattern) { + return preg_match($pattern, $item->getValue()); + })); + } + public function first() + { + $this->sort(); + return !empty($this->items) ? reset($this->items) : null; + } + private function sort() + { + if (!$this->sorted) { + uasort($this->items, function ($a, $b) { + $qA = $a->getQuality(); + $qB = $b->getQuality(); + if ($qA === $qB) { + return $a->getIndex() > $b->getIndex() ? 1 : -1; + } + return $qA > $qB ? -1 : 1; + }); + $this->sorted = true; + } + } +} +namespace Symfony\Component\Debug; + +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +if (!defined('ENT_SUBSTITUTE')) { + define('ENT_SUBSTITUTE', 8); +} +class ExceptionHandler +{ + private $debug; + private $charset; + private $handler; + private $caughtOutput = 0; + public function __construct($debug = true, $charset = 'UTF-8') + { + $this->debug = $debug; + $this->charset = $charset; + } + public static function register($debug = true) + { + $handler = new static($debug); + set_exception_handler(array($handler, 'handle')); + return $handler; + } + public function setHandler($handler) + { + if (isset($handler) && !is_callable($handler)) { + throw new \LogicException('The exception handler must be a valid PHP callable.'); + } + $old = $this->handler; + $this->handler = $handler; + return $old; + } + public function handle(\Exception $exception) + { + if ($exception instanceof OutOfMemoryException) { + $this->sendPhpResponse($exception); + return; + } + $caughtOutput = 0; + $this->caughtOutput = false; + ob_start(array($this, 'catchOutput')); + try { + if (class_exists('Symfony\\Component\\HttpFoundation\\Response')) { + $response = $this->createResponse($exception); + $response->sendHeaders(); + $response->sendContent(); + } else { + $this->sendPhpResponse($exception); + } + } catch (\Exception $e) { + + } + if (false === $this->caughtOutput) { + ob_end_clean(); + } + if (isset($this->caughtOutput[0])) { + ob_start(array($this, 'cleanOutput')); + echo $this->caughtOutput; + $caughtOutput = ob_get_length(); + } + $this->caughtOutput = 0; + if (!empty($this->handler)) { + try { + call_user_func($this->handler, $exception); + if ($caughtOutput) { + $this->caughtOutput = $caughtOutput; + } + } catch (\Exception $e) { + if (!$caughtOutput) { + throw $exception; + } + } + } + } + public function sendPhpResponse($exception) + { + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + if (!headers_sent()) { + header(sprintf('HTTP/1.0 %s', $exception->getStatusCode())); + foreach ($exception->getHeaders() as $name => $value) { + header($name . ': ' . $value, false); + } + } + echo $this->decorate($this->getContent($exception), $this->getStylesheet($exception)); + } + public function createResponse($exception) + { + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + return new Response($this->decorate($this->getContent($exception), $this->getStylesheet($exception)), $exception->getStatusCode(), $exception->getHeaders()); + } + public function getContent(FlattenException $exception) + { + switch ($exception->getStatusCode()) { + case 404: + $title = 'Sorry, the page you are looking for could not be found.'; + break; + default: + $title = 'Whoops, looks like something went wrong.'; + } + $content = ''; + if ($this->debug) { + try { + $count = count($exception->getAllPrevious()); + $total = $count + 1; + foreach ($exception->toArray() as $position => $e) { + $ind = $count - $position + 1; + $class = $this->abbrClass($e['class']); + $message = nl2br($e['message']); + $content .= sprintf('
+

%d/%d %s: %s

+
+
+
    ', $ind, $total, $class, $message); + foreach ($e['trace'] as $trace) { + $content .= '
  1. '; + if ($trace['function']) { + $content .= sprintf('at %s%s%s(%s)', $this->abbrClass($trace['class']), $trace['type'], $trace['function'], $this->formatArgs($trace['args'])); + } + if (isset($trace['file']) && isset($trace['line'])) { + if ($linkFormat = ini_get('xdebug.file_link_format')) { + $link = str_replace(array('%f', '%l'), array($trace['file'], $trace['line']), $linkFormat); + $content .= sprintf(' in %s line %s', $link, $trace['file'], $trace['line']); + } else { + $content .= sprintf(' in %s line %s', $trace['file'], $trace['line']); + } + } + $content .= '
  2. +'; + } + $content .= '
+
+'; + } + } catch (\Exception $e) { + if ($this->debug) { + $title = sprintf('Exception thrown when handling an exception (%s: %s)', get_class($exception), $exception->getMessage()); + } else { + $title = 'Whoops, looks like something went wrong.'; + } + } + } + return "
\n

{$title}

\n {$content}\n
"; + } + public function getStylesheet(FlattenException $exception) + { + return ' .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 } + .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; } + .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; } + .sf-reset .clear_fix { display:inline-block; } + .sf-reset * html .clear_fix { height:1%; } + .sf-reset .clear_fix { display:block; } + .sf-reset, .sf-reset .block { margin: auto } + .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } + .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px } + .sf-reset strong { font-weight:bold; } + .sf-reset a { color:#6c6159; } + .sf-reset a img { border:none; } + .sf-reset a:hover { text-decoration:underline; } + .sf-reset em { font-style:italic; } + .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif } + .sf-reset h2 span { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; } + .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; } + .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px; + -webkit-border-bottom-right-radius: 16px; + -webkit-border-bottom-left-radius: 16px; + -moz-border-radius-bottomright: 16px; + -moz-border-radius-bottomleft: 16px; + border-bottom-right-radius: 16px; + border-bottom-left-radius: 16px; + border-bottom:1px solid #ccc; + border-right:1px solid #ccc; + border-left:1px solid #ccc; + } + .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px; + -webkit-border-top-left-radius: 16px; + -webkit-border-top-right-radius: 16px; + -moz-border-radius-topleft: 16px; + -moz-border-radius-topright: 16px; + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-top:1px solid #ccc; + border-right:1px solid #ccc; + border-left:1px solid #ccc; + overflow: hidden; + word-wrap: break-word; + } + .sf-reset li a { background:none; color:#868686; text-decoration:none; } + .sf-reset li a:hover { background:none; color:#313131; text-decoration:underline; } + .sf-reset ol { padding: 10px 0; } + .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + border: 1px solid #ccc; + }'; + } + private function decorate($content, $css) + { + return "\n\n \n \n \n \n \n \n {$content}\n \n"; + } + private function abbrClass($class) + { + $parts = explode('\\', $class); + return sprintf('%s', $class, array_pop($parts)); + } + private function formatArgs(array $args) + { + $result = array(); + foreach ($args as $key => $item) { + if ('object' === $item[0]) { + $formattedValue = sprintf('object(%s)', $this->abbrClass($item[1])); + } elseif ('array' === $item[0]) { + $formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]); + } elseif ('string' === $item[0]) { + $formattedValue = sprintf('\'%s\'', htmlspecialchars($item[1], ENT_QUOTES | ENT_SUBSTITUTE, $this->charset)); + } elseif ('null' === $item[0]) { + $formattedValue = 'null'; + } elseif ('boolean' === $item[0]) { + $formattedValue = '' . strtolower(var_export($item[1], true)) . ''; + } elseif ('resource' === $item[0]) { + $formattedValue = 'resource'; + } else { + $formattedValue = str_replace(' +', '', var_export(htmlspecialchars((string) $item[1], ENT_QUOTES | ENT_SUBSTITUTE, $this->charset), true)); + } + $result[] = is_int($key) ? $formattedValue : sprintf('\'%s\' => %s', $key, $formattedValue); + } + return implode(', ', $result); + } + public function catchOutput($buffer) + { + $this->caughtOutput = $buffer; + return ''; + } + public function cleanOutput($buffer) + { + if ($this->caughtOutput) { + $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtOutput); + if (isset($cleanBuffer[0])) { + $buffer = $cleanBuffer; + } + } + return $buffer; + } +} +namespace Illuminate\Support; + +use ReflectionClass; +abstract class ServiceProvider +{ + protected $app; + protected $defer = false; + public function __construct($app) + { + $this->app = $app; + } + public function boot() + { + + } + public abstract function register(); + public function package($package, $namespace = null, $path = null) + { + $namespace = $this->getPackageNamespace($package, $namespace); + $path = $path ?: $this->guessPackagePath(); + $config = $path . '/config'; + if ($this->app['files']->isDirectory($config)) { + $this->app['config']->package($package, $config, $namespace); + } + $lang = $path . '/lang'; + if ($this->app['files']->isDirectory($lang)) { + $this->app['translator']->addNamespace($namespace, $lang); + } + $appView = $this->getAppViewPath($package); + if ($this->app['files']->isDirectory($appView)) { + $this->app['view']->addNamespace($namespace, $appView); + } + $view = $path . '/views'; + if ($this->app['files']->isDirectory($view)) { + $this->app['view']->addNamespace($namespace, $view); + } + } + public function guessPackagePath() + { + $path = with(new ReflectionClass($this))->getFileName(); + return realpath(dirname($path) . '/../../'); + } + protected function getPackageNamespace($package, $namespace) + { + if (is_null($namespace)) { + list($vendor, $namespace) = explode('/', $package); + } + return $namespace; + } + public function commands($commands) + { + $commands = is_array($commands) ? $commands : func_get_args(); + $events = $this->app['events']; + $events->listen('artisan.start', function ($artisan) use($commands) { + $artisan->resolveCommands($commands); + }); + } + protected function getAppViewPath($package) + { + return $this->app['path'] . "/views/packages/{$package}"; + } + public function provides() + { + return array(); + } + public function when() + { + return array(); + } + public function isDeferred() + { + return $this->defer; + } +} +namespace Illuminate\Exception; + +use Whoops\Run; +use Whoops\Handler\PrettyPageHandler; +use Whoops\Handler\JsonResponseHandler; +use Illuminate\Support\ServiceProvider; +class ExceptionServiceProvider extends ServiceProvider +{ + public function register() + { + $this->registerDisplayers(); + $this->registerHandler(); + } + protected function registerDisplayers() + { + $this->registerPlainDisplayer(); + $this->registerDebugDisplayer(); + } + protected function registerHandler() + { + $this->app['exception'] = $this->app->share(function ($app) { + return new Handler($app, $app['exception.plain'], $app['exception.debug']); + }); + } + protected function registerPlainDisplayer() + { + $this->app['exception.plain'] = $this->app->share(function ($app) { + if ($app->runningInConsole()) { + return $app['exception.debug']; + } else { + return new PlainDisplayer(); + } + }); + } + protected function registerDebugDisplayer() + { + $this->registerWhoops(); + $this->app['exception.debug'] = $this->app->share(function ($app) { + return new WhoopsDisplayer($app['whoops'], $app->runningInConsole()); + }); + } + protected function registerWhoops() + { + $this->registerWhoopsHandler(); + $this->app['whoops'] = $this->app->share(function ($app) { + with($whoops = new Run())->allowQuit(false); + $whoops->writeToOutput(false); + return $whoops->pushHandler($app['whoops.handler']); + }); + } + protected function registerWhoopsHandler() + { + if ($this->shouldReturnJson()) { + $this->app['whoops.handler'] = $this->app->share(function () { + return new JsonResponseHandler(); + }); + } else { + $this->registerPrettyWhoopsHandler(); + } + } + protected function shouldReturnJson() + { + return $this->app->runningInConsole() || $this->requestWantsJson(); + } + protected function requestWantsJson() + { + return $this->app['request']->ajax() || $this->app['request']->wantsJson(); + } + protected function registerPrettyWhoopsHandler() + { + $this->app['whoops.handler'] = $this->app->share(function () { + with($handler = new PrettyPageHandler())->setEditor('sublime'); + if (!is_null($path = $this->resourcePath())) { + $handler->addResourcePath($path); + } + return $handler; + }); + } + public function resourcePath() + { + if (is_dir($path = $this->getResourcePath())) { + return $path; + } + } + protected function getResourcePath() + { + $base = $this->app['path.base']; + return $base . '/vendor/laravel/framework/src/Illuminate/Exception/resources'; + } +} +namespace Illuminate\Routing; + +use Illuminate\Support\ServiceProvider; +class RoutingServiceProvider extends ServiceProvider +{ + public function register() + { + $this->registerRouter(); + $this->registerUrlGenerator(); + $this->registerRedirector(); + } + protected function registerRouter() + { + $this->app['router'] = $this->app->share(function ($app) { + $router = new Router($app['events'], $app); + if ($app['env'] == 'testing') { + $router->disableFilters(); + } + return $router; + }); + } + protected function registerUrlGenerator() + { + $this->app['url'] = $this->app->share(function ($app) { + $routes = $app['router']->getRoutes(); + return new UrlGenerator($routes, $app->rebinding('request', function ($app, $request) { + $app['url']->setRequest($request); + })); + }); + } + protected function registerRedirector() + { + $this->app['redirect'] = $this->app->share(function ($app) { + $redirector = new Redirector($app['url']); + if (isset($app['session.store'])) { + $redirector->setSession($app['session.store']); + } + return $redirector; + }); + } +} +namespace Illuminate\Events; + +use Illuminate\Support\ServiceProvider; +class EventServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app['events'] = $this->app->share(function ($app) { + return new Dispatcher($app); + }); + } +} +namespace Illuminate\Support\Facades; + +use Mockery\MockInterface; +abstract class Facade +{ + protected static $app; + protected static $resolvedInstance; + public static function swap($instance) + { + static::$resolvedInstance[static::getFacadeAccessor()] = $instance; + static::$app->instance(static::getFacadeAccessor(), $instance); + } + public static function shouldReceive() + { + $name = static::getFacadeAccessor(); + if (static::isMock()) { + $mock = static::$resolvedInstance[$name]; + } else { + $mock = static::createFreshMockInstance($name); + } + return call_user_func_array(array($mock, 'shouldReceive'), func_get_args()); + } + protected static function createFreshMockInstance($name) + { + static::$resolvedInstance[$name] = $mock = static::createMockByName($name); + if (isset(static::$app)) { + static::$app->instance($name, $mock); + } + return $mock; + } + protected static function createMockByName($name) + { + $class = static::getMockableClass($name); + return $class ? \Mockery::mock($class) : \Mockery::mock(); + } + protected static function isMock() + { + $name = static::getFacadeAccessor(); + return isset(static::$resolvedInstance[$name]) && static::$resolvedInstance[$name] instanceof MockInterface; + } + protected static function getMockableClass() + { + if ($root = static::getFacadeRoot()) { + return get_class($root); + } + } + public static function getFacadeRoot() + { + return static::resolveFacadeInstance(static::getFacadeAccessor()); + } + protected static function getFacadeAccessor() + { + throw new \RuntimeException('Facade does not implement getFacadeAccessor method.'); + } + protected static function resolveFacadeInstance($name) + { + if (is_object($name)) { + return $name; + } + if (isset(static::$resolvedInstance[$name])) { + return static::$resolvedInstance[$name]; + } + return static::$resolvedInstance[$name] = static::$app[$name]; + } + public static function clearResolvedInstance($name) + { + unset(static::$resolvedInstance[$name]); + } + public static function clearResolvedInstances() + { + static::$resolvedInstance = array(); + } + public static function getFacadeApplication() + { + return static::$app; + } + public static function setFacadeApplication($app) + { + static::$app = $app; + } + public static function __callStatic($method, $args) + { + $instance = static::getFacadeRoot(); + switch (count($args)) { + case 0: + return $instance->{$method}(); + case 1: + return $instance->{$method}($args[0]); + case 2: + return $instance->{$method}($args[0], $args[1]); + case 3: + return $instance->{$method}($args[0], $args[1], $args[2]); + case 4: + return $instance->{$method}($args[0], $args[1], $args[2], $args[3]); + default: + return call_user_func_array(array($instance, $method), $args); + } + } +} +namespace Illuminate\Support; + +use Illuminate\Support\Traits\MacroableTrait; +class Str +{ + use MacroableTrait; + public static function ascii($value) + { + return \Patchwork\Utf8::toAscii($value); + } + public static function camel($value) + { + return lcfirst(static::studly($value)); + } + public static function contains($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle != '' && strpos($haystack, $needle) !== false) { + return true; + } + } + return false; + } + public static function endsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle == substr($haystack, -strlen($needle))) { + return true; + } + } + return false; + } + public static function finish($value, $cap) + { + $quoted = preg_quote($cap, '/'); + return preg_replace('/(?:' . $quoted . ')+$/', '', $value) . $cap; + } + public static function is($pattern, $value) + { + if ($pattern == $value) { + return true; + } + $pattern = preg_quote($pattern, '#'); + $pattern = str_replace('\\*', '.*', $pattern) . '\\z'; + return (bool) preg_match('#^' . $pattern . '#', $value); + } + public static function length($value) + { + return mb_strlen($value); + } + public static function limit($value, $limit = 100, $end = '...') + { + if (mb_strlen($value) <= $limit) { + return $value; + } + return rtrim(mb_substr($value, 0, $limit, 'UTF-8')) . $end; + } + public static function lower($value) + { + return mb_strtolower($value); + } + public static function words($value, $words = 100, $end = '...') + { + preg_match('/^\\s*+(?:\\S++\\s*+){1,' . $words . '}/u', $value, $matches); + if (!isset($matches[0])) { + return $value; + } + if (strlen($value) == strlen($matches[0])) { + return $value; + } + return rtrim($matches[0]) . $end; + } + public static function parseCallback($callback, $default) + { + return static::contains($callback, '@') ? explode('@', $callback, 2) : array($callback, $default); + } + public static function plural($value, $count = 2) + { + return Pluralizer::plural($value, $count); + } + public static function random($length = 16) + { + if (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($length * 2); + if ($bytes === false) { + throw new \RuntimeException('Unable to generate random string.'); + } + return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length); + } + return static::quickRandom($length); + } + public static function quickRandom($length = 16) + { + $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + return substr(str_shuffle(str_repeat($pool, 5)), 0, $length); + } + public static function upper($value) + { + return mb_strtoupper($value); + } + public static function title($value) + { + return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); + } + public static function singular($value) + { + return Pluralizer::singular($value); + } + public static function slug($title, $separator = '-') + { + $title = static::ascii($title); + $flip = $separator == '-' ? '_' : '-'; + $title = preg_replace('![' . preg_quote($flip) . ']+!u', $separator, $title); + $title = preg_replace('![^' . preg_quote($separator) . '\\pL\\pN\\s]+!u', '', mb_strtolower($title)); + $title = preg_replace('![' . preg_quote($separator) . '\\s]+!u', $separator, $title); + return trim($title, $separator); + } + public static function snake($value, $delimiter = '_') + { + $replace = '$1' . $delimiter . '$2'; + return ctype_lower($value) ? $value : strtolower(preg_replace('/(.)([A-Z])/', $replace, $value)); + } + public static function startsWith($haystack, $needles) + { + foreach ((array) $needles as $needle) { + if ($needle != '' && strpos($haystack, $needle) === 0) { + return true; + } + } + return false; + } + public static function studly($value) + { + $value = ucwords(str_replace(array('-', '_'), ' ', $value)); + return str_replace(' ', '', $value); + } +} +namespace Symfony\Component\Debug; + +use Psr\Log\LogLevel; +use Psr\Log\LoggerInterface; +use Symfony\Component\Debug\Exception\ContextErrorException; +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; +class ErrorHandler +{ + const TYPE_DEPRECATION = -100; + private $levels = array(E_WARNING => 'Warning', E_NOTICE => 'Notice', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', E_STRICT => 'Runtime Notice', E_RECOVERABLE_ERROR => 'Catchable Fatal Error', E_DEPRECATED => 'Deprecated', E_USER_DEPRECATED => 'User Deprecated', E_ERROR => 'Error', E_CORE_ERROR => 'Core Error', E_COMPILE_ERROR => 'Compile Error', E_PARSE => 'Parse Error'); + private $level; + private $reservedMemory; + private $displayErrors; + private static $loggers = array(); + private static $stackedErrors = array(); + private static $stackedErrorLevels = array(); + public static function register($level = null, $displayErrors = true) + { + $handler = new static(); + $handler->setLevel($level); + $handler->setDisplayErrors($displayErrors); + ini_set('display_errors', 0); + set_error_handler(array($handler, 'handle')); + register_shutdown_function(array($handler, 'handleFatal')); + $handler->reservedMemory = str_repeat('x', 10240); + return $handler; + } + public function setLevel($level) + { + $this->level = null === $level ? error_reporting() : $level; + } + public function setDisplayErrors($displayErrors) + { + $this->displayErrors = $displayErrors; + } + public static function setLogger(LoggerInterface $logger, $channel = 'deprecation') + { + self::$loggers[$channel] = $logger; + } + public function handle($level, $message, $file = 'unknown', $line = 0, $context = array()) + { + if ($level & (E_USER_DEPRECATED | E_DEPRECATED)) { + if (isset(self::$loggers['deprecation'])) { + if (self::$stackedErrorLevels) { + self::$stackedErrors[] = func_get_args(); + } else { + if (version_compare(PHP_VERSION, '5.4', '<')) { + $stack = array_map(function ($row) { + unset($row['args']); + return $row; + }, array_slice(debug_backtrace(false), 0, 10)); + } else { + $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10); + } + self::$loggers['deprecation']->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack)); + } + return true; + } + } elseif ($this->displayErrors && error_reporting() & $level && $this->level & $level) { + if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) { + $c = $context; + unset($c['GLOBALS'], $context); + $context = $c; + } + $exception = sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line); + if ($context && class_exists('Symfony\\Component\\Debug\\Exception\\ContextErrorException')) { + $exception = new ContextErrorException($exception, 0, $level, $file, $line, $context); + } else { + $exception = new \ErrorException($exception, 0, $level, $file, $line); + } + if (PHP_VERSION_ID <= 50407 && (PHP_VERSION_ID >= 50400 || PHP_VERSION_ID <= 50317)) { + $exception->errorHandlerCanary = new ErrorHandlerCanary(); + } + throw $exception; + } + if (isset(self::$loggers['scream']) && !(error_reporting() & $level)) { + if (self::$stackedErrorLevels) { + self::$stackedErrors[] = func_get_args(); + } else { + switch ($level) { + case E_USER_ERROR: + case E_RECOVERABLE_ERROR: + $logLevel = LogLevel::ERROR; + break; + case E_WARNING: + case E_USER_WARNING: + $logLevel = LogLevel::WARNING; + break; + default: + $logLevel = LogLevel::NOTICE; + break; + } + self::$loggers['scream']->log($logLevel, $message, array('type' => $level, 'file' => $file, 'line' => $line, 'scream' => error_reporting())); + } + } + return false; + } + public static function stackErrors() + { + self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); + } + public static function unstackErrors() + { + $level = array_pop(self::$stackedErrorLevels); + if (null !== $level) { + $e = error_reporting($level); + if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { + error_reporting($e); + } + } + if (empty(self::$stackedErrorLevels)) { + $errors = self::$stackedErrors; + self::$stackedErrors = array(); + $errorHandler = set_error_handler('var_dump'); + restore_error_handler(); + if ($errorHandler) { + foreach ($errors as $e) { + call_user_func_array($errorHandler, $e); + } + } + } + } + public function handleFatal() + { + $this->reservedMemory = ''; + gc_collect_cycles(); + $error = error_get_last(); + $exceptionHandler = set_exception_handler('var_dump'); + restore_exception_handler(); + try { + while (self::$stackedErrorLevels) { + static::unstackErrors(); + } + } catch (\Exception $exception) { + if ($exceptionHandler) { + call_user_func($exceptionHandler, $exception); + return; + } + if ($this->displayErrors) { + ini_set('display_errors', 1); + } + throw $exception; + } + if (!$error || !$this->level || !($error['type'] & (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_PARSE))) { + return; + } + if (isset(self::$loggers['emergency'])) { + $fatal = array('type' => $error['type'], 'file' => $error['file'], 'line' => $error['line']); + self::$loggers['emergency']->emergency($error['message'], $fatal); + } + if ($this->displayErrors && $exceptionHandler) { + $this->handleFatalError($exceptionHandler, $error); + } + } + protected function getFatalErrorHandlers() + { + return array(new UndefinedFunctionFatalErrorHandler(), new UndefinedMethodFatalErrorHandler(), new ClassNotFoundFatalErrorHandler()); + } + private function handleFatalError($exceptionHandler, array $error) + { + set_error_handler('var_dump', 0); + ini_set('display_errors', 1); + $level = isset($this->levels[$error['type']]) ? $this->levels[$error['type']] : $error['type']; + $message = sprintf('%s: %s in %s line %d', $level, $error['message'], $error['file'], $error['line']); + if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) { + $exception = new OutOfMemoryException($message, 0, $error['type'], $error['file'], $error['line'], 3, false); + } else { + $exception = new FatalErrorException($message, 0, $error['type'], $error['file'], $error['line'], 3, true); + foreach ($this->getFatalErrorHandlers() as $handler) { + if ($e = $handler->handleError($error, $exception)) { + $exception = $e; + break; + } + } + } + try { + call_user_func($exceptionHandler, $exception); + } catch (\Exception $e) { + throw $exception; + } + } +} +class ErrorHandlerCanary +{ + private static $displayErrors = null; + public function __construct() + { + if (null === self::$displayErrors) { + self::$displayErrors = ini_set('display_errors', 1); + } + } + public function __destruct() + { + if (null !== self::$displayErrors) { + ini_set('display_errors', self::$displayErrors); + self::$displayErrors = null; + } + } +} +namespace Symfony\Component\HttpKernel\Debug; + +use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler; +class ErrorHandler extends DebugErrorHandler +{ + +} +namespace Illuminate\Config; + +use Closure; +use ArrayAccess; +use Illuminate\Support\NamespacedItemResolver; +class Repository extends NamespacedItemResolver implements ArrayAccess +{ + protected $loader; + protected $environment; + protected $items = array(); + protected $packages = array(); + protected $afterLoad = array(); + public function __construct(LoaderInterface $loader, $environment) + { + $this->loader = $loader; + $this->environment = $environment; + } + public function has($key) + { + $default = microtime(true); + return $this->get($key, $default) !== $default; + } + public function hasGroup($key) + { + list($namespace, $group, $item) = $this->parseKey($key); + return $this->loader->exists($group, $namespace); + } + public function get($key, $default = null) + { + list($namespace, $group, $item) = $this->parseKey($key); + $collection = $this->getCollection($group, $namespace); + $this->load($group, $namespace, $collection); + return array_get($this->items[$collection], $item, $default); + } + public function set($key, $value) + { + list($namespace, $group, $item) = $this->parseKey($key); + $collection = $this->getCollection($group, $namespace); + $this->load($group, $namespace, $collection); + if (is_null($item)) { + $this->items[$collection] = $value; + } else { + array_set($this->items[$collection], $item, $value); + } + } + protected function load($group, $namespace, $collection) + { + $env = $this->environment; + if (isset($this->items[$collection])) { + return; + } + $items = $this->loader->load($env, $group, $namespace); + if (isset($this->afterLoad[$namespace])) { + $items = $this->callAfterLoad($namespace, $group, $items); + } + $this->items[$collection] = $items; + } + protected function callAfterLoad($namespace, $group, $items) + { + $callback = $this->afterLoad[$namespace]; + return call_user_func($callback, $this, $group, $items); + } + protected function parseNamespacedSegments($key) + { + list($namespace, $item) = explode('::', $key); + if (in_array($namespace, $this->packages)) { + return $this->parsePackageSegments($key, $namespace, $item); + } + return parent::parseNamespacedSegments($key); + } + protected function parsePackageSegments($key, $namespace, $item) + { + $itemSegments = explode('.', $item); + if (!$this->loader->exists($itemSegments[0], $namespace)) { + return array($namespace, 'config', $item); + } + return parent::parseNamespacedSegments($key); + } + public function package($package, $hint, $namespace = null) + { + $namespace = $this->getPackageNamespace($package, $namespace); + $this->packages[] = $namespace; + $this->addNamespace($namespace, $hint); + $this->afterLoading($namespace, function ($me, $group, $items) use($package) { + $env = $me->getEnvironment(); + $loader = $me->getLoader(); + return $loader->cascadePackage($env, $package, $group, $items); + }); + } + protected function getPackageNamespace($package, $namespace) + { + if (is_null($namespace)) { + list($vendor, $namespace) = explode('/', $package); + } + return $namespace; + } + public function afterLoading($namespace, Closure $callback) + { + $this->afterLoad[$namespace] = $callback; + } + protected function getCollection($group, $namespace = null) + { + $namespace = $namespace ?: '*'; + return $namespace . '::' . $group; + } + public function addNamespace($namespace, $hint) + { + $this->loader->addNamespace($namespace, $hint); + } + public function getNamespaces() + { + return $this->loader->getNamespaces(); + } + public function getLoader() + { + return $this->loader; + } + public function setLoader(LoaderInterface $loader) + { + $this->loader = $loader; + } + public function getEnvironment() + { + return $this->environment; + } + public function getAfterLoadCallbacks() + { + return $this->afterLoad; + } + public function getItems() + { + return $this->items; + } + public function offsetExists($key) + { + return $this->has($key); + } + public function offsetGet($key) + { + return $this->get($key); + } + public function offsetSet($key, $value) + { + $this->set($key, $value); + } + public function offsetUnset($key) + { + $this->set($key, null); + } +} +namespace Illuminate\Support; + +class NamespacedItemResolver +{ + protected $parsed = array(); + public function parseKey($key) + { + if (isset($this->parsed[$key])) { + return $this->parsed[$key]; + } + $segments = explode('.', $key); + if (strpos($key, '::') === false) { + $parsed = $this->parseBasicSegments($segments); + } else { + $parsed = $this->parseNamespacedSegments($key); + } + return $this->parsed[$key] = $parsed; + } + protected function parseBasicSegments(array $segments) + { + $group = $segments[0]; + if (count($segments) == 1) { + return array(null, $group, null); + } else { + $item = implode('.', array_slice($segments, 1)); + return array(null, $group, $item); + } + } + protected function parseNamespacedSegments($key) + { + list($namespace, $item) = explode('::', $key); + $itemSegments = explode('.', $item); + $groupAndItem = array_slice($this->parseBasicSegments($itemSegments), 1); + return array_merge(array($namespace), $groupAndItem); + } + public function setParsedKey($key, $parsed) + { + $this->parsed[$key] = $parsed; + } +} +namespace Illuminate\Config; + +use Illuminate\Filesystem\Filesystem; +class FileLoader implements LoaderInterface +{ + protected $files; + protected $defaultPath; + protected $hints = array(); + protected $exists = array(); + public function __construct(Filesystem $files, $defaultPath) + { + $this->files = $files; + $this->defaultPath = $defaultPath; + } + public function load($environment, $group, $namespace = null) + { + $items = array(); + $path = $this->getPath($namespace); + if (is_null($path)) { + return $items; + } + $file = "{$path}/{$group}.php"; + if ($this->files->exists($file)) { + $items = $this->files->getRequire($file); + } + $file = "{$path}/{$environment}/{$group}.php"; + if ($this->files->exists($file)) { + $items = $this->mergeEnvironment($items, $file); + } + return $items; + } + protected function mergeEnvironment(array $items, $file) + { + return array_replace_recursive($items, $this->files->getRequire($file)); + } + public function exists($group, $namespace = null) + { + $key = $group . $namespace; + if (isset($this->exists[$key])) { + return $this->exists[$key]; + } + $path = $this->getPath($namespace); + if (is_null($path)) { + return $this->exists[$key] = false; + } + $file = "{$path}/{$group}.php"; + $exists = $this->files->exists($file); + return $this->exists[$key] = $exists; + } + public function cascadePackage($env, $package, $group, $items) + { + $file = "packages/{$package}/{$group}.php"; + if ($this->files->exists($path = $this->defaultPath . '/' . $file)) { + $items = array_merge($items, $this->getRequire($path)); + } + $path = $this->getPackagePath($env, $package, $group); + if ($this->files->exists($path)) { + $items = array_merge($items, $this->getRequire($path)); + } + return $items; + } + protected function getPackagePath($env, $package, $group) + { + $file = "packages/{$package}/{$env}/{$group}.php"; + return $this->defaultPath . '/' . $file; + } + protected function getPath($namespace) + { + if (is_null($namespace)) { + return $this->defaultPath; + } elseif (isset($this->hints[$namespace])) { + return $this->hints[$namespace]; + } + } + public function addNamespace($namespace, $hint) + { + $this->hints[$namespace] = $hint; + } + public function getNamespaces() + { + return $this->hints; + } + protected function getRequire($path) + { + return $this->files->getRequire($path); + } + public function getFilesystem() + { + return $this->files; + } +} +namespace Illuminate\Config; + +interface LoaderInterface +{ + public function load($environment, $group, $namespace = null); + public function exists($group, $namespace = null); + public function addNamespace($namespace, $hint); + public function getNamespaces(); + public function cascadePackage($environment, $package, $group, $items); +} +namespace Illuminate\Config; + +interface EnvironmentVariablesLoaderInterface +{ + public function load($environment = null); +} +namespace Illuminate\Config; + +use Illuminate\Filesystem\Filesystem; +class FileEnvironmentVariablesLoader implements EnvironmentVariablesLoaderInterface +{ + protected $files; + protected $path; + public function __construct(Filesystem $files, $path = null) + { + $this->files = $files; + $this->path = $path ?: base_path(); + } + public function load($environment = null) + { + if ($environment == 'production') { + $environment = null; + } + if (!$this->files->exists($path = $this->getFile($environment))) { + return array(); + } else { + return $this->files->getRequire($path); + } + } + protected function getFile($environment) + { + if ($environment) { + return $this->path . '/.env.' . $environment . '.php'; + } else { + return $this->path . '/.env.php'; + } + } +} +namespace Illuminate\Config; + +class EnvironmentVariables +{ + protected $loader; + public function __construct(EnvironmentVariablesLoaderInterface $loader) + { + $this->loader = $loader; + } + public function load($environment = null) + { + foreach ($this->loader->load($environment) as $key => $value) { + $_ENV[$key] = $value; + $_SERVER[$key] = $value; + putenv("{$key}={$value}"); + } + } +} +namespace Illuminate\Filesystem; + +use FilesystemIterator; +use Symfony\Component\Finder\Finder; +class FileNotFoundException extends \Exception +{ + +} +class Filesystem +{ + public function exists($path) + { + return file_exists($path); + } + public function get($path) + { + if ($this->isFile($path)) { + return file_get_contents($path); + } + throw new FileNotFoundException("File does not exist at path {$path}"); + } + public function getRequire($path) + { + if ($this->isFile($path)) { + return require $path; + } + throw new FileNotFoundException("File does not exist at path {$path}"); + } + public function requireOnce($file) + { + require_once $file; + } + public function put($path, $contents) + { + return file_put_contents($path, $contents); + } + public function prepend($path, $data) + { + if ($this->exists($path)) { + return $this->put($path, $data . $this->get($path)); + } else { + return $this->put($path, $data); + } + } + public function append($path, $data) + { + return file_put_contents($path, $data, FILE_APPEND); + } + public function delete($paths) + { + $paths = is_array($paths) ? $paths : func_get_args(); + $success = true; + foreach ($paths as $path) { + if (!@unlink($path)) { + $success = false; + } + } + return $success; + } + public function move($path, $target) + { + return rename($path, $target); + } + public function copy($path, $target) + { + return copy($path, $target); + } + public function extension($path) + { + return pathinfo($path, PATHINFO_EXTENSION); + } + public function type($path) + { + return filetype($path); + } + public function size($path) + { + return filesize($path); + } + public function lastModified($path) + { + return filemtime($path); + } + public function isDirectory($directory) + { + return is_dir($directory); + } + public function isWritable($path) + { + return is_writable($path); + } + public function isFile($file) + { + return is_file($file); + } + public function glob($pattern, $flags = 0) + { + return glob($pattern, $flags); + } + public function files($directory) + { + $glob = glob($directory . '/*'); + if ($glob === false) { + return array(); + } + return array_filter($glob, function ($file) { + return filetype($file) == 'file'; + }); + } + public function allFiles($directory) + { + return iterator_to_array(Finder::create()->files()->in($directory), false); + } + public function directories($directory) + { + $directories = array(); + foreach (Finder::create()->in($directory)->directories()->depth(0) as $dir) { + $directories[] = $dir->getPathname(); + } + return $directories; + } + public function makeDirectory($path, $mode = 493, $recursive = false, $force = false) + { + if ($force) { + return @mkdir($path, $mode, $recursive); + } else { + return mkdir($path, $mode, $recursive); + } + } + public function copyDirectory($directory, $destination, $options = null) + { + if (!$this->isDirectory($directory)) { + return false; + } + $options = $options ?: FilesystemIterator::SKIP_DOTS; + if (!$this->isDirectory($destination)) { + $this->makeDirectory($destination, 511, true); + } + $items = new FilesystemIterator($directory, $options); + foreach ($items as $item) { + $target = $destination . '/' . $item->getBasename(); + if ($item->isDir()) { + $path = $item->getPathname(); + if (!$this->copyDirectory($path, $target, $options)) { + return false; + } + } else { + if (!$this->copy($item->getPathname(), $target)) { + return false; + } + } + } + return true; + } + public function deleteDirectory($directory, $preserve = false) + { + if (!$this->isDirectory($directory)) { + return false; + } + $items = new FilesystemIterator($directory); + foreach ($items as $item) { + if ($item->isDir()) { + $this->deleteDirectory($item->getPathname()); + } else { + $this->delete($item->getPathname()); + } + } + if (!$preserve) { + @rmdir($directory); + } + return true; + } + public function cleanDirectory($directory) + { + return $this->deleteDirectory($directory, true); + } +} +namespace Illuminate\Foundation; + +class AliasLoader +{ + protected $aliases; + protected $registered = false; + protected static $instance; + public function __construct(array $aliases = array()) + { + $this->aliases = $aliases; + } + public static function getInstance(array $aliases = array()) + { + if (is_null(static::$instance)) { + static::$instance = new static($aliases); + } + $aliases = array_merge(static::$instance->getAliases(), $aliases); + static::$instance->setAliases($aliases); + return static::$instance; + } + public function load($alias) + { + if (isset($this->aliases[$alias])) { + return class_alias($this->aliases[$alias], $alias); + } + } + public function alias($class, $alias) + { + $this->aliases[$class] = $alias; + } + public function register() + { + if (!$this->registered) { + $this->prependToLoaderStack(); + $this->registered = true; + } + } + protected function prependToLoaderStack() + { + spl_autoload_register(array($this, 'load'), true, true); + } + public function getAliases() + { + return $this->aliases; + } + public function setAliases(array $aliases) + { + $this->aliases = $aliases; + } + public function isRegistered() + { + return $this->registered; + } + public function setRegistered($value) + { + $this->registered = $value; + } + public static function setInstance($loader) + { + static::$instance = $loader; + } +} +namespace Illuminate\Foundation; + +use Illuminate\Filesystem\Filesystem; +class ProviderRepository +{ + protected $files; + protected $manifestPath; + protected $default = array('when' => array()); + public function __construct(Filesystem $files, $manifestPath) + { + $this->files = $files; + $this->manifestPath = $manifestPath; + } + public function load(Application $app, array $providers) + { + $manifest = $this->loadManifest(); + if ($this->shouldRecompile($manifest, $providers)) { + $manifest = $this->compileManifest($app, $providers); + } + if ($app->runningInConsole()) { + $manifest['eager'] = $manifest['providers']; + } + foreach ($manifest['when'] as $provider => $events) { + $this->registerLoadEvents($app, $provider, $events); + } + foreach ($manifest['eager'] as $provider) { + $app->register($this->createProvider($app, $provider)); + } + $app->setDeferredServices($manifest['deferred']); + } + protected function registerLoadEvents(Application $app, $provider, array $events) + { + if (count($events) < 1) { + return; + } + $app->make('events')->listen($events, function () use($app, $provider) { + $app->register($provider); + }); + } + protected function compileManifest(Application $app, $providers) + { + $manifest = $this->freshManifest($providers); + foreach ($providers as $provider) { + $instance = $this->createProvider($app, $provider); + if ($instance->isDeferred()) { + foreach ($instance->provides() as $service) { + $manifest['deferred'][$service] = $provider; + } + $manifest['when'][$provider] = $instance->when(); + } else { + $manifest['eager'][] = $provider; + } + } + return $this->writeManifest($manifest); + } + public function createProvider(Application $app, $provider) + { + return new $provider($app); + } + public function shouldRecompile($manifest, $providers) + { + return is_null($manifest) || $manifest['providers'] != $providers; + } + public function loadManifest() + { + $path = $this->manifestPath . '/services.json'; + if ($this->files->exists($path)) { + $manifest = json_decode($this->files->get($path), true); + return array_merge($this->default, $manifest); + } + } + public function writeManifest($manifest) + { + $path = $this->manifestPath . '/services.json'; + $this->files->put($path, json_encode($manifest, JSON_PRETTY_PRINT)); + return $manifest; + } + protected function freshManifest(array $providers) + { + list($eager, $deferred) = array(array(), array()); + return compact('providers', 'eager', 'deferred'); + } + public function getFilesystem() + { + return $this->files; + } +} +namespace Illuminate\Cookie; + +use Illuminate\Support\ServiceProvider; +class CookieServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app->bindShared('cookie', function ($app) { + $config = $app['config']['session']; + return with(new CookieJar())->setDefaultPathAndDomain($config['path'], $config['domain']); + }); + } +} +namespace Illuminate\Database; + +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\ServiceProvider; +use Illuminate\Database\Connectors\ConnectionFactory; +class DatabaseServiceProvider extends ServiceProvider +{ + public function boot() + { + Model::setConnectionResolver($this->app['db']); + Model::setEventDispatcher($this->app['events']); + } + public function register() + { + $this->app->bindShared('db.factory', function ($app) { + return new ConnectionFactory($app); + }); + $this->app->bindShared('db', function ($app) { + return new DatabaseManager($app, $app['db.factory']); + }); + } +} +namespace Illuminate\Encryption; + +use Illuminate\Support\ServiceProvider; +class EncryptionServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app->bindShared('encrypter', function ($app) { + $encrypter = new Encrypter($app['config']['app.key']); + if ($app['config']->has('app.cipher')) { + $encrypter->setCipher($app['config']['app.cipher']); + } + return $encrypter; + }); + } +} +namespace Illuminate\Filesystem; + +use Illuminate\Support\ServiceProvider; +class FilesystemServiceProvider extends ServiceProvider +{ + public function register() + { + $this->app->bindShared('files', function () { + return new Filesystem(); + }); + } +} +namespace Illuminate\Session; + +use Illuminate\Support\ServiceProvider; +class SessionServiceProvider extends ServiceProvider +{ + public function register() + { + $this->setupDefaultDriver(); + $this->registerSessionManager(); + $this->registerSessionDriver(); + } + protected function setupDefaultDriver() + { + if ($this->app->runningInConsole()) { + $this->app['config']['session.driver'] = 'array'; + } + } + protected function registerSessionManager() + { + $this->app->bindShared('session', function ($app) { + return new SessionManager($app); + }); + } + protected function registerSessionDriver() + { + $this->app->bindShared('session.store', function ($app) { + $manager = $app['session']; + return $manager->driver(); + }); + } + protected function getDriver() + { + return $this->app['config']['session.driver']; + } +} +namespace Illuminate\View; + +use Illuminate\Support\ViewErrorBag; +use Illuminate\View\Engines\PhpEngine; +use Illuminate\Support\ServiceProvider; +use Illuminate\View\Engines\CompilerEngine; +use Illuminate\View\Engines\EngineResolver; +use Illuminate\View\Compilers\BladeCompiler; +class ViewServiceProvider extends ServiceProvider +{ + public function register() + { + $this->registerEngineResolver(); + $this->registerViewFinder(); + $this->registerFactory(); + $this->registerSessionBinder(); + } + public function registerEngineResolver() + { + $this->app->bindShared('view.engine.resolver', function ($app) { + $resolver = new EngineResolver(); + foreach (array('php', 'blade') as $engine) { + $this->{'register' . ucfirst($engine) . 'Engine'}($resolver); + } + return $resolver; + }); + } + public function registerPhpEngine($resolver) + { + $resolver->register('php', function () { + return new PhpEngine(); + }); + } + public function registerBladeEngine($resolver) + { + $app = $this->app; + $app->bindShared('blade.compiler', function ($app) { + $cache = $app['path.storage'] . '/views'; + return new BladeCompiler($app['files'], $cache); + }); + $resolver->register('blade', function () use($app) { + return new CompilerEngine($app['blade.compiler'], $app['files']); + }); + } + public function registerViewFinder() + { + $this->app->bindShared('view.finder', function ($app) { + $paths = $app['config']['view.paths']; + return new FileViewFinder($app['files'], $paths); + }); + } + public function registerFactory() + { + $this->app->bindShared('view', function ($app) { + $resolver = $app['view.engine.resolver']; + $finder = $app['view.finder']; + $env = new Factory($resolver, $finder, $app['events']); + $env->setContainer($app); + $env->share('app', $app); + return $env; + }); + } + protected function registerSessionBinder() + { + list($app, $me) = array($this->app, $this); + $app->booted(function () use($app, $me) { + if ($me->sessionHasErrors($app)) { + $errors = $app['session.store']->get('errors'); + $app['view']->share('errors', $errors); + } else { + $app['view']->share('errors', new ViewErrorBag()); + } + }); + } + public function sessionHasErrors($app) + { + $config = $app['config']['session']; + if (isset($app['session.store']) && !is_null($config['driver'])) { + return $app['session.store']->has('errors'); + } + } +} +namespace Illuminate\Routing; + +interface RouteFiltererInterface +{ + public function filter($name, $callback); + public function callRouteFilter($filter, $parameters, $route, $request, $response = null); +} +namespace Illuminate\Routing; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Illuminate\Events\Dispatcher; +use Illuminate\Container\Container; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; +use Symfony\Component\HttpFoundation\Response as SymfonyResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +class Router implements HttpKernelInterface, RouteFiltererInterface +{ + protected $events; + protected $container; + protected $routes; + protected $current; + protected $currentRequest; + protected $controllerDispatcher; + protected $inspector; + protected $filtering = true; + protected $patternFilters = array(); + protected $regexFilters = array(); + protected $binders = array(); + protected $patterns = array(); + protected $groupStack = array(); + public static $verbs = array('GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'); + protected $resourceDefaults = array('index', 'create', 'store', 'show', 'edit', 'update', 'destroy'); + public function __construct(Dispatcher $events, Container $container = null) + { + $this->events = $events; + $this->routes = new RouteCollection(); + $this->container = $container ?: new Container(); + $this->bind('_missing', function ($v) { + return explode('/', $v); + }); + } + public function get($uri, $action) + { + return $this->addRoute(array('GET', 'HEAD'), $uri, $action); + } + public function post($uri, $action) + { + return $this->addRoute('POST', $uri, $action); + } + public function put($uri, $action) + { + return $this->addRoute('PUT', $uri, $action); + } + public function patch($uri, $action) + { + return $this->addRoute('PATCH', $uri, $action); + } + public function delete($uri, $action) + { + return $this->addRoute('DELETE', $uri, $action); + } + public function options($uri, $action) + { + return $this->addRoute('OPTIONS', $uri, $action); + } + public function any($uri, $action) + { + $verbs = array('GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE'); + return $this->addRoute($verbs, $uri, $action); + } + public function match($methods, $uri, $action) + { + return $this->addRoute($methods, $uri, $action); + } + public function controllers(array $controllers) + { + foreach ($controllers as $uri => $name) { + $this->controller($uri, $name); + } + } + public function controller($uri, $controller, $names = array()) + { + $prepended = $controller; + if (count($this->groupStack) > 0) { + $prepended = $this->prependGroupUses($controller); + } + $routable = $this->getInspector()->getRoutable($prepended, $uri); + foreach ($routable as $method => $routes) { + foreach ($routes as $route) { + $this->registerInspected($route, $controller, $method, $names); + } + } + $this->addFallthroughRoute($controller, $uri); + } + protected function registerInspected($route, $controller, $method, &$names) + { + $action = array('uses' => $controller . '@' . $method); + $action['as'] = array_pull($names, $method); + $this->{$route['verb']}($route['uri'], $action); + } + protected function addFallthroughRoute($controller, $uri) + { + $missing = $this->any($uri . '/{_missing}', $controller . '@missingMethod'); + $missing->where('_missing', '(.*)'); + } + public function resource($name, $controller, array $options = array()) + { + if (str_contains($name, '/')) { + $this->prefixedResource($name, $controller, $options); + return; + } + $base = $this->getResourceWildcard(last(explode('.', $name))); + $defaults = $this->resourceDefaults; + foreach ($this->getResourceMethods($defaults, $options) as $m) { + $this->{'addResource' . ucfirst($m)}($name, $base, $controller, $options); + } + } + protected function prefixedResource($name, $controller, array $options) + { + list($name, $prefix) = $this->getResourcePrefix($name); + $callback = function ($me) use($name, $controller, $options) { + $me->resource($name, $controller, $options); + }; + return $this->group(compact('prefix'), $callback); + } + protected function getResourcePrefix($name) + { + $segments = explode('/', $name); + $prefix = implode('/', array_slice($segments, 0, -1)); + return array($segments[count($segments) - 1], $prefix); + } + protected function getResourceMethods($defaults, $options) + { + if (isset($options['only'])) { + return array_intersect($defaults, $options['only']); + } elseif (isset($options['except'])) { + return array_diff($defaults, $options['except']); + } + return $defaults; + } + public function getResourceUri($resource) + { + if (!str_contains($resource, '.')) { + return $resource; + } + $segments = explode('.', $resource); + $uri = $this->getNestedResourceUri($segments); + return str_replace('/{' . $this->getResourceWildcard(last($segments)) . '}', '', $uri); + } + protected function getNestedResourceUri(array $segments) + { + return implode('/', array_map(function ($s) { + return $s . '/{' . $this->getResourceWildcard($s) . '}'; + }, $segments)); + } + protected function getResourceAction($resource, $controller, $method, $options) + { + $name = $this->getResourceName($resource, $method, $options); + return array('as' => $name, 'uses' => $controller . '@' . $method); + } + protected function getResourceName($resource, $method, $options) + { + if (isset($options['names'][$method])) { + return $options['names'][$method]; + } + $prefix = isset($options['as']) ? $options['as'] . '.' : ''; + if (count($this->groupStack) == 0) { + return $prefix . $resource . '.' . $method; + } + return $this->getGroupResourceName($prefix, $resource, $method); + } + protected function getGroupResourceName($prefix, $resource, $method) + { + $group = str_replace('/', '.', $this->getLastGroupPrefix()); + return trim("{$prefix}{$group}.{$resource}.{$method}", '.'); + } + public function getResourceWildcard($value) + { + return str_replace('-', '_', $value); + } + protected function addResourceIndex($name, $base, $controller, $options) + { + $action = $this->getResourceAction($name, $controller, 'index', $options); + return $this->get($this->getResourceUri($name), $action); + } + protected function addResourceCreate($name, $base, $controller, $options) + { + $action = $this->getResourceAction($name, $controller, 'create', $options); + return $this->get($this->getResourceUri($name) . '/create', $action); + } + protected function addResourceStore($name, $base, $controller, $options) + { + $action = $this->getResourceAction($name, $controller, 'store', $options); + return $this->post($this->getResourceUri($name), $action); + } + protected function addResourceShow($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + return $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options)); + } + protected function addResourceEdit($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}/edit'; + return $this->get($uri, $this->getResourceAction($name, $controller, 'edit', $options)); + } + protected function addResourceUpdate($name, $base, $controller, $options) + { + $this->addPutResourceUpdate($name, $base, $controller, $options); + return $this->addPatchResourceUpdate($name, $base, $controller); + } + protected function addPutResourceUpdate($name, $base, $controller, $options) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + return $this->put($uri, $this->getResourceAction($name, $controller, 'update', $options)); + } + protected function addPatchResourceUpdate($name, $base, $controller) + { + $uri = $this->getResourceUri($name) . '/{' . $base . '}'; + $this->patch($uri, $controller . '@update'); + } + protected function addResourceDestroy($name, $base, $controller, $options) + { + $action = $this->getResourceAction($name, $controller, 'destroy', $options); + return $this->delete($this->getResourceUri($name) . '/{' . $base . '}', $action); + } + public function group(array $attributes, Closure $callback) + { + $this->updateGroupStack($attributes); + call_user_func($callback, $this); + array_pop($this->groupStack); + } + protected function updateGroupStack(array $attributes) + { + if (count($this->groupStack) > 0) { + $attributes = $this->mergeGroup($attributes, last($this->groupStack)); + } + $this->groupStack[] = $attributes; + } + public function mergeWithLastGroup($new) + { + return $this->mergeGroup($new, last($this->groupStack)); + } + public static function mergeGroup($new, $old) + { + $new['namespace'] = static::formatUsesPrefix($new, $old); + $new['prefix'] = static::formatGroupPrefix($new, $old); + if (isset($new['domain'])) { + unset($old['domain']); + } + return array_merge_recursive(array_except($old, array('namespace', 'prefix')), $new); + } + protected static function formatUsesPrefix($new, $old) + { + if (isset($new['namespace'])) { + return trim(array_get($old, 'namespace'), '\\') . '\\' . trim($new['namespace'], '\\'); + } else { + return array_get($old, 'namespace'); + } + } + protected static function formatGroupPrefix($new, $old) + { + if (isset($new['prefix'])) { + return trim(array_get($old, 'prefix'), '/') . '/' . trim($new['prefix'], '/'); + } else { + return array_get($old, 'prefix'); + } + } + protected function getLastGroupPrefix() + { + if (count($this->groupStack) > 0) { + return array_get(last($this->groupStack), 'prefix', ''); + } + return ''; + } + protected function addRoute($methods, $uri, $action) + { + return $this->routes->add($this->createRoute($methods, $uri, $action)); + } + protected function createRoute($methods, $uri, $action) + { + if ($this->routingToController($action)) { + $action = $this->getControllerAction($action); + } + $route = $this->newRoute($methods, $uri = $this->prefix($uri), $action); + $route->where($this->patterns); + if (count($this->groupStack) > 0) { + $this->mergeController($route); + } + return $route; + } + protected function newRoute($methods, $uri, $action) + { + return new Route($methods, $uri, $action); + } + protected function prefix($uri) + { + return trim(trim($this->getLastGroupPrefix(), '/') . '/' . trim($uri, '/'), '/') ?: '/'; + } + protected function mergeController($route) + { + $action = $this->mergeWithLastGroup($route->getAction()); + $route->setAction($action); + } + protected function routingToController($action) + { + if ($action instanceof Closure) { + return false; + } + return is_string($action) || is_string(array_get($action, 'uses')); + } + protected function getControllerAction($action) + { + if (is_string($action)) { + $action = array('uses' => $action); + } + if (count($this->groupStack) > 0) { + $action['uses'] = $this->prependGroupUses($action['uses']); + } + $action['controller'] = $action['uses']; + $closure = $this->getClassClosure($action['uses']); + return array_set($action, 'uses', $closure); + } + protected function getClassClosure($controller) + { + $d = $this->getControllerDispatcher(); + return function () use($d, $controller) { + $route = $this->current(); + $request = $this->getCurrentRequest(); + list($class, $method) = explode('@', $controller); + return $d->dispatch($route, $request, $class, $method); + }; + } + protected function prependGroupUses($uses) + { + $group = last($this->groupStack); + return isset($group['namespace']) ? $group['namespace'] . '\\' . $uses : $uses; + } + public function dispatch(Request $request) + { + $this->currentRequest = $request; + $response = $this->callFilter('before', $request); + if (is_null($response)) { + $response = $this->dispatchToRoute($request); + } + $response = $this->prepareResponse($request, $response); + $this->callFilter('after', $request, $response); + return $response; + } + public function dispatchToRoute(Request $request) + { + $route = $this->findRoute($request); + $this->events->fire('router.matched', array($route, $request)); + $response = $this->callRouteBefore($route, $request); + if (is_null($response)) { + $response = $route->run($request); + } + $response = $this->prepareResponse($request, $response); + $this->callRouteAfter($route, $request, $response); + return $response; + } + protected function findRoute($request) + { + $this->current = $route = $this->routes->match($request); + return $this->substituteBindings($route); + } + protected function substituteBindings($route) + { + foreach ($route->parameters() as $key => $value) { + if (isset($this->binders[$key])) { + $route->setParameter($key, $this->performBinding($key, $value, $route)); + } + } + return $route; + } + protected function performBinding($key, $value, $route) + { + return call_user_func($this->binders[$key], $value, $route); + } + public function matched($callback) + { + $this->events->listen('router.matched', $callback); + } + public function before($callback) + { + $this->addGlobalFilter('before', $callback); + } + public function after($callback) + { + $this->addGlobalFilter('after', $callback); + } + protected function addGlobalFilter($filter, $callback) + { + $this->events->listen('router.' . $filter, $this->parseFilter($callback)); + } + public function filter($name, $callback) + { + $this->events->listen('router.filter: ' . $name, $this->parseFilter($callback)); + } + protected function parseFilter($callback) + { + if (is_string($callback) && !str_contains($callback, '@')) { + return $callback . '@filter'; + } else { + return $callback; + } + } + public function when($pattern, $name, $methods = null) + { + if (!is_null($methods)) { + $methods = array_map('strtoupper', (array) $methods); + } + $this->patternFilters[$pattern][] = compact('name', 'methods'); + } + public function whenRegex($pattern, $name, $methods = null) + { + if (!is_null($methods)) { + $methods = array_map('strtoupper', (array) $methods); + } + $this->regexFilters[$pattern][] = compact('name', 'methods'); + } + public function model($key, $class, Closure $callback = null) + { + return $this->bind($key, function ($value) use($class, $callback) { + if (is_null($value)) { + return null; + } + if ($model = with(new $class())->find($value)) { + return $model; + } + if ($callback instanceof Closure) { + return call_user_func($callback); + } + throw new NotFoundHttpException(); + }); + } + public function bind($key, $binder) + { + $this->binders[str_replace('-', '_', $key)] = $binder; + } + public function pattern($key, $pattern) + { + $this->patterns[$key] = $pattern; + } + protected function callFilter($filter, $request, $response = null) + { + if (!$this->filtering) { + return null; + } + return $this->events->until('router.' . $filter, array($request, $response)); + } + public function callRouteBefore($route, $request) + { + $response = $this->callPatternFilters($route, $request); + return $response ?: $this->callAttachedBefores($route, $request); + } + protected function callPatternFilters($route, $request) + { + foreach ($this->findPatternFilters($request) as $filter => $parameters) { + $response = $this->callRouteFilter($filter, $parameters, $route, $request); + if (!is_null($response)) { + return $response; + } + } + } + public function findPatternFilters($request) + { + $results = array(); + list($path, $method) = array($request->path(), $request->getMethod()); + foreach ($this->patternFilters as $pattern => $filters) { + if (str_is($pattern, $path)) { + $merge = $this->patternsByMethod($method, $filters); + $results = array_merge($results, $merge); + } + } + foreach ($this->regexFilters as $pattern => $filters) { + if (preg_match($pattern, $path)) { + $merge = $this->patternsByMethod($method, $filters); + $results = array_merge($results, $merge); + } + } + return $results; + } + protected function patternsByMethod($method, $filters) + { + $results = array(); + foreach ($filters as $filter) { + if ($this->filterSupportsMethod($filter, $method)) { + $parsed = Route::parseFilters($filter['name']); + $results = array_merge($results, $parsed); + } + } + return $results; + } + protected function filterSupportsMethod($filter, $method) + { + $methods = $filter['methods']; + return is_null($methods) || in_array($method, $methods); + } + protected function callAttachedBefores($route, $request) + { + foreach ($route->beforeFilters() as $filter => $parameters) { + $response = $this->callRouteFilter($filter, $parameters, $route, $request); + if (!is_null($response)) { + return $response; + } + } + } + public function callRouteAfter($route, $request, $response) + { + foreach ($route->afterFilters() as $filter => $parameters) { + $this->callRouteFilter($filter, $parameters, $route, $request, $response); + } + } + public function callRouteFilter($filter, $parameters, $route, $request, $response = null) + { + if (!$this->filtering) { + return null; + } + $data = array_merge(array($route, $request, $response), $parameters); + return $this->events->until('router.filter: ' . $filter, $this->cleanFilterParameters($data)); + } + protected function cleanFilterParameters(array $parameters) + { + return array_filter($parameters, function ($p) { + return !is_null($p) && $p !== ''; + }); + } + protected function prepareResponse($request, $response) + { + if (!$response instanceof SymfonyResponse) { + $response = new Response($response); + } + return $response->prepare($request); + } + public function withoutFilters($callback) + { + $this->disableFilters(); + call_user_func($callback); + $this->enableFilters(); + } + public function enableFilters() + { + $this->filtering = true; + } + public function disableFilters() + { + $this->filtering = false; + } + public function input($key, $default = null) + { + return $this->current()->parameter($key, $default); + } + public function getCurrentRoute() + { + return $this->current(); + } + public function current() + { + return $this->current; + } + public function currentRouteName() + { + return $this->current() ? $this->current()->getName() : null; + } + public function is() + { + foreach (func_get_args() as $pattern) { + if (str_is($pattern, $this->currentRouteName())) { + return true; + } + } + return false; + } + public function currentRouteNamed($name) + { + return $this->current() ? $this->current()->getName() == $name : false; + } + public function currentRouteAction() + { + $action = $this->current()->getAction(); + return isset($action['controller']) ? $action['controller'] : null; + } + public function uses() + { + foreach (func_get_args() as $pattern) { + if (str_is($pattern, $this->currentRouteAction())) { + return true; + } + } + return false; + } + public function currentRouteUses($action) + { + return $this->currentRouteAction() == $action; + } + public function getCurrentRequest() + { + return $this->currentRequest; + } + public function getRoutes() + { + return $this->routes; + } + public function getControllerDispatcher() + { + if (is_null($this->controllerDispatcher)) { + $this->controllerDispatcher = new ControllerDispatcher($this, $this->container); + } + return $this->controllerDispatcher; + } + public function setControllerDispatcher(ControllerDispatcher $dispatcher) + { + $this->controllerDispatcher = $dispatcher; + } + public function getInspector() + { + return $this->inspector ?: ($this->inspector = new ControllerInspector()); + } + public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + return $this->dispatch(Request::createFromBase($request)); + } +} +namespace Illuminate\Routing; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Routing\Matching\UriValidator; +use Illuminate\Routing\Matching\HostValidator; +use Illuminate\Routing\Matching\MethodValidator; +use Illuminate\Routing\Matching\SchemeValidator; +use Symfony\Component\Routing\Route as SymfonyRoute; +class Route +{ + protected $uri; + protected $methods; + protected $action; + protected $defaults = array(); + protected $wheres = array(); + protected $parameters; + protected $parameterNames; + protected $compiled; + protected static $validators; + public function __construct($methods, $uri, $action) + { + $this->uri = $uri; + $this->methods = (array) $methods; + $this->action = $this->parseAction($action); + if (isset($this->action['prefix'])) { + $this->prefix($this->action['prefix']); + } + } + public function run() + { + $parameters = array_filter($this->parameters(), function ($p) { + return isset($p); + }); + return call_user_func_array($this->action['uses'], $parameters); + } + public function matches(Request $request, $includingMethod = true) + { + $this->compileRoute(); + foreach ($this->getValidators() as $validator) { + if (!$includingMethod && $validator instanceof MethodValidator) { + continue; + } + if (!$validator->matches($this, $request)) { + return false; + } + } + return true; + } + protected function compileRoute() + { + $optionals = $this->extractOptionalParameters(); + $uri = preg_replace('/\\{(\\w+?)\\?\\}/', '{$1}', $this->uri); + $this->compiled = with(new SymfonyRoute($uri, $optionals, $this->wheres, array(), $this->domain() ?: ''))->compile(); + } + protected function extractOptionalParameters() + { + preg_match_all('/\\{(\\w+?)\\?\\}/', $this->uri, $matches); + $optional = array(); + if (isset($matches[1])) { + foreach ($matches[1] as $key) { + $optional[$key] = null; + } + } + return $optional; + } + public function beforeFilters() + { + if (!isset($this->action['before'])) { + return array(); + } + return $this->parseFilters($this->action['before']); + } + public function afterFilters() + { + if (!isset($this->action['after'])) { + return array(); + } + return $this->parseFilters($this->action['after']); + } + public static function parseFilters($filters) + { + return array_build(static::explodeFilters($filters), function ($key, $value) { + return Route::parseFilter($value); + }); + } + protected static function explodeFilters($filters) + { + if (is_array($filters)) { + return static::explodeArrayFilters($filters); + } + return explode('|', $filters); + } + protected static function explodeArrayFilters(array $filters) + { + $results = array(); + foreach ($filters as $filter) { + $results = array_merge($results, explode('|', $filter)); + } + return $results; + } + public static function parseFilter($filter) + { + if (!str_contains($filter, ':')) { + return array($filter, array()); + } + return static::parseParameterFilter($filter); + } + protected static function parseParameterFilter($filter) + { + list($name, $parameters) = explode(':', $filter, 2); + return array($name, explode(',', $parameters)); + } + public function getParameter($name, $default = null) + { + return $this->parameter($name, $default); + } + public function parameter($name, $default = null) + { + return array_get($this->parameters(), $name) ?: $default; + } + public function setParameter($name, $value) + { + $this->parameters(); + $this->parameters[$name] = $value; + } + public function forgetParameter($name) + { + $this->parameters(); + unset($this->parameters[$name]); + } + public function parameters() + { + if (isset($this->parameters)) { + return array_map(function ($value) { + return is_string($value) ? rawurldecode($value) : $value; + }, $this->parameters); + } + throw new \LogicException('Route is not bound.'); + } + public function parametersWithoutNulls() + { + return array_filter($this->parameters(), function ($p) { + return !is_null($p); + }); + } + public function parameterNames() + { + if (isset($this->parameterNames)) { + return $this->parameterNames; + } + return $this->parameterNames = $this->compileParameterNames(); + } + protected function compileParameterNames() + { + preg_match_all('/\\{(.*?)\\}/', $this->domain() . $this->uri, $matches); + return array_map(function ($m) { + return trim($m, '?'); + }, $matches[1]); + } + public function bind(Request $request) + { + $this->compileRoute(); + $this->bindParameters($request); + return $this; + } + public function bindParameters(Request $request) + { + $params = $this->matchToKeys(array_slice($this->bindPathParameters($request), 1)); + if (!is_null($this->compiled->getHostRegex())) { + $params = $this->bindHostParameters($request, $params); + } + return $this->parameters = $this->replaceDefaults($params); + } + protected function bindPathParameters(Request $request) + { + preg_match($this->compiled->getRegex(), '/' . $request->decodedPath(), $matches); + return $matches; + } + protected function bindHostParameters(Request $request, $parameters) + { + preg_match($this->compiled->getHostRegex(), $request->getHost(), $matches); + return array_merge($this->matchToKeys(array_slice($matches, 1)), $parameters); + } + protected function matchToKeys(array $matches) + { + if (count($this->parameterNames()) == 0) { + return array(); + } + $parameters = array_intersect_key($matches, array_flip($this->parameterNames())); + return array_filter($parameters, function ($value) { + return is_string($value) && strlen($value) > 0; + }); + } + protected function replaceDefaults(array $parameters) + { + foreach ($parameters as $key => &$value) { + $value = isset($value) ? $value : array_get($this->defaults, $key); + } + return $parameters; + } + protected function parseAction($action) + { + if ($action instanceof Closure) { + return array('uses' => $action); + } elseif (!isset($action['uses'])) { + $action['uses'] = $this->findClosure($action); + } + return $action; + } + protected function findClosure(array $action) + { + return array_first($action, function ($key, $value) { + return $value instanceof Closure; + }); + } + public static function getValidators() + { + if (isset(static::$validators)) { + return static::$validators; + } + return static::$validators = array(new MethodValidator(), new SchemeValidator(), new HostValidator(), new UriValidator()); + } + public function before($filters) + { + return $this->addFilters('before', $filters); + } + public function after($filters) + { + return $this->addFilters('after', $filters); + } + protected function addFilters($type, $filters) + { + if (isset($this->action[$type])) { + $this->action[$type] .= '|' . $filters; + } else { + $this->action[$type] = $filters; + } + return $this; + } + public function defaults($key, $value) + { + $this->defaults[$key] = $value; + return $this; + } + public function where($name, $expression = null) + { + foreach ($this->parseWhere($name, $expression) as $name => $expression) { + $this->wheres[$name] = $expression; + } + return $this; + } + protected function parseWhere($name, $expression) + { + return is_array($name) ? $name : array($name => $expression); + } + protected function whereArray(array $wheres) + { + foreach ($wheres as $name => $expression) { + $this->where($name, $expression); + } + return $this; + } + public function prefix($prefix) + { + $this->uri = trim($prefix, '/') . '/' . trim($this->uri, '/'); + return $this; + } + public function getPath() + { + return $this->uri(); + } + public function uri() + { + return $this->uri; + } + public function getMethods() + { + return $this->methods(); + } + public function methods() + { + return $this->methods; + } + public function httpOnly() + { + return in_array('http', $this->action, true); + } + public function httpsOnly() + { + return $this->secure(); + } + public function secure() + { + return in_array('https', $this->action, true); + } + public function domain() + { + return array_get($this->action, 'domain'); + } + public function getUri() + { + return $this->uri; + } + public function setUri($uri) + { + $this->uri = $uri; + return $this; + } + public function getPrefix() + { + return array_get($this->action, 'prefix'); + } + public function getName() + { + return array_get($this->action, 'as'); + } + public function getActionName() + { + return array_get($this->action, 'controller', 'Closure'); + } + public function getAction() + { + return $this->action; + } + public function setAction(array $action) + { + $this->action = $action; + return $this; + } + public function getCompiled() + { + return $this->compiled; + } +} +namespace Illuminate\Routing; + +use Countable; +use ArrayIterator; +use IteratorAggregate; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; +class RouteCollection implements Countable, IteratorAggregate +{ + protected $routes = array(); + protected $allRoutes = array(); + protected $nameList = array(); + protected $actionList = array(); + public function add(Route $route) + { + $this->addToCollections($route); + $this->addLookups($route); + return $route; + } + protected function addToCollections($route) + { + foreach ($route->methods() as $method) { + $this->routes[$method][$route->domain() . $route->getUri()] = $route; + } + $this->allRoutes[$method . $route->domain() . $route->getUri()] = $route; + } + protected function addLookups($route) + { + $action = $route->getAction(); + if (isset($action['as'])) { + $this->nameList[$action['as']] = $route; + } + if (isset($action['controller'])) { + $this->addToActionList($action, $route); + } + } + protected function addToActionList($action, $route) + { + if (!isset($this->actionList[$action['controller']])) { + $this->actionList[$action['controller']] = $route; + } + } + public function match(Request $request) + { + $routes = $this->get($request->getMethod()); + $route = $this->check($routes, $request); + if (!is_null($route)) { + return $route->bind($request); + } + $others = $this->checkForAlternateVerbs($request); + if (count($others) > 0) { + return $this->getOtherMethodsRoute($request, $others); + } + throw new NotFoundHttpException(); + } + protected function checkForAlternateVerbs($request) + { + $methods = array_diff(Router::$verbs, array($request->getMethod())); + $others = array(); + foreach ($methods as $method) { + if (!is_null($this->check($this->get($method), $request, false))) { + $others[] = $method; + } + } + return $others; + } + protected function getOtherMethodsRoute($request, array $others) + { + if ($request->method() == 'OPTIONS') { + return with(new Route('OPTIONS', $request->path(), function () use($others) { + return new Response('', 200, array('Allow' => implode(',', $others))); + }))->bind($request); + } else { + $this->methodNotAllowed($others); + } + } + protected function methodNotAllowed(array $others) + { + throw new MethodNotAllowedHttpException($others); + } + protected function check(array $routes, $request, $includingMethod = true) + { + return array_first($routes, function ($key, $value) use($request, $includingMethod) { + return $value->matches($request, $includingMethod); + }); + } + protected function get($method = null) + { + if (is_null($method)) { + return $this->getRoutes(); + } + return array_get($this->routes, $method, array()); + } + public function hasNamedRoute($name) + { + return !is_null($this->getByName($name)); + } + public function getByName($name) + { + return isset($this->nameList[$name]) ? $this->nameList[$name] : null; + } + public function getByAction($action) + { + return isset($this->actionList[$action]) ? $this->actionList[$action] : null; + } + public function getRoutes() + { + return array_values($this->allRoutes); + } + public function getIterator() + { + return new ArrayIterator($this->getRoutes()); + } + public function count() + { + return count($this->getRoutes()); + } +} +namespace Illuminate\Routing; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Container\Container; +class ControllerDispatcher +{ + protected $filterer; + protected $container; + public function __construct(RouteFiltererInterface $filterer, Container $container = null) + { + $this->filterer = $filterer; + $this->container = $container; + } + public function dispatch(Route $route, Request $request, $controller, $method) + { + $instance = $this->makeController($controller); + $this->assignAfter($instance, $route, $request, $method); + $response = $this->before($instance, $route, $request, $method); + if (is_null($response)) { + $response = $this->call($instance, $route, $method); + } + return $response; + } + protected function makeController($controller) + { + Controller::setFilterer($this->filterer); + return $this->container->make($controller); + } + protected function call($instance, $route, $method) + { + $parameters = $route->parametersWithoutNulls(); + return $instance->callAction($method, $parameters); + } + protected function before($instance, $route, $request, $method) + { + foreach ($instance->getBeforeFilters() as $filter) { + if ($this->filterApplies($filter, $request, $method)) { + $response = $this->callFilter($filter, $route, $request); + if (!is_null($response)) { + return $response; + } + } + } + } + protected function assignAfter($instance, $route, $request, $method) + { + foreach ($instance->getAfterFilters() as $filter) { + if ($this->filterApplies($filter, $request, $method)) { + $route->after($this->getAssignableAfter($filter)); + } + } + } + protected function getAssignableAfter($filter) + { + return $filter['original'] instanceof Closure ? $filter['filter'] : $filter['original']; + } + protected function filterApplies($filter, $request, $method) + { + foreach (array('Only', 'Except', 'On') as $type) { + if ($this->{"filterFails{$type}"}($filter, $request, $method)) { + return false; + } + } + return true; + } + protected function filterFailsOnly($filter, $request, $method) + { + if (!isset($filter['options']['only'])) { + return false; + } + return !in_array($method, (array) $filter['options']['only']); + } + protected function filterFailsExcept($filter, $request, $method) + { + if (!isset($filter['options']['except'])) { + return false; + } + return in_array($method, (array) $filter['options']['except']); + } + protected function filterFailsOn($filter, $request, $method) + { + $on = array_get($filter, 'options.on', null); + if (is_null($on)) { + return false; + } + if (is_string($on)) { + $on = explode('|', $on); + } + return !in_array(strtolower($request->getMethod()), $on); + } + protected function callFilter($filter, $route, $request) + { + extract($filter); + return $this->filterer->callRouteFilter($filter, $parameters, $route, $request); + } +} +namespace Illuminate\Routing; + +use Illuminate\Http\Request; +use InvalidArgumentException; +class UrlGenerator +{ + protected $routes; + protected $request; + protected $forcedRoot; + protected $forceSchema; + protected $dontEncode = array('%2F' => '/', '%40' => '@', '%3A' => ':', '%3B' => ';', '%2C' => ',', '%3D' => '=', '%2B' => '+', '%21' => '!', '%2A' => '*', '%7C' => '|'); + public function __construct(RouteCollection $routes, Request $request) + { + $this->routes = $routes; + $this->setRequest($request); + } + public function full() + { + return $this->request->fullUrl(); + } + public function current() + { + return $this->to($this->request->getPathInfo()); + } + public function previous() + { + return $this->to($this->request->headers->get('referer')); + } + public function to($path, $extra = array(), $secure = null) + { + if ($this->isValidUrl($path)) { + return $path; + } + $scheme = $this->getScheme($secure); + $tail = implode('/', array_map('rawurlencode', (array) $extra)); + $root = $this->getRootUrl($scheme); + return $this->trimUrl($root, $path, $tail); + } + public function secure($path, $parameters = array()) + { + return $this->to($path, $parameters, true); + } + public function asset($path, $secure = null) + { + if ($this->isValidUrl($path)) { + return $path; + } + $root = $this->getRootUrl($this->getScheme($secure)); + return $this->removeIndex($root) . '/' . trim($path, '/'); + } + protected function removeIndex($root) + { + $i = 'index.php'; + return str_contains($root, $i) ? str_replace('/' . $i, '', $root) : $root; + } + public function secureAsset($path) + { + return $this->asset($path, true); + } + protected function getScheme($secure) + { + if (is_null($secure)) { + return $this->forceSchema ?: $this->request->getScheme() . '://'; + } else { + return $secure ? 'https://' : 'http://'; + } + } + public function forceSchema($schema) + { + $this->forceSchema = $schema . '://'; + } + public function route($name, $parameters = array(), $absolute = true, $route = null) + { + $route = $route ?: $this->routes->getByName($name); + $parameters = (array) $parameters; + if (!is_null($route)) { + return $this->toRoute($route, $parameters, $absolute); + } else { + throw new InvalidArgumentException("Route [{$name}] not defined."); + } + } + protected function toRoute($route, array $parameters, $absolute) + { + $domain = $this->getRouteDomain($route, $parameters); + $uri = strtr(rawurlencode($this->trimUrl($root = $this->replaceRoot($route, $domain, $parameters), $this->replaceRouteParameters($route->uri(), $parameters))), $this->dontEncode) . $this->getRouteQueryString($parameters); + return $absolute ? $uri : '/' . ltrim(str_replace($root, '', $uri), '/'); + } + protected function replaceRoot($route, $domain, &$parameters) + { + return $this->replaceRouteParameters($this->getRouteRoot($route, $domain), $parameters); + } + protected function replaceRouteParameters($path, array &$parameters) + { + if (count($parameters)) { + $path = preg_replace_sub('/\\{.*?\\}/', $parameters, $this->replaceNamedParameters($path, $parameters)); + } + return trim(preg_replace('/\\{.*?\\?\\}/', '', $path), '/'); + } + protected function replaceNamedParameters($path, &$parameters) + { + return preg_replace_callback('/\\{(.*?)\\??\\}/', function ($m) use(&$parameters) { + return isset($parameters[$m[1]]) ? array_pull($parameters, $m[1]) : $m[0]; + }, $path); + } + protected function getRouteQueryString(array $parameters) + { + if (count($parameters) == 0) { + return ''; + } + $query = http_build_query($keyed = $this->getStringParameters($parameters)); + if (count($keyed) < count($parameters)) { + $query .= '&' . implode('&', $this->getNumericParameters($parameters)); + } + return '?' . trim($query, '&'); + } + protected function getStringParameters(array $parameters) + { + return array_where($parameters, function ($k, $v) { + return is_string($k); + }); + } + protected function getNumericParameters(array $parameters) + { + return array_where($parameters, function ($k, $v) { + return is_numeric($k); + }); + } + protected function getRouteDomain($route, &$parameters) + { + return $route->domain() ? $this->formatDomain($route, $parameters) : null; + } + protected function formatDomain($route, &$parameters) + { + return $this->addPortToDomain($this->getDomainAndScheme($route)); + } + protected function getDomainAndScheme($route) + { + return $this->getRouteScheme($route) . $route->domain(); + } + protected function addPortToDomain($domain) + { + if (in_array($this->request->getPort(), array('80', '443'))) { + return $domain; + } else { + return $domain .= ':' . $this->request->getPort(); + } + } + protected function getRouteRoot($route, $domain) + { + return $this->getRootUrl($this->getRouteScheme($route), $domain); + } + protected function getRouteScheme($route) + { + if ($route->httpOnly()) { + return $this->getScheme(false); + } elseif ($route->httpsOnly()) { + return $this->getScheme(true); + } else { + return $this->getScheme(null); + } + } + public function action($action, $parameters = array(), $absolute = true) + { + return $this->route($action, $parameters, $absolute, $this->routes->getByAction($action)); + } + protected function getRootUrl($scheme, $root = null) + { + if (is_null($root)) { + $root = $this->forcedRoot ?: $this->request->root(); + } + $start = starts_with($root, 'http://') ? 'http://' : 'https://'; + return preg_replace('~' . $start . '~', $scheme, $root, 1); + } + public function forceRootUrl($root) + { + $this->forcedRoot = $root; + } + public function isValidUrl($path) + { + if (starts_with($path, array('#', '//', 'mailto:', 'tel:'))) { + return true; + } + return filter_var($path, FILTER_VALIDATE_URL) !== false; + } + protected function trimUrl($root, $path, $tail = '') + { + return trim($root . '/' . trim($path . '/' . $tail, '/'), '/'); + } + public function getRequest() + { + return $this->request; + } + public function setRequest(Request $request) + { + $this->request = $request; + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +interface ValidatorInterface +{ + public function matches(Route $route, Request $request); +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class HostValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + if (is_null($route->getCompiled()->getHostRegex())) { + return true; + } + return preg_match($route->getCompiled()->getHostRegex(), $request->getHost()); + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class MethodValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + return in_array($request->getMethod(), $route->methods()); + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class SchemeValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + if ($route->httpOnly()) { + return !$request->secure(); + } elseif ($route->secure()) { + return $request->secure(); + } + return true; + } +} +namespace Illuminate\Routing\Matching; + +use Illuminate\Http\Request; +use Illuminate\Routing\Route; +class UriValidator implements ValidatorInterface +{ + public function matches(Route $route, Request $request) + { + $path = $request->path() == '/' ? '/' : '/' . $request->path(); + return preg_match($route->getCompiled()->getRegex(), rawurldecode($path)); + } +} +namespace Illuminate\Workbench; + +use Illuminate\Support\ServiceProvider; +use Illuminate\Workbench\Console\WorkbenchMakeCommand; +class WorkbenchServiceProvider extends ServiceProvider +{ + protected $defer = false; + public function register() + { + $this->app->bindShared('package.creator', function ($app) { + return new PackageCreator($app['files']); + }); + $this->app->bindShared('command.workbench', function ($app) { + return new WorkbenchMakeCommand($app['package.creator']); + }); + $this->commands('command.workbench'); + } + public function provides() + { + return array('package.creator', 'command.workbench'); + } +} +namespace Illuminate\Events; + +use Illuminate\Container\Container; +class Dispatcher +{ + protected $container; + protected $listeners = array(); + protected $wildcards = array(); + protected $sorted = array(); + protected $firing = array(); + public function __construct(Container $container = null) + { + $this->container = $container ?: new Container(); + } + public function listen($events, $listener, $priority = 0) + { + foreach ((array) $events as $event) { + if (str_contains($event, '*')) { + return $this->setupWildcardListen($event, $listener); + } + $this->listeners[$event][$priority][] = $this->makeListener($listener); + unset($this->sorted[$event]); + } + } + protected function setupWildcardListen($event, $listener) + { + $this->wildcards[$event][] = $this->makeListener($listener); + } + public function hasListeners($eventName) + { + return isset($this->listeners[$eventName]); + } + public function queue($event, $payload = array()) + { + $this->listen($event . '_queue', function () use($event, $payload) { + $this->fire($event, $payload); + }); + } + public function subscribe($subscriber) + { + $subscriber = $this->resolveSubscriber($subscriber); + $subscriber->subscribe($this); + } + protected function resolveSubscriber($subscriber) + { + if (is_string($subscriber)) { + return $this->container->make($subscriber); + } + return $subscriber; + } + public function until($event, $payload = array()) + { + return $this->fire($event, $payload, true); + } + public function flush($event) + { + $this->fire($event . '_queue'); + } + public function firing() + { + return last($this->firing); + } + public function fire($event, $payload = array(), $halt = false) + { + $responses = array(); + if (!is_array($payload)) { + $payload = array($payload); + } + $this->firing[] = $event; + foreach ($this->getListeners($event) as $listener) { + $response = call_user_func_array($listener, $payload); + if (!is_null($response) && $halt) { + array_pop($this->firing); + return $response; + } + if ($response === false) { + break; + } + $responses[] = $response; + } + array_pop($this->firing); + return $halt ? null : $responses; + } + public function getListeners($eventName) + { + $wildcards = $this->getWildcardListeners($eventName); + if (!isset($this->sorted[$eventName])) { + $this->sortListeners($eventName); + } + return array_merge($this->sorted[$eventName], $wildcards); + } + protected function getWildcardListeners($eventName) + { + $wildcards = array(); + foreach ($this->wildcards as $key => $listeners) { + if (str_is($key, $eventName)) { + $wildcards = array_merge($wildcards, $listeners); + } + } + return $wildcards; + } + protected function sortListeners($eventName) + { + $this->sorted[$eventName] = array(); + if (isset($this->listeners[$eventName])) { + krsort($this->listeners[$eventName]); + $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]); + } + } + public function makeListener($listener) + { + if (is_string($listener)) { + $listener = $this->createClassListener($listener); + } + return $listener; + } + public function createClassListener($listener) + { + $container = $this->container; + return function () use($listener, $container) { + $segments = explode('@', $listener); + $method = count($segments) == 2 ? $segments[1] : 'handle'; + $callable = array($container->make($segments[0]), $method); + $data = func_get_args(); + return call_user_func_array($callable, $data); + }; + } + public function forget($event) + { + unset($this->listeners[$event]); + unset($this->sorted[$event]); + } +} +namespace Illuminate\Database\Eloquent; + +use DateTime; +use ArrayAccess; +use Carbon\Carbon; +use LogicException; +use JsonSerializable; +use Illuminate\Events\Dispatcher; +use Illuminate\Database\Eloquent\Relations\Pivot; +use Illuminate\Database\Eloquent\Relations\HasOne; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; +use Illuminate\Database\Eloquent\Relations\Relation; +use Illuminate\Database\Eloquent\Relations\MorphOne; +use Illuminate\Database\Eloquent\Relations\MorphMany; +use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Query\Builder as QueryBuilder; +use Illuminate\Database\Eloquent\Relations\MorphToMany; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; +use Illuminate\Database\Eloquent\Relations\HasManyThrough; +use Illuminate\Database\ConnectionResolverInterface as Resolver; +abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface, JsonSerializable +{ + protected $connection; + protected $table; + protected $primaryKey = 'id'; + protected $perPage = 15; + public $incrementing = true; + public $timestamps = true; + protected $attributes = array(); + protected $original = array(); + protected $relations = array(); + protected $hidden = array(); + protected $visible = array(); + protected $appends = array(); + protected $fillable = array(); + protected $guarded = array('*'); + protected $dates = array(); + protected $touches = array(); + protected $observables = array(); + protected $with = array(); + protected $morphClass; + public $exists = false; + public static $snakeAttributes = true; + protected static $resolver; + protected static $dispatcher; + protected static $booted = array(); + protected static $globalScopes = array(); + protected static $unguarded = false; + protected static $mutatorCache = array(); + public static $manyMethods = array('belongsToMany', 'morphToMany', 'morphedByMany'); + const CREATED_AT = 'created_at'; + const UPDATED_AT = 'updated_at'; + public function __construct(array $attributes = array()) + { + $this->bootIfNotBooted(); + $this->syncOriginal(); + $this->fill($attributes); + } + protected function bootIfNotBooted() + { + if (!isset(static::$booted[get_class($this)])) { + static::$booted[get_class($this)] = true; + $this->fireModelEvent('booting', false); + static::boot(); + $this->fireModelEvent('booted', false); + } + } + protected static function boot() + { + $class = get_called_class(); + static::$mutatorCache[$class] = array(); + foreach (get_class_methods($class) as $method) { + if (preg_match('/^get(.+)Attribute$/', $method, $matches)) { + if (static::$snakeAttributes) { + $matches[1] = snake_case($matches[1]); + } + static::$mutatorCache[$class][] = lcfirst($matches[1]); + } + } + static::bootTraits(); + } + protected static function bootTraits() + { + foreach (class_uses(get_called_class()) as $trait) { + if (method_exists(get_called_class(), $method = 'boot' . class_basename($trait))) { + forward_static_call(array(get_called_class(), $method)); + } + } + } + public static function addGlobalScope(ScopeInterface $scope) + { + static::$globalScopes[get_called_class()][get_class($scope)] = $scope; + } + public static function hasGlobalScope($scope) + { + return !is_null(static::getGlobalScope($scope)); + } + public static function getGlobalScope($scope) + { + return array_first(static::$globalScopes[get_called_class()], function ($key, $value) use($scope) { + return $scope instanceof $value; + }); + } + public function getGlobalScopes() + { + return array_get(static::$globalScopes, get_class($this), array()); + } + public static function observe($class) + { + $instance = new static(); + $className = get_class($class); + foreach ($instance->getObservableEvents() as $event) { + if (method_exists($class, $event)) { + static::registerModelEvent($event, $className . '@' . $event); + } + } + } + public function fill(array $attributes) + { + $totallyGuarded = $this->totallyGuarded(); + foreach ($this->fillableFromArray($attributes) as $key => $value) { + $key = $this->removeTableFromKey($key); + if ($this->isFillable($key)) { + $this->setAttribute($key, $value); + } elseif ($totallyGuarded) { + throw new MassAssignmentException($key); + } + } + return $this; + } + protected function fillableFromArray(array $attributes) + { + if (count($this->fillable) > 0 && !static::$unguarded) { + return array_intersect_key($attributes, array_flip($this->fillable)); + } + return $attributes; + } + public function newInstance($attributes = array(), $exists = false) + { + $model = new static((array) $attributes); + $model->exists = $exists; + return $model; + } + public function newFromBuilder($attributes = array()) + { + $instance = $this->newInstance(array(), true); + $instance->setRawAttributes((array) $attributes, true); + return $instance; + } + public static function hydrate(array $items, $connection = null) + { + $collection = with($instance = new static())->newCollection(); + foreach ($items as $item) { + $model = $instance->newFromBuilder($item); + if (!is_null($connection)) { + $model->setConnection($connection); + } + $collection->push($model); + } + return $collection; + } + public static function hydrateRaw($query, $bindings = array(), $connection = null) + { + $instance = new static(); + if (!is_null($connection)) { + $instance->setConnection($connection); + } + $items = $instance->getConnection()->select($query, $bindings); + return static::hydrate($items, $connection); + } + public static function create(array $attributes) + { + $model = new static($attributes); + $model->save(); + return $model; + } + public static function firstOrCreate(array $attributes) + { + if (!is_null($instance = static::firstByAttributes($attributes))) { + return $instance; + } + return static::create($attributes); + } + public static function firstOrNew(array $attributes) + { + if (!is_null($instance = static::firstByAttributes($attributes))) { + return $instance; + } + return new static($attributes); + } + protected static function firstByAttributes($attributes) + { + $query = static::query(); + foreach ($attributes as $key => $value) { + $query->where($key, $value); + } + return $query->first() ?: null; + } + public static function query() + { + return with(new static())->newQuery(); + } + public static function on($connection = null) + { + $instance = new static(); + $instance->setConnection($connection); + return $instance->newQuery(); + } + public static function all($columns = array('*')) + { + $instance = new static(); + return $instance->newQuery()->get($columns); + } + public static function find($id, $columns = array('*')) + { + if (is_array($id) && empty($id)) { + return new Collection(); + } + $instance = new static(); + return $instance->newQuery()->find($id, $columns); + } + public static function findOrNew($id, $columns = array('*')) + { + if (!is_null($model = static::find($id, $columns))) { + return $model; + } + return new static($columns); + } + public static function findOrFail($id, $columns = array('*')) + { + if (!is_null($model = static::find($id, $columns))) { + return $model; + } + throw with(new ModelNotFoundException())->setModel(get_called_class()); + } + public function load($relations) + { + if (is_string($relations)) { + $relations = func_get_args(); + } + $query = $this->newQuery()->with($relations); + $query->eagerLoadRelations(array($this)); + return $this; + } + public static function with($relations) + { + if (is_string($relations)) { + $relations = func_get_args(); + } + $instance = new static(); + return $instance->newQuery()->with($relations); + } + public function hasOne($related, $foreignKey = null, $localKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $instance = new $related(); + $localKey = $localKey ?: $this->getKeyName(); + return new HasOne($instance->newQuery(), $this, $instance->getTable() . '.' . $foreignKey, $localKey); + } + public function morphOne($related, $name, $type = null, $id = null, $localKey = null) + { + $instance = new $related(); + list($type, $id) = $this->getMorphs($name, $type, $id); + $table = $instance->getTable(); + $localKey = $localKey ?: $this->getKeyName(); + return new MorphOne($instance->newQuery(), $this, $table . '.' . $type, $table . '.' . $id, $localKey); + } + public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null) + { + if (is_null($relation)) { + list(, $caller) = debug_backtrace(false); + $relation = $caller['function']; + } + if (is_null($foreignKey)) { + $foreignKey = snake_case($relation) . '_id'; + } + $instance = new $related(); + $query = $instance->newQuery(); + $otherKey = $otherKey ?: $instance->getKeyName(); + return new BelongsTo($query, $this, $foreignKey, $otherKey, $relation); + } + public function morphTo($name = null, $type = null, $id = null) + { + if (is_null($name)) { + list(, $caller) = debug_backtrace(false); + $name = snake_case($caller['function']); + } + list($type, $id) = $this->getMorphs($name, $type, $id); + if (is_null($class = $this->{$type})) { + return new MorphTo($this->newQuery(), $this, $id, null, $type, $name); + } else { + $instance = new $class(); + return new MorphTo(with($instance)->newQuery(), $this, $id, $instance->getKeyName(), $type, $name); + } + } + public function hasMany($related, $foreignKey = null, $localKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $instance = new $related(); + $localKey = $localKey ?: $this->getKeyName(); + return new HasMany($instance->newQuery(), $this, $instance->getTable() . '.' . $foreignKey, $localKey); + } + public function hasManyThrough($related, $through, $firstKey = null, $secondKey = null) + { + $through = new $through(); + $firstKey = $firstKey ?: $this->getForeignKey(); + $secondKey = $secondKey ?: $through->getForeignKey(); + return new HasManyThrough(with(new $related())->newQuery(), $this, $through, $firstKey, $secondKey); + } + public function morphMany($related, $name, $type = null, $id = null, $localKey = null) + { + $instance = new $related(); + list($type, $id) = $this->getMorphs($name, $type, $id); + $table = $instance->getTable(); + $localKey = $localKey ?: $this->getKeyName(); + return new MorphMany($instance->newQuery(), $this, $table . '.' . $type, $table . '.' . $id, $localKey); + } + public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null, $relation = null) + { + if (is_null($relation)) { + $relation = $this->getBelongsToManyCaller(); + } + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $instance = new $related(); + $otherKey = $otherKey ?: $instance->getForeignKey(); + if (is_null($table)) { + $table = $this->joiningTable($related); + } + $query = $instance->newQuery(); + return new BelongsToMany($query, $this, $table, $foreignKey, $otherKey, $relation); + } + public function morphToMany($related, $name, $table = null, $foreignKey = null, $otherKey = null, $inverse = false) + { + $caller = $this->getBelongsToManyCaller(); + $foreignKey = $foreignKey ?: $name . '_id'; + $instance = new $related(); + $otherKey = $otherKey ?: $instance->getForeignKey(); + $query = $instance->newQuery(); + $table = $table ?: str_plural($name); + return new MorphToMany($query, $this, $name, $table, $foreignKey, $otherKey, $caller, $inverse); + } + public function morphedByMany($related, $name, $table = null, $foreignKey = null, $otherKey = null) + { + $foreignKey = $foreignKey ?: $this->getForeignKey(); + $otherKey = $otherKey ?: $name . '_id'; + return $this->morphToMany($related, $name, $table, $foreignKey, $otherKey, true); + } + protected function getBelongsToManyCaller() + { + $self = __FUNCTION__; + $caller = array_first(debug_backtrace(false), function ($key, $trace) use($self) { + $caller = $trace['function']; + return !in_array($caller, Model::$manyMethods) && $caller != $self; + }); + return !is_null($caller) ? $caller['function'] : null; + } + public function joiningTable($related) + { + $base = snake_case(class_basename($this)); + $related = snake_case(class_basename($related)); + $models = array($related, $base); + sort($models); + return strtolower(implode('_', $models)); + } + public static function destroy($ids) + { + $count = 0; + $ids = is_array($ids) ? $ids : func_get_args(); + $instance = new static(); + $key = $instance->getKeyName(); + foreach ($instance->whereIn($key, $ids)->get() as $model) { + if ($model->delete()) { + $count++; + } + } + return $count; + } + public function delete() + { + if (is_null($this->primaryKey)) { + throw new \Exception('No primary key defined on model.'); + } + if ($this->exists) { + if ($this->fireModelEvent('deleting') === false) { + return false; + } + $this->touchOwners(); + $this->performDeleteOnModel(); + $this->exists = false; + $this->fireModelEvent('deleted', false); + return true; + } + } + protected function performDeleteOnModel() + { + $this->newQuery()->where($this->getKeyName(), $this->getKey())->delete(); + } + public static function saving($callback) + { + static::registerModelEvent('saving', $callback); + } + public static function saved($callback) + { + static::registerModelEvent('saved', $callback); + } + public static function updating($callback) + { + static::registerModelEvent('updating', $callback); + } + public static function updated($callback) + { + static::registerModelEvent('updated', $callback); + } + public static function creating($callback) + { + static::registerModelEvent('creating', $callback); + } + public static function created($callback) + { + static::registerModelEvent('created', $callback); + } + public static function deleting($callback) + { + static::registerModelEvent('deleting', $callback); + } + public static function deleted($callback) + { + static::registerModelEvent('deleted', $callback); + } + public static function flushEventListeners() + { + if (!isset(static::$dispatcher)) { + return; + } + $instance = new static(); + foreach ($instance->getObservableEvents() as $event) { + static::$dispatcher->forget("eloquent.{$event}: " . get_called_class()); + } + } + protected static function registerModelEvent($event, $callback) + { + if (isset(static::$dispatcher)) { + $name = get_called_class(); + static::$dispatcher->listen("eloquent.{$event}: {$name}", $callback); + } + } + public function getObservableEvents() + { + return array_merge(array('creating', 'created', 'updating', 'updated', 'deleting', 'deleted', 'saving', 'saved', 'restoring', 'restored'), $this->observables); + } + protected function increment($column, $amount = 1) + { + return $this->incrementOrDecrement($column, $amount, 'increment'); + } + protected function decrement($column, $amount = 1) + { + return $this->incrementOrDecrement($column, $amount, 'decrement'); + } + protected function incrementOrDecrement($column, $amount, $method) + { + $query = $this->newQuery(); + if (!$this->exists) { + return $query->{$method}($column, $amount); + } + return $query->where($this->getKeyName(), $this->getKey())->{$method}($column, $amount); + } + public function update(array $attributes = array()) + { + if (!$this->exists) { + return $this->newQuery()->update($attributes); + } + return $this->fill($attributes)->save(); + } + public function push() + { + if (!$this->save()) { + return false; + } + foreach ($this->relations as $models) { + foreach (Collection::make($models) as $model) { + if (!$model->push()) { + return false; + } + } + } + return true; + } + public function save(array $options = array()) + { + $query = $this->newQueryWithoutScopes(); + if ($this->fireModelEvent('saving') === false) { + return false; + } + if ($this->exists) { + $saved = $this->performUpdate($query); + } else { + $saved = $this->performInsert($query); + } + if ($saved) { + $this->finishSave($options); + } + return $saved; + } + protected function finishSave(array $options) + { + $this->syncOriginal(); + $this->fireModelEvent('saved', false); + if (array_get($options, 'touch', true)) { + $this->touchOwners(); + } + } + protected function performUpdate(Builder $query) + { + $dirty = $this->getDirty(); + if (count($dirty) > 0) { + if ($this->fireModelEvent('updating') === false) { + return false; + } + if ($this->timestamps) { + $this->updateTimestamps(); + } + $dirty = $this->getDirty(); + if (count($dirty) > 0) { + $this->setKeysForSaveQuery($query)->update($dirty); + $this->fireModelEvent('updated', false); + } + } + return true; + } + protected function performInsert(Builder $query) + { + if ($this->fireModelEvent('creating') === false) { + return false; + } + if ($this->timestamps) { + $this->updateTimestamps(); + } + $attributes = $this->attributes; + if ($this->incrementing) { + $this->insertAndSetId($query, $attributes); + } else { + $query->insert($attributes); + } + $this->exists = true; + $this->fireModelEvent('created', false); + return true; + } + protected function insertAndSetId(Builder $query, $attributes) + { + $id = $query->insertGetId($attributes, $keyName = $this->getKeyName()); + $this->setAttribute($keyName, $id); + } + public function touchOwners() + { + foreach ($this->touches as $relation) { + $this->{$relation}()->touch(); + } + } + public function touches($relation) + { + return in_array($relation, $this->touches); + } + protected function fireModelEvent($event, $halt = true) + { + if (!isset(static::$dispatcher)) { + return true; + } + $event = "eloquent.{$event}: " . get_class($this); + $method = $halt ? 'until' : 'fire'; + return static::$dispatcher->{$method}($event, $this); + } + protected function setKeysForSaveQuery(Builder $query) + { + $query->where($this->getKeyName(), '=', $this->getKeyForSaveQuery()); + return $query; + } + protected function getKeyForSaveQuery() + { + if (isset($this->original[$this->getKeyName()])) { + return $this->original[$this->getKeyName()]; + } else { + return $this->getAttribute($this->getKeyName()); + } + } + public function touch() + { + $this->updateTimestamps(); + return $this->save(); + } + protected function updateTimestamps() + { + $time = $this->freshTimestamp(); + if (!$this->isDirty(static::UPDATED_AT)) { + $this->setUpdatedAt($time); + } + if (!$this->exists && !$this->isDirty(static::CREATED_AT)) { + $this->setCreatedAt($time); + } + } + public function setCreatedAt($value) + { + $this->{static::CREATED_AT} = $value; + } + public function setUpdatedAt($value) + { + $this->{static::UPDATED_AT} = $value; + } + public function getCreatedAtColumn() + { + return static::CREATED_AT; + } + public function getUpdatedAtColumn() + { + return static::UPDATED_AT; + } + public function freshTimestamp() + { + return new Carbon(); + } + public function freshTimestampString() + { + return $this->fromDateTime($this->freshTimestamp()); + } + public function newQuery() + { + $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder()); + $builder->setModel($this)->with($this->with); + return $this->applyGlobalScopes($builder); + } + public function newQueryWithoutScope($scope) + { + $this->getGlobalScope($scope)->remove($builder = $this->newQuery(), $this); + return $builder; + } + public function newQueryWithoutScopes() + { + return $this->removeGlobalScopes($this->newQuery()); + } + public function applyGlobalScopes($builder) + { + foreach ($this->getGlobalScopes() as $scope) { + $scope->apply($builder, $this); + } + return $builder; + } + public function removeGlobalScopes($builder) + { + foreach ($this->getGlobalScopes() as $scope) { + $scope->remove($builder, $this); + } + return $builder; + } + public function newEloquentBuilder($query) + { + return new Builder($query); + } + protected function newBaseQueryBuilder() + { + $conn = $this->getConnection(); + $grammar = $conn->getQueryGrammar(); + return new QueryBuilder($conn, $grammar, $conn->getPostProcessor()); + } + public function newCollection(array $models = array()) + { + return new Collection($models); + } + public function newPivot(Model $parent, array $attributes, $table, $exists) + { + return new Pivot($parent, $attributes, $table, $exists); + } + public function getTable() + { + if (isset($this->table)) { + return $this->table; + } + return str_replace('\\', '', snake_case(str_plural(class_basename($this)))); + } + public function setTable($table) + { + $this->table = $table; + } + public function getKey() + { + return $this->getAttribute($this->getKeyName()); + } + public function getKeyName() + { + return $this->primaryKey; + } + public function getQualifiedKeyName() + { + return $this->getTable() . '.' . $this->getKeyName(); + } + public function usesTimestamps() + { + return $this->timestamps; + } + protected function getMorphs($name, $type, $id) + { + $type = $type ?: $name . '_type'; + $id = $id ?: $name . '_id'; + return array($type, $id); + } + public function getMorphClass() + { + return $this->morphClass ?: get_class($this); + } + public function getPerPage() + { + return $this->perPage; + } + public function setPerPage($perPage) + { + $this->perPage = $perPage; + } + public function getForeignKey() + { + return snake_case(class_basename($this)) . '_id'; + } + public function getHidden() + { + return $this->hidden; + } + public function setHidden(array $hidden) + { + $this->hidden = $hidden; + } + public function setVisible(array $visible) + { + $this->visible = $visible; + } + public function setAppends(array $appends) + { + $this->appends = $appends; + } + public function getFillable() + { + return $this->fillable; + } + public function fillable(array $fillable) + { + $this->fillable = $fillable; + return $this; + } + public function guard(array $guarded) + { + $this->guarded = $guarded; + return $this; + } + public static function unguard() + { + static::$unguarded = true; + } + public static function reguard() + { + static::$unguarded = false; + } + public static function setUnguardState($state) + { + static::$unguarded = $state; + } + public function isFillable($key) + { + if (static::$unguarded) { + return true; + } + if (in_array($key, $this->fillable)) { + return true; + } + if ($this->isGuarded($key)) { + return false; + } + return empty($this->fillable) && !starts_with($key, '_'); + } + public function isGuarded($key) + { + return in_array($key, $this->guarded) || $this->guarded == array('*'); + } + public function totallyGuarded() + { + return count($this->fillable) == 0 && $this->guarded == array('*'); + } + protected function removeTableFromKey($key) + { + if (!str_contains($key, '.')) { + return $key; + } + return last(explode('.', $key)); + } + public function getTouchedRelations() + { + return $this->touches; + } + public function setTouchedRelations(array $touches) + { + $this->touches = $touches; + } + public function getIncrementing() + { + return $this->incrementing; + } + public function setIncrementing($value) + { + $this->incrementing = $value; + } + public function toJson($options = 0) + { + return json_encode($this->toArray(), $options); + } + public function jsonSerialize() + { + return $this->toArray(); + } + public function toArray() + { + $attributes = $this->attributesToArray(); + return array_merge($attributes, $this->relationsToArray()); + } + public function attributesToArray() + { + $attributes = $this->getArrayableAttributes(); + foreach ($this->getDates() as $key) { + if (!isset($attributes[$key])) { + continue; + } + $attributes[$key] = (string) $this->asDateTime($attributes[$key]); + } + foreach ($this->getMutatedAttributes() as $key) { + if (!array_key_exists($key, $attributes)) { + continue; + } + $attributes[$key] = $this->mutateAttributeForArray($key, $attributes[$key]); + } + foreach ($this->appends as $key) { + $attributes[$key] = $this->mutateAttributeForArray($key, null); + } + return $attributes; + } + protected function getArrayableAttributes() + { + return $this->getArrayableItems($this->attributes); + } + public function relationsToArray() + { + $attributes = array(); + foreach ($this->getArrayableRelations() as $key => $value) { + if (in_array($key, $this->hidden)) { + continue; + } + if ($value instanceof ArrayableInterface) { + $relation = $value->toArray(); + } elseif (is_null($value)) { + $relation = $value; + } + if (static::$snakeAttributes) { + $key = snake_case($key); + } + if (isset($relation) || is_null($value)) { + $attributes[$key] = $relation; + } + } + return $attributes; + } + protected function getArrayableRelations() + { + return $this->getArrayableItems($this->relations); + } + protected function getArrayableItems(array $values) + { + if (count($this->visible) > 0) { + return array_intersect_key($values, array_flip($this->visible)); + } + return array_diff_key($values, array_flip($this->hidden)); + } + public function getAttribute($key) + { + $inAttributes = array_key_exists($key, $this->attributes); + if ($inAttributes || $this->hasGetMutator($key)) { + return $this->getAttributeValue($key); + } + if (array_key_exists($key, $this->relations)) { + return $this->relations[$key]; + } + $camelKey = camel_case($key); + if (method_exists($this, $camelKey)) { + return $this->getRelationshipFromMethod($key, $camelKey); + } + } + protected function getAttributeValue($key) + { + $value = $this->getAttributeFromArray($key); + if ($this->hasGetMutator($key)) { + return $this->mutateAttribute($key, $value); + } elseif (in_array($key, $this->getDates())) { + if ($value) { + return $this->asDateTime($value); + } + } + return $value; + } + protected function getAttributeFromArray($key) + { + if (array_key_exists($key, $this->attributes)) { + return $this->attributes[$key]; + } + } + protected function getRelationshipFromMethod($key, $camelKey) + { + $relations = $this->{$camelKey}(); + if (!$relations instanceof Relation) { + throw new LogicException('Relationship method must return an object of type ' . 'Illuminate\\Database\\Eloquent\\Relations\\Relation'); + } + return $this->relations[$key] = $relations->getResults(); + } + public function hasGetMutator($key) + { + return method_exists($this, 'get' . studly_case($key) . 'Attribute'); + } + protected function mutateAttribute($key, $value) + { + return $this->{'get' . studly_case($key) . 'Attribute'}($value); + } + protected function mutateAttributeForArray($key, $value) + { + $value = $this->mutateAttribute($key, $value); + return $value instanceof ArrayableInterface ? $value->toArray() : $value; + } + public function setAttribute($key, $value) + { + if ($this->hasSetMutator($key)) { + $method = 'set' . studly_case($key) . 'Attribute'; + return $this->{$method}($value); + } elseif (in_array($key, $this->getDates())) { + if ($value) { + $value = $this->fromDateTime($value); + } + } + $this->attributes[$key] = $value; + } + public function hasSetMutator($key) + { + return method_exists($this, 'set' . studly_case($key) . 'Attribute'); + } + public function getDates() + { + $defaults = array(static::CREATED_AT, static::UPDATED_AT); + return array_merge($this->dates, $defaults); + } + public function fromDateTime($value) + { + $format = $this->getDateFormat(); + if ($value instanceof DateTime) { + + } elseif (is_numeric($value)) { + $value = Carbon::createFromTimestamp($value); + } elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $value)) { + $value = Carbon::createFromFormat('Y-m-d', $value)->startOfDay(); + } elseif (!$value instanceof DateTime) { + $value = Carbon::createFromFormat($format, $value); + } + return $value->format($format); + } + protected function asDateTime($value) + { + if (is_numeric($value)) { + return Carbon::createFromTimestamp($value); + } elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $value)) { + return Carbon::createFromFormat('Y-m-d', $value)->startOfDay(); + } elseif (!$value instanceof DateTime) { + $format = $this->getDateFormat(); + return Carbon::createFromFormat($format, $value); + } + return Carbon::instance($value); + } + protected function getDateFormat() + { + return $this->getConnection()->getQueryGrammar()->getDateFormat(); + } + public function replicate() + { + $attributes = array_except($this->attributes, array($this->getKeyName())); + with($instance = new static())->setRawAttributes($attributes); + return $instance->setRelations($this->relations); + } + public function getAttributes() + { + return $this->attributes; + } + public function setRawAttributes(array $attributes, $sync = false) + { + $this->attributes = $attributes; + if ($sync) { + $this->syncOriginal(); + } + } + public function getOriginal($key = null, $default = null) + { + return array_get($this->original, $key, $default); + } + public function syncOriginal() + { + $this->original = $this->attributes; + return $this; + } + public function isDirty($attribute = null) + { + $dirty = $this->getDirty(); + if (is_null($attribute)) { + return count($dirty) > 0; + } else { + return array_key_exists($attribute, $dirty); + } + } + public function getDirty() + { + $dirty = array(); + foreach ($this->attributes as $key => $value) { + if (!array_key_exists($key, $this->original)) { + $dirty[$key] = $value; + } elseif ($value !== $this->original[$key] && !$this->originalIsNumericallyEquivalent($key)) { + $dirty[$key] = $value; + } + } + return $dirty; + } + protected function originalIsNumericallyEquivalent($key) + { + $current = $this->attributes[$key]; + $original = $this->original[$key]; + return is_numeric($current) && is_numeric($original) && strcmp((string) $current, (string) $original) === 0; + } + public function getRelations() + { + return $this->relations; + } + public function getRelation($relation) + { + return $this->relations[$relation]; + } + public function setRelation($relation, $value) + { + $this->relations[$relation] = $value; + return $this; + } + public function setRelations(array $relations) + { + $this->relations = $relations; + return $this; + } + public function getConnection() + { + return static::resolveConnection($this->connection); + } + public function getConnectionName() + { + return $this->connection; + } + public function setConnection($name) + { + $this->connection = $name; + return $this; + } + public static function resolveConnection($connection = null) + { + return static::$resolver->connection($connection); + } + public static function getConnectionResolver() + { + return static::$resolver; + } + public static function setConnectionResolver(Resolver $resolver) + { + static::$resolver = $resolver; + } + public static function unsetConnectionResolver() + { + static::$resolver = null; + } + public static function getEventDispatcher() + { + return static::$dispatcher; + } + public static function setEventDispatcher(Dispatcher $dispatcher) + { + static::$dispatcher = $dispatcher; + } + public static function unsetEventDispatcher() + { + static::$dispatcher = null; + } + public function getMutatedAttributes() + { + $class = get_class($this); + if (isset(static::$mutatorCache[$class])) { + return static::$mutatorCache[get_class($this)]; + } + return array(); + } + public function __get($key) + { + return $this->getAttribute($key); + } + public function __set($key, $value) + { + $this->setAttribute($key, $value); + } + public function offsetExists($offset) + { + return isset($this->{$offset}); + } + public function offsetGet($offset) + { + return $this->{$offset}; + } + public function offsetSet($offset, $value) + { + $this->{$offset} = $value; + } + public function offsetUnset($offset) + { + unset($this->{$offset}); + } + public function __isset($key) + { + return isset($this->attributes[$key]) || isset($this->relations[$key]) || $this->hasGetMutator($key) && !is_null($this->getAttributeValue($key)); + } + public function __unset($key) + { + unset($this->attributes[$key]); + unset($this->relations[$key]); + } + public function __call($method, $parameters) + { + if (in_array($method, array('increment', 'decrement'))) { + return call_user_func_array(array($this, $method), $parameters); + } + $query = $this->newQuery(); + return call_user_func_array(array($query, $method), $parameters); + } + public static function __callStatic($method, $parameters) + { + $instance = new static(); + return call_user_func_array(array($instance, $method), $parameters); + } + public function __toString() + { + return $this->toJson(); + } + public function __wakeup() + { + $this->bootIfNotBooted(); + } +} +namespace Illuminate\Support\Contracts; + +interface ArrayableInterface +{ + public function toArray(); +} +namespace Illuminate\Support\Contracts; + +interface JsonableInterface +{ + public function toJson($options = 0); +} +namespace Illuminate\Database; + +use Illuminate\Database\Connectors\ConnectionFactory; +class DatabaseManager implements ConnectionResolverInterface +{ + protected $app; + protected $factory; + protected $connections = array(); + protected $extensions = array(); + public function __construct($app, ConnectionFactory $factory) + { + $this->app = $app; + $this->factory = $factory; + } + public function connection($name = null) + { + $name = $name ?: $this->getDefaultConnection(); + if (!isset($this->connections[$name])) { + $connection = $this->makeConnection($name); + $this->connections[$name] = $this->prepare($connection); + } + return $this->connections[$name]; + } + public function reconnect($name = null) + { + $name = $name ?: $this->getDefaultConnection(); + $this->disconnect($name); + return $this->connection($name); + } + public function disconnect($name = null) + { + $name = $name ?: $this->getDefaultConnection(); + unset($this->connections[$name]); + } + protected function makeConnection($name) + { + $config = $this->getConfig($name); + if (isset($this->extensions[$name])) { + return call_user_func($this->extensions[$name], $config, $name); + } + $driver = $config['driver']; + if (isset($this->extensions[$driver])) { + return call_user_func($this->extensions[$driver], $config, $name); + } + return $this->factory->make($config, $name); + } + protected function prepare(Connection $connection) + { + $connection->setFetchMode($this->app['config']['database.fetch']); + if ($this->app->bound('events')) { + $connection->setEventDispatcher($this->app['events']); + } + $app = $this->app; + $connection->setCacheManager(function () use($app) { + return $app['cache']; + }); + $connection->setPaginator(function () use($app) { + return $app['paginator']; + }); + return $connection; + } + protected function getConfig($name) + { + $name = $name ?: $this->getDefaultConnection(); + $connections = $this->app['config']['database.connections']; + if (is_null($config = array_get($connections, $name))) { + throw new \InvalidArgumentException("Database [{$name}] not configured."); + } + return $config; + } + public function getDefaultConnection() + { + return $this->app['config']['database.default']; + } + public function setDefaultConnection($name) + { + $this->app['config']['database.default'] = $name; + } + public function extend($name, $resolver) + { + $this->extensions[$name] = $resolver; + } + public function getConnections() + { + return $this->connections; + } + public function __call($method, $parameters) + { + return call_user_func_array(array($this->connection(), $method), $parameters); + } +} +namespace Illuminate\Database; + +interface ConnectionResolverInterface +{ + public function connection($name = null); + public function getDefaultConnection(); + public function setDefaultConnection($name); +} +namespace Illuminate\Database\Connectors; + +use PDO; +use Illuminate\Container\Container; +use Illuminate\Database\MySqlConnection; +use Illuminate\Database\SQLiteConnection; +use Illuminate\Database\PostgresConnection; +use Illuminate\Database\SqlServerConnection; +class ConnectionFactory +{ + protected $container; + public function __construct(Container $container) + { + $this->container = $container; + } + public function make(array $config, $name = null) + { + $config = $this->parseConfig($config, $name); + if (isset($config['read'])) { + return $this->createReadWriteConnection($config); + } else { + return $this->createSingleConnection($config); + } + } + protected function createSingleConnection(array $config) + { + $pdo = $this->createConnector($config)->connect($config); + return $this->createConnection($config['driver'], $pdo, $config['database'], $config['prefix'], $config); + } + protected function createReadWriteConnection(array $config) + { + $connection = $this->createSingleConnection($this->getWriteConfig($config)); + return $connection->setReadPdo($this->createReadPdo($config)); + } + protected function createReadPdo(array $config) + { + $readConfig = $this->getReadConfig($config); + return $this->createConnector($readConfig)->connect($readConfig); + } + protected function getReadConfig(array $config) + { + $readConfig = $this->getReadWriteConfig($config, 'read'); + return $this->mergeReadWriteConfig($config, $readConfig); + } + protected function getWriteConfig(array $config) + { + $writeConfig = $this->getReadWriteConfig($config, 'write'); + return $this->mergeReadWriteConfig($config, $writeConfig); + } + protected function getReadWriteConfig(array $config, $type) + { + if (isset($config[$type][0])) { + return $config[$type][array_rand($config[$type])]; + } else { + return $config[$type]; + } + } + protected function mergeReadWriteConfig(array $config, array $merge) + { + return array_except(array_merge($config, $merge), array('read', 'write')); + } + protected function parseConfig(array $config, $name) + { + return array_add(array_add($config, 'prefix', ''), 'name', $name); + } + public function createConnector(array $config) + { + if (!isset($config['driver'])) { + throw new \InvalidArgumentException('A driver must be specified.'); + } + if ($this->container->bound($key = "db.connector.{$config['driver']}")) { + return $this->container->make($key); + } + switch ($config['driver']) { + case 'mysql': + return new MySqlConnector(); + case 'pgsql': + return new PostgresConnector(); + case 'sqlite': + return new SQLiteConnector(); + case 'sqlsrv': + return new SqlServerConnector(); + } + throw new \InvalidArgumentException("Unsupported driver [{$config['driver']}]"); + } + protected function createConnection($driver, PDO $connection, $database, $prefix = '', array $config = array()) + { + if ($this->container->bound($key = "db.connection.{$driver}")) { + return $this->container->make($key, array($connection, $database, $prefix, $config)); + } + switch ($driver) { + case 'mysql': + return new MySqlConnection($connection, $database, $prefix, $config); + case 'pgsql': + return new PostgresConnection($connection, $database, $prefix, $config); + case 'sqlite': + return new SQLiteConnection($connection, $database, $prefix, $config); + case 'sqlsrv': + return new SqlServerConnection($connection, $database, $prefix, $config); + } + throw new \InvalidArgumentException("Unsupported driver [{$driver}]"); + } +} +namespace Illuminate\Session; + +use Closure; +use Carbon\Carbon; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Middleware implements HttpKernelInterface +{ + protected $app; + protected $manager; + protected $reject; + public function __construct(HttpKernelInterface $app, SessionManager $manager, Closure $reject = null) + { + $this->app = $app; + $this->reject = $reject; + $this->manager = $manager; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $this->checkRequestForArraySessions($request); + if ($this->sessionConfigured()) { + $session = $this->startSession($request); + $request->setSession($session); + } + $response = $this->app->handle($request, $type, $catch); + if ($this->sessionConfigured()) { + $this->closeSession($session); + $this->addCookieToResponse($response, $session); + } + return $response; + } + public function checkRequestForArraySessions(Request $request) + { + if (is_null($this->reject)) { + return; + } + if (call_user_func($this->reject, $request)) { + $this->manager->setDefaultDriver('array'); + } + } + protected function startSession(Request $request) + { + with($session = $this->getSession($request))->setRequestOnHandler($request); + $session->start(); + return $session; + } + protected function closeSession(SessionInterface $session) + { + $session->save(); + $this->collectGarbage($session); + } + protected function getUrl(Request $request) + { + $url = rtrim(preg_replace('/\\?.*/', '', $request->getUri()), '/'); + return $request->getQueryString() ? $url . '?' . $request->getQueryString() : $url; + } + protected function collectGarbage(SessionInterface $session) + { + $config = $this->manager->getSessionConfig(); + if ($this->configHitsLottery($config)) { + $session->getHandler()->gc($this->getLifetimeSeconds()); + } + } + protected function configHitsLottery(array $config) + { + return mt_rand(1, $config['lottery'][1]) <= $config['lottery'][0]; + } + protected function addCookieToResponse(Response $response, SessionInterface $session) + { + $s = $session; + if ($this->sessionIsPersistent($c = $this->manager->getSessionConfig())) { + $secure = array_get($c, 'secure', false); + $response->headers->setCookie(new Cookie($s->getName(), $s->getId(), $this->getCookieLifetime(), $c['path'], $c['domain'], $secure)); + } + } + protected function getLifetimeSeconds() + { + return array_get($this->manager->getSessionConfig(), 'lifetime') * 60; + } + protected function getCookieLifetime() + { + $config = $this->manager->getSessionConfig(); + return $config['expire_on_close'] ? 0 : Carbon::now()->addMinutes($config['lifetime']); + } + protected function sessionConfigured() + { + return !is_null(array_get($this->manager->getSessionConfig(), 'driver')); + } + protected function sessionIsPersistent(array $config = null) + { + $config = $config ?: $this->manager->getSessionConfig(); + return !in_array($config['driver'], array(null, 'array')); + } + public function getSession(Request $request) + { + $session = $this->manager->driver(); + $session->setId($request->cookies->get($session->getName())); + return $session; + } +} +namespace Illuminate\Session; + +use SessionHandlerInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\SessionBagInterface; +use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; +class Store implements SessionInterface +{ + protected $id; + protected $name; + protected $attributes = array(); + protected $bags = array(); + protected $metaBag; + protected $bagData = array(); + protected $handler; + protected $started = false; + public function __construct($name, SessionHandlerInterface $handler, $id = null) + { + $this->name = $name; + $this->handler = $handler; + $this->metaBag = new MetadataBag(); + $this->setId($id ?: $this->generateSessionId()); + } + public function start() + { + $this->loadSession(); + if (!$this->has('_token')) { + $this->regenerateToken(); + } + return $this->started = true; + } + protected function loadSession() + { + $this->attributes = $this->readFromHandler(); + foreach (array_merge($this->bags, array($this->metaBag)) as $bag) { + $this->initializeLocalBag($bag); + $bag->initialize($this->bagData[$bag->getStorageKey()]); + } + } + protected function readFromHandler() + { + $data = $this->handler->read($this->getId()); + return $data ? unserialize($data) : array(); + } + protected function initializeLocalBag($bag) + { + $this->bagData[$bag->getStorageKey()] = $this->get($bag->getStorageKey(), array()); + $this->forget($bag->getStorageKey()); + } + public function getId() + { + return $this->id; + } + public function setId($id) + { + $this->id = $id ?: $this->generateSessionId(); + } + protected function generateSessionId() + { + return sha1(uniqid(true) . str_random(25) . microtime(true)); + } + public function getName() + { + return $this->name; + } + public function setName($name) + { + $this->name = $name; + } + public function invalidate($lifetime = null) + { + $this->attributes = array(); + $this->migrate(); + return true; + } + public function migrate($destroy = false, $lifetime = null) + { + if ($destroy) { + $this->handler->destroy($this->getId()); + } + $this->setExists(false); + $this->id = $this->generateSessionId(); + return true; + } + public function regenerate($destroy = false) + { + return $this->migrate($destroy); + } + public function save() + { + $this->addBagDataToSession(); + $this->ageFlashData(); + $this->handler->write($this->getId(), serialize($this->attributes)); + $this->started = false; + } + protected function addBagDataToSession() + { + foreach (array_merge($this->bags, array($this->metaBag)) as $bag) { + $this->put($bag->getStorageKey(), $this->bagData[$bag->getStorageKey()]); + } + } + public function ageFlashData() + { + foreach ($this->get('flash.old', array()) as $old) { + $this->forget($old); + } + $this->put('flash.old', $this->get('flash.new', array())); + $this->put('flash.new', array()); + } + public function has($name) + { + return !is_null($this->get($name)); + } + public function get($name, $default = null) + { + return array_get($this->attributes, $name, $default); + } + public function pull($key, $default = null) + { + $value = $this->get($key, $default); + $this->forget($key); + return $value; + } + public function hasOldInput($key = null) + { + $old = $this->getOldInput($key); + return is_null($key) ? count($old) > 0 : !is_null($old); + } + public function getOldInput($key = null, $default = null) + { + $input = $this->get('_old_input', array()); + if (is_null($key)) { + return $input; + } + return array_get($input, $key, $default); + } + public function set($name, $value) + { + array_set($this->attributes, $name, $value); + } + public function put($key, $value) + { + if (!is_array($key)) { + $key = array($key => $value); + } + foreach ($key as $arrayKey => $arrayValue) { + $this->set($arrayKey, $arrayValue); + } + } + public function push($key, $value) + { + $array = $this->get($key, array()); + $array[] = $value; + $this->put($key, $array); + } + public function flash($key, $value) + { + $this->put($key, $value); + $this->push('flash.new', $key); + $this->removeFromOldFlashData(array($key)); + } + public function flashInput(array $value) + { + $this->flash('_old_input', $value); + } + public function reflash() + { + $this->mergeNewFlashes($this->get('flash.old', array())); + $this->put('flash.old', array()); + } + public function keep($keys = null) + { + $keys = is_array($keys) ? $keys : func_get_args(); + $this->mergeNewFlashes($keys); + $this->removeFromOldFlashData($keys); + } + protected function mergeNewFlashes(array $keys) + { + $values = array_unique(array_merge($this->get('flash.new', array()), $keys)); + $this->put('flash.new', $values); + } + protected function removeFromOldFlashData(array $keys) + { + $this->put('flash.old', array_diff($this->get('flash.old', array()), $keys)); + } + public function all() + { + return $this->attributes; + } + public function replace(array $attributes) + { + foreach ($attributes as $key => $value) { + $this->put($key, $value); + } + } + public function remove($name) + { + return array_pull($this->attributes, $name); + } + public function forget($key) + { + array_forget($this->attributes, $key); + } + public function clear() + { + $this->attributes = array(); + foreach ($this->bags as $bag) { + $bag->clear(); + } + } + public function flush() + { + $this->clear(); + } + public function isStarted() + { + return $this->started; + } + public function registerBag(SessionBagInterface $bag) + { + $this->bags[$bag->getStorageKey()] = $bag; + } + public function getBag($name) + { + return array_get($this->bags, $name, function () { + throw new \InvalidArgumentException('Bag not registered.'); + }); + } + public function getMetadataBag() + { + return $this->metaBag; + } + public function getBagData($name) + { + return array_get($this->bagData, $name, array()); + } + public function token() + { + return $this->get('_token'); + } + public function getToken() + { + return $this->token(); + } + public function regenerateToken() + { + $this->put('_token', str_random(40)); + } + public function setExists($value) + { + if ($this->handler instanceof ExistenceAwareInterface) { + $this->handler->setExists($value); + } + } + public function getHandler() + { + return $this->handler; + } + public function handlerNeedsRequest() + { + return $this->handler instanceof CookieSessionHandler; + } + public function setRequestOnHandler(Request $request) + { + if ($this->handlerNeedsRequest()) { + $this->handler->setRequest($request); + } + } +} +namespace Illuminate\Session; + +use Illuminate\Support\Manager; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler; +use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; +class SessionManager extends Manager +{ + protected function callCustomCreator($driver) + { + return $this->buildSession(parent::callCustomCreator($driver)); + } + protected function createArrayDriver() + { + return new Store($this->app['config']['session.cookie'], new NullSessionHandler()); + } + protected function createCookieDriver() + { + $lifetime = $this->app['config']['session.lifetime']; + return $this->buildSession(new CookieSessionHandler($this->app['cookie'], $lifetime)); + } + protected function createFileDriver() + { + return $this->createNativeDriver(); + } + protected function createNativeDriver() + { + $path = $this->app['config']['session.files']; + return $this->buildSession(new FileSessionHandler($this->app['files'], $path)); + } + protected function createDatabaseDriver() + { + $connection = $this->getDatabaseConnection(); + $table = $connection->getTablePrefix() . $this->app['config']['session.table']; + return $this->buildSession(new DatabaseSessionHandler($connection, $table)); + } + protected function getDatabaseConnection() + { + $connection = $this->app['config']['session.connection']; + return $this->app['db']->connection($connection); + } + protected function createApcDriver() + { + return $this->createCacheBased('apc'); + } + protected function createMemcachedDriver() + { + return $this->createCacheBased('memcached'); + } + protected function createWincacheDriver() + { + return $this->createCacheBased('wincache'); + } + protected function createRedisDriver() + { + $handler = $this->createCacheHandler('redis'); + $handler->getCache()->getStore()->setConnection($this->app['config']['session.connection']); + return $this->buildSession($handler); + } + protected function createCacheBased($driver) + { + return $this->buildSession($this->createCacheHandler($driver)); + } + protected function createCacheHandler($driver) + { + $minutes = $this->app['config']['session.lifetime']; + return new CacheBasedSessionHandler($this->app['cache']->driver($driver), $minutes); + } + protected function buildSession($handler) + { + return new Store($this->app['config']['session.cookie'], $handler); + } + public function getSessionConfig() + { + return $this->app['config']['session']; + } + public function getDefaultDriver() + { + return $this->app['config']['session.driver']; + } + public function setDefaultDriver($name) + { + $this->app['config']['session.driver'] = $name; + } +} +namespace Illuminate\Support; + +use Closure; +abstract class Manager +{ + protected $app; + protected $customCreators = array(); + protected $drivers = array(); + public function __construct($app) + { + $this->app = $app; + } + public function driver($driver = null) + { + $driver = $driver ?: $this->getDefaultDriver(); + if (!isset($this->drivers[$driver])) { + $this->drivers[$driver] = $this->createDriver($driver); + } + return $this->drivers[$driver]; + } + protected function createDriver($driver) + { + $method = 'create' . ucfirst($driver) . 'Driver'; + if (isset($this->customCreators[$driver])) { + return $this->callCustomCreator($driver); + } elseif (method_exists($this, $method)) { + return $this->{$method}(); + } + throw new \InvalidArgumentException("Driver [{$driver}] not supported."); + } + protected function callCustomCreator($driver) + { + return $this->customCreators[$driver]($this->app); + } + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + return $this; + } + public function getDrivers() + { + return $this->drivers; + } + public function __call($method, $parameters) + { + return call_user_func_array(array($this->driver(), $method), $parameters); + } +} +namespace Illuminate\Cookie; + +use Symfony\Component\HttpFoundation\Cookie; +class CookieJar +{ + protected $path = '/'; + protected $domain = null; + protected $queued = array(); + public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true) + { + list($path, $domain) = $this->getPathAndDomain($path, $domain); + $time = $minutes == 0 ? 0 : time() + $minutes * 60; + return new Cookie($name, $value, $time, $path, $domain, $secure, $httpOnly); + } + public function forever($name, $value, $path = null, $domain = null, $secure = false, $httpOnly = true) + { + return $this->make($name, $value, 2628000, $path, $domain, $secure, $httpOnly); + } + public function forget($name, $path = null, $domain = null) + { + return $this->make($name, null, -2628000, $path, $domain); + } + public function hasQueued($key) + { + return !is_null($this->queued($key)); + } + public function queued($key, $default = null) + { + return array_get($this->queued, $key, $default); + } + public function queue() + { + if (head(func_get_args()) instanceof Cookie) { + $cookie = head(func_get_args()); + } else { + $cookie = call_user_func_array(array($this, 'make'), func_get_args()); + } + $this->queued[$cookie->getName()] = $cookie; + } + public function unqueue($name) + { + unset($this->queued[$name]); + } + protected function getPathAndDomain($path, $domain) + { + return array($path ?: $this->path, $domain ?: $this->domain); + } + public function setDefaultPathAndDomain($path, $domain) + { + list($this->path, $this->domain) = array($path, $domain); + return $this; + } + public function getQueuedCookies() + { + return $this->queued; + } +} +namespace Illuminate\Cookie; + +use Illuminate\Encryption\Encrypter; +use Illuminate\Encryption\DecryptException; +use Symfony\Component\HttpFoundation\Cookie; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Guard implements HttpKernelInterface +{ + protected $app; + protected $encrypter; + public function __construct(HttpKernelInterface $app, Encrypter $encrypter) + { + $this->app = $app; + $this->encrypter = $encrypter; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + return $this->encrypt($this->app->handle($this->decrypt($request), $type, $catch)); + } + protected function decrypt(Request $request) + { + foreach ($request->cookies as $key => $c) { + try { + $request->cookies->set($key, $this->decryptCookie($c)); + } catch (DecryptException $e) { + $request->cookies->set($key, null); + } + } + return $request; + } + protected function decryptCookie($cookie) + { + return is_array($cookie) ? $this->decryptArray($cookie) : $this->encrypter->decrypt($cookie); + } + protected function decryptArray(array $cookie) + { + $decrypted = array(); + foreach ($cookie as $key => $value) { + $decrypted[$key] = $this->encrypter->decrypt($value); + } + return $decrypted; + } + protected function encrypt(Response $response) + { + foreach ($response->headers->getCookies() as $key => $c) { + $encrypted = $this->encrypter->encrypt($c->getValue()); + $response->headers->setCookie($this->duplicate($c, $encrypted)); + } + return $response; + } + protected function duplicate(Cookie $c, $value) + { + return new Cookie($c->getName(), $value, $c->getExpiresTime(), $c->getPath(), $c->getDomain(), $c->isSecure(), $c->isHttpOnly()); + } +} +namespace Illuminate\Cookie; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Queue implements HttpKernelInterface +{ + protected $app; + protected $cookies; + public function __construct(HttpKernelInterface $app, CookieJar $cookies) + { + $this->app = $app; + $this->cookies = $cookies; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + $response = $this->app->handle($request, $type, $catch); + foreach ($this->cookies->getQueuedCookies() as $cookie) { + $response->headers->setCookie($cookie); + } + return $response; + } +} +namespace Illuminate\Encryption; + +use Symfony\Component\Security\Core\Util\StringUtils; +use Symfony\Component\Security\Core\Util\SecureRandom; +class DecryptException extends \RuntimeException +{ + +} +class Encrypter +{ + protected $key; + protected $cipher = MCRYPT_RIJNDAEL_128; + protected $mode = MCRYPT_MODE_CBC; + protected $block = 16; + public function __construct($key) + { + $this->key = $key; + } + public function encrypt($value) + { + $iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer()); + $value = base64_encode($this->padAndMcrypt($value, $iv)); + $mac = $this->hash($iv = base64_encode($iv), $value); + return base64_encode(json_encode(compact('iv', 'value', 'mac'))); + } + protected function padAndMcrypt($value, $iv) + { + $value = $this->addPadding(serialize($value)); + return mcrypt_encrypt($this->cipher, $this->key, $value, $this->mode, $iv); + } + public function decrypt($payload) + { + $payload = $this->getJsonPayload($payload); + $value = base64_decode($payload['value']); + $iv = base64_decode($payload['iv']); + return unserialize($this->stripPadding($this->mcryptDecrypt($value, $iv))); + } + protected function mcryptDecrypt($value, $iv) + { + return mcrypt_decrypt($this->cipher, $this->key, $value, $this->mode, $iv); + } + protected function getJsonPayload($payload) + { + $payload = json_decode(base64_decode($payload), true); + if (!$payload || $this->invalidPayload($payload)) { + throw new DecryptException('Invalid data.'); + } + if (!$this->validMac($payload)) { + throw new DecryptException('MAC is invalid.'); + } + return $payload; + } + protected function validMac(array $payload) + { + $bytes = with(new SecureRandom())->nextBytes(16); + $calcMac = hash_hmac('sha256', $this->hash($payload['iv'], $payload['value']), $bytes, true); + return StringUtils::equals(hash_hmac('sha256', $payload['mac'], $bytes, true), $calcMac); + } + protected function hash($iv, $value) + { + return hash_hmac('sha256', $iv . $value, $this->key); + } + protected function addPadding($value) + { + $pad = $this->block - strlen($value) % $this->block; + return $value . str_repeat(chr($pad), $pad); + } + protected function stripPadding($value) + { + $pad = ord($value[($len = strlen($value)) - 1]); + return $this->paddingIsValid($pad, $value) ? substr($value, 0, $len - $pad) : $value; + } + protected function paddingIsValid($pad, $value) + { + $beforePad = strlen($value) - $pad; + return substr($value, $beforePad) == str_repeat(substr($value, -1), $pad); + } + protected function invalidPayload($data) + { + return !is_array($data) || !isset($data['iv']) || !isset($data['value']) || !isset($data['mac']); + } + protected function getIvSize() + { + return mcrypt_get_iv_size($this->cipher, $this->mode); + } + protected function getRandomizer() + { + if (defined('MCRYPT_DEV_URANDOM')) { + return MCRYPT_DEV_URANDOM; + } + if (defined('MCRYPT_DEV_RANDOM')) { + return MCRYPT_DEV_RANDOM; + } + mt_srand(); + return MCRYPT_RAND; + } + public function setKey($key) + { + $this->key = $key; + } + public function setCipher($cipher) + { + $this->cipher = $cipher; + $this->updateBlockSize(); + } + public function setMode($mode) + { + $this->mode = $mode; + $this->updateBlockSize(); + } + protected function updateBlockSize() + { + $this->block = mcrypt_get_iv_size($this->cipher, $this->mode); + } +} +namespace Illuminate\Support\Facades; + +class Log extends Facade +{ + protected static function getFacadeAccessor() + { + return 'log'; + } +} +namespace Illuminate\Log; + +use Monolog\Logger; +use Illuminate\Support\ServiceProvider; +class LogServiceProvider extends ServiceProvider +{ + protected $defer = true; + public function register() + { + $logger = new Writer(new Logger($this->app['env']), $this->app['events']); + $this->app->instance('log', $logger); + if (isset($this->app['log.setup'])) { + call_user_func($this->app['log.setup'], $logger); + } + } + public function provides() + { + return array('log'); + } +} +namespace Illuminate\Log; + +use Closure; +use Illuminate\Events\Dispatcher; +use Monolog\Handler\StreamHandler; +use Monolog\Logger as MonologLogger; +use Monolog\Formatter\LineFormatter; +use Monolog\Handler\ErrorLogHandler; +use Monolog\Handler\RotatingFileHandler; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; +class Writer +{ + protected $monolog; + protected $levels = array('debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'); + protected $dispatcher; + public function __construct(MonologLogger $monolog, Dispatcher $dispatcher = null) + { + $this->monolog = $monolog; + if (isset($dispatcher)) { + $this->dispatcher = $dispatcher; + } + } + protected function callMonolog($method, $parameters) + { + if (is_array($parameters[0])) { + $parameters[0] = json_encode($parameters[0]); + } + return call_user_func_array(array($this->monolog, $method), $parameters); + } + public function useFiles($path, $level = 'debug') + { + $level = $this->parseLevel($level); + $this->monolog->pushHandler($handler = new StreamHandler($path, $level)); + $handler->setFormatter($this->getDefaultFormatter()); + } + public function useDailyFiles($path, $days = 0, $level = 'debug') + { + $level = $this->parseLevel($level); + $this->monolog->pushHandler($handler = new RotatingFileHandler($path, $days, $level)); + $handler->setFormatter($this->getDefaultFormatter()); + } + public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OPERATING_SYSTEM) + { + $level = $this->parseLevel($level); + $this->monolog->pushHandler($handler = new ErrorLogHandler($messageType, $level)); + $handler->setFormatter($this->getDefaultFormatter()); + } + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true); + } + protected function parseLevel($level) + { + switch ($level) { + case 'debug': + return MonologLogger::DEBUG; + case 'info': + return MonologLogger::INFO; + case 'notice': + return MonologLogger::NOTICE; + case 'warning': + return MonologLogger::WARNING; + case 'error': + return MonologLogger::ERROR; + case 'critical': + return MonologLogger::CRITICAL; + case 'alert': + return MonologLogger::ALERT; + case 'emergency': + return MonologLogger::EMERGENCY; + default: + throw new \InvalidArgumentException('Invalid log level.'); + } + } + public function listen(Closure $callback) + { + if (!isset($this->dispatcher)) { + throw new \RuntimeException('Events dispatcher has not been set.'); + } + $this->dispatcher->listen('illuminate.log', $callback); + } + public function getMonolog() + { + return $this->monolog; + } + public function getEventDispatcher() + { + return $this->dispatcher; + } + public function setEventDispatcher(Dispatcher $dispatcher) + { + $this->dispatcher = $dispatcher; + } + protected function fireLogEvent($level, $message, array $context = array()) + { + if (isset($this->dispatcher)) { + $this->dispatcher->fire('illuminate.log', compact('level', 'message', 'context')); + } + } + public function write() + { + $level = head(func_get_args()); + return call_user_func_array(array($this, $level), array_slice(func_get_args(), 1)); + } + public function __call($method, $parameters) + { + $this->formatParameters($parameters); + if (in_array($method, $this->levels)) { + call_user_func_array(array($this, 'fireLogEvent'), array_merge(array($method), $parameters)); + $method = 'add' . ucfirst($method); + return $this->callMonolog($method, $parameters); + } + throw new \BadMethodCallException("Method [{$method}] does not exist."); + } + protected function formatParameters(&$parameters) + { + if (isset($parameters[0])) { + if (is_array($parameters[0])) { + $parameters[0] = var_export($parameters[0], true); + } elseif ($parameters[0] instanceof JsonableInterface) { + $parameters[0] = $parameters[0]->toJson(); + } elseif ($parameters[0] instanceof ArrayableInterface) { + $parameters[0] = var_export($parameters[0]->toArray(), true); + } + } + } +} +namespace Monolog; + +use Monolog\Handler\HandlerInterface; +use Monolog\Handler\StreamHandler; +use Psr\Log\LoggerInterface; +use Psr\Log\InvalidArgumentException; +class Logger implements LoggerInterface +{ + const DEBUG = 100; + const INFO = 200; + const NOTICE = 250; + const WARNING = 300; + const ERROR = 400; + const CRITICAL = 500; + const ALERT = 550; + const EMERGENCY = 600; + const API = 1; + protected static $levels = array(100 => 'DEBUG', 200 => 'INFO', 250 => 'NOTICE', 300 => 'WARNING', 400 => 'ERROR', 500 => 'CRITICAL', 550 => 'ALERT', 600 => 'EMERGENCY'); + protected static $timezone; + protected $name; + protected $handlers; + protected $processors; + public function __construct($name, array $handlers = array(), array $processors = array()) + { + $this->name = $name; + $this->handlers = $handlers; + $this->processors = $processors; + } + public function getName() + { + return $this->name; + } + public function pushHandler(HandlerInterface $handler) + { + array_unshift($this->handlers, $handler); + } + public function popHandler() + { + if (!$this->handlers) { + throw new \LogicException('You tried to pop from an empty handler stack.'); + } + return array_shift($this->handlers); + } + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), ' . var_export($callback, true) . ' given'); + } + array_unshift($this->processors, $callback); + } + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + return array_shift($this->processors); + } + public function addRecord($level, $message, array $context = array()) + { + if (!$this->handlers) { + $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); + } + if (!static::$timezone) { + static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); + } + $record = array('message' => (string) $message, 'context' => $context, 'level' => $level, 'level_name' => static::getLevelName($level), 'channel' => $this->name, 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone)->setTimezone(static::$timezone), 'extra' => array()); + $handlerKey = null; + foreach ($this->handlers as $key => $handler) { + if ($handler->isHandling($record)) { + $handlerKey = $key; + break; + } + } + if (null === $handlerKey) { + return false; + } + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + while (isset($this->handlers[$handlerKey]) && false === $this->handlers[$handlerKey]->handle($record)) { + $handlerKey++; + } + return true; + } + public function addDebug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + public function addInfo($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + public function addNotice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + public function addWarning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + public function addError($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + public function addCritical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + public function addAlert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + public function addEmergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + public static function getLevels() + { + return array_flip(static::$levels); + } + public static function getLevelName($level) + { + if (!isset(static::$levels[$level])) { + throw new InvalidArgumentException('Level "' . $level . '" is not defined, use one of: ' . implode(', ', array_keys(static::$levels))); + } + return static::$levels[$level]; + } + public function isHandling($level) + { + $record = array('level' => $level); + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + return false; + } + public function log($level, $message, array $context = array()) + { + if (is_string($level) && defined(__CLASS__ . '::' . strtoupper($level))) { + $level = constant(__CLASS__ . '::' . strtoupper($level)); + } + return $this->addRecord($level, $message, $context); + } + public function debug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + public function info($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + public function notice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + public function warn($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + public function warning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + public function err($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + public function error($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + public function crit($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + public function critical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + public function alert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + public function emerg($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + public function emergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } +} +namespace Psr\Log; + +interface LoggerInterface +{ + public function emergency($message, array $context = array()); + public function alert($message, array $context = array()); + public function critical($message, array $context = array()); + public function error($message, array $context = array()); + public function warning($message, array $context = array()); + public function notice($message, array $context = array()); + public function info($message, array $context = array()); + public function debug($message, array $context = array()); + public function log($level, $message, array $context = array()); +} +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +abstract class AbstractHandler implements HandlerInterface +{ + protected $level = Logger::DEBUG; + protected $bubble = true; + protected $formatter; + protected $processors = array(); + public function __construct($level = Logger::DEBUG, $bubble = true) + { + $this->level = $level; + $this->bubble = $bubble; + } + public function isHandling(array $record) + { + return $record['level'] >= $this->level; + } + public function handleBatch(array $records) + { + foreach ($records as $record) { + $this->handle($record); + } + } + public function close() + { + + } + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), ' . var_export($callback, true) . ' given'); + } + array_unshift($this->processors, $callback); + return $this; + } + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + return array_shift($this->processors); + } + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + return $this; + } + public function getFormatter() + { + if (!$this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + return $this->formatter; + } + public function setLevel($level) + { + $this->level = $level; + return $this; + } + public function getLevel() + { + return $this->level; + } + public function setBubble($bubble) + { + $this->bubble = $bubble; + return $this; + } + public function getBubble() + { + return $this->bubble; + } + public function __destruct() + { + try { + $this->close(); + } catch (\Exception $e) { + + } + } + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} +namespace Monolog\Handler; + +abstract class AbstractProcessingHandler extends AbstractHandler +{ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + $record = $this->processRecord($record); + $record['formatted'] = $this->getFormatter()->format($record); + $this->write($record); + return false === $this->bubble; + } + protected abstract function write(array $record); + protected function processRecord(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + return $record; + } +} +namespace Monolog\Handler; + +use Monolog\Logger; +class StreamHandler extends AbstractProcessingHandler +{ + protected $stream; + protected $url; + private $errorMessage; + protected $filePermission; + public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null) + { + parent::__construct($level, $bubble); + if (is_resource($stream)) { + $this->stream = $stream; + } else { + $this->url = $stream; + } + $this->filePermission = $filePermission; + } + public function close() + { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->stream = null; + } + protected function write(array $record) + { + if (!is_resource($this->stream)) { + if (!$this->url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + } + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $this->stream = fopen($this->url, 'a'); + if ($this->filePermission !== null) { + @chmod($this->url, $this->filePermission); + } + restore_error_handler(); + if (!is_resource($this->stream)) { + $this->stream = null; + throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: ' . $this->errorMessage, $this->url)); + } + } + fwrite($this->stream, (string) $record['formatted']); + } + private function customErrorHandler($code, $msg) + { + $this->errorMessage = preg_replace('{^fopen\\(.*?\\): }', '', $msg); + } +} +namespace Monolog\Handler; + +use Monolog\Logger; +class RotatingFileHandler extends StreamHandler +{ + protected $filename; + protected $maxFiles; + protected $mustRotate; + protected $nextRotation; + protected $filenameFormat; + protected $dateFormat; + public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null) + { + $this->filename = $filename; + $this->maxFiles = (int) $maxFiles; + $this->nextRotation = new \DateTime('tomorrow'); + $this->filenameFormat = '{filename}-{date}'; + $this->dateFormat = 'Y-m-d'; + parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission); + } + public function close() + { + parent::close(); + if (true === $this->mustRotate) { + $this->rotate(); + } + } + public function setFilenameFormat($filenameFormat, $dateFormat) + { + $this->filenameFormat = $filenameFormat; + $this->dateFormat = $dateFormat; + $this->url = $this->getTimedFilename(); + $this->close(); + } + protected function write(array $record) + { + if (null === $this->mustRotate) { + $this->mustRotate = !file_exists($this->url); + } + if ($this->nextRotation < $record['datetime']) { + $this->mustRotate = true; + $this->close(); + } + parent::write($record); + } + protected function rotate() + { + $this->url = $this->getTimedFilename(); + $this->nextRotation = new \DateTime('tomorrow'); + if (0 === $this->maxFiles) { + return; + } + $logFiles = glob($this->getGlobPattern()); + if ($this->maxFiles >= count($logFiles)) { + return; + } + usort($logFiles, function ($a, $b) { + return strcmp($b, $a); + }); + foreach (array_slice($logFiles, $this->maxFiles) as $file) { + if (is_writable($file)) { + unlink($file); + } + } + } + protected function getTimedFilename() + { + $fileInfo = pathinfo($this->filename); + $timedFilename = str_replace(array('{filename}', '{date}'), array($fileInfo['filename'], date($this->dateFormat)), $fileInfo['dirname'] . '/' . $this->filenameFormat); + if (!empty($fileInfo['extension'])) { + $timedFilename .= '.' . $fileInfo['extension']; + } + return $timedFilename; + } + protected function getGlobPattern() + { + $fileInfo = pathinfo($this->filename); + $glob = str_replace(array('{filename}', '{date}'), array($fileInfo['filename'], '*'), $fileInfo['dirname'] . '/' . $this->filenameFormat); + if (!empty($fileInfo['extension'])) { + $glob .= '.' . $fileInfo['extension']; + } + return $glob; + } +} +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +interface HandlerInterface +{ + public function isHandling(array $record); + public function handle(array $record); + public function handleBatch(array $records); + public function pushProcessor($callback); + public function popProcessor(); + public function setFormatter(FormatterInterface $formatter); + public function getFormatter(); +} +namespace Illuminate\Support\Facades; + +class App extends Facade +{ + protected static function getFacadeAccessor() + { + return 'app'; + } +} +namespace Illuminate\Exception; + +use Exception; +interface ExceptionDisplayerInterface +{ + public function display(Exception $exception); +} +namespace Illuminate\Exception; + +use Exception; +use Symfony\Component\Debug\ExceptionHandler; +class SymfonyDisplayer implements ExceptionDisplayerInterface +{ + protected $symfony; + public function __construct(ExceptionHandler $symfony) + { + $this->symfony = $symfony; + } + public function display(Exception $exception) + { + return $this->symfony->createResponse($exception); + } +} +namespace Illuminate\Exception; + +use Exception; +use Whoops\Run; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +class WhoopsDisplayer implements ExceptionDisplayerInterface +{ + protected $whoops; + protected $runningInConsole; + public function __construct(Run $whoops, $runningInConsole) + { + $this->whoops = $whoops; + $this->runningInConsole = $runningInConsole; + } + public function display(Exception $exception) + { + $status = $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500; + $headers = $exception instanceof HttpExceptionInterface ? $exception->getHeaders() : array(); + return new Response($this->whoops->handleException($exception), $status, $headers); + } +} +namespace Illuminate\Exception; + +use Closure; +use ErrorException; +use ReflectionFunction; +use Illuminate\Support\Contracts\ResponsePreparerInterface; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +use Symfony\Component\Debug\Exception\FatalErrorException as FatalError; +class Handler +{ + protected $responsePreparer; + protected $plainDisplayer; + protected $debugDisplayer; + protected $debug; + protected $handlers = array(); + protected $handled = array(); + public function __construct(ResponsePreparerInterface $responsePreparer, ExceptionDisplayerInterface $plainDisplayer, ExceptionDisplayerInterface $debugDisplayer, $debug = true) + { + $this->debug = $debug; + $this->plainDisplayer = $plainDisplayer; + $this->debugDisplayer = $debugDisplayer; + $this->responsePreparer = $responsePreparer; + } + public function register($environment) + { + $this->registerErrorHandler(); + $this->registerExceptionHandler(); + if ($environment != 'testing') { + $this->registerShutdownHandler(); + } + } + protected function registerErrorHandler() + { + set_error_handler(array($this, 'handleError')); + } + protected function registerExceptionHandler() + { + set_exception_handler(array($this, 'handleUncaughtException')); + } + protected function registerShutdownHandler() + { + register_shutdown_function(array($this, 'handleShutdown')); + } + public function handleError($level, $message, $file = '', $line = 0, $context = array()) + { + if (error_reporting() & $level) { + throw new ErrorException($message, 0, $level, $file, $line); + } + } + public function handleException($exception) + { + $response = $this->callCustomHandlers($exception); + if (!is_null($response)) { + return $this->prepareResponse($response); + } + return $this->displayException($exception); + } + public function handleUncaughtException($exception) + { + $this->handleException($exception)->send(); + } + public function handleShutdown() + { + $error = error_get_last(); + if (!is_null($error)) { + extract($error); + if (!$this->isFatal($type)) { + return; + } + $this->handleException(new FatalError($message, $type, 0, $file, $line))->send(); + } + } + protected function isFatal($type) + { + return in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE)); + } + public function handleConsole($exception) + { + return $this->callCustomHandlers($exception, true); + } + protected function callCustomHandlers($exception, $fromConsole = false) + { + foreach ($this->handlers as $handler) { + if (!$this->handlesException($handler, $exception)) { + continue; + } elseif ($exception instanceof HttpExceptionInterface) { + $code = $exception->getStatusCode(); + } else { + $code = 500; + } + try { + $response = $handler($exception, $code, $fromConsole); + } catch (\Exception $e) { + $response = $this->formatException($e); + } + if (isset($response) && !is_null($response)) { + return $response; + } + } + } + protected function displayException($exception) + { + $displayer = $this->debug ? $this->debugDisplayer : $this->plainDisplayer; + return $displayer->display($exception); + } + protected function handlesException(Closure $handler, $exception) + { + $reflection = new ReflectionFunction($handler); + return $reflection->getNumberOfParameters() == 0 || $this->hints($reflection, $exception); + } + protected function hints(ReflectionFunction $reflection, $exception) + { + $parameters = $reflection->getParameters(); + $expected = $parameters[0]; + return !$expected->getClass() || $expected->getClass()->isInstance($exception); + } + protected function formatException(\Exception $e) + { + if ($this->debug) { + $location = $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine(); + return 'Error in exception handler: ' . $location; + } + return 'Error in exception handler.'; + } + public function error(Closure $callback) + { + array_unshift($this->handlers, $callback); + } + public function pushError(Closure $callback) + { + $this->handlers[] = $callback; + } + protected function prepareResponse($response) + { + return $this->responsePreparer->prepareResponse($response); + } + public function runningInConsole() + { + return php_sapi_name() == 'cli'; + } + public function setDebug($debug) + { + $this->debug = $debug; + } +} +namespace Illuminate\Support\Facades; + +class Route extends Facade +{ + protected static function getFacadeAccessor() + { + return 'router'; + } +} +namespace Illuminate\View\Engines; + +use Closure; +class EngineResolver +{ + protected $resolvers = array(); + protected $resolved = array(); + public function register($engine, Closure $resolver) + { + $this->resolvers[$engine] = $resolver; + } + public function resolve($engine) + { + if (!isset($this->resolved[$engine])) { + $this->resolved[$engine] = call_user_func($this->resolvers[$engine]); + } + return $this->resolved[$engine]; + } +} +namespace Illuminate\View; + +interface ViewFinderInterface +{ + public function find($view); + public function addLocation($location); + public function addNamespace($namespace, $hint); + public function addExtension($extension); +} +namespace Illuminate\View; + +use Illuminate\Filesystem\Filesystem; +class FileViewFinder implements ViewFinderInterface +{ + protected $files; + protected $paths; + protected $views = array(); + protected $hints = array(); + protected $extensions = array('blade.php', 'php'); + const HINT_PATH_DELIMITER = '::'; + public function __construct(Filesystem $files, array $paths, array $extensions = null) + { + $this->files = $files; + $this->paths = $paths; + if (isset($extensions)) { + $this->extensions = $extensions; + } + } + public function find($name) + { + if (isset($this->views[$name])) { + return $this->views[$name]; + } + if ($this->hasHintInformation($name = trim($name))) { + return $this->views[$name] = $this->findNamedPathView($name); + } + return $this->views[$name] = $this->findInPaths($name, $this->paths); + } + protected function findNamedPathView($name) + { + list($namespace, $view) = $this->getNamespaceSegments($name); + return $this->findInPaths($view, $this->hints[$namespace]); + } + protected function getNamespaceSegments($name) + { + $segments = explode(static::HINT_PATH_DELIMITER, $name); + if (count($segments) != 2) { + throw new \InvalidArgumentException("View [{$name}] has an invalid name."); + } + if (!isset($this->hints[$segments[0]])) { + throw new \InvalidArgumentException("No hint path defined for [{$segments[0]}]."); + } + return $segments; + } + protected function findInPaths($name, $paths) + { + foreach ((array) $paths as $path) { + foreach ($this->getPossibleViewFiles($name) as $file) { + if ($this->files->exists($viewPath = $path . '/' . $file)) { + return $viewPath; + } + } + } + throw new \InvalidArgumentException("View [{$name}] not found."); + } + protected function getPossibleViewFiles($name) + { + return array_map(function ($extension) use($name) { + return str_replace('.', '/', $name) . '.' . $extension; + }, $this->extensions); + } + public function addLocation($location) + { + $this->paths[] = $location; + } + public function addNamespace($namespace, $hints) + { + $hints = (array) $hints; + if (isset($this->hints[$namespace])) { + $hints = array_merge($this->hints[$namespace], $hints); + } + $this->hints[$namespace] = $hints; + } + public function prependNamespace($namespace, $hints) + { + $hints = (array) $hints; + if (isset($this->hints[$namespace])) { + $hints = array_merge($hints, $this->hints[$namespace]); + } + $this->hints[$namespace] = $hints; + } + public function addExtension($extension) + { + if (($index = array_search($extension, $this->extensions)) !== false) { + unset($this->extensions[$index]); + } + array_unshift($this->extensions, $extension); + } + public function hasHintInformation($name) + { + return strpos($name, static::HINT_PATH_DELIMITER) > 0; + } + public function getFilesystem() + { + return $this->files; + } + public function getPaths() + { + return $this->paths; + } + public function getHints() + { + return $this->hints; + } + public function getExtensions() + { + return $this->extensions; + } +} +namespace Illuminate\Support\Contracts; + +interface MessageProviderInterface +{ + public function getMessageBag(); +} +namespace Illuminate\Support; + +use Countable; +use JsonSerializable; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; +use Illuminate\Support\Contracts\MessageProviderInterface; +class MessageBag implements ArrayableInterface, Countable, JsonableInterface, MessageProviderInterface, JsonSerializable +{ + protected $messages = array(); + protected $format = ':message'; + public function __construct(array $messages = array()) + { + foreach ($messages as $key => $value) { + $this->messages[$key] = (array) $value; + } + } + public function add($key, $message) + { + if ($this->isUnique($key, $message)) { + $this->messages[$key][] = $message; + } + return $this; + } + public function merge($messages) + { + if ($messages instanceof MessageProviderInterface) { + $messages = $messages->getMessageBag()->getMessages(); + } + $this->messages = array_merge_recursive($this->messages, $messages); + return $this; + } + protected function isUnique($key, $message) + { + $messages = (array) $this->messages; + return !isset($messages[$key]) || !in_array($message, $messages[$key]); + } + public function has($key = null) + { + return $this->first($key) !== ''; + } + public function first($key = null, $format = null) + { + $messages = is_null($key) ? $this->all($format) : $this->get($key, $format); + return count($messages) > 0 ? $messages[0] : ''; + } + public function get($key, $format = null) + { + $format = $this->checkFormat($format); + if (array_key_exists($key, $this->messages)) { + return $this->transform($this->messages[$key], $format, $key); + } + return array(); + } + public function all($format = null) + { + $format = $this->checkFormat($format); + $all = array(); + foreach ($this->messages as $key => $messages) { + $all = array_merge($all, $this->transform($messages, $format, $key)); + } + return $all; + } + protected function transform($messages, $format, $messageKey) + { + $messages = (array) $messages; + foreach ($messages as $key => &$message) { + $replace = array(':message', ':key'); + $message = str_replace($replace, array($message, $messageKey), $format); + } + return $messages; + } + protected function checkFormat($format) + { + return $format === null ? $this->format : $format; + } + public function getMessages() + { + return $this->messages; + } + public function getMessageBag() + { + return $this; + } + public function getFormat() + { + return $this->format; + } + public function setFormat($format = ':message') + { + $this->format = $format; + return $this; + } + public function isEmpty() + { + return !$this->any(); + } + public function any() + { + return $this->count() > 0; + } + public function count() + { + return count($this->messages, COUNT_RECURSIVE) - count($this->messages); + } + public function toArray() + { + return $this->getMessages(); + } + public function jsonSerialize() + { + return $this->toArray(); + } + public function toJson($options = 0) + { + return json_encode($this->toArray(), $options); + } + public function __toString() + { + return $this->toJson(); + } +} +namespace Illuminate\Support\Facades; + +class View extends Facade +{ + protected static function getFacadeAccessor() + { + return 'view'; + } +} +namespace Illuminate\Support\Contracts; + +interface RenderableInterface +{ + public function render(); +} +namespace Illuminate\View; + +use ArrayAccess; +use Closure; +use Illuminate\Support\MessageBag; +use Illuminate\View\Engines\EngineInterface; +use Illuminate\Support\Contracts\MessageProviderInterface; +use Illuminate\Support\Contracts\ArrayableInterface as Arrayable; +use Illuminate\Support\Contracts\RenderableInterface as Renderable; +class View implements ArrayAccess, Renderable +{ + protected $factory; + protected $engine; + protected $view; + protected $data; + protected $path; + public function __construct(Factory $factory, EngineInterface $engine, $view, $path, $data = array()) + { + $this->view = $view; + $this->path = $path; + $this->engine = $engine; + $this->factory = $factory; + $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data; + } + public function render(Closure $callback = null) + { + $contents = $this->renderContents(); + $response = isset($callback) ? $callback($this, $contents) : null; + $this->factory->flushSectionsIfDoneRendering(); + return $response ?: $contents; + } + protected function renderContents() + { + $this->factory->incrementRender(); + $this->factory->callComposer($this); + $contents = $this->getContents(); + $this->factory->decrementRender(); + return $contents; + } + public function renderSections() + { + $env = $this->factory; + return $this->render(function ($view) use($env) { + return $env->getSections(); + }); + } + protected function getContents() + { + return $this->engine->get($this->path, $this->gatherData()); + } + protected function gatherData() + { + $data = array_merge($this->factory->getShared(), $this->data); + foreach ($data as $key => $value) { + if ($value instanceof Renderable) { + $data[$key] = $value->render(); + } + } + return $data; + } + public function with($key, $value = null) + { + if (is_array($key)) { + $this->data = array_merge($this->data, $key); + } else { + $this->data[$key] = $value; + } + return $this; + } + public function nest($key, $view, array $data = array()) + { + return $this->with($key, $this->factory->make($view, $data)); + } + public function withErrors($provider) + { + if ($provider instanceof MessageProviderInterface) { + $this->with('errors', $provider->getMessageBag()); + } else { + $this->with('errors', new MessageBag((array) $provider)); + } + return $this; + } + public function getFactory() + { + return $this->factory; + } + public function getEngine() + { + return $this->engine; + } + public function getName() + { + return $this->view; + } + public function getData() + { + return $this->data; + } + public function getPath() + { + return $this->path; + } + public function setPath($path) + { + $this->path = $path; + } + public function offsetExists($key) + { + return array_key_exists($key, $this->data); + } + public function offsetGet($key) + { + return $this->data[$key]; + } + public function offsetSet($key, $value) + { + $this->with($key, $value); + } + public function offsetUnset($key) + { + unset($this->data[$key]); + } + public function &__get($key) + { + return $this->data[$key]; + } + public function __set($key, $value) + { + $this->with($key, $value); + } + public function __isset($key) + { + return isset($this->data[$key]); + } + public function __unset($key) + { + unset($this->data[$key]); + } + public function __call($method, $parameters) + { + if (starts_with($method, 'with')) { + return $this->with(snake_case(substr($method, 4)), $parameters[0]); + } + throw new \BadMethodCallException("Method [{$method}] does not exist on view."); + } + public function __toString() + { + return $this->render(); + } +} +namespace Illuminate\View\Engines; + +interface EngineInterface +{ + public function get($path, array $data = array()); +} +namespace Illuminate\View\Engines; + +use Illuminate\View\Exception; +class PhpEngine implements EngineInterface +{ + public function get($path, array $data = array()) + { + return $this->evaluatePath($path, $data); + } + protected function evaluatePath($__path, $__data) + { + ob_start(); + extract($__data); + try { + include $__path; + } catch (\Exception $e) { + $this->handleViewException($e); + } + return ltrim(ob_get_clean()); + } + protected function handleViewException($e) + { + ob_get_clean(); + throw $e; + } +} +namespace Symfony\Component\HttpFoundation; + +class Response +{ + const HTTP_CONTINUE = 100; + const HTTP_SWITCHING_PROTOCOLS = 101; + const HTTP_PROCESSING = 102; + const HTTP_OK = 200; + const HTTP_CREATED = 201; + const HTTP_ACCEPTED = 202; + const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; + const HTTP_NO_CONTENT = 204; + const HTTP_RESET_CONTENT = 205; + const HTTP_PARTIAL_CONTENT = 206; + const HTTP_MULTI_STATUS = 207; + const HTTP_ALREADY_REPORTED = 208; + const HTTP_IM_USED = 226; + const HTTP_MULTIPLE_CHOICES = 300; + const HTTP_MOVED_PERMANENTLY = 301; + const HTTP_FOUND = 302; + const HTTP_SEE_OTHER = 303; + const HTTP_NOT_MODIFIED = 304; + const HTTP_USE_PROXY = 305; + const HTTP_RESERVED = 306; + const HTTP_TEMPORARY_REDIRECT = 307; + const HTTP_PERMANENTLY_REDIRECT = 308; + const HTTP_BAD_REQUEST = 400; + const HTTP_UNAUTHORIZED = 401; + const HTTP_PAYMENT_REQUIRED = 402; + const HTTP_FORBIDDEN = 403; + const HTTP_NOT_FOUND = 404; + const HTTP_METHOD_NOT_ALLOWED = 405; + const HTTP_NOT_ACCEPTABLE = 406; + const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; + const HTTP_REQUEST_TIMEOUT = 408; + const HTTP_CONFLICT = 409; + const HTTP_GONE = 410; + const HTTP_LENGTH_REQUIRED = 411; + const HTTP_PRECONDITION_FAILED = 412; + const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; + const HTTP_REQUEST_URI_TOO_LONG = 414; + const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; + const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; + const HTTP_EXPECTATION_FAILED = 417; + const HTTP_I_AM_A_TEAPOT = 418; + const HTTP_UNPROCESSABLE_ENTITY = 422; + const HTTP_LOCKED = 423; + const HTTP_FAILED_DEPENDENCY = 424; + const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; + const HTTP_UPGRADE_REQUIRED = 426; + const HTTP_PRECONDITION_REQUIRED = 428; + const HTTP_TOO_MANY_REQUESTS = 429; + const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; + const HTTP_INTERNAL_SERVER_ERROR = 500; + const HTTP_NOT_IMPLEMENTED = 501; + const HTTP_BAD_GATEWAY = 502; + const HTTP_SERVICE_UNAVAILABLE = 503; + const HTTP_GATEWAY_TIMEOUT = 504; + const HTTP_VERSION_NOT_SUPPORTED = 505; + const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; + const HTTP_INSUFFICIENT_STORAGE = 507; + const HTTP_LOOP_DETECTED = 508; + const HTTP_NOT_EXTENDED = 510; + const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; + public $headers; + protected $content; + protected $version; + protected $statusCode; + protected $statusText; + protected $charset; + public static $statusTexts = array(100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported', 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Reserved', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Requested Range Not Satisfiable', 417 => 'Expectation Failed', 418 => 'I\'m a teapot', 422 => 'Unprocessable Entity', 423 => 'Locked', 424 => 'Failed Dependency', 425 => 'Reserved for WebDAV advanced collections expired proposal', 426 => 'Upgrade Required', 428 => 'Precondition Required', 429 => 'Too Many Requests', 431 => 'Request Header Fields Too Large', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', 506 => 'Variant Also Negotiates (Experimental)', 507 => 'Insufficient Storage', 508 => 'Loop Detected', 510 => 'Not Extended', 511 => 'Network Authentication Required'); + public function __construct($content = '', $status = 200, $headers = array()) + { + $this->headers = new ResponseHeaderBag($headers); + $this->setContent($content); + $this->setStatusCode($status); + $this->setProtocolVersion('1.0'); + if (!$this->headers->has('Date')) { + $this->setDate(new \DateTime(null, new \DateTimeZone('UTC'))); + } + } + public static function create($content = '', $status = 200, $headers = array()) + { + return new static($content, $status, $headers); + } + public function __toString() + { + return sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText) . ' +' . $this->headers . ' +' . $this->getContent(); + } + public function __clone() + { + $this->headers = clone $this->headers; + } + public function prepare(Request $request) + { + $headers = $this->headers; + if ($this->isInformational() || in_array($this->statusCode, array(204, 304))) { + $this->setContent(null); + } + if (!$headers->has('Content-Type')) { + $format = $request->getRequestFormat(); + if (null !== $format && ($mimeType = $request->getMimeType($format))) { + $headers->set('Content-Type', $mimeType); + } + } + $charset = $this->charset ?: 'UTF-8'; + if (!$headers->has('Content-Type')) { + $headers->set('Content-Type', 'text/html; charset=' . $charset); + } elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) { + $headers->set('Content-Type', $headers->get('Content-Type') . '; charset=' . $charset); + } + if ($headers->has('Transfer-Encoding')) { + $headers->remove('Content-Length'); + } + if ($request->isMethod('HEAD')) { + $length = $headers->get('Content-Length'); + $this->setContent(null); + if ($length) { + $headers->set('Content-Length', $length); + } + } + if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) { + $this->setProtocolVersion('1.1'); + } + if ('1.0' == $this->getProtocolVersion() && 'no-cache' == $this->headers->get('Cache-Control')) { + $this->headers->set('pragma', 'no-cache'); + $this->headers->set('expires', -1); + } + $this->ensureIEOverSSLCompatibility($request); + return $this; + } + public function sendHeaders() + { + if (headers_sent()) { + return $this; + } + header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); + foreach ($this->headers->allPreserveCase() as $name => $values) { + foreach ($values as $value) { + header($name . ': ' . $value, false, $this->statusCode); + } + } + foreach ($this->headers->getCookies() as $cookie) { + setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); + } + return $this; + } + public function sendContent() + { + echo $this->content; + return $this; + } + public function send() + { + $this->sendHeaders(); + $this->sendContent(); + if (function_exists('fastcgi_finish_request')) { + fastcgi_finish_request(); + } elseif ('cli' !== PHP_SAPI) { + static::closeOutputBuffers(0, true); + flush(); + } + return $this; + } + public function setContent($content) + { + if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) { + throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content))); + } + $this->content = (string) $content; + return $this; + } + public function getContent() + { + return $this->content; + } + public function setProtocolVersion($version) + { + $this->version = $version; + return $this; + } + public function getProtocolVersion() + { + return $this->version; + } + public function setStatusCode($code, $text = null) + { + $this->statusCode = $code = (int) $code; + if ($this->isInvalid()) { + throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); + } + if (null === $text) { + $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : ''; + return $this; + } + if (false === $text) { + $this->statusText = ''; + return $this; + } + $this->statusText = $text; + return $this; + } + public function getStatusCode() + { + return $this->statusCode; + } + public function setCharset($charset) + { + $this->charset = $charset; + return $this; + } + public function getCharset() + { + return $this->charset; + } + public function isCacheable() + { + if (!in_array($this->statusCode, array(200, 203, 300, 301, 302, 404, 410))) { + return false; + } + if ($this->headers->hasCacheControlDirective('no-store') || $this->headers->getCacheControlDirective('private')) { + return false; + } + return $this->isValidateable() || $this->isFresh(); + } + public function isFresh() + { + return $this->getTtl() > 0; + } + public function isValidateable() + { + return $this->headers->has('Last-Modified') || $this->headers->has('ETag'); + } + public function setPrivate() + { + $this->headers->removeCacheControlDirective('public'); + $this->headers->addCacheControlDirective('private'); + return $this; + } + public function setPublic() + { + $this->headers->addCacheControlDirective('public'); + $this->headers->removeCacheControlDirective('private'); + return $this; + } + public function mustRevalidate() + { + return $this->headers->hasCacheControlDirective('must-revalidate') || $this->headers->has('proxy-revalidate'); + } + public function getDate() + { + return $this->headers->getDate('Date', new \DateTime()); + } + public function setDate(\DateTime $date) + { + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Date', $date->format('D, d M Y H:i:s') . ' GMT'); + return $this; + } + public function getAge() + { + if (null !== ($age = $this->headers->get('Age'))) { + return (int) $age; + } + return max(time() - $this->getDate()->format('U'), 0); + } + public function expire() + { + if ($this->isFresh()) { + $this->headers->set('Age', $this->getMaxAge()); + } + return $this; + } + public function getExpires() + { + try { + return $this->headers->getDate('Expires'); + } catch (\RuntimeException $e) { + return \DateTime::createFromFormat(DATE_RFC2822, 'Sat, 01 Jan 00 00:00:00 +0000'); + } + } + public function setExpires(\DateTime $date = null) + { + if (null === $date) { + $this->headers->remove('Expires'); + } else { + $date = clone $date; + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Expires', $date->format('D, d M Y H:i:s') . ' GMT'); + } + return $this; + } + public function getMaxAge() + { + if ($this->headers->hasCacheControlDirective('s-maxage')) { + return (int) $this->headers->getCacheControlDirective('s-maxage'); + } + if ($this->headers->hasCacheControlDirective('max-age')) { + return (int) $this->headers->getCacheControlDirective('max-age'); + } + if (null !== $this->getExpires()) { + return $this->getExpires()->format('U') - $this->getDate()->format('U'); + } + } + public function setMaxAge($value) + { + $this->headers->addCacheControlDirective('max-age', $value); + return $this; + } + public function setSharedMaxAge($value) + { + $this->setPublic(); + $this->headers->addCacheControlDirective('s-maxage', $value); + return $this; + } + public function getTtl() + { + if (null !== ($maxAge = $this->getMaxAge())) { + return $maxAge - $this->getAge(); + } + } + public function setTtl($seconds) + { + $this->setSharedMaxAge($this->getAge() + $seconds); + return $this; + } + public function setClientTtl($seconds) + { + $this->setMaxAge($this->getAge() + $seconds); + return $this; + } + public function getLastModified() + { + return $this->headers->getDate('Last-Modified'); + } + public function setLastModified(\DateTime $date = null) + { + if (null === $date) { + $this->headers->remove('Last-Modified'); + } else { + $date = clone $date; + $date->setTimezone(new \DateTimeZone('UTC')); + $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s') . ' GMT'); + } + return $this; + } + public function getEtag() + { + return $this->headers->get('ETag'); + } + public function setEtag($etag = null, $weak = false) + { + if (null === $etag) { + $this->headers->remove('Etag'); + } else { + if (0 !== strpos($etag, '"')) { + $etag = '"' . $etag . '"'; + } + $this->headers->set('ETag', (true === $weak ? 'W/' : '') . $etag); + } + return $this; + } + public function setCache(array $options) + { + if ($diff = array_diff(array_keys($options), array('etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public'))) { + throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', array_values($diff)))); + } + if (isset($options['etag'])) { + $this->setEtag($options['etag']); + } + if (isset($options['last_modified'])) { + $this->setLastModified($options['last_modified']); + } + if (isset($options['max_age'])) { + $this->setMaxAge($options['max_age']); + } + if (isset($options['s_maxage'])) { + $this->setSharedMaxAge($options['s_maxage']); + } + if (isset($options['public'])) { + if ($options['public']) { + $this->setPublic(); + } else { + $this->setPrivate(); + } + } + if (isset($options['private'])) { + if ($options['private']) { + $this->setPrivate(); + } else { + $this->setPublic(); + } + } + return $this; + } + public function setNotModified() + { + $this->setStatusCode(304); + $this->setContent(null); + foreach (array('Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified') as $header) { + $this->headers->remove($header); + } + return $this; + } + public function hasVary() + { + return null !== $this->headers->get('Vary'); + } + public function getVary() + { + if (!($vary = $this->headers->get('Vary', null, false))) { + return array(); + } + $ret = array(); + foreach ($vary as $item) { + $ret = array_merge($ret, preg_split('/[\\s,]+/', $item)); + } + return $ret; + } + public function setVary($headers, $replace = true) + { + $this->headers->set('Vary', $headers, $replace); + return $this; + } + public function isNotModified(Request $request) + { + if (!$request->isMethodSafe()) { + return false; + } + $lastModified = $request->headers->get('If-Modified-Since'); + $notModified = false; + if ($etags = $request->getEtags()) { + $notModified = (in_array($this->getEtag(), $etags) || in_array('*', $etags)) && (!$lastModified || $this->headers->get('Last-Modified') == $lastModified); + } elseif ($lastModified) { + $notModified = $lastModified == $this->headers->get('Last-Modified'); + } + if ($notModified) { + $this->setNotModified(); + } + return $notModified; + } + public function isInvalid() + { + return $this->statusCode < 100 || $this->statusCode >= 600; + } + public function isInformational() + { + return $this->statusCode >= 100 && $this->statusCode < 200; + } + public function isSuccessful() + { + return $this->statusCode >= 200 && $this->statusCode < 300; + } + public function isRedirection() + { + return $this->statusCode >= 300 && $this->statusCode < 400; + } + public function isClientError() + { + return $this->statusCode >= 400 && $this->statusCode < 500; + } + public function isServerError() + { + return $this->statusCode >= 500 && $this->statusCode < 600; + } + public function isOk() + { + return 200 === $this->statusCode; + } + public function isForbidden() + { + return 403 === $this->statusCode; + } + public function isNotFound() + { + return 404 === $this->statusCode; + } + public function isRedirect($location = null) + { + return in_array($this->statusCode, array(201, 301, 302, 303, 307, 308)) && (null === $location ?: $location == $this->headers->get('Location')); + } + public function isEmpty() + { + return in_array($this->statusCode, array(204, 304)); + } + public static function closeOutputBuffers($targetLevel, $flush) + { + $status = ob_get_status(true); + $level = count($status); + while ($level-- > $targetLevel && (!empty($status[$level]['del']) || isset($status[$level]['flags']) && $status[$level]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE && $status[$level]['flags'] & ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE))) { + if ($flush) { + ob_end_flush(); + } else { + ob_end_clean(); + } + } + } + protected function ensureIEOverSSLCompatibility(Request $request) + { + if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) { + if (intval(preg_replace('/(MSIE )(.*?);/', '$2', $match[0])) < 9) { + $this->headers->remove('Cache-Control'); + } + } + } +} +namespace Illuminate\Http; + +use ArrayObject; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\RenderableInterface; +class Response extends \Symfony\Component\HttpFoundation\Response +{ + use ResponseTrait; + public $original; + public function setContent($content) + { + $this->original = $content; + if ($this->shouldBeJson($content)) { + $this->headers->set('Content-Type', 'application/json'); + $content = $this->morphToJson($content); + } elseif ($content instanceof RenderableInterface) { + $content = $content->render(); + } + return parent::setContent($content); + } + protected function morphToJson($content) + { + if ($content instanceof JsonableInterface) { + return $content->toJson(); + } + return json_encode($content); + } + protected function shouldBeJson($content) + { + return $content instanceof JsonableInterface || $content instanceof ArrayObject || is_array($content); + } + public function getOriginalContent() + { + return $this->original; + } +} +namespace Symfony\Component\HttpFoundation; + +class ResponseHeaderBag extends HeaderBag +{ + const COOKIES_FLAT = 'flat'; + const COOKIES_ARRAY = 'array'; + const DISPOSITION_ATTACHMENT = 'attachment'; + const DISPOSITION_INLINE = 'inline'; + protected $computedCacheControl = array(); + protected $cookies = array(); + protected $headerNames = array(); + public function __construct(array $headers = array()) + { + parent::__construct($headers); + if (!isset($this->headers['cache-control'])) { + $this->set('Cache-Control', ''); + } + } + public function __toString() + { + $cookies = ''; + foreach ($this->getCookies() as $cookie) { + $cookies .= 'Set-Cookie: ' . $cookie . ' +'; + } + ksort($this->headerNames); + return parent::__toString() . $cookies; + } + public function allPreserveCase() + { + return array_combine($this->headerNames, $this->headers); + } + public function replace(array $headers = array()) + { + $this->headerNames = array(); + parent::replace($headers); + if (!isset($this->headers['cache-control'])) { + $this->set('Cache-Control', ''); + } + } + public function set($key, $values, $replace = true) + { + parent::set($key, $values, $replace); + $uniqueKey = strtr(strtolower($key), '_', '-'); + $this->headerNames[$uniqueKey] = $key; + if (in_array($uniqueKey, array('cache-control', 'etag', 'last-modified', 'expires'))) { + $computed = $this->computeCacheControlValue(); + $this->headers['cache-control'] = array($computed); + $this->headerNames['cache-control'] = 'Cache-Control'; + $this->computedCacheControl = $this->parseCacheControl($computed); + } + } + public function remove($key) + { + parent::remove($key); + $uniqueKey = strtr(strtolower($key), '_', '-'); + unset($this->headerNames[$uniqueKey]); + if ('cache-control' === $uniqueKey) { + $this->computedCacheControl = array(); + } + } + public function hasCacheControlDirective($key) + { + return array_key_exists($key, $this->computedCacheControl); + } + public function getCacheControlDirective($key) + { + return array_key_exists($key, $this->computedCacheControl) ? $this->computedCacheControl[$key] : null; + } + public function setCookie(Cookie $cookie) + { + $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; + } + public function removeCookie($name, $path = '/', $domain = null) + { + if (null === $path) { + $path = '/'; + } + unset($this->cookies[$domain][$path][$name]); + if (empty($this->cookies[$domain][$path])) { + unset($this->cookies[$domain][$path]); + if (empty($this->cookies[$domain])) { + unset($this->cookies[$domain]); + } + } + } + public function getCookies($format = self::COOKIES_FLAT) + { + if (!in_array($format, array(self::COOKIES_FLAT, self::COOKIES_ARRAY))) { + throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', array(self::COOKIES_FLAT, self::COOKIES_ARRAY)))); + } + if (self::COOKIES_ARRAY === $format) { + return $this->cookies; + } + $flattenedCookies = array(); + foreach ($this->cookies as $path) { + foreach ($path as $cookies) { + foreach ($cookies as $cookie) { + $flattenedCookies[] = $cookie; + } + } + } + return $flattenedCookies; + } + public function clearCookie($name, $path = '/', $domain = null) + { + $this->setCookie(new Cookie($name, null, 1, $path, $domain)); + } + public function makeDisposition($disposition, $filename, $filenameFallback = '') + { + if (!in_array($disposition, array(self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE))) { + throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); + } + if ('' == $filenameFallback) { + $filenameFallback = $filename; + } + if (!preg_match('/^[\\x20-\\x7e]*$/', $filenameFallback)) { + throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.'); + } + if (false !== strpos($filenameFallback, '%')) { + throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.'); + } + if (false !== strpos($filename, '/') || false !== strpos($filename, '\\') || false !== strpos($filenameFallback, '/') || false !== strpos($filenameFallback, '\\')) { + throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); + } + $output = sprintf('%s; filename="%s"', $disposition, str_replace('"', '\\"', $filenameFallback)); + if ($filename !== $filenameFallback) { + $output .= sprintf('; filename*=utf-8\'\'%s', rawurlencode($filename)); + } + return $output; + } + protected function computeCacheControlValue() + { + if (!$this->cacheControl && !$this->has('ETag') && !$this->has('Last-Modified') && !$this->has('Expires')) { + return 'no-cache'; + } + if (!$this->cacheControl) { + return 'private, must-revalidate'; + } + $header = $this->getCacheControlHeader(); + if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) { + return $header; + } + if (!isset($this->cacheControl['s-maxage'])) { + return $header . ', private'; + } + return $header; + } +} +namespace Symfony\Component\HttpFoundation; + +class Cookie +{ + protected $name; + protected $value; + protected $domain; + protected $expire; + protected $path; + protected $secure; + protected $httpOnly; + public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true) + { + if (preg_match('/[=,; + ]/', $name)) { + throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); + } + if (empty($name)) { + throw new \InvalidArgumentException('The cookie name cannot be empty.'); + } + if ($expire instanceof \DateTime) { + $expire = $expire->format('U'); + } elseif (!is_numeric($expire)) { + $expire = strtotime($expire); + if (false === $expire || -1 === $expire) { + throw new \InvalidArgumentException('The cookie expiration time is not valid.'); + } + } + $this->name = $name; + $this->value = $value; + $this->domain = $domain; + $this->expire = $expire; + $this->path = empty($path) ? '/' : $path; + $this->secure = (bool) $secure; + $this->httpOnly = (bool) $httpOnly; + } + public function __toString() + { + $str = urlencode($this->getName()) . '='; + if ('' === (string) $this->getValue()) { + $str .= 'deleted; expires=' . gmdate('D, d-M-Y H:i:s T', time() - 31536001); + } else { + $str .= urlencode($this->getValue()); + if ($this->getExpiresTime() !== 0) { + $str .= '; expires=' . gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()); + } + } + if ($this->path) { + $str .= '; path=' . $this->path; + } + if ($this->getDomain()) { + $str .= '; domain=' . $this->getDomain(); + } + if (true === $this->isSecure()) { + $str .= '; secure'; + } + if (true === $this->isHttpOnly()) { + $str .= '; httponly'; + } + return $str; + } + public function getName() + { + return $this->name; + } + public function getValue() + { + return $this->value; + } + public function getDomain() + { + return $this->domain; + } + public function getExpiresTime() + { + return $this->expire; + } + public function getPath() + { + return $this->path; + } + public function isSecure() + { + return $this->secure; + } + public function isHttpOnly() + { + return $this->httpOnly; + } + public function isCleared() + { + return $this->expire < time(); + } +} +namespace Whoops; + +use Whoops\Handler\HandlerInterface; +use Whoops\Handler\Handler; +use Whoops\Handler\CallbackHandler; +use Whoops\Exception\Inspector; +use Whoops\Exception\ErrorException; +use InvalidArgumentException; +use Exception; +class Run +{ + const EXCEPTION_HANDLER = 'handleException'; + const ERROR_HANDLER = 'handleError'; + const SHUTDOWN_HANDLER = 'handleShutdown'; + protected $isRegistered; + protected $allowQuit = true; + protected $sendOutput = true; + protected $sendHttpCode = 500; + protected $handlerStack = array(); + protected $silencedPatterns = array(); + public function pushHandler($handler) + { + if (is_callable($handler)) { + $handler = new CallbackHandler($handler); + } + if (!$handler instanceof HandlerInterface) { + throw new InvalidArgumentException('Argument to ' . __METHOD__ . ' must be a callable, or instance of' . 'Whoops\\Handler\\HandlerInterface'); + } + $this->handlerStack[] = $handler; + return $this; + } + public function popHandler() + { + return array_pop($this->handlerStack); + } + public function getHandlers() + { + return $this->handlerStack; + } + public function clearHandlers() + { + $this->handlerStack = array(); + return $this; + } + protected function getInspector(Exception $exception) + { + return new Inspector($exception); + } + public function register() + { + if (!$this->isRegistered) { + class_exists('\\Whoops\\Exception\\ErrorException'); + class_exists('\\Whoops\\Exception\\FrameCollection'); + class_exists('\\Whoops\\Exception\\Frame'); + class_exists('\\Whoops\\Exception\\Inspector'); + set_error_handler(array($this, self::ERROR_HANDLER)); + set_exception_handler(array($this, self::EXCEPTION_HANDLER)); + register_shutdown_function(array($this, self::SHUTDOWN_HANDLER)); + $this->isRegistered = true; + } + return $this; + } + public function unregister() + { + if ($this->isRegistered) { + restore_exception_handler(); + restore_error_handler(); + $this->isRegistered = false; + } + return $this; + } + public function allowQuit($exit = null) + { + if (func_num_args() == 0) { + return $this->allowQuit; + } + return $this->allowQuit = (bool) $exit; + } + public function silenceErrorsInPaths($patterns, $levels = 10240) + { + $this->silencedPatterns = array_merge($this->silencedPatterns, array_map(function ($pattern) use($levels) { + return array('pattern' => $pattern, 'levels' => $levels); + }, (array) $patterns)); + return $this; + } + public function sendHttpCode($code = null) + { + if (func_num_args() == 0) { + return $this->sendHttpCode; + } + if (!$code) { + return $this->sendHttpCode = false; + } + if ($code === true) { + $code = 500; + } + if ($code < 400 || 600 <= $code) { + throw new InvalidArgumentException("Invalid status code '{$code}', must be 4xx or 5xx"); + } + return $this->sendHttpCode = $code; + } + public function writeToOutput($send = null) + { + if (func_num_args() == 0) { + return $this->sendOutput; + } + return $this->sendOutput = (bool) $send; + } + public function handleException(Exception $exception) + { + $inspector = $this->getInspector($exception); + ob_start(); + $handlerResponse = null; + foreach (array_reverse($this->handlerStack) as $handler) { + $handler->setRun($this); + $handler->setInspector($inspector); + $handler->setException($exception); + $handlerResponse = $handler->handle($exception); + if (in_array($handlerResponse, array(Handler::LAST_HANDLER, Handler::QUIT))) { + break; + } + } + $willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit(); + $output = ob_get_clean(); + if ($this->writeToOutput()) { + if ($willQuit) { + while (ob_get_level() > 0) { + ob_end_clean(); + } + } + $this->writeToOutputNow($output); + } + if ($willQuit) { + die(1); + } + return $output; + } + public function handleError($level, $message, $file = null, $line = null) + { + if ($level & error_reporting()) { + foreach ($this->silencedPatterns as $entry) { + $pathMatches = (bool) preg_match($entry['pattern'], $file); + $levelMatches = $level & $entry['levels']; + if ($pathMatches && $levelMatches) { + return true; + } + } + $exception = new ErrorException($message, $level, 0, $file, $line); + if ($this->canThrowExceptions) { + throw $exception; + } else { + $this->handleException($exception); + } + } + } + public function handleShutdown() + { + $this->canThrowExceptions = false; + $error = error_get_last(); + if ($error && $this->isLevelFatal($error['type'])) { + $this->handleError($error['type'], $error['message'], $error['file'], $error['line']); + } + } + private $canThrowExceptions = true; + private function writeToOutputNow($output) + { + if ($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) { + $httpCode = $this->sendHttpCode(); + if (function_exists('http_response_code')) { + http_response_code($httpCode); + } else { + header('X-Ignore-This: 1', true, $httpCode); + } + } + echo $output; + return $this; + } + private static function isLevelFatal($level) + { + return in_array($level, array(E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING)); + } +} +namespace Whoops\Handler; + +use Whoops\Exception\Inspector; +use Whoops\Run; +use Exception; +interface HandlerInterface +{ + public function handle(); + public function setRun(Run $run); + public function setException(Exception $exception); + public function setInspector(Inspector $inspector); +} +namespace Whoops\Handler; + +use Whoops\Handler\HandlerInterface; +use Whoops\Exception\Inspector; +use Whoops\Run; +use Exception; +abstract class Handler implements HandlerInterface +{ + const DONE = 16; + const LAST_HANDLER = 32; + const QUIT = 48; + private $run; + private $inspector; + private $exception; + public function setRun(Run $run) + { + $this->run = $run; + } + protected function getRun() + { + return $this->run; + } + public function setInspector(Inspector $inspector) + { + $this->inspector = $inspector; + } + protected function getInspector() + { + return $this->inspector; + } + public function setException(Exception $exception) + { + $this->exception = $exception; + } + protected function getException() + { + return $this->exception; + } +} +namespace Whoops\Handler; + +use Whoops\Handler\Handler; +use Whoops\Util\TemplateHelper; +use InvalidArgumentException; +use RuntimeException; +class PrettyPageHandler extends Handler +{ + private $searchPaths = array(); + private $resourceCache = array(); + private $customCss = null; + private $extraTables = array(); + private $handleUnconditionally = false; + private $pageTitle = 'Whoops! There was an error.'; + protected $editor; + protected $editors = array('sublime' => 'subl://open?url=file://%file&line=%line', 'textmate' => 'txmt://open?url=file://%file&line=%line', 'emacs' => 'emacs://open?url=file://%file&line=%line', 'macvim' => 'mvim://open/?url=file://%file&line=%line'); + public function __construct() + { + if (ini_get('xdebug.file_link_format') || extension_loaded('xdebug')) { + $this->editors['xdebug'] = function ($file, $line) { + return str_replace(array('%f', '%l'), array($file, $line), ini_get('xdebug.file_link_format')); + }; + } + $this->searchPaths[] = '/var/www/vhosts/mentors/htdocs/vendor/filp/whoops/src/Whoops/Handler' . '/../Resources'; + } + public function handle() + { + if (!$this->handleUnconditionally()) { + if (php_sapi_name() === 'cli') { + if (isset($_ENV['whoops-test'])) { + throw new \Exception('Use handleUnconditionally instead of whoops-test' . ' environment variable'); + } + return Handler::DONE; + } + } + $helper = new TemplateHelper(); + $templateFile = $this->getResource('views/layout.html.php'); + $cssFile = $this->getResource('css/whoops.base.css'); + $zeptoFile = $this->getResource('js/zepto.min.js'); + $jsFile = $this->getResource('js/whoops.base.js'); + if ($this->customCss) { + $customCssFile = $this->getResource($this->customCss); + } + $inspector = $this->getInspector(); + $frames = $inspector->getFrames(); + $vars = array('page_title' => $this->getPageTitle(), 'stylesheet' => file_get_contents($cssFile), 'zepto' => file_get_contents($zeptoFile), 'javascript' => file_get_contents($jsFile), 'header' => $this->getResource('views/header.html.php'), 'frame_list' => $this->getResource('views/frame_list.html.php'), 'frame_code' => $this->getResource('views/frame_code.html.php'), 'env_details' => $this->getResource('views/env_details.html.php'), 'title' => $this->getPageTitle(), 'name' => explode('\\', $inspector->getExceptionName()), 'message' => $inspector->getException()->getMessage(), 'frames' => $frames, 'has_frames' => !!count($frames), 'handler' => $this, 'handlers' => $this->getRun()->getHandlers(), 'tables' => array('Server/Request Data' => $_SERVER, 'GET Data' => $_GET, 'POST Data' => $_POST, 'Files' => $_FILES, 'Cookies' => $_COOKIE, 'Session' => isset($_SESSION) ? $_SESSION : array(), 'Environment Variables' => $_ENV)); + if (isset($customCssFile)) { + $vars['stylesheet'] .= file_get_contents($customCssFile); + } + $extraTables = array_map(function ($table) { + return $table instanceof \Closure ? $table() : $table; + }, $this->getDataTables()); + $vars['tables'] = array_merge($extraTables, $vars['tables']); + $helper->setVariables($vars); + $helper->render($templateFile); + return Handler::QUIT; + } + public function addDataTable($label, array $data) + { + $this->extraTables[$label] = $data; + } + public function addDataTableCallback($label, $callback) + { + if (!is_callable($callback)) { + throw new InvalidArgumentException('Expecting callback argument to be callable'); + } + $this->extraTables[$label] = function () use($callback) { + try { + $result = call_user_func($callback); + return is_array($result) || $result instanceof \Traversable ? $result : array(); + } catch (\Exception $e) { + return array(); + } + }; + } + public function getDataTables($label = null) + { + if ($label !== null) { + return isset($this->extraTables[$label]) ? $this->extraTables[$label] : array(); + } + return $this->extraTables; + } + public function handleUnconditionally($value = null) + { + if (func_num_args() == 0) { + return $this->handleUnconditionally; + } + $this->handleUnconditionally = (bool) $value; + } + public function addEditor($identifier, $resolver) + { + $this->editors[$identifier] = $resolver; + } + public function setEditor($editor) + { + if (!is_callable($editor) && !isset($this->editors[$editor])) { + throw new InvalidArgumentException("Unknown editor identifier: {$editor}. Known editors:" . implode(',', array_keys($this->editors))); + } + $this->editor = $editor; + } + public function getEditorHref($filePath, $line) + { + if ($this->editor === null) { + return false; + } + $editor = $this->editor; + if (is_string($editor)) { + $editor = $this->editors[$editor]; + } + if (is_callable($editor)) { + $editor = call_user_func($editor, $filePath, $line); + } + if (!is_string($editor)) { + throw new InvalidArgumentException(__METHOD__ . ' should always resolve to a string; got something else instead'); + } + $editor = str_replace('%line', rawurlencode($line), $editor); + $editor = str_replace('%file', rawurlencode($filePath), $editor); + return $editor; + } + public function setPageTitle($title) + { + $this->pageTitle = (string) $title; + } + public function getPageTitle() + { + return $this->pageTitle; + } + public function addResourcePath($path) + { + if (!is_dir($path)) { + throw new InvalidArgumentException("'{$path}' is not a valid directory"); + } + array_unshift($this->searchPaths, $path); + } + public function addCustomCss($name) + { + $this->customCss = $name; + } + public function getResourcePaths() + { + return $this->searchPaths; + } + protected function getResource($resource) + { + if (isset($this->resourceCache[$resource])) { + return $this->resourceCache[$resource]; + } + foreach ($this->searchPaths as $path) { + $fullPath = $path . "/{$resource}"; + if (is_file($fullPath)) { + $this->resourceCache[$resource] = $fullPath; + return $fullPath; + } + } + throw new RuntimeException("Could not find resource '{$resource}' in any resource paths." . '(searched: ' . join(', ', $this->searchPaths) . ')'); + } + public function getResourcesPath() + { + $allPaths = $this->getResourcePaths(); + return end($allPaths) ?: null; + } + public function setResourcesPath($resourcesPath) + { + $this->addResourcePath($resourcesPath); + } +} +namespace Whoops\Handler; + +use Whoops\Handler\Handler; +use Whoops\Exception\Formatter; +class JsonResponseHandler extends Handler +{ + private $returnFrames = false; + private $onlyForAjaxRequests = false; + public function addTraceToOutput($returnFrames = null) + { + if (func_num_args() == 0) { + return $this->returnFrames; + } + $this->returnFrames = (bool) $returnFrames; + return $this; + } + public function onlyForAjaxRequests($onlyForAjaxRequests = null) + { + if (func_num_args() == 0) { + return $this->onlyForAjaxRequests; + } + $this->onlyForAjaxRequests = (bool) $onlyForAjaxRequests; + } + private function isAjaxRequest() + { + return !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; + } + public function handle() + { + if ($this->onlyForAjaxRequests() && !$this->isAjaxRequest()) { + return Handler::DONE; + } + $response = array('error' => Formatter::formatExceptionAsDataArray($this->getInspector(), $this->addTraceToOutput())); + if (\Whoops\Util\Misc::canSendHeaders()) { + header('Content-Type: application/json'); + } + echo json_encode($response); + return Handler::QUIT; + } +} +namespace Stack; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +class Builder +{ + private $specs; + public function __construct() + { + $this->specs = new \SplStack(); + } + public function unshift() + { + if (func_num_args() === 0) { + throw new \InvalidArgumentException('Missing argument(s) when calling unshift'); + } + $spec = func_get_args(); + $this->specs->unshift($spec); + return $this; + } + public function push() + { + if (func_num_args() === 0) { + throw new \InvalidArgumentException('Missing argument(s) when calling push'); + } + $spec = func_get_args(); + $this->specs->push($spec); + return $this; + } + public function resolve(HttpKernelInterface $app) + { + $middlewares = array($app); + foreach ($this->specs as $spec) { + $args = $spec; + $firstArg = array_shift($args); + if (is_callable($firstArg)) { + $app = $firstArg($app); + } else { + $kernelClass = $firstArg; + array_unshift($args, $app); + $reflection = new \ReflectionClass($kernelClass); + $app = $reflection->newInstanceArgs($args); + } + array_unshift($middlewares, $app); + } + return new StackedHttpKernel($app, $middlewares); + } +} +namespace Stack; + +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\TerminableInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +class StackedHttpKernel implements HttpKernelInterface, TerminableInterface +{ + private $app; + private $middlewares = array(); + public function __construct(HttpKernelInterface $app, array $middlewares) + { + $this->app = $app; + $this->middlewares = $middlewares; + } + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + return $this->app->handle($request, $type, $catch); + } + public function terminate(Request $request, Response $response) + { + foreach ($this->middlewares as $kernel) { + if ($kernel instanceof TerminableInterface) { + $kernel->terminate($request, $response); + } + } + } +} diff --git a/bootstrap/paths.php b/bootstrap/paths.php old mode 100755 new mode 100644 diff --git a/bootstrap/start.php b/bootstrap/start.php old mode 100755 new mode 100644 index a55def1..84559be --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -26,7 +26,7 @@ $app = new Illuminate\Foundation\Application; $env = $app->detectEnvironment(array( - 'local' => array('your-machine-name'), + 'local' => array('homestead'), )); diff --git a/composer.json b/composer.json old mode 100755 new mode 100644 index bb5662a..4f00769 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["framework", "laravel"], "license": "MIT", "require": { - "laravel/framework": "4.1.*" + "laravel/framework": "4.2.*" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock old mode 100755 new mode 100644 index 76c9a88..0644b1a --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "1629abbb640a9fe0280e95fc215de768", + "hash": "a8c9bc04a5706bf54f2a6d2e62168e90", "packages": [ { "name": "classpreloader/classpreloader", @@ -89,30 +89,37 @@ }, { "name": "filp/whoops", - "version": "1.0.10", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a" + "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/91e3fd4b0812017ffbeb24add55330664e1ea32a", - "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a", + "url": "https://api.github.com/repos/filp/whoops/zipball/ae05259236204ccf904a94e5b0d96df8d4351da5", + "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" + "mockery/mockery": "0.9.*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, "autoload": { "psr-0": { "Whoops": "src/" - } + }, + "classmap": [ + "src/deprecated" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -136,7 +143,7 @@ "whoops", "zf2" ], - "time": "2013-12-04 14:19:30" + "time": "2014-05-13 05:05:11" }, { "name": "ircmaxell/password-compat", @@ -227,44 +234,44 @@ }, { "name": "laravel/framework", - "version": "v4.1.30", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab" + "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", - "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", + "url": "https://api.github.com/repos/laravel/framework/zipball/be75911bf8f7fe81a2db1dd2585324d080289dd5", + "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5", "shasum": "" }, "require": { - "classpreloader/classpreloader": "1.0.*", - "d11wtq/boris": "1.0.*", - "filp/whoops": "1.0.10", - "ircmaxell/password-compat": "1.0.*", - "jeremeamia/superclosure": "1.0.*", - "monolog/monolog": "1.*", - "nesbot/carbon": "1.*", + "classpreloader/classpreloader": "~1.0", + "d11wtq/boris": "~1.0", + "filp/whoops": "1.1.*", + "ircmaxell/password-compat": "~1.0", + "jeremeamia/superclosure": "~1.0", + "monolog/monolog": "~1.6", + "nesbot/carbon": "~1.0", "patchwork/utf8": "1.1.*", - "php": ">=5.3.0", + "php": ">=5.4.0", "phpseclib/phpseclib": "0.3.*", "predis/predis": "0.8.*", - "stack/builder": "1.0.*", - "swiftmailer/swiftmailer": "~5.0", - "symfony/browser-kit": "2.4.*", - "symfony/console": "2.4.*", - "symfony/css-selector": "2.4.*", - "symfony/debug": "2.4.*", - "symfony/dom-crawler": "2.4.*", - "symfony/finder": "2.4.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*", - "symfony/process": "2.4.*", - "symfony/routing": "2.4.*", - "symfony/security-core": "2.4.*", - "symfony/translation": "2.4.*" + "stack/builder": "~1.0", + "swiftmailer/swiftmailer": "~5.1", + "symfony/browser-kit": "2.5.*", + "symfony/console": "2.5.*", + "symfony/css-selector": "2.5.*", + "symfony/debug": "2.5.*", + "symfony/dom-crawler": "2.5.*", + "symfony/finder": "2.5.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*", + "symfony/process": "2.5.*", + "symfony/routing": "2.5.*", + "symfony/security-core": "2.5.*", + "symfony/translation": "2.5.*" }, "replace": { "illuminate/auth": "self.version", @@ -297,11 +304,11 @@ "illuminate/workbench": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "2.6.*", - "iron-io/iron_mq": "1.5.*", - "mockery/mockery": "0.9.*", - "pda/pheanstalk": "2.1.*", - "phpunit/phpunit": "4.0.*" + "aws/aws-sdk-php": "~2.6", + "iron-io/iron_mq": "~1.5", + "mockery/mockery": "~0.9", + "pda/pheanstalk": "~2.1", + "phpunit/phpunit": "~4.0" }, "suggest": { "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." @@ -309,7 +316,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -340,7 +347,7 @@ "framework", "laravel" ], - "time": "2014-06-01 18:30:26" + "time": "2014-06-01 18:14:55" }, { "name": "monolog/monolog", @@ -837,17 +844,17 @@ }, { "name": "symfony/browser-kit", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/BrowserKit", "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07" + "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/5c80003d5772de6120b5429f4b2f6e22957d4a07", - "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/cc1716dafa04277a0c987aee5bce8c3cf8939de3", + "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3", "shasum": "" }, "require": { @@ -864,7 +871,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -890,36 +897,38 @@ ], "description": "Symfony BrowserKit Component", "homepage": "http://symfony.com", - "time": "2014-05-12 09:27:48" + "time": "2014-05-12 09:28:39" }, { "name": "symfony/console", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "24f723436e62598c9dddee2a8573d6992504dc5d" + "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/24f723436e62598c9dddee2a8573d6992504dc5d", - "reference": "24f723436e62598c9dddee2a8573d6992504dc5d", + "url": "https://api.github.com/repos/symfony/Console/zipball/ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", + "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { + "psr/log": "~1.0", "symfony/event-dispatcher": "~2.1" }, "suggest": { + "psr/log": "For using the console logger", "symfony/event-dispatcher": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -945,21 +954,21 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2014-05-14 21:48:29" + "time": "2014-05-22 08:54:24" }, { "name": "symfony/css-selector", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/CssSelector", "source": { "type": "git", "url": "https://github.com/symfony/CssSelector.git", - "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93" + "reference": "bcdd62af59bd3137ede467946a06d41f8644048c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/268d0a51166edaf84dfcf043c57f273685cb7c93", - "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/bcdd62af59bd3137ede467946a06d41f8644048c", + "reference": "bcdd62af59bd3137ede467946a06d41f8644048c", "shasum": "" }, "require": { @@ -968,7 +977,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -998,21 +1007,21 @@ ], "description": "Symfony CssSelector Component", "homepage": "http://symfony.com", - "time": "2014-05-12 09:27:48" + "time": "2014-05-12 09:28:39" }, { "name": "symfony/debug", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Debug", "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c" + "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", - "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", + "url": "https://api.github.com/repos/symfony/Debug/zipball/7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", + "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", "shasum": "" }, "require": { @@ -1029,7 +1038,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1055,21 +1064,21 @@ ], "description": "Symfony Debug Component", "homepage": "http://symfony.com", - "time": "2014-04-30 06:22:28" + "time": "2014-05-25 14:44:21" }, { "name": "symfony/dom-crawler", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/DomCrawler", "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "77881ef11c064a490515a9fb1729b695c632ffe5" + "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/77881ef11c064a490515a9fb1729b695c632ffe5", - "reference": "77881ef11c064a490515a9fb1729b695c632ffe5", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/6cda499120860286fe3d3d2fd631dacb7ae17f92", + "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92", "shasum": "" }, "require": { @@ -1084,7 +1093,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1110,7 +1119,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "http://symfony.com", - "time": "2014-05-31 02:02:48" + "time": "2014-05-31 02:02:56" }, { "name": "symfony/event-dispatcher", @@ -1222,17 +1231,17 @@ }, { "name": "symfony/finder", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Finder", "source": { "type": "git", "url": "https://github.com/symfony/Finder.git", - "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a" + "reference": "307aad2c541bbdf43183043645e186ef2cd6b973" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", - "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", + "url": "https://api.github.com/repos/symfony/Finder/zipball/307aad2c541bbdf43183043645e186ef2cd6b973", + "reference": "307aad2c541bbdf43183043645e186ef2cd6b973", "shasum": "" }, "require": { @@ -1241,7 +1250,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1267,21 +1276,21 @@ ], "description": "Symfony Finder Component", "homepage": "http://symfony.com", - "time": "2014-05-22 13:46:01" + "time": "2014-05-22 13:47:45" }, { "name": "symfony/http-foundation", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e" + "reference": "044085422005aa3258fb3f710a7bf0202011f259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/138498f3d64981cfafcb5eec3b2b96fce44a178e", - "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/044085422005aa3258fb3f710a7bf0202011f259", + "reference": "044085422005aa3258fb3f710a7bf0202011f259", "shasum": "" }, "require": { @@ -1293,7 +1302,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1322,27 +1331,27 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com", - "time": "2014-05-22 16:21:00" + "time": "2014-05-26 19:02:40" }, { "name": "symfony/http-kernel", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7" + "reference": "432a828e796a575d4a325a0fdf14132a615d2c53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/084a126a36ed011b098158d4d28daa9883ecc8f7", - "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/432a828e796a575d4a325a0fdf14132a615d2c53", + "reference": "432a828e796a575d4a325a0fdf14132a615d2c53", "shasum": "" }, "require": { "php": ">=5.3.3", "psr/log": "~1.0", - "symfony/debug": "~2.3", + "symfony/debug": "~2.5", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.4" }, @@ -1369,7 +1378,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1395,21 +1404,21 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2014-05-31 18:42:13" + "time": "2014-05-31 18:45:50" }, { "name": "symfony/process", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Process", "source": { "type": "git", "url": "https://github.com/symfony/Process.git", - "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841" + "reference": "5d7d78e23894544740219e006320678cfa4cd45b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/a7118cb290c62068b3c8ecfbf8b2eda8421fb841", - "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841", + "url": "https://api.github.com/repos/symfony/Process/zipball/5d7d78e23894544740219e006320678cfa4cd45b", + "reference": "5d7d78e23894544740219e006320678cfa4cd45b", "shasum": "" }, "require": { @@ -1418,7 +1427,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1444,21 +1453,21 @@ ], "description": "Symfony Process Component", "homepage": "http://symfony.com", - "time": "2014-05-22 13:46:01" + "time": "2014-05-23 09:02:52" }, { "name": "symfony/routing", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8" + "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/74229f66e16bce6d2415ca44d4756f8e7ea880f8", - "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8", + "url": "https://api.github.com/repos/symfony/Routing/zipball/99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", + "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", "shasum": "" }, "require": { @@ -1480,7 +1489,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1512,21 +1521,21 @@ "uri", "url" ], - "time": "2014-04-23 14:04:21" + "time": "2014-04-23 14:08:54" }, { "name": "symfony/security-core", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Security/Core", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc" + "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", - "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", + "url": "https://api.github.com/repos/symfony/security-core/zipball/de6e3aa1362d77f6bf91f17039cd403807ee5c27", + "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27", "shasum": "" }, "require": { @@ -1550,7 +1559,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1576,21 +1585,21 @@ ], "description": "Symfony Security Component - Core Library", "homepage": "http://symfony.com", - "time": "2014-04-23 14:04:21" + "time": "2014-04-23 14:08:54" }, { "name": "symfony/translation", - "version": "v2.4.6", + "version": "v2.5.0", "target-dir": "Symfony/Component/Translation", "source": { "type": "git", "url": "https://github.com/symfony/Translation.git", - "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293" + "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/9a3941444487ea57acd38f5c61bee1e0c3f69293", - "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293", + "url": "https://api.github.com/repos/symfony/Translation/zipball/5f23265dcf8927a84be832608069c9edca3cf5f4", + "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4", "shasum": "" }, "require": { @@ -1607,7 +1616,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "autoload": { @@ -1633,7 +1642,7 @@ ], "description": "Symfony Translation Component", "homepage": "http://symfony.com", - "time": "2014-05-22 13:46:01" + "time": "2014-05-22 13:47:45" } ], "packages-dev": [ diff --git a/phpunit.xml b/phpunit.xml old mode 100755 new mode 100644 diff --git a/public/.htaccess b/public/.htaccess old mode 100755 new mode 100644 diff --git a/public/favicon.ico b/public/favicon.ico old mode 100755 new mode 100644 diff --git a/public/index.php b/public/index.php old mode 100755 new mode 100644 diff --git a/public/packages/.gitkeep b/public/packages/.gitkeep old mode 100755 new mode 100644 diff --git a/public/robots.txt b/public/robots.txt old mode 100755 new mode 100644 diff --git a/readme.md b/readme.md old mode 100755 new mode 100644 index d113789..40ea7ee --- a/readme.md +++ b/readme.md @@ -1,6 +1,10 @@ ## Laravel PHP Framework -[![Latest Stable Version](https://poser.pugx.org/laravel/framework/version.png)](https://packagist.org/packages/laravel/framework) [![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.png)](https://packagist.org/packages/laravel/framework) [![Build Status](https://travis-ci.org/laravel/framework.png)](https://travis-ci.org/laravel/framework) [![License](https://poser.pugx.org/laravel/framework/license.png)](https://packagist.org/packages/laravel/framework) +[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) +[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework) +[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework) +[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework) +[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework) Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. diff --git a/server.php b/server.php old mode 100755 new mode 100644 diff --git a/vendor/autoload.php b/vendor/autoload.php old mode 100755 new mode 100644 index 14d7d6e..d68079d --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitf4e434e72bd9e45c8507ed13e1f3348d::getLoader(); +return ComposerAutoloaderInitce866d1c30f9d3a988e9f177d36447af::getLoader(); diff --git a/vendor/classpreloader/classpreloader/.gitignore b/vendor/classpreloader/classpreloader/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/LICENSE.md b/vendor/classpreloader/classpreloader/LICENSE.md old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/README.md b/vendor/classpreloader/classpreloader/README.md old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/composer.json b/vendor/classpreloader/classpreloader/composer.json old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Application.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Application.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/ClassList.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/ClassList.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/ClassLoader.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/ClassLoader.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/ClassNode.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/ClassNode.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Command/PreCompileCommand.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Command/PreCompileCommand.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Config.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Config.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/AbstractNodeVisitor.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/AbstractNodeVisitor.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/DirVisitor.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/DirVisitor.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/FileVisitor.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/FileVisitor.php old mode 100755 new mode 100644 diff --git a/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/NodeTraverser.php b/vendor/classpreloader/classpreloader/src/ClassPreloader/Parser/NodeTraverser.php old mode 100755 new mode 100644 diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php old mode 100755 new mode 100644 diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php old mode 100755 new mode 100644 index f8357f1..4483abb --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,7 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'App\\Controller\\MentorManagementController' => $baseDir . '/app/controllers/MentorManagementController.php', 'BaseController' => $baseDir . '/app/controllers/BaseController.php', 'Boris\\Boris' => $vendorDir . '/d11wtq/boris/lib/Boris/Boris.php', 'Boris\\CLIOptionsHandler' => $vendorDir . '/d11wtq/boris/lib/Boris/CLIOptionsHandler.php', @@ -59,10 +58,12 @@ return array( 'Illuminate\\Auth\\Reminders\\DatabaseReminderRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php', 'Illuminate\\Auth\\Reminders\\PasswordBroker' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php', 'Illuminate\\Auth\\Reminders\\RemindableInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php', + 'Illuminate\\Auth\\Reminders\\RemindableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/RemindableTrait.php', 'Illuminate\\Auth\\Reminders\\ReminderRepositoryInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php', 'Illuminate\\Auth\\Reminders\\ReminderServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/Reminders/ReminderServiceProvider.php', 'Illuminate\\Auth\\UserInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserInterface.php', 'Illuminate\\Auth\\UserProviderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserProviderInterface.php', + 'Illuminate\\Auth\\UserTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Auth/UserTrait.php', 'Illuminate\\Cache\\ApcStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcStore.php', 'Illuminate\\Cache\\ApcWrapper' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ApcWrapper.php', 'Illuminate\\Cache\\ArrayStore' => $vendorDir . '/laravel/framework/src/Illuminate/Cache/ArrayStore.php', @@ -90,6 +91,7 @@ return array( 'Illuminate\\Config\\Repository' => $vendorDir . '/laravel/framework/src/Illuminate/Config/Repository.php', 'Illuminate\\Console\\Application' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Application.php', 'Illuminate\\Console\\Command' => $vendorDir . '/laravel/framework/src/Illuminate/Console/Command.php', + 'Illuminate\\Console\\ConfirmableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php', 'Illuminate\\Container\\BindingResolutionException' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', 'Illuminate\\Container\\Container' => $vendorDir . '/laravel/framework/src/Illuminate/Container/Container.php', 'Illuminate\\Cookie\\CookieJar' => $vendorDir . '/laravel/framework/src/Illuminate/Cookie/CookieJar.php', @@ -137,6 +139,9 @@ return array( 'Illuminate\\Database\\Eloquent\\Relations\\MorphToMany' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php', 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Pivot.php', 'Illuminate\\Database\\Eloquent\\Relations\\Relation' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php', + 'Illuminate\\Database\\Eloquent\\ScopeInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/ScopeInterface.php', + 'Illuminate\\Database\\Eloquent\\SoftDeletingScope' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingScope.php', + 'Illuminate\\Database\\Eloquent\\SoftDeletingTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingTrait.php', 'Illuminate\\Database\\Grammar' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Grammar.php', 'Illuminate\\Database\\MigrationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Database/MigrationServiceProvider.php', 'Illuminate\\Database\\Migrations\\DatabaseMigrationRepository' => $vendorDir . '/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php', @@ -238,13 +243,17 @@ return array( 'Illuminate\\Http\\RedirectResponse' => $vendorDir . '/laravel/framework/src/Illuminate/Http/RedirectResponse.php', 'Illuminate\\Http\\Request' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Request.php', 'Illuminate\\Http\\Response' => $vendorDir . '/laravel/framework/src/Illuminate/Http/Response.php', + 'Illuminate\\Http\\ResponseTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Http/ResponseTrait.php', 'Illuminate\\Log\\LogServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Log/LogServiceProvider.php', 'Illuminate\\Log\\Writer' => $vendorDir . '/laravel/framework/src/Illuminate/Log/Writer.php', 'Illuminate\\Mail\\MailServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php', 'Illuminate\\Mail\\Mailer' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Mailer.php', 'Illuminate\\Mail\\Message' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Message.php', + 'Illuminate\\Mail\\Transport\\LogTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php', + 'Illuminate\\Mail\\Transport\\MailgunTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php', + 'Illuminate\\Mail\\Transport\\MandrillTransport' => $vendorDir . '/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php', 'Illuminate\\Pagination\\BootstrapPresenter' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php', - 'Illuminate\\Pagination\\Environment' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Environment.php', + 'Illuminate\\Pagination\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Factory.php', 'Illuminate\\Pagination\\PaginationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php', 'Illuminate\\Pagination\\Paginator' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Paginator.php', 'Illuminate\\Pagination\\Presenter' => $vendorDir . '/laravel/framework/src/Illuminate/Pagination/Presenter.php', @@ -314,6 +323,8 @@ return array( 'Illuminate\\Session\\CommandsServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CommandsServiceProvider.php', 'Illuminate\\Session\\Console\\SessionTableCommand' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php', 'Illuminate\\Session\\CookieSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/CookieSessionHandler.php', + 'Illuminate\\Session\\DatabaseSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php', + 'Illuminate\\Session\\ExistenceAwareInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php', 'Illuminate\\Session\\FileSessionHandler' => $vendorDir . '/laravel/framework/src/Illuminate/Session/FileSessionHandler.php', 'Illuminate\\Session\\Middleware' => $vendorDir . '/laravel/framework/src/Illuminate/Session/Middleware.php', 'Illuminate\\Session\\SessionInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Session/SessionInterface.php', @@ -369,6 +380,8 @@ return array( 'Illuminate\\Support\\SerializableClosure' => $vendorDir . '/laravel/framework/src/Illuminate/Support/SerializableClosure.php', 'Illuminate\\Support\\ServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ServiceProvider.php', 'Illuminate\\Support\\Str' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Str.php', + 'Illuminate\\Support\\Traits\\MacroableTrait' => $vendorDir . '/laravel/framework/src/Illuminate/Support/Traits/MacroableTrait.php', + 'Illuminate\\Support\\ViewErrorBag' => $vendorDir . '/laravel/framework/src/Illuminate/Support/ViewErrorBag.php', 'Illuminate\\Translation\\FileLoader' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/FileLoader.php', 'Illuminate\\Translation\\LoaderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/LoaderInterface.php', 'Illuminate\\Translation\\TranslationServiceProvider' => $vendorDir . '/laravel/framework/src/Illuminate/Translation/TranslationServiceProvider.php', @@ -386,7 +399,7 @@ return array( 'Illuminate\\View\\Engines\\EngineInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineInterface.php', 'Illuminate\\View\\Engines\\EngineResolver' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/EngineResolver.php', 'Illuminate\\View\\Engines\\PhpEngine' => $vendorDir . '/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php', - 'Illuminate\\View\\Environment' => $vendorDir . '/laravel/framework/src/Illuminate/View/Environment.php', + 'Illuminate\\View\\Factory' => $vendorDir . '/laravel/framework/src/Illuminate/View/Factory.php', 'Illuminate\\View\\FileViewFinder' => $vendorDir . '/laravel/framework/src/Illuminate/View/FileViewFinder.php', 'Illuminate\\View\\View' => $vendorDir . '/laravel/framework/src/Illuminate/View/View.php', 'Illuminate\\View\\ViewFinderInterface' => $vendorDir . '/laravel/framework/src/Illuminate/View/ViewFinderInterface.php', @@ -965,8 +978,13 @@ return array( 'Symfony\\Component\\Console\\Helper\\HelperInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/HelperInterface.php', 'Symfony\\Component\\Console\\Helper\\HelperSet' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/HelperSet.php', 'Symfony\\Component\\Console\\Helper\\InputAwareHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/InputAwareHelper.php', + 'Symfony\\Component\\Console\\Helper\\ProgressBar' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/ProgressBar.php', 'Symfony\\Component\\Console\\Helper\\ProgressHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php', + 'Symfony\\Component\\Console\\Helper\\QuestionHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php', + 'Symfony\\Component\\Console\\Helper\\Table' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/Table.php', 'Symfony\\Component\\Console\\Helper\\TableHelper' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableHelper.php', + 'Symfony\\Component\\Console\\Helper\\TableSeparator' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableSeparator.php', + 'Symfony\\Component\\Console\\Helper\\TableStyle' => $vendorDir . '/symfony/console/Symfony/Component/Console/Helper/TableStyle.php', 'Symfony\\Component\\Console\\Input\\ArgvInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/ArgvInput.php', 'Symfony\\Component\\Console\\Input\\ArrayInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/ArrayInput.php', 'Symfony\\Component\\Console\\Input\\Input' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/Input.php', @@ -976,6 +994,7 @@ return array( 'Symfony\\Component\\Console\\Input\\InputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputInterface.php', 'Symfony\\Component\\Console\\Input\\InputOption' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/InputOption.php', 'Symfony\\Component\\Console\\Input\\StringInput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Input/StringInput.php', + 'Symfony\\Component\\Console\\Logger\\ConsoleLogger' => $vendorDir . '/symfony/console/Symfony/Component/Console/Logger/ConsoleLogger.php', 'Symfony\\Component\\Console\\Output\\BufferedOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/BufferedOutput.php', 'Symfony\\Component\\Console\\Output\\ConsoleOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php', 'Symfony\\Component\\Console\\Output\\ConsoleOutputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/ConsoleOutputInterface.php', @@ -983,6 +1002,9 @@ return array( 'Symfony\\Component\\Console\\Output\\Output' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/Output.php', 'Symfony\\Component\\Console\\Output\\OutputInterface' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/OutputInterface.php', 'Symfony\\Component\\Console\\Output\\StreamOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Output/StreamOutput.php', + 'Symfony\\Component\\Console\\Question\\ChoiceQuestion' => $vendorDir . '/symfony/console/Symfony/Component/Console/Question/ChoiceQuestion.php', + 'Symfony\\Component\\Console\\Question\\ConfirmationQuestion' => $vendorDir . '/symfony/console/Symfony/Component/Console/Question/ConfirmationQuestion.php', + 'Symfony\\Component\\Console\\Question\\Question' => $vendorDir . '/symfony/console/Symfony/Component/Console/Question/Question.php', 'Symfony\\Component\\Console\\Shell' => $vendorDir . '/symfony/console/Symfony/Component/Console/Shell.php', 'Symfony\\Component\\Console\\Tester\\ApplicationTester' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php', 'Symfony\\Component\\Console\\Tester\\CommandTester' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tester/CommandTester.php', @@ -991,6 +1013,7 @@ return array( 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorApplication2' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php', 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorCommand1' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php', 'Symfony\\Component\\Console\\Tests\\Fixtures\\DescriptorCommand2' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php', + 'Symfony\\Component\\Console\\Tests\\Fixtures\\DummyOutput' => $vendorDir . '/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php', 'Symfony\\Component\\CssSelector\\CssSelector' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/CssSelector.php', 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExceptionInterface.php', 'Symfony\\Component\\CssSelector\\Exception\\ExpressionErrorException' => $vendorDir . '/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php', @@ -1042,16 +1065,24 @@ return array( 'Symfony\\Component\\Debug\\Debug' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Debug.php', 'Symfony\\Component\\Debug\\DebugClassLoader' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php', 'Symfony\\Component\\Debug\\ErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ErrorHandler.php', + 'Symfony\\Component\\Debug\\ErrorHandlerCanary' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ErrorHandler.php', 'Symfony\\Component\\Debug\\ExceptionHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php', 'Symfony\\Component\\Debug\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php', 'Symfony\\Component\\Debug\\Exception\\ContextErrorException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/ContextErrorException.php', 'Symfony\\Component\\Debug\\Exception\\DummyException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php', 'Symfony\\Component\\Debug\\Exception\\FatalErrorException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php', 'Symfony\\Component\\Debug\\Exception\\FlattenException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php', + 'Symfony\\Component\\Debug\\Exception\\OutOfMemoryException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/OutOfMemoryException.php', 'Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php', + 'Symfony\\Component\\Debug\\Exception\\UndefinedMethodException' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Exception/UndefinedMethodException.php', 'Symfony\\Component\\Debug\\FatalErrorHandler\\ClassNotFoundFatalErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php', 'Symfony\\Component\\Debug\\FatalErrorHandler\\FatalErrorHandlerInterface' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php', 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedFunctionFatalErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php', + 'Symfony\\Component\\Debug\\FatalErrorHandler\\UndefinedMethodFatalErrorHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php', + 'Symfony\\Component\\Debug\\Tests\\Fixtures\\CaseMismatch' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php', + 'Symfony\\Component\\Debug\\Tests\\Fixtures\\NotPSR0' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/reallyNotPsr0.php', + 'Symfony\\Component\\Debug\\Tests\\Fixtures\\NotPSR0bis' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/notPsr0Bis.php', + 'Symfony\\Component\\Debug\\Tests\\Fixtures\\PSR4CaseMismatch' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/psr4/Psr4CaseMismatch.php', 'Symfony\\Component\\Debug\\Tests\\Fixtures\\RequiredTwice' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/RequiredTwice.php', 'Symfony\\Component\\Debug\\Tests\\MockExceptionHandler' => $vendorDir . '/symfony/debug/Symfony/Component/Debug/Tests/MockExceptionHandler.php', 'Symfony\\Component\\DomCrawler\\Crawler' => $vendorDir . '/symfony/dom-crawler/Symfony/Component/DomCrawler/Crawler.php', @@ -1223,6 +1254,8 @@ return array( 'Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\MergeExtensionConfigurationPass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php', 'Symfony\\Component\\HttpKernel\\DependencyInjection\\RegisterListenersPass' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php', + 'Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ErrorsLoggerListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\EsiListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php', 'Symfony\\Component\\HttpKernel\\EventListener\\ExceptionListener' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php', @@ -1259,6 +1292,7 @@ return array( 'Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\TooManyRequestsHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php', + 'Symfony\\Component\\HttpKernel\\Exception\\UnprocessableEntityHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php', 'Symfony\\Component\\HttpKernel\\Exception\\UnsupportedMediaTypeHttpException' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php', 'Symfony\\Component\\HttpKernel\\Fragment\\EsiFragmentRenderer' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php', 'Symfony\\Component\\HttpKernel\\Fragment\\FragmentHandler' => $vendorDir . '/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php', @@ -1410,6 +1444,7 @@ return array( 'Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php', 'Symfony\\Component\\Security\\Core\\Encoder\\BCryptPasswordEncoder' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php', 'Symfony\\Component\\Security\\Core\\Encoder\\BasePasswordEncoder' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php', + 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderAwareInterface' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php', 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactory' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php', 'Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php', 'Symfony\\Component\\Security\\Core\\Encoder\\MessageDigestPasswordEncoder' => $vendorDir . '/symfony/security-core/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php', @@ -1513,6 +1548,7 @@ return array( 'TestCase' => $baseDir . '/app/tests/TestCase.php', 'User' => $baseDir . '/app/models/User.php', 'Whoops\\Exception\\ErrorException' => $vendorDir . '/filp/whoops/src/Whoops/Exception/ErrorException.php', + 'Whoops\\Exception\\Formatter' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Formatter.php', 'Whoops\\Exception\\Frame' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Frame.php', 'Whoops\\Exception\\FrameCollection' => $vendorDir . '/filp/whoops/src/Whoops/Exception/FrameCollection.php', 'Whoops\\Exception\\Inspector' => $vendorDir . '/filp/whoops/src/Whoops/Exception/Inspector.php', @@ -1520,12 +1556,16 @@ return array( 'Whoops\\Handler\\Handler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/Handler.php', 'Whoops\\Handler\\HandlerInterface' => $vendorDir . '/filp/whoops/src/Whoops/Handler/HandlerInterface.php', 'Whoops\\Handler\\JsonResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php', + 'Whoops\\Handler\\PlainTextHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PlainTextHandler.php', 'Whoops\\Handler\\PrettyPageHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php', + 'Whoops\\Handler\\SoapResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/SoapResponseHandler.php', 'Whoops\\Handler\\XmlResponseHandler' => $vendorDir . '/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php', - 'Whoops\\Module' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/Module.php', + 'Whoops\\Module' => $vendorDir . '/filp/whoops/src/deprecated/Zend/Module.php', 'Whoops\\Provider\\Phalcon\\WhoopsServiceProvider' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Phalcon/WhoopsServiceProvider.php', 'Whoops\\Provider\\Silex\\WhoopsServiceProvider' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php', - 'Whoops\\Provider\\Zend\\ExceptionStrategy' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php', - 'Whoops\\Provider\\Zend\\RouteNotFoundStrategy' => $vendorDir . '/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php', + 'Whoops\\Provider\\Zend\\ExceptionStrategy' => $vendorDir . '/filp/whoops/src/deprecated/Zend/ExceptionStrategy.php', + 'Whoops\\Provider\\Zend\\RouteNotFoundStrategy' => $vendorDir . '/filp/whoops/src/deprecated/Zend/RouteNotFoundStrategy.php', 'Whoops\\Run' => $vendorDir . '/filp/whoops/src/Whoops/Run.php', + 'Whoops\\Util\\Misc' => $vendorDir . '/filp/whoops/src/Whoops/Util/Misc.php', + 'Whoops\\Util\\TemplateHelper' => $vendorDir . '/filp/whoops/src/Whoops/Util/TemplateHelper.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php old mode 100755 new mode 100644 diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php old mode 100755 new mode 100644 diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php old mode 100755 new mode 100644 diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php old mode 100755 new mode 100644 index e8f70e3..c66327d --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitf4e434e72bd9e45c8507ed13e1f3348d +class ComposerAutoloaderInitce866d1c30f9d3a988e9f177d36447af { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInitf4e434e72bd9e45c8507ed13e1f3348d return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitf4e434e72bd9e45c8507ed13e1f3348d', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitce866d1c30f9d3a988e9f177d36447af', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitf4e434e72bd9e45c8507ed13e1f3348d', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitce866d1c30f9d3a988e9f177d36447af', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); @@ -49,14 +49,14 @@ class ComposerAutoloaderInitf4e434e72bd9e45c8507ed13e1f3348d $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequiref4e434e72bd9e45c8507ed13e1f3348d($file); + composerRequirece866d1c30f9d3a988e9f177d36447af($file); } return $loader; } } -function composerRequiref4e434e72bd9e45c8507ed13e1f3348d($file) +function composerRequirece866d1c30f9d3a988e9f177d36447af($file) { require $file; } diff --git a/vendor/composer/include_paths.php b/vendor/composer/include_paths.php old mode 100755 new mode 100644 diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json old mode 100755 new mode 100644 index 3c58f40..cd80d07 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,18 +1,18 @@ [ { "name": "symfony/translation", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/Translation", "source": { "type": "git", "url": "https://github.com/symfony/Translation.git", - "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293" + "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/9a3941444487ea57acd38f5c61bee1e0c3f69293", - "reference": "9a3941444487ea57acd38f5c61bee1e0c3f69293", + "url": "https://api.github.com/repos/symfony/Translation/zipball/5f23265dcf8927a84be832608069c9edca3cf5f4", + "reference": "5f23265dcf8927a84be832608069c9edca3cf5f4", "shasum": "" }, "require": { @@ -26,11 +26,11 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2014-05-22 13:46:01", + "time": "2014-05-22 13:47:45", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -60,18 +60,18 @@ }, { "name": "symfony/security-core", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/Security/Core", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc" + "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", - "reference": "1fbe80d10b7a5bcb619abe3e4cfede795d9958dc", + "url": "https://api.github.com/repos/symfony/security-core/zipball/de6e3aa1362d77f6bf91f17039cd403807ee5c27", + "reference": "de6e3aa1362d77f6bf91f17039cd403807ee5c27", "shasum": "" }, "require": { @@ -92,11 +92,11 @@ "symfony/http-foundation": "", "symfony/validator": "For using the user password constraint" }, - "time": "2014-04-23 14:04:21", + "time": "2014-04-23 14:08:54", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -125,26 +125,48 @@ "homepage": "http://symfony.com" }, { - "name": "psr/log", - "version": "1.0.0", - "version_normalized": "1.0.0.0", + "name": "symfony/routing", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "target-dir": "Symfony/Component/Routing", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "url": "https://github.com/symfony/Routing.git", + "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/symfony/Routing/zipball/99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", + "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", "shasum": "" }, - "time": "2012-12-21 11:40:51", + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "psr/log": "~1.0", + "symfony/config": "~2.2", + "symfony/expression-language": "~2.4", + "symfony/yaml": "~2.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/yaml": "For using the YAML loader" + }, + "time": "2014-04-23 14:08:54", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, "installation-source": "dist", "autoload": { "psr-0": { - "Psr\\Log\\": "" + "Symfony\\Component\\Routing\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -153,54 +175,56 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" } ], - "description": "Common interface for logging libraries", + "description": "Symfony Routing Component", + "homepage": "http://symfony.com", "keywords": [ - "log", - "psr", - "psr-3" + "router", + "routing", + "uri", + "url" ] }, { - "name": "symfony/http-foundation", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", - "target-dir": "Symfony/Component/HttpFoundation", + "name": "symfony/process", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "target-dir": "Symfony/Component/Process", "source": { "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e" + "url": "https://github.com/symfony/Process.git", + "reference": "5d7d78e23894544740219e006320678cfa4cd45b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/138498f3d64981cfafcb5eec3b2b96fce44a178e", - "reference": "138498f3d64981cfafcb5eec3b2b96fce44a178e", + "url": "https://api.github.com/repos/symfony/Process/zipball/5d7d78e23894544740219e006320678cfa4cd45b", + "reference": "5d7d78e23894544740219e006320678cfa4cd45b", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "require-dev": { - "symfony/expression-language": "~2.4" - }, - "time": "2014-05-22 16:21:00", + "time": "2014-05-23 09:02:52", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] + "Symfony\\Component\\Process\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -218,49 +242,30 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Symfony Process Component", "homepage": "http://symfony.com" }, { - "name": "symfony/event-dispatcher", - "version": "v2.5.0", - "version_normalized": "2.5.0.0", - "target-dir": "Symfony/Component/EventDispatcher", + "name": "psr/log", + "version": "1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8" + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", - "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", "shasum": "" }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.0", - "symfony/stopwatch": "~2.2" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2014-04-29 10:13:57", + "time": "2012-12-21 11:40:51", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" + "Psr\\Log\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -269,33 +274,31 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" + "description": "Common interface for logging libraries", + "keywords": [ + "log", + "psr", + "psr-3" + ] }, { "name": "symfony/debug", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/Debug", "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c" + "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", - "reference": "6e721ae2cd7bde0f8dfa9c3186808a6c4140469c", + "url": "https://api.github.com/repos/symfony/Debug/zipball/7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", + "reference": "7fd8006e4604ef99c95050ca2b5c7c5b41f5c704", "shasum": "" }, "require": { @@ -309,11 +312,11 @@ "symfony/http-foundation": "", "symfony/http-kernel": "" }, - "time": "2014-04-30 06:22:28", + "time": "2014-05-25 14:44:21", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -342,60 +345,42 @@ "homepage": "http://symfony.com" }, { - "name": "symfony/http-kernel", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", - "target-dir": "Symfony/Component/HttpKernel", + "name": "symfony/http-foundation", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7" + "url": "https://github.com/symfony/HttpFoundation.git", + "reference": "044085422005aa3258fb3f710a7bf0202011f259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/084a126a36ed011b098158d4d28daa9883ecc8f7", - "reference": "084a126a36ed011b098158d4d28daa9883ecc8f7", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/044085422005aa3258fb3f710a7bf0202011f259", + "reference": "044085422005aa3258fb3f710a7bf0202011f259", "shasum": "" }, "require": { - "php": ">=5.3.3", - "psr/log": "~1.0", - "symfony/debug": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.4" + "php": ">=5.3.3" }, "require-dev": { - "symfony/browser-kit": "~2.2", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", - "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/templating": "~2.2" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "" + "symfony/expression-language": "~2.4" }, - "time": "2014-05-31 18:42:13", + "time": "2014-05-26 19:02:40", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } + "Symfony\\Component\\HttpFoundation\\": "" + }, + "classmap": [ + "Symfony/Component/HttpFoundation/Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -413,52 +398,49 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony HttpKernel Component", + "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com" }, { - "name": "symfony/routing", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", - "target-dir": "Symfony/Component/Routing", + "name": "symfony/event-dispatcher", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8" + "url": "https://github.com/symfony/EventDispatcher.git", + "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/74229f66e16bce6d2415ca44d4756f8e7ea880f8", - "reference": "74229f66e16bce6d2415ca44d4756f8e7ea880f8", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", + "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "doctrine/annotations": "~1.0", "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/yaml": "~2.0" + "symfony/config": "~2.0", + "symfony/dependency-injection": "~2.0", + "symfony/stopwatch": "~2.2" }, "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/yaml": "For using the YAML loader" + "symfony/dependency-injection": "", + "symfony/http-kernel": "" }, - "time": "2014-04-23 14:04:21", + "time": "2014-04-29 10:13:57", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Routing\\": "" + "Symfony\\Component\\EventDispatcher\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -477,45 +459,63 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ] + "description": "Symfony EventDispatcher Component", + "homepage": "http://symfony.com" }, { - "name": "symfony/process", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", - "target-dir": "Symfony/Component/Process", + "name": "symfony/http-kernel", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", + "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841" + "url": "https://github.com/symfony/HttpKernel.git", + "reference": "432a828e796a575d4a325a0fdf14132a615d2c53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/a7118cb290c62068b3c8ecfbf8b2eda8421fb841", - "reference": "a7118cb290c62068b3c8ecfbf8b2eda8421fb841", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/432a828e796a575d4a325a0fdf14132a615d2c53", + "reference": "432a828e796a575d4a325a0fdf14132a615d2c53", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "psr/log": "~1.0", + "symfony/debug": "~2.5", + "symfony/event-dispatcher": "~2.1", + "symfony/http-foundation": "~2.4" + }, + "require-dev": { + "symfony/browser-kit": "~2.2", + "symfony/class-loader": "~2.1", + "symfony/config": "~2.0", + "symfony/console": "~2.2", + "symfony/dependency-injection": "~2.0", + "symfony/finder": "~2.0", + "symfony/process": "~2.0", + "symfony/routing": "~2.2", + "symfony/stopwatch": "~2.2", + "symfony/templating": "~2.2" }, - "time": "2014-05-22 13:46:01", + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "" + }, + "time": "2014-05-31 18:45:50", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Component\\HttpKernel\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -534,33 +534,33 @@ "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com" }, { "name": "symfony/finder", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/Finder", "source": { "type": "git", "url": "https://github.com/symfony/Finder.git", - "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a" + "reference": "307aad2c541bbdf43183043645e186ef2cd6b973" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", - "reference": "46295af1b1e24304b35d5f20f1bf1ec0c2c4934a", + "url": "https://api.github.com/repos/symfony/Finder/zipball/307aad2c541bbdf43183043645e186ef2cd6b973", + "reference": "307aad2c541bbdf43183043645e186ef2cd6b973", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-05-22 13:46:01", + "time": "2014-05-22 13:47:45", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -590,18 +590,18 @@ }, { "name": "symfony/dom-crawler", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/DomCrawler", "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "77881ef11c064a490515a9fb1729b695c632ffe5" + "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/77881ef11c064a490515a9fb1729b695c632ffe5", - "reference": "77881ef11c064a490515a9fb1729b695c632ffe5", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/6cda499120860286fe3d3d2fd631dacb7ae17f92", + "reference": "6cda499120860286fe3d3d2fd631dacb7ae17f92", "shasum": "" }, "require": { @@ -613,11 +613,11 @@ "suggest": { "symfony/css-selector": "" }, - "time": "2014-05-31 02:02:48", + "time": "2014-05-31 02:02:56", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -647,28 +647,28 @@ }, { "name": "symfony/css-selector", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/CssSelector", "source": { "type": "git", "url": "https://github.com/symfony/CssSelector.git", - "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93" + "reference": "bcdd62af59bd3137ede467946a06d41f8644048c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/268d0a51166edaf84dfcf043c57f273685cb7c93", - "reference": "268d0a51166edaf84dfcf043c57f273685cb7c93", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/bcdd62af59bd3137ede467946a06d41f8644048c", + "reference": "bcdd62af59bd3137ede467946a06d41f8644048c", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2014-05-12 09:27:48", + "time": "2014-05-12 09:28:39", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -702,34 +702,36 @@ }, { "name": "symfony/console", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/Console", "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "24f723436e62598c9dddee2a8573d6992504dc5d" + "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/24f723436e62598c9dddee2a8573d6992504dc5d", - "reference": "24f723436e62598c9dddee2a8573d6992504dc5d", + "url": "https://api.github.com/repos/symfony/Console/zipball/ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", + "reference": "ef4ca73b0b3a10cbac653d3ca482d0cdd4502b2c", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { + "psr/log": "~1.0", "symfony/event-dispatcher": "~2.1" }, "suggest": { + "psr/log": "For using the console logger", "symfony/event-dispatcher": "" }, - "time": "2014-05-14 21:48:29", + "time": "2014-05-22 08:54:24", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -759,18 +761,18 @@ }, { "name": "symfony/browser-kit", - "version": "v2.4.6", - "version_normalized": "2.4.6.0", + "version": "v2.5.0", + "version_normalized": "2.5.0.0", "target-dir": "Symfony/Component/BrowserKit", "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07" + "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/5c80003d5772de6120b5429f4b2f6e22957d4a07", - "reference": "5c80003d5772de6120b5429f4b2f6e22957d4a07", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/cc1716dafa04277a0c987aee5bce8c3cf8939de3", + "reference": "cc1716dafa04277a0c987aee5bce8c3cf8939de3", "shasum": "" }, "require": { @@ -784,11 +786,11 @@ "suggest": { "symfony/process": "" }, - "time": "2014-05-12 09:27:48", + "time": "2014-05-12 09:28:39", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } }, "installation-source": "dist", @@ -1339,33 +1341,40 @@ }, { "name": "filp/whoops", - "version": "1.0.10", - "version_normalized": "1.0.10.0", + "version": "1.1.1", + "version_normalized": "1.1.1.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a" + "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/91e3fd4b0812017ffbeb24add55330664e1ea32a", - "reference": "91e3fd4b0812017ffbeb24add55330664e1ea32a", + "url": "https://api.github.com/repos/filp/whoops/zipball/ae05259236204ccf904a94e5b0d96df8d4351da5", + "reference": "ae05259236204ccf904a94e5b0d96df8d4351da5", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" + "mockery/mockery": "0.9.*" }, - "time": "2013-12-04 14:19:30", + "time": "2014-05-13 05:05:11", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, "installation-source": "dist", "autoload": { "psr-0": { "Whoops": "src/" - } + }, + "classmap": [ + "src/deprecated" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1569,45 +1578,45 @@ }, { "name": "laravel/framework", - "version": "v4.1.30", - "version_normalized": "4.1.30.0", + "version": "v4.2.1", + "version_normalized": "4.2.1.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab" + "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", - "reference": "1bbb6f16aa03c1de6d89ccbf4ca81bf98e1330ab", + "url": "https://api.github.com/repos/laravel/framework/zipball/be75911bf8f7fe81a2db1dd2585324d080289dd5", + "reference": "be75911bf8f7fe81a2db1dd2585324d080289dd5", "shasum": "" }, "require": { - "classpreloader/classpreloader": "1.0.*", - "d11wtq/boris": "1.0.*", - "filp/whoops": "1.0.10", - "ircmaxell/password-compat": "1.0.*", - "jeremeamia/superclosure": "1.0.*", - "monolog/monolog": "1.*", - "nesbot/carbon": "1.*", + "classpreloader/classpreloader": "~1.0", + "d11wtq/boris": "~1.0", + "filp/whoops": "1.1.*", + "ircmaxell/password-compat": "~1.0", + "jeremeamia/superclosure": "~1.0", + "monolog/monolog": "~1.6", + "nesbot/carbon": "~1.0", "patchwork/utf8": "1.1.*", - "php": ">=5.3.0", + "php": ">=5.4.0", "phpseclib/phpseclib": "0.3.*", "predis/predis": "0.8.*", - "stack/builder": "1.0.*", - "swiftmailer/swiftmailer": "~5.0", - "symfony/browser-kit": "2.4.*", - "symfony/console": "2.4.*", - "symfony/css-selector": "2.4.*", - "symfony/debug": "2.4.*", - "symfony/dom-crawler": "2.4.*", - "symfony/finder": "2.4.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*", - "symfony/process": "2.4.*", - "symfony/routing": "2.4.*", - "symfony/security-core": "2.4.*", - "symfony/translation": "2.4.*" + "stack/builder": "~1.0", + "swiftmailer/swiftmailer": "~5.1", + "symfony/browser-kit": "2.5.*", + "symfony/console": "2.5.*", + "symfony/css-selector": "2.5.*", + "symfony/debug": "2.5.*", + "symfony/dom-crawler": "2.5.*", + "symfony/finder": "2.5.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*", + "symfony/process": "2.5.*", + "symfony/routing": "2.5.*", + "symfony/security-core": "2.5.*", + "symfony/translation": "2.5.*" }, "replace": { "illuminate/auth": "self.version", @@ -1640,20 +1649,20 @@ "illuminate/workbench": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "2.6.*", - "iron-io/iron_mq": "1.5.*", - "mockery/mockery": "0.9.*", - "pda/pheanstalk": "2.1.*", - "phpunit/phpunit": "4.0.*" + "aws/aws-sdk-php": "~2.6", + "iron-io/iron_mq": "~1.5", + "mockery/mockery": "~0.9", + "pda/pheanstalk": "~2.1", + "phpunit/phpunit": "~4.0" }, "suggest": { "doctrine/dbal": "Allow renaming columns and dropping SQLite columns." }, - "time": "2014-06-01 18:30:26", + "time": "2014-06-01 18:14:55", "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "installation-source": "dist", diff --git a/vendor/d11wtq/boris/.gitignore b/vendor/d11wtq/boris/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/LICENSE b/vendor/d11wtq/boris/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/README.md b/vendor/d11wtq/boris/README.md old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/box.json b/vendor/d11wtq/boris/box.json old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/composer.json b/vendor/d11wtq/boris/composer.json old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/Boris.php b/vendor/d11wtq/boris/lib/Boris/Boris.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/CLIOptionsHandler.php b/vendor/d11wtq/boris/lib/Boris/CLIOptionsHandler.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/ColoredInspector.php b/vendor/d11wtq/boris/lib/Boris/ColoredInspector.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/Config.php b/vendor/d11wtq/boris/lib/Boris/Config.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/DumpInspector.php b/vendor/d11wtq/boris/lib/Boris/DumpInspector.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/EvalWorker.php b/vendor/d11wtq/boris/lib/Boris/EvalWorker.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/ExportInspector.php b/vendor/d11wtq/boris/lib/Boris/ExportInspector.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/Inspector.php b/vendor/d11wtq/boris/lib/Boris/Inspector.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/ReadlineClient.php b/vendor/d11wtq/boris/lib/Boris/ReadlineClient.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/Boris/ShallowParser.php b/vendor/d11wtq/boris/lib/Boris/ShallowParser.php old mode 100755 new mode 100644 diff --git a/vendor/d11wtq/boris/lib/autoload.php b/vendor/d11wtq/boris/lib/autoload.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/.gitignore b/vendor/filp/whoops/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/.scrutinizer.yml b/vendor/filp/whoops/.scrutinizer.yml new file mode 100644 index 0000000..4601d82 --- /dev/null +++ b/vendor/filp/whoops/.scrutinizer.yml @@ -0,0 +1,14 @@ +imports: + - php + +filter: + paths: [src/*] + +tools: + php_cs_fixer: + config: { level: psr1 } + php_hhvm: true + php_mess_detector: true + sensiolabs_security_checker: true + external_code_coverage: + timeout: '3600' diff --git a/vendor/filp/whoops/.travis.yml b/vendor/filp/whoops/.travis.yml old mode 100755 new mode 100644 index 076a66b..1bbd767 --- a/vendor/filp/whoops/.travis.yml +++ b/vendor/filp/whoops/.travis.yml @@ -1,6 +1,23 @@ language: php + php: - - 5.4 - - 5.3 + # 5.3.0 is not supported by Travis + - 5.3.3 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + before_script: - - composer install --dev + - composer self-update + # --prefer-source is required to avoid hitting GitHub API limit: + # https://github.com/composer/composer/issues/1314 + - composer install --no-interaction --prefer-source --dev + +script: + - phpunit --verbose --coverage-clover build/logs/clover.xml + +after_success: + - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;' + - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi;' diff --git a/vendor/filp/whoops/CONTRIBUTING.md b/vendor/filp/whoops/CONTRIBUTING.md new file mode 100644 index 0000000..422e391 --- /dev/null +++ b/vendor/filp/whoops/CONTRIBUTING.md @@ -0,0 +1,11 @@ +If you want to give me some feedback or make a suggestion, create an [issue on GitHub](https://github.com/filp/whoops/issues/new). + +If you want to get your hands dirty, great! Here's a couple of steps/guidelines: +- See [a list of possible features to add](https://github.com/filp/whoops/wiki/Possible-features-to-add) for ideas on what can be improved. +- Add tests for your changes (in `tests/`). +- Remember to stick to the existing code style as best as possible. When in doubt, follow `PSR-2`. +- Before investing a lot of time coding, create an issue to get our opinion on your big changes. +- Update the documentation, if applicable. +- If you want to add an integration to a web framework, please [review our guidelines for that](docs/Framework%20Integration.md#contributing-an-integration-with-a-framework). + +In `PrettyPageHandler` we are using a Zepto library, but if you are only familiar with jQuery, note that it is pretty much identical. diff --git a/vendor/filp/whoops/LICENSE.md b/vendor/filp/whoops/LICENSE.md old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/README.md b/vendor/filp/whoops/README.md old mode 100755 new mode 100644 index 3ee890b..4c65c2a --- a/vendor/filp/whoops/README.md +++ b/vendor/filp/whoops/README.md @@ -1,8 +1,12 @@ -# whoops +# whoops php errors for cool kids -[![Build Status](https://travis-ci.org/filp/whoops.png?branch=master)](https://travis-ci.org/filp/whoops) [![Total Downloads](https://poser.pugx.org/filp/whoops/downloads.png)](https://packagist.org/packages/filp/whoops) [![Latest Stable Version](https://poser.pugx.org/filp/whoops/v/stable.png)](https://packagist.org/packages/filp/whoops) - +[![Total Downloads](https://img.shields.io/packagist/dm/filp/whoops.svg)](https://packagist.org/packages/filp/whoops) +[![Latest Version](http://img.shields.io/packagist/v/filp/whoops.svg)](https://packagist.org/packages/filp/whoops) +[![Build Status](https://travis-ci.org/filp/whoops.svg?branch=master)](https://travis-ci.org/filp/whoops) +[![Dependency Status](https://depending.in/filp/whoops.png)](https://depending.in/filp/whoops) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/filp/whoops/badges/quality-score.png?s=6225c36f2a2dd1fdca11ecc7b10b29105c8c62bd)](https://scrutinizer-ci.com/g/filp/whoops) +[![Code Coverage](https://scrutinizer-ci.com/g/filp/whoops/badges/coverage.png?s=711feb2069144d252d111b211965ffb19a7d09a8)](https://scrutinizer-ci.com/g/filp/whoops) ----- @@ -18,188 +22,40 @@ powerful stacked error handling system. - Stand-alone library with (currently) no required dependencies - Simple API for dealing with exceptions, trace frames & their data - Includes a pretty rad error page for your webapp projects -- **NEW** Includes the ability to open referenced files directly in your editor and IDE +- Includes the ability to [open referenced files directly in your editor and IDE](docs/Open%20Files%20In%20An%20Editor.md) +- Includes handlers for different response formats (JSON, XML, SOAP) - Includes a Silex Service Provider for painless integration with [Silex](http://silex.sensiolabs.org/) - Includes a Phalcon Service Provider for painless integration with [Phalcon](http://phalconphp.com/) - Includes a Module for equally painless integration with [Zend Framework 2](http://framework.zend.com/) - Easy to extend and integrate with existing libraries -- Clean, well-structured & tested code-base (well, except `pretty-template.php`, for now...) +- Clean, well-structured & tested code-base ## Installing +If you use Laravel 4, you already have Whoops. There are also community-provided instructions on how to integrate Whoops into +[Silex](docs/Framework%20Integration.md#integrating-with-silex), +[Phalcon](docs/Framework%20Integration.md#integrating-with-phalcon), +[Laravel 3](https://gist.github.com/hugomrdias/5169713#file-start-php), +[CakePHP](https://github.com/oldskool/WhoopsCakephp), +[Zend Framework 2](https://github.com/ghislainf/zf2-whoops), +[Yii 1](https://github.com/igorsantos07/yii-whoops). -- Install [Composer](http://getcomposer.org) and place the executable somewhere in your `$PATH` (for the rest of this README, -I'll reference it as just `composer`) - -- Add `filp/whoops` to your project's `composer.json` file: - -```json -{ - "require": { - "filp/whoops": "1.*" - } -} -``` - -- Install/update your dependencies - -```bash -$ cd my_project -$ composer install -``` - -And you're good to go! Have a look at the **example files** in `examples/` to get a feel for how things work. -I promise it's really simple! - -## API Documentation - -Initial API documentation of the whoops library is available here: -https://github.com/filp/whoops/wiki/API-Documentation - -## Usage - -### Integrating with Silex - -**whoops** comes packaged with a Silex Service Provider: `Whoops\Provider\Silex\WhoopsServiceProvider`. Using it -in your existing Silex project is easy: - -```php - -require 'vendor/autoload.php'; - -use Silex\Application; - -// ... some awesome code here ... - -if($app['debug']) { - $app->register(new Whoops\Provider\Silex\WhoopsServiceProvider); -} - -// ... - -$app->run(); -``` - -And that's about it. By default, you'll get the pretty error pages if something goes awry in your development -environment, but you also have full access to the **whoops** library, obviously. For example, adding a new handler -into your app is as simple as extending `whoops`: - -```php -$app['whoops'] = $app->extend('whoops', function($whoops) { - $whoops->pushHandler(new DeleteWholeProjectHandler); - return $whoops; -}); -``` -### Integrating with Phalcon - -**whoops** comes packaged with a Phalcon Service Provider: `Whoops\Provider\Phalcon\WhoopsServiceProvider`. Using it -in your existing Phalcon project is easy. The provider uses the default Phalcon DI unless you pass a DI instance into the constructor. - -```php -new Whoops\Provider\Phalcon\WhoopsServiceProvider; - -// --- or --- - -$di = Phalcon\DI\FactoryDefault; -new Whoops\Provider\Phalcon\WhoopsServiceProvider($di); -``` - -### Integrating with Laravel 4/Illuminate - -If you're using Laravel 4, as of [this commit to laravel/framework](https://github.com/laravel/framework/commit/64f3a79aae254b71550a8097880f0b0e09062d24), you're already using Whoops! Yay! - -### Integrating with Laravel 3 - -User [@hugomrdias](https://github.com/hugomrdias) contributed a simple guide/example to help you integrate **whoops** with Laravel 3's IoC container, available at: - -https://gist.github.com/hugomrdias/5169713#file-start-php - -### Integrating with Zend Framework 2 +If you are not using any of these frameworks, here's a very simple way to install: -User [@zsilbi](https://github.com/zsilbi) contributed a provider for ZF2 integration, -available in the following location: +1. Use [Composer](http://getcomposer.org) to install Whoops into your project: -https://github.com/filp/whoops/tree/master/src/Whoops/Provider/Zend + ```bash + composer require filp/whoops:1 + ``` -**Instructions:** +1. Register the pretty handler in your code: -- Add Whoops as a module to you app (/vendor/Whoops) -- Whoops must be the first module: + ```php + $whoops = new \Whoops\Run; + $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); + $whoops->register(); + ``` -```php -'modules' => array( - 'Whoops', - 'Application' - ) -``` - -- Move Module.php from /Whoops/Provider/Zend/Module.php to /Whoops/Module.php -- Use optional configurations in your controller config: - -```php -return array( - 'view_manager' => array( - 'display_not_found_reason' => true, - 'display_exceptions' => true, - 'json_exceptions' => array( - 'display' => true, - 'ajax_only' => true, - 'show_trace' => true - ) - ), -); -``` - -- NOTE: ob_clean(); is used to remove previous output, so you may use ob_start(); at the beginning of your app (index.php) - -### Opening referenced files with your favorite editor or IDE - -When using the pretty error page feature, whoops comes with the ability to -open referenced files directly in your IDE or editor. - -```php -setEditor('sublime'); -``` - -The following editors are currently supported by default. - -- `sublime` - Sublime Text 2 -- `emacs` - Emacs -- `textmate` - Textmate -- `macvim` - MacVim -- `xdebug` - xdebug (uses [xdebug.file_link_format](http://xdebug.org/docs/all_settings#file_link_format)) - -Adding your own editor is simple: - -```php - -$handler->setEditor(function($file, $line) { - return "whatever://open?file=$file&line=$line"; -}); - -``` - -You can add PhpStorm support with [PhpStormOpener](https://github.com/pinepain/PhpStormOpener#phpstormopener) (Mac OS X only): -```php - -$handler->setEditor( - function ($file, $line) { - // if your development server is not local it's good to map remote files to local - $translations = array('^' . __DIR__ => '~/Development/PhpStormOpener'); // change to your path - - foreach ($translations as $from => $to) { - $file = preg_replace('#' . $from . '#', $to, $file, 1); - } - - return "pstorm://$file:$line"; - } -); - -``` +For more options, have a look at the **example files** in `examples/` to get a feel for how things work. Also take a look at the [API Documentation](docs/API%20Documentation.md) and the list of available handers below. ### Available Handlers @@ -208,41 +64,12 @@ $handler->setEditor( - [`PrettyPageHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/PrettyPageHandler.php) - Shows a pretty error page when something goes pants-up - [`CallbackHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/CallbackHandler.php) - Wraps a closure or other callable as a handler. You do not need to use this handler explicitly, **whoops** will automatically wrap any closure or callable you pass to `Whoops\Run::pushHandler` - [`JsonResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/JsonResponseHandler.php) - Captures exceptions and returns information on them as a JSON string. Can be used to, for example, play nice with AJAX requests. - -## Contributing - -If you want to give me some feedback or make a suggestion, send me a message through -twitter: [@imfilp](https://twitter.com/imfilp) - -If you want to get your hands dirty, great! Here's a couple of steps/guidelines: - -- Fork/clone this repo, and update dev dependencies using Composer - -```bash -$ git clone git@github.com:filp/whoops.git -$ cd whoops -$ composer install --dev -``` - -- Create a new branch for your feature or fix - -```bash -$ git checkout -b feature/flames-on-the-side -``` - -- Add your changes & tests for those changes (in `tests/`). -- Remember to stick to the existing code style as best as possible. When in doubt, follow `PSR-2`. -- Send me a pull request! - -If you don't want to go through all this, but still found something wrong or missing, please -let me know, and/or **open a new issue report** so that I or others may take care of it. +- [`XmlResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/XmlResponseHandler.php) - Captures exceptions and returns information on them as a XML string. Can be used to, for example, play nice with AJAX requests. +- [`SoapResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/SoapResponseHandler.php) - Captures exceptions and returns information on them as a SOAP string. Might be used for SOAP Webservices. ## Authors -This library was primarily developed by [Filipe Dobreira](https://github.com/filp). - -A lot of awesome fixes and enhancements were also sent in by contributors, which you can find **[in this page right here](https://github.com/filp/whoops/contributors)**. +This library was primarily developed by [Filipe Dobreira](https://github.com/filp), and is currently maintained by [Denis Sokolov](https://github.com/denis-sokolov). A lot of awesome fixes and enhancements were also sent in by [various contributors](https://github.com/filp/whoops/contributors). [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/filp/whoops/trend.png)](https://bitdeli.com/free "Bitdeli Badge") - diff --git a/vendor/filp/whoops/composer.json b/vendor/filp/whoops/composer.json old mode 100755 new mode 100644 index ddae298..2c9b67e --- a/vendor/filp/whoops/composer.json +++ b/vendor/filp/whoops/composer.json @@ -15,12 +15,19 @@ "php": ">=5.3.0" }, "require-dev": { - "mockery/mockery": "dev-master", - "silex/silex": "1.0.*@dev" + "mockery/mockery": "0.9.*" }, "autoload": { "psr-0": { "Whoops": "src/" + }, + "classmap": [ + "src/deprecated" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" } } } diff --git a/vendor/filp/whoops/docs/API Documentation.md b/vendor/filp/whoops/docs/API Documentation.md new file mode 100644 index 0000000..ba102c2 --- /dev/null +++ b/vendor/filp/whoops/docs/API Documentation.md @@ -0,0 +1,393 @@ +# API Documentation + +### Core Classes: +- [`Whoops\Run`](#whoops-run) - The main `Whoops` class - represents the stack and current execution +- [`Whoops\Handler\Handler` and `Whoops\Handler\HandlerInterface`](#handler-abstract) - Abstract representation of a Handler, and utility methods +- [`Whoops\Exception\Inspector`](#inspector) - Exposes methods to inspect an exception +- [`Whoops\Exception\FrameCollection`](#frame-collection) - Exposes methods to work with a list of frames +- [`Whoops\Exception\Frame`](#frame) - Exposes methods to inspect a single stack trace frame from an exception + +### Core Handlers: +- [`Whoops\Handler\CallbackHandler`](#handler-callback) - Wraps regular closures as handlers +- [`Whoops\Handler\JsonResponseHandler`](#handler-json) - Formats errors and exceptions as a JSON payload +- [`Whoops\Handler\PrettyPageHandler`](#handler-pretty) - Outputs a detailed, fancy error page + +# Core Classes: + +## `Whoops\Run` + +The `Run` class models an instance of an execution, and integrates the methods to control whoops' execution in that context, and control the handlers stack. + +### Constants + +```php +string Run::EXCEPTION_HANDLER // (name for exception handler method) +string Run::ERROR_HANDLER // (name for error handler method) +string Run::SHUTDOWN_HANDLER // (name for shutdown handler method) +``` + +### Methods + +```php +// Pushes a new handler to the stack of handlers +Run::pushHandler( Whoops\HandlerInterface $handler ) + #=> Whoops\Run + +// Pops and returns the last handler from the stack +Run::popHandler() + #=> Whoops\HandlerInterface + +// Returns all handlers in the stack +Run::getHandlers() + #=> Whoops\HandlerInterface[] + +// Returns a Whoops\Inspector instance for a given Exception +Run::getInspector( Exception $exception ) + #=> Whoops\Exception\Inspector + +// Registers this Whoops\Run instance as an error/exception/shutdown +// handler with PHP +Run::register() + #=> Whoops\Run + +// I'll let you guess this one +Run::unregister() + #=> Whoops\Run + +// If true, allows Whoops to terminate script execution (default: true) +Run::allowQuit( $allowQuit = null ) + #=> bool + +// If true, allows Whoops to send output produced by handlers directly +// to the client. You'll want to set this to false if you want to +// package the handlers' response into your HTTP response abstraction +// or something (default: true) +Run::writeToOutput( $send = null) + #=> bool + +// ** HANDLERS ** +// These are semi-internal methods that receive input from +// PHP directly. If you know what you're doing, you can +// also call them directly + +// Handles an exception with the current stack. Returns the +// output produced by handlers. +Run::handleException( Exception $exception ) + #=> string + +// Handles an error with the current stack. Errors are +// converted into SPL ErrorException instances +Run::handleError( int $level, string $message, string $file = null, int $line = null) + #=> null + +// Hooked as a shutdown handler, captures fatal errors and handles them +// through the current stack: +Run::handleShutdown() + #=> null +``` + +## `Whoops\Handler\Handler` & `Whoops\Handler\HandlerInterface` + +This abstract class contains the base methods for concrete handler implementations. Custom handlers can extend it, or implement the `Whoops\Handler\HandlerInterface` interface. + +### Constants +```php +int Handler::DONE // If returned from HandlerInterface::handle, does absolutely nothing. +int Handler::LAST_HANDLER // ...tells whoops to not execute any more handlers after this one. +int Handler::QUIT // ...tells whoops to quit script execution immediately. +``` + +### Methods + +```php +// Custom handlers should expose this method, which will be called once an +// exception needs to be handled. The Handler::* constants can be used to +// signal the underlying logic as to what to do next. +HandlerInterface::handle() + #=> null | int + +// Sets the Run instance for this handler +HandlerInterface::setRun( Whoops\Run $run) + #=> null + +// Sets the Inspector instance for this handler +HandlerInterface::setInspector( Whoops\Exception\Inspector $inspector) + #=> null + +// Sets the Exception for this handler to handle +HandlerInterface::setException( Exception $exception ) + #=> null +``` + +## `Whoops\Exception\Inspector` + +The `Inspector` class provides methods to inspect an exception instance, with particular focus on its frames/stack-trace. + +### Methods + +```php +Inspector::__construct( Exception $exception ) + #=> null + +// Returns the Exception instance being inspected +Inspector::getException() + #=> Exception + +// Returns the string name of the Exception being inspected +// A faster way of doing get_class($inspector->getException()) +Inspector::getExceptionName() + #=> string + +// Returns the string message for the Exception being inspected +// A faster way of doing $inspector->getException()->getMessage() +Inspector::getExceptionMessage() + #=> string + +// Returns an iterator instance for all the frames in the stack +// trace for the Exception being inspected. +Inspector::getFrames() + #=> Whoops\Exception\FrameIterator +``` + +## `Whoops\Exception\FrameCollection` + +The `FrameCollection` class exposes a fluent interface to manipulate and examine a +collection of `Frame` instances. + +`FrameCollection` objects are **serializable**. + +### Methods + +```php +// Returns the number of frames in the collection +// May also be called as count($frameCollection) +FrameCollection::count() + #=> int + +// Filter the Frames in the collection with a callable. +// The callable must accept a Frame object, and return +// true to keep it in the collection, or false not to. +FrameCollection::filter( callable $callable ) + #=> FrameCollection + +// See: array_map +// The callable must accept a Frame object, and return +// a Frame object, doesn't matter if it's the same or not +// - will throw an UnexpectedValueException if something +// else is returned. +FrameCollection::map( callable $callable) + #=> FrameCollection +``` + +## `Whoops\Exception\Frame` + +The `Frame` class models a single frame in an exception's stack trace. You can use it to retrieve info about things such as frame context, file, line number. Additionally, you have available functionality to add comments to a frame, which is made available to other handlers. + +`Frame` objects are **serializable**. + +### Methods + +```php +// Returns the file path for the file where this frame occured. +// The optional $shortened argument allows you to retrieve a +// shorter, human-readable file path for display. +Frame::getFile( bool $shortened = false ) + #=> string | null (Some frames do not have a file path) + +// Returns the line number for this frame +Frame::getLine() + #=> int | null + +// Returns the class name for this frame, if it occured +// within a class/instance. +Frame::getClass() + #=> string | null + +// Returns the function name for this frame, if it occured +// within a function/method +Frame::getFunction() + #=> string | null + +// Returns an array of arguments for this frame. Empty if no +// arguments were provided. +Frame::getArgs() + #=> array + +// Returns the full file contents for the file where this frame +// occured. +Frame::getFileContents() + #=> string | null + +// Returns an array of lines for a file, optionally scoped to a +// given range of line numbers. i.e: Frame::getFileLines(0, 3) +// returns the first 3 lines after line 0 (1) +Frame::getFileLines( int $start = 0, int $length = null) + #=> array | null + +// Adds a comment to this Frame instance. Comments are shared +// with everything that can access the frame instance, obviously, +// so they can be used for a variety of inter-operability purposes. +// The context option can be used to improve comment filtering. +// Additionally, if frames contain URIs, the PrettyPageHandler +// will automagically convert them to clickable anchor elements. +Frame::addComment( string $comment, string $context = 'global' ) + #=> null + +// Returns all comments for this instance optionally filtered by +// a string context identifier. +Frame::getComments( string $filter = null ) + #=> array +``` + +# Core Handlers + +## `Whoops\Handler\CallbackHandler` + +The `CallbackHandler` handler wraps regular PHP closures as valid handlers. Useful for quick prototypes or simple handlers. When you pass a closure to `Run::pushHandler`, it's automatically converted to a `CallbackHandler` instance. + +```php +pushHandler(function($exception, $inspector, $run) { + var_dump($exception->getMessage()); + return Handler::DONE; +}); + +$run->popHandler() // #=> Whoops\Handler\CallbackHandler +``` + +### Methods + +```php +// Accepts any valid callable +// For example, a closure, a string function name, an array +// in the format array($class, $method) +CallbackHandler::__construct( $callable ) + #=> null + +CallbackHandler::handle() + #=> int | null +``` + +## `Whoops\Handler\JsonResponseHandler` + +The `JsonResponseHandler`, upon receiving an exception to handle, simply constructs a `JSON` payload, and outputs it. Methods are available to control the detail of the output, and if it should only execute for AJAX requests - paired with another handler under it, such as the `PrettyPageHandler`, it allows you to have meaningful output for both regular and AJAX requests. Neat! + +The `JSON` body has the following format: + +```json +{ + "error": { + "type": "RuntimeException", + "message": "Something broke!", + "file": "/var/project/foo/bar.php", + "line": 22, + + # if JsonResponseHandler::addTraceToOutput(true): + "trace": [ + { "file": "/var/project/foo/index.php", + "line": 157, + "function": "handleStuffs", + "class": "MyApplication\DoerOfThings", + "args": [ true, 10, "yay method arguments" ] }, + # ... more frames here ... + ] + } +} +``` + +### Methods + +```php + +// Should detailed stack trace output also be added to the +// JSON payload body? +JsonResponseHandler::addTraceToOutput( bool $yes = null ) + #=> bool + +// Should output only be sent if the current request is an +// AJAX request? +JsonResponseHandler::onlyForAjaxRequests( bool $yes = null ) + #=> bool + +JsonResponseHandler::handle() + #=> int | null +``` + +## `Whoops\Handler\PrettyPageHandler` + +The `PrettyPageHandler` generates a fancy, detailed error page which includes code views for all frames in the stack trace, environment details, etc. Super neat. It produces a bundled response string that does not require any further HTTP requests, so it's fit to work on pretty much any environment and framework that speaks back to a browser, without you having to explicitly hook it up to your framework/project's routing mechanisms. + +### Methods + +```php +// Adds a key=>value table of arbitrary data, labeled by $label, to +// the output. Useful where you want to display contextual data along +// with the error, about your application or project. +PrettyPageHandler::addDataTable( string $label, array $data ) + #=> null + +// Similar to PrettyPageHandler::addDataTable, but accepts a callable +// that will be called only when rendering an exception. This allows +// you to gather additional data that may not be available very early +// in the process. +PrettyPageHandler::addDataTableCallback( string $label, callable $callback ) + #=> null + +// Returns all data tables registered with this handler. Optionally +// accepts a string label, and will only return the data under that +// label. +PrettyPageHandler::getDataTables( string $label = null ) + #=> array | array[] + +// Sets the title for the error page +PrettyPageHandler::setPageTitle( string $title ) + #=> null + +// Returns the title for the error page +PrettyPageHandler::getPageTitle() + #=> string + +// Returns a list of string paths where resources +// used by this handler are searched for - the template and CSS +// files. +PrettyPageHandler::getResourcesPaths() + #=> array + +// Adds a string path to the location of resources for the +// handler. Useful if you want to roll your own template +// file (pretty-template.php and pretty-page.css) while +// still using the logic this handler provides +PrettyPageHandler::addResourcesPath( string $resourcesPath ) + #=> null + +// Sets an editor to use to open referenced files, either by +// a string identifier, or as an arbitrary callable that returns +// a string that can be used as an href attribute. +// Available built-in editors are: +// - sublime +// - emacs +// - textmate +// - macvim +PrettyPageHandler::setEditor( string $editor ) +PrettyPageHandler::setEditor( function($file, $line) { return string } ) + #=> null + +// Similar to PrettyPageHandler::setEditor, but allows you +// to name your custom editor, thus sharing it with the +// rest of the application. Useful if, for example, you integrate +// Whoops into your framework or library, and want to share +// support for extra editors with the end-user. +// +// $resolver may be a callable, like with ::setEditor, or a string +// with placeholders %file and %line. +// For example: +// $handler->addEditor('whatevs', 'whatevs://open?file=file://%file&line=%line') +PrettyPageHandler::addEditor( string $editor, $resolver ) + #=> null + +PrettyPageHandler::handle() + #=> int | null +``` diff --git a/vendor/filp/whoops/docs/Framework Integration.md b/vendor/filp/whoops/docs/Framework Integration.md new file mode 100644 index 0000000..ee6669a --- /dev/null +++ b/vendor/filp/whoops/docs/Framework Integration.md @@ -0,0 +1,80 @@ +# Integrating with Silex + +**whoops** comes packaged with a Silex Service Provider: `Whoops\Provider\Silex\WhoopsServiceProvider`. Using it +in your existing Silex project is easy: + +```php + +require 'vendor/autoload.php'; + +use Silex\Application; + +// ... some awesome code here ... + +if($app['debug']) { + $app->register(new Whoops\Provider\Silex\WhoopsServiceProvider); +} + +// ... + +$app->run(); +``` + +And that's about it. By default, you'll get the pretty error pages if something goes awry in your development +environment, but you also have full access to the **whoops** library, obviously. For example, adding a new handler +into your app is as simple as extending `whoops`: + +```php +$app['whoops'] = $app->extend('whoops', function($whoops) { + $whoops->pushHandler(new DeleteWholeProjectHandler); + return $whoops; +}); +``` + + +# Integrating with Phalcon + +**whoops** comes packaged with a Phalcon Service Provider: `Whoops\Provider\Phalcon\WhoopsServiceProvider`. Using it +in your existing Phalcon project is easy. The provider uses the default Phalcon DI unless you pass a DI instance into the constructor. + +```php +new Whoops\Provider\Phalcon\WhoopsServiceProvider; + +// --- or --- + +$di = Phalcon\DI\FactoryDefault; +new Whoops\Provider\Phalcon\WhoopsServiceProvider($di); +``` + + +# Contributing an integration with a framework + +Lately we're prefering to keep integration libraries out of the Whoops core. +If possible, consider managing an official Whoops-SomeFramework integration. + +The procedure is not hard at all. + +1. Keep your integration classes and instructions in a repository of your own; +2. Create a `composer.json` file in your repository with contents similar to the following: + + ``` + { + "name": "username/whoops-someframework", + "description": "Integrates the Whoops library into SomeFramework", + "require": { + "filp/whoops": "1.*" + } + } + ``` + +3. [Register it with Packagist](https://packagist.org/packages/submit). + +Once that is done, please create an issue and we will add a link to it in our README. + +SomeFramework users then would write this in their `composer.json`: + + "require": { + "username/whoops-someframework": "*" + } + +This would also install Whoops and you'd be able to release updates to your package as quickly as you wish them to. diff --git a/vendor/filp/whoops/docs/Open Files In An Editor.md b/vendor/filp/whoops/docs/Open Files In An Editor.md new file mode 100644 index 0000000..c789aca --- /dev/null +++ b/vendor/filp/whoops/docs/Open Files In An Editor.md @@ -0,0 +1,49 @@ +# Open Files In An Editor + +When using the pretty error page feature, whoops comes with the ability to +open referenced files directly in your IDE or editor. + +```php +setEditor('sublime'); +``` + +The following editors are currently supported by default. + +- `sublime` - Sublime Text 2 +- `emacs` - Emacs +- `textmate` - Textmate +- `macvim` - MacVim +- `xdebug` - xdebug (uses [xdebug.file_link_format](http://xdebug.org/docs/all_settings#file_link_format)) + +Adding your own editor is simple: + +```php + +$handler->setEditor(function($file, $line) { + return "whatever://open?file=$file&line=$line"; +}); + +``` + +You can add PhpStorm support with [PhpStormOpener](https://github.com/pinepain/PhpStormOpener#phpstormopener) (Mac OS X only): +```php + +$handler->setEditor( + function ($file, $line) { + // if your development server is not local it's good to map remote files to local + $translations = array('^' . __DIR__ => '~/Development/PhpStormOpener'); // change to your path + + foreach ($translations as $from => $to) { + $file = preg_replace('#' . $from . '#', $to, $file, 1); + } + + return "pstorm://$file:$line"; + } +); + +``` diff --git a/vendor/filp/whoops/examples/example-ajax-only.php b/vendor/filp/whoops/examples/example-ajax-only.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/examples/example-silex.php b/vendor/filp/whoops/examples/example-silex.php old mode 100755 new mode 100644 index 86530a4..ce9ac5d --- a/vendor/filp/whoops/examples/example-silex.php +++ b/vendor/filp/whoops/examples/example-silex.php @@ -3,10 +3,9 @@ * Whoops - php errors for cool kids * @author Filipe Dobreira * - * NOTE: Requires silex/silex, can be installed with composer - * within this project using the --dev flag: + * NOTE: Requires silex/silex, can be installed with composer: * - * $ composer install --dev + * $ composer require silex/silex:* * * Run this example file with the PHP 5.4 web server with: * diff --git a/vendor/filp/whoops/examples/example.php b/vendor/filp/whoops/examples/example.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/phpunit.xml.dist b/vendor/filp/whoops/phpunit.xml.dist old mode 100755 new mode 100644 index a5abf9a..04bc278 --- a/vendor/filp/whoops/phpunit.xml.dist +++ b/vendor/filp/whoops/phpunit.xml.dist @@ -5,11 +5,20 @@ tests/Whoops/ + + tests/deprecated/ + - + src/Whoops/ + + ./docs + ./examples + ./tests + ./vendor + diff --git a/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php b/vendor/filp/whoops/src/Whoops/Exception/ErrorException.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/src/Whoops/Exception/Formatter.php b/vendor/filp/whoops/src/Whoops/Exception/Formatter.php new file mode 100644 index 0000000..f95cfa1 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Exception/Formatter.php @@ -0,0 +1,48 @@ + + */ + +namespace Whoops\Exception; + +class Formatter +{ + /** + * Returns all basic information about the exception in a simple array + * for further convertion to other languages + * @param Inspector $inspector + * @param bool $shouldAddTrace + * @return array + */ + public static function formatExceptionAsDataArray(Inspector $inspector, $shouldAddTrace) + { + $exception = $inspector->getException(); + $response = array( + 'type' => get_class($exception), + 'message' => $exception->getMessage(), + 'file' => $exception->getFile(), + 'line' => $exception->getLine() + ); + + if($shouldAddTrace) { + $frames = $inspector->getFrames(); + $frameData = array(); + + foreach($frames as $frame) { + /** @var Frame $frame */ + $frameData[] = array( + 'file' => $frame->getFile(), + 'line' => $frame->getLine(), + 'function' => $frame->getFunction(), + 'class' => $frame->getClass(), + 'args' => $frame->getArgs() + ); + } + + $response['trace'] = $frameData; + } + + return $response; + } +} diff --git a/vendor/filp/whoops/src/Whoops/Exception/Frame.php b/vendor/filp/whoops/src/Whoops/Exception/Frame.php old mode 100755 new mode 100644 index 8895f26..bb99798 --- a/vendor/filp/whoops/src/Whoops/Exception/Frame.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Frame.php @@ -49,7 +49,7 @@ class Frame implements Serializable // @todo: This can be made more reliable by checking if we've entered // eval() in a previous trace, but will need some more work on the upper // trace collector(s). - if(preg_match('/^(.*)\((\d+)\) : eval\(\)\'d code$/', $file, $matches)) { + if(preg_match('/^(.*)\((\d+)\) : (?:eval\(\)\'d|assert) code$/', $file, $matches)) { $file = $this->frame['file'] = $matches[1]; $this->frame['line'] = (int) $matches[2]; } @@ -161,7 +161,7 @@ class Frame implements Serializable /** * Returns the array containing the raw frame data from which * this Frame object was built - * + * * @return array */ public function getRawFrame() @@ -217,7 +217,7 @@ class Frame implements Serializable /** * Implements the Serializable interface, with special * steps to also save the existing comments. - * + * * @see Serializable::serialize * @return string */ @@ -234,7 +234,7 @@ class Frame implements Serializable /** * Unserializes the frame data, while also preserving * any existing comment data. - * + * * @see Serializable::unserialize * @param string $serializedFrame */ @@ -249,4 +249,17 @@ class Frame implements Serializable $this->frame = $frame; } + + /** + * Compares Frame against one another + * @param Frame $frame + * @return bool + */ + public function equals(Frame $frame) + { + if (!$this->getFile() || $this->getFile() === 'Unknown' || !$this->getLine()) { + return false; + } + return $frame->getFile() === $this->getFile() && $frame->getLine() === $this->getLine(); + } } diff --git a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php old mode 100755 new mode 100644 index 5708712..b3af9df --- a/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php +++ b/vendor/filp/whoops/src/Whoops/Exception/FrameCollection.php @@ -9,6 +9,7 @@ use Whoops\Exception\Frame; use UnexpectedValueException; use IteratorAggregate; use ArrayIterator; +use ArrayAccess; use Serializable; use Countable; @@ -16,7 +17,7 @@ use Countable; * Exposes a fluent interface for dealing with an ordered list * of stack-trace frames. */ -class FrameCollection implements IteratorAggregate, Serializable, Countable +class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, Countable { /** * @var array[] @@ -35,19 +36,19 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable /** * Filters frames using a callable, returns the same FrameCollection - * + * * @param callable $callable * @return FrameCollection */ public function filter($callable) { $this->frames = array_filter($this->frames, $callable); - return $this; + return $this; } /** * Map the collection of frames - * + * * @param callable $callable * @return FrameCollection */ @@ -73,7 +74,7 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable /** * Returns an array with all frames, does not affect * the internal array. - * + * * @todo If this gets any more complex than this, * have getIterator use this method. * @see FrameCollection::getIterator @@ -94,6 +95,42 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable } /** + * @see ArrayAccess::offsetExists + * @param int $offset + */ + public function offsetExists($offset) + { + return isset($this->frames[$offset]); + } + + /** + * @see ArrayAccess::offsetGet + * @param int $offset + */ + public function offsetGet($offset) + { + return $this->frames[$offset]; + } + + /** + * @see ArrayAccess::offsetSet + * @param int $offset + */ + public function offsetSet($offset, $value) + { + throw new \Exception(__CLASS__ . ' is read only'); + } + + /** + * @see ArrayAccess::offsetUnset + * @param int $offset + */ + public function offsetUnset($offset) + { + throw new \Exception(__CLASS__ . ' is read only'); + } + + /** * @see Countable::count * @return int */ @@ -119,4 +156,36 @@ class FrameCollection implements IteratorAggregate, Serializable, Countable { $this->frames = unserialize($serializedFrames); } + + /** + * @param Frame[] $frames Array of Frame instances, usually from $e->getPrevious() + */ + public function prependFrames(array $frames) + { + $this->frames = array_merge($frames, $this->frames); + } + + /** + * Gets the innermost part of stack trace that is not the same as that of outer exception + * + * @param FrameCollection $parentFrames Outer exception frames to compare tail against + * @return Frame[] + */ + public function topDiff(FrameCollection $parentFrames) + { + $diff = $this->frames; + + $parentFrames = $parentFrames->getArray(); + $p = count($parentFrames)-1; + + for($i = count($diff)-1; $i >= 0 && $p >= 0; $i--) { + /** @var Frame $tailFrame */ + $tailFrame = $diff[$i]; + if($tailFrame->equals($parentFrames[$p])) { + unset($diff[$i]); + } + $p--; + } + return $diff; + } } diff --git a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php old mode 100755 new mode 100644 index 2ecf757..ec7f4cc --- a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php +++ b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php @@ -5,8 +5,6 @@ */ namespace Whoops\Exception; -use Whoops\Exception\FrameCollection; -use Whoops\Exception\ErrorException; use Exception; class Inspector @@ -17,11 +15,16 @@ class Inspector private $exception; /** - * @var FrameCollection + * @var \Whoops\Exception\FrameCollection */ private $frames; /** + * @var \Whoops\Exception\Inspector + */ + private $previousExceptionInspector; + + /** * @param Exception $exception The exception to inspect */ public function __construct(Exception $exception) @@ -54,9 +57,36 @@ class Inspector } /** + * Does the wrapped Exception has a previous Exception? + * @return bool + */ + public function hasPreviousException() + { + return !!$this->previousExceptionInspector || !!$this->exception->getPrevious(); + } + + /** + * Returns an Inspector for a previous Exception, if any. + * @todo Clean this up a bit, cache stuff a bit better. + * @return Inspector + */ + public function getPreviousExceptionInspector() + { + if($this->previousExceptionInspector === null) { + $previousException = $this->exception->getPrevious(); + + if($previousException) { + $this->previousExceptionInspector = new Inspector($previousException); + } + } + + return $this->previousExceptionInspector; + } + + /** * Returns an iterator for the inspected exception's * frames. - * @return FrameCollection + * @return \Whoops\Exception\FrameCollection */ public function getFrames() { @@ -74,11 +104,27 @@ class Inspector array_unshift($frames, $firstFrame); } $this->frames = new FrameCollection($frames); + + if ($previousInspector = $this->getPreviousExceptionInspector()) { + // Keep outer frame on top of the inner one + $outerFrames = $this->frames; + $newFrames = clone $previousInspector->getFrames(); + // I assume it will always be set, but let's be safe + if (isset($newFrames[0])) { + $newFrames[0]->addComment( + $previousInspector->getExceptionMessage(), + 'Exception message:' + ); + } + $newFrames->prependFrames($outerFrames->topDiff($newFrames)); + $this->frames = $newFrames; + } } return $this->frames; } + /** * Given an exception, generates an array in the format * generated by Exception::getTrace() diff --git a/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php b/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/src/Whoops/Handler/Handler.php b/vendor/filp/whoops/src/Whoops/Handler/Handler.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php old mode 100755 new mode 100644 index abb4078..abf3350 --- a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php +++ b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php @@ -18,16 +18,19 @@ interface HandlerInterface /** * @param Run $run + * @return void */ public function setRun(Run $run); /** * @param Exception $exception + * @return void */ public function setException(Exception $exception); /** * @param Inspector $inspector + * @return void */ public function setInspector(Inspector $inspector); } diff --git a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php old mode 100755 new mode 100644 index a5e8d62..611dd6e --- a/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/JsonResponseHandler.php @@ -6,7 +6,7 @@ namespace Whoops\Handler; use Whoops\Handler\Handler; -use Whoops\Exception\Frame; +use Whoops\Exception\Formatter; /** * Catches an exception and converts it to a JSON @@ -27,7 +27,7 @@ class JsonResponseHandler extends Handler /** * @param bool|null $returnFrames - * @return null|bool + * @return bool|$this */ public function addTraceToOutput($returnFrames = null) { @@ -36,6 +36,7 @@ class JsonResponseHandler extends Handler } $this->returnFrames = (bool) $returnFrames; + return $this; } /** @@ -73,34 +74,15 @@ class JsonResponseHandler extends Handler return Handler::DONE; } - $exception = $this->getException(); - $response = array( - 'error' => array( - 'type' => get_class($exception), - 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine() - ) + 'error' => Formatter::formatExceptionAsDataArray( + $this->getInspector(), + $this->addTraceToOutput() + ), ); - if($this->addTraceToOutput()) { - $inspector = $this->getInspector(); - $frames = $inspector->getFrames(); - $frameData = array(); - - foreach($frames as $frame) { - /** @var Frame $frame */ - $frameData[] = array( - 'file' => $frame->getFile(), - 'line' => $frame->getLine(), - 'function' => $frame->getFunction(), - 'class' => $frame->getClass(), - 'args' => $frame->getArgs() - ); - } - - $response['error']['trace'] = $frameData; + if (\Whoops\Util\Misc::canSendHeaders()) { + header('Content-Type: application/json'); } echo json_encode($response); diff --git a/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php new file mode 100644 index 0000000..0dda9be --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Handler/PlainTextHandler.php @@ -0,0 +1,332 @@ + +* Plaintext handler for command line and logs. +* @author Pierre-Yves Landuré +*/ + +namespace Whoops\Handler; +use Whoops\Handler\Handler; +use InvalidArgumentException; +use Whoops\Exception\Frame; +use Psr\Log\LoggerInterface; + +/** +* Handler outputing plaintext error messages. Can be used +* directly, or will be instantiated automagically by Whoops\Run +* if passed to Run::pushHandler +*/ +class PlainTextHandler extends Handler +{ + const VAR_DUMP_PREFIX = ' | '; + + /** + * @var Psr\Log\LoggerInterface + */ + protected $logger; + + /** + * @var bool + */ + private $addTraceToOutput = true; + + /** + * @var bool|integer + */ + private $addTraceFunctionArgsToOutput = false; + + /** + * @var integer + */ + private $traceFunctionArgsOutputLimit = 1024; + + /** + * @var bool + */ + private $onlyForCommandLine = false; + + /** + * @var bool + */ + private $outputOnlyIfCommandLine = true; + + /** + * @var bool + */ + private $loggerOnly = false; + + /** + * Constructor. + * @throws InvalidArgumentException If argument is not null or a LoggerInterface + * @param Psr\Log\LoggerInterface|null $logger + */ + public function __construct($logger = null) + { + $this->setLogger($logger); + } + + /** + * Set the output logger interface. + * @throws InvalidArgumentException If argument is not null or a LoggerInterface + * @param Psr\Log\LoggerInterface|null $logger + */ + public function setLogger($logger = null) + { + if(! (is_null($logger) + || $logger InstanceOf LoggerInterface)) { + throw new InvalidArgumentException( + 'Argument to ' . __METHOD__ . + " must be a valid Logger Interface (aka. Monolog), " . + get_class($logger) . ' given.' + ); + } + + $this->logger = $logger; + } + + /** + * @return Psr\Log\LoggerInterface|null + */ + public function getLogger() + { + return $this->logger; + } + + /** + * Add error trace to output. + * @param bool|null $addTraceToOutput + * @return bool|$this + */ + public function addTraceToOutput($addTraceToOutput = null) + { + if(func_num_args() == 0) { + return $this->addTraceToOutput; + } + + $this->addTraceToOutput = (bool) $addTraceToOutput; + return $this; + } + + /** + * Add error trace function arguments to output. + * Set to True for all frame args, or integer for the n first frame args. + * @param bool|integer|null $addTraceFunctionArgsToOutput + * @return null|bool|integer + */ + public function addTraceFunctionArgsToOutput($addTraceFunctionArgsToOutput = null) + { + if(func_num_args() == 0) { + return $this->addTraceFunctionArgsToOutput; + } + + if(! is_integer($addTraceFunctionArgsToOutput)) { + $this->addTraceFunctionArgsToOutput = (bool) $addTraceFunctionArgsToOutput; + } + else { + $this->addTraceFunctionArgsToOutput = $addTraceFunctionArgsToOutput; + } + } + + /** + * Set the size limit in bytes of frame arguments var_dump output. + * If the limit is reached, the var_dump output is discarded. + * Prevent memory limit errors. + * @var integer + */ + public function setTraceFunctionArgsOutputLimit($traceFunctionArgsOutputLimit) + { + $this->traceFunctionArgsOutputLimit = (integer) $traceFunctionArgsOutputLimit; + } + + /** + * Get the size limit in bytes of frame arguments var_dump output. + * If the limit is reached, the var_dump output is discarded. + * Prevent memory limit errors. + * @return integer + */ + public function getTraceFunctionArgsOutputLimit() + { + return $this->traceFunctionArgsOutputLimit; + } + + /** + * Restrict error handling to command line calls. + * @param bool|null $onlyForCommandLine + * @return null|bool + */ + public function onlyForCommandLine($onlyForCommandLine = null) + { + if(func_num_args() == 0) { + return $this->onlyForCommandLine; + } + $this->onlyForCommandLine = (bool) $onlyForCommandLine; + } + + /** + * Output the error message only if using command line. + * else, output to logger if available. + * Allow to safely add this handler to web pages. + * @param bool|null $outputOnlyIfCommandLine + * @return null|bool + */ + public function outputOnlyIfCommandLine($outputOnlyIfCommandLine = null) + { + if(func_num_args() == 0) { + return $this->outputOnlyIfCommandLine; + } + $this->outputOnlyIfCommandLine = (bool) $outputOnlyIfCommandLine; + } + + /** + * Only output to logger. + * @param bool|null $loggerOnly + * @return null|bool + */ + public function loggerOnly($loggerOnly = null) + { + if(func_num_args() == 0) { + return $this->loggerOnly; + } + + $this->loggerOnly = (bool) $loggerOnly; + } + + /** + * Check, if possible, that this execution was triggered by a command line. + * @return bool + */ + private function isCommandLine() + { + return PHP_SAPI == 'cli'; + } + + /** + * Test if handler can process the exception.. + * @return bool + */ + private function canProcess() + { + return $this->isCommandLine() || !$this->onlyForCommandLine(); + } + + /** + * Test if handler can output to stdout. + * @return bool + */ + private function canOutput() + { + return ($this->isCommandLine() || ! $this->outputOnlyIfCommandLine()) + && ! $this->loggerOnly(); + } + + /** + * Get the frame args var_dump. + * @param \Whoops\Exception\Frame $frame [description] + * @param integer $line [description] + * @return string + */ + private function getFrameArgsOutput(Frame $frame, $line) + { + if($this->addTraceFunctionArgsToOutput() === false + || $this->addTraceFunctionArgsToOutput() < $line) { + return ''; + } + + // Dump the arguments: + ob_start(); + var_dump($frame->getArgs()); + if(ob_get_length() > $this->getTraceFunctionArgsOutputLimit()) { + // The argument var_dump is to big. + // Discarded to limit memory usage. + ob_clean(); + return sprintf( + "\n%sArguments dump length greater than %d Bytes. Discarded.", + self::VAR_DUMP_PREFIX, + $this->getTraceFunctionArgsOutputLimit() + ); + } + + return sprintf("\n%s", + preg_replace('/^/m', self::VAR_DUMP_PREFIX, ob_get_clean()) + ); + } + + /** + * Get the exception trace as plain text. + * @return string + */ + private function getTraceOutput() + { + if(! $this->addTraceToOutput()) { + return ''; + } + $inspector = $this->getInspector(); + $frames = $inspector->getFrames(); + + $response = "\nStack trace:"; + + $line = 1; + foreach($frames as $frame) { + /** @var Frame $frame */ + $class = $frame->getClass(); + + $template = "\n%3d. %s->%s() %s:%d%s"; + if(! $class) { + // Remove method arrow (->) from output. + $template = "\n%3d. %s%s() %s:%d%s"; + } + + $response .= sprintf( + $template, + $line, + $class, + $frame->getFunction(), + $frame->getFile(), + $frame->getLine(), + $this->getFrameArgsOutput($frame, $line) + ); + + $line++; + } + + return $response; + } + + /** + * @return int + */ + public function handle() + { + if(! $this->canProcess()) { + return Handler::DONE; + } + + $exception = $this->getException(); + + $response = sprintf("%s: %s in file %s on line %d%s\n", + get_class($exception), + $exception->getMessage(), + $exception->getFile(), + $exception->getLine(), + $this->getTraceOutput() + ); + + if($this->getLogger()) { + $this->getLogger()->addError($response); + } + + if(! $this->canOutput()) { + return Handler::DONE; + } + + if(class_exists('\Whoops\Util\Misc') + && \Whoops\Util\Misc::canSendHeaders()) { + header('Content-Type: text/plain'); + } + + echo $response; + + return Handler::QUIT; + } +} diff --git a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php old mode 100755 new mode 100644 index 33c215f..326f586 --- a/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php @@ -6,14 +6,33 @@ namespace Whoops\Handler; use Whoops\Handler\Handler; +use Whoops\Util\TemplateHelper; use InvalidArgumentException; +use RuntimeException; class PrettyPageHandler extends Handler { /** + * Search paths to be scanned for resources, in the reverse + * order they're declared. + * + * @var array + */ + private $searchPaths = array(); + + /** + * Fast lookup cache for known resource locations. + * + * @var array + */ + private $resourceCache = array(); + + /** + * The name of the custom css file. + * * @var string */ - private $resourcesPath; + private $customCss = null; /** * @var array[] @@ -21,9 +40,14 @@ class PrettyPageHandler extends Handler private $extraTables = array(); /** + * @var bool + */ + private $handleUnconditionally = false; + + /** * @var string */ - private $pageTitle = 'Whoops! There was an error.'; + private $pageTitle = "Whoops! There was an error."; /** * A string identifier for a known IDE/text editor, or a closure @@ -42,10 +66,10 @@ class PrettyPageHandler extends Handler * @var array */ protected $editors = array( - 'sublime' => 'subl://open?url=file://%file&line=%line', - 'textmate' => 'txmt://open?url=file://%file&line=%line', - 'emacs' => 'emacs://open?url=file://%file&line=%line', - 'macvim' => 'mvim://open/?url=file://%file&line=%line' + "sublime" => "subl://open?url=file://%file&line=%line", + "textmate" => "txmt://open?url=file://%file&line=%line", + "emacs" => "emacs://open?url=file://%file&line=%line", + "macvim" => "mvim://open/?url=file://%file&line=%line" ); /** @@ -59,6 +83,9 @@ class PrettyPageHandler extends Handler return str_replace(array('%f', '%l'), array($file, $line), ini_get('xdebug.file_link_format')); }; } + + // Add the default, local resource search path: + $this->searchPaths[] = __DIR__ . "/../Resources"; } /** @@ -66,83 +93,86 @@ class PrettyPageHandler extends Handler */ public function handle() { - // Check conditions for outputting HTML: - // @todo: make this more robust - if(php_sapi_name() === 'cli' && !isset($_ENV['whoops-test'])) { - return Handler::DONE; - } + if (!$this->handleUnconditionally()) { + // Check conditions for outputting HTML: + // @todo: Make this more robust + if(php_sapi_name() === 'cli') { + + // Help users who have been relying on an internal test value + // fix their code to the proper method + if (isset($_ENV['whoops-test'])) { + throw new \Exception( + 'Use handleUnconditionally instead of whoops-test' + .' environment variable' + ); + } - // Get the 'pretty-template.php' template file - // @todo: this can be made more dynamic &&|| cleaned-up - if(!($resources = $this->getResourcesPath())) { - $resources = __DIR__ . '/../Resources'; + return Handler::DONE; + } } - $templateFile = "$resources/pretty-template.php"; + // @todo: Make this more dynamic + $helper = new TemplateHelper; - // @todo: Make this more reliable, - // possibly by adding methods to append CSS & JS to the page - $cssFile = "$resources/pretty-page.css"; + $templateFile = $this->getResource("views/layout.html.php"); + $cssFile = $this->getResource("css/whoops.base.css"); + $zeptoFile = $this->getResource("js/zepto.min.js"); + $jsFile = $this->getResource("js/whoops.base.js"); + + if ($this->customCss) { + $customCssFile = $this->getResource($this->customCss); + } - // Prepare the $v global variable that will pass relevant - // information to the template $inspector = $this->getInspector(); $frames = $inspector->getFrames(); - $v = (object) array( - 'title' => $this->getPageTitle(), - 'name' => explode('\\', $inspector->getExceptionName()), - 'message' => $inspector->getException()->getMessage(), - 'frames' => $frames, - 'hasFrames' => !!count($frames), - 'handler' => $this, - 'handlers' => $this->getRun()->getHandlers(), - 'pageStyle' => file_get_contents($cssFile), - - 'tables' => array( - 'Server/Request Data' => $_SERVER, - 'GET Data' => $_GET, - 'POST Data' => $_POST, - 'Files' => $_FILES, - 'Cookies' => $_COOKIE, - 'Session' => isset($_SESSION) ? $_SESSION: array(), - 'Environment Variables' => $_ENV + // List of variables that will be passed to the layout template. + $vars = array( + "page_title" => $this->getPageTitle(), + + // @todo: Asset compiler + "stylesheet" => file_get_contents($cssFile), + "zepto" => file_get_contents($zeptoFile), + "javascript" => file_get_contents($jsFile), + + // Template paths: + "header" => $this->getResource("views/header.html.php"), + "frame_list" => $this->getResource("views/frame_list.html.php"), + "frame_code" => $this->getResource("views/frame_code.html.php"), + "env_details" => $this->getResource("views/env_details.html.php"), + + "title" => $this->getPageTitle(), + "name" => explode("\\", $inspector->getExceptionName()), + "message" => $inspector->getException()->getMessage(), + "frames" => $frames, + "has_frames" => !!count($frames), + "handler" => $this, + "handlers" => $this->getRun()->getHandlers(), + + "tables" => array( + "Server/Request Data" => $_SERVER, + "GET Data" => $_GET, + "POST Data" => $_POST, + "Files" => $_FILES, + "Cookies" => $_COOKIE, + "Session" => isset($_SESSION) ? $_SESSION: array(), + "Environment Variables" => $_ENV ) ); + if (isset($customCssFile)) { + $vars["stylesheet"] .= file_get_contents($customCssFile); + } + + // Add extra entries list of data tables: + // @todo: Consolidate addDataTable and addDataTableCallback $extraTables = array_map(function($table) { return $table instanceof \Closure ? $table() : $table; }, $this->getDataTables()); + $vars["tables"] = array_merge($extraTables, $vars["tables"]); - // Add extra entries list of data tables: - $v->tables = array_merge($extraTables, $v->tables); - - call_user_func(function() use($templateFile, $v) { - // $e -> cleanup output, optionally preserving URIs as anchors: - $e = function($_, $allowLinks = false) { - $escaped = htmlspecialchars($_, ENT_QUOTES, 'UTF-8'); - - // convert URIs to clickable anchor elements: - if($allowLinks) { - $escaped = preg_replace( - '@([A-z]+?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', - "$1", $escaped - ); - } - - return $escaped; - }; - - // $slug -> sluggify string (i.e: Hello world! -> hello-world) - $slug = function($_) { - $_ = str_replace(" ", "-", $_); - $_ = preg_replace('/[^\w\d\-\_]/i', '', $_); - return strtolower($_); - }; - - require $templateFile; - }); - + $helper->setVariables($vars); + $helper->render($templateFile); return Handler::QUIT; } @@ -193,7 +223,7 @@ class PrettyPageHandler extends Handler * Optionally accepts a 'label' parameter, to only return the data * table under that label. * @param string|null $label - * @return array[] + * @return array[]|callable */ public function getDataTables($label = null) { @@ -206,6 +236,23 @@ class PrettyPageHandler extends Handler } /** + * Allows to disable all attempts to dynamically decide whether to + * handle or return prematurely. + * Set this to ensure that the handler will perform no matter what. + * @param bool|null $value + * @return bool|null + */ + public function handleUnconditionally($value = null) + { + if(func_num_args() == 0) { + return $this->handleUnconditionally; + } + + $this->handleUnconditionally = (bool) $value; + } + + + /** * Adds an editor resolver, identified by a string * name, and that may be a string path, or a callable * resolver. If the callable returns a string, it will @@ -261,7 +308,7 @@ class PrettyPageHandler extends Handler * @throws InvalidArgumentException If editor resolver does not return a string * @param string $filePath * @param int $line - * @return string|bool + * @return false|string */ public function getEditorHref($filePath, $line) { @@ -293,7 +340,8 @@ class PrettyPageHandler extends Handler } /** - * @var string + * @param string $title + * @return void */ public function setPageTitle($title) { @@ -309,25 +357,103 @@ class PrettyPageHandler extends Handler } /** + * Adds a path to the list of paths to be searched for + * resources. + * + * @throws InvalidArgumnetException If $path is not a valid directory + * + * @param string $path + * @return void + */ + public function addResourcePath($path) + { + if(!is_dir($path)) { + throw new InvalidArgumentException( + "'$path' is not a valid directory" + ); + } + + array_unshift($this->searchPaths, $path); + } + + /** + * Adds a custom css file to be loaded. + * + * @param string $name + * @return void + */ + public function addCustomCss($name) + { + $this->customCss = $name; + } + + /** + * @return array + */ + public function getResourcePaths() + { + return $this->searchPaths; + } + + /** + * Finds a resource, by its relative path, in all available search paths. + * The search is performed starting at the last search path, and all the + * way back to the first, enabling a cascading-type system of overrides + * for all resources. + * + * @throws RuntimeException If resource cannot be found in any of the available paths + * + * @param string $resource + * @return string + */ + protected function getResource($resource) + { + // If the resource was found before, we can speed things up + // by caching its absolute, resolved path: + if(isset($this->resourceCache[$resource])) { + return $this->resourceCache[$resource]; + } + + // Search through available search paths, until we find the + // resource we're after: + foreach($this->searchPaths as $path) { + $fullPath = $path . "/$resource"; + + if(is_file($fullPath)) { + // Cache the result: + $this->resourceCache[$resource] = $fullPath; + return $fullPath; + } + } + + // If we got this far, nothing was found. + throw new RuntimeException( + "Could not find resource '$resource' in any resource paths." + . "(searched: " . join(", ", $this->searchPaths). ")" + ); + } + + /** + * @deprecated + * * @return string */ public function getResourcesPath() { - return $this->resourcesPath; + $allPaths = $this->getResourcePaths(); + + // Compat: return only the first path added + return end($allPaths) ?: null; } /** - * @throws InvalidArgumentException If argument is not a valid directory - * @param string $resourcesPath + * @deprecated + * + * @param string $resourcesPath + * @return void */ public function setResourcesPath($resourcesPath) { - if(!is_dir($resourcesPath)) { - throw new InvalidArgumentException( - "$resourcesPath is not a valid directory" - ); - } - - $this->resourcesPath = $resourcesPath; + $this->addResourcePath($resourcesPath); } } diff --git a/vendor/filp/whoops/src/Whoops/Handler/SoapResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/SoapResponseHandler.php new file mode 100644 index 0000000..e932077 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Handler/SoapResponseHandler.php @@ -0,0 +1,49 @@ + + */ + +namespace Whoops\Handler; + +use Whoops\Handler\Handler; + +/** + * Catches an exception and converts it to an Soap XML + * response. + * + * @author Markus Staab + */ +class SoapResponseHandler extends Handler +{ + /** + * @return int + */ + public function handle() + { + $exception = $this->getException(); + + echo $this->toXml($exception); + + return Handler::QUIT; + } + + /** + * Converts a Exception into a SoapFault XML + */ + private function toXml(\Exception $exception) { + $xml = ''; + $xml .= ''; + $xml .= ''; + $xml .= ' '; + $xml .= ' '; + $xml .= ' '. htmlspecialchars($exception->getCode()) .''; + $xml .= ' '. htmlspecialchars($exception->getMessage()) .''; + $xml .= ' '. htmlspecialchars($exception->getTraceAsString()) .''; + $xml .= ' '; + $xml .= ' '; + $xml .= ''; + + return $xml; + } +} diff --git a/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php b/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php old mode 100755 new mode 100644 index d79331e..7624a73 --- a/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php +++ b/vendor/filp/whoops/src/Whoops/Handler/XmlResponseHandler.php @@ -7,8 +7,8 @@ namespace Whoops\Handler; use SimpleXMLElement; -use Whoops\Exception\Frame; use Whoops\Handler\Handler; +use Whoops\Exception\Formatter; /** * Catches an exception and converts it to an XML @@ -24,7 +24,7 @@ class XmlResponseHandler extends Handler /** * @param bool|null $returnFrames - * @return null|bool + * @return bool|$this */ public function addTraceToOutput($returnFrames = null) { @@ -33,6 +33,7 @@ class XmlResponseHandler extends Handler } $this->returnFrames = (bool) $returnFrames; + return $this; } /** @@ -40,36 +41,13 @@ class XmlResponseHandler extends Handler */ public function handle() { - $exception = $this->getException(); - $response = array( - 'error' => array( - 'type' => get_class($exception), - 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine() - ) + 'error' => Formatter::formatExceptionAsDataArray( + $this->getInspector(), + $this->addTraceToOutput() + ), ); - if($this->addTraceToOutput()) { - $inspector = $this->getInspector(); - $frames = $inspector->getFrames(); - $frameData = array(); - - foreach($frames as $frame) { - /** @var Frame $frame */ - $frameData[] = array( - 'file' => $frame->getFile(), - 'line' => $frame->getLine(), - 'function' => $frame->getFunction(), - 'class' => $frame->getClass(), - 'args' => $frame->getArgs() - ); - } - - $response['error']['trace'] = array_flip($frameData); - } - echo $this->toXml($response); return Handler::QUIT; @@ -120,18 +98,8 @@ class XmlResponseHandler extends Handler { assert('is_array($data) || $node instanceof Traversable'); - // turn off compatibility mode as simple xml throws a wobbly if you don't. - $compatibilityMode = ini_get('zend.ze1_compatibility_mode'); - if ($compatibilityMode) { - ini_set('zend.ze1_compatibility_mode', 0); - } - $node = simplexml_load_string(""); - $xml = self::addDataToNode($node, $data)->asXML(); - if ($compatibilityMode) { - ini_set('zend.ze1_compatibility_mode', $compatibilityMode); - } - return $xml; + return self::addDataToNode($node, $data)->asXML(); } } diff --git a/vendor/filp/whoops/src/Whoops/Provider/Phalcon/WhoopsServiceProvider.php b/vendor/filp/whoops/src/Whoops/Provider/Phalcon/WhoopsServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php b/vendor/filp/whoops/src/Whoops/Provider/Silex/WhoopsServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php deleted file mode 100755 index e0731de..0000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/ExceptionStrategy.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ - -namespace Whoops\Provider\Zend; - -use Whoops\Run; - -use Zend\Mvc\View\Http\ExceptionStrategy as BaseExceptionStrategy; -use Zend\Mvc\MvcEvent; -use Zend\Mvc\Application; - -class ExceptionStrategy extends BaseExceptionStrategy { - - protected $run; - - public function __construct(Run $run) { - $this->run = $run; - return $this; - } - - public function prepareExceptionViewModel(MvcEvent $event) { - // Do nothing if no error in the event - $error = $event->getError(); - if (empty($error)) { - return; - } - - // Do nothing if the result is a response object - $result = $event->getResult(); - if ($result instanceof Response) { - return; - } - - switch ($error) { - case Application::ERROR_CONTROLLER_NOT_FOUND: - case Application::ERROR_CONTROLLER_INVALID: - case Application::ERROR_ROUTER_NO_MATCH: - // Specifically not handling these - return; - - case Application::ERROR_EXCEPTION: - default: - $exception = $event->getParam('exception'); - if($exception) { - $response = $event->getResponse(); - if (!$response || $response->getStatusCode() === 200) { - header('HTTP/1.0 500 Internal Server Error', true, 500); - } - ob_clean(); - $this->run->handleException($event->getParam('exception')); - } - break; - } - } - -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php deleted file mode 100755 index 44f14ca..0000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/Module.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * The Whoops directory should be added as a module to ZF2 (/vendor/Whoops) - * - * Whoops must be added as the first module - * For example: - * 'modules' => array( - * 'Whoops', - * 'Application', - * ), - * - * This file should be moved next to Whoops/Run.php (/vendor/Whoops/Module.php) - * - */ - -namespace Whoops; - -use Whoops\Run; -use Whoops\Provider\Zend\ExceptionStrategy; -use Whoops\Provider\Zend\RouteNotFoundStrategy; -use Whoops\Handler\JsonResponseHandler; -use Whoops\Handler\PrettyPageHandler; -use Zend\EventManager\EventInterface; -use Zend\Console\Request as ConsoleRequest; - -class Module -{ - protected $run; - - public function onBootstrap(EventInterface $event) - { - $prettyPageHandler = new PrettyPageHandler(); - - // Set editor - $config = $event->getApplication()->getServiceManager()->get('Config'); - if (isset($config['view_manager']['editor'])) { - $prettyPageHandler->setEditor($config['view_manager']['editor']); - } - - - $this->run = new Run(); - $this->run->register(); - $this->run->pushHandler($prettyPageHandler); - - $this->attachListeners($event); - } - - public function getAutoloaderConfig() - { - return array( - 'Zend\Loader\StandardAutoloader' => array( - 'namespaces' => array( - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, - ), - ), - ); - } - - private function attachListeners(EventInterface $event) - { - $request = $event->getRequest(); - $application = $event->getApplication(); - $services = $application->getServiceManager(); - $events = $application->getEventManager(); - $config = $services->get('Config'); - - //Display exceptions based on configuration and console mode - if ($request instanceof ConsoleRequest || empty($config['view_manager']['display_exceptions'])) - return; - - $jsonHandler = new JsonResponseHandler(); - - if (!empty($config['view_manager']['json_exceptions']['show_trace'])) { - //Add trace to the JSON output - $jsonHandler->addTraceToOutput(true); - } - - if (!empty($config['view_manager']['json_exceptions']['ajax_only'])) { - //Only return JSON response for AJAX requests - $jsonHandler->onlyForAjaxRequests(true); - } - - if (!empty($config['view_manager']['json_exceptions']['display'])) { - //Turn on JSON handler - $this->run->pushHandler($jsonHandler); - } - - //Attach the Whoops ExceptionStrategy - $exceptionStrategy = new ExceptionStrategy($this->run); - $exceptionStrategy->attach($events); - - //Attach the Whoops RouteNotFoundStrategy - $routeNotFoundStrategy = new RouteNotFoundStrategy($this->run); - $routeNotFoundStrategy->attach($events); - - //Detach default ExceptionStrategy - $services->get('Zend\Mvc\View\Http\ExceptionStrategy')->detach($events); - - //Detach default RouteNotFoundStrategy - $services->get('Zend\Mvc\View\Http\RouteNotFoundStrategy')->detach($events); - } - -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php deleted file mode 100755 index 6c0b3de..0000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ - -namespace Whoops\Provider\Zend; - -use Whoops\Run; - -use Zend\Mvc\View\Http\RouteNotFoundStrategy as BaseRouteNotFoundStrategy; -use Zend\Mvc\MvcEvent; -use Zend\Stdlib\ResponseInterface as Response; -use Zend\View\Model\ViewModel; - -class RouteNotFoundStrategy extends BaseRouteNotFoundStrategy { - - protected $run; - - public function __construct(Run $run) { - $this->run = $run; - } - - public function prepareNotFoundViewModel(MvcEvent $e) { - $vars = $e->getResult(); - if ($vars instanceof Response) { - // Already have a response as the result - return; - } - - $response = $e->getResponse(); - if ($response->getStatusCode() != 404) { - // Only handle 404 responses - return; - } - - if (!$vars instanceof ViewModel) { - $model = new ViewModel(); - if (is_string($vars)) { - $model->setVariable('message', $vars); - } else { - $model->setVariable('message', 'Page not found.'); - } - } else { - $model = $vars; - if ($model->getVariable('message') === null) { - $model->setVariable('message', 'Page not found.'); - } - } - // If displaying reasons, inject the reason - $this->injectNotFoundReason($model, $e); - - // If displaying exceptions, inject - $this->injectException($model, $e); - - // Inject controller if we're displaying either the reason or the exception - $this->injectController($model, $e); - - ob_clean(); - - throw new \Exception($model->getVariable('message') . ' ' . $model->getVariable('reason')); - } - -} diff --git a/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php b/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php deleted file mode 100755 index 13198a8..0000000 --- a/vendor/filp/whoops/src/Whoops/Provider/Zend/module.config.example.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * Example controller configuration - */ - -return array( - 'view_manager' => array( - 'editor' => 'sublime', - 'display_not_found_reason' => true, - 'display_exceptions' => true, - 'json_exceptions' => array( - 'display' => true, - 'ajax_only' => true, - 'show_trace' => true - ) - ), -); diff --git a/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css b/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css new file mode 100644 index 0000000..56a073d --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/css/whoops.base.css @@ -0,0 +1,319 @@ +.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} +body { + font: 14px helvetica, arial, sans-serif; + color: #2B2B2B; + background-color: #D4D4D4; + padding:0; + margin: 0; + max-height: 100%; +} + a { + text-decoration: none; + } + +.container{ + height: 100%; + width: 100%; + position: fixed; + margin: 0; + padding: 0; + left: 0; + top: 0; +} + +.branding { + position: absolute; + top: 10px; + right: 20px; + color: #777777; + font-size: 10px; + z-index: 100; +} + .branding a { + color: #CD3F3F; + } + +header { + padding: 30px 20px; + color: white; + background: #272727; + box-sizing: border-box; + border-left: 5px solid #CD3F3F; +} + .exc-title { + margin: 0; + color: #616161; + text-shadow: 0 1px 2px rgba(0, 0, 0, .1); + } + .exc-title-primary { color: #CD3F3F; } + .exc-message { + font-size: 32px; + margin: 5px 0; + word-wrap: break-word; + } + +.stack-container { + height: 100%; + position: relative; +} + +.details-container { + height: 100%; + overflow: auto; + float: right; + width: 70%; + background: #DADADA; +} + .details { + padding: 10px; + padding-left: 5px; + border-left: 5px solid rgba(0, 0, 0, .1); + } + +.frames-container { + height: 100%; + overflow: auto; + float: left; + width: 30%; + background: #FFF; +} + .frame { + padding: 14px; + background: #F3F3F3; + border-right: 1px solid rgba(0, 0, 0, .2); + cursor: pointer; + } + .frame.active { + background-color: #4288CE; + color: #F3F3F3; + box-shadow: inset -2px 0 0 rgba(255, 255, 255, .1); + text-shadow: 0 1px 0 rgba(0, 0, 0, .2); + } + + .frame:not(.active):hover { + background: #BEE9EA; + } + + .frame-class, .frame-function, .frame-index { + font-weight: bold; + } + + .frame-index { + font-size: 11px; + color: #BDBDBD; + } + + .frame-class { + color: #4288CE; + } + .active .frame-class { + color: #BEE9EA; + } + + .frame-file { + font-family: consolas, monospace; + word-wrap:break-word; + } + + .frame-file .editor-link { + color: #272727; + } + + .frame-line { + font-weight: bold; + color: #4288CE; + } + + .active .frame-line { color: #BEE9EA; } + .frame-line:before { + content: ":"; + } + + .frame-code { + padding: 10px; + padding-left: 5px; + background: #BDBDBD; + display: none; + border-left: 5px solid #4288CE; + } + + .frame-code.active { + display: block; + } + + .frame-code .frame-file { + background: #C6C6C6; + color: #525252; + text-shadow: 0 1px 0 #E7E7E7; + padding: 10px 10px 5px 10px; + + border-top-right-radius: 6px; + border-top-left-radius: 6px; + + border: 1px solid rgba(0, 0, 0, .1); + border-bottom: none; + box-shadow: inset 0 1px 0 #DADADA; + } + + .code-block { + padding: 10px; + margin: 0; + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + } + + .linenums { + margin: 0; + margin-left: 10px; + } + + .frame-comments { + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + border: 1px solid rgba(0, 0, 0, .2); + border-top: none; + + border-bottom-right-radius: 6px; + border-bottom-left-radius: 6px; + + padding: 5px; + font-size: 12px; + background: #404040; + } + + .frame-comments.empty { + padding: 8px 15px; + } + + .frame-comments.empty:before { + content: "No comments for this stack frame."; + font-style: italic; + color: #828282; + } + + .frame-comment { + padding: 10px; + color: #D2D2D2; + } + .frame-comment a { + color: #BEE9EA; + font-weight: bold; + text-decoration: none; + } + .frame-comment a:hover { + color: #4bb1b1; + } + + .frame-comment:not(:last-child) { + border-bottom: 1px dotted rgba(0, 0, 0, .3); + } + + .frame-comment-context { + font-size: 10px; + font-weight: bold; + color: #86D2B6; + } + +.data-table-container label { + font-size: 16px; + font-weight: bold; + color: #4288CE; + margin: 10px 0; + padding: 10px 0; + + display: block; + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px dotted rgba(0, 0, 0, .2); +} + .data-table { + width: 100%; + margin: 10px 0; + } + + .data-table tbody { + font: 13px consolas, monospace; + } + + .data-table thead { + display: none; + } + + .data-table tr { + padding: 5px 0; + } + + .data-table td:first-child { + width: 20%; + min-width: 130px; + overflow: hidden; + font-weight: bold; + color: #463C54; + padding-right: 5px; + + } + + .data-table td:last-child { + width: 80%; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; + } + + .data-table .empty { + color: rgba(0, 0, 0, .3); + font-style: italic; + } + +.handler { + padding: 10px; + font: 14px monospace; +} + +.handler.active { + color: #BBBBBB; + background: #989898; + font-weight: bold; +} + +/* prettify code style +Uses the Doxy theme as a base */ +pre .str, code .str { color: #BCD42A; } /* string */ +pre .kwd, code .kwd { color: #4bb1b1; font-weight: bold; } /* keyword*/ +pre .com, code .com { color: #888; font-weight: bold; } /* comment */ +pre .typ, code .typ { color: #ef7c61; } /* type */ +pre .lit, code .lit { color: #BCD42A; } /* literal */ +pre .pun, code .pun { color: #fff; font-weight: bold; } /* punctuation */ +pre .pln, code .pln { color: #e9e4e5; } /* plaintext */ +pre .tag, code .tag { color: #4bb1b1; } /* html/xml tag */ +pre .htm, code .htm { color: #dda0dd; } /* html tag */ +pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ +pre .atn, code .atn { color: #ef7c61; font-weight: normal;} /* html/xml attribute name */ +pre .atv, code .atv { color: #bcd42a; } /* html/xml attribute value */ +pre .dec, code .dec { color: #606; } /* decimal */ +pre.prettyprint, code.prettyprint { + font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace;; + background: #333; + color: #e9e4e5; +} + pre.prettyprint { + white-space: pre-wrap; + } + + pre.prettyprint a, code.prettyprint a { + text-decoration:none; + } + + .linenums li { + color: #A5A5A5; + } + + .linenums li.current{ + background: rgba(255, 100, 100, .07); + padding-top: 4px; + padding-left: 1px; + } + .linenums li.current.active { + background: rgba(255, 100, 100, .17); + } diff --git a/vendor/filp/whoops/src/Whoops/Resources/js/whoops.base.js b/vendor/filp/whoops/src/Whoops/Resources/js/whoops.base.js new file mode 100644 index 0000000..974ac23 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/js/whoops.base.js @@ -0,0 +1,44 @@ +Zepto(function($) { + prettyPrint(); + + var $frameContainer = $('.frames-container'); + var $container = $('.details-container'); + var $activeLine = $frameContainer.find('.frame.active'); + var $activeFrame = $container.find('.frame-code.active'); + var headerHeight = $('header').height(); + + var highlightCurrentLine = function() { + // Highlight the active and neighboring lines for this frame: + var activeLineNumber = +($activeLine.find('.frame-line').text()); + var $lines = $activeFrame.find('.linenums li'); + var firstLine = +($lines.first().val()); + + $($lines[activeLineNumber - firstLine - 1]).addClass('current'); + $($lines[activeLineNumber - firstLine]).addClass('current active'); + $($lines[activeLineNumber - firstLine + 1]).addClass('current'); + } + + // Highlight the active for the first frame: + highlightCurrentLine(); + + $frameContainer.on('click', '.frame', function() { + var $this = $(this); + var id = /frame\-line\-([\d]*)/.exec($this.attr('id'))[1]; + var $codeFrame = $('#frame-code-' + id); + + if ($codeFrame) { + $activeLine.removeClass('active'); + $activeFrame.removeClass('active'); + + $this.addClass('active'); + $codeFrame.addClass('active'); + + $activeLine = $this; + $activeFrame = $codeFrame; + + highlightCurrentLine(); + + $container.scrollTop(headerHeight); + } + }); +}); diff --git a/vendor/filp/whoops/src/Whoops/Resources/js/zepto.min.js b/vendor/filp/whoops/src/Whoops/Resources/js/zepto.min.js new file mode 100644 index 0000000..0b2f97a --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/js/zepto.min.js @@ -0,0 +1,2 @@ +/* Zepto v1.1.3 - zepto event ajax form ie - zeptojs.com/license */ +var Zepto=function(){function L(t){return null==t?String(t):j[T.call(t)]||"object"}function Z(t){return"function"==L(t)}function $(t){return null!=t&&t==t.window}function _(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function D(t){return"object"==L(t)}function R(t){return D(t)&&!$(t)&&Object.getPrototypeOf(t)==Object.prototype}function M(t){return"number"==typeof t.length}function k(t){return s.call(t,function(t){return null!=t})}function z(t){return t.length>0?n.fn.concat.apply([],t):t}function F(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function q(t){return t in f?f[t]:f[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function H(t,e){return"number"!=typeof e||c[F(t)]?e:e+"px"}function I(t){var e,n;return u[t]||(e=a.createElement(t),a.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),u[t]=n),u[t]}function V(t){return"children"in t?o.call(t.children):n.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function U(n,i,r){for(e in i)r&&(R(i[e])||A(i[e]))?(R(i[e])&&!R(n[e])&&(n[e]={}),A(i[e])&&!A(n[e])&&(n[e]=[]),U(n[e],i[e],r)):i[e]!==t&&(n[e]=i[e])}function B(t,e){return null==e?n(t):n(t).filter(e)}function J(t,e,n,i){return Z(e)?e.call(t,n,i):e}function X(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function W(e,n){var i=e.className,r=i&&i.baseVal!==t;return n===t?r?i.baseVal:i:void(r?i.baseVal=n:e.className=n)}function Y(t){var e;try{return t?"true"==t||("false"==t?!1:"null"==t?null:/^0/.test(t)||isNaN(e=Number(t))?/^[\[\{]/.test(t)?n.parseJSON(t):t:e):t}catch(i){return t}}function G(t,e){e(t);for(var n in t.childNodes)G(t.childNodes[n],e)}var t,e,n,i,C,N,r=[],o=r.slice,s=r.filter,a=window.document,u={},f={},c={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},l=/^\s*<(\w+|!)[^>]*>/,h=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,p=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,d=/^(?:body|html)$/i,m=/([A-Z])/g,g=["val","css","html","text","data","width","height","offset"],v=["after","prepend","before","append"],y=a.createElement("table"),x=a.createElement("tr"),b={tr:a.createElement("tbody"),tbody:y,thead:y,tfoot:y,td:x,th:x,"*":a.createElement("div")},w=/complete|loaded|interactive/,E=/^[\w-]*$/,j={},T=j.toString,S={},O=a.createElement("div"),P={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},A=Array.isArray||function(t){return t instanceof Array};return S.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=O).appendChild(t),i=~S.qsa(r,e).indexOf(t),o&&O.removeChild(t),i},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return s.call(t,function(e,n){return t.indexOf(e)==n})},S.fragment=function(e,i,r){var s,u,f;return h.test(e)&&(s=n(a.createElement(RegExp.$1))),s||(e.replace&&(e=e.replace(p,"<$1>")),i===t&&(i=l.test(e)&&RegExp.$1),i in b||(i="*"),f=b[i],f.innerHTML=""+e,s=n.each(o.call(f.childNodes),function(){f.removeChild(this)})),R(r)&&(u=n(s),n.each(r,function(t,e){g.indexOf(t)>-1?u[t](e):u.attr(t,e)})),s},S.Z=function(t,e){return t=t||[],t.__proto__=n.fn,t.selector=e||"",t},S.isZ=function(t){return t instanceof S.Z},S.init=function(e,i){var r;if(!e)return S.Z();if("string"==typeof e)if(e=e.trim(),"<"==e[0]&&l.test(e))r=S.fragment(e,RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=S.qsa(a,e)}else{if(Z(e))return n(a).ready(e);if(S.isZ(e))return e;if(A(e))r=k(e);else if(D(e))r=[e],e=null;else if(l.test(e))r=S.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==t)return n(i).find(e);r=S.qsa(a,e)}}return S.Z(r,e)},n=function(t,e){return S.init(t,e)},n.extend=function(t){var e,n=o.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){U(t,n,e)}),t},S.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],s=i||r?e.slice(1):e,a=E.test(s);return _(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:o.call(a&&!i?r?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=function(t,e){return t!==e&&t.contains(e)},n.type=L,n.isFunction=Z,n.isWindow=$,n.isArray=A,n.isPlainObject=R,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.inArray=function(t,e,n){return r.indexOf.call(e,t,n)},n.camelCase=C,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.map=function(t,e){var n,r,o,i=[];if(M(t))for(r=0;r=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return r.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return Z(t)?this.not(this.not(t)):n(s.call(this,function(e){return S.matches(e,t)}))},add:function(t,e){return n(N(this.concat(n(t,e))))},is:function(t){return this.length>0&&S.matches(this[0],t)},not:function(e){var i=[];if(Z(e)&&e.call!==t)this.each(function(t){e.call(this,t)||i.push(this)});else{var r="string"==typeof e?this.filter(e):M(e)&&Z(e.item)?o.call(e):n(e);this.forEach(function(t){r.indexOf(t)<0&&i.push(t)})}return n(i)},has:function(t){return this.filter(function(){return D(t)?n.contains(this,t):n(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!D(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!D(t)?t:n(t)},find:function(t){var e,i=this;return e="object"==typeof t?n(t).filter(function(){var t=this;return r.some.call(i,function(e){return n.contains(e,t)})}):1==this.length?n(S.qsa(this[0],t)):this.map(function(){return S.qsa(this,t)})},closest:function(t,e){var i=this[0],r=!1;for("object"==typeof t&&(r=n(t));i&&!(r?r.indexOf(i)>=0:S.matches(i,t));)i=i!==e&&!_(i)&&i.parentNode;return n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,function(t){return(t=t.parentNode)&&!_(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return B(e,t)},parent:function(t){return B(N(this.pluck("parentNode")),t)},children:function(t){return B(this.map(function(){return V(this)}),t)},contents:function(){return this.map(function(){return o.call(this.childNodes)})},siblings:function(t){return B(this.map(function(t,e){return s.call(V(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return n.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=I(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=Z(t);if(this[0]&&!e)var i=n(t).get(0),r=i.parentNode||this.length>1;return this.each(function(o){n(this).wrapAll(e?t.call(this,o):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){n(this[0]).before(t=n(t));for(var e;(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=Z(t);return this.each(function(i){var r=n(this),o=r.contents(),s=e?t.call(this,i):t;o.length?o.wrapAll(s):r.append(s)})},unwrap:function(){return this.parent().each(function(){n(this).replaceWith(n(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(e){return this.each(function(){var i=n(this);(e===t?"none"==i.css("display"):e)?i.show():i.hide()})},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0===arguments.length?this.length>0?this[0].innerHTML:null:this.each(function(e){var i=this.innerHTML;n(this).empty().append(J(this,t,e,i))})},text:function(e){return 0===arguments.length?this.length>0?this[0].textContent:null:this.each(function(){this.textContent=e===t?"":""+e})},attr:function(n,i){var r;return"string"==typeof n&&i===t?0==this.length||1!==this[0].nodeType?t:"value"==n&&"INPUT"==this[0].nodeName?this.val():!(r=this[0].getAttribute(n))&&n in this[0]?this[0][n]:r:this.each(function(t){if(1===this.nodeType)if(D(n))for(e in n)X(this,e,n[e]);else X(this,n,J(this,i,t,this.getAttribute(n)))})},removeAttr:function(t){return this.each(function(){1===this.nodeType&&X(this,t)})},prop:function(e,n){return e=P[e]||e,n===t?this[0]&&this[0][e]:this.each(function(t){this[e]=J(this,n,t,this[e])})},data:function(e,n){var i=this.attr("data-"+e.replace(m,"-$1").toLowerCase(),n);return null!==i?Y(i):t},val:function(t){return 0===arguments.length?this[0]&&(this[0].multiple?n(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value):this.each(function(e){this.value=J(this,t,e,this.value)})},offset:function(t){if(t)return this.each(function(e){var i=n(this),r=J(this,t,e,i.offset()),o=i.offsetParent().offset(),s={top:r.top-o.top,left:r.left-o.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)});if(0==this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(t,i){if(arguments.length<2){var r=this[0],o=getComputedStyle(r,"");if(!r)return;if("string"==typeof t)return r.style[C(t)]||o.getPropertyValue(t);if(A(t)){var s={};return n.each(A(t)?t:[t],function(t,e){s[e]=r.style[C(e)]||o.getPropertyValue(e)}),s}}var a="";if("string"==L(t))i||0===i?a=F(t)+":"+H(t,i):this.each(function(){this.style.removeProperty(F(t))});else for(e in t)t[e]||0===t[e]?a+=F(e)+":"+H(e,t[e])+";":this.each(function(){this.style.removeProperty(F(e))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?r.some.call(this,function(t){return this.test(W(t))},q(t)):!1},addClass:function(t){return t?this.each(function(e){i=[];var r=W(this),o=J(this,t,e,r);o.split(/\s+/g).forEach(function(t){n(this).hasClass(t)||i.push(t)},this),i.length&&W(this,r+(r?" ":"")+i.join(" "))}):this},removeClass:function(e){return this.each(function(n){return e===t?W(this,""):(i=W(this),J(this,e,n,i).split(/\s+/g).forEach(function(t){i=i.replace(q(t)," ")}),void W(this,i.trim()))})},toggleClass:function(e,i){return e?this.each(function(r){var o=n(this),s=J(this,e,r,W(this));s.split(/\s+/g).forEach(function(e){(i===t?!o.hasClass(e):i)?o.addClass(e):o.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),r=d.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css("margin-top"))||0,i.left-=parseFloat(n(t).css("margin-left"))||0,r.top+=parseFloat(n(e[0]).css("border-top-width"))||0,r.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||a.body;t&&!d.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t})}},n.fn.detach=n.fn.remove,["width","height"].forEach(function(e){var i=e.replace(/./,function(t){return t[0].toUpperCase()});n.fn[e]=function(r){var o,s=this[0];return r===t?$(s)?s["inner"+i]:_(s)?s.documentElement["scroll"+i]:(o=this.offset())&&o[e]:this.each(function(t){s=n(this),s.css(e,J(this,r,t,s[e]()))})}}),v.forEach(function(t,e){var i=e%2;n.fn[t]=function(){var t,o,r=n.map(arguments,function(e){return t=L(e),"object"==t||"array"==t||null==e?e:S.fragment(e)}),s=this.length>1;return r.length<1?this:this.each(function(t,a){o=i?a:a.parentNode,a=0==e?a.nextSibling:1==e?a.firstChild:2==e?a:null,r.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!o)return n(t).remove();G(o.insertBefore(t,a),function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},n.fn[i?t+"To":"insert"+(e?"Before":"After")]=function(e){return n(e)[t](this),this}}),S.Z.prototype=n.fn,S.uniq=N,S.deserializeValue=Y,n.zepto=S,n}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function l(t){return t._zid||(t._zid=e++)}function h(t,e,n,i){if(e=p(e),e.ns)var r=d(e.ns);return(s[l(t)]||[]).filter(function(t){return!(!t||e.e&&t.e!=e.e||e.ns&&!r.test(t.ns)||n&&l(t.fn)!==l(n)||i&&t.sel!=i)})}function p(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function d(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function m(t,e){return t.del&&!u&&t.e in f||!!e}function g(t){return c[t]||u&&f[t]||t}function v(e,i,r,o,a,u,f){var h=l(e),d=s[h]||(s[h]=[]);i.split(/\s/).forEach(function(i){if("ready"==i)return t(document).ready(r);var s=p(i);s.fn=r,s.sel=a,s.e in c&&(r=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?s.fn.apply(this,arguments):void 0}),s.del=u;var l=u||r;s.proxy=function(t){if(t=j(t),!t.isImmediatePropagationStopped()){t.data=o;var i=l.apply(e,t._args==n?[t]:[t].concat(t._args));return i===!1&&(t.preventDefault(),t.stopPropagation()),i}},s.i=d.length,d.push(s),"addEventListener"in e&&e.addEventListener(g(s.e),s.proxy,m(s,f))})}function y(t,e,n,i,r){var o=l(t);(e||"").split(/\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(g(e.e),e.proxy,m(e,r))})})}function j(e,i){return(i||!e.isDefaultPrevented)&&(i||(i=e),t.each(E,function(t,n){var r=i[t];e[t]=function(){return this[n]=x,r&&r.apply(i,arguments)},e[n]=b}),(i.defaultPrevented!==n?i.defaultPrevented:"returnValue"in i?i.returnValue===!1:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=x)),e}function T(t){var e,i={originalEvent:t};for(e in t)w.test(e)||t[e]===n||(i[e]=t[e]);return j(i,t)}var n,e=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return"string"==typeof t},s={},a={},u="onfocusin"in window,f={focus:"focusin",blur:"focusout"},c={mouseenter:"mouseover",mouseleave:"mouseout"};a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",t.event={add:v,remove:y},t.proxy=function(e,n){if(r(e)){var i=function(){return e.apply(n,arguments)};return i._zid=l(e),i}if(o(n))return t.proxy(e[n],e);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var x=function(){return!0},b=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$)/,E={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,s,a,u,f){var c,l,h=this;return e&&!o(e)?(t.each(e,function(t,e){h.on(t,s,a,e,f)}),h):(o(s)||r(u)||u===!1||(u=a,a=s,s=n),(r(a)||a===!1)&&(u=a,a=n),u===!1&&(u=b),h.each(function(n,r){f&&(c=function(t){return y(r,t.type,u),u.apply(this,arguments)}),s&&(l=function(e){var n,o=t(e.target).closest(s,r).get(0);return o&&o!==r?(n=t.extend(T(e),{currentTarget:o,liveFired:r}),(c||u).apply(o,[n].concat(i.call(arguments,1)))):void 0}),v(r,e,u,a,s,l||c)}))},t.fn.off=function(e,i,s){var a=this;return e&&!o(e)?(t.each(e,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||s===!1||(s=i,i=n),s===!1&&(s=b),a.each(function(){y(this,e,s,i)}))},t.fn.trigger=function(e,n){return e=o(e)||t.isPlainObject(e)?t.Event(e):j(e),e._args=n,this.each(function(){"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){i=T(o(e)?t.Event(e):e),i._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){return r=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),r},"focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return t?this.bind(e,t):this.trigger(e)}}),["focus","blur"].forEach(function(e){t.fn[e]=function(t){return t?this.bind(e,t):this.each(function(){try{this[e]()}catch(t){}}),this}}),t.Event=function(t,e){o(t)||(e=t,t=e.type);var n=document.createEvent(a[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),j(n)}}(Zepto),function(t){function l(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function h(t,e,i,r){return t.global?l(e||n,i,r):void 0}function p(e){e.global&&0===t.active++&&h(e,null,"ajaxStart")}function d(e){e.global&&!--t.active&&h(e,null,"ajaxStop")}function m(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||h(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void h(e,n,"ajaxSend",[t,e])}function g(t,e,n,i){var r=n.context,o="success";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),h(n,r,"ajaxSuccess",[e,n,t]),y(o,e,n)}function v(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),h(i,o,"ajaxError",[n,i,t||e]),y(e,n,i)}function y(t,e,n){var i=n.context;n.complete.call(i,e,t),h(n,i,"ajaxComplete",[e,n]),d(n)}function x(){}function b(t){return t&&(t=t.split(";",2)[0]),t&&(t==f?"html":t==u?"json":s.test(t)?"script":a.test(t)&&"xml")||"text"}function w(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function E(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=w(e.url,e.data),e.data=void 0)}function j(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function S(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(u.name,u.value):"array"==o||!i&&"object"==o?S(e,u,i,n):e.add(n,u)})}var i,r,e=0,n=window.document,o=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,a=/^(?:text|application)\/xml/i,u="application/json",f="text/html",c=/^\s*$/;t.active=0,t.ajaxJSONP=function(i,r){if(!("type"in i))return t.ajax(i);var f,h,o=i.jsonpCallback,s=(t.isFunction(o)?o():o)||"jsonp"+ ++e,a=n.createElement("script"),u=window[s],c=function(e){t(a).triggerHandler("error",e||"abort")},l={abort:c};return r&&r.promise(l),t(a).on("load error",function(e,n){clearTimeout(h),t(a).off().remove(),"error"!=e.type&&f?g(f[0],l,i,r):v(null,n||"error",l,i,r),window[s]=u,f&&t.isFunction(u)&&u(f[0]),u=f=void 0}),m(l,i)===!1?(c("abort"),l):(window[s]=function(){f=arguments},a.src=i.url.replace(/\?(.+)=\?/,"?$1="+s),n.head.appendChild(a),i.timeout>0&&(h=setTimeout(function(){c("timeout")},i.timeout)),l)},t.ajaxSettings={type:"GET",beforeSend:x,success:x,error:x,complete:x,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:u,xml:"application/xml, text/xml",html:f,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n=t.extend({},e||{}),o=t.Deferred&&t.Deferred();for(i in t.ajaxSettings)void 0===n[i]&&(n[i]=t.ajaxSettings[i]);p(n),n.crossDomain||(n.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(n.url)&&RegExp.$2!=window.location.host),n.url||(n.url=window.location.toString()),E(n),n.cache===!1&&(n.url=w(n.url,"_="+Date.now()));var s=n.dataType,a=/\?.+=\?/.test(n.url);if("jsonp"==s||a)return a||(n.url=w(n.url,n.jsonp?n.jsonp+"=?":n.jsonp===!1?"":"callback=?")),t.ajaxJSONP(n,o);var j,u=n.accepts[s],f={},l=function(t,e){f[t.toLowerCase()]=[t,e]},h=/^([\w-]+:)\/\//.test(n.url)?RegExp.$1:window.location.protocol,d=n.xhr(),y=d.setRequestHeader;if(o&&o.promise(d),n.crossDomain||l("X-Requested-With","XMLHttpRequest"),l("Accept",u||"*/*"),(u=n.mimeType||u)&&(u.indexOf(",")>-1&&(u=u.split(",",2)[0]),d.overrideMimeType&&d.overrideMimeType(u)),(n.contentType||n.contentType!==!1&&n.data&&"GET"!=n.type.toUpperCase())&&l("Content-Type",n.contentType||"application/x-www-form-urlencoded"),n.headers)for(r in n.headers)l(r,n.headers[r]);if(d.setRequestHeader=l,d.onreadystatechange=function(){if(4==d.readyState){d.onreadystatechange=x,clearTimeout(j);var e,i=!1;if(d.status>=200&&d.status<300||304==d.status||0==d.status&&"file:"==h){s=s||b(n.mimeType||d.getResponseHeader("content-type")),e=d.responseText;try{"script"==s?(1,eval)(e):"xml"==s?e=d.responseXML:"json"==s&&(e=c.test(e)?null:t.parseJSON(e))}catch(r){i=r}i?v(i,"parsererror",d,n,o):g(e,d,n,o)}else v(d.statusText||null,d.status?"error":"abort",d,n,o)}},m(d,n)===!1)return d.abort(),v(null,"abort",d,n,o),d;if(n.xhrFields)for(r in n.xhrFields)d[r]=n.xhrFields[r];var T="async"in n?n.async:!0;d.open(n.type,n.url,T,n.username,n.password);for(r in f)y.apply(d,f[r]);return n.timeout>0&&(j=setTimeout(function(){d.onreadystatechange=x,d.abort(),v(null,"timeout",d,n,o)},n.timeout)),d.send(n.data?n.data:null),d},t.get=function(){return t.ajax(j.apply(null,arguments))},t.post=function(){var e=j.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=j.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var a,r=this,s=e.split(/\s/),u=j(e,n,i),f=u.success;return s.length>1&&(u.url=s[0],a=s[1]),u.success=function(e){r.html(a?t("
").html(e.replace(o,"")).find(a):e),f&&f.apply(r,arguments)},t.ajax(u),this};var T=encodeURIComponent;t.param=function(t,e){var n=[];return n.add=function(t,e){this.push(T(t)+"="+T(e))},S(n,t,e),n.join("&").replace(/%20/g,"+")}}(Zepto),function(t){t.fn.serializeArray=function(){var n,e=[];return t([].slice.call(this.get(0).elements)).each(function(){n=t(this);var i=n.attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=i&&"reset"!=i&&"button"!=i&&("radio"!=i&&"checkbox"!=i||this.checked)&&e.push({name:n.attr("name"),value:n.val()})}),e},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(e)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(Zepto); diff --git a/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css b/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css deleted file mode 100755 index 56a073d..0000000 --- a/vendor/filp/whoops/src/Whoops/Resources/pretty-page.css +++ /dev/null @@ -1,319 +0,0 @@ -.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} -body { - font: 14px helvetica, arial, sans-serif; - color: #2B2B2B; - background-color: #D4D4D4; - padding:0; - margin: 0; - max-height: 100%; -} - a { - text-decoration: none; - } - -.container{ - height: 100%; - width: 100%; - position: fixed; - margin: 0; - padding: 0; - left: 0; - top: 0; -} - -.branding { - position: absolute; - top: 10px; - right: 20px; - color: #777777; - font-size: 10px; - z-index: 100; -} - .branding a { - color: #CD3F3F; - } - -header { - padding: 30px 20px; - color: white; - background: #272727; - box-sizing: border-box; - border-left: 5px solid #CD3F3F; -} - .exc-title { - margin: 0; - color: #616161; - text-shadow: 0 1px 2px rgba(0, 0, 0, .1); - } - .exc-title-primary { color: #CD3F3F; } - .exc-message { - font-size: 32px; - margin: 5px 0; - word-wrap: break-word; - } - -.stack-container { - height: 100%; - position: relative; -} - -.details-container { - height: 100%; - overflow: auto; - float: right; - width: 70%; - background: #DADADA; -} - .details { - padding: 10px; - padding-left: 5px; - border-left: 5px solid rgba(0, 0, 0, .1); - } - -.frames-container { - height: 100%; - overflow: auto; - float: left; - width: 30%; - background: #FFF; -} - .frame { - padding: 14px; - background: #F3F3F3; - border-right: 1px solid rgba(0, 0, 0, .2); - cursor: pointer; - } - .frame.active { - background-color: #4288CE; - color: #F3F3F3; - box-shadow: inset -2px 0 0 rgba(255, 255, 255, .1); - text-shadow: 0 1px 0 rgba(0, 0, 0, .2); - } - - .frame:not(.active):hover { - background: #BEE9EA; - } - - .frame-class, .frame-function, .frame-index { - font-weight: bold; - } - - .frame-index { - font-size: 11px; - color: #BDBDBD; - } - - .frame-class { - color: #4288CE; - } - .active .frame-class { - color: #BEE9EA; - } - - .frame-file { - font-family: consolas, monospace; - word-wrap:break-word; - } - - .frame-file .editor-link { - color: #272727; - } - - .frame-line { - font-weight: bold; - color: #4288CE; - } - - .active .frame-line { color: #BEE9EA; } - .frame-line:before { - content: ":"; - } - - .frame-code { - padding: 10px; - padding-left: 5px; - background: #BDBDBD; - display: none; - border-left: 5px solid #4288CE; - } - - .frame-code.active { - display: block; - } - - .frame-code .frame-file { - background: #C6C6C6; - color: #525252; - text-shadow: 0 1px 0 #E7E7E7; - padding: 10px 10px 5px 10px; - - border-top-right-radius: 6px; - border-top-left-radius: 6px; - - border: 1px solid rgba(0, 0, 0, .1); - border-bottom: none; - box-shadow: inset 0 1px 0 #DADADA; - } - - .code-block { - padding: 10px; - margin: 0; - box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); - } - - .linenums { - margin: 0; - margin-left: 10px; - } - - .frame-comments { - box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); - border: 1px solid rgba(0, 0, 0, .2); - border-top: none; - - border-bottom-right-radius: 6px; - border-bottom-left-radius: 6px; - - padding: 5px; - font-size: 12px; - background: #404040; - } - - .frame-comments.empty { - padding: 8px 15px; - } - - .frame-comments.empty:before { - content: "No comments for this stack frame."; - font-style: italic; - color: #828282; - } - - .frame-comment { - padding: 10px; - color: #D2D2D2; - } - .frame-comment a { - color: #BEE9EA; - font-weight: bold; - text-decoration: none; - } - .frame-comment a:hover { - color: #4bb1b1; - } - - .frame-comment:not(:last-child) { - border-bottom: 1px dotted rgba(0, 0, 0, .3); - } - - .frame-comment-context { - font-size: 10px; - font-weight: bold; - color: #86D2B6; - } - -.data-table-container label { - font-size: 16px; - font-weight: bold; - color: #4288CE; - margin: 10px 0; - padding: 10px 0; - - display: block; - margin-bottom: 5px; - padding-bottom: 5px; - border-bottom: 1px dotted rgba(0, 0, 0, .2); -} - .data-table { - width: 100%; - margin: 10px 0; - } - - .data-table tbody { - font: 13px consolas, monospace; - } - - .data-table thead { - display: none; - } - - .data-table tr { - padding: 5px 0; - } - - .data-table td:first-child { - width: 20%; - min-width: 130px; - overflow: hidden; - font-weight: bold; - color: #463C54; - padding-right: 5px; - - } - - .data-table td:last-child { - width: 80%; - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - } - - .data-table .empty { - color: rgba(0, 0, 0, .3); - font-style: italic; - } - -.handler { - padding: 10px; - font: 14px monospace; -} - -.handler.active { - color: #BBBBBB; - background: #989898; - font-weight: bold; -} - -/* prettify code style -Uses the Doxy theme as a base */ -pre .str, code .str { color: #BCD42A; } /* string */ -pre .kwd, code .kwd { color: #4bb1b1; font-weight: bold; } /* keyword*/ -pre .com, code .com { color: #888; font-weight: bold; } /* comment */ -pre .typ, code .typ { color: #ef7c61; } /* type */ -pre .lit, code .lit { color: #BCD42A; } /* literal */ -pre .pun, code .pun { color: #fff; font-weight: bold; } /* punctuation */ -pre .pln, code .pln { color: #e9e4e5; } /* plaintext */ -pre .tag, code .tag { color: #4bb1b1; } /* html/xml tag */ -pre .htm, code .htm { color: #dda0dd; } /* html tag */ -pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ -pre .atn, code .atn { color: #ef7c61; font-weight: normal;} /* html/xml attribute name */ -pre .atv, code .atv { color: #bcd42a; } /* html/xml attribute value */ -pre .dec, code .dec { color: #606; } /* decimal */ -pre.prettyprint, code.prettyprint { - font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace;; - background: #333; - color: #e9e4e5; -} - pre.prettyprint { - white-space: pre-wrap; - } - - pre.prettyprint a, code.prettyprint a { - text-decoration:none; - } - - .linenums li { - color: #A5A5A5; - } - - .linenums li.current{ - background: rgba(255, 100, 100, .07); - padding-top: 4px; - padding-left: 1px; - } - .linenums li.current.active { - background: rgba(255, 100, 100, .17); - } diff --git a/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php b/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php deleted file mode 100755 index e5ab982..0000000 --- a/vendor/filp/whoops/src/Whoops/Resources/pretty-template.php +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - <?php echo $e($v->title) ?> - - - - -
- -
- -
- - - frames as $i => $frame): ?> - -
-
- frames) - $i - 1) ?>. - getClass() ?: '') ?> - getFunction() ?: '') ?> -
- - - getFile(true) ?: '<#unknown>') ?>getLine() ?> - -
- - -
- -
- -
-
-

- name as $i => $nameSection): ?> - name) - 1): ?> - - - - - -

-

- message) ?> -

-
-
- - -
- frames as $i => $frame): ?> - - getLine(); ?> -
-
- getFile(); ?> - handler->getEditorHref($filePath, (int) $line)): ?> - Open: - - ') ?> - - - ') ?> - -
- getFileLines($line - 8, 10); - $range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range); - $start = key($range) + 1; - $code = join("\n", $range); - ?> -
- - - getComments(); - ?> -
- $comment): ?> - -
- - -
- -
- -
- -
- - -
-
- tables as $label => $data): ?> -
- - - - - - - - - - $value): ?> - - - - - -
KeyValue
- - empty - -
- -
- - -
- - handlers as $i => $handler): ?> -
- . -
- -
- -
-
- -
-
- - - - - - diff --git a/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php b/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php new file mode 100644 index 0000000..4f4993d --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/views/env_details.html.php @@ -0,0 +1,39 @@ + +
+
+ $data): ?> +
+ + + + + + + + + + $value): ?> + + + + + +
KeyValue
escape($k) ?>escape(print_r($value, true)) ?>
+ + empty + +
+ +
+ + +
+ + $handler): ?> +
+ . escape(get_class($handler)) ?> +
+ +
+ +
diff --git a/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php b/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php new file mode 100644 index 0000000..4c840b9 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/views/frame_code.html.php @@ -0,0 +1,52 @@ + +
+ $frame): ?> + getLine(); ?> +
+
+ getFile(); ?> + getEditorHref($filePath, (int) $line)): ?> + Open: + + escape($filePath ?: '<#unknown>') ?> + + + escape($filePath ?: '<#unknown>') ?> + +
+ getFileLines($line - 8, 10); + + // getFileLines can return null if there is no source code + if ($range): + $range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range); + $start = key($range) + 1; + $code = join("\n", $range); + ?> +
escape($code) ?>
+ + + + getComments(); + ?> +
+ $comment): ?> + +
+ escape($context) ?> + escapeButPreserveUris($comment) ?> +
+ +
+ +
+ +
diff --git a/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php b/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php new file mode 100644 index 0000000..ad1de59 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/views/frame_list.html.php @@ -0,0 +1,17 @@ + + $frame): ?> +
+
+ . + escape($frame->getClass() ?: '') ?> + escape($frame->getFunction() ?: '') ?> +
+ + + getFile(true) ?: '<#unknown>') ?>getLine() ?> + +
+ diff --git a/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php b/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php new file mode 100644 index 0000000..2731ad8 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/views/header.html.php @@ -0,0 +1,14 @@ +
+

+ $nameSection): ?> + + escape($nameSection) ?> + + escape($nameSection) . ' \\' ?> + + +

+

+ escape($message) ?> +

+
diff --git a/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php b/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php new file mode 100644 index 0000000..c2a4aeb --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Resources/views/layout.html.php @@ -0,0 +1,36 @@ + + + + + + <?php echo $tpl->escape($page_title) ?> + + + + + +
+ +
+
+ render($frame_list) ?> +
+
+
+ render($header) ?> +
+ render($frame_code) ?> + render($env_details) ?> +
+
+
+ + + + + + diff --git a/vendor/filp/whoops/src/Whoops/Run.php b/vendor/filp/whoops/src/Whoops/Run.php old mode 100755 new mode 100644 index dacbf30..2073bf8 --- a/vendor/filp/whoops/src/Whoops/Run.php +++ b/vendor/filp/whoops/src/Whoops/Run.php @@ -152,7 +152,7 @@ class Run /** * Silence particular errors in particular files * @param array|string $patterns List or a single regex pattern to match - * @param integer $levels Defaults to E_STRICT | E_DEPRECATED + * @param int $levels Defaults to E_STRICT | E_DEPRECATED * @return \Whoops\Run */ public function silenceErrorsInPaths($patterns, $levels = 10240) @@ -178,7 +178,7 @@ class Run * use 502, 503, or another 5xx family code. * * @param bool|int $code - * @return bool + * @return int|false */ public function sendHttpCode($code = null) { @@ -239,9 +239,7 @@ class Run // Just in case there are no handlers: $handlerResponse = null; - for($i = count($this->handlerStack) - 1; $i >= 0; $i--) { - $handler = $this->handlerStack[$i]; - + foreach (array_reverse($this->handlerStack) as $handler) { $handler->setRun($this); $handler->setInspector($inspector); $handler->setException($exception); @@ -257,8 +255,11 @@ class Run } } + $willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit(); + $output = ob_get_clean(); + // If we're allowed to, send output generated by handlers directly // to the output, otherwise, and if the script doesn't quit, return // it so that it may be used by the caller @@ -266,37 +267,15 @@ class Run // @todo Might be able to clean this up a bit better // If we're going to quit execution, cleanup all other output // buffers before sending our own output: - if($handlerResponse == Handler::QUIT && $this->allowQuit()) { + if($willQuit) { while (ob_get_level() > 0) ob_end_clean(); } - if($this->sendHttpCode() && isset($_SERVER["REQUEST_URI"]) && !headers_sent()) { - $httpCode = $this->sendHttpCode(); - - if (function_exists('http_response_code')) { - http_response_code($httpCode); - } else { - // http_response_code is added in 5.4. - // For compatibility with 5.3 we use the third argument in header call - // First argument must be a real header. - // If it is empty, PHP will ignore the third argument. - // If it is invalid, such as a single space, Apache will handle it well, - // but the PHP development server will hang. - // Setting a full status line would require us to hardcode - // string values for all different status code, and detect the protocol. - // which is an extra error-prone complexity. - header('X-Ignore-This: 1', true, $httpCode); - } - } - - echo $output; + $this->writeToOutputNow($output); } - // Handlers are done! Check if we got here because of Handler::QUIT - // ($handlerResponse will be the response from the last queried handler) - // and if so, try to quit execution. - if($handlerResponse == Handler::QUIT && $this->allowQuit()) { - exit; + if($willQuit) { + exit(1); } return $output; @@ -313,7 +292,7 @@ class Run * @param string $file * @param int $line * - * @return bool + * @return bool|null */ public function handleError($level, $message, $file = null, $line = null) { @@ -361,10 +340,41 @@ class Run /** * In certain scenarios, like in shutdown handler, we can not throw exceptions - * @var boolean + * @var bool */ private $canThrowExceptions = true; + /** + * Echo something to the browser + * @param string $output + * @return $this + */ + private function writeToOutputNow($output) + { + if($this->sendHttpCode() && \Whoops\Util\Misc::canSendHeaders()) { + $httpCode = $this->sendHttpCode(); + + if (function_exists('http_response_code')) { + http_response_code($httpCode); + } else { + // http_response_code is added in 5.4. + // For compatibility with 5.3 we use the third argument in header call + // First argument must be a real header. + // If it is empty, PHP will ignore the third argument. + // If it is invalid, such as a single space, Apache will handle it well, + // but the PHP development server will hang. + // Setting a full status line would require us to hardcode + // string values for all different status code, and detect the protocol. + // which is an extra error-prone complexity. + header('X-Ignore-This: 1', true, $httpCode); + } + } + + echo $output; + + return $this; + } + private static function isLevelFatal($level) { return in_array( diff --git a/vendor/filp/whoops/src/Whoops/Util/Misc.php b/vendor/filp/whoops/src/Whoops/Util/Misc.php new file mode 100644 index 0000000..52b8f10 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Util/Misc.php @@ -0,0 +1,25 @@ + + */ + +namespace Whoops\Util; + +class Misc +{ + /** + * Can we at this point in time send HTTP headers? + * + * Currently this checks if we are even serving an HTTP request, + * as opposed to running from a command line. + * + * If we are serving an HTTP request, we check if it's not too late. + * + * @return bool + */ + public static function canSendHeaders() + { + return isset($_SERVER["REQUEST_URI"]) && !headers_sent(); + } +} diff --git a/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php b/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php new file mode 100644 index 0000000..de24af5 --- /dev/null +++ b/vendor/filp/whoops/src/Whoops/Util/TemplateHelper.php @@ -0,0 +1,155 @@ + + */ + +namespace Whoops\Util; + +/** + * Exposes useful tools for working with/in templates + */ +class TemplateHelper +{ + /** + * An array of variables to be passed to all templates + * @var array + */ + private $variables = array(); + + /** + * Escapes a string for output in an HTML document + * + * @param string $raw + * @return string + */ + public function escape($raw) + { + $flags = ENT_QUOTES; + + // HHVM has all constants defined, but only ENT_IGNORE + // works at the moment + if (defined("ENT_SUBSTITUTE") && !defined("HHVM_VERSION")) { + $flags |= ENT_SUBSTITUTE; + } else { + // This is for 5.3. + // The documentation warns of a potential security issue, + // but it seems it does not apply in our case, because + // we do not blacklist anything anywhere. + $flags |= ENT_IGNORE; + } + + return htmlspecialchars($raw, $flags, "UTF-8"); + } + + /** + * Escapes a string for output in an HTML document, but preserves + * URIs within it, and converts them to clickable anchor elements. + * + * @param string $raw + * @return string + */ + public function escapeButPreserveUris($raw) + { + $escaped = $this->escape($raw); + return preg_replace( + "@([A-z]+?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@", + "$1", $escaped + ); + } + + /** + * Convert a string to a slug version of itself + * + * @param string $original + * @return string + */ + public function slug($original) + { + $slug = str_replace(" ", "-", $original); + $slug = preg_replace('/[^\w\d\-\_]/i', '', $slug); + return strtolower($slug); + } + + /** + * Given a template path, render it within its own scope. This + * method also accepts an array of additional variables to be + * passed to the template. + * + * @param string $template + * @param array $additionalVariables + */ + public function render($template, array $additionalVariables = null) + { + $variables = $this->getVariables(); + + // Pass the helper to the template: + $variables["tpl"] = $this; + + if($additionalVariables !== null) { + $variables = array_replace($variables, $additionalVariables); + } + + call_user_func(function(){ + extract(func_get_arg(1)); + require func_get_arg(0); + }, $template, $variables); + } + + /** + * Sets the variables to be passed to all templates rendered + * by this template helper. + * + * @param array $variables + */ + public function setVariables(array $variables) + { + $this->variables = $variables; + } + + /** + * Sets a single template variable, by its name: + * + * @param string $variableName + * @param mixd $variableValue + */ + public function setVariable($variableName, $variableValue) + { + $this->variables[$variableName] = $variableValue; + } + + /** + * Gets a single template variable, by its name, or + * $defaultValue if the variable does not exist + * + * @param string $variableName + * @param mixed $defaultValue + * @return mixed + */ + public function getVariable($variableName, $defaultValue = null) + { + return isset($this->variables[$variableName]) ? + $this->variables[$variableName] : $defaultValue + ; + } + + /** + * Unsets a single template variable, by its name + * + * @param string $variableName + */ + public function delVariable($variableName) + { + unset($this->variables[$variableName]); + } + + /** + * Returns all variables for this helper + * + * @return array + */ + public function getVariables() + { + return $this->variables; + } +} diff --git a/vendor/filp/whoops/src/deprecated/Zend/ExceptionStrategy.php b/vendor/filp/whoops/src/deprecated/Zend/ExceptionStrategy.php new file mode 100644 index 0000000..acfb355 --- /dev/null +++ b/vendor/filp/whoops/src/deprecated/Zend/ExceptionStrategy.php @@ -0,0 +1,62 @@ + + */ + +namespace Whoops\Provider\Zend; + +use Whoops\Run; +use Zend\Mvc\View\Http\ExceptionStrategy as BaseExceptionStrategy; +use Zend\Mvc\MvcEvent; +use Zend\Mvc\Application; +use Zend\Http\Response; + +/** + * @deprecated Use https://github.com/ghislainf/zf2-whoops + */ +class ExceptionStrategy extends BaseExceptionStrategy { + + protected $run; + + public function __construct(Run $run) { + $this->run = $run; + return $this; + } + + public function prepareExceptionViewModel(MvcEvent $event) { + // Do nothing if no error in the event + $error = $event->getError(); + if (empty($error)) { + return; + } + + // Do nothing if the result is a response object + $result = $event->getResult(); + if ($result instanceof Response) { + return; + } + + switch ($error) { + case Application::ERROR_CONTROLLER_NOT_FOUND: + case Application::ERROR_CONTROLLER_INVALID: + case Application::ERROR_ROUTER_NO_MATCH: + // Specifically not handling these + return; + + case Application::ERROR_EXCEPTION: + default: + $exception = $event->getParam('exception'); + if($exception) { + $response = $event->getResponse(); + if (!$response || $response->getStatusCode() === 200) { + header('HTTP/1.0 500 Internal Server Error', true, 500); + } + ob_clean(); + $this->run->handleException($event->getParam('exception')); + } + break; + } + } + +} diff --git a/vendor/filp/whoops/src/deprecated/Zend/Module.php b/vendor/filp/whoops/src/deprecated/Zend/Module.php new file mode 100644 index 0000000..61456e1 --- /dev/null +++ b/vendor/filp/whoops/src/deprecated/Zend/Module.php @@ -0,0 +1,109 @@ + + * + * The Whoops directory should be added as a module to ZF2 (/vendor/Whoops) + * + * Whoops must be added as the first module + * For example: + * 'modules' => array( + * 'Whoops', + * 'Application', + * ), + * + * This file should be moved next to Whoops/Run.php (/vendor/Whoops/Module.php) + * + */ + +namespace Whoops; + +use Whoops\Run; +use Whoops\Provider\Zend\ExceptionStrategy; +use Whoops\Provider\Zend\RouteNotFoundStrategy; +use Whoops\Handler\JsonResponseHandler; +use Whoops\Handler\PrettyPageHandler; +use Zend\EventManager\EventInterface; +use Zend\Console\Request as ConsoleRequest; + +/** + * @deprecated Use https://github.com/ghislainf/zf2-whoops + */ +class Module +{ + protected $run; + + public function onBootstrap(EventInterface $event) + { + $prettyPageHandler = new PrettyPageHandler(); + + // Set editor + $config = $event->getApplication()->getServiceManager()->get('Config'); + if (isset($config['view_manager']['editor'])) { + $prettyPageHandler->setEditor($config['view_manager']['editor']); + } + + + $this->run = new Run(); + $this->run->register(); + $this->run->pushHandler($prettyPageHandler); + + $this->attachListeners($event); + } + + public function getAutoloaderConfig() + { + return array( + 'Zend\Loader\StandardAutoloader' => array( + 'namespaces' => array( + __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, + ), + ), + ); + } + + private function attachListeners(EventInterface $event) + { + $request = $event->getRequest(); + $application = $event->getApplication(); + $services = $application->getServiceManager(); + $events = $application->getEventManager(); + $config = $services->get('Config'); + + //Display exceptions based on configuration and console mode + if ($request instanceof ConsoleRequest || empty($config['view_manager']['display_exceptions'])) + return; + + $jsonHandler = new JsonResponseHandler(); + + if (!empty($config['view_manager']['json_exceptions']['show_trace'])) { + //Add trace to the JSON output + $jsonHandler->addTraceToOutput(true); + } + + if (!empty($config['view_manager']['json_exceptions']['ajax_only'])) { + //Only return JSON response for AJAX requests + $jsonHandler->onlyForAjaxRequests(true); + } + + if (!empty($config['view_manager']['json_exceptions']['display'])) { + //Turn on JSON handler + $this->run->pushHandler($jsonHandler); + } + + //Attach the Whoops ExceptionStrategy + $exceptionStrategy = new ExceptionStrategy($this->run); + $exceptionStrategy->attach($events); + + //Attach the Whoops RouteNotFoundStrategy + $routeNotFoundStrategy = new RouteNotFoundStrategy($this->run); + $routeNotFoundStrategy->attach($events); + + //Detach default ExceptionStrategy + $services->get('Zend\Mvc\View\Http\ExceptionStrategy')->detach($events); + + //Detach default RouteNotFoundStrategy + $services->get('Zend\Mvc\View\Http\RouteNotFoundStrategy')->detach($events); + } + +} diff --git a/vendor/filp/whoops/src/deprecated/Zend/RouteNotFoundStrategy.php b/vendor/filp/whoops/src/deprecated/Zend/RouteNotFoundStrategy.php new file mode 100644 index 0000000..1934c5b --- /dev/null +++ b/vendor/filp/whoops/src/deprecated/Zend/RouteNotFoundStrategy.php @@ -0,0 +1,66 @@ + + */ + +namespace Whoops\Provider\Zend; + +use Whoops\Run; +use Zend\Mvc\View\Http\RouteNotFoundStrategy as BaseRouteNotFoundStrategy; +use Zend\Mvc\MvcEvent; +use Zend\Stdlib\ResponseInterface as Response; +use Zend\View\Model\ViewModel; + +/** + * @deprecated Use https://github.com/ghislainf/zf2-whoops + */ +class RouteNotFoundStrategy extends BaseRouteNotFoundStrategy { + + protected $run; + + public function __construct(Run $run) { + $this->run = $run; + } + + public function prepareNotFoundViewModel(MvcEvent $e) { + $vars = $e->getResult(); + if ($vars instanceof Response) { + // Already have a response as the result + return; + } + + $response = $e->getResponse(); + if ($response->getStatusCode() != 404) { + // Only handle 404 responses + return; + } + + if (!$vars instanceof ViewModel) { + $model = new ViewModel(); + if (is_string($vars)) { + $model->setVariable('message', $vars); + } else { + $model->setVariable('message', 'Page not found.'); + } + } else { + $model = $vars; + if ($model->getVariable('message') === null) { + $model->setVariable('message', 'Page not found.'); + } + } + // If displaying reasons, inject the reason + $this->injectNotFoundReason($model, $e); + + // If displaying exceptions, inject + $this->injectException($model, $e); + + // Inject controller if we're displaying either the reason or the exception + $this->injectController($model, $e); + + ob_clean(); + + throw new \Exception($model->getVariable('message') . ' ' . $model->getVariable('reason')); + } + +} diff --git a/vendor/filp/whoops/src/deprecated/Zend/module.config.example.php b/vendor/filp/whoops/src/deprecated/Zend/module.config.example.php new file mode 100644 index 0000000..1ba0a29 --- /dev/null +++ b/vendor/filp/whoops/src/deprecated/Zend/module.config.example.php @@ -0,0 +1,20 @@ + + * + * Example controller configuration + */ + +return array( + 'view_manager' => array( + 'editor' => 'sublime', + 'display_not_found_reason' => true, + 'display_exceptions' => true, + 'json_exceptions' => array( + 'display' => true, + 'ajax_only' => true, + 'show_trace' => true + ) + ), +); diff --git a/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php b/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php old mode 100755 new mode 100644 index 136d115..04f4bd3 --- a/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php +++ b/vendor/filp/whoops/tests/Whoops/Exception/FrameCollectionTest.php @@ -62,6 +62,44 @@ class FrameCollectionTest extends TestCase } /** + * @covers Whoops\Exception\FrameCollection::offsetExists + */ + public function testArrayAccessExists() + { + $collection = $this->getFrameCollectionInstance(); + $this->assertTrue(isset($collection[0])); + } + + /** + * @covers Whoops\Exception\FrameCollection::offsetGet + */ + public function testArrayAccessGet() + { + $collection = $this->getFrameCollectionInstance(); + $this->assertInstanceOf('Whoops\\Exception\\Frame', $collection[0]); + } + + /** + * @covers Whoops\Exception\FrameCollection::offsetSet + * @expectedException Exception + */ + public function testArrayAccessSet() + { + $collection = $this->getFrameCollectionInstance(); + $collection[0] = 'foo'; + } + + /** + * @covers Whoops\Exception\FrameCollection::offsetUnset + * @expectedException Exception + */ + public function testArrayAccessUnset() + { + $collection = $this->getFrameCollectionInstance(); + unset($collection[0]); + } + + /** * @covers Whoops\Exception\FrameCollection::filter * @covers Whoops\Exception\FrameCollection::count */ @@ -123,6 +161,18 @@ class FrameCollectionTest extends TestCase } /** + * @covers Whoops\Exception\FrameCollection::getArray + */ + public function testGetArrayImmutable() + { + $frames = $this->getFrameCollectionInstance(); + $arr = $frames->getArray(); + $arr[0] = 'foobar'; + $newCopy = $frames->getArray(); + $this->assertFalse($arr[0] === $newCopy); + } + + /** * @covers Whoops\Exception\FrameCollection::getIterator */ public function testCollectionIsIterable() @@ -147,4 +197,26 @@ class FrameCollectionTest extends TestCase $this->assertInstanceOf('Whoops\\Exception\\Frame', $frame); } } + + + /** + * @covers Whoops\Exception\FrameCollection::topDiff + */ + public function testTopDiff(){ + $commonFrameTail = $this->getFrameDataList(3); + + $diffFrame = array('line' => $this->frameIdCounter) + $this->getFrameData(); + + $frameCollection1 = new FrameCollection(array_merge(array( + $diffFrame + ), $commonFrameTail)); + + $frameCollection2 = new FrameCollection(array_merge(array( + $this->getFrameData() + ), $commonFrameTail)); + + $diff = $frameCollection1->topDiff($frameCollection2); + + $this->assertCount(1, $diff); + } } diff --git a/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php b/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php old mode 100755 new mode 100644 index a4558be..3d26bb7 --- a/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php +++ b/vendor/filp/whoops/tests/Whoops/Exception/FrameTest.php @@ -206,4 +206,13 @@ class FrameTest extends TestCase $this->assertEquals($comments[0]["comment"], $commentText); $this->assertEquals($comments[0]["context"], $commentContext); } + + /** + * @covers Whoops\Exception\Frame::equals + */ + public function testEquals(){ + $frame1 = $this->getFrameInstance(array('line' => 1, 'file' => 'test-file.php')); + $frame2 = $this->getFrameInstance(array('line' => 1, 'file' => 'test-file.php')); + $this->assertTrue ($frame1->equals($frame2)); + } } diff --git a/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php b/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php old mode 100755 new mode 100644 index 7c78740..9302a97 --- a/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php +++ b/vendor/filp/whoops/tests/Whoops/Exception/InspectorTest.php @@ -7,19 +7,19 @@ namespace Whoops\Exception; use Whoops\Exception\Inspector; use Whoops\TestCase; -use RuntimeException; use Exception; -use Mockery as m; class InspectorTest extends TestCase { /** - * @param string $message + * @param string $message + * @param int $code + * @param Exception $previous * @return Exception */ - protected function getException($message = null) + protected function getException($message = null, $code = 0, Exception $previous = null) { - return m::mock('Exception', array($message)); + return new Exception($message, $code, $previous); } /** @@ -32,6 +32,19 @@ class InspectorTest extends TestCase } /** + * @covers Whoops\Exception\Inspector::getFrames + */ + public function testCorrectNestedFrames($value='') + { + // Create manually to have a different line number from the outer + $inner = new Exception('inner'); + $outer = $this->getException('outer', 0, $inner); + $inspector = $this->getInspectorInstance($outer); + $frames = $inspector->getFrames(); + $this->assertSame($outer->getLine(), $frames[0]->getLine()); + } + + /** * @covers Whoops\Exception\Inspector::getExceptionName */ public function testReturnsCorrectExceptionName() @@ -64,4 +77,29 @@ class InspectorTest extends TestCase $this->assertInstanceOf('Whoops\\Exception\\FrameCollection', $inspector->getFrames()); } + + /** + * @covers Whoops\Exception\Inspector::hasPreviousException + * @covers Whoops\Exception\Inspector::getPreviousExceptionInspector + */ + public function testPreviousException() + { + $previousException = $this->getException("I'm here first!"); + $exception = $this->getException("Oh boy", null, $previousException); + $inspector = $this->getInspectorInstance($exception); + + $this->assertTrue($inspector->hasPreviousException()); + $this->assertEquals($previousException, $inspector->getPreviousExceptionInspector()->getException()); + } + + /** + * @covers Whoops\Exception\Inspector::hasPreviousException + */ + public function testNegativeHasPreviousException() + { + $exception = $this->getException("Oh boy"); + $inspector = $this->getInspectorInstance($exception); + + $this->assertFalse($inspector->hasPreviousException()); + } } diff --git a/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php old mode 100755 new mode 100644 index 548d4f7..dcb70ae --- a/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php +++ b/vendor/filp/whoops/tests/Whoops/Handler/JsonResponseHandlerTest.php @@ -92,5 +92,5 @@ class JsonResponseHandlerTest extends TestCase $this->assertArrayHasKey('function', $traceFrame); $this->assertArrayHasKey('class', $traceFrame); $this->assertArrayHasKey('args', $traceFrame); - } + } } diff --git a/vendor/filp/whoops/tests/Whoops/Handler/PlainTextHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/PlainTextHandlerTest.php new file mode 100644 index 0000000..c1c3db6 --- /dev/null +++ b/vendor/filp/whoops/tests/Whoops/Handler/PlainTextHandlerTest.php @@ -0,0 +1,438 @@ + + */ + +namespace Whoops\Handler; +use Whoops\TestCase; +use Whoops\Handler\PlainTextHandler; +use RuntimeException; +use StdClass; + +class PlainTextHandlerTest extends TestCase +{ + /** + * @throws InvalidArgumentException If argument is not null or a LoggerInterface + * @param Psr\Log\LoggerInterface|null $logger + * @return Whoops\Handler\PlainTextHandler + */ + private function getHandler($logger = null) + { + return new PlainTextHandler($logger); + } + + /** + * @return RuntimeException + */ + public function getException($message = 'test message') + { + return new RuntimeException($message); + } + + /** + * @param bool $withTrace + * @param bool $withTraceArgs + * @param bool $loggerOnly + * @param bool $onlyForCommandLine + * @param bool $outputOnlyIfCommandLine + * @return array + */ + private function getPlainTextFromHandler( + $withTrace = false, + $withTraceArgs = false, + $traceFunctionArgsOutputLimit = 1024, + $loggerOnly = false, + $onlyForCommandLine = false, + $outputOnlyIfCommandLine = true + ) + { + $handler = $this->getHandler(); + $handler->addTraceToOutput($withTrace); + $handler->addTraceFunctionArgsToOutput($withTraceArgs); + $handler->setTraceFunctionArgsOutputLimit($traceFunctionArgsOutputLimit); + $handler->loggerOnly($loggerOnly); + $handler->onlyForCommandLine($onlyForCommandLine); + $handler->outputOnlyIfCommandLine($outputOnlyIfCommandLine); + + $run = $this->getRunInstance(); + $run->pushHandler($handler); + $run->register(); + + $exception = $this->getException(); + ob_start(); + $run->handleException($exception); + + return ob_get_clean(); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::__construct + * @covers Whoops\Handler\PlainTextHandler::setLogger + * @expectedException InvalidArgumentException + */ + public function testConstructor() + { + $logger = new StdClass(); // guaranteed to be invalid! + $this->getHandler($logger); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::setLogger + * @expectedException InvalidArgumentException + */ + public function testSetLogger() + { + $logger = new StdClass(); // guaranteed to be invalid! + $this->getHandler()->setLogger($logger); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::addTraceToOutput + */ + public function testAddTraceToOutput() + { + $handler = $this->getHandler(); + + $handler->addTraceToOutput(true); + $this->assertEquals(true, $handler->addTraceToOutput()); + + $handler->addTraceToOutput(false); + $this->assertEquals(false, $handler->addTraceToOutput()); + + $handler->addTraceToOutput(null); + $this->assertEquals(null, $handler->addTraceToOutput()); + + $handler->addTraceToOutput(1); + $this->assertEquals(true, $handler->addTraceToOutput()); + + $handler->addTraceToOutput(0); + $this->assertEquals(false, $handler->addTraceToOutput()); + + $handler->addTraceToOutput(''); + $this->assertEquals(false, $handler->addTraceToOutput()); + + $handler->addTraceToOutput('false'); + $this->assertEquals(true, $handler->addTraceToOutput()); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::addTraceFunctionArgsToOutput + */ + public function testAddTraceFunctionArgsToOutput() + { + $handler = $this->getHandler(); + + $handler->addTraceFunctionArgsToOutput(true); + $this->assertEquals(true, $handler->addTraceFunctionArgsToOutput()); + + $handler->addTraceFunctionArgsToOutput(false); + $this->assertEquals(false, $handler->addTraceFunctionArgsToOutput()); + + $handler->addTraceFunctionArgsToOutput(null); + $this->assertEquals(null, $handler->addTraceFunctionArgsToOutput()); + + $handler->addTraceFunctionArgsToOutput(1); + $this->assertEquals(1, $handler->addTraceFunctionArgsToOutput()); + + $handler->addTraceFunctionArgsToOutput(0); + $this->assertEquals(0, $handler->addTraceFunctionArgsToOutput()); + + $handler->addTraceFunctionArgsToOutput(''); + $this->assertEquals(false, $handler->addTraceFunctionArgsToOutput()); + + $handler->addTraceFunctionArgsToOutput('false'); + $this->assertEquals(true, $handler->addTraceFunctionArgsToOutput()); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::setTraceFunctionArgsOutputLimit + * @covers Whoops\Handler\PlainTextHandler::getTraceFunctionArgsOutputLimit + */ + public function testGetSetTraceFunctionArgsOutputLimit() + { + $addTraceFunctionArgsToOutput = 10240; + + $handler = $this->getHandler(); + + $handler->setTraceFunctionArgsOutputLimit($addTraceFunctionArgsToOutput); + $this->assertEquals($addTraceFunctionArgsToOutput, $handler->getTraceFunctionArgsOutputLimit()); + + $handler->setTraceFunctionArgsOutputLimit('1024kB'); + $this->assertEquals(1024, $handler->getTraceFunctionArgsOutputLimit()); + + $handler->setTraceFunctionArgsOutputLimit('true'); + $this->assertEquals(0, $handler->getTraceFunctionArgsOutputLimit()); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::onlyForCommandLine + */ + public function testOnlyForCommandLine() + { + $handler = $this->getHandler(); + + $handler->onlyForCommandLine(true); + $this->assertEquals(true, $handler->onlyForCommandLine()); + + $handler->onlyForCommandLine(false); + $this->assertEquals(false, $handler->onlyForCommandLine()); + + $handler->onlyForCommandLine(null); + $this->assertEquals(null, $handler->onlyForCommandLine()); + + $handler->onlyForCommandLine(1); + $this->assertEquals(true, $handler->onlyForCommandLine()); + + $handler->onlyForCommandLine(0); + $this->assertEquals(false, $handler->onlyForCommandLine()); + + $handler->onlyForCommandLine(''); + $this->assertEquals(false, $handler->onlyForCommandLine()); + + $handler->onlyForCommandLine('false'); + $this->assertEquals(true, $handler->onlyForCommandLine()); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::outputOnlyIfCommandLine + */ + public function testOutputOnlyIfCommandLine() + { + $handler = $this->getHandler(); + + $handler->outputOnlyIfCommandLine(true); + $this->assertEquals(true, $handler->outputOnlyIfCommandLine()); + + $handler->outputOnlyIfCommandLine(false); + $this->assertEquals(false, $handler->outputOnlyIfCommandLine()); + + $handler->outputOnlyIfCommandLine(null); + $this->assertEquals(null, $handler->outputOnlyIfCommandLine()); + + $handler->outputOnlyIfCommandLine(1); + $this->assertEquals(true, $handler->outputOnlyIfCommandLine()); + + $handler->outputOnlyIfCommandLine(0); + $this->assertEquals(false, $handler->outputOnlyIfCommandLine()); + + $handler->outputOnlyIfCommandLine(''); + $this->assertEquals(false, $handler->outputOnlyIfCommandLine()); + + $handler->outputOnlyIfCommandLine('false'); + $this->assertEquals(true, $handler->outputOnlyIfCommandLine()); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::loggerOnly + */ + public function testLoggerOnly() + { + $handler = $this->getHandler(); + + $handler->loggerOnly(true); + $this->assertEquals(true, $handler->loggerOnly()); + + $handler->loggerOnly(false); + $this->assertEquals(false, $handler->loggerOnly()); + + $handler->loggerOnly(null); + $this->assertEquals(null, $handler->loggerOnly()); + + $handler->loggerOnly(1); + $this->assertEquals(true, $handler->loggerOnly()); + + $handler->loggerOnly(0); + $this->assertEquals(false, $handler->loggerOnly()); + + $handler->loggerOnly(''); + $this->assertEquals(false, $handler->loggerOnly()); + + $handler->loggerOnly('false'); + $this->assertEquals(true, $handler->loggerOnly()); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::addTraceToOutput + * @covers Whoops\Handler\PlainTextHandler::handle + */ + public function testReturnsWithoutFramesOutput() + { + $text = $this->getPlainTextFromHandler( + $withTrace = false, + $withTraceArgs = true, + $traceFunctionArgsOutputLimit = 1024, + $loggerOnly = false, + $onlyForCommandLine = false, + $outputOnlyIfCommandLine = true + ); + + // Check that the response has the correct value: + // Check that the trace is NOT returned: + $this->assertEquals( + sprintf( + "%s: %s in file %s on line %d\n", + get_class($this->getException()), + 'test message', + __FILE__, + 30 + ), + $text + ); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::addTraceToOutput + * @covers Whoops\Handler\PlainTextHandler::getTraceOutput + * @covers Whoops\Handler\PlainTextHandler::canProcess + * @covers Whoops\Handler\PlainTextHandler::canOutput + * @covers Whoops\Handler\PlainTextHandler::handle + */ + public function testReturnsWithFramesOutput() + { + $text = $this->getPlainTextFromHandler( + $withTrace = true, + $withTraceArgs = false, + $traceFunctionArgsOutputLimit = 1024, + $loggerOnly = false, + $onlyForCommandLine = false, + $outputOnlyIfCommandLine = true + ); + + $lines = explode("\n", $text); + + + // Check that the response has the correct value: + $this->assertEquals('Stack trace:', $lines[1]); + + // Check that the trace is returned: + $this->assertEquals( + sprintf( + '%3d. %s->%s() %s:%d', + 2, + 'Whoops\Handler\PlainTextHandlerTest', + 'getException', + __FILE__, + 62 + ), + $lines[3] + ); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::addTraceToOutput + * @covers Whoops\Handler\PlainTextHandler::addTraceFunctionArgsToOutput + * @covers Whoops\Handler\PlainTextHandler::getTraceOutput + * @covers Whoops\Handler\PlainTextHandler::getFrameArgsOutput + * @covers Whoops\Handler\PlainTextHandler::canProcess + * @covers Whoops\Handler\PlainTextHandler::canOutput + * @covers Whoops\Handler\PlainTextHandler::handle + */ + public function testReturnsWithFramesAndArgsOutput() + { + $text = $this->getPlainTextFromHandler( + $withTrace = true, + $withTraceArgs = true, + $traceFunctionArgsOutputLimit = 2048, + $loggerOnly = false, + $onlyForCommandLine = false, + $outputOnlyIfCommandLine = true + ); + + $lines = explode("\n", $text); + + // Check that the trace is returned with all arguments: + $this->assertGreaterThan(60, count($lines)); + + // Check that the response has the correct value: + $this->assertEquals('Stack trace:', $lines[1]); + + // Check that the trace is returned: + $this->assertEquals( + sprintf( + '%3d. %s->%s() %s:%d', + 2, + 'Whoops\Handler\PlainTextHandlerTest', + 'getException', + __FILE__, + 62 + ), + $lines[8] + ); + // Check that the trace arguments are returned: + $this->assertEquals(sprintf( + '%s string(%d) "%s"', + PlainTextHandler::VAR_DUMP_PREFIX, + strlen('test message'), + 'test message' + ), $lines[5] + ); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::addTraceToOutput + * @covers Whoops\Handler\PlainTextHandler::addTraceFunctionArgsToOutput + * @covers Whoops\Handler\PlainTextHandler::getTraceOutput + * @covers Whoops\Handler\PlainTextHandler::getFrameArgsOutput + * @covers Whoops\Handler\PlainTextHandler::canProcess + * @covers Whoops\Handler\PlainTextHandler::canOutput + * @covers Whoops\Handler\PlainTextHandler::handle + */ + public function testReturnsWithFramesAndLimitedArgsOutput() + { + $text = $this->getPlainTextFromHandler( + $withTrace = true, + $withTraceArgs = 3, + $traceFunctionArgsOutputLimit = 1024, + $loggerOnly = false, + $onlyForCommandLine = false, + $outputOnlyIfCommandLine = true + ); + + $lines = explode("\n", $text); + + // Check that the response has the correct value: + $this->assertEquals('Stack trace:', $lines[1]); + + // Check that the trace is returned: + $this->assertEquals( + sprintf( + '%3d. %s->%s() %s:%d', + 2, + 'Whoops\Handler\PlainTextHandlerTest', + 'getException', + __FILE__, + 62 + ), + $lines[8] + ); + + // Check that the trace arguments are returned: + $this->assertEquals(sprintf( + '%s string(%d) "%s"', + PlainTextHandler::VAR_DUMP_PREFIX, + strlen('test message'), + 'test message' + ), $lines[5] + ); + } + + /** + * @covers Whoops\Handler\PlainTextHandler::loggerOnly + * @covers Whoops\Handler\PlainTextHandler::canProcess + * @covers Whoops\Handler\PlainTextHandler::handle + */ + public function testReturnsWithLoggerOnlyOutput() + { + $text = $this->getPlainTextFromHandler( + $withTrace = true, + $withTraceArgs = true, + $traceFunctionArgsOutputLimit = 1024, + $loggerOnly = true, + $onlyForCommandLine = false, + $outputOnlyIfCommandLine = true + ); + // Check that the response has the correct value: + $this->assertEquals('', $text); + } +} diff --git a/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php old mode 100755 new mode 100644 index 0df881b..0b55b15 --- a/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php +++ b/vendor/filp/whoops/tests/Whoops/Handler/PrettyPageHandlerTest.php @@ -17,7 +17,9 @@ class PrettyPageHandlerTest extends TestCase */ private function getHandler() { - return new PrettyPageHandler; + $handler = new PrettyPageHandler; + $handler->handleUnconditionally(); + return $handler; } /** @@ -62,26 +64,29 @@ class PrettyPageHandlerTest extends TestCase } /** - * @covers Whoops\Handler\PrettyPageHandler::setResourcesPath - * @covers Whoops\Handler\PrettyPageHandler::getResourcesPath + * @covers Whoops\Handler\PrettyPageHandler::addResourcePath + * @covers Whoops\Handler\PrettyPageHandler::getResourcePaths */ - public function testGetSetResourcesPath() + public function testGetSetResourcePaths() { $path = __DIR__; // guaranteed to be valid! $handler = $this->getHandler(); - $handler->setResourcesPath($path); - $this->assertEquals($path, $handler->getResourcesPath()); + $handler->addResourcePath($path); + $allPaths = $handler->getResourcePaths(); + + $this->assertCount(2, $allPaths); + $this->assertEquals($allPaths[0], $path); } /** - * @covers Whoops\Handler\PrettyPageHandler::setResourcesPath + * @covers Whoops\Handler\PrettyPageHandler::addResourcePath * @expectedException InvalidArgumentException */ public function testSetInvalidResourcesPath() { $path = __DIR__ . '/ZIMBABWE'; // guaranteed to be invalid! - $this->getHandler()->setResourcesPath($path); + $this->getHandler()->addResourcePath($path); } /** @@ -242,6 +247,13 @@ class PrettyPageHandlerTest extends TestCase public function testEditorXdebug() { + if (!extension_loaded('xdebug')) { + // Even though this test only uses ini_set and ini_get, + // without xdebug active, those calls do not work. + // In particular, ini_get after ini_setting returns false. + return $this->markTestSkipped('The xdebug extension is not loaded.'); + } + $originalValue = ini_get('xdebug.file_link_format'); ini_set('xdebug.file_link_format', '%f:%l'); diff --git a/vendor/filp/whoops/tests/Whoops/Handler/SoapResponseHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/SoapResponseHandlerTest.php new file mode 100644 index 0000000..9264d7a --- /dev/null +++ b/vendor/filp/whoops/tests/Whoops/Handler/SoapResponseHandlerTest.php @@ -0,0 +1,74 @@ +getRunInstance(); + $run->pushHandler($handler); + $run->register(); + + ob_start(); + $run->handleException($this->getException()); + $data = ob_get_clean(); + + $this->assertTrue($this->isValidXml($data)); + + return simplexml_load_string($data); + } + + /** + * @depends testSimpleValid + */ + public function testSimpleValidCode(\SimpleXMLElement $xml) + { + $this->checkField($xml, 'faultcode', (string) $this->getException()->getCode()); + } + + /** + * @depends testSimpleValid + */ + public function testSimpleValidMessage(\SimpleXMLElement $xml) + { + $this->checkField($xml, 'faultstring', $this->getException()->getMessage()); + } + + + /** + * Helper for testSimpleValid* + */ + private function checkField(\SimpleXMLElement $xml, $field, $value) + { + $list = $xml->xpath('/SOAP-ENV:Envelope/SOAP-ENV:Body/SOAP-ENV:Fault/'.$field); + $this->assertArrayHasKey(0, $list); + $this->assertSame($value, (string) $list[0]); + } + + private function getException() + { + return new RuntimeException('boom', 678); + } + + /** + * See if passed string is a valid XML document + * @param string $data + * @return bool + */ + private function isValidXml($data) + { + $prev = libxml_use_internal_errors(true); + $xml = simplexml_load_string($data); + libxml_use_internal_errors($prev); + return $xml !== false; + } +} diff --git a/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php b/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php old mode 100755 new mode 100644 index 91dec35..8fc5cdc --- a/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php +++ b/vendor/filp/whoops/tests/Whoops/Handler/XmlResponseHandlerTest.php @@ -70,7 +70,7 @@ class XmlResponseHandlerTest extends TestCase /** * See if passed string is a valid XML document * @param string $data - * @return boolean + * @return bool */ private function isValidXml($data) { diff --git a/vendor/filp/whoops/tests/Whoops/RunTest.php b/vendor/filp/whoops/tests/Whoops/RunTest.php index 54bde25..063b1b5 100755 --- a/vendor/filp/whoops/tests/Whoops/RunTest.php +++ b/vendor/filp/whoops/tests/Whoops/RunTest.php @@ -23,7 +23,10 @@ class RunTest extends TestCase */ protected function getException($message = null) { - return m::mock('Exception', array($message)); + // HHVM does not support mocking exceptions + // Since we do not use any additional features of Mockery for exceptions, + // we can just use native Exceptions instead. + return new \Exception($message); } /** @@ -291,7 +294,7 @@ class RunTest extends TestCase ; try { - trigger_error(E_USER_NOTICE, 'foo'); + trigger_error('foo', E_USER_NOTICE); $this->fail('Should not continue after error thrown'); } catch (\ErrorException $e) { // Do nothing @@ -347,7 +350,7 @@ class RunTest extends TestCase }) ; - $run->silenceErrorsInPaths('@^'.preg_quote(__FILE__).'$@', E_USER_NOTICE); + $run->silenceErrorsInPaths('@^'.preg_quote(__FILE__, '@').'$@', E_USER_NOTICE); trigger_error('Test', E_USER_NOTICE); $this->assertTrue(true); } diff --git a/vendor/filp/whoops/tests/Whoops/TestCase.php b/vendor/filp/whoops/tests/Whoops/TestCase.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/tests/Whoops/Util/TemplateHelperTest.php b/vendor/filp/whoops/tests/Whoops/Util/TemplateHelperTest.php new file mode 100644 index 0000000..5fd7ba9 --- /dev/null +++ b/vendor/filp/whoops/tests/Whoops/Util/TemplateHelperTest.php @@ -0,0 +1,116 @@ + + */ + +namespace Whoops\Util; +use Whoops\TestCase; +use Whoops\Util\TemplateHelper; + +class TemplateHelperTest extends TestCase +{ + /** + * @var Whoops\Util\TemplateHelper + */ + private $helper; + + /** + * {@inheritDoc} + */ + public function setUp() + { + $this->helper = new TemplateHelper; + } + + /** + * @covers Whoops\Util\TemplateHelper::escapeButPreserveUris + * @covers Whoops\Util\TemplateHelper::escape + */ + public function testEscape() + { + $original = "This is a Foo test string"; + + $this->assertEquals( + $this->helper->escape($original), + "This is a <a href=''>Foo</a> test string" + ); + } + + public function testEscapeBrokenUtf8() + { + // The following includes an illegal utf-8 sequence to test. + // Encoded in base64 to survive possible encoding changes of this file. + $original = base64_decode('VGhpcyBpcyBhbiBpbGxlZ2FsIHV0Zi04IHNlcXVlbmNlOiDD'); + + // Test that the escaped string is kinda similar in length, not empty + $this->assertLessThan( + 10, + abs(strlen($original) - strlen($this->helper->escape($original))) + ); + } + + /** + * @covers Whoops\Util\TemplateHelper::escapeButPreserveUris + */ + public function testEscapeButPreserveUris() + { + $original = "This is a http://google.com test string"; + + $this->assertEquals( + $this->helper->escapeButPreserveUris($original), + "This is a <a href=''>http://google.com</a> test string" + ); + } + + /** + * @covers Whoops\Util\TemplateHelper::slug + */ + public function testSlug() + { + $this->assertEquals("hello-world", $this->helper->slug("Hello, world!")); + $this->assertEquals("potato-class", $this->helper->slug("Potato class")); + } + + /** + * @covers Whoops\Util\TemplateHelper::render + */ + public function testRender() + { + $template = __DIR__ . "/../../fixtures/template.php"; + + ob_start(); + $this->helper->render($template, array("name" => "Bb")); + $output = ob_get_clean(); + + $this->assertEquals( + $output, + "hello-world\nMy name is B<o>b" + ); + } + + /** + * @covers Whoops\Util\TemplateHelper::setVariables + * @covers Whoops\Util\TemplateHelper::getVariables + * @covers Whoops\Util\TemplateHelper::setVariable + * @covers Whoops\Util\TemplateHelper::getVariable + * @covers Whoops\Util\TemplateHelper::delVariable + */ + public function testTemplateVariables() + { + $this->helper->setVariables(array( + "name" => "Whoops", + "type" => "library", + "desc" => "php errors for cool kids" + )); + + $this->helper->setVariable("name", "Whoops!"); + $this->assertEquals($this->helper->getVariable("name"), "Whoops!"); + $this->helper->delVariable("type"); + + $this->assertEquals($this->helper->getVariables(), array( + "name" => "Whoops!", + "desc" => "php errors for cool kids" + )); + } +} diff --git a/vendor/filp/whoops/tests/bootstrap.php b/vendor/filp/whoops/tests/bootstrap.php old mode 100755 new mode 100644 index d88d772..582067d --- a/vendor/filp/whoops/tests/bootstrap.php +++ b/vendor/filp/whoops/tests/bootstrap.php @@ -6,6 +6,5 @@ * Bootstraper for PHPUnit tests. */ error_reporting(E_ALL | E_STRICT); -$_ENV['whoops-test'] = true; $loader = require_once __DIR__ . '/../vendor/autoload.php'; $loader->add('Whoops\\', __DIR__); diff --git a/vendor/filp/whoops/tests/deprecated/Zend/ModuleTest.php b/vendor/filp/whoops/tests/deprecated/Zend/ModuleTest.php new file mode 100644 index 0000000..b6df2dc --- /dev/null +++ b/vendor/filp/whoops/tests/deprecated/Zend/ModuleTest.php @@ -0,0 +1,10 @@ +assertTrue(class_exists('\Whoops\Module')); + } +} diff --git a/vendor/filp/whoops/tests/fixtures/frame.lines-test.php b/vendor/filp/whoops/tests/fixtures/frame.lines-test.php old mode 100755 new mode 100644 diff --git a/vendor/filp/whoops/tests/fixtures/template.php b/vendor/filp/whoops/tests/fixtures/template.php new file mode 100644 index 0000000..5b99dbd --- /dev/null +++ b/vendor/filp/whoops/tests/fixtures/template.php @@ -0,0 +1,3 @@ +slug("hello world!"); ?> + +My name is escape($name) ?> diff --git a/vendor/ircmaxell/password-compat/.travis.yml b/vendor/ircmaxell/password-compat/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/LICENSE.md b/vendor/ircmaxell/password-compat/LICENSE.md old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/README.md b/vendor/ircmaxell/password-compat/README.md old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/composer.json b/vendor/ircmaxell/password-compat/composer.json old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/lib/password.php b/vendor/ircmaxell/password-compat/lib/password.php old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/phpunit.xml.dist b/vendor/ircmaxell/password-compat/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordGetInfoTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordGetInfoTest.php old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordHashTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordHashTest.php old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordNeedsRehashTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordNeedsRehashTest.php old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordVerifyTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordVerifyTest.php old mode 100755 new mode 100644 diff --git a/vendor/ircmaxell/password-compat/version-test.php b/vendor/ircmaxell/password-compat/version-test.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/.gitignore b/vendor/jeremeamia/SuperClosure/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/.travis.yml b/vendor/jeremeamia/SuperClosure/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/LICENSE.md b/vendor/jeremeamia/SuperClosure/LICENSE.md old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/README.md b/vendor/jeremeamia/SuperClosure/README.md old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/composer.json b/vendor/jeremeamia/SuperClosure/composer.json old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/demo/factorial.php b/vendor/jeremeamia/SuperClosure/demo/factorial.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/demo/hello-world.php b/vendor/jeremeamia/SuperClosure/demo/hello-world.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/phpunit.xml.dist b/vendor/jeremeamia/SuperClosure/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/ClosureLocation.php b/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/ClosureLocation.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/ClosureParser.php b/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/ClosureParser.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php b/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/SerializableClosure.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/Visitor/ClosureFinderVisitor.php b/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/Visitor/ClosureFinderVisitor.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/Visitor/MagicConstantVisitor.php b/vendor/jeremeamia/SuperClosure/src/Jeremeamia/SuperClosure/Visitor/MagicConstantVisitor.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/ClosureLocationTest.php b/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/ClosureLocationTest.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/ClosureParserTest.php b/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/ClosureParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/SerializableClosureTest.php b/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/SerializableClosureTest.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/Visitor/ClosureFinderVisitorTest.php b/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/Visitor/ClosureFinderVisitorTest.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/Visitor/MagicConstantVisitorTest.php b/vendor/jeremeamia/SuperClosure/tests/Jeremeamia/SuperClosure/Test/Visitor/MagicConstantVisitorTest.php old mode 100755 new mode 100644 diff --git a/vendor/jeremeamia/SuperClosure/tests/bootstrap.php b/vendor/jeremeamia/SuperClosure/tests/bootstrap.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/.travis.yml b/vendor/laravel/framework/.travis.yml index a49b2cb..dd30a9d 100755 --- a/vendor/laravel/framework/.travis.yml +++ b/vendor/laravel/framework/.travis.yml @@ -1,20 +1,21 @@ language: php php: - - 5.3 - 5.4 - 5.5 - 5.6 - hhvm + - hhvm-nightly before_script: - - composer self-update - - composer install --prefer-source --no-interaction --dev + - travis_retry composer self-update + - travis_retry composer install --prefer-source --no-interaction --dev -script: phpunit +script: vendor/bin/phpunit --verbose matrix: allow_failures: - php: 5.6 - php: hhvm + - php: hhvm-nightly fast_finish: true diff --git a/vendor/laravel/framework/CONTRIBUTING.md b/vendor/laravel/framework/CONTRIBUTING.md index dafb4b8..9be4c34 100755 --- a/vendor/laravel/framework/CONTRIBUTING.md +++ b/vendor/laravel/framework/CONTRIBUTING.md @@ -23,4 +23,4 @@ Laravel follows the [PSR-0](https://github.com/php-fig/fig-standards/blob/master - Namespace declarations should be on the same line as `=5.3.0", - "classpreloader/classpreloader": "1.0.*", - "d11wtq/boris": "1.0.*", - "ircmaxell/password-compat": "1.0.*", - "filp/whoops": "1.0.10", - "jeremeamia/superclosure": "1.0.*", - "monolog/monolog": "1.*", - "nesbot/carbon": "1.*", + "php": ">=5.4.0", + "classpreloader/classpreloader": "~1.0", + "d11wtq/boris": "~1.0", + "ircmaxell/password-compat": "~1.0", + "filp/whoops": "1.1.*", + "jeremeamia/superclosure": "~1.0", + "monolog/monolog": "~1.6", + "nesbot/carbon": "~1.0", "patchwork/utf8": "1.1.*", "phpseclib/phpseclib": "0.3.*", "predis/predis": "0.8.*", - "stack/builder": "1.0.*", - "swiftmailer/swiftmailer": "~5.0", - "symfony/browser-kit": "2.4.*", - "symfony/console": "2.4.*", - "symfony/css-selector": "2.4.*", - "symfony/debug": "2.4.*", - "symfony/dom-crawler": "2.4.*", - "symfony/finder": "2.4.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*", - "symfony/process": "2.4.*", - "symfony/routing": "2.4.*", - "symfony/security-core": "2.4.*", - "symfony/translation": "2.4.*" + "stack/builder": "~1.0", + "swiftmailer/swiftmailer": "~5.1", + "symfony/browser-kit": "2.5.*", + "symfony/console": "2.5.*", + "symfony/css-selector": "2.5.*", + "symfony/debug": "2.5.*", + "symfony/dom-crawler": "2.5.*", + "symfony/finder": "2.5.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*", + "symfony/process": "2.5.*", + "symfony/routing": "2.5.*", + "symfony/security-core": "2.5.*", + "symfony/translation": "2.5.*" }, "replace": { "illuminate/auth": "self.version", @@ -67,11 +67,11 @@ "illuminate/workbench": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "2.6.*", - "iron-io/iron_mq": "1.5.*", - "pda/pheanstalk": "2.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "aws/aws-sdk-php": "~2.6", + "iron-io/iron_mq": "~1.5", + "pda/pheanstalk": "~2.1", + "mockery/mockery": "~0.9", + "phpunit/phpunit": "~4.0" }, "autoload": { "classmap": [ @@ -86,7 +86,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "suggest": { diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/ClearRemindersCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/ClearRemindersCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersControllerCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersControllerCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersTableCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersTableCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/controller.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/controller.stub old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableTrait.php b/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableTrait.php new file mode 100644 index 0000000..9acd859 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableTrait.php @@ -0,0 +1,15 @@ +email; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/UserTrait.php b/vendor/laravel/framework/src/Illuminate/Auth/UserTrait.php new file mode 100644 index 0000000..fad98ac --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Auth/UserTrait.php @@ -0,0 +1,56 @@ +getKey(); + } + + /** + * Get the password for the user. + * + * @return string + */ + public function getAuthPassword() + { + return $this->password; + } + + /** + * Get the token value for the "remember me" session. + * + * @return string + */ + public function getRememberToken() + { + return $this->remember_token; + } + + /** + * Set the token value for the "remember me" session. + * + * @param string $value + * @return void + */ + public function setRememberToken($value) + { + $this->remember_token = $value; + } + + /** + * Get the column name for the "remember me" token. + * + * @return string + */ + public function getRememberTokenName() + { + return 'remember_token'; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json index d409b2a..668ccf6 100755 --- a/vendor/laravel/framework/src/Illuminate/Auth/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Auth/composer.json @@ -8,20 +8,19 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/cookie": "4.1.*", - "illuminate/encryption": "4.1.*", - "illuminate/events": "4.1.*", - "illuminate/hashing": "4.1.*", - "illuminate/http": "4.1.*", - "illuminate/session": "4.1.*", - "illuminate/support": "4.1.*", - "nesbot/carbon": "1.*" + "php": ">=5.4.0", + "illuminate/cookie": "4.2.*", + "illuminate/encryption": "4.2.*", + "illuminate/events": "4.2.*", + "illuminate/hashing": "4.2.*", + "illuminate/http": "4.2.*", + "illuminate/session": "4.2.*", + "illuminate/support": "4.2.*", + "nesbot/carbon": "~1.0" }, "require-dev": { - "illuminate/console": "4.1.*", - "illuminate/routing": "4.1.*", - "phpunit/phpunit": "4.0.*" + "illuminate/console": "4.2.*", + "illuminate/routing": "4.2.*" }, "autoload": { "psr-0": {"Illuminate\\Auth": ""} @@ -29,7 +28,7 @@ "target-dir": "Illuminate/Auth", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php index c64cf09..fba2594 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php @@ -59,6 +59,8 @@ class ClearCommand extends Command { $this->cache->flush(); $this->files->delete($this->laravel['config']['app.manifest'].'/services.json'); + + $this->laravel['events']->fire('cache:cleared'); $this->info('Application cache cleared!'); } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php index 3fd1575..907b215 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php @@ -66,9 +66,7 @@ class RedisStore extends TaggableStore implements StoreInterface { { $value = is_numeric($value) ? $value : serialize($value); - $this->connection()->set($this->prefix.$key, $value); - - $this->connection()->expire($this->prefix.$key, $minutes * 60); + $this->connection()->setex($this->prefix.$key, $minutes * 60, $value); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/RedisTaggedCache.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php index 1d4a042..db93d67 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/Repository.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/Repository.php @@ -4,9 +4,14 @@ use Closure; use DateTime; use ArrayAccess; use Carbon\Carbon; +use Illuminate\Support\Traits\MacroableTrait; class Repository implements ArrayAccess { + use MacroableTrait { + __call as macroCall; + } + /** * The cache store implementation. * @@ -22,13 +27,6 @@ class Repository implements ArrayAccess { protected $default = 60; /** - * An array of registered Cache macros. - * - * @var array - */ - protected $macros = array(); - - /** * Create a new cache repository instance. * * @param \Illuminate\Cache\StoreInterface $store @@ -64,6 +62,22 @@ class Repository implements ArrayAccess { } /** + * Retrieve an item from the cache and delete it. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function pull($key, $default = null) + { + $value = $this->get($key, $default); + + $this->forget($key); + + return $value; + } + + /** * Store an item in the cache. * * @param string $key @@ -239,26 +253,10 @@ class Repository implements ArrayAccess { { if ($duration instanceof DateTime) { - $duration = Carbon::instance($duration); - - return max(0, Carbon::now()->diffInMinutes($duration, false)); - } - else - { - return is_string($duration) ? intval($duration) : $duration; + return max(0, Carbon::instance($duration)->diffInMinutes()); } - } - /** - * Register a macro with the Cache class. - * - * @param string $name - * @param callable $callback - * @return void - */ - public function macro($name, $callback) - { - $this->macros[$name] = $callback; + return is_string($duration) ? intval($duration) : $duration; } /** @@ -270,9 +268,9 @@ class Repository implements ArrayAccess { */ public function __call($method, $parameters) { - if (isset($this->macros[$method])) + if (static::hasMacro($method)) { - return call_user_func_array($this->macros[$method], $parameters); + return $this->macroCall($method, $parameters); } else { diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php b/vendor/laravel/framework/src/Illuminate/Cache/TagSet.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php b/vendor/laravel/framework/src/Illuminate/Cache/TaggableStore.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php b/vendor/laravel/framework/src/Illuminate/Cache/TaggedCache.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cache/composer.json b/vendor/laravel/framework/src/Illuminate/Cache/composer.json index e3d36f2..441833d 100755 --- a/vendor/laravel/framework/src/Illuminate/Cache/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Cache/composer.json @@ -8,16 +8,15 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*", - "nesbot/carbon": "1.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*", + "nesbot/carbon": "~1.0" }, "require-dev": { - "phpunit/phpunit": "4.0.*", - "illuminate/database": "4.1.*", - "illuminate/encryption": "4.1.*", - "illuminate/filesystem": "4.1.*", - "illuminate/redis": "4.1.*" + "illuminate/database": "4.2.*", + "illuminate/encryption": "4.2.*", + "illuminate/filesystem": "4.2.*", + "illuminate/redis": "4.2.*" }, "autoload": { "psr-0": {"Illuminate\\Cache": ""} @@ -25,7 +24,7 @@ "target-dir": "Illuminate/Cache", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Config/EnvironmentVariables.php b/vendor/laravel/framework/src/Illuminate/Config/EnvironmentVariables.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Config/EnvironmentVariablesLoaderInterface.php b/vendor/laravel/framework/src/Illuminate/Config/EnvironmentVariablesLoaderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Config/FileEnvironmentVariablesLoader.php b/vendor/laravel/framework/src/Illuminate/Config/FileEnvironmentVariablesLoader.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Config/composer.json b/vendor/laravel/framework/src/Illuminate/Config/composer.json index 74b9ff0..921e1b6 100755 --- a/vendor/laravel/framework/src/Illuminate/Config/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Config/composer.json @@ -8,12 +8,9 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/filesystem": "4.1.*", - "illuminate/support": "4.1.*" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/filesystem": "4.2.*", + "illuminate/support": "4.2.*" }, "autoload": { "psr-0": {"Illuminate\\Config": ""} @@ -21,7 +18,7 @@ "target-dir": "Illuminate/Config", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Console/Command.php b/vendor/laravel/framework/src/Illuminate/Console/Command.php index 3035343..b8a3446 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/Command.php +++ b/vendor/laravel/framework/src/Illuminate/Console/Command.php @@ -1,9 +1,13 @@ getHelperSet()->get('dialog'); + $helper = $this->getHelperSet()->get('question'); - return $dialog->askConfirmation($this->output, "$question", $default); + $question = new ConfirmationQuestion("{$question} ", $default); + + return $helper->ask($this->input, $this->output, $question); } /** @@ -189,9 +195,30 @@ class Command extends \Symfony\Component\Console\Command\Command { */ public function ask($question, $default = null) { - $dialog = $this->getHelperSet()->get('dialog'); + $helper = $this->getHelperSet()->get('question'); + + $question = new Question("$question", $default); - return $dialog->ask($this->output, "$question", $default); + return $helper->ask($this->input, $this->output, $question); + } + + /** + * Prompt the user for input with auto completion. + * + * @param string $question + * @param array $choices + * @param string $default + * @return string + */ + public function askWithCompletion($question, array $choices, $default = null) + { + $helper = $this->getHelperSet()->get('question'); + + $question = new Question("$question", $default); + + $question->setAutocompleterValues($choices); + + return $helper->ask($this->input, $this->output, $question); } @@ -204,47 +231,71 @@ class Command extends \Symfony\Component\Console\Command\Command { */ public function secret($question, $fallback = true) { - $dialog = $this->getHelperSet()->get('dialog'); + $helper = $this->getHelperSet()->get('question'); + + $question = new Question("$question"); - return $dialog->askHiddenResponse($this->output, "$question", $fallback); + $question->setHidden(true)->setHiddenFallback($fallback); + + return $helper->ask($this->input, $this->output, $question); } /** * Give the user a single choice from an array of answers. * - * @param string $question - * @param array $choices - * @param string $default - * @param mixed $attempts + * @param string $question + * @param array $choices + * @param string $default + * @param bool $multiple + * @param mixed $attempts * @return bool */ - public function choice($question, array $choices, $default = null, $attempts = false) + public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null) + { + $helper = $this->getHelperSet()->get('question'); + + $question = new ChoiceQuestion("$question", $choices, $default); + + $question->setMaxAttempts($attempts)->setMultiselect($multiple); + + return $helper->ask($this->input, $this->output, $question); + } + + /** + * Format input to textual table + * + * @param array $headers + * @param array $rows + * @param string $style + * @return void + */ + public function table(array $headers, array $rows, $style = 'default') { - $dialog = $this->getHelperSet()->get('dialog'); + $table = new Table($this->output); - return $dialog->select($this->output, "$question", $choices, $default, $attempts); + $table->setHeaders($headers)->setRows($rows)->setStyle($style)->render(); } /** - * Write a string as standard output. + * Write a string as information output. * * @param string $string * @return void */ - public function line($string) + public function info($string) { - $this->output->writeln($string); + $this->output->writeln("$string"); } /** - * Write a string as information output. + * Write a string as standard output. * * @param string $string * @return void */ - public function info($string) + public function line($string) { - $this->output->writeln("$string"); + $this->output->writeln($string); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php new file mode 100644 index 0000000..0a5647f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Console/ConfirmableTrait.php @@ -0,0 +1,34 @@ +getLaravel()->environment() == 'production') + { + if ($this->option('force')) return true; + + $this->comment('**************************************'); + $this->comment('* Application In Production! *'); + $this->comment('**************************************'); + $this->output->writeln(''); + + $confirmed = $this->confirm('Do you really wish to run this command?'); + + if ( ! $confirmed) + { + $this->comment('Command Cancelled!'); + + return false; + } + } + + return true; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Console/composer.json b/vendor/laravel/framework/src/Illuminate/Console/composer.json index 1def930..c35c6ce 100755 --- a/vendor/laravel/framework/src/Illuminate/Console/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Console/composer.json @@ -8,11 +8,8 @@ } ], "require": { - "php": ">=5.3.0", - "symfony/console": "2.4.*" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "symfony/console": "2.5.*" }, "autoload": { "psr-0": { @@ -22,7 +19,7 @@ "target-dir": "Illuminate/Console", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Container/composer.json b/vendor/laravel/framework/src/Illuminate/Container/composer.json index 67912c2..a2445f1 100755 --- a/vendor/laravel/framework/src/Illuminate/Container/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Container/composer.json @@ -8,10 +8,7 @@ } ], "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0" }, "autoload": { "psr-0": { @@ -21,7 +18,7 @@ "target-dir": "Illuminate/Container", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php index f5bd7ca..c11f4c8 100755 --- a/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php +++ b/vendor/laravel/framework/src/Illuminate/Cookie/CookieJar.php @@ -121,7 +121,7 @@ class CookieJar { /** * Remove a cookie from the queue. * - * @param $cookieName + * @param string $name */ public function unqueue($name) { diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php b/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php b/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json index 5c6dd26..aa9559d 100755 --- a/vendor/laravel/framework/src/Illuminate/Cookie/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Cookie/composer.json @@ -8,15 +8,11 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/encryption": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/http-kernel": "2.4.*", - "symfony/http-foundation": "2.4.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/encryption": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/http-kernel": "2.5.*", + "symfony/http-foundation": "2.5.*" }, "autoload": { "psr-0": { @@ -26,7 +22,7 @@ "target-dir": "Illuminate/Cookie", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connection.php b/vendor/laravel/framework/src/Illuminate/Database/Connection.php index 7dc8130..d5768d6 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connection.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connection.php @@ -828,7 +828,7 @@ class Connection implements ConnectionInterface { /** * Get the paginator environment instance. * - * @return \Illuminate\Pagination\Environment + * @return \Illuminate\Pagination\Factory */ public function getPaginator() { @@ -843,7 +843,7 @@ class Connection implements ConnectionInterface { /** * Set the pagination environment instance. * - * @param \Illuminate\Pagination\Environment|\Closure $paginator + * @param \Illuminate\Pagination\Factory|\Closure $paginator * @return void */ public function setPaginator($paginator) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php index 8cddc06..9ddf18b 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php @@ -12,13 +12,18 @@ class MySqlConnector extends Connector implements ConnectorInterface { { $dsn = $this->getDsn($config); + $options = $this->getOptions($config); + // We need to grab the PDO options that should be used while making the brand // new connection instance. The PDO options control various aspects of the // connection's behavior, and some might be specified by the developers. - $options = $this->getOptions($config); - $connection = $this->createConnection($dsn, $config, $options); + if (isset($config['unix_socket'])) + { + $connection->exec("use {$config['database']};"); + } + $collation = $config['collation']; // Next we will set the "names" and "collation" on the clients connections so @@ -50,27 +55,35 @@ class MySqlConnector extends Connector implements ConnectorInterface { */ protected function getDsn(array $config) { - // First we will create the basic DSN setup as well as the port if it is in - // in the configuration options. This will give us the basic DSN we will - // need to establish the PDO connections and return them back for use. - extract($config); + return isset($config['unix_socket']) ? $this->getSocketDsn($config) : $this->getHostDsn($config); + } - $dsn = "mysql:host={$host};dbname={$database}"; + /** + * Get the DSN string for a socket configuration. + * + * @param array $config + * @return string + */ + protected function getSocketDsn(array $config) + { + extract($config); - if (isset($config['port'])) - { - $dsn .= ";port={$port}"; - } + return "mysql:unix_socket={$config['unix_socket']};dbname={$database}"; + } - // Sometimes the developer may specify the specific UNIX socket that should - // be used. If that is the case we will add that option to the string we - // have created so that it gets utilized while the connection is made. - if (isset($config['unix_socket'])) - { - $dsn .= ";unix_socket={$config['unix_socket']}"; - } + /** + * Get the DSN string for a host / port configuration. + * + * @param array $config + * @return string + */ + protected function getHostDsn(array $config) + { + extract($config); - return $dsn; + return isset($config['port']) + ? "mysql:host={$host};port={$port};dbname={$database}" + : "mysql:host={$host};dbname={$database}"; } } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php index b9c9533..035192f 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php @@ -1,10 +1,13 @@ confirmToProceed()) return; + $this->prepareDatabase(); // The pretend option can be used for "simulating" the migration and grabbing @@ -77,7 +82,7 @@ class MigrateCommand extends BaseCommand { // a migration and a seed at the same time, as it is only this command. if ($this->input->getOption('seed')) { - $this->call('db:seed'); + $this->call('db:seed', ['--force' => true]); } } @@ -110,6 +115,8 @@ class MigrateCommand extends BaseCommand { array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), + array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), + array('path', null, InputOption::VALUE_OPTIONAL, 'The path to migration files.', null), array('package', null, InputOption::VALUE_OPTIONAL, 'The package to migrate.', null), diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php index f627f84..ad71ae4 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php @@ -1,10 +1,13 @@ confirmToProceed()) return; + $database = $this->input->getOption('database'); $this->call('migrate:reset', array('--database' => $database)); @@ -74,6 +79,8 @@ class RefreshCommand extends Command { return array( array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), + array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), + array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'), array('seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder.'), diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php index 223ee40..f81fa90 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php @@ -1,11 +1,14 @@ confirmToProceed()) return; + $this->migrator->setConnection($this->input->getOption('database')); $pretend = $this->input->getOption('pretend'); @@ -77,6 +82,8 @@ class ResetCommand extends Command { return array( array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), + array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), + array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'), ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php index 8e85488..c11198f 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RollbackCommand.php @@ -1,11 +1,14 @@ confirmToProceed()) return; + $this->migrator->setConnection($this->input->getOption('database')); $pretend = $this->input->getOption('pretend'); @@ -72,6 +77,8 @@ class RollbackCommand extends Command { return array( array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'), + array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), + array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'), ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php index c9197e6..98e0097 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/SeedCommand.php @@ -1,11 +1,14 @@ confirmToProceed()) return; + $this->resolver->setDefaultConnection($this->getDatabase()); $this->getSeeder()->run(); @@ -87,6 +92,8 @@ class SeedCommand extends Command { array('class', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder', 'DatabaseSeeder'), array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to seed'), + + array('force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'), ); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php index f930b8a..3d92ac0 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php @@ -29,6 +29,20 @@ class Builder { protected $eagerLoad = array(); /** + * All of the registered builder macros. + * + * @var array + */ + protected $macros = array(); + + /** + * A replacement for the typical delete function. + * + * @var \Closure + */ + protected $onDelete; + + /** * The methods that should be returned from query builder. * * @var array @@ -237,7 +251,7 @@ class Builder { /** * Get a paginator for a grouped statement. * - * @param \Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Factory $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -252,7 +266,7 @@ class Builder { /** * Get a paginator for an ungrouped statement. * - * @param \Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Factory $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -272,6 +286,29 @@ class Builder { } /** + * Get a paginator only supporting simple next and previous links. + * + * This is more efficient on larger data-sets, etc. + * + * @param \Illuminate\Pagination\Factory $paginator + * @param int $perPage + * @param array $columns + * @return \Illuminate\Pagination\Paginator + */ + public function simplePaginate($perPage = null, $columns = array('*')) + { + $paginator = $this->query->getConnection()->getPaginator(); + + $page = $paginator->getCurrentPage(); + + $perPage = $perPage ?: $this->model->getPerPage(); + + $this->query->skip(($page - 1) * $perPage)->take($perPage + 1); + + return $paginator->make($this->get($columns)->all(), $perPage); + } + + /** * Update a record in the database. * * @param array $values @@ -330,13 +367,13 @@ class Builder { /** * Delete a record from the database. * - * @return int + * @return mixed */ public function delete() { - if ($this->model->isSoftDeleting()) + if (isset($this->onDelete)) { - return $this->softDelete(); + return call_user_func($this->onDelete, $this); } else { @@ -345,21 +382,9 @@ class Builder { } /** - * Soft delete the record in the database. - * - * @return int - */ - protected function softDelete() - { - $column = $this->model->getDeletedAtColumn(); - - return $this->update(array($column => $this->model->freshTimestampString())); - } - - /** - * Force a delete on a set of soft deleted models. + * Run the default delete function on the builder. * - * @return int + * @return mixed */ public function forceDelete() { @@ -367,69 +392,14 @@ class Builder { } /** - * Restore the soft-deleted model instances. + * Register a replacement for the default delete function. * - * @return int - */ - public function restore() - { - if ($this->model->isSoftDeleting()) - { - $column = $this->model->getDeletedAtColumn(); - - return $this->update(array($column => null)); - } - } - - /** - * Include the soft deleted models in the results. - * - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function withTrashed() - { - $column = $this->model->getQualifiedDeletedAtColumn(); - - foreach ((array) $this->query->wheres as $key => $where) - { - // If the where clause is a soft delete date constraint, we will remove it from - // the query and reset the keys on the wheres. This allows this developer to - // include deleted model in a relationship result set that is lazy loaded. - if ($this->isSoftDeleteConstraint($where, $column)) - { - unset($this->query->wheres[$key]); - - $this->query->wheres = array_values($this->query->wheres); - } - } - - return $this; - } - - /** - * Force the result set to only included soft deletes. - * - * @return \Illuminate\Database\Eloquent\Builder|static - */ - public function onlyTrashed() - { - $this->withTrashed(); - - $this->query->whereNotNull($this->model->getQualifiedDeletedAtColumn()); - - return $this; - } - - /** - * Determine if the given where clause is a soft delete constraint. - * - * @param array $where - * @param string $column - * @return bool + * @param \Closure $callback + * @return void */ - protected function isSoftDeleteConstraint(array $where, $column) + public function onDelete(Closure $callback) { - return $where['type'] == 'Null' && $where['column'] == $column; + $this->onDelete = $callback; } /** @@ -521,14 +491,12 @@ class Builder { */ public function getRelation($relation) { - $me = $this; - - // We want to do a relationship query without any constraints so that we will + // We want to run a relationship query without any constrains so that we will // not have to remove these where clauses manually which gets really hacky // and is error prone while we remove the developer's own where clauses. - $query = Relation::noConstraints(function() use ($me, $relation) + $query = Relation::noConstraints(function() use ($relation) { - return $me->getModel()->$relation(); + return $this->getModel()->$relation(); }); $nested = $this->nestedRelations($relation); @@ -595,7 +563,7 @@ class Builder { { if ($column instanceof Closure) { - $query = $this->model->newQuery(false); + $query = $this->model->newQueryWithoutScopes(); call_user_func($column, $query); @@ -735,11 +703,9 @@ class Builder { */ protected function getHasRelationQuery($relation) { - $me = $this; - - return Relation::noConstraints(function() use ($me, $relation) + return Relation::noConstraints(function() use ($relation) { - return $me->getModel()->$relation(); + return $this->getModel()->$relation(); }); } @@ -902,6 +868,29 @@ class Builder { } /** + * Extend the builder with a given callback. + * + * @param string $name + * @param \Closure $callback + * @return void + */ + public function macro($name, Closure $callback) + { + $this->macros[$name] = $callback; + } + + /** + * Get the given macro by name. + * + * @param string $name + * @return \Closure + */ + public function getMacro($name) + { + return array_get($this->macros, $name); + } + + /** * Dynamically handle calls into the query instance. * * @param string $method @@ -910,7 +899,13 @@ class Builder { */ public function __call($method, $parameters) { - if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) + if (isset($this->macros[$method])) + { + array_unshift($parameters, $this); + + return call_user_func_array($this->macros[$method], $parameters); + } + elseif (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { return $this->callScope($scope, $parameters); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php index 2a982cb..2192e93 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php @@ -4,6 +4,7 @@ use DateTime; use ArrayAccess; use Carbon\Carbon; use LogicException; +use JsonSerializable; use Illuminate\Events\Dispatcher; use Illuminate\Database\Eloquent\Relations\Pivot; use Illuminate\Database\Eloquent\Relations\HasOne; @@ -21,7 +22,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasManyThrough; use Illuminate\Database\ConnectionResolverInterface as Resolver; -abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface { +abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterface, JsonSerializable { /** * The connection name for the model. @@ -164,13 +165,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa public $exists = false; /** - * Indicates if the model should soft delete. - * - * @var bool - */ - protected $softDelete = false; - - /** * Indicates whether attributes are snake cased on arrays. * * @var bool @@ -199,6 +193,13 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa protected static $booted = array(); /** + * The array of global scopes on the model. + * + * @var array + */ + protected static $globalScopes = array(); + + /** * Indicates if all mass assignment is enabled. * * @var bool @@ -234,13 +235,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa const UPDATED_AT = 'updated_at'; /** - * The name of the "deleted at" column. - * - * @var string - */ - const DELETED_AT = 'deleted_at'; - - /** * Create a new Eloquent model instance. * * @param array $attributes @@ -297,6 +291,70 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa static::$mutatorCache[$class][] = lcfirst($matches[1]); } } + + static::bootTraits(); + } + + /** + * Boot all of the bootable traits on the model. + * + * @return void + */ + protected static function bootTraits() + { + foreach (class_uses(get_called_class()) as $trait) + { + if (method_exists(get_called_class(), $method = 'boot'.class_basename($trait))) + { + forward_static_call([get_called_class(), $method]); + } + } + } + + /** + * Register a new global scope on the model. + * + * @param \Illuminate\Database\Eloquent\ScopeInterface $scope + * @return void + */ + public static function addGlobalScope(ScopeInterface $scope) + { + static::$globalScopes[get_called_class()][get_class($scope)] = $scope; + } + + /** + * Determine if a model has a global scope. + * + * @param \Illuminate\Database\Eloquent\ScopeInterface $scope + * @return bool + */ + public static function hasGlobalScope($scope) + { + return ! is_null(static::getGlobalScope($scope)); + } + + /** + * Get a global scope registered with the modal. + * + * @param \Illuminate\Database\Eloquent\ScopeInterface $scope + * @return \Illuminate\Database\Eloquent\ScopeInterface|null + */ + public static function getGlobalScope($scope) + { + return array_first(static::$globalScopes[get_called_class()], function($key, $value) use ($scope) + { + return $scope instanceof $value; + }); + } + + /** + * Get the global scopes for this class instance. + * + * @return array + */ + public function getGlobalScopes() + { + return array_get(static::$globalScopes, get_class($this), []); } /** @@ -1043,73 +1101,13 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Force a hard delete on a soft deleted model. - * - * @return void - */ - public function forceDelete() - { - $softDelete = $this->softDelete; - - // We will temporarily disable false delete to allow us to perform the real - // delete operation against the model. We will then restore the deleting - // state to what this was prior to this given hard deleting operation. - $this->softDelete = false; - - $this->delete(); - - $this->softDelete = $softDelete; - } - - /** * Perform the actual delete query on this model instance. * * @return void */ protected function performDeleteOnModel() { - $query = $this->newQuery()->where($this->getKeyName(), $this->getKey()); - - if ($this->softDelete) - { - $this->{static::DELETED_AT} = $time = $this->freshTimestamp(); - - $query->update(array(static::DELETED_AT => $this->fromDateTime($time))); - } - else - { - $query->delete(); - } - } - - /** - * Restore a soft-deleted model instance. - * - * @return bool|null - */ - public function restore() - { - if ($this->softDelete) - { - // If the restoring event does not return false, we will proceed with this - // restore operation. Otherwise, we bail out so the developer will stop - // the restore totally. We will clear the deleted timestamp and save. - if ($this->fireModelEvent('restoring') === false) - { - return false; - } - - $this->{static::DELETED_AT} = null; - - // Once we have saved the model, we will fire the "restored" event so this - // developer will do anything they need to after a restore operation is - // totally finished. Then we will return the result of the save call. - $result = $this->save(); - - $this->fireModelEvent('restored', false); - - return $result; - } + $this->newQuery()->where($this->getKeyName(), $this->getKey())->delete(); } /** @@ -1201,28 +1199,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Register a restoring model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - */ - public static function restoring($callback) - { - static::registerModelEvent('restoring', $callback); - } - - /** - * Register a restored model event with the dispatcher. - * - * @param \Closure|string $callback - * @return void - */ - public static function restored($callback) - { - static::registerModelEvent('restored', $callback); - } - - /** * Remove all of the event listeners for the model. * * @return void @@ -1364,7 +1340,7 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa */ public function save(array $options = array()) { - $query = $this->newQueryWithDeleted(); + $query = $this->newQueryWithoutScopes(); // If the "saving" event returns false we'll bail out of the save and return // false, indicating that the save failed. This gives an opportunities to @@ -1664,26 +1640,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Get the name of the "deleted at" column. - * - * @return string - */ - public function getDeletedAtColumn() - { - return static::DELETED_AT; - } - - /** - * Get the fully qualified "deleted at" column. - * - * @return string - */ - public function getQualifiedDeletedAtColumn() - { - return $this->getTable().'.'.$this->getDeletedAtColumn(); - } - - /** * Get a fresh timestamp for the model. * * @return \Carbon\Carbon @@ -1706,79 +1662,86 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa /** * Get a new query builder for the model's table. * - * @param bool $excludeDeleted * @return \Illuminate\Database\Eloquent\Builder|static */ - public function newQuery($excludeDeleted = true) + public function newQuery() { - $builder = $this->newEloquentBuilder($this->newBaseQueryBuilder()); + $builder = $this->newEloquentBuilder( + $this->newBaseQueryBuilder() + ); // Once we have the query builders, we will set the model instances so the // builder can easily access any information it may need from the model // while it is constructing and executing various queries against it. $builder->setModel($this)->with($this->with); - if ($excludeDeleted && $this->softDelete) - { - $builder->whereNull($this->getQualifiedDeletedAtColumn()); - } - - return $builder; + return $this->applyGlobalScopes($builder); } /** - * Get a new query builder that includes soft deletes. + * Get a new query instance without a given scope. * - * @return \Illuminate\Database\Eloquent\Builder|static + * @param \Illuminate\Database\Eloquent\ScopeInterface $scope + * @return \Illuminate\Database\Eloquent\Builder */ - public function newQueryWithDeleted() + public function newQueryWithoutScope($scope) { - return $this->newQuery(false); + $this->getGlobalScope($scope)->remove($builder = $this->newQuery(), $this); + + return $builder; } /** - * Create a new Eloquent query builder for the model. + * Get a new query builder that doesn't have any global scopes. * - * @param \Illuminate\Database\Query\Builder $query * @return \Illuminate\Database\Eloquent\Builder|static */ - public function newEloquentBuilder($query) + public function newQueryWithoutScopes() { - return new Builder($query); + return $this->removeGlobalScopes($this->newQuery()); } /** - * Determine if the model instance has been soft-deleted. + * Apply all of the global scopes to an Eloquent builder. * - * @return bool + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return \Illuminate\Database\Eloquent\Builder */ - public function trashed() + public function applyGlobalScopes($builder) { - return $this->softDelete && ! is_null($this->{static::DELETED_AT}); + foreach ($this->getGlobalScopes() as $scope) + { + $scope->apply($builder, $this); + } + + return $builder; } /** - * Get a new query builder that includes soft deletes. + * Remove all of the global scopes from an Eloquent builder. * - * @return \Illuminate\Database\Eloquent\Builder|static + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void */ - public static function withTrashed() + public function removeGlobalScopes($builder) { - return with(new static)->newQueryWithDeleted(); + foreach ($this->getGlobalScopes() as $scope) + { + $scope->remove($builder, $this); + } + + return $builder; } /** - * Get a new query builder that only includes soft deletes. + * Create a new Eloquent query builder for the model. * + * @param \Illuminate\Database\Query\Builder $query * @return \Illuminate\Database\Eloquent\Builder|static */ - public static function onlyTrashed() + public function newEloquentBuilder($query) { - $instance = new static; - - $column = $instance->getQualifiedDeletedAtColumn(); - - return $instance->newQueryWithDeleted()->whereNotNull($column); + return new Builder($query); } /** @@ -1884,27 +1847,6 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Determine if the model instance uses soft deletes. - * - * @return bool - */ - public function isSoftDeleting() - { - return $this->softDelete; - } - - /** - * Set the soft deleting property on the model. - * - * @param bool $enabled - * @return void - */ - public function setSoftDeleting($enabled) - { - $this->softDelete = $enabled; - } - - /** * Get the polymorphic relationship columns. * * @param string $name @@ -2180,6 +2122,16 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** * Convert the model instance to an array. * * @return array @@ -2508,7 +2460,7 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa */ public function getDates() { - $defaults = array(static::CREATED_AT, static::UPDATED_AT, static::DELETED_AT); + $defaults = array(static::CREATED_AT, static::UPDATED_AT); return array_merge($this->dates, $defaults); } @@ -2668,14 +2620,23 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa } /** - * Determine if a given attribute is dirty. + * Determine if the model or a given attribute has been modified. * - * @param string $attribute + * @param string|null $attribute * @return bool */ - public function isDirty($attribute) + public function isDirty($attribute = null) { - return array_key_exists($attribute, $this->getDirty()); + $dirty = $this->getDirty(); + + if (is_null($attribute)) + { + return count($dirty) > 0; + } + else + { + return array_key_exists($attribute, $dirty); + } } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php index c3b0ba7..accd8e2 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php @@ -189,16 +189,12 @@ abstract class HasOneOrMany extends Relation { */ public function create(array $attributes) { - $foreign = array( - $this->getPlainForeignKey() => $this->getParentKey(), - ); - // Here we will set the raw attributes to avoid hitting the "fill" method so // that we do not have to worry about a mass accessor rules blocking sets // on the models. Otherwise, some of these attributes will not get set. - $instance = $this->related->newInstance(); + $instance = $this->related->newInstance($attributes); - $instance->setRawAttributes(array_merge($attributes, $foreign)); + $instance->setAttribute($this->getPlainForeignKey(), $this->getParentKey()); $instance->save(); diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphPivot.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php old mode 100755 new mode 100644 index 122d478..f68b122 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphTo.php @@ -28,6 +28,13 @@ class MorphTo extends BelongsTo { */ protected $dictionary = array(); + /* + * Indicates if soft-deleted model instances should be fetched. + * + * @var bool + */ + protected $withTrashed = false; + /** * Create a new belongs to relationship instance. * @@ -150,6 +157,11 @@ class MorphTo extends BelongsTo { { $instance = $this->createModelByType($type); + if ($this->withTrashed && $instance->newQuery()->getMacro('withTrashed') !== null) + { + $instance = $instance->withTrashed(); + } + $key = $instance->getKeyName(); return $instance->whereIn($key, $this->gatherKeysByType($type)->all())->get(); @@ -193,4 +205,16 @@ class MorphTo extends BelongsTo { return $this->dictionary; } + /** + * Fetch soft-deleted model instances with query + * + * @return MorphTo + */ + public function withTrashed() + { + $this->withTrashed = true; + + return $this; + } + } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/MorphToMany.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php index 9739ddd..47165f5 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php @@ -116,16 +116,6 @@ abstract class Relation { } /** - * Restore all of the soft deleted related models. - * - * @return int - */ - public function restore() - { - return $this->query->withTrashed()->restore(); - } - - /** * Run a raw update against the base query. * * @param array $attributes @@ -181,11 +171,11 @@ abstract class Relation { */ protected function getKeys(array $models, $key = null) { - return array_values(array_map(function($value) use ($key) + return array_unique(array_values(array_map(function($value) use ($key) { return $key ? $value->getAttribute($key) : $value->getKey(); - }, $models)); + }, $models))); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ScopeInterface.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ScopeInterface.php new file mode 100644 index 0000000..b0a93a9 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/ScopeInterface.php @@ -0,0 +1,21 @@ +getModel(); + + $builder->whereNull($model->getQualifiedDeletedAtColumn()); + + $this->extend($builder); + } + + /** + * Remove the scope from the given Eloquent query builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + public function remove(Builder $builder) + { + $column = $builder->getModel()->getQualifiedDeletedAtColumn(); + + $query = $builder->getQuery(); + + foreach ((array) $query->wheres as $key => $where) + { + // If the where clause is a soft delete date constraint, we will remove it from + // the query and reset the keys on the wheres. This allows this developer to + // include deleted model in a relationship result set that is lazy loaded. + if ($this->isSoftDeleteConstraint($where, $column)) + { + unset($query->wheres[$key]); + + $query->wheres = array_values($query->wheres); + } + } + } + + /** + * Extend the query builder with the needed functions. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + public function extend(Builder $builder) + { + foreach ($this->extensions as $extension) + { + $this->{"add{$extension}"}($builder); + } + + $builder->onDelete(function(Builder $builder) + { + $column = $builder->getModel()->getDeletedAtColumn(); + + return $builder->update(array( + $column => $builder->getModel()->freshTimestampString() + )); + }); + } + + /** + * Add the force delete extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addForceDelete(Builder $builder) + { + $builder->macro('forceDelete', function(Builder $builder) + { + return $builder->getQuery()->delete(); + }); + } + + /** + * Add the restore extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addRestore(Builder $builder) + { + $builder->macro('restore', function(Builder $builder) + { + $builder->withTrashed(); + + return $builder->update(array($builder->getModel()->getDeletedAtColumn() => null)); + }); + } + + /** + * Add the with-trashed extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addWithTrashed(Builder $builder) + { + $builder->macro('withTrashed', function(Builder $builder) + { + $this->remove($builder); + + return $builder; + }); + } + + /** + * Add the only-trashed extension to the builder. + * + * @param \Illuminate\Database\Eloquent\Builder $builder + * @return void + */ + protected function addOnlyTrashed(Builder $builder) + { + $builder->macro('onlyTrashed', function(Builder $builder) + { + $this->remove($builder); + + $builder->getQuery()->whereNotNull($builder->getModel()->getQualifiedDeletedAtColumn()); + + return $builder; + }); + } + + /** + * Determine if the given where clause is a soft delete constraint. + * + * @param array $where + * @param string $column + * @return bool + */ + protected function isSoftDeleteConstraint(array $where, $column) + { + return $where['type'] == 'Null' && $where['column'] == $column; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingTrait.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingTrait.php new file mode 100644 index 0000000..639a1c4 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/SoftDeletingTrait.php @@ -0,0 +1,170 @@ +forceDeleting = true; + + $this->delete(); + + $this->forceDeleting = false; + } + + /** + * Perform the actual delete query on this model instance. + * + * @return void + */ + protected function performDeleteOnModel() + { + if ($this->forceDeleting) + { + $this->withTrashed()->where($this->getKeyName(), $this->getKey())->forceDelete(); + } + else + { + return $this->runSoftDelete(); + } + } + + /** + * Perform the actual delete query on this model instance. + * + * @return void + */ + protected function runSoftDelete() + { + $query = $this->newQuery()->where($this->getKeyName(), $this->getKey()); + + $this->{$this->getDeletedAtColumn()} = $time = $this->freshTimestamp(); + + $query->update(array($this->getDeletedAtColumn() => $this->fromDateTime($time))); + } + + /** + * Restore a soft-deleted model instance. + * + * @return bool|null + */ + public function restore() + { + // If the restoring event does not return false, we will proceed with this + // restore operation. Otherwise, we bail out so the developer will stop + // the restore totally. We will clear the deleted timestamp and save. + if ($this->fireModelEvent('restoring') === false) + { + return false; + } + + $this->{$this->getDeletedAtColumn()} = null; + + // Once we have saved the model, we will fire the "restored" event so this + // developer will do anything they need to after a restore operation is + // totally finished. Then we will return the result of the save call. + $result = $this->save(); + + $this->fireModelEvent('restored', false); + + return $result; + } + + /** + * Determine if the model instance has been soft-deleted. + * + * @return bool + */ + public function trashed() + { + return ! is_null($this->{$this->getDeletedAtColumn()}); + } + + /** + * Get a new query builder that includes soft deletes. + * + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public static function withTrashed() + { + return with(new static)->newQueryWithoutScope(new SoftDeletingScope); + } + + /** + * Get a new query builder that only includes soft deletes. + * + * @return \Illuminate\Database\Eloquent\Builder|static + */ + public static function onlyTrashed() + { + $instance = new static; + + $column = $instance->getQualifiedDeletedAtColumn(); + + return $instance->newQueryWithoutScope(new SoftDeletingScope)->whereNotNull($column); + } + + /** + * Register a restoring model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function restoring($callback) + { + static::registerModelEvent('restoring', $callback); + } + + /** + * Register a restored model event with the dispatcher. + * + * @param \Closure|string $callback + * @return void + */ + public static function restored($callback) + { + static::registerModelEvent('restored', $callback); + } + + /** + * Get the name of the "deleted at" column. + * + * @return string + */ + public function getDeletedAtColumn() + { + return 'deleted_at'; + } + + /** + * Get the fully qualified "deleted at" column. + * + * @return string + */ + public function getQualifiedDeletedAtColumn() + { + return $this->getTable().'.'.$this->getDeletedAtColumn(); + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php index 3a1ecb5..d4ae5c4 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php @@ -321,11 +321,12 @@ class Migrator { /** * Resolve the database connection instance. * + * @param string $connection * @return \Illuminate\Database\Connection */ - public function resolveConnection() + public function resolveConnection($connection) { - return $this->resolver->connection($this->connection); + return $this->resolver->connection($connection); } /** @@ -376,4 +377,4 @@ class Migrator { return $this->files; } -} +} \ No newline at end of file diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php index 66a9365..f582a2f 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -34,7 +34,13 @@ class Builder { * * @var array */ - protected $bindings = array(); + protected $bindings = array( + 'select' => [], + 'join' => [], + 'where' => [], + 'having' => [], + 'order' => [], + ); /** * An aggregate function and column to be run. @@ -171,6 +177,7 @@ class Builder { '=', '<', '>', '<=', '>=', '<>', '!=', 'like', 'not like', 'between', 'ilike', '&', '|', '^', '<<', '>>', + 'rlike', 'regexp', 'not regexp', ); /** @@ -398,7 +405,7 @@ class Builder { if ( ! $value instanceof Expression) { - $this->bindings[] = $value; + $this->addBinding($value, 'where'); } return $this; @@ -445,7 +452,7 @@ class Builder { $this->wheres[] = compact('type', 'sql', 'boolean'); - $this->bindings = array_merge($this->bindings, $bindings); + $this->addBinding($bindings, 'where'); return $this; } @@ -477,7 +484,7 @@ class Builder { $this->wheres[] = compact('column', 'type', 'boolean', 'not'); - $this->bindings = array_merge($this->bindings, $values); + $this->addBinding($values, 'where'); return $this; } @@ -672,7 +679,7 @@ class Builder { $this->wheres[] = compact('type', 'column', 'values', 'boolean'); - $this->bindings = array_merge($this->bindings, $values); + $this->addBinding($values, 'where'); return $this; } @@ -846,7 +853,7 @@ class Builder { { $this->wheres[] = compact('column', 'type', 'boolean', 'operator', 'value'); - $this->bindings[] = $value; + $this->addBinding($value, 'where'); return $this; } @@ -933,20 +940,34 @@ class Builder { * @param string $column * @param string $operator * @param string $value + * @param string $boolean * @return \Illuminate\Database\Query\Builder|static */ - public function having($column, $operator = null, $value = null) + public function having($column, $operator = null, $value = null, $boolean = 'and') { $type = 'basic'; - $this->havings[] = compact('type', 'column', 'operator', 'value'); + $this->havings[] = compact('type', 'column', 'operator', 'value', 'boolean'); - $this->bindings[] = $value; + $this->addBinding($value, 'having'); return $this; } /** + * Add a "or having" clause to the query. + * + * @param string $column + * @param string $operator + * @param string $value + * @return \Illuminate\Database\Query\Builder|static + */ + public function orHaving($column, $operator = null, $value = null) + { + return $this->having($column, $operator, $value, 'or'); + } + + /** * Add a raw having clause to the query. * * @param string $sql @@ -960,7 +981,7 @@ class Builder { $this->havings[] = compact('type', 'sql', 'boolean'); - $this->bindings = array_merge($this->bindings, $bindings); + $this->addBinding($bindings, 'having'); return $this; } @@ -1028,7 +1049,7 @@ class Builder { $this->orders[] = compact('type', 'sql'); - $this->bindings = array_merge($this->bindings, $bindings); + $this->addBinding($bindings, 'order'); return $this; } @@ -1288,7 +1309,7 @@ class Builder { */ protected function runSelect() { - return $this->connection->select($this->toSql(), $this->bindings); + return $this->connection->select($this->toSql(), $this->getBindings()); } /** @@ -1364,7 +1385,7 @@ class Builder { { $name = $this->connection->getName(); - return md5($name.$this->toSql().serialize($this->bindings)); + return md5($name.$this->toSql().serialize($this->getBindings())); } /** @@ -1375,9 +1396,7 @@ class Builder { */ protected function getCacheCallback($columns) { - $me = $this; - - return function() use ($me, $columns) { return $me->getFresh($columns); }; + return function() use ($columns) { return $this->getFresh($columns); }; } /** @@ -1495,7 +1514,7 @@ class Builder { /** * Create a paginator for a grouped pagination statement. * - * @param \Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Factory $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -1510,7 +1529,7 @@ class Builder { /** * Build a paginator instance from a raw result array. * - * @param \Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Factory $paginator * @param array $results * @param int $perPage * @return \Illuminate\Pagination\Paginator @@ -1530,7 +1549,7 @@ class Builder { /** * Create a paginator for an un-grouped pagination statement. * - * @param \Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Factory $paginator * @param int $perPage * @param array $columns * @return \Illuminate\Pagination\Paginator @@ -1569,6 +1588,28 @@ class Builder { } /** + * Get a paginator only supporting simple next and previous links. + * + * This is more efficient on larger data-sets, etc. + * + * @param int $perPage + * @param array $columns + * @return \Illuminate\Pagination\Paginator + */ + public function simplePaginate($perPage = null, $columns = array('*')) + { + $paginator = $this->connection->getPaginator(); + + $page = $paginator->getCurrentPage(); + + $perPage = $perPage ?: $this->model->getPerPage(); + + $this->skip(($page - 1) * $perPage)->take($perPage + 1); + + return $paginator->make($this->get($columns), $perPage); + } + + /** * Backup certain fields for a pagination count. * * @return void @@ -1772,7 +1813,7 @@ class Builder { */ public function update(array $values) { - $bindings = array_values(array_merge($values, $this->bindings)); + $bindings = array_values(array_merge($values, $this->getBindings())); $sql = $this->grammar->compileUpdate($this, $values); @@ -1828,7 +1869,7 @@ class Builder { $sql = $this->grammar->compileDelete($this); - return $this->connection->delete($sql, $this->bindings); + return $this->connection->delete($sql, $this->getBindings()); } /** @@ -1865,7 +1906,7 @@ class Builder { { $this->wheres = array_merge((array) $this->wheres, (array) $wheres); - $this->bindings = array_values(array_merge($this->bindings, (array) $bindings)); + $this->bindings['where'] = array_values(array_merge($this->bindings['where'], (array) $bindings)); } /** @@ -1894,24 +1935,40 @@ class Builder { } /** - * Get the current query value bindings. + * Get the current query value bindings in a flattened array. * * @return array */ public function getBindings() { + return array_flatten($this->bindings); + } + + /** + * Get the raw array of bindings. + * + * @return array + */ + public function getRawBindings() + { return $this->bindings; } /** * Set the bindings on the query builder. * - * @param array $bindings + * @param array $bindings + * @param string $type * @return \Illuminate\Database\Query\Builder */ - public function setBindings(array $bindings) + public function setBindings(array $bindings, $type = 'where') { - $this->bindings = $bindings; + if ( ! array_key_exists($type, $this->bindings)) + { + throw new \InvalidArgumentException("Invalid binding type: {$type}."); + } + + $this->bindings[$type] = $bindings; return $this; } @@ -1919,12 +1976,25 @@ class Builder { /** * Add a binding to the query. * - * @param mixed $value + * @param mixed $value + * @param string $type * @return \Illuminate\Database\Query\Builder */ - public function addBinding($value) + public function addBinding($value, $type = 'where') { - $this->bindings[] = $value; + if ( ! array_key_exists($type, $this->bindings)) + { + throw new \InvalidArgumentException("Invalid binding type: {$type}."); + } + + if (is_array($value)) + { + $this->bindings[$type] = array_values(array_merge($this->bindings[$type], $value)); + } + else + { + $this->bindings[$type][] = $value; + } return $this; } @@ -1937,7 +2007,7 @@ class Builder { */ public function mergeBindings(Builder $query) { - $this->bindings = array_values(array_merge($this->bindings, $query->bindings)); + $this->bindings = array_merge_recursive($this->bindings, $query->bindings); return $this; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php index 2b7d36f..5fe0931 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php @@ -490,7 +490,7 @@ class Grammar extends BaseGrammar { $parameter = $this->parameter($having['value']); - return 'and '.$column.' '.$having['operator'].' '.$parameter; + return $having['boolean'].' '.$column.' '.$having['operator'].' '.$parameter; } /** @@ -502,13 +502,11 @@ class Grammar extends BaseGrammar { */ protected function compileOrders(Builder $query, $orders) { - $me = $this; - - return 'order by '.implode(', ', array_map(function($order) use ($me) + return 'order by '.implode(', ', array_map(function($order) { if (isset($order['sql'])) return $order['sql']; - return $me->wrap($order['column']).' '.$order['direction']; + return $this->wrap($order['column']).' '.$order['direction']; } , $orders)); } @@ -661,7 +659,6 @@ class Grammar extends BaseGrammar { * Compile a delete statement into SQL. * * @param \Illuminate\Database\Query\Builder $query - * @param array $values * @return string */ public function compileDelete(Builder $query) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php index d2f7419..76b84c8 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/JoinClause.php @@ -59,7 +59,7 @@ class JoinClause { { $this->clauses[] = compact('first', 'operator', 'second', 'boolean', 'where'); - if ($where) $this->query->addBinding($second); + if ($where) $this->query->addBinding($second, 'join'); return $this; } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/MySqlProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/SQLiteProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/QueryException.php b/vendor/laravel/framework/src/Illuminate/Database/QueryException.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php index 9a6ffeb..836d013 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php @@ -526,7 +526,6 @@ class Blueprint { * @param int|null $total * @param int|null $places * @return \Illuminate\Support\Fluent - * */ public function double($column, $total = null, $places = null) { @@ -669,6 +668,8 @@ class Blueprint { $this->unsignedInteger("{$name}_id"); $this->string("{$name}_type"); + + $this->index(array("{$name}_id", "{$name}_type")); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index de6d8da..84a5088 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -91,7 +91,7 @@ class MySqlGrammar extends Grammar { } /** - * Compile a create table command. + * Compile an add column command. * * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param \Illuminate\Support\Fluent $command diff --git a/vendor/laravel/framework/src/Illuminate/Database/composer.json b/vendor/laravel/framework/src/Illuminate/Database/composer.json index 372efb5..fa4bd4b 100755 --- a/vendor/laravel/framework/src/Illuminate/Database/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Database/composer.json @@ -9,20 +9,18 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/container": "4.1.*", - "illuminate/events": "4.1.*", - "illuminate/support": "4.1.*", - "nesbot/carbon": "1.*" + "php": ">=5.4.0", + "illuminate/container": "4.2.*", + "illuminate/events": "4.2.*", + "illuminate/support": "4.2.*", + "nesbot/carbon": "~1.0" }, "require-dev": { - "illuminate/cache": "4.1.*", - "illuminate/console": "4.1.*", - "illuminate/filesystem": "4.1.*", - "illuminate/pagination": "4.1.*", - "illuminate/support": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/cache": "4.2.*", + "illuminate/console": "4.2.*", + "illuminate/filesystem": "4.2.*", + "illuminate/pagination": "4.2.*", + "illuminate/support": "4.2.*" }, "autoload": { "psr-0": { @@ -32,7 +30,7 @@ "target-dir": "Illuminate/Database", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php index c59c016..d9ce6bd 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php +++ b/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php @@ -19,21 +19,21 @@ class Encrypter { * * @var string */ - protected $cipher = 'rijndael-256'; + protected $cipher = MCRYPT_RIJNDAEL_128; /** * The mode used for encryption. * * @var string */ - protected $mode = 'cbc'; + protected $mode = MCRYPT_MODE_CBC; /** * The block size of the cipher. * * @var int */ - protected $block = 32; + protected $block = 16; /** * Create a new encrypter instance. @@ -264,6 +264,8 @@ class Encrypter { public function setCipher($cipher) { $this->cipher = $cipher; + + $this->updateBlockSize(); } /** @@ -275,6 +277,18 @@ class Encrypter { public function setMode($mode) { $this->mode = $mode; + + $this->updateBlockSize(); + } + + /** + * Update the block size for the current cipher and mode. + * + * @return void + */ + protected function updateBlockSize() + { + $this->block = mcrypt_get_iv_size($this->cipher, $this->mode); } } diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php index ed0befa..e7e9421 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php @@ -13,7 +13,14 @@ class EncryptionServiceProvider extends ServiceProvider { { $this->app->bindShared('encrypter', function($app) { - return new Encrypter($app['config']['app.key']); + $encrypter = new Encrypter($app['config']['app.key']); + + if ($app['config']->has('app.cipher')) + { + $encrypter->setCipher($app['config']['app.cipher']); + } + + return $encrypter; }); } diff --git a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json index c230952..1a2d473 100755 --- a/vendor/laravel/framework/src/Illuminate/Encryption/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Encryption/composer.json @@ -8,12 +8,9 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*", - "symfony/security-core": "2.4.*" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*", + "symfony/security-core": "2.5.*" }, "autoload": { "psr-0": { @@ -23,7 +20,7 @@ "target-dir": "Illuminate/Encryption", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php index 1f9a803..ba62fa6 100755 --- a/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php +++ b/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php @@ -105,11 +105,9 @@ class Dispatcher { */ public function queue($event, $payload = array()) { - $me = $this; - - $this->listen($event.'_queue', function() use ($me, $event, $payload) + $this->listen($event.'_queue', function() use ($event, $payload) { - $me->fire($event, $payload); + $this->fire($event, $payload); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Events/composer.json b/vendor/laravel/framework/src/Illuminate/Events/composer.json index 06325a3..343a0b9 100755 --- a/vendor/laravel/framework/src/Illuminate/Events/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Events/composer.json @@ -8,13 +8,9 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/container": "4.1.*", - "illuminate/support": "4.1.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/container": "4.2.*", + "illuminate/support": "4.2.*" }, "autoload": { "psr-0": { @@ -24,7 +20,7 @@ "target-dir": "Illuminate/Events", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php index deb1df0..774f98e 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Exception/ExceptionServiceProvider.php @@ -151,18 +151,16 @@ class ExceptionServiceProvider extends ServiceProvider { */ protected function registerPrettyWhoopsHandler() { - $me = $this; - - $this->app['whoops.handler'] = $this->app->share(function() use ($me) + $this->app['whoops.handler'] = $this->app->share(function() { with($handler = new PrettyPageHandler)->setEditor('sublime'); // If the resource path exists, we will register the resource path with Whoops // so our custom Laravel branded exception pages will be used when they are // displayed back to the developer. Otherwise, the default pages are run. - if ( ! is_null($path = $me->resourcePath())) + if ( ! is_null($path = $this->resourcePath())) { - $handler->setResourcesPath($path); + $handler->addResourcePath($path); } return $handler; diff --git a/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php b/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php index 9bc45c7..e012ef6 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php +++ b/vendor/laravel/framework/src/Illuminate/Exception/SymfonyDisplayer.php @@ -27,10 +27,11 @@ class SymfonyDisplayer implements ExceptionDisplayerInterface { * Display the given exception to the user. * * @param \Exception $exception + * @return \Symfony\Component\HttpFoundation\Response */ public function display(Exception $exception) { - $this->symfony->handle($exception); + return $this->symfony->createResponse($exception); } } diff --git a/vendor/laravel/framework/src/Illuminate/Exception/composer.json b/vendor/laravel/framework/src/Illuminate/Exception/composer.json index 32c5e02..5bdf6f8 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Exception/composer.json @@ -8,16 +8,14 @@ } ], "require": { - "php": ">=5.3.0", - "filp/whoops": "1.0.10", - "illuminate/support": "4.1.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*" + "php": ">=5.4.0", + "filp/whoops": "1.1.*", + "illuminate/support": "4.2.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*" }, "require-dev": { - "monolog/monolog": "1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "monolog/monolog": "~1.6" }, "autoload": { "psr-0": { @@ -27,7 +25,7 @@ "target-dir": "Illuminate/Exception", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/css/whoops.base.css b/vendor/laravel/framework/src/Illuminate/Exception/resources/css/whoops.base.css new file mode 100755 index 0000000..3b1818e --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Exception/resources/css/whoops.base.css @@ -0,0 +1,310 @@ +.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} +body { + font: 14px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + color: #2B2B2B; + background-color: #e7e7e7; + padding:0; + margin: 0; + max-height: 100%; +} + a { + text-decoration: none; + color: #FE8A59; + } + +.container{ + height: 100%; + width: 100%; + position: fixed; + margin: 0; + padding: 0; + left: 0; + top: 0; +} + +.branding { + position: absolute; + top: 10px; + right: 20px; + color: #777777; + font-size: 10px; + z-index: 100; +} + .branding a { + color: #CD3F3F; + } + +header { + padding: 20px 20px; + color: #555; + background: #ddd; + box-sizing: border-box; + border-left: 5px solid #ED3D1A; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAACWCAYAAADaDe2PAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBNTk1RDY3OTlBRkQxMUUyOUM0M0EzNzM1OTdBRTY0NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBNTk1RDY3QTlBRkQxMUUyOUM0M0EzNzM1OTdBRTY0NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE1OTVENjc3OUFGRDExRTI5QzQzQTM3MzU5N0FFNjQ3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE1OTVENjc4OUFGRDExRTI5QzQzQTM3MzU5N0FFNjQ3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+GLAjkgAAEaxJREFUeNrsXet22zYTXFHUXXZT93nyo0/eH3mfpI5lybpQrPAd7GeEEYGFRBEXzpyjY7eRbYrEDmYHi8WormuS4O+vX+nBGOmvhf5+ZHxvfi2M/+b3K5wvr+ry2l1eBwKAiPDPt2/RX2PZY3C3BXTz68j4WR8U+vPMLq/N5bXFEASAx5BB28x9LbjN7+nG4L4Ha60OTnjEAOBJBpc0YHz5Mr4S4M0gDxHct+D58vpxedV4zAAgIIMLCYz0TDpPJMh9iG55eb3jMQOALM9WRLDIjAgYK3qsLwIAWc2ek0ivrdavc+Nr1fhvRWRTy+950ukCAAAOMhgFDvDm6xoB2KDI4cXy7xOdAn3gcQOAnQxUMI0fHODnK+/rCicd6HPLe1QqtCeYiQBgJYODQ2YzjkZAXZvFQwaaMglnFpWjvBGYiQBgQeExYyrSUIU8O/0zRz0rnyn8jKvUzcbxnuWdCggA8iaDf759q0hWvhv70uNOE1QbeAkVAIAWZUAkK90dO/LyGOBSBzP9AgCghQyOjlnVlNoxqwP1GVyrBmvKs6YCAO4nA72jKhd1oEzC2vEZlnj0AHBdGSgoU1CysWcV+cxakXvVAJWJANBGBh7qQP3MIvLPpczEs+M9T3j8AHBdGbA6qDLwDlSa4DITVWUizEQAuEYGF3VQ61lV8nOxewfKSHSZorGnPAAQTBmwOpAUEc0T+HwudVAmkPIAQBgy0EVIkk09Kcjso0DpwEwEgBZlQMJUgb2D2KFWFmxmIioTAaCNDC7q4KTThRzUwZncS41TgpkIgAxaIe0unII6UErHVUOBykQAZNCiDqQlyhOSbYEODRe5oTIRABk48m0JUsi5lSnq2p25ImxzBkAGV3EQqoMykZx7I3gPzEQAZHAlVcjNOziRe6VklkjaAwC9KgNWB5INTKl4B66lRlYHMBMBkEFDHdQk7yycQlWiZKkRlYkAyKAFigykJcopVPO5WqQpoDIRABlcUQdnklclrhL57G+Of0dlIgAysMymEnUwS2RGlVRZojIRABlcQUWyEmWFVIp3JHUUKwwTAGTwO6TLjMo7SKF45yT4TDATAZDBjdKakUq+/U7u7k5rQmViyhhpUp/qV4Fbcn3W88VWmEezd3CK/B7UmhCeHYNJEcIrhkz0QT/Wr7Lx1awb4eXlHW7ZfWSgluSk5zMq7+BnAvfhQ6cCEwe5TUl2+hTw+KAvrgT8WDjrq/c86Z97w+28nQxYHUjIYC6U4TFADYoXQbrwg3Cac99BzwHvG/QuLIxnDzK48ed4A9PEgxBiB+9bWDju14LkRiogQ2G8moH/6Px+QbKqVJCBBTshGSxJdo5BDNiQ+4DZFcn3awD2nN6c6UPuBVlp9foBMrgNex3ghWAALBJh3lrP+ivH51H/DjNRPusrgp31NNPbnm1lKJAmnrTarUAGt93cHcmKclJSB1ty10nMtCo6ItatUPfwC/W/LHvWQV1pBcdBzpOXWjmaXiH5P2jAntC9ZcM7kp2ulJo62OiBYQObiYCdNB9NBGbQ86uyBLQiBLXC9XJFIZSaKF5BBrcxMC/LucDGWwqsuyf38ulEfyasVbejK+VUGzK/GfznG8YUE8KXFgJb0QANxS42FLGsdqmDQquIVG4yLzWOHOrgMOQ8U0AGW/Lbq1Ibs7s5098S9DYc9DO+dgDvSv+9HcjAX6ZJ1UFK3kFFMjMRlYl2vGsVNXEE5ocx0/c1PnbUvvfkyfAbBoGunF3puvuI0tr0sxUMTPRMdM/0b45Z/dQggz6xsQT8Mw2o/V1XZOCzvXmR0A2WHO3O6QJ6JtqDfeNQjNOAz/hnCwmNyb5nBWRwpzooKK2GIXuBJ4BtzjJJbpswnilcDUJF7SXJMxpIT4subz5vYJJAshwZm8x1YUXYGiuR5LVlLIachffUbm6vhkD2XQ9eaTlnKoeuMA6CNAg9E++bgUmnCiFn4XfLc36izL2hrslAIqlNdZDLrMZQS6wTxLxzwvhwKKyQ9/CnZQw/U8ZNbromg9rDO0hNHVTCzwZ14MabY9J4CphGqjH82kL8Rc7P9xE5rmJ96fJQasaMZKlxQjATJQH30zFRhAy6Ew3QUCwe9KB91ME8sUEsMRPRM9GNI9mXGxeBx8YHDcxQfJT77VNlmJp3sCeYiV0qrYMjXSgDX9/Rcm1TkIFsBpXWdafmHRDJ9legMlHuH9QWUg1ZBWgrSCLKzFB85Lq49HzGFL0Dact4HMDiRuUg19D+QUXt/kZBGZUsFw++iT51B6ktyUmWGieUlicSUo7vHf5BSJV1oHZ/Y5IL6Rc9PORc1YFrRjNzS1QmumFb32dJHvI+bqndGF9SBoZi0UPASEuUpwmqgx25G6PCTJTn52+OsfoUgRrM1lAsegoYKZYJDmDJrkZUJsrluE1tzSIYIzbDM2lDsejpAUvbiqdynHvz80nMxCfEugjvjvGyDkysJ8rUUOwrB/M5dGSV6AB2eSNlgson5OxLEfsHth2Ok1SJv68b+uGpDlKT1JKj3ZnoUJnohqs6cRxBwL1T+2rZPEXi75NdfdRBijPoTqAORlAHXuPl4Jg0Qi/bvlG7oajSmSnIoF1aSbc3p+gdSM/rWyT42UIGm62s/Smw0qrJ3b1pDDK4fuNyXllgdSBJh2AmyuBqhsLlyn1ipNNYNT6/kH3ZOClDsQgQLNINTDNKr1hHutSIykQ/Rblz3Mv1g2OEg1+dsvXX5fWnRxrwP0Px769fo7/RZYBg2QofHufXm8QGL58B4Ar2J/3eM+LdiY0OqtKiIrnd+r3gE6Inxt+8d2af6+cc9VgOMfP6bGBaUJqlvJKlRlQmdqu4bvUPCj3Dr/WM/6IVwFKTQVcSP/py5RCBdib5GQupHbpi5roSMxGViX6K670D/6AZ/H/p3L/r4L82JpAmXMHWI2dO6Ui2pj+yEMxWakb7jlgXjxvbHpZrh+EWhuyfdiT7fUngQH5L64MigxO5TzluqoPUTsWt9TU/C57BvKN8dwjpwpue0dsCeq3fNzby/j6D/2yM76P+vv7n2zcCGdjzamlRRqrqgA+kdaUCa5061Yh30UTyStePU/dJF7okKA58PpE7yecYkgyOA1AHChs9k7ny2DXJmq0OGSM9Zsc64EKs3/OR8Tx+QxwWmx0ZmDlgzurgSLKlRs51T4j534J/YrxCmN6VEfxHSsAMTJEMmFlL4cBIVR2oa54JZjJlJv5A8P/fJCwDBX9tBH/S0j8lMmB1IM3xFuTXSi0W8FKjq66AKxOHYiaO6VejL1TwnxuzfzbSPzUy+NApgORaCh0suwTvNS+nuj7nU8ZStFnZNw6c97PsPxLM22h2z/mogyX5VTHGBGUmfhFIZdX34GcGkn/cyPdD7zD8MIK/IiBKMthrWSaRiGOdf6copblFmuvQmLkmyFOiwT81Zv6Yrm9P8ga9IIOArL0neenxMuG8ekuyE6SUOniNPPhDO/2m3D+Qe8uw2nPwHaogbjIwc+qR8LpTNdqO9FmqbMNMv/aRXDebfWXg4G8afc3Athm1XJD0LzyCuMmAT2CSqoMVpVu1x0uNrmBiM/EcKPib+f4oQPD7Fvhs9fW2qS9uWPoT4R8vGfCDXHgM1lS9A26R5up4VGjSe+sx+DnfD7lvxTbzS/DmUC5zkp2mDTIIrA4kBlsO3sGOZFuYH1WZ2FzmCzUWzvTrEt+po9+pZv4vDtV1K9mADHpUBzOP648pr74lXfgieN+9lYkxLfNd3dX3gL/D/Q9WFtX1TMOu+IyeDHw2MPHMmSoZSFuk+VYmFvRp9oVe5mtW9/VZ4MM7Y239D5TZuAEVxNuy22d7Mz/sY6LPYEPyfQttPRMf0bfvVtSG5D88cOaXQqULL5b70WX/RJDBg9TBkeQtwZQU/DfRZ3DWqZHrWDlzo1YMTr8Z/E3ZH1NdP7dbfxb4ByeQQZxQAfLHQNQB1x24lhqXWkWEDH6iT8c/ldLeDz1G5haiHfqO0ajJgCWxtLBFBcpros+B1YFrV+Mo0DM7N3L+FGfQN7IbpxOtzt5BBvGBT2CSnsrMR7KlNlBHRs4fk7SuIsr7uxpPvNw4sqSb/JlBBhGmCj5nJ8Rez0/02a03ZFmva+bPtZnHUeAfDHb/QuxkkIM6KOh3p7+I4L42Zf9QavUl/sEg9y+kcBrwTvsBUsMstDpoBn/frbrbgr9p+g35WLeNJoTC4R9sQAZx4Ux+G5j6Vge8m8/s2xfDqbu8VJZ1E887xtQb2Verlvq+7UEG8XkHc48gW9BjNveMGsFfRhL8NX2W+ZqmH9COvR5XS8t71kNSUamQge/2Zu4UVHUQ/DG06nbNcj8w89+cLnDJdpvqY/8AZBCZd7DwCOLFDTnfqBH4JcV/CnShrxVkcBu4XLntOU9pIPUHKZHBify2N3Nb9bMjkMpIg5+lv2SD0Zra9y0AbmXl2u48iPqDMrHr3XmQwbVDV8w+/SFO5JUQnrnkR45ZyyS1JWH33a04CJSnShe+50y4qZEBr4lLr3uhZ9iC4nL6eebnSj/z5J4mJB2RiD4bvcA4vN0/mFjGVpG7f5AaGdTkd8YCH2gaC8zAl3bZkXZEIsJmm3vHlkoXbMe9Z+0flAle814H0TiBa+1qg4+0I9LQjmd7RJrmKldeNdI4kEFgBt9FNuOb1/aIxh7Sw1d4sKbaNToGuMqVTf+gBhmEB5cox1Dj79vK+1a8C8lgTOmeRxkLXNuduf7gFWQQjzpYBfi7FX0uc/bZXddnaZXVAZYa7/MPbNudZ3pC2oIMwsN3e3MXM39FYYt7eIONa0WEjVMcFHI7jmQ/nYn0v/H+D5BBYPZ2bTa5dQaOtaVXZaRILnCqcERc3zXhTMnenDeb+oMi8evf0/2FNrzv4U0/1O/6+w+Ks8R36zHw1ojnTvwDVxVrFve5zOAzbLVKWJOsoOhMvzr+qXX1kfZLVMBSYzdqzKVA5/R5BgbIIDB2+mHM6bNpxcgInop+Pb6rzuDzzoXPD/sWulGgrnLl5Nutlxk9MBXw7/o1angLuaHW6ZGkEKnPw1tzxjvZe2pwu7QfqY65ItMHVxuvXMGFSBKoQTxGPN8EFeQznSa40tCSZPtIoAyAh8xWM+GAVuoAS41yApjoezvznDST9Q9ABmnDpxCJjcQDblsrpvpeTu9UUrZzMUEGwEPVgaQQSWGdck77IAVQGiRQdvh7m700QAZAL+pAcnArP2/uADX0FMBceUJsgQyygU9pNu9bqAZGAKXhAfRhpu5ABkAI1CTviDQkM9EkgL7GOrdgP4IMgFDgohjJM81530IIAqg0CSTddg5kkBekhUicLvybEQGwCTjp6W9yWfueMmkmAzLIC7y+PRe8l4Nnn/DY7VsB1MY9PhA6HQGR411IBgrrxAZ1CAVADQWQrfEKMsgPlYc6UK76kuJeD+dzLec9EwAf+DuY9vMgg3zVgZo9JYVIfN5CFSEBsALo66yL2lAA2aUBIIPhqgNpIdJIpwuvERAA7weY9kwAJ02Ig+4bCTLIF1uSm2tsxO0DEACnAH2fdmUagej1ADLIGlyIJO0R2ZeZGCoFIPrc2LUnHEMHMhgYOPedCoP0UfsW+KzLec8pAOlZ3/QBAJDBYKEKkV6E72UzsQvZPKJftwT32UiH6wH2SANABsCv0tjVv8+cwe9pkVbQr8VAfROAmQZUePQgA+B3bMnev8/EwlNSswIIkQIoHEEAIANADp+lRgVXE5SQKQB/nuQ3BoEMgJDqQNrzoNSE0EwX2AScBSCAM30uBx4J3ZpABsBdObUyE5+F719oBbA3fIAywDWbaQCMQJAB0BE+dJBLa/znJN/01CUBwAgEGQA9QEn/P6l/o88FGIEgA6Bn8FLjMoJrgREIMgACg3sehDhRi43AQe4MBBkAscGngWpXf+9I2BgEMgCiBJuJ5QMJAEYgyABIRB2odukvHf9eGIEgAyBBqJlb1R6sO/g92BoMMgASx1aPA996AnNrMCoCQQZAJuDTleYCAsBKAMgAGAAhqBme9y+MdLBX+v8foADyxn8CDABulgqUemYwnwAAAABJRU5ErkJggg==); + background-repeat:no-repeat; + background-position:right; +} + .exc-title { + margin: 0; + color: #616161; + font-weight:normal; + } + .exc-title-primary { color: #ED591A; } + .exc-message { + font-size: 16px; + margin: 5px 0; + word-wrap: break-word; + } + +.stack-container { + height: 100%; + position: relative; +} + +.details-container { + height: 100%; + overflow: auto; + float: right; + width: 70%; + background: #fff; +} + .details { + padding: 10px 20px; + border-left: 5px solid rgba(0, 0, 0, .2); + } + +.frames-container { + height: 100%; + overflow: auto; + float: left; + width: 30%; + background: #FFF; +} + .frame { + padding: 14px; + background: #F3F3F3; + border-right: 1px solid rgba(0, 0, 0, .2); + cursor: pointer; + font-size:12px; + } + .frame.active { + background-color: #ED591A; + color: #F3F3F3; + + } + + .frame:not(.active):hover { + background: #F0E5DF; + } + + .frame-class, .frame-function, .frame-index { + font-weight: bold; + } + + .frame-index { + font-size: 11px; + color: #BDBDBD; + } + + .frame-class { + color: #ED591A; + } + .active .frame-class { + color: #5E2204; + } + + .frame-file { + font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; + color:#999; + word-wrap:break-word; + } + .editor-link { + color: inherit; + } + .editor-link:hover strong { + color: #F0E5DF; + } + + .editor-link-callout { + padding: 2px 4px; + background: #872D00; + } + + .frame-line { + font-weight: bold; + color: #A33202; + } + + .active .frame-file{ color:#872D00; } + + .active .frame-line { color: #fff; } + .frame-line:before { + content: ":"; + } + + .frame-code { + padding: 20px; + background: #f0f0f0; + display: none; + border-left: 5px solid #EDA31A; + } + + .frame-code.active { + display: block; + } + + .frame-code .frame-file { + background: #ED591A; + color: #fff; + padding: 10px 10px 10px 10px; + font-size:11px; + font-weight:normal; + } + + .code-block { + padding: 10px; + margin: 0; + box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); + } + + .linenums { + margin: 0; + margin-left: 10px; + } + + .frame-comments { + border-top: none; + padding: 5px; + font-size: 12px; + background: #404040; + } + + .frame-comments.empty { + padding: 8px 15px; + } + + .frame-comments.empty:before { + content: "No comments for this stack frame."; + color: #828282; + } + + .frame-comment { + padding: 10px 5px; + color: #D2D2D2; + } + + .frame-comment:not(:last-child) { + border-bottom: 1px dotted rgba(0, 0, 0, .3); + } + + .frame-comment-context { + font-size: 10px; + font-weight: bold; + color: #86D2B6; + } + +.data-table-container label { + font-size: 16px; + font-weight: bold; + color: #ED591A; + margin: 10px 0; + padding: 10px 0; + + display: block; + margin-bottom: 5px; + padding-bottom: 5px; + border-bottom: 1px solid rgba(0, 0, 0, .08); +} + .data-table { + width: 100%; + margin: 10px 0; + font: 12px 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; + } + + .data-table thead { + display: none; + } + + .data-table tr { + padding: 5px 0; + } + + .data-table td:first-child { + width: 20%; + min-width: 130px; + overflow: hidden; + color: #463C54; + padding-right: 5px; + + } + + .data-table td:last-child { + width: 80%; + color:#999; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -webkit-hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; + } + + .data-table .empty { + color: rgba(0, 0, 0, .3); + font-style: italic; + } + +.handler { + padding: 10px; + font: 14px monospace; +} + +.handler.active { + color: #BBBBBB; + background: #989898; + font-weight: bold; +} + +/* prettify code style +Uses the Doxy theme as a base */ +pre .str, code .str { color: #E3B446; } /* string */ +pre .kwd, code .kwd { color: #DB613B; font-weight: bold; } /* keyword*/ +pre .com, code .com { color: #555; font-weight: bold; } /* comment */ +pre .typ, code .typ { color: #fff; } /* type */ +pre .lit, code .lit { color: #17CFB6; } /* literal */ +pre .pun, code .pun { color: #93a1a1; font-weight: bold; } /* punctuation */ +pre .pln, code .pln { color: #ccc; } /* plaintext */ +pre .tag, code .tag { color: #DB613B; } /* html/xml tag */ +pre .htm, code .htm { color: #dda0dd; } /* html tag */ +pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ +pre .atn, code .atn { color: #fff; font-weight: normal;} /* html/xml attribute name */ +pre .atv, code .atv { color: #E3B446; } /* html/xml attribute value */ +pre .dec, code .dec { color: #fff; } /* decimal */ +pre.prettyprint, code.prettyprint { + font-weight:normal; + font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; + background: #272727; + color: #929292; + font-size:11px; + line-height:1.5em; +} + pre.prettyprint { + white-space: pre-wrap; + } + + pre.prettyprint a, code.prettyprint a { + text-decoration:none; + } + + .linenums li { + color: #A5A5A5; + } + + .linenums li.current{ + background: rgba(255, 255, 255, .05); + padding-top: 4px; + padding-left: 1px; + } + .linenums li.current.active { + background: rgba(255, 255, 255, .1); + } diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html b/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html index 7f9aa3c..683c5ec 100755 --- a/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html +++ b/vendor/laravel/framework/src/Illuminate/Exception/resources/plain.html @@ -1,71 +1,71 @@ - - - - - - - - -
-

Whoops, looks like something went wrong.

- -
- - + + + + + + + + +
+

Whoops, looks like something went wrong.

+ +
+ + diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-page.css b/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-page.css deleted file mode 100755 index 23b71e2..0000000 --- a/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-page.css +++ /dev/null @@ -1,310 +0,0 @@ -.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;} -body { - font: 14px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - color: #2B2B2B; - background-color: #e7e7e7; - padding:0; - margin: 0; - max-height: 100%; -} - a { - text-decoration: none; - color: #FE8A59; - } - -.container{ - height: 100%; - width: 100%; - position: fixed; - margin: 0; - padding: 0; - left: 0; - top: 0; -} - -.branding { - position: absolute; - top: 10px; - right: 20px; - color: #777777; - font-size: 10px; - z-index: 100; -} - .branding a { - color: #CD3F3F; - } - -header { - padding: 20px 20px; - color: #555; - background: #ddd; - box-sizing: border-box; - border-left: 5px solid #ED3D1A; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAACWCAYAAADaDe2PAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBNTk1RDY3OTlBRkQxMUUyOUM0M0EzNzM1OTdBRTY0NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBNTk1RDY3QTlBRkQxMUUyOUM0M0EzNzM1OTdBRTY0NyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE1OTVENjc3OUFGRDExRTI5QzQzQTM3MzU5N0FFNjQ3IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE1OTVENjc4OUFGRDExRTI5QzQzQTM3MzU5N0FFNjQ3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+GLAjkgAAEaxJREFUeNrsXet22zYTXFHUXXZT93nyo0/eH3mfpI5lybpQrPAd7GeEEYGFRBEXzpyjY7eRbYrEDmYHi8WormuS4O+vX+nBGOmvhf5+ZHxvfi2M/+b3K5wvr+ry2l1eBwKAiPDPt2/RX2PZY3C3BXTz68j4WR8U+vPMLq/N5bXFEASAx5BB28x9LbjN7+nG4L4Ha60OTnjEAOBJBpc0YHz5Mr4S4M0gDxHct+D58vpxedV4zAAgIIMLCYz0TDpPJMh9iG55eb3jMQOALM9WRLDIjAgYK3qsLwIAWc2ek0ivrdavc+Nr1fhvRWRTy+950ukCAAAOMhgFDvDm6xoB2KDI4cXy7xOdAn3gcQOAnQxUMI0fHODnK+/rCicd6HPLe1QqtCeYiQBgJYODQ2YzjkZAXZvFQwaaMglnFpWjvBGYiQBgQeExYyrSUIU8O/0zRz0rnyn8jKvUzcbxnuWdCggA8iaDf759q0hWvhv70uNOE1QbeAkVAIAWZUAkK90dO/LyGOBSBzP9AgCghQyOjlnVlNoxqwP1GVyrBmvKs6YCAO4nA72jKhd1oEzC2vEZlnj0AHBdGSgoU1CysWcV+cxakXvVAJWJANBGBh7qQP3MIvLPpczEs+M9T3j8AHBdGbA6qDLwDlSa4DITVWUizEQAuEYGF3VQ61lV8nOxewfKSHSZorGnPAAQTBmwOpAUEc0T+HwudVAmkPIAQBgy0EVIkk09Kcjso0DpwEwEgBZlQMJUgb2D2KFWFmxmIioTAaCNDC7q4KTThRzUwZncS41TgpkIgAxaIe0unII6UErHVUOBykQAZNCiDqQlyhOSbYEODRe5oTIRABk48m0JUsi5lSnq2p25ImxzBkAGV3EQqoMykZx7I3gPzEQAZHAlVcjNOziRe6VklkjaAwC9KgNWB5INTKl4B66lRlYHMBMBkEFDHdQk7yycQlWiZKkRlYkAyKAFigykJcopVPO5WqQpoDIRABlcUQdnklclrhL57G+Of0dlIgAysMymEnUwS2RGlVRZojIRABlcQUWyEmWFVIp3JHUUKwwTAGTwO6TLjMo7SKF45yT4TDATAZDBjdKakUq+/U7u7k5rQmViyhhpUp/qV4Fbcn3W88VWmEezd3CK/B7UmhCeHYNJEcIrhkz0QT/Wr7Lx1awb4eXlHW7ZfWSgluSk5zMq7+BnAvfhQ6cCEwe5TUl2+hTw+KAvrgT8WDjrq/c86Z97w+28nQxYHUjIYC6U4TFADYoXQbrwg3Cac99BzwHvG/QuLIxnDzK48ed4A9PEgxBiB+9bWDju14LkRiogQ2G8moH/6Px+QbKqVJCBBTshGSxJdo5BDNiQ+4DZFcn3awD2nN6c6UPuBVlp9foBMrgNex3ghWAALBJh3lrP+ivH51H/DjNRPusrgp31NNPbnm1lKJAmnrTarUAGt93cHcmKclJSB1ty10nMtCo6ItatUPfwC/W/LHvWQV1pBcdBzpOXWjmaXiH5P2jAntC9ZcM7kp2ulJo62OiBYQObiYCdNB9NBGbQ86uyBLQiBLXC9XJFIZSaKF5BBrcxMC/LucDGWwqsuyf38ulEfyasVbejK+VUGzK/GfznG8YUE8KXFgJb0QANxS42FLGsdqmDQquIVG4yLzWOHOrgMOQ8U0AGW/Lbq1Ibs7s5098S9DYc9DO+dgDvSv+9HcjAX6ZJ1UFK3kFFMjMRlYl2vGsVNXEE5ocx0/c1PnbUvvfkyfAbBoGunF3puvuI0tr0sxUMTPRMdM/0b45Z/dQggz6xsQT8Mw2o/V1XZOCzvXmR0A2WHO3O6QJ6JtqDfeNQjNOAz/hnCwmNyb5nBWRwpzooKK2GIXuBJ4BtzjJJbpswnilcDUJF7SXJMxpIT4subz5vYJJAshwZm8x1YUXYGiuR5LVlLIachffUbm6vhkD2XQ9eaTlnKoeuMA6CNAg9E++bgUmnCiFn4XfLc36izL2hrslAIqlNdZDLrMZQS6wTxLxzwvhwKKyQ9/CnZQw/U8ZNbromg9rDO0hNHVTCzwZ14MabY9J4CphGqjH82kL8Rc7P9xE5rmJ96fJQasaMZKlxQjATJQH30zFRhAy6Ew3QUCwe9KB91ME8sUEsMRPRM9GNI9mXGxeBx8YHDcxQfJT77VNlmJp3sCeYiV0qrYMjXSgDX9/Rcm1TkIFsBpXWdafmHRDJ9legMlHuH9QWUg1ZBWgrSCLKzFB85Lq49HzGFL0Dact4HMDiRuUg19D+QUXt/kZBGZUsFw++iT51B6ktyUmWGieUlicSUo7vHf5BSJV1oHZ/Y5IL6Rc9PORc1YFrRjNzS1QmumFb32dJHvI+bqndGF9SBoZi0UPASEuUpwmqgx25G6PCTJTn52+OsfoUgRrM1lAsegoYKZYJDmDJrkZUJsrluE1tzSIYIzbDM2lDsejpAUvbiqdynHvz80nMxCfEugjvjvGyDkysJ8rUUOwrB/M5dGSV6AB2eSNlgson5OxLEfsHth2Ok1SJv68b+uGpDlKT1JKj3ZnoUJnohqs6cRxBwL1T+2rZPEXi75NdfdRBijPoTqAORlAHXuPl4Jg0Qi/bvlG7oajSmSnIoF1aSbc3p+gdSM/rWyT42UIGm62s/Smw0qrJ3b1pDDK4fuNyXllgdSBJh2AmyuBqhsLlyn1ipNNYNT6/kH3ZOClDsQgQLNINTDNKr1hHutSIykQ/Rblz3Mv1g2OEg1+dsvXX5fWnRxrwP0Px769fo7/RZYBg2QofHufXm8QGL58B4Ar2J/3eM+LdiY0OqtKiIrnd+r3gE6Inxt+8d2af6+cc9VgOMfP6bGBaUJqlvJKlRlQmdqu4bvUPCj3Dr/WM/6IVwFKTQVcSP/py5RCBdib5GQupHbpi5roSMxGViX6K670D/6AZ/H/p3L/r4L82JpAmXMHWI2dO6Ui2pj+yEMxWakb7jlgXjxvbHpZrh+EWhuyfdiT7fUngQH5L64MigxO5TzluqoPUTsWt9TU/C57BvKN8dwjpwpue0dsCeq3fNzby/j6D/2yM76P+vv7n2zcCGdjzamlRRqrqgA+kdaUCa5061Yh30UTyStePU/dJF7okKA58PpE7yecYkgyOA1AHChs9k7ny2DXJmq0OGSM9Zsc64EKs3/OR8Tx+QxwWmx0ZmDlgzurgSLKlRs51T4j534J/YrxCmN6VEfxHSsAMTJEMmFlL4cBIVR2oa54JZjJlJv5A8P/fJCwDBX9tBH/S0j8lMmB1IM3xFuTXSi0W8FKjq66AKxOHYiaO6VejL1TwnxuzfzbSPzUy+NApgORaCh0suwTvNS+nuj7nU8ZStFnZNw6c97PsPxLM22h2z/mogyX5VTHGBGUmfhFIZdX34GcGkn/cyPdD7zD8MIK/IiBKMthrWSaRiGOdf6copblFmuvQmLkmyFOiwT81Zv6Yrm9P8ga9IIOArL0neenxMuG8ekuyE6SUOniNPPhDO/2m3D+Qe8uw2nPwHaogbjIwc+qR8LpTNdqO9FmqbMNMv/aRXDebfWXg4G8afc3Athm1XJD0LzyCuMmAT2CSqoMVpVu1x0uNrmBiM/EcKPib+f4oQPD7Fvhs9fW2qS9uWPoT4R8vGfCDXHgM1lS9A26R5up4VGjSe+sx+DnfD7lvxTbzS/DmUC5zkp2mDTIIrA4kBlsO3sGOZFuYH1WZ2FzmCzUWzvTrEt+po9+pZv4vDtV1K9mADHpUBzOP648pr74lXfgieN+9lYkxLfNd3dX3gL/D/Q9WFtX1TMOu+IyeDHw2MPHMmSoZSFuk+VYmFvRp9oVe5mtW9/VZ4MM7Y239D5TZuAEVxNuy22d7Mz/sY6LPYEPyfQttPRMf0bfvVtSG5D88cOaXQqULL5b70WX/RJDBg9TBkeQtwZQU/DfRZ3DWqZHrWDlzo1YMTr8Z/E3ZH1NdP7dbfxb4ByeQQZxQAfLHQNQB1x24lhqXWkWEDH6iT8c/ldLeDz1G5haiHfqO0ajJgCWxtLBFBcpros+B1YFrV+Mo0DM7N3L+FGfQN7IbpxOtzt5BBvGBT2CSnsrMR7KlNlBHRs4fk7SuIsr7uxpPvNw4sqSb/JlBBhGmCj5nJ8Rez0/02a03ZFmva+bPtZnHUeAfDHb/QuxkkIM6KOh3p7+I4L42Zf9QavUl/sEg9y+kcBrwTvsBUsMstDpoBn/frbrbgr9p+g35WLeNJoTC4R9sQAZx4Ux+G5j6Vge8m8/s2xfDqbu8VJZ1E887xtQb2Verlvq+7UEG8XkHc48gW9BjNveMGsFfRhL8NX2W+ZqmH9COvR5XS8t71kNSUamQge/2Zu4UVHUQ/DG06nbNcj8w89+cLnDJdpvqY/8AZBCZd7DwCOLFDTnfqBH4JcV/CnShrxVkcBu4XLntOU9pIPUHKZHBify2N3Nb9bMjkMpIg5+lv2SD0Zra9y0AbmXl2u48iPqDMrHr3XmQwbVDV8w+/SFO5JUQnrnkR45ZyyS1JWH33a04CJSnShe+50y4qZEBr4lLr3uhZ9iC4nL6eebnSj/z5J4mJB2RiD4bvcA4vN0/mFjGVpG7f5AaGdTkd8YCH2gaC8zAl3bZkXZEIsJmm3vHlkoXbMe9Z+0flAle814H0TiBa+1qg4+0I9LQjmd7RJrmKldeNdI4kEFgBt9FNuOb1/aIxh7Sw1d4sKbaNToGuMqVTf+gBhmEB5cox1Dj79vK+1a8C8lgTOmeRxkLXNuduf7gFWQQjzpYBfi7FX0uc/bZXddnaZXVAZYa7/MPbNudZ3pC2oIMwsN3e3MXM39FYYt7eIONa0WEjVMcFHI7jmQ/nYn0v/H+D5BBYPZ2bTa5dQaOtaVXZaRILnCqcERc3zXhTMnenDeb+oMi8evf0/2FNrzv4U0/1O/6+w+Ks8R36zHw1ojnTvwDVxVrFve5zOAzbLVKWJOsoOhMvzr+qXX1kfZLVMBSYzdqzKVA5/R5BgbIIDB2+mHM6bNpxcgInop+Pb6rzuDzzoXPD/sWulGgrnLl5Nutlxk9MBXw7/o1angLuaHW6ZGkEKnPw1tzxjvZe2pwu7QfqY65ItMHVxuvXMGFSBKoQTxGPN8EFeQznSa40tCSZPtIoAyAh8xWM+GAVuoAS41yApjoezvznDST9Q9ABmnDpxCJjcQDblsrpvpeTu9UUrZzMUEGwEPVgaQQSWGdck77IAVQGiRQdvh7m700QAZAL+pAcnArP2/uADX0FMBceUJsgQyygU9pNu9bqAZGAKXhAfRhpu5ABkAI1CTviDQkM9EkgL7GOrdgP4IMgFDgohjJM81530IIAqg0CSTddg5kkBekhUicLvybEQGwCTjp6W9yWfueMmkmAzLIC7y+PRe8l4Nnn/DY7VsB1MY9PhA6HQGR411IBgrrxAZ1CAVADQWQrfEKMsgPlYc6UK76kuJeD+dzLec9EwAf+DuY9vMgg3zVgZo9JYVIfN5CFSEBsALo66yL2lAA2aUBIIPhqgNpIdJIpwuvERAA7weY9kwAJ02Ig+4bCTLIF1uSm2tsxO0DEACnAH2fdmUagej1ADLIGlyIJO0R2ZeZGCoFIPrc2LUnHEMHMhgYOPedCoP0UfsW+KzLec8pAOlZ3/QBAJDBYKEKkV6E72UzsQvZPKJftwT32UiH6wH2SANABsCv0tjVv8+cwe9pkVbQr8VAfROAmQZUePQgA+B3bMnev8/EwlNSswIIkQIoHEEAIANADp+lRgVXE5SQKQB/nuQ3BoEMgJDqQNrzoNSE0EwX2AScBSCAM30uBx4J3ZpABsBdObUyE5+F719oBbA3fIAywDWbaQCMQJAB0BE+dJBLa/znJN/01CUBwAgEGQA9QEn/P6l/o88FGIEgA6Bn8FLjMoJrgREIMgACg3sehDhRi43AQe4MBBkAscGngWpXf+9I2BgEMgCiBJuJ5QMJAEYgyABIRB2odukvHf9eGIEgAyBBqJlb1R6sO/g92BoMMgASx1aPA996AnNrMCoCQQZAJuDTleYCAsBKAMgAGAAhqBme9y+MdLBX+v8foADyxn8CDABulgqUemYwnwAAAABJRU5ErkJggg==); - background-repeat:no-repeat; - background-position:right; -} - .exc-title { - margin: 0; - color: #616161; - font-weight:normal; - } - .exc-title-primary { color: #ED591A; } - .exc-message { - font-size: 16px; - margin: 5px 0; - word-wrap: break-word; - } - -.stack-container { - height: 100%; - position: relative; -} - -.details-container { - height: 100%; - overflow: auto; - float: right; - width: 70%; - background: #fff; -} - .details { - padding: 10px 20px; - border-left: 5px solid rgba(0, 0, 0, .2); - } - -.frames-container { - height: 100%; - overflow: auto; - float: left; - width: 30%; - background: #FFF; -} - .frame { - padding: 14px; - background: #F3F3F3; - border-right: 1px solid rgba(0, 0, 0, .2); - cursor: pointer; - font-size:12px; - } - .frame.active { - background-color: #ED591A; - color: #F3F3F3; - - } - - .frame:not(.active):hover { - background: #F0E5DF; - } - - .frame-class, .frame-function, .frame-index { - font-weight: bold; - } - - .frame-index { - font-size: 11px; - color: #BDBDBD; - } - - .frame-class { - color: #ED591A; - } - .active .frame-class { - color: #5E2204; - } - - .frame-file { - font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; - color:#999; - word-wrap:break-word; - } - .editor-link { - color: inherit; - } - .editor-link:hover strong { - color: #F0E5DF; - } - - .editor-link-callout { - padding: 2px 4px; - background: #872D00; - } - - .frame-line { - font-weight: bold; - color: #A33202; - } - - .active .frame-file{ color:#872D00; } - - .active .frame-line { color: #fff; } - .frame-line:before { - content: ":"; - } - - .frame-code { - padding: 20px; - background: #f0f0f0; - display: none; - border-left: 5px solid #EDA31A; - } - - .frame-code.active { - display: block; - } - - .frame-code .frame-file { - background: #ED591A; - color: #fff; - padding: 10px 10px 10px 10px; - font-size:11px; - font-weight:normal; - } - - .code-block { - padding: 10px; - margin: 0; - box-shadow: inset 0 0 6px rgba(0, 0, 0, .3); - } - - .linenums { - margin: 0; - margin-left: 10px; - } - - .frame-comments { - border-top: none; - padding: 5px; - font-size: 12px; - background: #404040; - } - - .frame-comments.empty { - padding: 8px 15px; - } - - .frame-comments.empty:before { - content: "No comments for this stack frame."; - color: #828282; - } - - .frame-comment { - padding: 10px 5px; - color: #D2D2D2; - } - - .frame-comment:not(:last-child) { - border-bottom: 1px dotted rgba(0, 0, 0, .3); - } - - .frame-comment-context { - font-size: 10px; - font-weight: bold; - color: #86D2B6; - } - -.data-table-container label { - font-size: 16px; - font-weight: bold; - color: #ED591A; - margin: 10px 0; - padding: 10px 0; - - display: block; - margin-bottom: 5px; - padding-bottom: 5px; - border-bottom: 1px solid rgba(0, 0, 0, .08); -} - .data-table { - width: 100%; - margin: 10px 0; - font: 12px 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; - } - - .data-table thead { - display: none; - } - - .data-table tr { - padding: 5px 0; - } - - .data-table td:first-child { - width: 20%; - min-width: 130px; - overflow: hidden; - color: #463C54; - padding-right: 5px; - - } - - .data-table td:last-child { - width: 80%; - color:#999; - -ms-word-break: break-all; - word-break: break-all; - word-break: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - } - - .data-table .empty { - color: rgba(0, 0, 0, .3); - font-style: italic; - } - -.handler { - padding: 10px; - font: 14px monospace; -} - -.handler.active { - color: #BBBBBB; - background: #989898; - font-weight: bold; -} - -/* prettify code style -Uses the Doxy theme as a base */ -pre .str, code .str { color: #E3B446; } /* string */ -pre .kwd, code .kwd { color: #DB613B; font-weight: bold; } /* keyword*/ -pre .com, code .com { color: #555; font-weight: bold; } /* comment */ -pre .typ, code .typ { color: #fff; } /* type */ -pre .lit, code .lit { color: #17CFB6; } /* literal */ -pre .pun, code .pun { color: #93a1a1; font-weight: bold; } /* punctuation */ -pre .pln, code .pln { color: #ccc; } /* plaintext */ -pre .tag, code .tag { color: #DB613B; } /* html/xml tag */ -pre .htm, code .htm { color: #dda0dd; } /* html tag */ -pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag */ -pre .atn, code .atn { color: #fff; font-weight: normal;} /* html/xml attribute name */ -pre .atv, code .atv { color: #E3B446; } /* html/xml attribute value */ -pre .dec, code .dec { color: #fff; } /* decimal */ -pre.prettyprint, code.prettyprint { - font-weight:normal; - font-family: 'Source Code Pro', Monaco, Consolas, "Lucida Console", monospace; - background: #272727; - color: #929292; - font-size:11px; - line-height:1.5em; -} - pre.prettyprint { - white-space: pre-wrap; - } - - pre.prettyprint a, code.prettyprint a { - text-decoration:none; - } - - .linenums li { - color: #A5A5A5; - } - - .linenums li.current{ - background: rgba(255, 255, 255, .05); - padding-top: 4px; - padding-left: 1px; - } - .linenums li.current.active { - background: rgba(255, 255, 255, .1); - } diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-template.php b/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-template.php deleted file mode 100755 index f1ab90f..0000000 --- a/vendor/laravel/framework/src/Illuminate/Exception/resources/pretty-template.php +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - <?php echo $e($v->title) ?> - - - - -
- -
- -
- - - frames as $i => $frame): ?> - -
-
- frames) - $i - 1) ?>. - getClass() ?: '') ?> - getFunction() ?: '') ?> -
- - - getFile(true) ?: '<#unknown>') ?>getLine() ?> - -
- - -
- -
- -
-
-

- name as $i => $nameSection): ?> - name) - 1): ?> - - - - - -

-

- message) ?> -

-
-
- - -
- frames as $i => $frame): ?> - - getLine(); ?> -
-
- getFile(); ?> - handler->getEditorHref($filePath, (int) $line)): ?> - - open: ') ?> - - - ') ?> - -
- getFileLines($line - 8, 10); - $range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range); - $start = key($range) + 1; - $code = join("\n", $range); - ?> -
- - - getComments(); - ?> -
- $comment): ?> - -
- - -
- -
- -
- -
- - -
-
- tables as $label => $data): ?> -
- - - - - - - - - - $value): ?> - - - - - -
KeyValue
- - empty - -
- -
- - -
- - handlers as $i => $handler): ?> -
- . -
- -
- -
-
- -
-
- - - - - - diff --git a/vendor/laravel/framework/src/Illuminate/Exception/resources/views/frame_code.html.php b/vendor/laravel/framework/src/Illuminate/Exception/resources/views/frame_code.html.php new file mode 100755 index 0000000..698c5f3 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Exception/resources/views/frame_code.html.php @@ -0,0 +1,51 @@ + +
+ $frame): ?> + getLine(); ?> +
+
+ getFile(); ?> + getEditorHref($filePath, (int) $line)): ?> + + open: escape($filePath ?: '<#unknown>') ?> + + + escape($filePath ?: '<#unknown>') ?> + +
+ getFileLines($line - 8, 10); + + // getFileLines can return null if there is no source code + if ($range): + $range = array_map(function($line){ return empty($line) ? ' ' : $line;}, $range); + $start = key($range) + 1; + $code = join("\n", $range); + ?> +
escape($code) ?>
+ + + + getComments(); + ?> +
+ $comment): ?> + +
+ escape($context) ?> + escapeButPreserveUris($comment) ?> +
+ +
+ +
+ +
diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php index e533046..42b0777 100755 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php @@ -291,7 +291,7 @@ class Filesystem { * @param bool $force * @return bool */ - public function makeDirectory($path, $mode = 0777, $recursive = false, $force = false) + public function makeDirectory($path, $mode = 0755, $recursive = false, $force = false) { if ($force) { diff --git a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json index 8778b7d..7466c89 100755 --- a/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Filesystem/composer.json @@ -8,12 +8,9 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*", - "symfony/finder": "2.4.*" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*", + "symfony/finder": "2.5.*" }, "autoload": { "psr-0": { @@ -23,7 +20,7 @@ "target-dir": "Illuminate/Filesystem", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php index 6e20717..e4b15a0 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php @@ -27,7 +27,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn * * @var string */ - const VERSION = '4.1.30'; + const VERSION = '4.2.1'; /** * Indicates if the application has "booted". @@ -289,7 +289,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn * @param array $options * @return \Illuminate\Support\ServiceProvider */ - public function forgeRegister($provider, $options = array()) + public function forceRegister($provider, $options = array()) { return $this->register($provider, $options, true); } @@ -654,7 +654,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn */ protected function registerBaseMiddlewares() { - $this->middleware('Illuminate\Http\FrameGuard'); + // } /** @@ -839,7 +839,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn */ public function isDownForMaintenance() { - return file_exists($this['path.storage'].'/meta/down'); + return file_exists($this['config']['app.manifest'].'/down'); } /** @@ -1081,7 +1081,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn 'translator' => 'Illuminate\Translation\Translator', 'log' => 'Illuminate\Log\Writer', 'mailer' => 'Illuminate\Mail\Mailer', - 'paginator' => 'Illuminate\Pagination\Environment', + 'paginator' => 'Illuminate\Pagination\Factory', 'auth.reminder' => 'Illuminate\Auth\Reminders\PasswordBroker', 'queue' => 'Illuminate\Queue\QueueManager', 'redirect' => 'Illuminate\Routing\Redirector', @@ -1093,7 +1093,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn 'remote' => 'Illuminate\Remote\RemoteManager', 'url' => 'Illuminate\Routing\UrlGenerator', 'validator' => 'Illuminate\Validation\Factory', - 'view' => 'Illuminate\View\Environment', + 'view' => 'Illuminate\View\Factory', ); foreach ($aliases as $key => $alias) diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php b/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php index 00dc38b..699a92f 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Composer.php @@ -66,7 +66,7 @@ class Composer { { if ($this->files->exists($this->workingPath.'/composer.phar')) { - return 'php composer.phar'; + return '"'.PHP_BINARY.'" composer.phar'; } return 'composer'; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php index a0b9b86..43e0c04 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.php @@ -30,7 +30,7 @@ class ClearCompiledCommand extends Command { @unlink($path); } - if (file_exists($path = $this->laravel['path.storage'].'/meta/services.json')) + if (file_exists($path = $this->laravel['config']['app.manifest'].'/services.json')) { @unlink($path); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php index 81fd951..50e1a36 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/DownCommand.php @@ -25,7 +25,7 @@ class DownCommand extends Command { */ public function fire() { - touch($this->laravel['path.storage'].'/meta/down'); + touch($this->laravel['config']['app.manifest'].'/down'); $this->comment('Application is now in maintenance mode.'); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/MigratePublishCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/MigratePublishCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php index 16f8e81..8958083 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/RoutesCommand.php @@ -37,13 +37,6 @@ class RoutesCommand extends Command { protected $routes; /** - * The table helper set. - * - * @var \Symfony\Component\Console\Helper\TableHelper - */ - protected $table; - - /** * The table headers for the command. * * @var array @@ -73,8 +66,6 @@ class RoutesCommand extends Command { */ public function fire() { - $this->table = $this->getHelperSet()->get('table'); - if (count($this->routes) == 0) { return $this->error("Your application doesn't have any routes."); @@ -129,9 +120,7 @@ class RoutesCommand extends Command { */ protected function displayRoutes(array $routes) { - $this->table->setHeaders($this->headers)->setRows($routes); - - $this->table->render($this->getOutput()); + $this->table($this->headers, $routes); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php old mode 100755 new mode 100644 index b4c7871..607f68b --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/TailCommand.php @@ -71,7 +71,7 @@ class TailCommand extends Command { $lines = $this->option('lines'); - with(new Process('tail -f -n '.$lines.' '.$path))->setTimeout(null)->run(function($type, $line) use ($output) + with(new Process('tail -f -n '.$lines.' '.escapeshellarg($path)))->setTimeout(null)->run(function($type, $line) use ($output) { $output->write($line); }); @@ -90,7 +90,7 @@ class TailCommand extends Command { $lines = $this->option('lines'); - $this->getRemote($connection)->run('tail -f -n '.$lines.' '.$path, function($line) use ($out) + $this->getRemote($connection)->run('tail -f -n '.$lines.' '.escapeshellarg($path), function($line) use ($out) { $out->write($line); }); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php index f34248a..dd84552 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/UpCommand.php @@ -25,7 +25,7 @@ class UpCommand extends Command { */ public function fire() { - @unlink($this->laravel['path.storage'].'/meta/down'); + @unlink($this->laravel['config']['app.manifest'].'/down'); $this->info('Application is now live.'); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php b/vendor/laravel/framework/src/Illuminate/Foundation/EnvironmentDetector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php b/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php old mode 100755 new mode 100644 index 8ec77e1..18be957 --- a/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/MigrationPublisher.php @@ -61,11 +61,9 @@ class MigrationPublisher { */ protected function getFreshMigrations($source, $destination) { - $me = $this; - - return array_filter($this->getPackageMigrations($source), function($file) use ($me, $destination) + return array_filter($this->getPackageMigrations($source), function($file) use ($destination) { - return ! $me->migrationExists($file, $destination); + return ! $this->migrationExists($file, $destination); }); } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php index 7173984..e7d27cd 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php @@ -200,7 +200,7 @@ class ProviderRepository { { $path = $this->manifestPath.'/services.json'; - $this->files->put($path, json_encode($manifest)); + $this->files->put($path, json_encode($manifest, JSON_PRETTY_PRINT)); return $manifest; } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Foundation/Providers/ConsoleSupportServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php index fb88b50..a86f7ef 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php @@ -326,7 +326,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase { { $this->assertSessionHas('errors'); - $bindings = (array)$bindings; + $bindings = (array) $bindings; $errors = $this->app['session.store']->get('errors'); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/changes.json b/vendor/laravel/framework/src/Illuminate/Foundation/changes.json index 1eba3ae..4f558ab 100755 --- a/vendor/laravel/framework/src/Illuminate/Foundation/changes.json +++ b/vendor/laravel/framework/src/Illuminate/Foundation/changes.json @@ -1,4 +1,30 @@ { + "4.2.*": [ + {"message": "View and Pagination 'Environment' classes renamed to 'Factory'.", "backport": null}, + {"message": "Configurable encryption for Iron.io queue messages.", "backport": null}, + {"message": "Make FrameGuard middleware opt-in.", "backport": null}, + {"message": "Convert View '$errors' shared variable into ViewErrorBag. Allows multiple bags per view. Should be backwards compatible.", "backport": null}, + {"message": "Calling 'create' on a HasOne or HasMany relation will now use 'fill' method so mutators are executed on related model.", "backport": null}, + {"message": "Use rawurldecode when decoding parameters in Route::parameters.", "backport": null}, + {"message": "When date_format validation rule is used, before and after validation dates must match given format.", "backport": null}, + {"message": "Added ability to register global Eloquent scopes using traits and addGlobalScope.", "backport": null}, + {"message": "Soft deleting converted to use new global scope facilities.", "backport": null}, + {"message": "Added ability to extend Eloquent Builder using 'macro' method.", "backport": null}, + {"message": "Soft deleting models now use SoftDeletingTrait instead of softDelete property.", "backport": null}, + {"message": "The queue:listen command will now write the names of the jobs it processes to the console.", "backport": null}, + {"message": "Added Mailgun API transport for Mail::send. Depends on new 'services' configuration file.", "backport": null}, + {"message": "Added Mandrill API transport for Mail::send. Depends on new 'services' configuration file.", "backport": null}, + {"message": "Added 'log' mail transport for Mail::send. Writes raw MIME string to log files.", "backport": null}, + {"message": "Added simplePaginate method to query and Eloquent builder.", "backport": null}, + {"message": "Destructive migration operations now require confirmation or --force when being run in production.", "backport": null}, + {"message": "Added Cache::pull method for retrieving a value and then deleting it.", "backport": null}, + {"message": "Added Session::pull method for retrieving a value and then deleting it.", "backport": null}, + {"message": "Added rel attribute to basic pagination links.", "backport": null}, + {"message": "The 'page' query variable is now ignored when calling the paginator 'appends' method.", "backport": null}, + {"message": "Empty arrays that are 'required' validate as false when empty.", "backport": null}, + {"message": "Added --daemon option to the queue:work command.", "backport": null}, + {"message": "Added convenient traits for authentication and password reminding.", "backport": null} + ], "4.1.*": [ {"message": "Added new SSH task runner tools.", "backport": null}, {"message": "Allow before and after validation rules to reference other fields.", "backport": null}, diff --git a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json index fbc91e9..b85b2cc 100755 --- a/vendor/laravel/framework/src/Illuminate/Hashing/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Hashing/composer.json @@ -8,12 +8,9 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*", - "ircmaxell/password-compat": "1.0.*" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*", + "ircmaxell/password-compat": "~1.0" }, "autoload": { "psr-0": { @@ -23,7 +20,7 @@ "target-dir": "Illuminate/Hashing", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php b/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php index 729c0bb..6e22577 100755 --- a/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Html/FormBuilder.php @@ -2,9 +2,12 @@ use Illuminate\Routing\UrlGenerator; use Illuminate\Session\Store as Session; +use Illuminate\Support\Traits\MacroableTrait; class FormBuilder { + use MacroableTrait; + /** * The HTML builder instance. * @@ -48,13 +51,6 @@ class FormBuilder { protected $labels = array(); /** - * The registered form builder macros. - * - * @var array - */ - protected $macros = array(); - - /** * The reserved form open attributes. * * @var array @@ -732,18 +728,6 @@ class FormBuilder { } /** - * Register a custom form macro. - * - * @param string $name - * @param callable $macro - * @return void - */ - public function macro($name, $macro) - { - $this->macros[$name] = $macro; - } - - /** * Parse the form action method. * * @param string $method @@ -985,23 +969,4 @@ class FormBuilder { return $this; } - /** - * Dynamically handle calls to the form builder. - * - * @param string $method - * @param array $parameters - * @return mixed - * - * @throws \BadMethodCallException - */ - public function __call($method, $parameters) - { - if (isset($this->macros[$method])) - { - return call_user_func_array($this->macros[$method], $parameters); - } - - throw new \BadMethodCallException("Method {$method} does not exist."); - } - } diff --git a/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php b/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php index 133b720..89da5d8 100755 --- a/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php +++ b/vendor/laravel/framework/src/Illuminate/Html/HtmlBuilder.php @@ -1,9 +1,12 @@ macros[$name] = $macro; - } - - /** * Convert an HTML string to entities. * * @param string $value @@ -392,23 +376,4 @@ class HtmlBuilder { return $safe; } - /** - * Dynamically handle calls to the html class. - * - * @param string $method - * @param array $parameters - * @return mixed - * - * @throws \BadMethodCallException - */ - public function __call($method, $parameters) - { - if (isset($this->macros[$method])) - { - return call_user_func_array($this->macros[$method], $parameters); - } - - throw new \BadMethodCallException("Method {$method} does not exist."); - } - } diff --git a/vendor/laravel/framework/src/Illuminate/Html/composer.json b/vendor/laravel/framework/src/Illuminate/Html/composer.json index 6f408a2..a498acf 100755 --- a/vendor/laravel/framework/src/Illuminate/Html/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Html/composer.json @@ -8,14 +8,10 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/http": "4.1.*", - "illuminate/session": "4.1.*", - "illuminate/support": "4.1.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/http": "4.2.*", + "illuminate/session": "4.2.*", + "illuminate/support": "4.2.*" }, "autoload": { "psr-0": { @@ -25,7 +21,7 @@ "target-dir": "Illuminate/Html", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php b/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php index 0c23026..678a54f 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php @@ -1,10 +1,11 @@ update(); } - /** - * Set a header on the Response. - * - * @param string $key - * @param string $value - * @param bool $replace - * @return \Illuminate\Http\Response - */ - public function header($key, $value, $replace = true) - { - $this->headers->set($key, $value, $replace); - - return $this; - } - - /** - * Add a cookie to the response. - * - * @param \Symfony\Component\HttpFoundation\Cookie $cookie - * @return \Illuminate\Http\Response - */ - public function withCookie(Cookie $cookie) - { - $this->headers->setCookie($cookie); - - return $this; - } - } diff --git a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php index b0a72aa..5b29d0c 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php +++ b/vendor/laravel/framework/src/Illuminate/Http/RedirectResponse.php @@ -1,6 +1,7 @@ parseErrors($provider); + + $this->session->flash( + 'errors', $this->session->get('errors', new ViewErrorBag)->put($key, $value) + ); + + return $this; + } + + /** + * Parse the given errors into an appropriate value. + * + * @param \Illuminate\Support\Contracts\MessageProviderInterface|array $provider + * @return \Illuminate\Support\MessageBag + */ + protected function parseErrors($provider) { if ($provider instanceof MessageProviderInterface) { - $this->with('errors', $provider->getMessageBag()); + return $provider->getMessageBag(); } else { - $this->with('errors', new MessageBag((array) $provider)); + return new MessageBag((array) $provider); } - - return $this; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Http/Response.php b/vendor/laravel/framework/src/Illuminate/Http/Response.php index 58812e1..8206f9a 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/Response.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Response.php @@ -1,12 +1,13 @@ headers->set($key, $value, $replace); - - return $this; - } - - /** - * Add a cookie to the response. - * - * @param \Symfony\Component\HttpFoundation\Cookie $cookie - * @return \Illuminate\Http\Response - */ - public function withCookie(Cookie $cookie) - { - $this->headers->setCookie($cookie); - - return $this; - } - - /** * Set the content on the response. * * @param mixed $content diff --git a/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php new file mode 100644 index 0000000..b9ca057 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php @@ -0,0 +1,35 @@ +headers->set($key, $value, $replace); + + return $this; + } + + /** + * Add a cookie to the response. + * + * @param \Symfony\Component\HttpFoundation\Cookie $cookie + * @return \Illuminate\Http\Response + */ + public function withCookie(Cookie $cookie) + { + $this->headers->setCookie($cookie); + + return $this; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Http/composer.json b/vendor/laravel/framework/src/Illuminate/Http/composer.json index a9391e6..d8d6b80 100755 --- a/vendor/laravel/framework/src/Illuminate/Http/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Http/composer.json @@ -8,15 +8,11 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/session": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/session": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*" }, "autoload": { "psr-0": { @@ -26,7 +22,7 @@ "target-dir": "Illuminate/Http", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Log/Writer.php b/vendor/laravel/framework/src/Illuminate/Log/Writer.php index 5294960..43a5aae 100755 --- a/vendor/laravel/framework/src/Illuminate/Log/Writer.php +++ b/vendor/laravel/framework/src/Illuminate/Log/Writer.php @@ -5,7 +5,10 @@ use Illuminate\Events\Dispatcher; use Monolog\Handler\StreamHandler; use Monolog\Logger as MonologLogger; use Monolog\Formatter\LineFormatter; +use Monolog\Handler\ErrorLogHandler; use Monolog\Handler\RotatingFileHandler; +use Illuminate\Support\Contracts\JsonableInterface; +use Illuminate\Support\Contracts\ArrayableInterface; class Writer { @@ -60,7 +63,7 @@ class Writer { * Call Monolog with the given method and parameters. * * @param string $method - * @param array $parameters + * @param mixed $parameters * @return mixed */ protected function callMonolog($method, $parameters) @@ -86,7 +89,7 @@ class Writer { $this->monolog->pushHandler($handler = new StreamHandler($path, $level)); - $handler->setFormatter(new LineFormatter(null, null, true)); + $handler->setFormatter($this->getDefaultFormatter()); } /** @@ -103,7 +106,33 @@ class Writer { $this->monolog->pushHandler($handler = new RotatingFileHandler($path, $days, $level)); - $handler->setFormatter(new LineFormatter(null, null, true)); + $handler->setFormatter($this->getDefaultFormatter()); + } + + /** + * Register an error_log handler. + * + * @param integer $messageType + * @param string $level + * @return void + */ + public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OPERATING_SYSTEM) + { + $level = $this->parseLevel($level); + + $this->monolog->pushHandler($handler = new ErrorLogHandler($messageType, $level)); + + $handler->setFormatter($this->getDefaultFormatter()); + } + + /** + * Get a defaut Monolog formatter instance. + * + * @return \Monolog\Formatters\LineFormatter + */ + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true); } /** @@ -201,7 +230,8 @@ class Writer { * Fires a log event. * * @param string $level - * @param array $parameters + * @param string $message + * @param array $context * @return void */ protected function fireLogEvent($level, $message, array $context = array()) @@ -232,13 +262,15 @@ class Writer { * Dynamically handle error additions. * * @param string $method - * @param array $parameters + * @param mixed $parameters * @return mixed * * @throws \BadMethodCallException */ public function __call($method, $parameters) { + $this->formatParameters($parameters); + if (in_array($method, $this->levels)) { call_user_func_array(array($this, 'fireLogEvent'), array_merge(array($method), $parameters)); @@ -251,4 +283,29 @@ class Writer { throw new \BadMethodCallException("Method [$method] does not exist."); } + /** + * Format the parameters for the logger. + * + * @param mixed $parameters + * @return void + */ + protected function formatParameters(&$parameters) + { + if (isset($parameters[0])) + { + if (is_array($parameters[0])) + { + $parameters[0] = var_export($parameters[0], true); + } + elseif ($parameters[0] instanceof JsonableInterface) + { + $parameters[0] = $parameters[0]->toJson(); + } + elseif ($parameters[0] instanceof ArrayableInterface) + { + $parameters[0] = var_export($parameters[0]->toArray(), true); + } + } + } + } diff --git a/vendor/laravel/framework/src/Illuminate/Log/composer.json b/vendor/laravel/framework/src/Illuminate/Log/composer.json index 6836ca9..155dc57 100755 --- a/vendor/laravel/framework/src/Illuminate/Log/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Log/composer.json @@ -8,14 +8,12 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*", - "monolog/monolog": "1.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*", + "monolog/monolog": "~1.6" }, "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*", - "illuminate/events": "4.1.*" + "illuminate/events": "4.2.*" }, "autoload": { "psr-0": { @@ -25,7 +23,7 @@ "target-dir": "Illuminate/Log", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php index 40beb30..ea625d9 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php @@ -4,6 +4,9 @@ use Swift_Mailer; use Illuminate\Support\ServiceProvider; use Swift_SmtpTransport as SmtpTransport; use Swift_MailTransport as MailTransport; +use Illuminate\Mail\Transport\LogTransport; +use Illuminate\Mail\Transport\MailgunTransport; +use Illuminate\Mail\Transport\MandrillTransport; use Swift_SendmailTransport as SendmailTransport; class MailServiceProvider extends ServiceProvider { @@ -31,7 +34,9 @@ class MailServiceProvider extends ServiceProvider { // Once we have create the mailer instance, we will set a container instance // on the mailer. This allows us to resolve mailer classes via containers // for maximum testability on said classes instead of passing Closures. - $mailer = new Mailer($app['view'], $app['swift.mailer']); + $mailer = new Mailer( + $app['view'], $app['swift.mailer'], $app['events'] + ); $mailer->setLogger($app['log'])->setQueue($app['queue']); @@ -99,6 +104,15 @@ class MailServiceProvider extends ServiceProvider { case 'mail': return $this->registerMailTransport($config); + case 'mailgun': + return $this->registerMailgunTransport($config); + + case 'mandrill': + return $this->registerMandrillTransport($config); + + case 'log': + return $this->registerLogTransport($config); + default: throw new \InvalidArgumentException('Invalid mail driver.'); } @@ -169,6 +183,52 @@ class MailServiceProvider extends ServiceProvider { } /** + * Register the Mailgun Swift Transport instance. + * + * @param array $config + * @return void + */ + protected function registerMailgunTransport($config) + { + $mailgun = $this->app['config']->get('services.mailgun', array()); + + $this->app->bindShared('swift.transport', function() use ($mailgun) + { + return new MailgunTransport($mailgun['secret'], $mailgun['domain']); + }); + } + + /** + * Register the Mandrill Swift Transport instance. + * + * @param array $config + * @return void + */ + protected function registerMandrillTransport($config) + { + $mandrill = $this->app['config']->get('services.mandrill', array()); + + $this->app->bindShared('swift.transport', function() use ($mandrill) + { + return new MandrillTransport($mandrill['secret']); + }); + } + + /** + * Register the "Log" Swift Transport instance. + * + * @param array $config + * @return void + */ + protected function registerLogTransport($config) + { + $this->app->bindShared('swift.transport', function($app) + { + return new LogTransport($app['log']->getMonolog()); + }); + } + + /** * Get the services provided by the provider. * * @return array diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php index d55c56e..d4f6fcf 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php @@ -4,7 +4,8 @@ use Closure; use Swift_Mailer; use Swift_Message; use Illuminate\Log\Writer; -use Illuminate\View\Environment; +use Illuminate\View\Factory; +use Illuminate\Events\Dispatcher; use Illuminate\Queue\QueueManager; use Illuminate\Container\Container; use Illuminate\Support\SerializableClosure; @@ -12,9 +13,9 @@ use Illuminate\Support\SerializableClosure; class Mailer { /** - * The view environment instance. + * The view factory instance. * - * @var \Illuminate\View\Environment + * @var \Illuminate\View\Factory */ protected $views; @@ -26,6 +27,13 @@ class Mailer { protected $swift; /** + * The event dispatcher instance. + * + * @var \Illuminate\Events\Dispatcher + */ + protected $events; + + /** * The global from address and name. * * @var array @@ -46,6 +54,13 @@ class Mailer { */ protected $container; + /* + * The QueueManager instance. + * + * @var \Illuminate\Queue\QueueManager + */ + protected $queue; + /** * Indicates if the actual sending is disabled. * @@ -61,23 +76,24 @@ class Mailer { protected $failedRecipients = array(); /** - * The QueueManager instance. + * Array of parsed views containing html and text view name. * - * @var \Illuminate\Queue\QueueManager + * @var array */ - protected $queue; + protected $parsedViews = array(); /** * Create a new Mailer instance. * - * @param \Illuminate\View\Environment $views + * @param \Illuminate\View\Factory $views * @param \Swift_Mailer $swift * @return void */ - public function __construct(Environment $views, Swift_Mailer $swift) + public function __construct(Factory $views, Swift_Mailer $swift, Dispatcher $events = null) { $this->views = $views; $this->swift = $swift; + $this->events = $events; } /** @@ -298,19 +314,22 @@ class Mailer { * Send a Swift Message instance. * * @param \Swift_Message $message - * @return int + * @return void */ protected function sendSwiftMessage($message) { + if ($this->events) + { + $this->events->fire('mailer.sending', array($message)); + } + if ( ! $this->pretending) { - return $this->swift->send($message, $this->failedRecipients); + $this->swift->send($message, $this->failedRecipients); } elseif (isset($this->logger)) { $this->logMessage($message); - - return 1; } } @@ -394,11 +413,11 @@ class Mailer { } /** - * Get the view environment instance. + * Get the view factory instance. * - * @return \Illuminate\View\Environment + * @return \Illuminate\View\Factory */ - public function getViewEnvironment() + public function getViewFactory() { return $this->views; } diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php new file mode 100644 index 0000000..467d47f --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/LogTransport.php @@ -0,0 +1,68 @@ +logger = $logger; + } + + /** + * {@inheritdoc} + */ + public function isStarted() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function start() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function stop() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $this->logger->debug((string) $message); + } + + /** + * {@inheritdoc} + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + // + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php new file mode 100644 index 0000000..58de4d0 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MailgunTransport.php @@ -0,0 +1,166 @@ +key = $key; + $this->domain = $domain; + $this->url = 'https://api.mailgun.net/v2/'.$this->domain.'/messages.mime'; + } + + /** + * {@inheritdoc} + */ + public function isStarted() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function start() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function stop() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $client = $this->getHttpClient(); + + $client->post($this->url, ['auth' => ['api', $this->key], + 'body' => [ + 'to' => $this->getTo($message), + 'message' => new PostFile('message', (string) $message), + ], + ]); + } + + /** + * {@inheritdoc} + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + // + } + + /** + * Get the "to" payload field for the API request. + * + * @param \Swift_Mime_Message $message + * @return array + */ + protected function getTo(Swift_Mime_Message $message) + { + $formatted = []; + + $contacts = array_merge( + (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() + ); + + foreach ($contacts as $address => $display) + { + $formatted[] = $display ? $display." <$address>" : $address; + } + + return implode(',', $formatted); + } + + /** + * Get a new HTTP client instance. + * + * @return \GuzzleHttp\Client + */ + protected function getHttpClient() + { + return new \GuzzleHttp\Client; + } + + /** + * Get the API key being used by the transport. + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set the API key being used by the transport. + * + * @param string $key + * @return void + */ + public function setKey($key) + { + return $this->key = $key; + } + + /** + * Get the domain being used by the transport. + * + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Set the domain being used by the transport. + * + * @param string $domain + * @return void + */ + public function setDomain($domain) + { + return $this->domain = $domain; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php new file mode 100644 index 0000000..5cb0dbf --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Mail/Transport/MandrillTransport.php @@ -0,0 +1,106 @@ +key = $key; + } + + /** + * {@inheritdoc} + */ + public function isStarted() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function start() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function stop() + { + return true; + } + + /** + * {@inheritdoc} + */ + public function send(Swift_Mime_Message $message, &$failedRecipients = null) + { + $client = $this->getHttpClient(); + + $client->post('https://mandrillapp.com/api/1.0/messages/send-raw.json', [ + 'body' => [ + 'key' => $this->key, + 'raw_message' => (string) $message, + 'async' => true, + ], + ]); + } + + /** + * {@inheritdoc} + */ + public function registerPlugin(Swift_Events_EventListener $plugin) + { + // + } + + /** + * Get a new HTTP client instance. + * + * @return \Guzzle\Http\Client + */ + protected function getHttpClient() + { + return new \GuzzleHttp\Client; + } + + /** + * Get the API key being used by the transport. + * + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Set the API key being used by the transport. + * + * @param string $key + * @return void + */ + public function setKey($key) + { + return $this->key = $key; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Mail/composer.json b/vendor/laravel/framework/src/Illuminate/Mail/composer.json index fbb6b0f..0fe7384 100755 --- a/vendor/laravel/framework/src/Illuminate/Mail/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Mail/composer.json @@ -8,17 +8,15 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/container": "4.1.*", - "illuminate/log": "4.1.*", - "illuminate/support": "4.1.*", - "illuminate/view": "4.1.*", - "swiftmailer/swiftmailer": "~5.0" + "php": ">=5.4.0", + "illuminate/container": "4.2.*", + "illuminate/log": "4.2.*", + "illuminate/support": "4.2.*", + "illuminate/view": "4.2.*", + "swiftmailer/swiftmailer": "~5.1" }, "require-dev": { - "illuminate/queue": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/queue": "4.2.*" }, "autoload": { "psr-0": { @@ -28,7 +26,7 @@ "target-dir": "Illuminate/Mail", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php b/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php old mode 100755 new mode 100644 index 65049cb..dc9c7c2 --- a/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/BootstrapPresenter.php @@ -7,11 +7,14 @@ class BootstrapPresenter extends Presenter { * * @param string $url * @param int $page + * @param string $rel * @return string */ - public function getPageLinkWrapper($url, $page) + public function getPageLinkWrapper($url, $page, $rel = null) { - return '
  • '.$page.'
  • '; + $rel = is_null($rel) ? '' : ' rel="'.$rel.'"'; + + return '
  • '.$page.'
  • '; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Environment.php b/vendor/laravel/framework/src/Illuminate/Pagination/Environment.php deleted file mode 100755 index 83450f7..0000000 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Environment.php +++ /dev/null @@ -1,289 +0,0 @@ -view = $view; - $this->trans = $trans; - $this->request = $request; - $this->pageName = $pageName; - $this->setupPaginationEnvironment(); - } - - /** - * Setup the pagination environment. - * - * @return void - */ - protected function setupPaginationEnvironment() - { - $this->view->addNamespace('pagination', __DIR__.'/views'); - } - - /** - * Get a new paginator instance. - * - * @param array $items - * @param int $total - * @param int $perPage - * @return \Illuminate\Pagination\Paginator - */ - public function make(array $items, $total, $perPage) - { - $paginator = new Paginator($this, $items, $total, $perPage); - - return $paginator->setupPaginationContext(); - } - - /** - * Get the pagination view. - * - * @param \Illuminate\Pagination\Paginator $paginator - * @param string $view - * @return \Illuminate\View\View - */ - public function getPaginationView(Paginator $paginator, $view = null) - { - $data = array('environment' => $this, 'paginator' => $paginator); - - return $this->view->make($this->getViewName($view), $data); - } - - /** - * Get the number of the current page. - * - * @return int - */ - public function getCurrentPage() - { - $page = (int) $this->currentPage ?: $this->request->input($this->pageName, 1); - - if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false) - { - return 1; - } - - return $page; - } - - /** - * Set the number of the current page. - * - * @param int $number - * @return void - */ - public function setCurrentPage($number) - { - $this->currentPage = $number; - } - - /** - * Get the root URL for the request. - * - * @return string - */ - public function getCurrentUrl() - { - return $this->baseUrl ?: $this->request->url(); - } - - /** - * Set the base URL in use by the paginator. - * - * @param string $baseUrl - * @return void - */ - public function setBaseUrl($baseUrl) - { - $this->baseUrl = $baseUrl; - } - - /** - * Set the input page parameter name used by the paginator. - * - * @param string $pageName - * @return void - */ - public function setPageName($pageName) - { - $this->pageName = $pageName; - } - - /** - * Get the input page parameter name used by the paginator. - * - * @return string - */ - public function getPageName() - { - return $this->pageName; - } - - /** - * Get the name of the pagination view. - * - * @param string $view - * @return string - */ - public function getViewName($view = null) - { - if ( ! is_null($view)) return $view; - - return $this->viewName ?: 'pagination::slider'; - } - - /** - * Set the name of the pagination view. - * - * @param string $viewName - * @return void - */ - public function setViewName($viewName) - { - $this->viewName = $viewName; - } - - /** - * Get the locale of the paginator. - * - * @return string - */ - public function getLocale() - { - return $this->locale; - } - - /** - * Set the locale of the paginator. - * - * @param string $locale - * @return void - */ - public function setLocale($locale) - { - $this->locale = $locale; - } - - /** - * Get the active request instance. - * - * @return \Symfony\Component\HttpFoundation\Request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Set the active request instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @return void - */ - public function setRequest(Request $request) - { - $this->request = $request; - } - - /** - * Get the current view driver. - * - * @return \Illuminate\View\Environment - */ - public function getViewDriver() - { - return $this->view; - } - - /** - * Set the current view driver. - * - * @param \Illuminate\View\Environment $view - * @return void - */ - public function setViewDriver(ViewEnvironment $view) - { - $this->view = $view; - } - - /** - * Get the translator instance. - * - * @return \Symfony\Component\Translation\TranslatorInterface - */ - public function getTranslator() - { - return $this->trans; - } - -} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Factory.php b/vendor/laravel/framework/src/Illuminate/Pagination/Factory.php new file mode 100755 index 0000000..4026495 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Factory.php @@ -0,0 +1,289 @@ +view = $view; + $this->trans = $trans; + $this->request = $request; + $this->pageName = $pageName; + $this->setupPaginationEnvironment(); + } + + /** + * Setup the pagination environment. + * + * @return void + */ + protected function setupPaginationEnvironment() + { + $this->view->addNamespace('pagination', __DIR__.'/views'); + } + + /** + * Get a new paginator instance. + * + * @param array $items + * @param int $total + * @param int|null $perPage + * @return \Illuminate\Pagination\Paginator + */ + public function make(array $items, $total, $perPage = null) + { + $paginator = new Paginator($this, $items, $total, $perPage); + + return $paginator->setupPaginationContext(); + } + + /** + * Get the pagination view. + * + * @param \Illuminate\Pagination\Paginator $paginator + * @param string $view + * @return \Illuminate\View\View + */ + public function getPaginationView(Paginator $paginator, $view = null) + { + $data = array('environment' => $this, 'paginator' => $paginator); + + return $this->view->make($this->getViewName($view), $data); + } + + /** + * Get the number of the current page. + * + * @return int + */ + public function getCurrentPage() + { + $page = (int) $this->currentPage ?: $this->request->input($this->pageName, 1); + + if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false) + { + return 1; + } + + return $page; + } + + /** + * Set the number of the current page. + * + * @param int $number + * @return void + */ + public function setCurrentPage($number) + { + $this->currentPage = $number; + } + + /** + * Get the root URL for the request. + * + * @return string + */ + public function getCurrentUrl() + { + return $this->baseUrl ?: $this->request->url(); + } + + /** + * Set the base URL in use by the paginator. + * + * @param string $baseUrl + * @return void + */ + public function setBaseUrl($baseUrl) + { + $this->baseUrl = $baseUrl; + } + + /** + * Set the input page parameter name used by the paginator. + * + * @param string $pageName + * @return void + */ + public function setPageName($pageName) + { + $this->pageName = $pageName; + } + + /** + * Get the input page parameter name used by the paginator. + * + * @return string + */ + public function getPageName() + { + return $this->pageName; + } + + /** + * Get the name of the pagination view. + * + * @param string $view + * @return string + */ + public function getViewName($view = null) + { + if ( ! is_null($view)) return $view; + + return $this->viewName ?: 'pagination::slider'; + } + + /** + * Set the name of the pagination view. + * + * @param string $viewName + * @return void + */ + public function setViewName($viewName) + { + $this->viewName = $viewName; + } + + /** + * Get the locale of the paginator. + * + * @return string + */ + public function getLocale() + { + return $this->locale; + } + + /** + * Set the locale of the paginator. + * + * @param string $locale + * @return void + */ + public function setLocale($locale) + { + $this->locale = $locale; + } + + /** + * Get the active request instance. + * + * @return \Symfony\Component\HttpFoundation\Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * Set the active request instance. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @return void + */ + public function setRequest(Request $request) + { + $this->request = $request; + } + + /** + * Get the current view factory. + * + * @return \Illuminate\View\Factory + */ + public function getViewFactory() + { + return $this->view; + } + + /** + * Set the current view factory. + * + * @param \Illuminate\View\Factory $view + * @return void + */ + public function setViewFactory(ViewFactory $view) + { + $this->view = $view; + } + + /** + * Get the translator instance. + * + * @return \Symfony\Component\Translation\TranslatorInterface + */ + public function getTranslator() + { + return $this->trans; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php index 7737cdb..dfec6df 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php @@ -20,7 +20,7 @@ class PaginationServiceProvider extends ServiceProvider { { $this->app->bindShared('paginator', function($app) { - $paginator = new Environment($app['request'], $app['view'], $app['translator']); + $paginator = new Factory($app['request'], $app['view'], $app['translator']); $paginator->setViewName($app['config']['view.pagination']); diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php index 55f6ec3..81ac396 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Paginator.php @@ -11,11 +11,11 @@ use Illuminate\Support\Contracts\ArrayableInterface; class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorAggregate, JsonableInterface { /** - * The pagination environment. + * The pagination factory. * - * @var \Illuminate\Pagination\Environment + * @var \Illuminate\Pagination\Factory */ - protected $env; + protected $factory; /** * The items being paginated. @@ -32,6 +32,13 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA protected $total; /** + * Indicates if a pagination doing "quick" pagination has more items. + * + * @var bool + */ + protected $hasMore; + + /** * The amount of items to show per page. * * @var int @@ -83,18 +90,28 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA /** * Create a new Paginator instance. * - * @param \Illuminate\Pagination\Environment $env + * @param \Illuminate\Pagination\Factory $factory * @param array $items * @param int $total - * @param int $perPage + * @param mixed $perPage * @return void */ - public function __construct(Environment $env, array $items, $total, $perPage) + public function __construct(Factory $factory, array $items, $total, $perPage = null) { - $this->env = $env; - $this->items = $items; - $this->total = (int) $total; - $this->perPage = (int) $perPage; + $this->factory = $factory; + + if (is_null($perPage)) + { + $this->perPage = (int) $total; + $this->items = array_slice($items, 0, $perPage); + $this->hasMore = count(array_slice($items, $this->perPage, 1)) > 0; + } + else + { + $this->items = $items; + $this->total = (int) $total; + $this->perPage = (int) $perPage; + } } /** @@ -118,9 +135,18 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ protected function calculateCurrentAndLastPages() { - $this->lastPage = (int) ceil($this->total / $this->perPage); + if ($this->isQuickPaginating()) + { + $this->currentPage = $this->factory->getCurrentPage(); + + $this->lastPage = $this->hasMore ? $this->currentPage + 1 : $this->currentPage; + } + else + { + $this->lastPage = (int) ceil($this->total / $this->perPage); - $this->currentPage = $this->calculateCurrentPage($this->lastPage); + $this->currentPage = $this->calculateCurrentPage($this->lastPage); + } } /** @@ -143,7 +169,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ protected function calculateCurrentPage($lastPage) { - $page = $this->env->getCurrentPage(); + $page = $this->factory->getCurrentPage(); // The page number will get validated and adjusted if it either less than one // or greater than the last page available based on the count of the given @@ -175,7 +201,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ public function links($view = null) { - return $this->env->getPaginationView($this, $view); + return $this->factory->getPaginationView($this, $view); } /** @@ -187,7 +213,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA public function getUrl($page) { $parameters = array( - $this->env->getPageName() => $page, + $this->factory->getPageName() => $page, ); // If we have any extra query string key / value pairs that need to be added @@ -200,7 +226,7 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA $fragment = $this->buildFragment(); - return $this->env->getCurrentUrl().'?'.http_build_query($parameters, null, '&').$fragment; + return $this->factory->getCurrentUrl().'?'.http_build_query($parameters, null, '&').$fragment; } /** @@ -265,12 +291,25 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ public function addQuery($key, $value) { - $this->query[$key] = $value; + if ($key !== $this->factory->getPageName()) + { + $this->query[$key] = $value; + } return $this; } /** + * Determine if the paginator is doing "quick" pagination. + * + * @return bool + */ + public function isQuickPaginating() + { + return is_null($this->total); + } + + /** * Get the current page for the request. * * @param int|null $total @@ -377,17 +416,17 @@ class Paginator implements ArrayableInterface, ArrayAccess, Countable, IteratorA */ public function setBaseUrl($baseUrl) { - $this->env->setBaseUrl($baseUrl); + $this->factory->setBaseUrl($baseUrl); } /** - * Get the pagination environment. + * Get the pagination factory. * - * @return \Illuminate\Pagination\Environment + * @return \Illuminate\Pagination\Factory */ - public function getEnvironment() + public function getFactory() { - return $this->env; + return $this->factory; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php b/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php index 9e4f825..ad0798b 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/Presenter.php @@ -41,9 +41,10 @@ abstract class Presenter { * * @param string $url * @param int $page + * @param string $rel * @return string */ - abstract public function getPageLinkWrapper($url, $page); + abstract public function getPageLinkWrapper($url, $page, $rel = null); /** * Get HTML wrapper for disabled text. @@ -205,7 +206,7 @@ abstract class Presenter { { $url = $this->paginator->getUrl($this->currentPage - 1); - return $this->getPageLinkWrapper($url, $text); + return $this->getPageLinkWrapper($url, $text, 'prev'); } } @@ -228,7 +229,7 @@ abstract class Presenter { { $url = $this->paginator->getUrl($this->currentPage + 1); - return $this->getPageLinkWrapper($url, $text); + return $this->getPageLinkWrapper($url, $text, 'next'); } } diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json index 7d09a3b..432459c 100755 --- a/vendor/laravel/framework/src/Illuminate/Pagination/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Pagination/composer.json @@ -8,16 +8,12 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/http": "4.1.*", - "illuminate/support": "4.1.*", - "illuminate/view": "4.1.*", - "symfony/http-foundation": "2.4.*", - "symfony/translation": "2.4.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/http": "4.2.*", + "illuminate/support": "4.2.*", + "illuminate/view": "4.2.*", + "symfony/http-foundation": "2.5.*", + "symfony/translation": "2.5.*" }, "autoload": { "psr-0": { @@ -27,7 +23,7 @@ "target-dir": "Illuminate/Pagination", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php index 719eab1..8979a7a 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/BeanstalkdQueue.php @@ -85,7 +85,7 @@ class BeanstalkdQueue extends Queue implements QueueInterface { $pheanstalk = $this->pheanstalk->useTube($this->getQueue($queue)); - return $pheanstalk->put($payload, Pheanstalk::DEFAULT_PRIORITY, $this->getSeconds($delay)); + return $pheanstalk->put($payload, Pheanstalk::DEFAULT_PRIORITY, $this->getSeconds($delay), $this->timeToRun); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php b/vendor/laravel/framework/src/Illuminate/Queue/Capsule/Manager.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php index 1cd71d8..9b4a489 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/IronConnector.php @@ -53,7 +53,7 @@ class IronConnector implements ConnectorInterface { $iron->ssl_verifypeer = $config['ssl_verifypeer']; } - return new IronQueue($iron, $this->crypt, $this->request, $config['queue']); + return new IronQueue($iron, $this->request, $config['queue'], $config['encrypt']); } } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Connectors/RedisConnector.php b/vendor/laravel/framework/src/Illuminate/Queue/Connectors/RedisConnector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/FailedTableCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/FailedTableCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/FlushFailedCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListFailedCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php index 0156d6c..f138b3c 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ListenCommand.php @@ -101,6 +101,11 @@ class ListenCommand extends Command { $this->listener->setSleep($this->option('sleep')); $this->listener->setMaxTries($this->option('tries')); + + $this->listener->setOutputHandler(function($type, $line) + { + $this->output->write($line); + }); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/RetryCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php index 5a9728b..281f414 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php @@ -1,9 +1,11 @@ downForMaintenance()) return; + if ($this->downForMaintenance() && ! $this->option('daemon')) return; $queue = $this->option('queue'); @@ -61,7 +63,68 @@ class WorkCommand extends Command { $connection = $this->argument('connection'); - $this->worker->pop($connection, $queue, $delay, $memory, $this->option('sleep'), $this->option('tries')); + $response = $this->runWorker( + $connection, $queue, $delay, $memory, $this->option('daemon') + ); + + // If a job was fired by the worker, we'll write the output out to the console + // so that the developer can watch live while the queue runs in the console + // window, which will also of get logged if stdout is logged out to disk. + if ( ! is_null($response['job'])) + { + $this->writeOutput($response['job'], $response['failed']); + } + } + + /** + * Run the worker instance. + * + * @param string $connection + * @param string $queue + * @param int $delay + * @param int $memory + * @param bool $daemon + * @return array + */ + protected function runWorker($connection, $queue, $delay, $memory, $daemon = false) + { + if ($daemon) + { + $this->worker->setDaemonExceptionHandler($this->laravel['exception']); + + return $this->worker->daemon( + $connection, $queue, $delay, $memory, + $this->option('sleep'), $this->option('tries') + ); + } + else + { + return $this->worker->pop( + $connection, $queue, $delay, + $this->option('sleep'), $this->option('tries') + ); + } + } + + /** + * Write the status output for the queue worker. + * + * @param \Illuminate\Queue\Jobs\Job $job + * @param bool $failed + * @return void + */ + protected function writeOutput(Job $job, $failed) + { + $options = OutputInterface::OUTPUT_RAW; + + if ($failed) + { + $this->output->writeln('Failed: '.$job->getName(), $options); + } + else + { + $this->output->writeln('Processed: '.$job->getName(), $options); + } } /** @@ -98,6 +161,8 @@ class WorkCommand extends Command { return array( array('queue', null, InputOption::VALUE_OPTIONAL, 'The queue to listen on'), + array('daemon', null, InputOption::VALUE_NONE, 'Run the worker in daemon mode'), + array('delay', null, InputOption::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0), array('force', null, InputOption::VALUE_NONE, 'Force the worker to run even in maintenance mode'), diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/failed_jobs.stub b/vendor/laravel/framework/src/Illuminate/Queue/Console/stubs/failed_jobs.stub old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/FailConsoleServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/FailConsoleServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php b/vendor/laravel/framework/src/Illuminate/Queue/Failed/FailedJobProviderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php b/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php index 77bb78c..21056c6 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/IlluminateQueueClosure.php @@ -1,8 +1,28 @@ crypt = $crypt; + } + + /** * Fire the Closure based queue job. * * @param \Illuminate\Queue\Jobs\Job $job @@ -11,7 +31,7 @@ class IlluminateQueueClosure { */ public function fire($job, $data) { - $closure = unserialize($data['closure']); + $closure = unserialize($this->crypt->decrypt($data['closure'])); $closure($job); } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php index 9cee7b5..2e0387d 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/IronQueue.php @@ -4,7 +4,6 @@ use IronMQ; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Queue\Jobs\IronJob; -use Illuminate\Encryption\Encrypter; class IronQueue extends Queue implements QueueInterface { @@ -16,13 +15,6 @@ class IronQueue extends Queue implements QueueInterface { protected $iron; /** - * The encrypter instance. - * - * @var \Illuminate\Encryption\Encrypter - */ - protected $crypt; - - /** * The current request instance. * * @var \Illuminate\Http\Request @@ -37,20 +29,27 @@ class IronQueue extends Queue implements QueueInterface { protected $default; /** + * Indicates if the messages should be encrypted. + * + * @var bool + */ + protected $shouldEncrypt; + + /** * Create a new IronMQ queue instance. * * @param \IronMQ $iron - * @param \Illuminate\Encryption\Encrypter $crypt * @param \Illuminate\Http\Request $request * @param string $default + * @param bool $shouldEncrypt * @return void */ - public function __construct(IronMQ $iron, Encrypter $crypt, Request $request, $default) + public function __construct(IronMQ $iron, Request $request, $default, $shouldEncrypt = false) { $this->iron = $iron; - $this->crypt = $crypt; $this->request = $request; $this->default = $default; + $this->shouldEncrypt = $shouldEncrypt; } /** @@ -76,7 +75,7 @@ class IronQueue extends Queue implements QueueInterface { */ public function pushRaw($payload, $queue = null, array $options = array()) { - $payload = $this->crypt->encrypt($payload); + if ($this->shouldEncrypt) $payload = $this->crypt->encrypt($payload); return $this->iron->postMessage($this->getQueue($queue), $payload, $options)->id; } @@ -131,7 +130,7 @@ class IronQueue extends Queue implements QueueInterface { // queues will be a security hazard to unsuspecting developers using it. if ( ! is_null($job)) { - $job->body = $this->crypt->decrypt($job->body); + $job->body = $this->parseJobBody($job->body); return new IronJob($this->container, $this, $job); } @@ -170,7 +169,7 @@ class IronQueue extends Queue implements QueueInterface { { $r = $this->request; - $body = $this->crypt->decrypt($r->getContent()); + $body = $this->parseJobBody($r->getContent()); return (object) array( 'id' => $r->header('iron-message-id'), 'body' => $body, 'pushed' => true, @@ -204,6 +203,17 @@ class IronQueue extends Queue implements QueueInterface { } /** + * Parse the job body for firing. + * + * @param string $body + * @return string + */ + protected function parseJobBody($body) + { + return $this->shouldEncrypt ? $this->crypt->decrypt($body) : $body; + } + + /** * Get the queue or return the default. * * @param string|null $queue diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php index 491fe88..09e67b9 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php @@ -149,6 +149,16 @@ abstract class Job { } /** + * Get the name of the queued job class. + * + * @return string + */ + public function getName() + { + return json_decode($this->getRawBody(), true)['job']; + } + + /** * Get the name of the queue the job belongs to. * * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php b/vendor/laravel/framework/src/Illuminate/Queue/Jobs/RedisJob.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Listener.php b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php index 8057e4b..717157e 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Listener.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Listener.php @@ -1,5 +1,6 @@ commandPath = $commandPath; - $this->environment = $environment; + $this->workerCommand = '"'.PHP_BINARY.'" artisan queue:work %s --queue="%s" --delay=%s --memory=%s --sleep=%s --tries=%s'; } /** @@ -81,7 +88,10 @@ class Listener { */ public function runProcess(Process $process, $memory) { - $process->run(); + $process->run(function($type, $line) + { + $this->handleWorkerOutput($type, $line); + }); // Once we have run the job we'll go check if the memory limit has been // exceeded for the script. If it has, we will kill this script so a @@ -126,6 +136,21 @@ class Listener { } /** + * Handle output from the worker process. + * + * @param int $type + * @param string $line + * @return void + */ + protected function handleWorkerOutput($type, $line) + { + if (isset($this->outputHandler)) + { + call_user_func($this->outputHandler, $type, $line); + } + } + + /** * Determine if the memory limit has been exceeded. * * @param int $memoryLimit @@ -147,6 +172,17 @@ class Listener { } /** + * Set the output handler callback. + * + * @param \Closure $outputHandler + * @return void + */ + public function setOutputHandler(Closure $outputHandler) + { + $this->outputHandler = $outputHandler; + } + + /** * Get the current listener environment. * * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Queue.php b/vendor/laravel/framework/src/Illuminate/Queue/Queue.php index 1214848..7ac0b4e 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Queue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Queue.php @@ -3,6 +3,7 @@ use Closure; use DateTime; use Illuminate\Container\Container; +use Illuminate\Encryption\Encrypter; use Illuminate\Support\SerializableClosure; abstract class Queue { @@ -69,7 +70,7 @@ abstract class Queue { */ protected function createClosurePayload($job, $data) { - $closure = serialize(new SerializableClosure($job)); + $closure = $this->crypt->encrypt(serialize(new SerializableClosure($job))); return array('job' => 'IlluminateQueueClosure', 'data' => compact('closure')); } @@ -128,4 +129,15 @@ abstract class Queue { $this->container = $container; } + /** + * Set the encrypter instance. + * + * @param \Illuminate\Encryption\Encrypter $crypt + * @return void + */ + public function setEncrypter(Encrypter $crypt) + { + $this->crypt = $crypt; + } + } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php index 00a2af3..899b4bd 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php @@ -30,6 +30,17 @@ class QueueManager { } /** + * Register an event listener for the daemon queue loop. + * + * @param mixed $callback + * @return void + */ + public function looping($callback) + { + $this->app['events']->listen('illuminate.queue.looping', $callback); + } + + /** * Register an event listener for the failed job event. * * @param mixed $callback @@ -41,6 +52,17 @@ class QueueManager { } /** + * Register an event listener for the daemon queue stopping. + * + * @param mixed $callback + * @return void + */ + public function stopping($callback) + { + $this->app['events']->listen('illuminate.queue.stopping', $callback); + } + + /** * Determine if the driver is connected. * * @param string $name @@ -69,6 +91,8 @@ class QueueManager { $this->connections[$name] = $this->resolve($name); $this->connections[$name]->setContainer($this->app); + + $this->connections[$name]->setEncrypter($this->app['encrypter']); } return $this->connections[$name]; diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php index cfc83e9..93758bf 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php @@ -1,5 +1,6 @@ registerSubscriber(); $this->registerFailedJobServices(); + + $this->registerQueueClosure(); } /** @@ -45,16 +48,14 @@ class QueueServiceProvider extends ServiceProvider { */ protected function registerManager() { - $me = $this; - - $this->app->bindShared('queue', function($app) use ($me) + $this->app->bindShared('queue', function($app) { // Once we have an instance of the queue manager, we will register the various // resolvers for the queue connectors. These connectors are responsible for // creating the classes that accept queue configs and instantiate queues. $manager = new QueueManager($app); - $me->registerConnectors($manager); + $this->registerConnectors($manager); return $manager; }); @@ -257,6 +258,19 @@ class QueueServiceProvider extends ServiceProvider { } /** + * Register the Illuminate queued closure job. + * + * @return void + */ + protected function registerQueueClosure() + { + $this->app->bindShared('IlluminateQueueClosure', function($app) + { + return new IlluminateQueueClosure($app['encrypter']); + }); + } + + /** * Get the services provided by the provider. * * @return array diff --git a/vendor/laravel/framework/src/Illuminate/Queue/README.md b/vendor/laravel/framework/src/Illuminate/Queue/README.md old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/RedisQueue.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Worker.php b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php index 437dd4b..91e2c16 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/Worker.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Worker.php @@ -28,6 +28,13 @@ class Worker { protected $events; /** + * The exception handler instance. + * + * @var \Illuminate\Exception\Handler + */ + protected $exceptions; + + /** * Create a new queue worker. * * @param \Illuminate\Queue\QueueManager $manager @@ -45,7 +52,7 @@ class Worker { } /** - * Listen to the given queue. + * Listen to the given queue in a loop. * * @param string $connectionName * @param string $queue @@ -53,26 +60,92 @@ class Worker { * @param int $memory * @param int $sleep * @param int $maxTries + * @return array + */ + public function daemon($connectionName, $queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0) + { + while (true) + { + if ($this->daemonShouldRun()) + { + $this->runNextJobForDaemon( + $connectionName, $queue, $delay, $sleep, $maxTries + ); + } + else + { + $this->sleep($sleep); + } + + if ($this->memoryExceeded($memory)) + { + $this->stop(); + } + } + } + + /** + * Run the next job for the daemon worker. + * + * @param string $connectionName + * @param string $queue + * @param int $delay + * @param int $sleep + * @param int $maxTries * @return void */ - public function pop($connectionName, $queue = null, $delay = 0, $memory = 128, $sleep = 3, $maxTries = 0) + protected function runNextJobForDaemon($connectionName, $queue, $delay, $sleep, $maxTries) + { + try + { + $this->pop($connectionName, $queue, $delay, $sleep, $maxTries); + } + catch (\Exception $e) + { + if ($this->exceptions) $this->exceptions->handleException($e); + } + } + + /** + * Deteremine if the daemon should process on this iteration. + * + * @return bool + */ + protected function daemonShouldRun() + { + return $this->events->until('illuminate.queue.looping') !== false; + } + + /** + * Listen to the given queue. + * + * @param string $connectionName + * @param string $queue + * @param int $delay + * @param int $sleep + * @param int $maxTries + * @return array + */ + public function pop($connectionName, $queue = null, $delay = 0, $sleep = 3, $maxTries = 0) { $connection = $this->manager->connection($connectionName); $job = $this->getNextJob($connection, $queue); // If we're able to pull a job off of the stack, we will process it and - // then make sure we are not exceeding our memory limits for the run - // which is to protect against run-away memory leakages from here. + // then immediately return back out. If there is no job on the queue + // we will "sleep" the worker for the specified number of seconds. if ( ! is_null($job)) { - $this->process( + return $this->process( $this->manager->getName($connectionName), $job, $maxTries, $delay ); } else { $this->sleep($sleep); + + return ['job' => null, 'failed' => false]; } } @@ -119,6 +192,8 @@ class Worker { $job->fire(); if ($job->autoDelete()) $job->delete(); + + return ['job' => $job, 'failed' => false]; } catch (\Exception $e) @@ -137,7 +212,7 @@ class Worker { * * @param string $connection * @param \Illuminate\Queue\Jobs\Job $job - * @return void + * @return array */ protected function logFailedJob($connection, Job $job) { @@ -149,6 +224,8 @@ class Worker { $this->raiseFailedJobEvent($connection, $job); } + + return ['job' => $job, 'failed' => true]; } /** @@ -169,6 +246,29 @@ class Worker { } /** + * Determine if the memory limit has been exceeded. + * + * @param int $memoryLimit + * @return bool + */ + public function memoryExceeded($memoryLimit) + { + return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; + } + + /** + * Stop listening and bail out of the script. + * + * @return void + */ + public function stop() + { + $this->events->fire('illuminate.queue.stopping'); + + die; + } + + /** * Sleep the script for a given number of seconds. * * @param int $seconds @@ -180,6 +280,17 @@ class Worker { } /** + * Set the exception handler to use in Daemon mode. + * + * @param \Illuminate\Exception\Handler $handler + * @return void + */ + public function setDaemonExceptionHandler($handler) + { + $this->exceptions = $handler; + } + + /** * Get the queue manager instance. * * @return \Illuminate\Queue\QueueManager diff --git a/vendor/laravel/framework/src/Illuminate/Queue/composer.json b/vendor/laravel/framework/src/Illuminate/Queue/composer.json index d9e914f..28980f7 100755 --- a/vendor/laravel/framework/src/Illuminate/Queue/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Queue/composer.json @@ -8,20 +8,18 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/console": "4.1.*", - "illuminate/container": "4.1.*", - "illuminate/http": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/process": "2.4.*" + "php": ">=5.4.0", + "illuminate/console": "4.2.*", + "illuminate/container": "4.2.*", + "illuminate/http": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/process": "2.5.*" }, "require-dev": { - "illuminate/events": "4.1.*", - "aws/aws-sdk-php": "2.6.*", - "iron-io/iron_mq": "1.5.*", - "pda/pheanstalk": "2.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/events": "4.2.*", + "aws/aws-sdk-php": "~2.6", + "iron-io/iron_mq": "~1.5", + "pda/pheanstalk": "~2.1" }, "autoload": { "psr-0": { @@ -34,7 +32,7 @@ "target-dir": "Illuminate/Queue", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "suggest": { diff --git a/vendor/laravel/framework/src/Illuminate/Redis/composer.json b/vendor/laravel/framework/src/Illuminate/Redis/composer.json index aee8fb9..4cbef76 100755 --- a/vendor/laravel/framework/src/Illuminate/Redis/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Redis/composer.json @@ -8,14 +8,10 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*", + "php": ">=5.4.0", + "illuminate/support": "4.2.*", "predis/predis": "0.8.*" }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" - }, "autoload": { "psr-0": { "Illuminate\\Redis": "" @@ -24,7 +20,7 @@ "target-dir": "Illuminate/Redis", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Remote/Connection.php b/vendor/laravel/framework/src/Illuminate/Remote/Connection.php old mode 100755 new mode 100644 index 3b43bbd..8d4bf6b --- a/vendor/laravel/framework/src/Illuminate/Remote/Connection.php +++ b/vendor/laravel/framework/src/Illuminate/Remote/Connection.php @@ -213,9 +213,7 @@ class Connection implements ConnectionInterface { { if ( ! is_null($callback)) return $callback; - $me = $this; - - return function($line) use ($me) { $me->display($line); }; + return function($line) { $this->display($line); }; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Remote/ConnectionInterface.php b/vendor/laravel/framework/src/Illuminate/Remote/ConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Remote/GatewayInterface.php b/vendor/laravel/framework/src/Illuminate/Remote/GatewayInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Remote/MultiConnection.php b/vendor/laravel/framework/src/Illuminate/Remote/MultiConnection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php b/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php old mode 100755 new mode 100644 index 7fbd4da..96f1ce5 --- a/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php +++ b/vendor/laravel/framework/src/Illuminate/Remote/RemoteManager.php @@ -13,13 +13,6 @@ class RemoteManager { protected $app; /** - * The active connection instances. - * - * @var array - */ - protected $connections = array(); - - /** * Create a new remote manager instance. * * @param \Illuminate\Foundation\Application $app @@ -91,12 +84,7 @@ class RemoteManager { */ public function resolve($name) { - if ( ! isset($this->connections[$name])) - { - $this->connections[$name] = $this->makeConnection($name, $this->getConfig($name)); - } - - return $this->connections[$name]; + return $this->makeConnection($name, $this->getConfig($name)); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Remote/RemoteServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Remote/RemoteServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Remote/SecLibGateway.php b/vendor/laravel/framework/src/Illuminate/Remote/SecLibGateway.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Remote/composer.json b/vendor/laravel/framework/src/Illuminate/Remote/composer.json old mode 100755 new mode 100644 index c26645b..f7bb904 --- a/vendor/laravel/framework/src/Illuminate/Remote/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Remote/composer.json @@ -8,15 +8,13 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/filesystem": "4.1.*", - "illuminate/support": "4.1.*", + "php": ">=5.4.0", + "illuminate/filesystem": "4.2.*", + "illuminate/support": "4.2.*", "phpseclib/phpseclib": "0.3.*" }, "require-dev": { - "illuminate/console": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/console": "4.2.*" }, "autoload": { "psr-0": { @@ -26,7 +24,7 @@ "target-dir": "Illuminate/Remote", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Controller.php b/vendor/laravel/framework/src/Illuminate/Routing/Controller.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php b/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ControllerInspector.php b/vendor/laravel/framework/src/Illuminate/Routing/ControllerInspector.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/ControllerServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Routing/ControllerServiceProvider.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/HostValidator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/MethodValidator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/SchemeValidator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/UriValidator.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php b/vendor/laravel/framework/src/Illuminate/Routing/Matching/ValidatorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Route.php b/vendor/laravel/framework/src/Illuminate/Routing/Route.php index d8b834d..5b4ea2d 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/Route.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/Route.php @@ -322,7 +322,7 @@ class Route { { return array_map(function($value) { - return is_string($value) ? urldecode($value) : $value; + return is_string($value) ? rawurldecode($value) : $value; }, $this->parameters); } diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/RouteFiltererInterface.php b/vendor/laravel/framework/src/Illuminate/Routing/RouteFiltererInterface.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Router.php b/vendor/laravel/framework/src/Illuminate/Routing/Router.php index 0a297c3..c8252a7 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/Router.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/Router.php @@ -440,14 +440,12 @@ class Router implements HttpKernelInterface, RouteFiltererInterface { */ protected function getNestedResourceUri(array $segments) { - $me = $this; - // We will spin through the segments and create a place-holder for each of the // resource segments, as well as the resource itself. Then we should get an // entire string for the resource URI that contains all nested resources. - return implode('/', array_map(function($s) use ($me) + return implode('/', array_map(function($s) { - return $s.'/{'.$me->getResourceWildcard($s).'}'; + return $s.'/{'.$this->getResourceWildcard($s).'}'; }, $segments)); } @@ -913,18 +911,16 @@ class Router implements HttpKernelInterface, RouteFiltererInterface { */ protected function getClassClosure($controller) { - $me = $this; - // Here we'll get an instance of this controller dispatcher and hand it off to // the Closure so it will be used to resolve the class instances out of our // IoC container instance and call the appropriate methods on the class. $d = $this->getControllerDispatcher(); - return function() use ($me, $d, $controller) + return function() use ($d, $controller) { - $route = $me->current(); + $route = $this->current(); - $request = $me->getCurrentRequest(); + $request = $this->getCurrentRequest(); // Now we can split the controller and method out of the action string so that we // can call them appropriately on the class. This controller and method are in @@ -1555,7 +1551,7 @@ class Router implements HttpKernelInterface, RouteFiltererInterface { * @param dynamic string * @return bool */ - public function isAction() + public function uses() { foreach (func_get_args() as $pattern) { diff --git a/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php index 33b62bf..d579583 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php @@ -1,7 +1,7 @@ request->getScheme().'://'; + return $this->forceSchema ?: $this->request->getScheme().'://'; } else { @@ -184,6 +198,17 @@ class UrlGenerator { } /** + * Force the schema for URLs. + * + * @param string $schema + * @return void + */ + public function forceSchema($schema) + { + $this->forceSchema = $schema.'://'; + } + + /** * Get the URL to a named route. * * @param string $name @@ -439,7 +464,10 @@ class UrlGenerator { */ protected function getRootUrl($scheme, $root = null) { - $root = $root ?: $this->request->root(); + if (is_null($root)) + { + $root = $this->forcedRoot ?: $this->request->root(); + } $start = starts_with($root, 'http://') ? 'http://' : 'https://'; @@ -447,6 +475,17 @@ class UrlGenerator { } /** + * Set the forced root URL. + * + * @param string $root + * @return void + */ + public function forceRootUrl($root) + { + $this->forcedRoot = $root; + } + + /** * Determine if the given path is a valid URL. * * @param string $path diff --git a/vendor/laravel/framework/src/Illuminate/Routing/composer.json b/vendor/laravel/framework/src/Illuminate/Routing/composer.json index 1a6897d..29df7f0 100755 --- a/vendor/laravel/framework/src/Illuminate/Routing/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Routing/composer.json @@ -8,20 +8,18 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/container": "4.1.*", - "illuminate/http": "4.1.*", - "illuminate/session": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/http-foundation": "2.4.*", - "symfony/http-kernel": "2.4.*", - "symfony/routing": "2.4.*" + "php": ">=5.4.0", + "illuminate/container": "4.2.*", + "illuminate/http": "4.2.*", + "illuminate/session": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/http-foundation": "2.5.*", + "symfony/http-kernel": "2.5.*", + "symfony/routing": "2.5.*" }, "require-dev": { - "illuminate/console": "4.1.*", - "illuminate/filesystem": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/console": "4.2.*", + "illuminate/filesystem": "4.2.*" }, "autoload": { "psr-0": { @@ -31,7 +29,7 @@ "target-dir": "Illuminate/Routing", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php b/vendor/laravel/framework/src/Illuminate/Session/Console/SessionTableCommand.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php b/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php new file mode 100644 index 0000000..a2f4073 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php @@ -0,0 +1,130 @@ +table = $table; + $this->connection = $connection; + } + + /** + * {@inheritDoc} + */ + public function open($savePath, $sessionName) + { + return true; + } + + /** + * {@inheritDoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function read($sessionId) + { + $session = $this->getQuery()->find($sessionId); + + if ( ! is_null($session)) + { + $this->exists = true; + + return base64_decode($session->payload); + } + } + + /** + * {@inheritDoc} + */ + public function write($sessionId, $data) + { + if ($this->exists) + { + $this->getQuery()->where('id', $sessionId)->update([ + 'payload' => base64_encode($data), 'last_activity' => time(), + ]); + } + else + { + $this->getQuery()->insert([ + 'id' => $sessionId, 'payload' => base64_encode($data), 'last_activity' => time(), + ]); + } + } + + /** + * {@inheritDoc} + */ + public function destroy($sessionId) + { + $this->getQuery()->where('id', $sessionId)->delete(); + } + + /** + * {@inheritDoc} + */ + public function gc($lifetime) + { + $this->getQuery()->where('last_activity', '<=', $lifetime)->delete(); + } + + /** + * Get a fresh query builder instance for the table. + * + * @return \Illuminate\Database\Query\Builder + */ + protected function getQuery() + { + return $this->connection->table($this->table); + } + + /** + * Set the existence state for the session. + * + * @param bool $value + * @return \SessionHandlerInterface + */ + public function setExists($value) + { + $this->exists = $value; + + return $this; + } + +} \ No newline at end of file diff --git a/vendor/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php b/vendor/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php new file mode 100644 index 0000000..d4d2f95 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/Session/ExistenceAwareInterface.php @@ -0,0 +1,13 @@ +getTablePrefix().$this->app['config']['session.table']; - return $this->buildSession(new PdoSessionHandler($connection->getPdo(), $this->getDatabaseOptions($table))); + return $this->buildSession(new DatabaseSessionHandler($connection, $table)); } /** @@ -87,18 +87,6 @@ class SessionManager extends Manager { return $this->app['db']->connection($connection); } - - /** - * Get the database session options. - * - * @param string $table - * @return array - */ - protected function getDatabaseOptions($table) - { - return array('db_table' => $table, 'db_id_col' => 'id', 'db_data_col' => 'payload', 'db_time_col' => 'last_activity'); - } - /** * Create an instance of the APC session driver. * diff --git a/vendor/laravel/framework/src/Illuminate/Session/Store.php b/vendor/laravel/framework/src/Illuminate/Session/Store.php index 50ed01e..cda928e 100755 --- a/vendor/laravel/framework/src/Illuminate/Session/Store.php +++ b/vendor/laravel/framework/src/Illuminate/Session/Store.php @@ -194,6 +194,8 @@ class Store implements SessionInterface { { if ($destroy) $this->handler->destroy($this->getId()); + $this->setExists(false); + $this->id = $this->generateSessionId(); return true; } @@ -266,6 +268,22 @@ class Store implements SessionInterface { } /** + * Get the value of a given key and then forget it. + * + * @param string $key + * @param string $default + * @return mixed + */ + public function pull($key, $default = null) + { + $value = $this->get($key, $default); + + $this->forget($key); + + return $value; + } + + /** * Determine if the session contains old input. * * @param string $key @@ -554,6 +572,20 @@ class Store implements SessionInterface { } /** + * Set the existence of the session on the handler if applicable. + * + * @param bool $value + * @return void + */ + public function setExists($value) + { + if ($this->handler instanceof ExistenceAwareInterface) + { + $this->handler->setExists($value); + } + } + + /** * Get the underlying session handler implementation. * * @return \SessionHandlerInterface diff --git a/vendor/laravel/framework/src/Illuminate/Session/composer.json b/vendor/laravel/framework/src/Illuminate/Session/composer.json index d9e370f..bec66ab 100755 --- a/vendor/laravel/framework/src/Illuminate/Session/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Session/composer.json @@ -8,19 +8,17 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/cache": "4.1.*", - "illuminate/cookie": "4.1.*", - "illuminate/encryption": "4.1.*", - "illuminate/support": "4.1.*", - "nesbot/carbon": "1.*", - "symfony/finder": "2.4.*", - "symfony/http-foundation": "2.4.*" + "php": ">=5.4.0", + "illuminate/cache": "4.2.*", + "illuminate/cookie": "4.2.*", + "illuminate/encryption": "4.2.*", + "illuminate/support": "4.2.*", + "nesbot/carbon": "~1.0", + "symfony/finder": "2.5.*", + "symfony/http-foundation": "2.5.*" }, "require-dev": { - "illuminate/console": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/console": "4.2.*" }, "autoload": { "psr-0": { @@ -30,7 +28,7 @@ "target-dir": "Illuminate/Session", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Support/Collection.php b/vendor/laravel/framework/src/Illuminate/Support/Collection.php index d328316..c1f908f 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Collection.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Collection.php @@ -5,11 +5,12 @@ use Countable; use ArrayAccess; use ArrayIterator; use CachingIterator; +use JsonSerializable; use IteratorAggregate; use Illuminate\Support\Contracts\JsonableInterface; use Illuminate\Support\Contracts\ArrayableInterface; -class Collection implements ArrayAccess, ArrayableInterface, Countable, IteratorAggregate, JsonableInterface { +class Collection implements ArrayAccess, ArrayableInterface, Countable, IteratorAggregate, JsonableInterface, JsonSerializable { /** * The items contained in the collection. @@ -352,18 +353,18 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator return array_reduce($this->items, $callback, $initial); } - /** - * Get one or more items randomly from the collection. - * - * @param int $amount - * @return mixed - */ - public function random($amount = 1) - { - $keys = array_rand($this->items, $amount); + /** + * Get one or more items randomly from the collection. + * + * @param int $amount + * @return mixed + */ + public function random($amount = 1) + { + $keys = array_rand($this->items, $amount); - return is_array($keys) ? array_intersect_key($this->items, array_flip($keys)) : $this->items[$keys]; - } + return is_array($keys) ? array_intersect_key($this->items, array_flip($keys)) : $this->items[$keys]; + } /** * Reverse items order. @@ -376,6 +377,18 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator } /** + * Search the collection for a given value and return the corresponding key if successful. + * + * @param mixed $value + * @param bool $strict + * @return mixed + */ + public function search($value, $strict = false) + { + return array_search($value, $this->items, $strict); + } + + /** * Get and remove the first item from the collection. * * @return mixed|null @@ -592,6 +605,16 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator } /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + /** * Get the collection of items as JSON. * * @param int $options @@ -700,7 +723,7 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator * @param \Illuminate\Support\Collection|\Illuminate\Support\Contracts\ArrayableInterface|array $items * @return array */ - private function getArrayableItems($items) + protected function getArrayableItems($items) { if ($items instanceof Collection) { diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php index 5c2f1d3..5c099e0 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Paginator.php @@ -1,7 +1,7 @@ currentRouteNamed($name); - } - - /** - * Determine if the current route uses a given controller action. - * - * @param string $action - * @return bool - */ - public static function uses($action) - { - return static::$app['router']->currentRouteUses($action); - } - - /** * Get the registered name of the component. * * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/SSH.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/SSH.php old mode 100755 new mode 100644 diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php index 3b350de..7489155 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/View.php @@ -1,7 +1,7 @@ toArray(); + } + + /** * Convert the Fluent instance to JSON. * * @param int $options diff --git a/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php index fcf7531..4be98a8 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php +++ b/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php @@ -1,11 +1,12 @@ toArray(); + } + + /** * Convert the object to its JSON representation. * * @param int $options diff --git a/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php index 81a3073..e9edb4b 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php @@ -12,6 +12,7 @@ class Pluralizer { '/^(ox)$/i' => "$1en", '/([m|l])ouse$/i' => "$1ice", '/(matr|vert|ind)ix|ex$/i' => "$1ices", + '/(stoma|epo|monar|matriar|patriar|oligar|eunu)ch$/i' => "$1chs", '/(x|ch|ss|sh)$/i' => "$1es", '/([^aeiouy]|qu)y$/i' => "$1ies", '/(hive)$/i' => "$1s", @@ -19,10 +20,10 @@ class Pluralizer { '/(shea|lea|loa|thie)f$/i' => "$1ves", '/sis$/i' => "ses", '/([ti])um$/i' => "$1a", - '/(tomat|potat|ech|her|vet)o$/i' => "$1oes", + '/(torped|embarg|tomat|potat|ech|her|vet)o$/i' => "$1oes", '/(bu)s$/i' => "$1ses", '/(alias)$/i' => "$1es", - '/(octop)us$/i' => "$1i", + '/(fung)us$/i' => "$1i", '/(ax|test)is$/i' => "$1es", '/(us)$/i' => "$1es", '/s$/i' => "s", @@ -37,10 +38,10 @@ class Pluralizer { public static $singular = array( '/(quiz)zes$/i' => "$1", '/(matr)ices$/i' => "$1ix", - '/(vert|ind)ices$/i' => "$1ex", + '/(vert|vort|ind)ices$/i' => "$1ex", '/^(ox)en$/i' => "$1", '/(alias)es$/i' => "$1", - '/(octop|vir)i$/i' => "$1us", + '/(octop|vir|fung)i$/i' => "$1us", '/(cris|ax|test)es$/i' => "$1is", '/(shoe)s$/i' => "$1", '/(o)es$/i' => "$1", @@ -61,6 +62,7 @@ class Pluralizer { '/(n)ews$/i' => "$1ews", '/(h|bl)ouses$/i' => "$1ouse", '/(corpse)s$/i' => "$1", + '/(gallows|headquarters)$/i' => "$1", '/(us)es$/i' => "$1", '/(us|ss)$/i' => "$1", '/s$/i' => "", @@ -73,15 +75,27 @@ class Pluralizer { */ public static $irregular = array( 'child' => 'children', + 'corpus' => 'corpora', + 'criterion' => 'criteria', 'foot' => 'feet', 'freshman' => 'freshmen', 'goose' => 'geese', + 'genus' => 'genera', 'human' => 'humans', 'man' => 'men', 'move' => 'moves', + 'nucleus' => 'nuclei', + 'ovum' => 'ova', 'person' => 'people', + 'phenomenon' => 'phenomena', + 'radius' => 'radii', 'sex' => 'sexes', + 'stimulus' => 'stimuli', + 'syllabus' => 'syllabi', + 'tax' => 'taxes', + 'tech' => 'techs', 'tooth' => 'teeth', + 'viscus' => 'viscera', ); /** @@ -91,21 +105,26 @@ class Pluralizer { */ public static $uncountable = array( 'audio', - 'equipment', + 'bison', + 'chassis', + 'coreopsis', + 'data', 'deer', + 'equipment', 'fish', 'gold', 'information', 'money', - 'rice', + 'moose', + 'offspring', + 'plankton', 'police', + 'rice', 'series', 'sheep', 'species', - 'moose', - 'chassis', + 'swine', 'traffic', - 'coreopsis', ); /** diff --git a/vendor/laravel/framework/src/Illuminate/Support/Str.php b/vendor/laravel/framework/src/Illuminate/Support/Str.php index ba8e669..714a1ae 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/Str.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Str.php @@ -1,13 +1,10 @@ bags, $key, new MessageBag); + } + + /** + * Add a new MessageBag instance to the bags. + * + * @param string $key + * @param \Illuminate\Support\MessageBag $bag + * @return \Illuminate\Support\ViewErrorBag + */ + public function put($key, MessageBag $bag) + { + $this->bags[$key] = $bag; + + return $this; + } + + /** + * Get the number of messages in the default bag. + * + * @return int + */ + public function count() + { + return $this->default->count(); + } + + /** + * Dynamically call methods on the default bag. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return call_user_func_array(array($this->default, $method), $parameters); + } + + /** + * Dynamically access a view error bag. + * + * @return \Illuminate\Support\MessageBag + */ + public function __get($key) + { + return array_get($this->bags, $key, new MessageBag); + } + + /** + * Dynamically set a view error bag. + * + * @param string $key + * @param \Illuminate\Support\MessageBag $value + * @return void + */ + public function __set($key, $value) + { + array_set($this->bags, $key, $value); + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/Support/composer.json b/vendor/laravel/framework/src/Illuminate/Support/composer.json index 389e7f1..f3f336b 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Support/composer.json @@ -8,13 +8,11 @@ } ], "require": { - "php": ">=5.3.0" + "php": ">=5.4.0" }, "require-dev": { - "jeremeamia/superclosure": "1.0.*", - "patchwork/utf8": "1.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "jeremeamia/superclosure": "~1.0", + "patchwork/utf8": "1.1.*" }, "autoload": { "psr-0": { @@ -27,7 +25,7 @@ "target-dir": "Illuminate/Support", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Support/helpers.php b/vendor/laravel/framework/src/Illuminate/Support/helpers.php index ede5d6c..426d89d 100755 --- a/vendor/laravel/framework/src/Illuminate/Support/helpers.php +++ b/vendor/laravel/framework/src/Illuminate/Support/helpers.php @@ -77,7 +77,7 @@ if ( ! function_exists('append_config')) if ( ! function_exists('array_add')) { /** - * Add an element to an array if it doesn't exist. + * Add an element to an array using "dot" notation if it doesn't exist. * * @param array $array * @param string $key @@ -86,7 +86,10 @@ if ( ! function_exists('array_add')) */ function array_add($array, $key, $value) { - if ( ! isset($array[$key])) $array[$key] = $value; + if (is_null(array_get($array, $key))) + { + array_set($array, $key, $value); + } return $array; } diff --git a/vendor/laravel/framework/src/Illuminate/Translation/composer.json b/vendor/laravel/framework/src/Illuminate/Translation/composer.json index 3919022..956de2c 100755 --- a/vendor/laravel/framework/src/Illuminate/Translation/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Translation/composer.json @@ -8,14 +8,10 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/filesystem": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/translation": "2.4.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/filesystem": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/translation": "2.5.*" }, "autoload": { "psr-0": { @@ -25,7 +21,7 @@ "target-dir": "Illuminate/Translation", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php index 58abec7..b0562f1 100755 --- a/vendor/laravel/framework/src/Illuminate/Validation/Validator.php +++ b/vendor/laravel/framework/src/Illuminate/Validation/Validator.php @@ -83,6 +83,13 @@ class Validator implements MessageProviderInterface { protected $customAttributes = array(); /** + * The array of custom displayabled values. + * + * @var array + */ + protected $customValues = array(); + + /** * All of the custom validator extensions. * * @var array @@ -202,6 +209,33 @@ class Validator implements MessageProviderInterface { } /** + * Define a set of rules that apply to each element in an array attribute. + * + * @param string $attribute + * @param string|array $rules + * @return void + */ + public function each($attribute, $rules) + { + $data = array_get($this->data, $attribute); + + if ( ! is_array($data)) + { + if ($this->hasRule($attribute, 'Array')) return; + + throw new \InvalidArgumentException('Attribute for each() must be an array.'); + } + + foreach ($data as $dataKey => $dataValue) + { + foreach ($rules as $ruleValue) + { + $this->mergeRules("$attribute.$dataKey", $ruleValue); + } + } + } + + /** * Merge additional rules into a given attribute. * * @param string $attribute @@ -210,7 +244,7 @@ class Validator implements MessageProviderInterface { */ public function mergeRules($attribute, $rules) { - $current = array_get($this->rules, $attribute, array()); + $current = isset($this->rules[$attribute]) ? $this->rules[$attribute] : []; $merge = head($this->explodeRules(array($rules))); @@ -413,6 +447,10 @@ class Validator implements MessageProviderInterface { { return false; } + elseif (is_array($value) && count($value) < 1) + { + return false; + } elseif ($value instanceof File) { return (string) $value->getPath() != ''; @@ -562,7 +600,11 @@ class Validator implements MessageProviderInterface { { $this->requireParameterCount(2, $parameters, 'required_if'); - if ($parameters[1] == array_get($this->data, $parameters[0])) + $data = array_get($this->data, $parameters[0]); + + $values = array_slice($parameters, 1); + + if (in_array($data, $values)) { return $this->validateRequired($attribute, $value); } @@ -1112,7 +1154,7 @@ class Validator implements MessageProviderInterface { */ protected function validateAlpha($attribute, $value) { - return preg_match('/^\pL+$/u', $value); + return preg_match('/^[\pL\pM]+$/u', $value); } /** @@ -1124,7 +1166,7 @@ class Validator implements MessageProviderInterface { */ protected function validateAlphaNum($attribute, $value) { - return preg_match('/^[\pL\pN]+$/u', $value); + return preg_match('/^[\pL\pM\pN]+$/u', $value); } /** @@ -1136,7 +1178,7 @@ class Validator implements MessageProviderInterface { */ protected function validateAlphaDash($attribute, $value) { - return preg_match('/^[\pL\pN_-]+$/u', $value); + return preg_match('/^[\pL\pM\pN_-]+$/u', $value); } /** @@ -1201,6 +1243,11 @@ class Validator implements MessageProviderInterface { { $this->requireParameterCount(1, $parameters, 'before'); + if ($format = $this->getDateFormat($attribute)) + { + return $this->validateBeforeWithFormat($format, $value, $parameters); + } + if ( ! ($date = strtotime($parameters[0]))) { return strtotime($value) < strtotime($this->getValue($parameters[0])); @@ -1212,6 +1259,20 @@ class Validator implements MessageProviderInterface { } /** + * Validate the date is before a given date with a given format. + * + * @param string $format + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateBeforeWithFormat($format, $value, $parameters) + { + return DateTime::createFromFormat($format, $value) < + DateTime::createFromFormat($format, $parameters[0]); + } + + /** * Validate the date is after a given date. * * @param string $attribute @@ -1223,6 +1284,11 @@ class Validator implements MessageProviderInterface { { $this->requireParameterCount(1, $parameters, 'after'); + if ($format = $this->getDateFormat($attribute)) + { + return $this->validateAfterWithFormat($format, $value, $parameters); + } + if ( ! ($date = strtotime($parameters[0]))) { return strtotime($value) > strtotime($this->getValue($parameters[0])); @@ -1234,6 +1300,34 @@ class Validator implements MessageProviderInterface { } /** + * Validate the date is after a given date with a given format. + * + * @param string $format + * @param mixed $value + * @param array $parameters + * @return bool + */ + protected function validateAfterWithFormat($format, $value, $parameters) + { + return DateTime::createFromFormat($format, $value) > + DateTime::createFromFormat($format, $parameters[0]); + } + + /** + * Get the date format for an attribute if it has one. + * + * @param string $attribute + * @return string|null + */ + protected function getDateFormat($attribute) + { + if ($result = $this->getRule($attribute, 'DateFormat')) + { + return $result[1][0]; + } + } + + /** * Get the validation message for an attribute and rule. * * @param string $attribute @@ -1442,6 +1536,32 @@ class Validator implements MessageProviderInterface { } /** + * Get the displayable name of the value. + * + * @param string $attribute + * @param mixed $value + * @return string + */ + public function getDisplayableValue($attribute, $value) + { + if (isset($this->customValues[$attribute][$value])) + { + return $this->customValues[$attribute][$value]; + } + + $key = "validation.values.{$attribute}.{$value}"; + + if (($line = $this->translator->trans($key)) !== $key) + { + return $line; + } + else + { + return $value; + } + } + + /** * Replace all place-holders for the between rule. * * @param string $message @@ -1536,6 +1656,11 @@ class Validator implements MessageProviderInterface { */ protected function replaceIn($message, $attribute, $rule, $parameters) { + foreach ($parameters as &$parameter) + { + $parameter = $this->getDisplayableValue($attribute, $parameter); + } + return str_replace(':values', implode(', ', $parameters), $message); } @@ -1550,6 +1675,11 @@ class Validator implements MessageProviderInterface { */ protected function replaceNotIn($message, $attribute, $rule, $parameters) { + foreach ($parameters as &$parameter) + { + $parameter = $this->getDisplayableValue($attribute, $parameter); + } + return str_replace(':values', implode(', ', $parameters), $message); } @@ -1626,6 +1756,8 @@ class Validator implements MessageProviderInterface { */ protected function replaceRequiredIf($message, $attribute, $rule, $parameters) { + $parameters[1] = $this->getDisplayableValue($parameters[0], $parameters[1]); + $parameters[0] = $this->getAttribute($parameters[0]); return str_replace(array(':other', ':value'), $parameters, $message); @@ -1719,24 +1851,36 @@ class Validator implements MessageProviderInterface { * Determine if the given attribute has a rule in the given set. * * @param string $attribute - * @param array $rules + * @param string|array $rules * @return bool */ protected function hasRule($attribute, $rules) { + return ! is_null($this->getRule($attribute, $rules)); + } + + /** + * Get a rule and its parameters for a given attribute. + * + * @param string $attribute + * @param string|array $rules + * @return array|null + */ + protected function getRule($attribute, $rules) + { $rules = (array) $rules; - // To determine if the attribute has a rule in the ruleset, we will spin - // through each of the rules assigned to the attribute and parse them - // all, then check to see if the parsed rules exists in the arrays. + if ( ! array_key_exists($attribute, $this->rules)) + { + return; + } + foreach ($this->rules[$attribute] as $rule) { list($rule, $parameters) = $this->parseRule($rule); - if (in_array($rule, $rules)) return true; + if (in_array($rule, $rules)) return [$rule, $parameters]; } - - return false; } /** diff --git a/vendor/laravel/framework/src/Illuminate/Validation/composer.json b/vendor/laravel/framework/src/Illuminate/Validation/composer.json index c0ca2d6..755a7f7 100755 --- a/vendor/laravel/framework/src/Illuminate/Validation/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Validation/composer.json @@ -8,16 +8,14 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/container": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/http-foundation": "2.4.*", - "symfony/translation": "2.4.*" + "php": ">=5.4.0", + "illuminate/container": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/http-foundation": "2.5.*", + "symfony/translation": "2.5.*" }, "require-dev": { - "illuminate/database": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/database": "4.2.*" }, "autoload": { "psr-0": { @@ -27,7 +25,7 @@ "target-dir": "Illuminate/Validation", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php old mode 100755 new mode 100644 index 86b12ef..be50074 --- a/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php @@ -19,33 +19,7 @@ class BladeCompiler extends Compiler implements CompilerInterface { protected $path; /** - * All of the available compiler functions. - * - * @var array - */ - protected $compilers = array( - 'Extensions', - 'Extends', - 'Comments', - 'Echos', - 'Openings', - 'Closings', - 'Else', - 'Unless', - 'EndUnless', - 'Includes', - 'Each', - 'Yields', - 'Shows', - 'Language', - 'SectionStart', - 'SectionStop', - 'SectionAppend', - 'SectionOverwrite', - ); - - /** - * Array of opening and closing tags for echos. + * Array of opening and closing tags for escaped echos. * * @var array */ @@ -59,6 +33,13 @@ class BladeCompiler extends Compiler implements CompilerInterface { protected $escapedTags = array('{{{', '}}}'); /** + * Array of footer lines to be added to template. + * + * @var array + */ + protected $footer = array(); + + /** * Compile the view at the given path. * * @param string $path @@ -66,12 +47,14 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ public function compile($path = null) { + $this->footer = array(); + if ($path) { $this->setPath($path); } - $contents = $this->compileString($this->files->get($this->getPath())); + $contents = $this->compileString($this->files->get($path)); if ( ! is_null($this->cachePath)) { @@ -108,80 +91,63 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ public function compileString($value) { - foreach ($this->compilers as $compiler) + $result = ''; + + // Here we will loop through all of the tokens returned by the Zend lexer and + // parse each one into the corresponding valid PHP. We will then have this + // template as the correctly rendered PHP that can be rendered natively. + foreach (token_get_all($value) as $token) { - $value = $this->{"compile{$compiler}"}($value); + $result .= is_array($token) ? $this->parseToken($token) : $token; } - return $value; - } + // If there are any footer lines that need to get added to a template we will + // add them here at the end of the template. This gets used mainly for the + // template inheritance via the extends keyword that should be appended. + if (count($this->footer) > 0) + { + $result = ltrim($result, PHP_EOL) + .PHP_EOL.implode(PHP_EOL, array_reverse($this->footer)); + } - /** - * Register a custom Blade compiler. - * - * @param Closure $compiler - * @return void - */ - public function extend(Closure $compiler) - { - $this->extensions[] = $compiler; + return $result; } /** - * Execute the user defined extensions. + * Parse the tokens from the template. * - * @param string $value + * @param array $token * @return string */ - protected function compileExtensions($value) + protected function parseToken($token) { - foreach ($this->extensions as $compiler) + list($id, $content) = $token; + + if ($id == T_INLINE_HTML) { - $value = call_user_func($compiler, $value, $this); + foreach (['Extensions', 'Statements', 'Comments', 'Echos'] as $type) + { + $content = $this->{"compile{$type}"}($content); + } } - return $value; + return $content; } /** - * Compile Blade template extensions into valid PHP. + * Execute the user defined extensions. * * @param string $value * @return string */ - protected function compileExtends($value) + protected function compileExtensions($value) { - // By convention, Blade views using template inheritance must begin with the - // @extends expression, otherwise they will not be compiled with template - // inheritance. So, if they do not start with that we will just return. - if (strpos($value, '@extends') !== 0) + foreach ($this->extensions as $compiler) { - return $value; + $value = call_user_func($compiler, $value, $this); } - $lines = preg_split("/(\r?\n)/", $value); - - // Next, we just want to split the values by lines, and create an expression - // to include the parent layout at the end of the templates. Which allows - // the sections to get registered before the parent view gets rendered. - $lines = $this->compileLayoutExtends($lines); - - return implode("\r\n", array_slice($lines, 1)); - } - - /** - * Compile the proper template inheritance for the lines. - * - * @param array $lines - * @return array - */ - protected function compileLayoutExtends($lines) - { - $pattern = $this->createMatcher('extends'); - - $lines[] = preg_replace($pattern, '$1@include$2', $lines[0]); - - return $lines; + return $value; } /** @@ -216,6 +182,28 @@ class BladeCompiler extends Compiler implements CompilerInterface { } /** + * Compile Blade Statements that start with "@" + * + * @param string $value + * + * @return mixed + */ + protected function compileStatements($value) + { + $callback = function($match) + { + if (method_exists($this, $method = 'compile'.ucfirst($match[1]))) + { + $match[0] = $this->$method(array_get($match, 3)); + } + + return isset($match[3]) ? $match[0] : $match[0].$match[2]; + }; + + return preg_replace_callback('/\B@(\w+)([ \t]*)(\( ( (?>[^()]+) | (?3) )* \))?/x', $callback, $value); + } + + /** * Compile the "regular" echo statements. * * @param string $value @@ -223,13 +211,11 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ protected function compileRegularEchos($value) { - $me = $this; - $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s/s', $this->contentTags[0], $this->contentTags[1]); - $callback = function($matches) use ($me) + $callback = function($matches) { - return $matches[1] ? substr($matches[0], 1) : 'compileEchoDefaults($matches[2]).'; ?>'; + return $matches[1] ? substr($matches[0], 1) : 'compileEchoDefaults($matches[2]).'; ?>'; }; return preg_replace_callback($pattern, $callback, $value); @@ -243,13 +229,11 @@ class BladeCompiler extends Compiler implements CompilerInterface { */ protected function compileEscapedEchos($value) { - $me = $this; - $pattern = sprintf('/%s\s*(.+?)\s*%s/s', $this->escapedTags[0], $this->escapedTags[1]); - $callback = function($matches) use ($me) + $callback = function($matches) { - return 'compileEchoDefaults($matches[1]).'); ?>'; + return 'compileEchoDefaults($matches[1]).'); ?>'; }; return preg_replace_callback($pattern, $callback, $value); @@ -267,195 +251,325 @@ class BladeCompiler extends Compiler implements CompilerInterface { } /** - * Compile Blade structure openings into valid PHP. + * Compile the each statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileOpenings($value) + protected function compileEach($expression) { - $pattern = '/(?(R)\((?:[^\(\)]|(?R))*\)|(?', $value); + return "renderEach{$expression}; ?>"; } /** - * Compile Blade structure closings into valid PHP. + * Compile the yield statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileClosings($value) + protected function compileYield($expression) { - $pattern = '/(\s*)@(endif|endforeach|endfor|endwhile)(\s*)/'; - - return preg_replace($pattern, '$1$3', $value); + return "yieldContent{$expression}; ?>"; } /** - * Compile Blade else statements into valid PHP. + * Compile the show statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileElse($value) + protected function compileShow($expression) { - $pattern = $this->createPlainMatcher('else'); - - return preg_replace($pattern, '$1$2', $value); + return "yieldSection(); ?>"; } /** - * Compile Blade unless statements into valid PHP. + * Compile the section statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileUnless($value) + protected function compileSection($expression) { - $pattern = $this->createMatcher('unless'); + return "startSection{$expression}; ?>"; + } - return preg_replace($pattern, '$1', $value); + /** + * Compile the append statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileAppend($expression) + { + return "appendSection(); ?>"; } /** - * Compile Blade end unless statements into valid PHP. + * Compile the end-section statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileEndUnless($value) + protected function compileEndsection($expression) { - $pattern = $this->createPlainMatcher('endunless'); + return "stopSection(); ?>"; + } - return preg_replace($pattern, '$1$2', $value); + /** + * Compile the stop statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileStop($expression) + { + return "stopSection(); ?>"; } /** - * Compile Blade include statements into valid PHP. + * Compile the overwrite statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileIncludes($value) + protected function compileOverwrite($expression) { - $pattern = $this->createOpenMatcher('include'); + return "stopSection(true); ?>"; + } - $replace = '$1make$2, array_except(get_defined_vars(), array(\'__data\', \'__path\')))->render(); ?>'; + /** + * Compile the unless statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileUnless($expression) + { + return ""; + } - return preg_replace($pattern, $replace, $value); + /** + * Compile the end unless statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileEndunless($expression) + { + return ""; } /** - * Compile Blade each statements into valid PHP. + * Compile the lang statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileEach($value) + protected function compileLang($expression) { - $pattern = $this->createMatcher('each'); + return ""; + } - return preg_replace($pattern, '$1renderEach$2; ?>', $value); + /** + * Compile the choice statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileChoice($expression) + { + return ""; } /** - * Compile Blade yield statements into valid PHP. + * Compile the else statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileYields($value) + protected function compileElse($expression) { - $pattern = $this->createMatcher('yield'); + return ""; + } - return preg_replace($pattern, '$1yieldContent$2; ?>', $value); + /** + * Compile the for statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileFor($expression) + { + return ""; } /** - * Compile Blade show statements into valid PHP. + * Compile the foreach statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileShows($value) + protected function compileForeach($expression) { - $pattern = $this->createPlainMatcher('show'); + return ""; + } - return preg_replace($pattern, '$1yieldSection(); ?>$2', $value); + /** + * Compile the if statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileIf($expression) + { + return ""; } /** - * Compile Blade language and language choice statements into valid PHP. + * Compile the else-if statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileLanguage($value) + protected function compileElseif($expression) { - $pattern = $this->createMatcher('lang'); + return ""; + } - $value = preg_replace($pattern, '$1', $value); + /** + * Compile the while statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileWhile($expression) + { + return ""; + } - $pattern = $this->createMatcher('choice'); + /** + * Compile the end-while statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileEndwhile($expression) + { + return ""; + } - return preg_replace($pattern, '$1', $value); + /** + * Compile the end-for statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileEndfor($expression) + { + return ""; } /** - * Compile Blade section start statements into valid PHP. + * Compile the end-for-each statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileSectionStart($value) + protected function compileEndforeach($expression) { - $pattern = $this->createMatcher('section'); + return ""; + } - return preg_replace($pattern, '$1startSection$2; ?>', $value); + /** + * Compile the end-if statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileEndif($expression) + { + return ""; } /** - * Compile Blade section stop statements into valid PHP. + * Compile the extends statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileSectionStop($value) + protected function compileExtends($expression) { - $pattern = $this->createPlainMatcher('stop'); + if (starts_with($expression, '(')) + { + $expression = substr($expression, 1, -1); + } - $value = preg_replace($pattern, '$1stopSection(); ?>$2', $value); + $data = "make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; - $pattern = $this->createPlainMatcher('endsection'); + $this->footer[] = $data; - return preg_replace($pattern, '$1stopSection(); ?>$2', $value); + return ''; } /** - * Compile Blade section append statements into valid PHP. + * Compile the include statements into valid PHP. * - * @param string $value + * @param string $expression * @return string */ - protected function compileSectionAppend($value) + protected function compileInclude($expression) { - $pattern = $this->createPlainMatcher('append'); + if (starts_with($expression, '(')) + { + $expression = substr($expression, 1, -1); + } - return preg_replace($pattern, '$1appendSection(); ?>$2', $value); + return "make($expression, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; } /** - * Compile Blade section stop statements into valid PHP. + * Compile the stack statements into the content * - * @param string $value + * @param string $expression + * @return string + */ + protected function compileStack($expression) + { + return "yieldContent{$expression}; ?>"; + } + + /** + * Compile the push statements into valid PHP. + * + * @param $expression * @return string */ - protected function compileSectionOverwrite($value) + protected function compilePush($expression) { - $pattern = $this->createPlainMatcher('overwrite'); + return "startSection{$expression}; ?>"; + } - return preg_replace($pattern, '$1stopSection(true); ?>$2', $value); + /** + * Compile the endpush statements into valid PHP. + * + * @param $expression + * @return string + */ + protected function compileEndpush($expression) + { + return "appendSection(); ?>"; + } + + /** + * Register a custom Blade compiler. + * + * @param Closure $compiler + * @return void + */ + public function extend(Closure $compiler) + { + $this->extensions[] = $compiler; } /** diff --git a/vendor/laravel/framework/src/Illuminate/View/Environment.php b/vendor/laravel/framework/src/Illuminate/View/Environment.php deleted file mode 100755 index 60cf5ab..0000000 --- a/vendor/laravel/framework/src/Illuminate/View/Environment.php +++ /dev/null @@ -1,805 +0,0 @@ - 'blade', 'php' => 'php'); - - /** - * The view composer events. - * - * @var array - */ - protected $composers = array(); - - /** - * All of the finished, captured sections. - * - * @var array - */ - protected $sections = array(); - - /** - * The stack of in-progress sections. - * - * @var array - */ - protected $sectionStack = array(); - - /** - * The number of active rendering operations. - * - * @var int - */ - protected $renderCount = 0; - - /** - * Create a new view environment instance. - * - * @param \Illuminate\View\Engines\EngineResolver $engines - * @param \Illuminate\View\ViewFinderInterface $finder - * @param \Illuminate\Events\Dispatcher $events - * @return void - */ - public function __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) - { - $this->finder = $finder; - $this->events = $events; - $this->engines = $engines; - - $this->share('__env', $this); - } - - /** - * Get the evaluated view contents for the given view. - * - * @param string $view - * @param array $data - * @param array $mergeData - * @return \Illuminate\View\View - */ - public function make($view, $data = array(), $mergeData = array()) - { - $path = $this->finder->find($view); - - $data = array_merge($mergeData, $this->parseData($data)); - - $this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data)); - - return $view; - } - - /** - * Parse the given data into a raw array. - * - * @param mixed $data - * @return array - */ - protected function parseData($data) - { - return $data instanceof Arrayable ? $data->toArray() : $data; - } - - /** - * Get the evaluated view contents for a named view. - * - * @param string $view - * @param mixed $data - * @return \Illuminate\View\View - */ - public function of($view, $data = array()) - { - return $this->make($this->names[$view], $data); - } - - /** - * Register a named view. - * - * @param string $view - * @param string $name - * @return void - */ - public function name($view, $name) - { - $this->names[$name] = $view; - } - - /** - * Determine if a given view exists. - * - * @param string $view - * @return bool - */ - public function exists($view) - { - try - { - $this->finder->find($view); - } - catch (\InvalidArgumentException $e) - { - return false; - } - - return true; - } - - /** - * Get the rendered contents of a partial from a loop. - * - * @param string $view - * @param array $data - * @param string $iterator - * @param string $empty - * @return string - */ - public function renderEach($view, $data, $iterator, $empty = 'raw|') - { - $result = ''; - - // If is actually data in the array, we will loop through the data and append - // an instance of the partial view to the final result HTML passing in the - // iterated value of this data array, allowing the views to access them. - if (count($data) > 0) - { - foreach ($data as $key => $value) - { - $data = array('key' => $key, $iterator => $value); - - $result .= $this->make($view, $data)->render(); - } - } - - // If there is no data in the array, we will render the contents of the empty - // view. Alternatively, the "empty view" could be a raw string that begins - // with "raw|" for convenience and to let this know that it is a string. - else - { - if (starts_with($empty, 'raw|')) - { - $result = substr($empty, 4); - } - else - { - $result = $this->make($empty)->render(); - } - } - - return $result; - } - - /** - * Get the appropriate view engine for the given path. - * - * @param string $path - * @return \Illuminate\View\Engines\EngineInterface - */ - protected function getEngineFromPath($path) - { - $engine = $this->extensions[$this->getExtension($path)]; - - return $this->engines->resolve($engine); - } - - /** - * Get the extension used by the view file. - * - * @param string $path - * @return string - */ - protected function getExtension($path) - { - $extensions = array_keys($this->extensions); - - return array_first($extensions, function($key, $value) use ($path) - { - return ends_with($path, $value); - }); - } - - /** - * Add a piece of shared data to the environment. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function share($key, $value = null) - { - if ( ! is_array($key)) return $this->shared[$key] = $value; - - foreach ($key as $innerKey => $innerValue) - { - $this->share($innerKey, $innerValue); - } - } - - /** - * Register a view creator event. - * - * @param array|string $views - * @param \Closure|string $callback - * @return array - */ - public function creator($views, $callback) - { - $creators = array(); - - foreach ((array) $views as $view) - { - $creators[] = $this->addViewEvent($view, $callback, 'creating: '); - } - - return $creators; - } - - /** - * Register multiple view composers via an array. - * - * @param array $composers - * @return array - */ - public function composers(array $composers) - { - $registered = array(); - - foreach ($composers as $callback => $views) - { - $registered += $this->composer($views, $callback); - } - - return $registered; - } - - /** - * Register a view composer event. - * - * @param array|string $views - * @param \Closure|string $callback - * @return array - */ - public function composer($views, $callback, $priority = null) - { - $composers = array(); - - foreach ((array) $views as $view) - { - $composers[] = $this->addViewEvent($view, $callback, 'composing: ', $priority); - } - - return $composers; - } - - /** - * Add an event for a given view. - * - * @param string $view - * @param Closure|string $callback - * @param string $prefix - * @return Closure - */ - protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null) - { - if ($callback instanceof Closure) - { - $this->addEventListener($prefix.$view, $callback, $priority); - - return $callback; - } - elseif (is_string($callback)) - { - return $this->addClassEvent($view, $callback, $prefix, $priority); - } - } - - /** - * Register a class based view composer. - * - * @param string $view - * @param string $class - * @param string $prefix - * @return \Closure - */ - protected function addClassEvent($view, $class, $prefix, $priority = null) - { - $name = $prefix.$view; - - // When registering a class based view "composer", we will simply resolve the - // classes from the application IoC container then call the compose method - // on the instance. This allows for convenient, testable view composers. - $callback = $this->buildClassEventCallback($class, $prefix); - - $this->addEventListener($name, $callback, $priority); - - return $callback; - } - - /** - * Add a listener to the event dispatcher. - * - * @param string $name - * @param \Closure $callback - * @param integer $priority - */ - protected function addEventListener($name, $callback, $priority = null) - { - if (is_null($priority)) - { - $this->events->listen($name, $callback); - } - else - { - $this->events->listen($name, $callback, $priority); - } - } - - /** - * Build a class based container callback Closure. - * - * @param string $class - * @param string $prefix - * @return \Closure - */ - protected function buildClassEventCallback($class, $prefix) - { - $container = $this->container; - - list($class, $method) = $this->parseClassEvent($class, $prefix); - - // Once we have the class and method name, we can build the Closure to resolve - // the instance out of the IoC container and call the method on it with the - // given arguments that are passed to the Closure as the composer's data. - return function() use ($class, $method, $container) - { - $callable = array($container->make($class), $method); - - return call_user_func_array($callable, func_get_args()); - }; - } - - /** - * Parse a class based composer name. - * - * @param string $class - * @param string $prefix - * @return array - */ - protected function parseClassEvent($class, $prefix) - { - if (str_contains($class, '@')) - { - return explode('@', $class); - } - else - { - $method = str_contains($prefix, 'composing') ? 'compose' : 'create'; - - return array($class, $method); - } - } - - /** - * Call the composer for a given view. - * - * @param \Illuminate\View\View $view - * @return void - */ - public function callComposer(View $view) - { - $this->events->fire('composing: '.$view->getName(), array($view)); - } - - /** - * Call the creator for a given view. - * - * @param \Illuminate\View\View $view - * @return void - */ - public function callCreator(View $view) - { - $this->events->fire('creating: '.$view->getName(), array($view)); - } - - /** - * Start injecting content into a section. - * - * @param string $section - * @param string $content - * @return void - */ - public function startSection($section, $content = '') - { - if ($content === '') - { - ob_start() && $this->sectionStack[] = $section; - } - else - { - $this->extendSection($section, $content); - } - } - - /** - * Inject inline content into a section. - * - * @param string $section - * @param string $content - * @return void - */ - public function inject($section, $content) - { - return $this->startSection($section, $content); - } - - /** - * Stop injecting content into a section and return its contents. - * - * @return string - */ - public function yieldSection() - { - return $this->yieldContent($this->stopSection()); - } - - /** - * Stop injecting content into a section. - * - * @param bool $overwrite - * @return string - */ - public function stopSection($overwrite = false) - { - $last = array_pop($this->sectionStack); - - if ($overwrite) - { - $this->sections[$last] = ob_get_clean(); - } - else - { - $this->extendSection($last, ob_get_clean()); - } - - return $last; - } - - /** - * Stop injecting content into a section and append it. - * - * @return string - */ - public function appendSection() - { - $last = array_pop($this->sectionStack); - - if (isset($this->sections[$last])) - { - $this->sections[$last] .= ob_get_clean(); - } - else - { - $this->sections[$last] = ob_get_clean(); - } - - return $last; - } - - /** - * Append content to a given section. - * - * @param string $section - * @param string $content - * @return void - */ - protected function extendSection($section, $content) - { - if (isset($this->sections[$section])) - { - $content = str_replace('@parent', $content, $this->sections[$section]); - - $this->sections[$section] = $content; - } - else - { - $this->sections[$section] = $content; - } - } - - /** - * Get the string contents of a section. - * - * @param string $section - * @param string $default - * @return string - */ - public function yieldContent($section, $default = '') - { - return isset($this->sections[$section]) ? $this->sections[$section] : $default; - } - - /** - * Flush all of the section contents. - * - * @return void - */ - public function flushSections() - { - $this->sections = array(); - - $this->sectionStack = array(); - } - - /** - * Flush all of the section contents if done rendering. - * - * @return void - */ - public function flushSectionsIfDoneRendering() - { - if ($this->doneRendering()) $this->flushSections(); - } - - /** - * Increment the rendering counter. - * - * @return void - */ - public function incrementRender() - { - $this->renderCount++; - } - - /** - * Decrement the rendering counter. - * - * @return void - */ - public function decrementRender() - { - $this->renderCount--; - } - - /** - * Check if there are no active render operations. - * - * @return bool - */ - public function doneRendering() - { - return $this->renderCount == 0; - } - - /** - * Add a location to the array of view locations. - * - * @param string $location - * @return void - */ - public function addLocation($location) - { - $this->finder->addLocation($location); - } - - /** - * Add a new namespace to the loader. - * - * @param string $namespace - * @param string|array $hints - * @return void - */ - public function addNamespace($namespace, $hints) - { - $this->finder->addNamespace($namespace, $hints); - } - - /** - * Prepend a new namespace to the loader. - * - * @param string $namespace - * @param string|array $hints - * @return void - */ - public function prependNamespace($namespace, $hints) - { - $this->finder->prependNamespace($namespace, $hints); - } - - /** - * Register a valid view extension and its engine. - * - * @param string $extension - * @param string $engine - * @param Closure $resolver - * @return void - */ - public function addExtension($extension, $engine, $resolver = null) - { - $this->finder->addExtension($extension); - - if (isset($resolver)) - { - $this->engines->register($engine, $resolver); - } - - unset($this->extensions[$extension]); - - $this->extensions = array_merge(array($extension => $engine), $this->extensions); - } - - /** - * Get the extension to engine bindings. - * - * @return array - */ - public function getExtensions() - { - return $this->extensions; - } - - /** - * Get the engine resolver instance. - * - * @return \Illuminate\View\Engines\EngineResolver - */ - public function getEngineResolver() - { - return $this->engines; - } - - /** - * Get the view finder instance. - * - * @return \Illuminate\View\ViewFinderInterface - */ - public function getFinder() - { - return $this->finder; - } - - /** - * Set the view finder instance. - * - * @return void - */ - public function setFinder(ViewFinderInterface $finder) - { - $this->finder = $finder; - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Events\Dispatcher - */ - public function getDispatcher() - { - return $this->events; - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Events\Dispatcher - * @return void - */ - public function setDispatcher(Dispatcher $events) - { - $this->events = $events; - } - - /** - * Get the IoC container instance. - * - * @return \Illuminate\Container\Container - */ - public function getContainer() - { - return $this->container; - } - - /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - */ - public function setContainer(Container $container) - { - $this->container = $container; - } - - /** - * Get an item from the shared data. - * - * @param string $key - * @param mixed $default - * @return mixed - */ - public function shared($key, $default = null) - { - return array_get($this->shared, $key, $default); - } - - /** - * Get all of the shared data for the environment. - * - * @return array - */ - public function getShared() - { - return $this->shared; - } - - /** - * Get the entire array of sections. - * - * @return array - */ - public function getSections() - { - return $this->sections; - } - - /** - * Get all of the registered named views in environment. - * - * @return array - */ - public function getNames() - { - return $this->names; - } - -} diff --git a/vendor/laravel/framework/src/Illuminate/View/Factory.php b/vendor/laravel/framework/src/Illuminate/View/Factory.php new file mode 100755 index 0000000..149b8d7 --- /dev/null +++ b/vendor/laravel/framework/src/Illuminate/View/Factory.php @@ -0,0 +1,826 @@ + 'blade', 'php' => 'php'); + + /** + * The view composer events. + * + * @var array + */ + protected $composers = array(); + + /** + * All of the finished, captured sections. + * + * @var array + */ + protected $sections = array(); + + /** + * The stack of in-progress sections. + * + * @var array + */ + protected $sectionStack = array(); + + /** + * The number of active rendering operations. + * + * @var int + */ + protected $renderCount = 0; + + /** + * Create a new view factory instance. + * + * @param \Illuminate\View\Engines\EngineResolver $engines + * @param \Illuminate\View\ViewFinderInterface $finder + * @param \Illuminate\Events\Dispatcher $events + * @return void + */ + public function __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) + { + $this->finder = $finder; + $this->events = $events; + $this->engines = $engines; + + $this->share('__env', $this); + } + + /** + * Get the evaluated view contents for the given view. + * + * @param string $view + * @param array $data + * @param array $mergeData + * @return \Illuminate\View\View + */ + public function make($view, $data = array(), $mergeData = array()) + { + if (isset($this->aliases[$view])) $view = $this->aliases[$view]; + + $path = $this->finder->find($view); + + $data = array_merge($mergeData, $this->parseData($data)); + + $this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data)); + + return $view; + } + + /** + * Parse the given data into a raw array. + * + * @param mixed $data + * @return array + */ + protected function parseData($data) + { + return $data instanceof Arrayable ? $data->toArray() : $data; + } + + /** + * Get the evaluated view contents for a named view. + * + * @param string $view + * @param mixed $data + * @return \Illuminate\View\View + */ + public function of($view, $data = array()) + { + return $this->make($this->names[$view], $data); + } + + /** + * Register a named view. + * + * @param string $view + * @param string $name + * @return void + */ + public function name($view, $name) + { + $this->names[$name] = $view; + } + + /** + * Add an alias for a view. + * + * @param string $view + * @param string $alias + * @return void + */ + public function alias($view, $alias) + { + $this->aliases[$alias] = $view; + } + + /** + * Determine if a given view exists. + * + * @param string $view + * @return bool + */ + public function exists($view) + { + try + { + $this->finder->find($view); + } + catch (\InvalidArgumentException $e) + { + return false; + } + + return true; + } + + /** + * Get the rendered contents of a partial from a loop. + * + * @param string $view + * @param array $data + * @param string $iterator + * @param string $empty + * @return string + */ + public function renderEach($view, $data, $iterator, $empty = 'raw|') + { + $result = ''; + + // If is actually data in the array, we will loop through the data and append + // an instance of the partial view to the final result HTML passing in the + // iterated value of this data array, allowing the views to access them. + if (count($data) > 0) + { + foreach ($data as $key => $value) + { + $data = array('key' => $key, $iterator => $value); + + $result .= $this->make($view, $data)->render(); + } + } + + // If there is no data in the array, we will render the contents of the empty + // view. Alternatively, the "empty view" could be a raw string that begins + // with "raw|" for convenience and to let this know that it is a string. + else + { + if (starts_with($empty, 'raw|')) + { + $result = substr($empty, 4); + } + else + { + $result = $this->make($empty)->render(); + } + } + + return $result; + } + + /** + * Get the appropriate view engine for the given path. + * + * @param string $path + * @return \Illuminate\View\Engines\EngineInterface + */ + protected function getEngineFromPath($path) + { + $engine = $this->extensions[$this->getExtension($path)]; + + return $this->engines->resolve($engine); + } + + /** + * Get the extension used by the view file. + * + * @param string $path + * @return string + */ + protected function getExtension($path) + { + $extensions = array_keys($this->extensions); + + return array_first($extensions, function($key, $value) use ($path) + { + return ends_with($path, $value); + }); + } + + /** + * Add a piece of shared data to the environment. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function share($key, $value = null) + { + if ( ! is_array($key)) return $this->shared[$key] = $value; + + foreach ($key as $innerKey => $innerValue) + { + $this->share($innerKey, $innerValue); + } + } + + /** + * Register a view creator event. + * + * @param array|string $views + * @param \Closure|string $callback + * @return array + */ + public function creator($views, $callback) + { + $creators = array(); + + foreach ((array) $views as $view) + { + $creators[] = $this->addViewEvent($view, $callback, 'creating: '); + } + + return $creators; + } + + /** + * Register multiple view composers via an array. + * + * @param array $composers + * @return array + */ + public function composers(array $composers) + { + $registered = array(); + + foreach ($composers as $callback => $views) + { + $registered += $this->composer($views, $callback); + } + + return $registered; + } + + /** + * Register a view composer event. + * + * @param array|string $views + * @param \Closure|string $callback + * @return array + */ + public function composer($views, $callback, $priority = null) + { + $composers = array(); + + foreach ((array) $views as $view) + { + $composers[] = $this->addViewEvent($view, $callback, 'composing: ', $priority); + } + + return $composers; + } + + /** + * Add an event for a given view. + * + * @param string $view + * @param Closure|string $callback + * @param string $prefix + * @return Closure + */ + protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null) + { + if ($callback instanceof Closure) + { + $this->addEventListener($prefix.$view, $callback, $priority); + + return $callback; + } + elseif (is_string($callback)) + { + return $this->addClassEvent($view, $callback, $prefix, $priority); + } + } + + /** + * Register a class based view composer. + * + * @param string $view + * @param string $class + * @param string $prefix + * @return \Closure + */ + protected function addClassEvent($view, $class, $prefix, $priority = null) + { + $name = $prefix.$view; + + // When registering a class based view "composer", we will simply resolve the + // classes from the application IoC container then call the compose method + // on the instance. This allows for convenient, testable view composers. + $callback = $this->buildClassEventCallback($class, $prefix); + + $this->addEventListener($name, $callback, $priority); + + return $callback; + } + + /** + * Add a listener to the event dispatcher. + * + * @param string $name + * @param \Closure $callback + * @param integer $priority + */ + protected function addEventListener($name, $callback, $priority = null) + { + if (is_null($priority)) + { + $this->events->listen($name, $callback); + } + else + { + $this->events->listen($name, $callback, $priority); + } + } + + /** + * Build a class based container callback Closure. + * + * @param string $class + * @param string $prefix + * @return \Closure + */ + protected function buildClassEventCallback($class, $prefix) + { + $container = $this->container; + + list($class, $method) = $this->parseClassEvent($class, $prefix); + + // Once we have the class and method name, we can build the Closure to resolve + // the instance out of the IoC container and call the method on it with the + // given arguments that are passed to the Closure as the composer's data. + return function() use ($class, $method, $container) + { + $callable = array($container->make($class), $method); + + return call_user_func_array($callable, func_get_args()); + }; + } + + /** + * Parse a class based composer name. + * + * @param string $class + * @param string $prefix + * @return array + */ + protected function parseClassEvent($class, $prefix) + { + if (str_contains($class, '@')) + { + return explode('@', $class); + } + else + { + $method = str_contains($prefix, 'composing') ? 'compose' : 'create'; + + return array($class, $method); + } + } + + /** + * Call the composer for a given view. + * + * @param \Illuminate\View\View $view + * @return void + */ + public function callComposer(View $view) + { + $this->events->fire('composing: '.$view->getName(), array($view)); + } + + /** + * Call the creator for a given view. + * + * @param \Illuminate\View\View $view + * @return void + */ + public function callCreator(View $view) + { + $this->events->fire('creating: '.$view->getName(), array($view)); + } + + /** + * Start injecting content into a section. + * + * @param string $section + * @param string $content + * @return void + */ + public function startSection($section, $content = '') + { + if ($content === '') + { + ob_start() && $this->sectionStack[] = $section; + } + else + { + $this->extendSection($section, $content); + } + } + + /** + * Inject inline content into a section. + * + * @param string $section + * @param string $content + * @return void + */ + public function inject($section, $content) + { + return $this->startSection($section, $content); + } + + /** + * Stop injecting content into a section and return its contents. + * + * @return string + */ + public function yieldSection() + { + return $this->yieldContent($this->stopSection()); + } + + /** + * Stop injecting content into a section. + * + * @param bool $overwrite + * @return string + */ + public function stopSection($overwrite = false) + { + $last = array_pop($this->sectionStack); + + if ($overwrite) + { + $this->sections[$last] = ob_get_clean(); + } + else + { + $this->extendSection($last, ob_get_clean()); + } + + return $last; + } + + /** + * Stop injecting content into a section and append it. + * + * @return string + */ + public function appendSection() + { + $last = array_pop($this->sectionStack); + + if (isset($this->sections[$last])) + { + $this->sections[$last] .= ob_get_clean(); + } + else + { + $this->sections[$last] = ob_get_clean(); + } + + return $last; + } + + /** + * Append content to a given section. + * + * @param string $section + * @param string $content + * @return void + */ + protected function extendSection($section, $content) + { + if (isset($this->sections[$section])) + { + $content = str_replace('@parent', $content, $this->sections[$section]); + + $this->sections[$section] = $content; + } + else + { + $this->sections[$section] = $content; + } + } + + /** + * Get the string contents of a section. + * + * @param string $section + * @param string $default + * @return string + */ + public function yieldContent($section, $default = '') + { + return isset($this->sections[$section]) ? $this->sections[$section] : $default; + } + + /** + * Flush all of the section contents. + * + * @return void + */ + public function flushSections() + { + $this->sections = array(); + + $this->sectionStack = array(); + } + + /** + * Flush all of the section contents if done rendering. + * + * @return void + */ + public function flushSectionsIfDoneRendering() + { + if ($this->doneRendering()) $this->flushSections(); + } + + /** + * Increment the rendering counter. + * + * @return void + */ + public function incrementRender() + { + $this->renderCount++; + } + + /** + * Decrement the rendering counter. + * + * @return void + */ + public function decrementRender() + { + $this->renderCount--; + } + + /** + * Check if there are no active render operations. + * + * @return bool + */ + public function doneRendering() + { + return $this->renderCount == 0; + } + + /** + * Add a location to the array of view locations. + * + * @param string $location + * @return void + */ + public function addLocation($location) + { + $this->finder->addLocation($location); + } + + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function addNamespace($namespace, $hints) + { + $this->finder->addNamespace($namespace, $hints); + } + + /** + * Prepend a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return void + */ + public function prependNamespace($namespace, $hints) + { + $this->finder->prependNamespace($namespace, $hints); + } + + /** + * Register a valid view extension and its engine. + * + * @param string $extension + * @param string $engine + * @param Closure $resolver + * @return void + */ + public function addExtension($extension, $engine, $resolver = null) + { + $this->finder->addExtension($extension); + + if (isset($resolver)) + { + $this->engines->register($engine, $resolver); + } + + unset($this->extensions[$extension]); + + $this->extensions = array_merge(array($extension => $engine), $this->extensions); + } + + /** + * Get the extension to engine bindings. + * + * @return array + */ + public function getExtensions() + { + return $this->extensions; + } + + /** + * Get the engine resolver instance. + * + * @return \Illuminate\View\Engines\EngineResolver + */ + public function getEngineResolver() + { + return $this->engines; + } + + /** + * Get the view finder instance. + * + * @return \Illuminate\View\ViewFinderInterface + */ + public function getFinder() + { + return $this->finder; + } + + /** + * Set the view finder instance. + * + * @return void + */ + public function setFinder(ViewFinderInterface $finder) + { + $this->finder = $finder; + } + + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Events\Dispatcher + */ + public function getDispatcher() + { + return $this->events; + } + + /** + * Set the event dispatcher instance. + * + * @param \Illuminate\Events\Dispatcher + * @return void + */ + public function setDispatcher(Dispatcher $events) + { + $this->events = $events; + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } + + /** + * Get an item from the shared data. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function shared($key, $default = null) + { + return array_get($this->shared, $key, $default); + } + + /** + * Get all of the shared data for the environment. + * + * @return array + */ + public function getShared() + { + return $this->shared; + } + + /** + * Get the entire array of sections. + * + * @return array + */ + public function getSections() + { + return $this->sections; + } + + /** + * Get all of the registered named views in environment. + * + * @return array + */ + public function getNames() + { + return $this->names; + } + +} diff --git a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php index 308edc4..723ad9a 100755 --- a/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php +++ b/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php @@ -40,6 +40,13 @@ class FileViewFinder implements ViewFinderInterface { protected $extensions = array('blade.php', 'php'); /** + * Hint path delimiter value. + * + * @var string + */ + const HINT_PATH_DELIMITER = '::'; + + /** * Create a new file view loader instance. * * @param \Illuminate\Filesystem\Filesystem $files @@ -68,7 +75,7 @@ class FileViewFinder implements ViewFinderInterface { { if (isset($this->views[$name])) return $this->views[$name]; - if (strpos($name, '::') !== false) + if ($this->hasHintInformation($name = trim($name))) { return $this->views[$name] = $this->findNamedPathView($name); } @@ -99,7 +106,7 @@ class FileViewFinder implements ViewFinderInterface { */ protected function getNamespaceSegments($name) { - $segments = explode('::', $name); + $segments = explode(static::HINT_PATH_DELIMITER, $name); if (count($segments) != 2) { @@ -220,6 +227,17 @@ class FileViewFinder implements ViewFinderInterface { } /** + * Returns whether or not the view specify a hint information + * + * @param string $name + * @return boolean + */ + public function hasHintInformation($name) + { + return strpos($name, static::HINT_PATH_DELIMITER) > 0; + } + + /** * Get the filesystem instance. * * @return \Illuminate\Filesystem\Filesystem diff --git a/vendor/laravel/framework/src/Illuminate/View/View.php b/vendor/laravel/framework/src/Illuminate/View/View.php index 4c31060..12867f5 100755 --- a/vendor/laravel/framework/src/Illuminate/View/View.php +++ b/vendor/laravel/framework/src/Illuminate/View/View.php @@ -11,11 +11,11 @@ use Illuminate\Support\Contracts\RenderableInterface as Renderable; class View implements ArrayAccess, Renderable { /** - * The view environment instance. + * The view factory instance. * - * @var \Illuminate\View\Environment + * @var \Illuminate\View\Factory */ - protected $environment; + protected $factory; /** * The engine implementation. @@ -48,19 +48,19 @@ class View implements ArrayAccess, Renderable { /** * Create a new view instance. * - * @param \Illuminate\View\Environment $environment + * @param \Illuminate\View\Factory $factory * @param \Illuminate\View\Engines\EngineInterface $engine * @param string $view * @param string $path * @param array $data * @return void */ - public function __construct(Environment $environment, EngineInterface $engine, $view, $path, $data = array()) + public function __construct(Factory $factory, EngineInterface $engine, $view, $path, $data = array()) { $this->view = $view; $this->path = $path; $this->engine = $engine; - $this->environment = $environment; + $this->factory = $factory; $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data; } @@ -79,8 +79,8 @@ class View implements ArrayAccess, Renderable { // Once we have the contents of the view, we will flush the sections if we are // done rendering all views so that there is nothing left hanging over when - // another view is rendered in the future via the application developers. - $this->environment->flushSectionsIfDoneRendering(); + // anothoer view is rendered in the future by the application developers. + $this->factory->flushSectionsIfDoneRendering(); return $response ?: $contents; } @@ -95,16 +95,16 @@ class View implements ArrayAccess, Renderable { // We will keep track of the amount of views being rendered so we can flush // the section after the complete rendering operation is done. This will // clear out the sections for any separate views that may be rendered. - $this->environment->incrementRender(); + $this->factory->incrementRender(); - $this->environment->callComposer($this); + $this->factory->callComposer($this); $contents = $this->getContents(); // Once we've finished rendering the view, we'll decrement the render count // so that each sections get flushed out next time a view is created and // no old sections are staying around in the memory of an environment. - $this->environment->decrementRender(); + $this->factory->decrementRender(); return $contents; } @@ -116,7 +116,7 @@ class View implements ArrayAccess, Renderable { */ public function renderSections() { - $env = $this->environment; + $env = $this->factory; return $this->render(function($view) use ($env) { @@ -141,7 +141,7 @@ class View implements ArrayAccess, Renderable { */ protected function gatherData() { - $data = array_merge($this->environment->getShared(), $this->data); + $data = array_merge($this->factory->getShared(), $this->data); foreach ($data as $key => $value) { @@ -185,7 +185,7 @@ class View implements ArrayAccess, Renderable { */ public function nest($key, $view, array $data = array()) { - return $this->with($key, $this->environment->make($view, $data)); + return $this->with($key, $this->factory->make($view, $data)); } /** @@ -209,13 +209,13 @@ class View implements ArrayAccess, Renderable { } /** - * Get the view environment instance. + * Get the view factory instance. * - * @return \Illuminate\View\Environment + * @return \Illuminate\View\Factory */ - public function getEnvironment() + public function getFactory() { - return $this->environment; + return $this->factory; } /** diff --git a/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php b/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php index a302969..770a974 100755 --- a/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php @@ -1,6 +1,6 @@ registerEnvironment(); + $this->registerFactory(); $this->registerSessionBinder(); } @@ -35,9 +35,7 @@ class ViewServiceProvider extends ServiceProvider { */ public function registerEngineResolver() { - $me = $this; - - $this->app->bindShared('view.engine.resolver', function($app) use ($me) + $this->app->bindShared('view.engine.resolver', function($app) { $resolver = new EngineResolver; @@ -46,7 +44,7 @@ class ViewServiceProvider extends ServiceProvider { // on the extension of view files. We call a method for each engines. foreach (array('php', 'blade') as $engine) { - $me->{'register'.ucfirst($engine).'Engine'}($resolver); + $this->{'register'.ucfirst($engine).'Engine'}($resolver); } return $resolver; @@ -110,7 +108,7 @@ class ViewServiceProvider extends ServiceProvider { * * @return void */ - public function registerEnvironment() + public function registerFactory() { $this->app->bindShared('view', function($app) { @@ -121,7 +119,7 @@ class ViewServiceProvider extends ServiceProvider { $finder = $app['view.finder']; - $env = new Environment($resolver, $finder, $app['events']); + $env = new Factory($resolver, $finder, $app['events']); // We will also set the container instance on this view environment since the // view composers may be classes registered in the container, which allows @@ -160,7 +158,7 @@ class ViewServiceProvider extends ServiceProvider { // they don't have to continually run checks for the presence of errors. else { - $app['view']->share('errors', new MessageBag); + $app['view']->share('errors', new ViewErrorBag); } }); } diff --git a/vendor/laravel/framework/src/Illuminate/View/composer.json b/vendor/laravel/framework/src/Illuminate/View/composer.json index da44ce9..8b6b535 100755 --- a/vendor/laravel/framework/src/Illuminate/View/composer.json +++ b/vendor/laravel/framework/src/Illuminate/View/composer.json @@ -8,15 +8,11 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/container": "4.1.*", - "illuminate/events": "4.1.*", - "illuminate/filesystem": "4.1.*", - "illuminate/support": "4.1.*" - }, - "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "php": ">=5.4.0", + "illuminate/container": "4.2.*", + "illuminate/events": "4.2.*", + "illuminate/filesystem": "4.2.*", + "illuminate/support": "4.2.*" }, "autoload": { "psr-0": { @@ -26,7 +22,7 @@ "target-dir": "Illuminate/View", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Workbench/composer.json b/vendor/laravel/framework/src/Illuminate/Workbench/composer.json index 3ea4002..7e3abdb 100755 --- a/vendor/laravel/framework/src/Illuminate/Workbench/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Workbench/composer.json @@ -8,15 +8,13 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/filesystem": "4.1.*", - "illuminate/support": "4.1.*", - "symfony/finder": "2.4.*" + "php": ">=5.4.0", + "illuminate/filesystem": "4.2.*", + "illuminate/support": "4.2.*", + "symfony/finder": "2.5.*" }, "require-dev": { - "illuminate/console": "4.1.*", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "4.0.*" + "illuminate/console": "4.2.*" }, "autoload": { "psr-0": { @@ -26,7 +24,7 @@ "target-dir": "Illuminate/Workbench", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "minimum-stability": "dev" diff --git a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json index 6802339..5133cd8 100755 --- a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json +++ b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/composer.json @@ -8,8 +8,8 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*" }, "autoload": { "classmap": [ diff --git a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json index 42698d3..a2cd6bb 100755 --- a/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json +++ b/vendor/laravel/framework/src/Illuminate/Workbench/stubs/plain.composer.json @@ -8,8 +8,8 @@ } ], "require": { - "php": ">=5.3.0", - "illuminate/support": "4.1.*" + "php": ">=5.4.0", + "illuminate/support": "4.2.*" }, "autoload": { "psr-0": { diff --git a/vendor/monolog/monolog/CHANGELOG.mdown b/vendor/monolog/monolog/CHANGELOG.mdown old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/README.mdown b/vendor/monolog/monolog/README.mdown old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/doc/extending.md b/vendor/monolog/monolog/doc/extending.md old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/doc/sockets.md b/vendor/monolog/monolog/doc/sockets.md old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/doc/usage.md b/vendor/monolog/monolog/doc/usage.md old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/phpunit.xml.dist b/vendor/monolog/monolog/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Functional/Handler/FirePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Functional/Handler/FirePHPHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep b/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php b/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/LoggerTest.php b/vendor/monolog/monolog/tests/Monolog/LoggerTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php b/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/Monolog/TestCase.php b/vendor/monolog/monolog/tests/Monolog/TestCase.php old mode 100755 new mode 100644 diff --git a/vendor/monolog/monolog/tests/bootstrap.php b/vendor/monolog/monolog/tests/bootstrap.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/LICENSE b/vendor/nesbot/carbon/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/composer.json b/vendor/nesbot/carbon/composer.json old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/history.md b/vendor/nesbot/carbon/history.md old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/phpunit.xml.dist b/vendor/nesbot/carbon/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/readme.md b/vendor/nesbot/carbon/readme.md old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/src/Carbon/Carbon.php b/vendor/nesbot/carbon/src/Carbon/Carbon.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/AddTest.php b/vendor/nesbot/carbon/tests/AddTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/ComparisonTest.php b/vendor/nesbot/carbon/tests/ComparisonTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/ConstructTest.php b/vendor/nesbot/carbon/tests/ConstructTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/CopyTest.php b/vendor/nesbot/carbon/tests/CopyTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/CreateFromDateTest.php b/vendor/nesbot/carbon/tests/CreateFromDateTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/CreateFromFormatTest.php b/vendor/nesbot/carbon/tests/CreateFromFormatTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/CreateFromTimeTest.php b/vendor/nesbot/carbon/tests/CreateFromTimeTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/CreateFromTimestampTest.php b/vendor/nesbot/carbon/tests/CreateFromTimestampTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/CreateTest.php b/vendor/nesbot/carbon/tests/CreateTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/DayOfWeekModifiersTest.php b/vendor/nesbot/carbon/tests/DayOfWeekModifiersTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/DiffTest.php b/vendor/nesbot/carbon/tests/DiffTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/FluidSettersTest.php b/vendor/nesbot/carbon/tests/FluidSettersTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/GettersTest.php b/vendor/nesbot/carbon/tests/GettersTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/InstanceTest.php b/vendor/nesbot/carbon/tests/InstanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/IsTest.php b/vendor/nesbot/carbon/tests/IsTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/IssetTest.php b/vendor/nesbot/carbon/tests/IssetTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/NowAndOtherStaticHelpersTest.php b/vendor/nesbot/carbon/tests/NowAndOtherStaticHelpersTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/SettersTest.php b/vendor/nesbot/carbon/tests/SettersTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/StartEndOfTest.php b/vendor/nesbot/carbon/tests/StartEndOfTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/StringsTest.php b/vendor/nesbot/carbon/tests/StringsTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/SubTest.php b/vendor/nesbot/carbon/tests/SubTest.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/TestFixture.php b/vendor/nesbot/carbon/tests/TestFixture.php old mode 100755 new mode 100644 diff --git a/vendor/nesbot/carbon/tests/TestingAidsTest.php b/vendor/nesbot/carbon/tests/TestingAidsTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/.travis.yml b/vendor/nikic/php-parser/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/CHANGELOG.md b/vendor/nikic/php-parser/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/LICENSE b/vendor/nikic/php-parser/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/doc/0_Introduction.markdown b/vendor/nikic/php-parser/doc/0_Introduction.markdown old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/doc/1_Installation.markdown b/vendor/nikic/php-parser/doc/1_Installation.markdown old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown b/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown b/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/doc/4_Code_generation.markdown b/vendor/nikic/php-parser/doc/4_Code_generation.markdown old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/doc/component/Lexer.markdown b/vendor/nikic/php-parser/doc/component/Lexer.markdown old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/grammar/README.md b/vendor/nikic/php-parser/grammar/README.md old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/grammar/analyze.php b/vendor/nikic/php-parser/grammar/analyze.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/grammar/kmyacc.php.parser b/vendor/nikic/php-parser/grammar/kmyacc.php.parser old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/grammar/rebuildParser.php b/vendor/nikic/php-parser/grammar/rebuildParser.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/grammar/zend_language_parser.phpy b/vendor/nikic/php-parser/grammar/zend_language_parser.phpy old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Autoloader.php b/vendor/nikic/php-parser/lib/PHPParser/Autoloader.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder.php b/vendor/nikic/php-parser/lib/PHPParser/Builder.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder/Class.php b/vendor/nikic/php-parser/lib/PHPParser/Builder/Class.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder/Function.php b/vendor/nikic/php-parser/lib/PHPParser/Builder/Function.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder/Interface.php b/vendor/nikic/php-parser/lib/PHPParser/Builder/Interface.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PHPParser/Builder/Method.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PHPParser/Builder/Param.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PHPParser/Builder/Property.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/BuilderAbstract.php b/vendor/nikic/php-parser/lib/PHPParser/BuilderAbstract.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PHPParser/BuilderFactory.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Comment.php b/vendor/nikic/php-parser/lib/PHPParser/Comment.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PHPParser/Comment/Doc.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Error.php b/vendor/nikic/php-parser/lib/PHPParser/Error.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Lexer.php b/vendor/nikic/php-parser/lib/PHPParser/Lexer.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PHPParser/Lexer/Emulative.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node.php b/vendor/nikic/php-parser/lib/PHPParser/Node.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Arg.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Const.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Const.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Array.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Array.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ArrayDimFetch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ArrayDimFetch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ArrayItem.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Assign.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseAnd.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseAnd.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseOr.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseOr.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseXor.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignBitwiseXor.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignConcat.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignConcat.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignDiv.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignDiv.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMinus.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMinus.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMod.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMod.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMul.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignMul.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignPlus.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignPlus.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignRef.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignRef.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignShiftLeft.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignShiftLeft.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignShiftRight.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/AssignShiftRight.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseAnd.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseNot.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseOr.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseOr.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseXor.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BitwiseXor.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanAnd.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanAnd.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanNot.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanOr.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/BooleanOr.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Array.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Array.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Bool.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Bool.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Double.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Double.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Int.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Int.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Object.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Object.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/String.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/String.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Unset.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Cast/Unset.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ClassConstFetch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ClassConstFetch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Clone.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Clone.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Closure.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ClosureUse.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Concat.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Concat.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ConstFetch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Div.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Div.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Empty.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Empty.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Equal.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Equal.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ErrorSuppress.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Eval.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Eval.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Exit.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Exit.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/FuncCall.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Greater.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Greater.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/GreaterOrEqual.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Identical.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Identical.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Include.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Include.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Instanceof.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Instanceof.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Isset.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Isset.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/List.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/List.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalAnd.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalAnd.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalOr.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalOr.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalXor.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/LogicalXor.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/MethodCall.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Minus.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Minus.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Mod.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Mod.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Mul.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Mul.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/New.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/New.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/NotEqual.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/NotEqual.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/NotIdentical.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/NotIdentical.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Plus.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Plus.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PostDec.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PostInc.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PreDec.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PreInc.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Print.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Print.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/PropertyFetch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ShellExec.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ShiftLeft.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ShiftLeft.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ShiftRight.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/ShiftRight.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Smaller.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Smaller.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/SmallerOrEqual.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/SmallerOrEqual.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/StaticCall.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/StaticPropertyFetch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Ternary.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/UnaryMinus.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/UnaryPlus.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Variable.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Yield.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Expr/Yield.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Name.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Name.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Name/FullyQualified.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Name/Relative.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Name/Relative.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Param.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Param.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/ClassConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/ClassConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/DNumber.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/DNumber.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/DirConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/DirConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/Encapsed.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/FileConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/FileConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/FuncConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/FuncConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/LNumber.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/LineConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/LineConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/MethodConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/MethodConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/NSConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/NSConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/String.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/String.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/TraitConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Scalar/TraitConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Break.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Break.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Case.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Case.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Catch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Catch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Class.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Class.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/ClassConst.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/ClassMethod.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Const.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Const.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Continue.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Continue.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Declare.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Declare.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/DeclareDeclare.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Do.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Do.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Echo.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Echo.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Else.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Else.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/ElseIf.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/ElseIf.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/For.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/For.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Foreach.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Foreach.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Function.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Function.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Global.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Global.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Goto.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Goto.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/HaltCompiler.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/If.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/If.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/InlineHTML.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Interface.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Interface.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Label.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Namespace.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Namespace.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Property.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/PropertyProperty.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Return.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Return.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Static.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Static.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/StaticVar.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Switch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Switch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Throw.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Throw.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Trait.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Trait.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUse.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation/Alias.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation/Alias.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TraitUseAdaptation/Precedence.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/TryCatch.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Unset.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Unset.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Use.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/Use.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/UseUse.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/While.php b/vendor/nikic/php-parser/lib/PHPParser/Node/Stmt/While.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PHPParser/NodeAbstract.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PHPParser/NodeDumper.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PHPParser/NodeTraverser.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PHPParser/NodeTraverserInterface.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeVisitor.php b/vendor/nikic/php-parser/lib/PHPParser/NodeVisitor.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PHPParser/NodeVisitor/NameResolver.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PHPParser/NodeVisitorAbstract.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Parser.php b/vendor/nikic/php-parser/lib/PHPParser/Parser.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/PrettyPrinter/Default.php b/vendor/nikic/php-parser/lib/PHPParser/PrettyPrinter/Default.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/PrettyPrinter/Zend.php b/vendor/nikic/php-parser/lib/PHPParser/PrettyPrinter/Zend.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PHPParser/PrettyPrinterAbstract.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Serializer.php b/vendor/nikic/php-parser/lib/PHPParser/Serializer.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Serializer/XML.php b/vendor/nikic/php-parser/lib/PHPParser/Serializer/XML.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Template.php b/vendor/nikic/php-parser/lib/PHPParser/Template.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/TemplateLoader.php b/vendor/nikic/php-parser/lib/PHPParser/TemplateLoader.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Unserializer.php b/vendor/nikic/php-parser/lib/PHPParser/Unserializer.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/PHPParser/Unserializer/XML.php b/vendor/nikic/php-parser/lib/PHPParser/Unserializer/XML.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/lib/bootstrap.php b/vendor/nikic/php-parser/lib/bootstrap.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/phpunit.xml.dist b/vendor/nikic/php-parser/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/ClassTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/ClassTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/FunctionTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/FunctionTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/InterfaceTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/InterfaceTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/MethodTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/MethodTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/ParamTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/ParamTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/PropertyTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Builder/PropertyTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/BuilderFactoryTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/BuilderFactoryTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/CodeTestAbstract.php b/vendor/nikic/php-parser/test/PHPParser/Tests/CodeTestAbstract.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/CommentTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/CommentTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/ErrorTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/ErrorTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Lexer/EmulativeTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Lexer/EmulativeTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/LexerTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/LexerTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Node/NameTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Node/NameTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Scalar/StringTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Scalar/StringTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Stmt/ClassMethodTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Stmt/ClassMethodTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Stmt/ClassTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Stmt/ClassTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Stmt/PropertyTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Node/Stmt/PropertyTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/NodeAbstractTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/NodeAbstractTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/NodeDumperTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/NodeDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/NodeTraverserTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/NodeTraverserTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/NodeVisitor/NameResolverTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/NodeVisitor/NameResolverTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/ParserTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/ParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/PrettyPrinterTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/PrettyPrinterTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Serializer/XMLTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Serializer/XMLTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/TemplateLoaderTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/TemplateLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/TemplateTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/TemplateTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/PHPParser/Tests/Unserializer/XMLTest.php b/vendor/nikic/php-parser/test/PHPParser/Tests/Unserializer/XMLTest.php old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test b/vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/assign.test b/vendor/nikic/php-parser/test/code/parser/expr/assign.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/cast.test b/vendor/nikic/php-parser/test/code/parser/expr/cast.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/clone.test b/vendor/nikic/php-parser/test/code/parser/expr/clone.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/closure.test b/vendor/nikic/php-parser/test/code/parser/expr/closure.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/comparison.test b/vendor/nikic/php-parser/test/code/parser/expr/comparison.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test b/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/exit.test b/vendor/nikic/php-parser/test/code/parser/expr/exit.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test b/vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test b/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/logic.test b/vendor/nikic/php-parser/test/code/parser/expr/logic.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/math.test b/vendor/nikic/php-parser/test/code/parser/expr/math.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/new.test b/vendor/nikic/php-parser/test/code/parser/expr/new.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/print.test b/vendor/nikic/php-parser/test/code/parser/expr/print.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/shellExec.test b/vendor/nikic/php-parser/test/code/parser/expr/shellExec.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/ternary.test b/vendor/nikic/php-parser/test/code/parser/expr/ternary.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/expr/variable.test b/vendor/nikic/php-parser/test/code/parser/expr/variable.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/constantString.test b/vendor/nikic/php-parser/test/code/parser/scalar/constantString.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/docString.test b/vendor/nikic/php-parser/test/code/parser/scalar/docString.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test b/vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/float.test b/vendor/nikic/php-parser/test/code/parser/scalar/float.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/int.test b/vendor/nikic/php-parser/test/code/parser/scalar/int.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test b/vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test b/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/final.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/final.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/name.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/class/name.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/const.test b/vendor/nikic/php-parser/test/code/parser/stmt/const.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test b/vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/declare.test b/vendor/nikic/php-parser/test/code/parser/stmt/declare.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/echo.test b/vendor/nikic/php-parser/test/code/parser/stmt/echo.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/generator.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/generator.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/typeHints.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/typeHints.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/if.test b/vendor/nikic/php-parser/test/code/parser/stmt/if.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test b/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/switch.test b/vendor/nikic/php-parser/test/code/parser/stmt/switch.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test b/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test-fail b/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test-fail old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/unset.test b/vendor/nikic/php-parser/test/code/parser/stmt/unset.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/closure.test b/vendor/nikic/php-parser/test/code/prettyPrinter/closure.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/comments.test b/vendor/nikic/php-parser/test/code/prettyPrinter/comments.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/include.test b/vendor/nikic/php-parser/test/code/prettyPrinter/include.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/namespaces.test b/vendor/nikic/php-parser/test/code/prettyPrinter/namespaces.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/parentheses.test b/vendor/nikic/php-parser/test/code/prettyPrinter/parentheses.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/switch.test b/vendor/nikic/php-parser/test/code/prettyPrinter/switch.test old mode 100755 new mode 100644 diff --git a/vendor/nikic/php-parser/test_old/run.php b/vendor/nikic/php-parser/test_old/run.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/.travis.yml b/vendor/patchwork/utf8/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/CHANGELOG.md b/vendor/patchwork/utf8/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/README.md b/vendor/patchwork/utf8/README.md old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Normalizer.php b/vendor/patchwork/utf8/class/Normalizer.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Iconv.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Iconv.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Intl.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Normalizer.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Xml.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.big5.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.big5.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp037.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp037.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1006.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1006.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1026.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp1026.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp424.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp424.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp437.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp437.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp500.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp500.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp737.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp737.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp775.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp775.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp850.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp850.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp852.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp852.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp855.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp855.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp856.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp856.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp857.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp857.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp860.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp860.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp861.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp861.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp862.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp862.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp863.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp863.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp864.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp864.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp865.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp865.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp866.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp866.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp869.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp869.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp874.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp874.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp875.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp875.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp932.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp932.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp936.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp936.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp949.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp949.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp950.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.cp950.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.gsm0338.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.gsm0338.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-1.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-10.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-11.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-13.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-14.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-15.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-16.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-2.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-3.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-4.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-5.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-6.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-7.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-8.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.iso-8859-9.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-r.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-r.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-u.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.koi8-u.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.mazovia.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.mazovia.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.nextstep.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.nextstep.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.stdenc.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.stdenc.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.symbol.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.turkish.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii-quotes.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.us-ascii.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1250.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1251.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1252.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1253.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1254.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1255.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1256.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1257.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.windows-1258.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-ce.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-cyrillic.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-greek.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-icelandic.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.x-mac-roman.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/from.zdingbat.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.gsm0338.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.mazovia.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.stdenc.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.symbol.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/to.zdingbat.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/charset/translit.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalComposition.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/canonicalDecomposition.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/combiningClass.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/compatibilityDecomposition.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/lowerCase.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser b/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/unidata/upperCase.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/TurkishUtf8.php b/vendor/patchwork/utf8/class/Patchwork/TurkishUtf8.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8.php b/vendor/patchwork/utf8/class/Patchwork/Utf8.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/iconv.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/intl.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/intl.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/mbstring.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/mbstring.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/utf8_encode.php b/vendor/patchwork/utf8/class/Patchwork/Utf8/Bootup/utf8_encode.php old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/caseFolding_full.ser b/vendor/patchwork/utf8/class/Patchwork/Utf8/data/caseFolding_full.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/class/Patchwork/Utf8/data/translit_extra.ser b/vendor/patchwork/utf8/class/Patchwork/Utf8/data/translit_extra.ser old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/composer.json b/vendor/patchwork/utf8/composer.json old mode 100755 new mode 100644 diff --git a/vendor/patchwork/utf8/phpunit.xml.dist b/vendor/patchwork/utf8/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/.gitattributes b/vendor/phpseclib/phpseclib/.gitattributes old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/.gitignore b/vendor/phpseclib/phpseclib/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/.travis.yml b/vendor/phpseclib/phpseclib/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/AUTHORS b/vendor/phpseclib/phpseclib/AUTHORS old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/LICENSE b/vendor/phpseclib/phpseclib/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/README.md b/vendor/phpseclib/phpseclib/README.md old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/build/code-sniffer-ruleset-tests.xml b/vendor/phpseclib/phpseclib/build/code-sniffer-ruleset-tests.xml old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/build/code-sniffer-ruleset.xml b/vendor/phpseclib/phpseclib/build/code-sniffer-ruleset.xml old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/composer.json b/vendor/phpseclib/phpseclib/composer.json old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/composer.lock b/vendor/phpseclib/phpseclib/composer.lock old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/AES.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Blowfish.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/DES.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Hash.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/RSA.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/TripleDES.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php b/vendor/phpseclib/phpseclib/phpseclib/Crypt/Twofish.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php b/vendor/phpseclib/phpseclib/phpseclib/File/ANSI.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php b/vendor/phpseclib/phpseclib/phpseclib/File/ASN1.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/File/X509.php b/vendor/phpseclib/phpseclib/phpseclib/File/X509.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SCP.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH1.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/System/SSH_Agent.php b/vendor/phpseclib/phpseclib/phpseclib/System/SSH_Agent.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpseclib/openssl.cnf b/vendor/phpseclib/phpseclib/phpseclib/openssl.cnf old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/phpunit.xml.dist b/vendor/phpseclib/phpseclib/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Crypt/AES/ContinuousBufferTest.php b/vendor/phpseclib/phpseclib/tests/Crypt/AES/ContinuousBufferTest.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Crypt/AES/TestCase.php b/vendor/phpseclib/phpseclib/tests/Crypt/AES/TestCase.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Crypt/Hash/MD5Test.php b/vendor/phpseclib/phpseclib/tests/Crypt/Hash/MD5Test.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Crypt/Hash/TestCase.php b/vendor/phpseclib/phpseclib/tests/Crypt/Hash/TestCase.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Crypt/RSA/LoadKeyTest.php b/vendor/phpseclib/phpseclib/tests/Crypt/RSA/LoadKeyTest.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Math/BigInteger/BCMathTest.php b/vendor/phpseclib/phpseclib/tests/Math/BigInteger/BCMathTest.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Math/BigInteger/GMPTest.php b/vendor/phpseclib/phpseclib/tests/Math/BigInteger/GMPTest.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Math/BigInteger/InternalOpenSSLTest.php b/vendor/phpseclib/phpseclib/tests/Math/BigInteger/InternalOpenSSLTest.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Math/BigInteger/InternalTest.php b/vendor/phpseclib/phpseclib/tests/Math/BigInteger/InternalTest.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Math/BigInteger/TestCase.php b/vendor/phpseclib/phpseclib/tests/Math/BigInteger/TestCase.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Net/SSH1Test.php b/vendor/phpseclib/phpseclib/tests/Net/SSH1Test.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/Net/SSH2Test.php b/vendor/phpseclib/phpseclib/tests/Net/SSH2Test.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/PhpseclibTestCase.php b/vendor/phpseclib/phpseclib/tests/PhpseclibTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/tests/bootstrap.php b/vendor/phpseclib/phpseclib/tests/bootstrap.php old mode 100755 new mode 100644 diff --git a/vendor/phpseclib/phpseclib/travis/code_coverage_id_rsa b/vendor/phpseclib/phpseclib/travis/code_coverage_id_rsa old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/.gitignore b/vendor/predis/predis/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/.travis.yml b/vendor/predis/predis/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/CHANGELOG.NAMING.md b/vendor/predis/predis/CHANGELOG.NAMING.md old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/CHANGELOG.md b/vendor/predis/predis/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/CONTRIBUTING.md b/vendor/predis/predis/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/FAQ.md b/vendor/predis/predis/FAQ.md old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/LICENSE b/vendor/predis/predis/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/README.md b/vendor/predis/predis/README.md old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/VERSION b/vendor/predis/predis/VERSION old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/autoload.php b/vendor/predis/predis/autoload.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/composer.json b/vendor/predis/predis/composer.json old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/CustomDistributionStrategy.php b/vendor/predis/predis/examples/CustomDistributionStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/DispatcherLoop.php b/vendor/predis/predis/examples/DispatcherLoop.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/KeyPrefixes.php b/vendor/predis/predis/examples/KeyPrefixes.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/MasterSlaveReplication.php b/vendor/predis/predis/examples/MasterSlaveReplication.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/MasterSlaveReplicationComplex.php b/vendor/predis/predis/examples/MasterSlaveReplicationComplex.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/MonitorContext.php b/vendor/predis/predis/examples/MonitorContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/MultiBulkReplyIterators.php b/vendor/predis/predis/examples/MultiBulkReplyIterators.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/MultipleSetAndGet.php b/vendor/predis/predis/examples/MultipleSetAndGet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/PipelineContext.php b/vendor/predis/predis/examples/PipelineContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/PubSubContext.php b/vendor/predis/predis/examples/PubSubContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/RedisCollectionsIterators.php b/vendor/predis/predis/examples/RedisCollectionsIterators.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/ServerSideScripting.php b/vendor/predis/predis/examples/ServerSideScripting.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/SessionHandler.php b/vendor/predis/predis/examples/SessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/SharedConfigurations.php b/vendor/predis/predis/examples/SharedConfigurations.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/SimpleDebuggableConnection.php b/vendor/predis/predis/examples/SimpleDebuggableConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/SimpleSetAndGet.php b/vendor/predis/predis/examples/SimpleSetAndGet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/examples/TransactionWithCAS.php b/vendor/predis/predis/examples/TransactionWithCAS.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Autoloader.php b/vendor/predis/predis/lib/Predis/Autoloader.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/BasicClientInterface.php b/vendor/predis/predis/lib/Predis/BasicClientInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Client.php b/vendor/predis/predis/lib/Predis/Client.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ClientException.php b/vendor/predis/predis/lib/Predis/ClientException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ClientInterface.php b/vendor/predis/predis/lib/Predis/ClientInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/CommandHashStrategyInterface.php b/vendor/predis/predis/lib/Predis/Cluster/CommandHashStrategyInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/Distribution/DistributionStrategyInterface.php b/vendor/predis/predis/lib/Predis/Cluster/Distribution/DistributionStrategyInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/Distribution/EmptyRingException.php b/vendor/predis/predis/lib/Predis/Cluster/Distribution/EmptyRingException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/Distribution/HashRing.php b/vendor/predis/predis/lib/Predis/Cluster/Distribution/HashRing.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/Distribution/KetamaPureRing.php b/vendor/predis/predis/lib/Predis/Cluster/Distribution/KetamaPureRing.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/Hash/CRC16HashGenerator.php b/vendor/predis/predis/lib/Predis/Cluster/Hash/CRC16HashGenerator.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/Hash/HashGeneratorInterface.php b/vendor/predis/predis/lib/Predis/Cluster/Hash/HashGeneratorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/PredisClusterHashStrategy.php b/vendor/predis/predis/lib/Predis/Cluster/PredisClusterHashStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Cluster/RedisClusterHashStrategy.php b/vendor/predis/predis/lib/Predis/Cluster/RedisClusterHashStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Collection/Iterator/CursorBasedIterator.php b/vendor/predis/predis/lib/Predis/Collection/Iterator/CursorBasedIterator.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Collection/Iterator/HashKey.php b/vendor/predis/predis/lib/Predis/Collection/Iterator/HashKey.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Collection/Iterator/Keyspace.php b/vendor/predis/predis/lib/Predis/Collection/Iterator/Keyspace.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Collection/Iterator/ListKey.php b/vendor/predis/predis/lib/Predis/Collection/Iterator/ListKey.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Collection/Iterator/SetKey.php b/vendor/predis/predis/lib/Predis/Collection/Iterator/SetKey.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Collection/Iterator/SortedSetKey.php b/vendor/predis/predis/lib/Predis/Collection/Iterator/SortedSetKey.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/AbstractCommand.php b/vendor/predis/predis/lib/Predis/Command/AbstractCommand.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/CommandInterface.php b/vendor/predis/predis/lib/Predis/Command/CommandInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ConnectionAuth.php b/vendor/predis/predis/lib/Predis/Command/ConnectionAuth.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ConnectionEcho.php b/vendor/predis/predis/lib/Predis/Command/ConnectionEcho.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ConnectionPing.php b/vendor/predis/predis/lib/Predis/Command/ConnectionPing.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ConnectionQuit.php b/vendor/predis/predis/lib/Predis/Command/ConnectionQuit.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ConnectionSelect.php b/vendor/predis/predis/lib/Predis/Command/ConnectionSelect.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashDelete.php b/vendor/predis/predis/lib/Predis/Command/HashDelete.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashExists.php b/vendor/predis/predis/lib/Predis/Command/HashExists.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashGet.php b/vendor/predis/predis/lib/Predis/Command/HashGet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashGetAll.php b/vendor/predis/predis/lib/Predis/Command/HashGetAll.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashGetMultiple.php b/vendor/predis/predis/lib/Predis/Command/HashGetMultiple.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashIncrementBy.php b/vendor/predis/predis/lib/Predis/Command/HashIncrementBy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashIncrementByFloat.php b/vendor/predis/predis/lib/Predis/Command/HashIncrementByFloat.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashKeys.php b/vendor/predis/predis/lib/Predis/Command/HashKeys.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashLength.php b/vendor/predis/predis/lib/Predis/Command/HashLength.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashScan.php b/vendor/predis/predis/lib/Predis/Command/HashScan.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashSet.php b/vendor/predis/predis/lib/Predis/Command/HashSet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashSetMultiple.php b/vendor/predis/predis/lib/Predis/Command/HashSetMultiple.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashSetPreserve.php b/vendor/predis/predis/lib/Predis/Command/HashSetPreserve.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/HashValues.php b/vendor/predis/predis/lib/Predis/Command/HashValues.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyDelete.php b/vendor/predis/predis/lib/Predis/Command/KeyDelete.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyDump.php b/vendor/predis/predis/lib/Predis/Command/KeyDump.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyExists.php b/vendor/predis/predis/lib/Predis/Command/KeyExists.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyExpire.php b/vendor/predis/predis/lib/Predis/Command/KeyExpire.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyExpireAt.php b/vendor/predis/predis/lib/Predis/Command/KeyExpireAt.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyKeys.php b/vendor/predis/predis/lib/Predis/Command/KeyKeys.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyKeysV12x.php b/vendor/predis/predis/lib/Predis/Command/KeyKeysV12x.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyMove.php b/vendor/predis/predis/lib/Predis/Command/KeyMove.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyPersist.php b/vendor/predis/predis/lib/Predis/Command/KeyPersist.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyPreciseExpire.php b/vendor/predis/predis/lib/Predis/Command/KeyPreciseExpire.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyPreciseExpireAt.php b/vendor/predis/predis/lib/Predis/Command/KeyPreciseExpireAt.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyPreciseTimeToLive.php b/vendor/predis/predis/lib/Predis/Command/KeyPreciseTimeToLive.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyRandom.php b/vendor/predis/predis/lib/Predis/Command/KeyRandom.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyRename.php b/vendor/predis/predis/lib/Predis/Command/KeyRename.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyRenamePreserve.php b/vendor/predis/predis/lib/Predis/Command/KeyRenamePreserve.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyRestore.php b/vendor/predis/predis/lib/Predis/Command/KeyRestore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyScan.php b/vendor/predis/predis/lib/Predis/Command/KeyScan.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeySort.php b/vendor/predis/predis/lib/Predis/Command/KeySort.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyTimeToLive.php b/vendor/predis/predis/lib/Predis/Command/KeyTimeToLive.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/KeyType.php b/vendor/predis/predis/lib/Predis/Command/KeyType.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListIndex.php b/vendor/predis/predis/lib/Predis/Command/ListIndex.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListInsert.php b/vendor/predis/predis/lib/Predis/Command/ListInsert.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListLength.php b/vendor/predis/predis/lib/Predis/Command/ListLength.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPopFirst.php b/vendor/predis/predis/lib/Predis/Command/ListPopFirst.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPopFirstBlocking.php b/vendor/predis/predis/lib/Predis/Command/ListPopFirstBlocking.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPopLast.php b/vendor/predis/predis/lib/Predis/Command/ListPopLast.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPopLastBlocking.php b/vendor/predis/predis/lib/Predis/Command/ListPopLastBlocking.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPopLastPushHead.php b/vendor/predis/predis/lib/Predis/Command/ListPopLastPushHead.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPopLastPushHeadBlocking.php b/vendor/predis/predis/lib/Predis/Command/ListPopLastPushHeadBlocking.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPushHead.php b/vendor/predis/predis/lib/Predis/Command/ListPushHead.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPushHeadX.php b/vendor/predis/predis/lib/Predis/Command/ListPushHeadX.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPushTail.php b/vendor/predis/predis/lib/Predis/Command/ListPushTail.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListPushTailX.php b/vendor/predis/predis/lib/Predis/Command/ListPushTailX.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListRange.php b/vendor/predis/predis/lib/Predis/Command/ListRange.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListRemove.php b/vendor/predis/predis/lib/Predis/Command/ListRemove.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListSet.php b/vendor/predis/predis/lib/Predis/Command/ListSet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ListTrim.php b/vendor/predis/predis/lib/Predis/Command/ListTrim.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PrefixHelpers.php b/vendor/predis/predis/lib/Predis/Command/PrefixHelpers.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PrefixableCommand.php b/vendor/predis/predis/lib/Predis/Command/PrefixableCommand.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PrefixableCommandInterface.php b/vendor/predis/predis/lib/Predis/Command/PrefixableCommandInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/Processor/CommandProcessingInterface.php b/vendor/predis/predis/lib/Predis/Command/Processor/CommandProcessingInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/Processor/CommandProcessorChainInterface.php b/vendor/predis/predis/lib/Predis/Command/Processor/CommandProcessorChainInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/Processor/CommandProcessorInterface.php b/vendor/predis/predis/lib/Predis/Command/Processor/CommandProcessorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/Processor/KeyPrefixProcessor.php b/vendor/predis/predis/lib/Predis/Command/Processor/KeyPrefixProcessor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/Processor/ProcessorChain.php b/vendor/predis/predis/lib/Predis/Command/Processor/ProcessorChain.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PubSubPublish.php b/vendor/predis/predis/lib/Predis/Command/PubSubPublish.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PubSubSubscribe.php b/vendor/predis/predis/lib/Predis/Command/PubSubSubscribe.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PubSubSubscribeByPattern.php b/vendor/predis/predis/lib/Predis/Command/PubSubSubscribeByPattern.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PubSubUnsubscribe.php b/vendor/predis/predis/lib/Predis/Command/PubSubUnsubscribe.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/PubSubUnsubscribeByPattern.php b/vendor/predis/predis/lib/Predis/Command/PubSubUnsubscribeByPattern.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/RawCommand.php b/vendor/predis/predis/lib/Predis/Command/RawCommand.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ScriptedCommand.php b/vendor/predis/predis/lib/Predis/Command/ScriptedCommand.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerBackgroundRewriteAOF.php b/vendor/predis/predis/lib/Predis/Command/ServerBackgroundRewriteAOF.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerBackgroundSave.php b/vendor/predis/predis/lib/Predis/Command/ServerBackgroundSave.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerClient.php b/vendor/predis/predis/lib/Predis/Command/ServerClient.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerConfig.php b/vendor/predis/predis/lib/Predis/Command/ServerConfig.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerDatabaseSize.php b/vendor/predis/predis/lib/Predis/Command/ServerDatabaseSize.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerEval.php b/vendor/predis/predis/lib/Predis/Command/ServerEval.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerEvalSHA.php b/vendor/predis/predis/lib/Predis/Command/ServerEvalSHA.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerFlushAll.php b/vendor/predis/predis/lib/Predis/Command/ServerFlushAll.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerFlushDatabase.php b/vendor/predis/predis/lib/Predis/Command/ServerFlushDatabase.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerInfo.php b/vendor/predis/predis/lib/Predis/Command/ServerInfo.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerInfoV26x.php b/vendor/predis/predis/lib/Predis/Command/ServerInfoV26x.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerLastSave.php b/vendor/predis/predis/lib/Predis/Command/ServerLastSave.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerMonitor.php b/vendor/predis/predis/lib/Predis/Command/ServerMonitor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerObject.php b/vendor/predis/predis/lib/Predis/Command/ServerObject.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerSave.php b/vendor/predis/predis/lib/Predis/Command/ServerSave.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerScript.php b/vendor/predis/predis/lib/Predis/Command/ServerScript.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerShutdown.php b/vendor/predis/predis/lib/Predis/Command/ServerShutdown.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerSlaveOf.php b/vendor/predis/predis/lib/Predis/Command/ServerSlaveOf.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerSlowlog.php b/vendor/predis/predis/lib/Predis/Command/ServerSlowlog.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ServerTime.php b/vendor/predis/predis/lib/Predis/Command/ServerTime.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetAdd.php b/vendor/predis/predis/lib/Predis/Command/SetAdd.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetCardinality.php b/vendor/predis/predis/lib/Predis/Command/SetCardinality.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetDifference.php b/vendor/predis/predis/lib/Predis/Command/SetDifference.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetDifferenceStore.php b/vendor/predis/predis/lib/Predis/Command/SetDifferenceStore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetIntersection.php b/vendor/predis/predis/lib/Predis/Command/SetIntersection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetIntersectionStore.php b/vendor/predis/predis/lib/Predis/Command/SetIntersectionStore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetIsMember.php b/vendor/predis/predis/lib/Predis/Command/SetIsMember.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetMembers.php b/vendor/predis/predis/lib/Predis/Command/SetMembers.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetMove.php b/vendor/predis/predis/lib/Predis/Command/SetMove.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetPop.php b/vendor/predis/predis/lib/Predis/Command/SetPop.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetRandomMember.php b/vendor/predis/predis/lib/Predis/Command/SetRandomMember.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetRemove.php b/vendor/predis/predis/lib/Predis/Command/SetRemove.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetScan.php b/vendor/predis/predis/lib/Predis/Command/SetScan.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetUnion.php b/vendor/predis/predis/lib/Predis/Command/SetUnion.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/SetUnionStore.php b/vendor/predis/predis/lib/Predis/Command/SetUnionStore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringAppend.php b/vendor/predis/predis/lib/Predis/Command/StringAppend.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringBitCount.php b/vendor/predis/predis/lib/Predis/Command/StringBitCount.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringBitOp.php b/vendor/predis/predis/lib/Predis/Command/StringBitOp.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringDecrement.php b/vendor/predis/predis/lib/Predis/Command/StringDecrement.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringDecrementBy.php b/vendor/predis/predis/lib/Predis/Command/StringDecrementBy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringGet.php b/vendor/predis/predis/lib/Predis/Command/StringGet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringGetBit.php b/vendor/predis/predis/lib/Predis/Command/StringGetBit.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringGetMultiple.php b/vendor/predis/predis/lib/Predis/Command/StringGetMultiple.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringGetRange.php b/vendor/predis/predis/lib/Predis/Command/StringGetRange.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringGetSet.php b/vendor/predis/predis/lib/Predis/Command/StringGetSet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringIncrement.php b/vendor/predis/predis/lib/Predis/Command/StringIncrement.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringIncrementBy.php b/vendor/predis/predis/lib/Predis/Command/StringIncrementBy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringIncrementByFloat.php b/vendor/predis/predis/lib/Predis/Command/StringIncrementByFloat.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringPreciseSetExpire.php b/vendor/predis/predis/lib/Predis/Command/StringPreciseSetExpire.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSet.php b/vendor/predis/predis/lib/Predis/Command/StringSet.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSetBit.php b/vendor/predis/predis/lib/Predis/Command/StringSetBit.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSetExpire.php b/vendor/predis/predis/lib/Predis/Command/StringSetExpire.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSetMultiple.php b/vendor/predis/predis/lib/Predis/Command/StringSetMultiple.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSetMultiplePreserve.php b/vendor/predis/predis/lib/Predis/Command/StringSetMultiplePreserve.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSetPreserve.php b/vendor/predis/predis/lib/Predis/Command/StringSetPreserve.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSetRange.php b/vendor/predis/predis/lib/Predis/Command/StringSetRange.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringStrlen.php b/vendor/predis/predis/lib/Predis/Command/StringStrlen.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/StringSubstr.php b/vendor/predis/predis/lib/Predis/Command/StringSubstr.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/TransactionDiscard.php b/vendor/predis/predis/lib/Predis/Command/TransactionDiscard.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/TransactionExec.php b/vendor/predis/predis/lib/Predis/Command/TransactionExec.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/TransactionMulti.php b/vendor/predis/predis/lib/Predis/Command/TransactionMulti.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/TransactionUnwatch.php b/vendor/predis/predis/lib/Predis/Command/TransactionUnwatch.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/TransactionWatch.php b/vendor/predis/predis/lib/Predis/Command/TransactionWatch.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetAdd.php b/vendor/predis/predis/lib/Predis/Command/ZSetAdd.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetCardinality.php b/vendor/predis/predis/lib/Predis/Command/ZSetCardinality.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetCount.php b/vendor/predis/predis/lib/Predis/Command/ZSetCount.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetIncrementBy.php b/vendor/predis/predis/lib/Predis/Command/ZSetIncrementBy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetIntersectionStore.php b/vendor/predis/predis/lib/Predis/Command/ZSetIntersectionStore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetRange.php b/vendor/predis/predis/lib/Predis/Command/ZSetRange.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetRangeByScore.php b/vendor/predis/predis/lib/Predis/Command/ZSetRangeByScore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetRank.php b/vendor/predis/predis/lib/Predis/Command/ZSetRank.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetRemove.php b/vendor/predis/predis/lib/Predis/Command/ZSetRemove.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetRemoveRangeByRank.php b/vendor/predis/predis/lib/Predis/Command/ZSetRemoveRangeByRank.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetRemoveRangeByScore.php b/vendor/predis/predis/lib/Predis/Command/ZSetRemoveRangeByScore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetReverseRange.php b/vendor/predis/predis/lib/Predis/Command/ZSetReverseRange.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetReverseRangeByScore.php b/vendor/predis/predis/lib/Predis/Command/ZSetReverseRangeByScore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetReverseRank.php b/vendor/predis/predis/lib/Predis/Command/ZSetReverseRank.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetScan.php b/vendor/predis/predis/lib/Predis/Command/ZSetScan.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetScore.php b/vendor/predis/predis/lib/Predis/Command/ZSetScore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Command/ZSetUnionStore.php b/vendor/predis/predis/lib/Predis/Command/ZSetUnionStore.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/CommunicationException.php b/vendor/predis/predis/lib/Predis/CommunicationException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/AbstractConnection.php b/vendor/predis/predis/lib/Predis/Connection/AbstractConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/AggregatedConnectionInterface.php b/vendor/predis/predis/lib/Predis/Connection/AggregatedConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ClusterConnectionInterface.php b/vendor/predis/predis/lib/Predis/Connection/ClusterConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ComposableConnectionInterface.php b/vendor/predis/predis/lib/Predis/Connection/ComposableConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ComposableStreamConnection.php b/vendor/predis/predis/lib/Predis/Connection/ComposableStreamConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ConnectionException.php b/vendor/predis/predis/lib/Predis/Connection/ConnectionException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ConnectionFactory.php b/vendor/predis/predis/lib/Predis/Connection/ConnectionFactory.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ConnectionFactoryInterface.php b/vendor/predis/predis/lib/Predis/Connection/ConnectionFactoryInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ConnectionInterface.php b/vendor/predis/predis/lib/Predis/Connection/ConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ConnectionParameters.php b/vendor/predis/predis/lib/Predis/Connection/ConnectionParameters.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ConnectionParametersInterface.php b/vendor/predis/predis/lib/Predis/Connection/ConnectionParametersInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/MasterSlaveReplication.php b/vendor/predis/predis/lib/Predis/Connection/MasterSlaveReplication.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/PhpiredisConnection.php b/vendor/predis/predis/lib/Predis/Connection/PhpiredisConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/PhpiredisStreamConnection.php b/vendor/predis/predis/lib/Predis/Connection/PhpiredisStreamConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/PredisCluster.php b/vendor/predis/predis/lib/Predis/Connection/PredisCluster.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/RedisCluster.php b/vendor/predis/predis/lib/Predis/Connection/RedisCluster.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/ReplicationConnectionInterface.php b/vendor/predis/predis/lib/Predis/Connection/ReplicationConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/SingleConnectionInterface.php b/vendor/predis/predis/lib/Predis/Connection/SingleConnectionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/StreamConnection.php b/vendor/predis/predis/lib/Predis/Connection/StreamConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Connection/WebdisConnection.php b/vendor/predis/predis/lib/Predis/Connection/WebdisConnection.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ExecutableContextInterface.php b/vendor/predis/predis/lib/Predis/ExecutableContextInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Helpers.php b/vendor/predis/predis/lib/Predis/Helpers.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Iterator/MultiBulkResponse.php b/vendor/predis/predis/lib/Predis/Iterator/MultiBulkResponse.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Iterator/MultiBulkResponseSimple.php b/vendor/predis/predis/lib/Predis/Iterator/MultiBulkResponseSimple.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Iterator/MultiBulkResponseTuple.php b/vendor/predis/predis/lib/Predis/Iterator/MultiBulkResponseTuple.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Monitor/MonitorContext.php b/vendor/predis/predis/lib/Predis/Monitor/MonitorContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/NotSupportedException.php b/vendor/predis/predis/lib/Predis/NotSupportedException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/AbstractOption.php b/vendor/predis/predis/lib/Predis/Option/AbstractOption.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientCluster.php b/vendor/predis/predis/lib/Predis/Option/ClientCluster.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientConnectionFactory.php b/vendor/predis/predis/lib/Predis/Option/ClientConnectionFactory.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientExceptions.php b/vendor/predis/predis/lib/Predis/Option/ClientExceptions.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientOptions.php b/vendor/predis/predis/lib/Predis/Option/ClientOptions.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientOptionsInterface.php b/vendor/predis/predis/lib/Predis/Option/ClientOptionsInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientPrefix.php b/vendor/predis/predis/lib/Predis/Option/ClientPrefix.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientProfile.php b/vendor/predis/predis/lib/Predis/Option/ClientProfile.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/ClientReplication.php b/vendor/predis/predis/lib/Predis/Option/ClientReplication.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/CustomOption.php b/vendor/predis/predis/lib/Predis/Option/CustomOption.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Option/OptionInterface.php b/vendor/predis/predis/lib/Predis/Option/OptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/FireAndForgetExecutor.php b/vendor/predis/predis/lib/Predis/Pipeline/FireAndForgetExecutor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/MultiExecExecutor.php b/vendor/predis/predis/lib/Predis/Pipeline/MultiExecExecutor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/PipelineContext.php b/vendor/predis/predis/lib/Predis/Pipeline/PipelineContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/PipelineExecutorInterface.php b/vendor/predis/predis/lib/Predis/Pipeline/PipelineExecutorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/SafeClusterExecutor.php b/vendor/predis/predis/lib/Predis/Pipeline/SafeClusterExecutor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/SafeExecutor.php b/vendor/predis/predis/lib/Predis/Pipeline/SafeExecutor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Pipeline/StandardExecutor.php b/vendor/predis/predis/lib/Predis/Pipeline/StandardExecutor.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/PredisException.php b/vendor/predis/predis/lib/Predis/PredisException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerProfile.php b/vendor/predis/predis/lib/Predis/Profile/ServerProfile.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerProfileInterface.php b/vendor/predis/predis/lib/Predis/Profile/ServerProfileInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersion12.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersion12.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersion20.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersion20.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersion22.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersion22.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersion24.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersion24.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersion26.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersion26.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersion28.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersion28.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Profile/ServerVersionNext.php b/vendor/predis/predis/lib/Predis/Profile/ServerVersionNext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/CommandSerializerInterface.php b/vendor/predis/predis/lib/Predis/Protocol/CommandSerializerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/ComposableProtocolInterface.php b/vendor/predis/predis/lib/Predis/Protocol/ComposableProtocolInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/ProtocolException.php b/vendor/predis/predis/lib/Predis/Protocol/ProtocolException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/ProtocolInterface.php b/vendor/predis/predis/lib/Predis/Protocol/ProtocolInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/ResponseHandlerInterface.php b/vendor/predis/predis/lib/Predis/Protocol/ResponseHandlerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/ResponseReaderInterface.php b/vendor/predis/predis/lib/Predis/Protocol/ResponseReaderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ComposableTextProtocol.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ComposableTextProtocol.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseBulkHandler.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseBulkHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseErrorHandler.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseErrorHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseIntegerHandler.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseIntegerHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseMultiBulkHandler.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseMultiBulkHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseMultiBulkStreamHandler.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseMultiBulkStreamHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseStatusHandler.php b/vendor/predis/predis/lib/Predis/Protocol/Text/ResponseStatusHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/TextCommandSerializer.php b/vendor/predis/predis/lib/Predis/Protocol/Text/TextCommandSerializer.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/TextProtocol.php b/vendor/predis/predis/lib/Predis/Protocol/Text/TextProtocol.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Protocol/Text/TextResponseReader.php b/vendor/predis/predis/lib/Predis/Protocol/Text/TextResponseReader.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/PubSub/AbstractPubSubContext.php b/vendor/predis/predis/lib/Predis/PubSub/AbstractPubSubContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/PubSub/DispatcherLoop.php b/vendor/predis/predis/lib/Predis/PubSub/DispatcherLoop.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/PubSub/PubSubContext.php b/vendor/predis/predis/lib/Predis/PubSub/PubSubContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Replication/ReplicationStrategy.php b/vendor/predis/predis/lib/Predis/Replication/ReplicationStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ResponseError.php b/vendor/predis/predis/lib/Predis/ResponseError.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ResponseErrorInterface.php b/vendor/predis/predis/lib/Predis/ResponseErrorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ResponseObjectInterface.php b/vendor/predis/predis/lib/Predis/ResponseObjectInterface.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ResponseQueued.php b/vendor/predis/predis/lib/Predis/ResponseQueued.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/ServerException.php b/vendor/predis/predis/lib/Predis/ServerException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Session/SessionHandler.php b/vendor/predis/predis/lib/Predis/Session/SessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Transaction/AbortedMultiExecException.php b/vendor/predis/predis/lib/Predis/Transaction/AbortedMultiExecException.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/lib/Predis/Transaction/MultiExecContext.php b/vendor/predis/predis/lib/Predis/Transaction/MultiExecContext.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/package.ini b/vendor/predis/predis/package.ini old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/phpunit.xml.dist b/vendor/predis/predis/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/phpunit.xml.travisci b/vendor/predis/predis/phpunit.xml.travisci old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/ArrayHasSameValuesConstraint.php b/vendor/predis/predis/tests/PHPUnit/ArrayHasSameValuesConstraint.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/PredisCommandTestCase.php b/vendor/predis/predis/tests/PHPUnit/PredisCommandTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/PredisConnectionTestCase.php b/vendor/predis/predis/tests/PHPUnit/PredisConnectionTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/PredisDistributorTestCase.php b/vendor/predis/predis/tests/PHPUnit/PredisDistributorTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/PredisProfileTestCase.php b/vendor/predis/predis/tests/PHPUnit/PredisProfileTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/PredisTestCase.php b/vendor/predis/predis/tests/PHPUnit/PredisTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/PHPUnit/RedisCommandConstraint.php b/vendor/predis/predis/tests/PHPUnit/RedisCommandConstraint.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/ClientExceptionTest.php b/vendor/predis/predis/tests/Predis/ClientExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/ClientTest.php b/vendor/predis/predis/tests/Predis/ClientTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Cluster/Distribution/EmptyRingExceptionTest.php b/vendor/predis/predis/tests/Predis/Cluster/Distribution/EmptyRingExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Cluster/Distribution/HashRingTest.php b/vendor/predis/predis/tests/Predis/Cluster/Distribution/HashRingTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Cluster/Distribution/KetamaPureRingTest.php b/vendor/predis/predis/tests/Predis/Cluster/Distribution/KetamaPureRingTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Cluster/PredisClusterHashStrategyTest.php b/vendor/predis/predis/tests/Predis/Cluster/PredisClusterHashStrategyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Cluster/RedisClusterHashStrategyTest.php b/vendor/predis/predis/tests/Predis/Cluster/RedisClusterHashStrategyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Collection/Iterator/HashKeyTest.php b/vendor/predis/predis/tests/Predis/Collection/Iterator/HashKeyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Collection/Iterator/KeyspaceTest.php b/vendor/predis/predis/tests/Predis/Collection/Iterator/KeyspaceTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Collection/Iterator/ListKeyTest.php b/vendor/predis/predis/tests/Predis/Collection/Iterator/ListKeyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Collection/Iterator/SetKeyTest.php b/vendor/predis/predis/tests/Predis/Collection/Iterator/SetKeyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Collection/Iterator/SortedSetKeyTest.php b/vendor/predis/predis/tests/Predis/Collection/Iterator/SortedSetKeyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/CommandTest.php b/vendor/predis/predis/tests/Predis/Command/CommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ConnectionAuthTest.php b/vendor/predis/predis/tests/Predis/Command/ConnectionAuthTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ConnectionEchoTest.php b/vendor/predis/predis/tests/Predis/Command/ConnectionEchoTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ConnectionPingTest.php b/vendor/predis/predis/tests/Predis/Command/ConnectionPingTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ConnectionQuitTest.php b/vendor/predis/predis/tests/Predis/Command/ConnectionQuitTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ConnectionSelectTest.php b/vendor/predis/predis/tests/Predis/Command/ConnectionSelectTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashDeleteTest.php b/vendor/predis/predis/tests/Predis/Command/HashDeleteTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashExistsTest.php b/vendor/predis/predis/tests/Predis/Command/HashExistsTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashGetAllTest.php b/vendor/predis/predis/tests/Predis/Command/HashGetAllTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashGetMultipleTest.php b/vendor/predis/predis/tests/Predis/Command/HashGetMultipleTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashGetTest.php b/vendor/predis/predis/tests/Predis/Command/HashGetTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashIncrementByFloatTest.php b/vendor/predis/predis/tests/Predis/Command/HashIncrementByFloatTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashIncrementByTest.php b/vendor/predis/predis/tests/Predis/Command/HashIncrementByTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashKeysTest.php b/vendor/predis/predis/tests/Predis/Command/HashKeysTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashLengthTest.php b/vendor/predis/predis/tests/Predis/Command/HashLengthTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashScanTest.php b/vendor/predis/predis/tests/Predis/Command/HashScanTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashSetMultipleTest.php b/vendor/predis/predis/tests/Predis/Command/HashSetMultipleTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashSetPreserveTest.php b/vendor/predis/predis/tests/Predis/Command/HashSetPreserveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashSetTest.php b/vendor/predis/predis/tests/Predis/Command/HashSetTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/HashValuesTest.php b/vendor/predis/predis/tests/Predis/Command/HashValuesTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyDeleteTest.php b/vendor/predis/predis/tests/Predis/Command/KeyDeleteTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyDumpTest.php b/vendor/predis/predis/tests/Predis/Command/KeyDumpTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyExistsTest.php b/vendor/predis/predis/tests/Predis/Command/KeyExistsTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyExpireAtTest.php b/vendor/predis/predis/tests/Predis/Command/KeyExpireAtTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyExpireTest.php b/vendor/predis/predis/tests/Predis/Command/KeyExpireTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyKeysTest.php b/vendor/predis/predis/tests/Predis/Command/KeyKeysTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyKeysV12xTest.php b/vendor/predis/predis/tests/Predis/Command/KeyKeysV12xTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyMoveTest.php b/vendor/predis/predis/tests/Predis/Command/KeyMoveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyPersistTest.php b/vendor/predis/predis/tests/Predis/Command/KeyPersistTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyPreciseExpireAtTest.php b/vendor/predis/predis/tests/Predis/Command/KeyPreciseExpireAtTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyPreciseExpireTest.php b/vendor/predis/predis/tests/Predis/Command/KeyPreciseExpireTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyPreciseTimeToLiveTest.php b/vendor/predis/predis/tests/Predis/Command/KeyPreciseTimeToLiveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyRandomTest.php b/vendor/predis/predis/tests/Predis/Command/KeyRandomTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyRenamePreserveTest.php b/vendor/predis/predis/tests/Predis/Command/KeyRenamePreserveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyRenameTest.php b/vendor/predis/predis/tests/Predis/Command/KeyRenameTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyRestoreTest.php b/vendor/predis/predis/tests/Predis/Command/KeyRestoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyScanTest.php b/vendor/predis/predis/tests/Predis/Command/KeyScanTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeySortTest.php b/vendor/predis/predis/tests/Predis/Command/KeySortTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyTimeToLiveTest.php b/vendor/predis/predis/tests/Predis/Command/KeyTimeToLiveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/KeyTypeTest.php b/vendor/predis/predis/tests/Predis/Command/KeyTypeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListIndexTest.php b/vendor/predis/predis/tests/Predis/Command/ListIndexTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListInsertTest.php b/vendor/predis/predis/tests/Predis/Command/ListInsertTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListLengthTest.php b/vendor/predis/predis/tests/Predis/Command/ListLengthTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPopFirstBlockingTest.php b/vendor/predis/predis/tests/Predis/Command/ListPopFirstBlockingTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPopFirstTest.php b/vendor/predis/predis/tests/Predis/Command/ListPopFirstTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPopLastBlockingTest.php b/vendor/predis/predis/tests/Predis/Command/ListPopLastBlockingTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPopLastPushHeadBlockingTest.php b/vendor/predis/predis/tests/Predis/Command/ListPopLastPushHeadBlockingTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPopLastPushHeadTest.php b/vendor/predis/predis/tests/Predis/Command/ListPopLastPushHeadTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPopLastTest.php b/vendor/predis/predis/tests/Predis/Command/ListPopLastTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPushHeadTest.php b/vendor/predis/predis/tests/Predis/Command/ListPushHeadTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPushHeadXTest.php b/vendor/predis/predis/tests/Predis/Command/ListPushHeadXTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPushTailTest.php b/vendor/predis/predis/tests/Predis/Command/ListPushTailTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListPushTailXTest.php b/vendor/predis/predis/tests/Predis/Command/ListPushTailXTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListRangeTest.php b/vendor/predis/predis/tests/Predis/Command/ListRangeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListRemoveTest.php b/vendor/predis/predis/tests/Predis/Command/ListRemoveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListSetTest.php b/vendor/predis/predis/tests/Predis/Command/ListSetTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ListTrimTest.php b/vendor/predis/predis/tests/Predis/Command/ListTrimTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PrefixHelpersTest.php b/vendor/predis/predis/tests/Predis/Command/PrefixHelpersTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PrefixableCommandTest.php b/vendor/predis/predis/tests/Predis/Command/PrefixableCommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php b/vendor/predis/predis/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/Processor/ProcessorChainTest.php b/vendor/predis/predis/tests/Predis/Command/Processor/ProcessorChainTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PubSubPublishTest.php b/vendor/predis/predis/tests/Predis/Command/PubSubPublishTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PubSubSubscribeByPatternTest.php b/vendor/predis/predis/tests/Predis/Command/PubSubSubscribeByPatternTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PubSubSubscribeTest.php b/vendor/predis/predis/tests/Predis/Command/PubSubSubscribeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PubSubUnsubscribeByPatternTest.php b/vendor/predis/predis/tests/Predis/Command/PubSubUnsubscribeByPatternTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/PubSubUnsubscribeTest.php b/vendor/predis/predis/tests/Predis/Command/PubSubUnsubscribeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/RawCommandTest.php b/vendor/predis/predis/tests/Predis/Command/RawCommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ScriptedCommandTest.php b/vendor/predis/predis/tests/Predis/Command/ScriptedCommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerBackgroundRewriteAOFTest.php b/vendor/predis/predis/tests/Predis/Command/ServerBackgroundRewriteAOFTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerBackgroundSaveTest.php b/vendor/predis/predis/tests/Predis/Command/ServerBackgroundSaveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerClientTest.php b/vendor/predis/predis/tests/Predis/Command/ServerClientTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerConfigTest.php b/vendor/predis/predis/tests/Predis/Command/ServerConfigTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerDatabaseSizeTest.php b/vendor/predis/predis/tests/Predis/Command/ServerDatabaseSizeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerEvalSHATest.php b/vendor/predis/predis/tests/Predis/Command/ServerEvalSHATest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerEvalTest.php b/vendor/predis/predis/tests/Predis/Command/ServerEvalTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerFlushAllTest.php b/vendor/predis/predis/tests/Predis/Command/ServerFlushAllTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerFlushDatabaseTest.php b/vendor/predis/predis/tests/Predis/Command/ServerFlushDatabaseTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerInfoTest.php b/vendor/predis/predis/tests/Predis/Command/ServerInfoTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerInfoV26xTest.php b/vendor/predis/predis/tests/Predis/Command/ServerInfoV26xTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerLastSaveTest.php b/vendor/predis/predis/tests/Predis/Command/ServerLastSaveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerMonitorTest.php b/vendor/predis/predis/tests/Predis/Command/ServerMonitorTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerObjectTest.php b/vendor/predis/predis/tests/Predis/Command/ServerObjectTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerSaveTest.php b/vendor/predis/predis/tests/Predis/Command/ServerSaveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerScriptTest.php b/vendor/predis/predis/tests/Predis/Command/ServerScriptTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerShutdownTest.php b/vendor/predis/predis/tests/Predis/Command/ServerShutdownTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerSlaveOfTest.php b/vendor/predis/predis/tests/Predis/Command/ServerSlaveOfTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerSlowlogTest.php b/vendor/predis/predis/tests/Predis/Command/ServerSlowlogTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ServerTimeTest.php b/vendor/predis/predis/tests/Predis/Command/ServerTimeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetAddTest.php b/vendor/predis/predis/tests/Predis/Command/SetAddTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetCardinalityTest.php b/vendor/predis/predis/tests/Predis/Command/SetCardinalityTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetDifferenceStoreTest.php b/vendor/predis/predis/tests/Predis/Command/SetDifferenceStoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetDifferenceTest.php b/vendor/predis/predis/tests/Predis/Command/SetDifferenceTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetIntersectionStoreTest.php b/vendor/predis/predis/tests/Predis/Command/SetIntersectionStoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetIntersectionTest.php b/vendor/predis/predis/tests/Predis/Command/SetIntersectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetIsMemberTest.php b/vendor/predis/predis/tests/Predis/Command/SetIsMemberTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetMembersTest.php b/vendor/predis/predis/tests/Predis/Command/SetMembersTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetMoveTest.php b/vendor/predis/predis/tests/Predis/Command/SetMoveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetPopTest.php b/vendor/predis/predis/tests/Predis/Command/SetPopTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetRandomMemberTest.php b/vendor/predis/predis/tests/Predis/Command/SetRandomMemberTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetRemoveTest.php b/vendor/predis/predis/tests/Predis/Command/SetRemoveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetScanTest.php b/vendor/predis/predis/tests/Predis/Command/SetScanTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetUnionStoreTest.php b/vendor/predis/predis/tests/Predis/Command/SetUnionStoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/SetUnionTest.php b/vendor/predis/predis/tests/Predis/Command/SetUnionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringAppendTest.php b/vendor/predis/predis/tests/Predis/Command/StringAppendTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringBitCountTest.php b/vendor/predis/predis/tests/Predis/Command/StringBitCountTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringBitOpTest.php b/vendor/predis/predis/tests/Predis/Command/StringBitOpTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringDecrementByTest.php b/vendor/predis/predis/tests/Predis/Command/StringDecrementByTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringDecrementTest.php b/vendor/predis/predis/tests/Predis/Command/StringDecrementTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringGetBitTest.php b/vendor/predis/predis/tests/Predis/Command/StringGetBitTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringGetMultipleTest.php b/vendor/predis/predis/tests/Predis/Command/StringGetMultipleTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringGetRangeTest.php b/vendor/predis/predis/tests/Predis/Command/StringGetRangeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringGetSetTest.php b/vendor/predis/predis/tests/Predis/Command/StringGetSetTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringGetTest.php b/vendor/predis/predis/tests/Predis/Command/StringGetTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringIncrementByFloatTest.php b/vendor/predis/predis/tests/Predis/Command/StringIncrementByFloatTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringIncrementByTest.php b/vendor/predis/predis/tests/Predis/Command/StringIncrementByTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringIncrementTest.php b/vendor/predis/predis/tests/Predis/Command/StringIncrementTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringPreciseSetExpireTest.php b/vendor/predis/predis/tests/Predis/Command/StringPreciseSetExpireTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetBitTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetBitTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetExpireTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetExpireTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetMultiplePreserveTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetMultiplePreserveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetMultipleTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetMultipleTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetPreserveTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetPreserveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetRangeTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetRangeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSetTest.php b/vendor/predis/predis/tests/Predis/Command/StringSetTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringStrlenTest.php b/vendor/predis/predis/tests/Predis/Command/StringStrlenTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/StringSubstrTest.php b/vendor/predis/predis/tests/Predis/Command/StringSubstrTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/TransactionDiscardTest.php b/vendor/predis/predis/tests/Predis/Command/TransactionDiscardTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/TransactionExecTest.php b/vendor/predis/predis/tests/Predis/Command/TransactionExecTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/TransactionMultiTest.php b/vendor/predis/predis/tests/Predis/Command/TransactionMultiTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/TransactionUnwatchTest.php b/vendor/predis/predis/tests/Predis/Command/TransactionUnwatchTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/TransactionWatchTest.php b/vendor/predis/predis/tests/Predis/Command/TransactionWatchTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetAddTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetAddTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetCardinalityTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetCardinalityTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetCountTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetCountTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetIncrementByTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetIncrementByTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetIntersectionStoreTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetIntersectionStoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetRangeByScoreTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetRangeByScoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetRangeTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetRangeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetRankTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetRankTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetRemoveRangeByRankTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetRemoveRangeByRankTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetRemoveRangeByScoreTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetRemoveRangeByScoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetRemoveTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetRemoveTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetReverseRangeByScoreTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetReverseRangeByScoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetReverseRangeTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetReverseRangeTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetReverseRankTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetReverseRankTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetScanTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetScanTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetScoreTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetScoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Command/ZSetUnionStoreTest.php b/vendor/predis/predis/tests/Predis/Command/ZSetUnionStoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/CommunicationExceptionTest.php b/vendor/predis/predis/tests/Predis/CommunicationExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/ComposableStreamConnectionTest.php b/vendor/predis/predis/tests/Predis/Connection/ComposableStreamConnectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/ConnectionExceptionTest.php b/vendor/predis/predis/tests/Predis/Connection/ConnectionExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/ConnectionFactoryTest.php b/vendor/predis/predis/tests/Predis/Connection/ConnectionFactoryTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/ConnectionParametersTest.php b/vendor/predis/predis/tests/Predis/Connection/ConnectionParametersTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/MasterSlaveReplicationTest.php b/vendor/predis/predis/tests/Predis/Connection/MasterSlaveReplicationTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/PhpiredisConnectionTest.php b/vendor/predis/predis/tests/Predis/Connection/PhpiredisConnectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/PhpiredisStreamConnectionTest.php b/vendor/predis/predis/tests/Predis/Connection/PhpiredisStreamConnectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/PredisClusterTest.php b/vendor/predis/predis/tests/Predis/Connection/PredisClusterTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/RedisClusterTest.php b/vendor/predis/predis/tests/Predis/Connection/RedisClusterTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/StreamConnectionTest.php b/vendor/predis/predis/tests/Predis/Connection/StreamConnectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Connection/WebdisConnectionTest.php b/vendor/predis/predis/tests/Predis/Connection/WebdisConnectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/HelpersTest.php b/vendor/predis/predis/tests/Predis/HelpersTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Iterator/MultiBulkResponseSimpleTest.php b/vendor/predis/predis/tests/Predis/Iterator/MultiBulkResponseSimpleTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Iterator/MultiBulkResponseTupleTest.php b/vendor/predis/predis/tests/Predis/Iterator/MultiBulkResponseTupleTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Monitor/MonitorContextTest.php b/vendor/predis/predis/tests/Predis/Monitor/MonitorContextTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/AbstractOptionTest.php b/vendor/predis/predis/tests/Predis/Option/AbstractOptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientClusterTest.php b/vendor/predis/predis/tests/Predis/Option/ClientClusterTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientConnectionFactoryTest.php b/vendor/predis/predis/tests/Predis/Option/ClientConnectionFactoryTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientExceptionsTest.php b/vendor/predis/predis/tests/Predis/Option/ClientExceptionsTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientOptionsTest.php b/vendor/predis/predis/tests/Predis/Option/ClientOptionsTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientPrefixTest.php b/vendor/predis/predis/tests/Predis/Option/ClientPrefixTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientProfileTest.php b/vendor/predis/predis/tests/Predis/Option/ClientProfileTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/ClientReplicationTest.php b/vendor/predis/predis/tests/Predis/Option/ClientReplicationTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Option/CustomOptionTest.php b/vendor/predis/predis/tests/Predis/Option/CustomOptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Pipeline/FireAndForgetExecutorTest.php b/vendor/predis/predis/tests/Predis/Pipeline/FireAndForgetExecutorTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Pipeline/MultiExecExecutorTest.php b/vendor/predis/predis/tests/Predis/Pipeline/MultiExecExecutorTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Pipeline/PipelineContextTest.php b/vendor/predis/predis/tests/Predis/Pipeline/PipelineContextTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Pipeline/StandardExecutorTest.php b/vendor/predis/predis/tests/Predis/Pipeline/StandardExecutorTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/PredisExceptionTest.php b/vendor/predis/predis/tests/Predis/PredisExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerProfileTest.php b/vendor/predis/predis/tests/Predis/Profile/ServerProfileTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersion12Test.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersion12Test.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersion20Test.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersion20Test.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersion22Test.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersion22Test.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersion24Test.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersion24Test.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersion26Test.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersion26Test.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersion28Test.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersion28Test.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Profile/ServerVersionNextTest.php b/vendor/predis/predis/tests/Predis/Profile/ServerVersionNextTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/ProtocolExceptionTest.php b/vendor/predis/predis/tests/Predis/Protocol/ProtocolExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ComposableTextProtocolTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ComposableTextProtocolTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseBulkHandlerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseBulkHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseErrorHandlerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseErrorHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseIntegerHandlerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseIntegerHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseMultiBulkHandlerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseMultiBulkHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseMultiBulkStreamHandlerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseMultiBulkStreamHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseStatusHandlerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/ResponseStatusHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/TextCommandSerializerTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/TextCommandSerializerTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/TextProtocolTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/TextProtocolTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Protocol/Text/TextResponseReaderTest.php b/vendor/predis/predis/tests/Predis/Protocol/Text/TextResponseReaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/PubSub/DispatcherLoopTest.php b/vendor/predis/predis/tests/Predis/PubSub/DispatcherLoopTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/PubSub/PubSubContextTest.php b/vendor/predis/predis/tests/Predis/PubSub/PubSubContextTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Replication/ReplicationStrategyTest.php b/vendor/predis/predis/tests/Predis/Replication/ReplicationStrategyTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/ResponseErrorTest.php b/vendor/predis/predis/tests/Predis/ResponseErrorTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/ResponseQueuedTest.php b/vendor/predis/predis/tests/Predis/ResponseQueuedTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/ServerExceptionTest.php b/vendor/predis/predis/tests/Predis/ServerExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Transaction/AbortedMultiExecExceptionTest.php b/vendor/predis/predis/tests/Predis/Transaction/AbortedMultiExecExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/Predis/Transaction/MultiExecContextTest.php b/vendor/predis/predis/tests/Predis/Transaction/MultiExecContextTest.php old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/README.md b/vendor/predis/predis/tests/README.md old mode 100755 new mode 100644 diff --git a/vendor/predis/predis/tests/bootstrap.php b/vendor/predis/predis/tests/bootstrap.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/.gitignore b/vendor/psr/log/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/psr/log/LICENSE b/vendor/psr/log/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/AbstractLogger.php b/vendor/psr/log/Psr/Log/AbstractLogger.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/vendor/psr/log/Psr/Log/InvalidArgumentException.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/LogLevel.php b/vendor/psr/log/Psr/Log/LogLevel.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/LoggerAwareInterface.php b/vendor/psr/log/Psr/Log/LoggerAwareInterface.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/vendor/psr/log/Psr/Log/LoggerAwareTrait.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/LoggerTrait.php b/vendor/psr/log/Psr/Log/LoggerTrait.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php old mode 100755 new mode 100644 diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md old mode 100755 new mode 100644 diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/.gitignore b/vendor/stack/builder/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/.travis.yml b/vendor/stack/builder/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/CHANGELOG.md b/vendor/stack/builder/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/LICENSE b/vendor/stack/builder/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/README.md b/vendor/stack/builder/README.md old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/composer.json b/vendor/stack/builder/composer.json old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/composer.lock b/vendor/stack/builder/composer.lock old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/phpunit.xml.dist b/vendor/stack/builder/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/src/Stack/Builder.php b/vendor/stack/builder/src/Stack/Builder.php old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/src/Stack/StackedHttpKernel.php b/vendor/stack/builder/src/Stack/StackedHttpKernel.php old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/tests/functional/SilexApplicationTest.php b/vendor/stack/builder/tests/functional/SilexApplicationTest.php old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/tests/unit/Stack/BuilderTest.php b/vendor/stack/builder/tests/unit/Stack/BuilderTest.php old mode 100755 new mode 100644 diff --git a/vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php b/vendor/stack/builder/tests/unit/Stack/StackedHttpKernelTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/.gitattributes b/vendor/swiftmailer/swiftmailer/.gitattributes old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/.gitignore b/vendor/swiftmailer/swiftmailer/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/.travis.yml b/vendor/swiftmailer/swiftmailer/.travis.yml old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/CHANGES b/vendor/swiftmailer/swiftmailer/CHANGES old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/LICENSE b/vendor/swiftmailer/swiftmailer/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/README b/vendor/swiftmailer/swiftmailer/README old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/README.git b/vendor/swiftmailer/swiftmailer/README.git old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/VERSION b/vendor/swiftmailer/swiftmailer/VERSION old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/build.xml b/vendor/swiftmailer/swiftmailer/build.xml old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/composer.json b/vendor/swiftmailer/swiftmailer/composer.json old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/create_pear_package.php b/vendor/swiftmailer/swiftmailer/create_pear_package.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/headers.rst b/vendor/swiftmailer/swiftmailer/doc/headers.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/help-resources.rst b/vendor/swiftmailer/swiftmailer/doc/help-resources.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst b/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/index.rst b/vendor/swiftmailer/swiftmailer/doc/index.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/installing.rst b/vendor/swiftmailer/swiftmailer/doc/installing.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/introduction.rst b/vendor/swiftmailer/swiftmailer/doc/introduction.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/japanese.rst b/vendor/swiftmailer/swiftmailer/doc/japanese.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/messages.rst b/vendor/swiftmailer/swiftmailer/doc/messages.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/overview.rst b/vendor/swiftmailer/swiftmailer/doc/overview.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/plugins.rst b/vendor/swiftmailer/swiftmailer/doc/plugins.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/sending.rst b/vendor/swiftmailer/swiftmailer/doc/sending.rst old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Encoders.graffle old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Mime.graffle old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle b/vendor/swiftmailer/swiftmailer/doc/uml/Transports.graffle old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyException.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Base64Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Base64Encoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Encoding.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/Event.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/Event.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventListener.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventObject.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventObject.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendEvent.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeEvent.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/FileStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Image.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Image.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/IoException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/IoException.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MailTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/RecipientIterator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/CharsetObserver.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Grammar.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Grammar.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderFactory.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderSet.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderSet.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Message.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimeEntity.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ParameterizedHeader.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/OutputByteStream.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/AntiFloodPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/AntiFloodPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Decorator/Replacements.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Logger.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Connection.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Exception.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Pop/Pop3Exception.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Sleeper.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Timer.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Preferences.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Preferences.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ReplacementFilterFactory.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/RfcComplianceException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/RfcComplianceException.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SignedMessage.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilter.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailInvoker.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SimpleMailInvoker.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SpoolTransport.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SpoolTransport.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Validate.php b/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Validate.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/message_deps.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php b/vendor/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/mime_types.php b/vendor/swiftmailer/swiftmailer/lib/mime_types.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/preferences.php b/vendor/swiftmailer/swiftmailer/lib/preferences.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/swift_init.php b/vendor/swiftmailer/swiftmailer/lib/swift_init.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/swift_required.php b/vendor/swiftmailer/swiftmailer/lib/swift_required.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/lib/swift_required_pear.php b/vendor/swiftmailer/swiftmailer/lib/swift_required_pear.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/APPS b/vendor/swiftmailer/swiftmailer/notes/APPS old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/CHARSETS b/vendor/swiftmailer/swiftmailer/notes/CHARSETS old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/message.xml b/vendor/swiftmailer/swiftmailer/notes/message.xml old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0821.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0821.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0822.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc0822.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1341.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1341.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1521.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1521.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1854.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc1854.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2015.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2015.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2045.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2045.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2046.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2046.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2047.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2047.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2048.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2048.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2049.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2049.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2183.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2183.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2222.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2222.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2231.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2231.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2234.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2234.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2440.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2440.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2487.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2487.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2554.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2554.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2821.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2821.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2822.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc2822.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3156.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3156.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3676.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc3676.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4505.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4505.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4616.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4616.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4870.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4870.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4871.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4871.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4880.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4880.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4954.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc4954.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/rfc5751.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/rfc5751.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/rfc/whats_where.txt b/vendor/swiftmailer/swiftmailer/notes/rfc/whats_where.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/notes/smtp.txt b/vendor/swiftmailer/swiftmailer/notes/smtp.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/package.xml.tpl b/vendor/swiftmailer/swiftmailer/package.xml.tpl old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/phpunit.xml.dist b/vendor/swiftmailer/swiftmailer/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/IdenticalBinaryConstraint.php b/vendor/swiftmailer/swiftmailer/tests/IdenticalBinaryConstraint.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/StreamCollector.php b/vendor/swiftmailer/swiftmailer/tests/StreamCollector.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/SwiftMailerSmokeTestCase.php b/vendor/swiftmailer/swiftmailer/tests/SwiftMailerSmokeTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/SwiftMailerTestCase.php b/vendor/swiftmailer/swiftmailer/tests/SwiftMailerTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-2022-jp/one.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-2022-jp/one.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-8859-1/one.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/iso-8859-1/one.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/one.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/one.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/three.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/three.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/two.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/charsets/utf-8/two.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.priv b/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.priv old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.pub b/vendor/swiftmailer/swiftmailer/tests/_samples/dkim/dkim.test.pub old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/files/data.txt b/vendor/swiftmailer/swiftmailer/tests/_samples/files/data.txt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/files/textfile.zip b/vendor/swiftmailer/swiftmailer/tests/_samples/files/textfile.zip old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/CA.srl b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/CA.srl old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.crt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/ca.key old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/create-cert.sh b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/create-cert.sh old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.crt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt.key old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.crt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/encrypt2.key old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.crt b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.crt old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.key b/vendor/swiftmailer/swiftmailer/tests/_samples/smime/sign.key old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance.conf.php.default b/vendor/swiftmailer/swiftmailer/tests/acceptance.conf.php.default old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/AttachmentAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/AttachmentAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/ByteStream/FileByteStreamAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/ByteStream/FileByteStreamAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/CharacterReaderFactory/SimpleCharacterReaderFactoryAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/CharacterReaderFactory/SimpleCharacterReaderFactoryAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/DependencyContainerAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/DependencyContainerAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EmbeddedFileAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EmbeddedFileAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Base64EncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Base64EncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/QpEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/QpEncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Rfc2231EncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Encoder/Rfc2231EncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EncodingAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/EncodingAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/ArrayKeyCacheAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/ArrayKeyCacheAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/DiskKeyCacheAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/KeyCache/DiskKeyCacheAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MessageAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MessageAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/AttachmentAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/AttachmentAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/Base64ContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/Base64ContentEncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/NativeQpContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/NativeQpContentEncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/PlainContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/PlainContentEncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/QpContentEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/ContentEncoder/QpContentEncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/EmbeddedFileAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/EmbeddedFileAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/HeaderEncoder/Base64HeaderEncoderAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/HeaderEncoder/Base64HeaderEncoderAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/MimePartAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/MimePartAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/SimpleMessageAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Mime/SimpleMessageAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MimePartAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/MimePartAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/AbstractStreamBufferAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/AbstractStreamBufferAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/BasicSocketAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/BasicSocketAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/ProcessAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/ProcessAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SocketTimeoutTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SocketTimeoutTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SslSocketAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SslSocketAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/TlsSocketAcceptanceTest.php b/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/TlsSocketAcceptanceTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bootstrap.php b/vendor/swiftmailer/swiftmailer/tests/bootstrap.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug111Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug111Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug118Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug118Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug206Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug206Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug274Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug274Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug34Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug34Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug35Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug35Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug38Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug38Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug51Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug51Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug71Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug71Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug76Test.php b/vendor/swiftmailer/swiftmailer/tests/bug/Swift/Bug76Test.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/fixtures/EsmtpTransportFixture.php b/vendor/swiftmailer/swiftmailer/tests/fixtures/EsmtpTransportFixture.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/fixtures/MimeEntityFixture.php b/vendor/swiftmailer/swiftmailer/tests/fixtures/MimeEntityFixture.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke.conf.php.default b/vendor/swiftmailer/swiftmailer/tests/smoke.conf.php.default old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/AttachmentSmokeTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/BasicSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/BasicSmokeTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/HtmlWithAttachmentSmokeTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/InternationalSmokeTest.php b/vendor/swiftmailer/swiftmailer/tests/smoke/Swift/Smoke/InternationalSmokeTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/ByteStream/ArrayByteStreamTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/ByteStream/ArrayByteStreamTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/GenericFixedWidthReaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/GenericFixedWidthReaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/UsAsciiReaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/UsAsciiReaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/Utf8ReaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterReader/Utf8ReaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/CharacterStream/ArrayCharacterStreamTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/DependencyContainerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/DependencyContainerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Base64EncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Base64EncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/QpEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/QpEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Rfc2231EncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Encoder/Rfc2231EncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/CommandEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/CommandEventTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/EventObjectTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/EventObjectTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/ResponseEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/ResponseEventTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SendEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SendEventTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SimpleEventDispatcherTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/SimpleEventDispatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportChangeEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportChangeEventTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportExceptionEventTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Events/TransportExceptionEventTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/ArrayKeyCacheTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/ArrayKeyCacheTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/SimpleKeyCacheInputStreamTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/KeyCache/SimpleKeyCacheInputStreamTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mailer/ArrayRecipientIteratorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mailer/ArrayRecipientIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/MailerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/MailerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AbstractMimeEntityTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AbstractMimeEntityTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AttachmentTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/AttachmentTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/Base64ContentEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/Base64ContentEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/PlainContentEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/PlainContentEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/QpContentEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/ContentEncoder/QpContentEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/EmbeddedFileTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/EmbeddedFileTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/Base64HeaderEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/Base64HeaderEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/QpHeaderEncoderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/HeaderEncoder/QpHeaderEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/DateHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/DateHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/IdentificationHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/IdentificationHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/MailboxHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/MailboxHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/ParameterizedHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/ParameterizedHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/PathHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/PathHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/UnstructuredHeaderTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/Headers/UnstructuredHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/MimePartTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/MimePartTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderFactoryTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderFactoryTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderSetTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleHeaderSetTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMessageTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMessageTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMimeEntityTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Mime/SimpleMimeEntityTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/AntiFloodPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/AntiFloodPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/BandwidthMonitorPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/BandwidthMonitorPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/DecoratorPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/DecoratorPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/LoggerPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/LoggerPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/ArrayLoggerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/ArrayLoggerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/EchoLoggerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Loggers/EchoLoggerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/PopBeforeSmtpPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/PopBeforeSmtpPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/RedirectingPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/RedirectingPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ReporterPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ReporterPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HitReporterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HitReporterTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HtmlReporterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/Reporters/HtmlReporterTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ThrottlerPluginTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/ThrottlerPluginTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/DKIMSignerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/DKIMSignerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/OpenDKIMSignerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/OpenDKIMSignerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/SMimeSignerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/SMimeSignerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/ByteArrayReplacementFilterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/ByteArrayReplacementFilterTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterFactoryTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterFactoryTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/StreamFilters/StringReplacementFilterTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpEventSupportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpEventSupportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/CramMd5AuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/CramMd5AuthenticatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/LoginAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/LoginAuthenticatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/NTLMAuthenticatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/PlainAuthenticatorTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/Auth/PlainAuthenticatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/AuthHandlerTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/Esmtp/AuthHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransport/ExtensionSupportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransport/ExtensionSupportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/EsmtpTransportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/FailoverTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/FailoverTransportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/LoadBalancedTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/LoadBalancedTransportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/MailTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/MailTransportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/SendmailTransportTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/SendmailTransportTest.php old mode 100755 new mode 100644 diff --git a/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/StreamBufferTest.php b/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Transport/StreamBufferTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/.gitignore b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/CHANGELOG.md b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php old mode 100755 new mode 100644 index a7a8401..a74d907 --- a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php +++ b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php @@ -97,9 +97,7 @@ abstract class Client public function insulate($insulated = true) { if ($insulated && !class_exists('Symfony\\Component\\Process\\Process')) { - // @codeCoverageIgnoreStart throw new \RuntimeException('Unable to isolate requests as the Symfony Process Component is not installed.'); - // @codeCoverageIgnoreEnd } $this->insulated = (bool) $insulated; @@ -393,9 +391,7 @@ abstract class Client */ protected function getScript($request) { - // @codeCoverageIgnoreStart throw new \LogicException('To insulate requests, you need to override the getScript() method.'); - // @codeCoverageIgnoreEnd } /** diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Cookie.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Cookie.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/CookieJar.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/CookieJar.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/History.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/History.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/LICENSE b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/README.md b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Request.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Request.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Response.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Response.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/ClientTest.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/ClientTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/CookieJarTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/CookieTest.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/CookieTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/HistoryTest.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/HistoryTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/RequestTest.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/RequestTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/ResponseTest.php b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Tests/ResponseTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json old mode 100755 new mode 100644 index 592fda9..ed914dd --- a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json +++ b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/phpunit.xml.dist b/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/.gitignore b/vendor/symfony/console/Symfony/Component/Console/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Application.php b/vendor/symfony/console/Symfony/Component/Console/Application.php old mode 100755 new mode 100644 index c28cd24..41d8f93 --- a/vendor/symfony/console/Symfony/Component/Console/Application.php +++ b/vendor/symfony/console/Symfony/Component/Console/Application.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Console; use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; @@ -67,6 +68,7 @@ class Application private $helperSet; private $dispatcher; private $terminalDimensions; + private $defaultCommand; /** * Constructor. @@ -80,6 +82,7 @@ class Application { $this->name = $name; $this->version = $version; + $this->defaultCommand = 'list'; $this->helperSet = $this->getDefaultHelperSet(); $this->definition = $this->getDefaultInputDefinition(); @@ -145,9 +148,8 @@ class Application if ($exitCode > 255) { $exitCode = 255; } - // @codeCoverageIgnoreStart + exit($exitCode); - // @codeCoverageIgnoreEnd } return $exitCode; @@ -180,8 +182,8 @@ class Application } if (!$name) { - $name = 'list'; - $input = new ArrayInput(array('command' => 'list')); + $name = $this->defaultCommand; + $input = new ArrayInput(array('command' => $this->defaultCommand)); } // the command name MUST be the first element of the input @@ -960,6 +962,7 @@ class Application new DialogHelper(), new ProgressHelper(), new TableHelper(), + new QuestionHelper(), )); } @@ -1092,6 +1095,16 @@ class Application return array_keys($alternatives); } + /** + * Sets the default Command name. + * + * @param string $commandName The Command name + */ + public function setDefaultCommand($commandName) + { + $this->defaultCommand = $commandName; + } + private function stringWidth($string) { if (!function_exists('mb_strwidth')) { diff --git a/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md b/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md old mode 100755 new mode 100644 index 4d00cbb..9c5741b --- a/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md +++ b/vendor/symfony/console/Symfony/Component/Console/CHANGELOG.md @@ -1,6 +1,16 @@ CHANGELOG ========= +2.5.0 +----- + + * deprecated the dialog helper (use the question helper instead) + * deprecated TableHelper in favor of Table + * deprecated ProgressHelper in favor of ProgressBar + * added a question helper + * added a way to set the process name of a command + * added a way to set a default command instead of `ListCommand` + 2.4.0 ----- diff --git a/vendor/symfony/console/Symfony/Component/Console/Command/Command.php b/vendor/symfony/console/Symfony/Component/Console/Command/Command.php old mode 100755 new mode 100644 index ebab4ad..21ac78c --- a/vendor/symfony/console/Symfony/Component/Console/Command/Command.php +++ b/vendor/symfony/console/Symfony/Component/Console/Command/Command.php @@ -33,6 +33,7 @@ class Command { private $application; private $name; + private $processTitle; private $aliases = array(); private $definition; private $help; @@ -212,6 +213,16 @@ class Command */ public function run(InputInterface $input, OutputInterface $output) { + if (null !== $this->processTitle) { + if (function_exists('cli_set_process_title')) { + cli_set_process_title($this->processTitle); + } elseif (function_exists('setproctitle')) { + setproctitle($this->processTitle); + } elseif (OutputInterface::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { + $output->writeln('Install the proctitle PECL to be able to change the process title.'); + } + } + // force the creation of the synopsis before the merge with the app definition $this->getSynopsis(); @@ -412,6 +423,25 @@ class Command } /** + * Sets the process title of the command. + * + * This feature should be used only when creating a long process command, + * like a daemon. + * + * PHP 5.5+ or the proctitle PECL library is required + * + * @param string $title The process title + * + * @return Command The current instance + */ + public function setProcessTitle($title) + { + $this->processTitle = $title; + + return $this; + } + + /** * Returns the command name. * * @return string The command name diff --git a/vendor/symfony/console/Symfony/Component/Console/Command/HelpCommand.php b/vendor/symfony/console/Symfony/Component/Console/Command/HelpCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Command/ListCommand.php b/vendor/symfony/console/Symfony/Component/Console/Command/ListCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/ConsoleEvents.php b/vendor/symfony/console/Symfony/Component/Console/ConsoleEvents.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/ApplicationDescription.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/ApplicationDescription.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/Descriptor.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/Descriptor.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/DescriptorInterface.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/DescriptorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/JsonDescriptor.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/JsonDescriptor.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/TextDescriptor.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Descriptor/XmlDescriptor.php b/vendor/symfony/console/Symfony/Component/Console/Descriptor/XmlDescriptor.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleCommandEvent.php b/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleCommandEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleEvent.php b/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleExceptionEvent.php b/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleExceptionEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleTerminateEvent.php b/vendor/symfony/console/Symfony/Component/Console/Event/ConsoleTerminateEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatter.php b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterInterface.php b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php old mode 100755 new mode 100644 index f0bbd38..b5457ef --- a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php +++ b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyle.php @@ -21,31 +21,31 @@ namespace Symfony\Component\Console\Formatter; class OutputFormatterStyle implements OutputFormatterStyleInterface { private static $availableForegroundColors = array( - 'black' => 30, - 'red' => 31, - 'green' => 32, - 'yellow' => 33, - 'blue' => 34, - 'magenta' => 35, - 'cyan' => 36, - 'white' => 37 + 'black' => array('set' => 30, 'unset' => 39), + 'red' => array('set' => 31, 'unset' => 39), + 'green' => array('set' => 32, 'unset' => 39), + 'yellow' => array('set' => 33, 'unset' => 39), + 'blue' => array('set' => 34, 'unset' => 39), + 'magenta' => array('set' => 35, 'unset' => 39), + 'cyan' => array('set' => 36, 'unset' => 39), + 'white' => array('set' => 37, 'unset' => 39) ); private static $availableBackgroundColors = array( - 'black' => 40, - 'red' => 41, - 'green' => 42, - 'yellow' => 43, - 'blue' => 44, - 'magenta' => 45, - 'cyan' => 46, - 'white' => 47 + 'black' => array('set' => 40, 'unset' => 49), + 'red' => array('set' => 41, 'unset' => 49), + 'green' => array('set' => 42, 'unset' => 49), + 'yellow' => array('set' => 43, 'unset' => 49), + 'blue' => array('set' => 44, 'unset' => 49), + 'magenta' => array('set' => 45, 'unset' => 49), + 'cyan' => array('set' => 46, 'unset' => 49), + 'white' => array('set' => 47, 'unset' => 49) ); private static $availableOptions = array( - 'bold' => 1, - 'underscore' => 4, - 'blink' => 5, - 'reverse' => 7, - 'conceal' => 8 + 'bold' => array('set' => 1, 'unset' => 21), + 'underscore' => array('set' => 4, 'unset' => 24), + 'blink' => array('set' => 5, 'unset' => 25), + 'reverse' => array('set' => 7, 'unset' => 27), + 'conceal' => array('set' => 8, 'unset' => 28) ); private $foreground; @@ -201,22 +201,28 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface */ public function apply($text) { - $codes = array(); + $setCodes = array(); + $unsetCode = array(); if (null !== $this->foreground) { - $codes[] = $this->foreground; + $setCodes[] = $this->foreground['set']; + $unsetCodes[] = $this->foreground['unset']; } if (null !== $this->background) { - $codes[] = $this->background; + $setCodes[] = $this->background['set']; + $unsetCodes[] = $this->background['unset']; } if (count($this->options)) { - $codes = array_merge($codes, $this->options); + foreach ($this->options as $option) { + $setCodes[] = $option['set']; + $unsetCodes[] = $option['unset']; + } } - if (0 === count($codes)) { + if (0 === count($setCodes)) { return $text; } - return sprintf("\033[%sm%s\033[0m", implode(';', $codes), $text); + return sprintf("\033[%sm%s\033[%sm", implode(';', $setCodes), $text, implode(';', $unsetCodes)); } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php b/vendor/symfony/console/Symfony/Component/Console/Formatter/OutputFormatterStyleStack.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/DescriptorHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/DescriptorHelper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php old mode 100755 new mode 100644 index 84fe0ad..26e9474 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/DialogHelper.php @@ -18,6 +18,9 @@ use Symfony\Component\Console\Formatter\OutputFormatterStyle; * The Dialog class provides helpers to interact with the user. * * @author Fabien Potencier + * + * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * Use the question helper instead. */ class DialogHelper extends InputAwareHelper { diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/FormatterHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/FormatterHelper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php old mode 100755 new mode 100644 index b2a8389..cc32055 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Formatter\OutputFormatterInterface; + /** * Helper is the base class for all helper classes. * @@ -47,7 +49,7 @@ abstract class Helper implements HelperInterface * * @return int The length of the string */ - protected function strlen($string) + public static function strlen($string) { if (!function_exists('mb_strwidth')) { return strlen($string); @@ -59,4 +61,61 @@ abstract class Helper implements HelperInterface return mb_strwidth($string, $encoding); } + + public static function formatTime($secs) + { + static $timeFormats = array( + array(0, '< 1 sec'), + array(2, '1 sec'), + array(59, 'secs', 1), + array(60, '1 min'), + array(3600, 'mins', 60), + array(5400, '1 hr'), + array(86400, 'hrs', 3600), + array(129600, '1 day'), + array(604800, 'days', 86400), + ); + + foreach ($timeFormats as $format) { + if ($secs >= $format[0]) { + continue; + } + + if (2 == count($format)) { + return $format[1]; + } + + return ceil($secs / $format[2]).' '.$format[1]; + } + } + + public static function formatMemory($memory) + { + if ($memory >= 1024 * 1024 * 1024) { + return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024); + } + + if ($memory >= 1024 * 1024) { + return sprintf('%.1f MiB', $memory / 1024 / 1024); + } + + if ($memory >= 1024) { + return sprintf('%d KiB', $memory / 1024); + } + + return sprintf('%d B', $memory); + } + + public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, $string) + { + $isDecorated = $formatter->isDecorated(); + $formatter->setDecorated(false); + // remove <...> formatting + $string = $formatter->format($string); + // remove already formatted characters + $string = preg_replace("/\033\[[^m]*m/", '', $string); + $formatter->setDecorated($isDecorated); + + return self::strlen($string); + } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/HelperInterface.php b/vendor/symfony/console/Symfony/Component/Console/Helper/HelperInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/HelperSet.php b/vendor/symfony/console/Symfony/Component/Console/Helper/HelperSet.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/InputAwareHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/InputAwareHelper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressBar.php b/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressBar.php new file mode 100644 index 0000000..ff101ca --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressBar.php @@ -0,0 +1,559 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * The ProgressBar provides helpers to display progress output. + * + * @author Fabien Potencier + * @author Chris Jones + */ +class ProgressBar +{ + // options + private $barWidth = 28; + private $barChar = '='; + private $emptyBarChar = '-'; + private $progressChar = '>'; + private $format = null; + private $redrawFreq = 1; + + /** + * @var OutputInterface + */ + private $output; + private $step; + private $max; + private $startTime; + private $stepWidth; + private $percent; + private $lastMessagesLength; + private $barCharOriginal; + private $formatLineCount; + private $messages; + + private static $formatters; + private static $formats; + + /** + * Constructor. + * + * @param OutputInterface $output An OutputInterface instance + * @param int $max Maximum steps (0 if unknown) + */ + public function __construct(OutputInterface $output, $max = 0) + { + // Disabling output when it does not support ANSI codes as it would result in a broken display anyway. + $this->output = $output->isDecorated() ? $output : new NullOutput(); + $this->max = (int) $max; + $this->stepWidth = $this->max > 0 ? Helper::strlen($this->max) : 4; + + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + if (!self::$formats) { + self::$formats = self::initFormats(); + } + + $this->setFormat($this->determineBestFormat()); + } + + /** + * Sets a placeholder formatter for a given name. + * + * This method also allow you to override an existing placeholder. + * + * @param string $name The placeholder name (including the delimiter char like %) + * @param callable $callable A PHP callable + */ + public static function setPlaceholderFormatterDefinition($name, $callable) + { + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + self::$formatters[$name] = $callable; + } + + /** + * Gets the placeholder formatter for a given name. + * + * @param string $name The placeholder name (including the delimiter char like %) + * + * @return callable|null A PHP callable + */ + public static function getPlaceholderFormatterDefinition($name) + { + if (!self::$formatters) { + self::$formatters = self::initPlaceholderFormatters(); + } + + return isset(self::$formatters[$name]) ? self::$formatters[$name] : null; + } + + /** + * Sets a format for a given name. + * + * This method also allow you to override an existing format. + * + * @param string $name The format name + * @param string $format A format string + */ + public static function setFormatDefinition($name, $format) + { + if (!self::$formats) { + self::$formats = self::initFormats(); + } + + self::$formats[$name] = $format; + } + + /** + * Gets the format for a given name. + * + * @param string $name The format name + * + * @return string|null A format string + */ + public static function getFormatDefinition($name) + { + if (!self::$formats) { + self::$formats = self::initFormats(); + } + + return isset(self::$formats[$name]) ? self::$formats[$name] : null; + } + + public function setMessage($message, $name = 'message') + { + $this->messages[$name] = $message; + } + + public function getMessage($name = 'message') + { + return $this->messages[$name]; + } + + /** + * Gets the progress bar start time. + * + * @return int The progress bar start time + */ + public function getStartTime() + { + return $this->startTime; + } + + /** + * Gets the progress bar maximal steps. + * + * @return int The progress bar max steps + */ + public function getMaxSteps() + { + return $this->max; + } + + /** + * Gets the progress bar step. + * + * @return int The progress bar step + */ + public function getStep() + { + return $this->step; + } + + /** + * Gets the progress bar step width. + * + * @return int The progress bar step width + */ + public function getStepWidth() + { + return $this->stepWidth; + } + + /** + * Gets the current progress bar percent. + * + * @return int The current progress bar percent + */ + public function getProgressPercent() + { + return $this->percent; + } + + /** + * Sets the progress bar width. + * + * @param int $size The progress bar size + */ + public function setBarWidth($size) + { + $this->barWidth = (int) $size; + } + + /** + * Gets the progress bar width. + * + * @return int The progress bar size + */ + public function getBarWidth() + { + return $this->barWidth; + } + + /** + * Sets the bar character. + * + * @param string $char A character + */ + public function setBarCharacter($char) + { + $this->barChar = $char; + } + + /** + * Gets the bar character. + * + * @return string A character + */ + public function getBarCharacter() + { + return $this->barChar; + } + + /** + * Sets the empty bar character. + * + * @param string $char A character + */ + public function setEmptyBarCharacter($char) + { + $this->emptyBarChar = $char; + } + + /** + * Gets the empty bar character. + * + * @return string A character + */ + public function getEmptyBarCharacter() + { + return $this->emptyBarChar; + } + + /** + * Sets the progress bar character. + * + * @param string $char A character + */ + public function setProgressCharacter($char) + { + $this->progressChar = $char; + } + + /** + * Gets the progress bar character. + * + * @return string A character + */ + public function getProgressCharacter() + { + return $this->progressChar; + } + + /** + * Sets the progress bar format. + * + * @param string $format The format + */ + public function setFormat($format) + { + // try to use the _nomax variant if available + if (!$this->max && isset(self::$formats[$format.'_nomax'])) { + $this->format = self::$formats[$format.'_nomax']; + } elseif (isset(self::$formats[$format])) { + $this->format = self::$formats[$format]; + } else { + $this->format = $format; + } + + $this->formatLineCount = substr_count($this->format, "\n"); + } + + /** + * Sets the redraw frequency. + * + * @param int $freq The frequency in steps + */ + public function setRedrawFrequency($freq) + { + $this->redrawFreq = (int) $freq; + } + + /** + * Starts the progress output. + */ + public function start() + { + $this->startTime = time(); + $this->step = 0; + $this->percent = 0; + $this->lastMessagesLength = 0; + $this->barCharOriginal = ''; + + if (!$this->max) { + $this->barCharOriginal = $this->barChar; + $this->barChar = $this->emptyBarChar; + } + + $this->display(); + } + + /** + * Advances the progress output X steps. + * + * @param int $step Number of steps to advance + * + * @throws \LogicException + */ + public function advance($step = 1) + { + $this->setCurrent($this->step + $step); + } + + /** + * Sets the current progress. + * + * @param int $step The current progress + * + * @throws \LogicException + */ + public function setCurrent($step) + { + if (null === $this->startTime) { + throw new \LogicException('You must start the progress bar before calling setCurrent().'); + } + + $step = (int) $step; + if ($step < $this->step) { + throw new \LogicException('You can\'t regress the progress bar.'); + } + + if ($this->max > 0 && $step > $this->max) { + throw new \LogicException('You can\'t advance the progress bar past the max value.'); + } + + $prevPeriod = intval($this->step / $this->redrawFreq); + $currPeriod = intval($step / $this->redrawFreq); + $this->step = $step; + $this->percent = $this->max > 0 ? (float) $this->step / $this->max : 0; + if ($prevPeriod !== $currPeriod || $this->max === $step) { + $this->display(); + } + } + + /** + * Finishes the progress output. + */ + public function finish() + { + if (null === $this->startTime) { + throw new \LogicException('You must start the progress bar before calling finish().'); + } + + if (!$this->max) { + $this->barChar = $this->barCharOriginal; + $this->max = $this->step; + $this->setCurrent($this->max); + $this->max = 0; + $this->barChar = $this->emptyBarChar; + } else { + $this->setCurrent($this->max); + } + + $this->startTime = null; + } + + /** + * Outputs the current progress string. + * + * @throws \LogicException + */ + public function display() + { + if (null === $this->startTime) { + throw new \LogicException('You must start the progress bar before calling display().'); + } + + // these 3 variables can be removed in favor of using $this in the closure when support for PHP 5.3 will be dropped. + $self = $this; + $output = $this->output; + $messages = $this->messages; + $this->overwrite(preg_replace_callback("{%([a-z\-_]+)(?:\:([^%]+))?%}i", function ($matches) use ($self, $output, $messages) { + if ($formatter = $self::getPlaceholderFormatterDefinition($matches[1])) { + $text = call_user_func($formatter, $self, $output); + } elseif (isset($messages[$matches[1]])) { + $text = $messages[$matches[1]]; + } else { + return $matches[0]; + } + + if (isset($matches[2])) { + $text = sprintf('%'.$matches[2], $text); + } + + return $text; + }, $this->format)); + } + + /** + * Removes the progress bar from the current line. + * + * This is useful if you wish to write some output + * while a progress bar is running. + * Call display() to show the progress bar again. + */ + public function clear() + { + $this->overwrite(str_repeat("\n", $this->formatLineCount)); + } + + /** + * Overwrites a previous message to the output. + * + * @param string $message The message + */ + private function overwrite($message) + { + $lines = explode("\n", $message); + + // append whitespace to match the line's length + if (null !== $this->lastMessagesLength) { + foreach ($lines as $i => $line) { + if ($this->lastMessagesLength > Helper::strlenWithoutDecoration($this->output->getFormatter(), $line)) { + $lines[$i] = str_pad($line, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); + } + } + } + + // move back to the beginning of the progress bar before redrawing it + $this->output->write("\x0D"); + if ($this->formatLineCount) { + $this->output->write(sprintf("\033[%dA", $this->formatLineCount)); + } + $this->output->write(implode("\n", $lines)); + + $this->lastMessagesLength = 0; + foreach ($lines as $line) { + $len = Helper::strlenWithoutDecoration($this->output->getFormatter(), $line); + if ($len > $this->lastMessagesLength) { + $this->lastMessagesLength = $len; + } + } + } + + private function determineBestFormat() + { + switch ($this->output->getVerbosity()) { + // OutputInterface::VERBOSITY_QUIET: display is disabled anyway + case OutputInterface::VERBOSITY_VERBOSE: + return $this->max > 0 ? 'verbose' : 'verbose_nomax'; + case OutputInterface::VERBOSITY_VERY_VERBOSE: + return $this->max > 0 ? 'very_verbose' : 'very_verbose_nomax'; + case OutputInterface::VERBOSITY_DEBUG: + return $this->max > 0 ? 'debug' : 'debug_nomax'; + default: + return $this->max > 0 ? 'normal' : 'normal_nomax'; + } + } + + private static function initPlaceholderFormatters() + { + return array( + 'bar' => function (ProgressBar $bar, OutputInterface $output) { + $completeBars = floor($bar->getMaxSteps() > 0 ? $bar->getProgressPercent() * $bar->getBarWidth() : $bar->getStep() % $bar->getBarWidth()); + $display = str_repeat($bar->getBarCharacter(), $completeBars); + if ($completeBars < $bar->getBarWidth()) { + $emptyBars = $bar->getBarWidth() - $completeBars - Helper::strlenWithoutDecoration($output->getFormatter(), $bar->getProgressCharacter()); + $display .= $bar->getProgressCharacter().str_repeat($bar->getEmptyBarCharacter(), $emptyBars); + } + + return $display; + }, + 'elapsed' => function (ProgressBar $bar) { + return Helper::formatTime(time() - $bar->getStartTime()); + }, + 'remaining' => function (ProgressBar $bar) { + if (!$bar->getMaxSteps()) { + throw new \LogicException('Unable to display the remaining time if the maximum number of steps is not set.'); + } + + if (!$bar->getStep()) { + $remaining = 0; + } else { + $remaining = round((time() - $bar->getStartTime()) / $bar->getStep() * ($bar->getMaxSteps() - $bar->getStep())); + } + + return Helper::formatTime($remaining); + }, + 'estimated' => function (ProgressBar $bar) { + if (!$bar->getMaxSteps()) { + throw new \LogicException('Unable to display the estimated time if the maximum number of steps is not set.'); + } + + if (!$bar->getStep()) { + $estimated = 0; + } else { + $estimated = round((time() - $bar->getStartTime()) / $bar->getStep() * $bar->getMaxSteps()); + } + + return Helper::formatTime($estimated); + }, + 'memory' => function (ProgressBar $bar) { + return Helper::formatMemory(memory_get_usage(true)); + }, + 'current' => function (ProgressBar $bar) { + return str_pad($bar->getStep(), $bar->getStepWidth(), ' ', STR_PAD_LEFT); + }, + 'max' => function (ProgressBar $bar) { + return $bar->getMaxSteps(); + }, + 'percent' => function (ProgressBar $bar) { + return floor($bar->getProgressPercent() * 100); + }, + ); + } + + private static function initFormats() + { + return array( + 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', + 'normal_nomax' => ' %current% [%bar%]', + + 'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%', + 'verbose_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%', + + 'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%', + 'very_verbose_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%', + + 'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', + 'debug_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%', + ); + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php old mode 100755 new mode 100644 index 647d616..d0acf05 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/ProgressHelper.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Console\Helper; +use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Output\OutputInterface; /** @@ -18,6 +19,8 @@ use Symfony\Component\Console\Output\OutputInterface; * * @author Chris Jones * @author Fabien Potencier + * + * @deprecated Deprecated since 2.5, to be removed in 3.0; use ProgressBar instead. */ class ProgressHelper extends Helper { @@ -185,7 +188,9 @@ class ProgressHelper extends Helper $this->startTime = time(); $this->current = 0; $this->max = (int) $max; - $this->output = $output; + + // Disabling output when it does not support ANSI codes as it would result in a broken display anyway. + $this->output = $output->isDecorated() ? $output : new NullOutput(); $this->lastMessagesLength = 0; $this->barCharOriginal = ''; diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php new file mode 100644 index 0000000..7ac2afa --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/QuestionHelper.php @@ -0,0 +1,411 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; +use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Question\ChoiceQuestion; + +/** + * The QuestionHelper class provides helpers to interact with the user. + * + * @author Fabien Potencier + */ +class QuestionHelper extends Helper +{ + private $inputStream; + private static $shell; + private static $stty; + + /** + * Asks a question to the user. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + * @param Question $question The question to ask + * + * @return string The user answer + * + * @throws \RuntimeException If there is no data to read in the input stream + */ + public function ask(InputInterface $input, OutputInterface $output, Question $question) + { + if (!$input->isInteractive()) { + return $question->getDefault(); + } + + if (!$question->getValidator()) { + return $this->doAsk($output, $question); + } + + $that = $this; + + $interviewer = function () use ($output, $question, $that) { + return $that->doAsk($output, $question); + }; + + return $this->validateAttempts($interviewer, $output, $question); + } + + /** + * Sets the input stream to read from when interacting with the user. + * + * This is mainly useful for testing purpose. + * + * @param resource $stream The input stream + * + * @throws \InvalidArgumentException In case the stream is not a resource + */ + public function setInputStream($stream) + { + if (!is_resource($stream)) { + throw new \InvalidArgumentException('Input stream must be a valid resource.'); + } + + $this->inputStream = $stream; + } + + /** + * Returns the helper's input stream + * + * @return resource + */ + public function getInputStream() + { + return $this->inputStream; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'question'; + } + + /** + * Asks the question to the user. + * + * This method is public for PHP 5.3 compatibility, it should be private. + * + * @param OutputInterface $output + * @param Question $question + * + * @return bool|mixed|null|string + * + * @throws \Exception + * @throws \RuntimeException + */ + public function doAsk(OutputInterface $output, Question $question) + { + $inputStream = $this->inputStream ?: STDIN; + + $message = $question->getQuestion(); + if ($question instanceof ChoiceQuestion) { + $width = max(array_map('strlen', array_keys($question->getChoices()))); + + $messages = (array) $question->getQuestion(); + foreach ($question->getChoices() as $key => $value) { + $messages[] = sprintf(" [%-${width}s] %s", $key, $value); + } + + $output->writeln($messages); + + $message = $question->getPrompt(); + } + + $output->write($message); + + $autocomplete = $question->getAutocompleterValues(); + if (null === $autocomplete || !$this->hasSttyAvailable()) { + $ret = false; + if ($question->isHidden()) { + try { + $ret = trim($this->getHiddenResponse($output, $inputStream)); + } catch (\RuntimeException $e) { + if (!$question->isHiddenFallback()) { + throw $e; + } + } + } + + if (false === $ret) { + $ret = fgets($inputStream, 4096); + if (false === $ret) { + throw new \RuntimeException('Aborted'); + } + $ret = trim($ret); + } + } else { + $ret = trim($this->autocomplete($output, $question, $inputStream)); + } + + $ret = strlen($ret) > 0 ? $ret : $question->getDefault(); + + if ($normalizer = $question->getNormalizer()) { + return $normalizer($ret); + } + + return $ret; + } + + /** + * Autocompletes a question. + * + * @param OutputInterface $output + * @param Question $question + * + * @return string + */ + private function autocomplete(OutputInterface $output, Question $question, $inputStream) + { + $autocomplete = $question->getAutocompleterValues(); + $ret = ''; + + $i = 0; + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + + $sttyMode = shell_exec('stty -g'); + + // Disable icanon (so we can fread each keypress) and echo (we'll do echoing here instead) + shell_exec('stty -icanon -echo'); + + // Add highlighted text style + $output->getFormatter()->setStyle('hl', new OutputFormatterStyle('black', 'white')); + + // Read a keypress + while (!feof($inputStream)) { + $c = fread($inputStream, 1); + + // Backspace Character + if ("\177" === $c) { + if (0 === $numMatches && 0 !== $i) { + $i--; + // Move cursor backwards + $output->write("\033[1D"); + } + + if ($i === 0) { + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + } else { + $numMatches = 0; + } + + // Pop the last character off the end of our string + $ret = substr($ret, 0, $i); + } elseif ("\033" === $c) { // Did we read an escape sequence? + $c .= fread($inputStream, 2); + + // A = Up Arrow. B = Down Arrow + if ('A' === $c[2] || 'B' === $c[2]) { + if ('A' === $c[2] && -1 === $ofs) { + $ofs = 0; + } + + if (0 === $numMatches) { + continue; + } + + $ofs += ('A' === $c[2]) ? -1 : 1; + $ofs = ($numMatches + $ofs) % $numMatches; + } + } elseif (ord($c) < 32) { + if ("\t" === $c || "\n" === $c) { + if ($numMatches > 0 && -1 !== $ofs) { + $ret = $matches[$ofs]; + // Echo out remaining chars for current match + $output->write(substr($ret, $i)); + $i = strlen($ret); + } + + if ("\n" === $c) { + $output->write($c); + break; + } + + $numMatches = 0; + } + + continue; + } else { + $output->write($c); + $ret .= $c; + $i++; + + $numMatches = 0; + $ofs = 0; + + foreach ($autocomplete as $value) { + // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) + if (0 === strpos($value, $ret) && $i !== strlen($value)) { + $matches[$numMatches++] = $value; + } + } + } + + // Erase characters from cursor to end of line + $output->write("\033[K"); + + if ($numMatches > 0 && -1 !== $ofs) { + // Save cursor position + $output->write("\0337"); + // Write highlighted text + $output->write(''.substr($matches[$ofs], $i).''); + // Restore cursor position + $output->write("\0338"); + } + } + + // Reset stty so it behaves normally again + shell_exec(sprintf('stty %s', $sttyMode)); + + return $ret; + } + + /** + * Gets a hidden response from user. + * + * @param OutputInterface $output An Output instance + * + * @return string The answer + * + * @throws \RuntimeException In case the fallback is deactivated and the response cannot be hidden + */ + private function getHiddenResponse(OutputInterface $output, $inputStream) + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; + + // handle code running from a phar + if ('phar:' === substr(__FILE__, 0, 5)) { + $tmpExe = sys_get_temp_dir().'/hiddeninput.exe'; + copy($exe, $tmpExe); + $exe = $tmpExe; + } + + $value = rtrim(shell_exec($exe)); + $output->writeln(''); + + if (isset($tmpExe)) { + unlink($tmpExe); + } + + return $value; + } + + if ($this->hasSttyAvailable()) { + $sttyMode = shell_exec('stty -g'); + + shell_exec('stty -echo'); + $value = fgets($inputStream, 4096); + shell_exec(sprintf('stty %s', $sttyMode)); + + if (false === $value) { + throw new \RuntimeException('Aborted'); + } + + $value = trim($value); + $output->writeln(''); + + return $value; + } + + if (false !== $shell = $this->getShell()) { + $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; + $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); + $value = rtrim(shell_exec($command)); + $output->writeln(''); + + return $value; + } + + throw new \RuntimeException('Unable to hide the response.'); + } + + /** + * Validates an attempt. + * + * @param callable $interviewer A callable that will ask for a question and return the result + * @param OutputInterface $output An Output instance + * @param Question $question A Question instance + * + * @return string The validated response + * + * @throws \Exception In case the max number of attempts has been reached and no valid response has been given + */ + private function validateAttempts($interviewer, OutputInterface $output, Question $question) + { + $error = null; + $attempts = $question->getMaxAttempts(); + while (null === $attempts || $attempts--) { + if (null !== $error) { + $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error')); + } + + try { + return call_user_func($question->getValidator(), $interviewer()); + } catch (\Exception $error) { + } + } + + throw $error; + } + + /** + * Returns a valid unix shell. + * + * @return string|bool The valid shell name, false in case no valid shell is found + */ + private function getShell() + { + if (null !== self::$shell) { + return self::$shell; + } + + self::$shell = false; + + if (file_exists('/usr/bin/env')) { + // handle other OSs with bash/zsh/ksh/csh if available to hide the answer + $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; + foreach (array('bash', 'zsh', 'ksh', 'csh') as $sh) { + if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { + self::$shell = $sh; + break; + } + } + } + + return self::$shell; + } + + /** + * Returns whether Stty is available or not. + * + * @return bool + */ + private function hasSttyAvailable() + { + if (null !== self::$stty) { + return self::$stty; + } + + exec('stty 2>&1', $output, $exitcode); + + return self::$stty = $exitcode === 0; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php b/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php new file mode 100644 index 0000000..5a3dbc1 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/Table.php @@ -0,0 +1,409 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Provides helpers to display a table. + * + * @author Fabien Potencier + * @author Саша Стаменковић + */ +class Table +{ + /** + * Table headers. + * + * @var array + */ + private $headers = array(); + + /** + * Table rows. + * + * @var array + */ + private $rows = array(); + + /** + * Column widths cache. + * + * @var array + */ + private $columnWidths = array(); + + /** + * Number of columns cache. + * + * @var array + */ + private $numberOfColumns; + + /** + * @var OutputInterface + */ + private $output; + + /** + * @var TableStyle + */ + private $style; + + private static $styles; + + public function __construct(OutputInterface $output) + { + $this->output = $output; + + if (!self::$styles) { + self::$styles = self::initStyles(); + } + + $this->setStyle('default'); + } + + /** + * Sets a style definition. + * + * @param string $name The style name + * @param TableStyle $style A TableStyle instance + */ + public static function setStyleDefinition($name, TableStyle $style) + { + if (!self::$styles) { + self::$styles = self::initStyles(); + } + + self::$styles[$name] = $style; + } + + /** + * Gets a style definition by name. + * + * @param string $name The style name + * + * @return TableStyle A TableStyle instance + */ + public static function getStyleDefinition($name) + { + if (!self::$styles) { + self::$styles = self::initStyles(); + } + + if (!self::$styles[$name]) { + throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); + } + + return self::$styles[$name]; + } + + /** + * Sets table style. + * + * @param TableStyle|string $name The style name or a TableStyle instance + * + * @return Table + */ + public function setStyle($name) + { + if ($name instanceof TableStyle) { + $this->style = $name; + } elseif (isset(self::$styles[$name])) { + $this->style = self::$styles[$name]; + } else { + throw new \InvalidArgumentException(sprintf('Style "%s" is not defined.', $name)); + } + + return $this; + } + + /** + * Gets the current table style. + * + * @return TableStyle + */ + public function getStyle() + { + return $this->style; + } + + public function setHeaders(array $headers) + { + $this->headers = array_values($headers); + + return $this; + } + + public function setRows(array $rows) + { + $this->rows = array(); + + return $this->addRows($rows); + } + + public function addRows(array $rows) + { + foreach ($rows as $row) { + $this->addRow($row); + } + + return $this; + } + + public function addRow($row) + { + if ($row instanceof TableSeparator) { + $this->rows[] = $row; + + return; + } + + if (!is_array($row)) { + throw new \InvalidArgumentException('A row must be an array or a TableSeparator instance.'); + } + + $this->rows[] = array_values($row); + + $keys = array_keys($this->rows); + $rowKey = array_pop($keys); + + foreach ($row as $key => $cellValue) { + if (!strstr($cellValue, "\n")) { + continue; + } + + $lines = explode("\n", $cellValue); + $this->rows[$rowKey][$key] = $lines[0]; + unset($lines[0]); + + foreach ($lines as $lineKey => $line) { + $nextRowKey = $rowKey + $lineKey + 1; + + if (isset($this->rows[$nextRowKey])) { + $this->rows[$nextRowKey][$key] = $line; + } else { + $this->rows[$nextRowKey] = array($key => $line); + } + } + } + + return $this; + } + + public function setRow($column, array $row) + { + $this->rows[$column] = $row; + + return $this; + } + + /** + * Renders table to output. + * + * Example: + * +---------------+-----------------------+------------------+ + * | ISBN | Title | Author | + * +---------------+-----------------------+------------------+ + * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | + * +---------------+-----------------------+------------------+ + */ + public function render() + { + $this->renderRowSeparator(); + $this->renderRow($this->headers, $this->style->getCellHeaderFormat()); + if (!empty($this->headers)) { + $this->renderRowSeparator(); + } + foreach ($this->rows as $row) { + if ($row instanceof TableSeparator) { + $this->renderRowSeparator(); + } else { + $this->renderRow($row, $this->style->getCellRowFormat()); + } + } + if (!empty($this->rows)) { + $this->renderRowSeparator(); + } + + $this->cleanup(); + } + + /** + * Renders horizontal header separator. + * + * Example: +-----+-----------+-------+ + */ + private function renderRowSeparator() + { + if (0 === $count = $this->getNumberOfColumns()) { + return; + } + + if (!$this->style->getHorizontalBorderChar() && !$this->style->getCrossingChar()) { + return; + } + + $markup = $this->style->getCrossingChar(); + for ($column = 0; $column < $count; $column++) { + $markup .= str_repeat($this->style->getHorizontalBorderChar(), $this->getColumnWidth($column)).$this->style->getCrossingChar(); + } + + $this->output->writeln(sprintf($this->style->getBorderFormat(), $markup)); + } + + /** + * Renders vertical column separator. + */ + private function renderColumnSeparator() + { + $this->output->write(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); + } + + /** + * Renders table row. + * + * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * + * @param array $row + * @param string $cellFormat + */ + private function renderRow(array $row, $cellFormat) + { + if (empty($row)) { + return; + } + + $this->renderColumnSeparator(); + for ($column = 0, $count = $this->getNumberOfColumns(); $column < $count; $column++) { + $this->renderCell($row, $column, $cellFormat); + $this->renderColumnSeparator(); + } + $this->output->writeln(''); + } + + /** + * Renders table cell with padding. + * + * @param array $row + * @param int $column + * @param string $cellFormat + */ + private function renderCell(array $row, $column, $cellFormat) + { + $cell = isset($row[$column]) ? $row[$column] : ''; + $width = $this->getColumnWidth($column); + + // str_pad won't work properly with multi-byte strings, we need to fix the padding + if (function_exists('mb_strlen') && false !== $encoding = mb_detect_encoding($cell)) { + $width += strlen($cell) - mb_strlen($cell, $encoding); + } + + $width += Helper::strlen($cell) - Helper::strlenWithoutDecoration($this->output->getFormatter(), $cell); + + $content = sprintf($this->style->getCellRowContentFormat(), $cell); + + $this->output->write(sprintf($cellFormat, str_pad($content, $width, $this->style->getPaddingChar(), $this->style->getPadType()))); + } + + /** + * Gets number of columns for this table. + * + * @return int + */ + private function getNumberOfColumns() + { + if (null !== $this->numberOfColumns) { + return $this->numberOfColumns; + } + + $columns = array(count($this->headers)); + foreach ($this->rows as $row) { + $columns[] = count($row); + } + + return $this->numberOfColumns = max($columns); + } + + /** + * Gets column width. + * + * @param int $column + * + * @return int + */ + private function getColumnWidth($column) + { + if (isset($this->columnWidths[$column])) { + return $this->columnWidths[$column]; + } + + $lengths = array($this->getCellWidth($this->headers, $column)); + foreach ($this->rows as $row) { + if ($row instanceof TableSeparator) { + continue; + } + + $lengths[] = $this->getCellWidth($row, $column); + } + + return $this->columnWidths[$column] = max($lengths) + strlen($this->style->getCellRowContentFormat()) - 2; + } + + /** + * Gets cell width. + * + * @param array $row + * @param int $column + * + * @return int + */ + private function getCellWidth(array $row, $column) + { + return isset($row[$column]) ? Helper::strlenWithoutDecoration($this->output->getFormatter(), $row[$column]) : 0; + } + + /** + * Called after rendering to cleanup cache data. + */ + private function cleanup() + { + $this->columnWidths = array(); + $this->numberOfColumns = null; + } + + private static function initStyles() + { + $borderless = new TableStyle(); + $borderless + ->setHorizontalBorderChar('=') + ->setVerticalBorderChar(' ') + ->setCrossingChar(' ') + ; + + $compact = new TableStyle(); + $compact + ->setHorizontalBorderChar('') + ->setVerticalBorderChar(' ') + ->setCrossingChar('') + ->setCellRowContentFormat('%s') + ; + + return array( + 'default' => new TableStyle(), + 'borderless' => $borderless, + 'compact' => $compact, + ); + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php b/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php old mode 100755 new mode 100644 index 3281fc8..76b5a08 --- a/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/TableHelper.php @@ -12,12 +12,15 @@ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Output\OutputInterface; -use InvalidArgumentException; +use Symfony\Component\Console\Output\NullOutput; /** * Provides helpers to display table output. * * @author Саша Стаменковић + * @author Fabien Potencier + * + * @deprecated Deprecated since 2.5, to be removed in 3.0; use Table instead. */ class TableHelper extends Helper { @@ -26,52 +29,13 @@ class TableHelper extends Helper const LAYOUT_COMPACT = 2; /** - * Table headers. - * - * @var array - */ - private $headers = array(); - - /** - * Table rows. - * - * @var array - */ - private $rows = array(); - - // Rendering options - private $paddingChar; - private $horizontalBorderChar; - private $verticalBorderChar; - private $crossingChar; - private $cellHeaderFormat; - private $cellRowFormat; - private $cellRowContentFormat; - private $borderFormat; - private $padType; - - /** - * Column widths cache. - * - * @var array - */ - private $columnWidths = array(); - - /** - * Number of columns cache. - * - * @var array - */ - private $numberOfColumns; - - /** - * @var OutputInterface + * @var Table */ - private $output; + private $table; public function __construct() { - $this->setLayout(self::LAYOUT_DEFAULT); + $this->table = new Table(new NullOutput()); } /** @@ -85,49 +49,19 @@ class TableHelper extends Helper { switch ($layout) { case self::LAYOUT_BORDERLESS: - $this - ->setPaddingChar(' ') - ->setHorizontalBorderChar('=') - ->setVerticalBorderChar(' ') - ->setCrossingChar(' ') - ->setCellHeaderFormat('%s') - ->setCellRowFormat('%s') - ->setCellRowContentFormat(' %s ') - ->setBorderFormat('%s') - ->setPadType(STR_PAD_RIGHT) - ; + $this->table->setStyle('borderless'); break; case self::LAYOUT_COMPACT: - $this - ->setPaddingChar(' ') - ->setHorizontalBorderChar('') - ->setVerticalBorderChar(' ') - ->setCrossingChar('') - ->setCellHeaderFormat('%s') - ->setCellRowFormat('%s') - ->setCellRowContentFormat('%s') - ->setBorderFormat('%s') - ->setPadType(STR_PAD_RIGHT) - ; + $this->table->setStyle('compact'); break; case self::LAYOUT_DEFAULT: - $this - ->setPaddingChar(' ') - ->setHorizontalBorderChar('-') - ->setVerticalBorderChar('|') - ->setCrossingChar('+') - ->setCellHeaderFormat('%s') - ->setCellRowFormat('%s') - ->setCellRowContentFormat(' %s ') - ->setBorderFormat('%s') - ->setPadType(STR_PAD_RIGHT) - ; + $this->table->setStyle('default'); break; default: - throw new InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout)); + throw new \InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout)); break; }; @@ -136,60 +70,35 @@ class TableHelper extends Helper public function setHeaders(array $headers) { - $this->headers = array_values($headers); + $this->table->setHeaders($headers); return $this; } public function setRows(array $rows) { - $this->rows = array(); + $this->table->setRows($rows); - return $this->addRows($rows); + return $this; } public function addRows(array $rows) { - foreach ($rows as $row) { - $this->addRow($row); - } + $this->table->addRows($rows); return $this; } public function addRow(array $row) { - $this->rows[] = array_values($row); - - $keys = array_keys($this->rows); - $rowKey = array_pop($keys); - - foreach ($row as $key => $cellValue) { - if (!strstr($cellValue, "\n")) { - continue; - } - - $lines = explode("\n", $cellValue); - $this->rows[$rowKey][$key] = $lines[0]; - unset($lines[0]); - - foreach ($lines as $lineKey => $line) { - $nextRowKey = $rowKey + $lineKey + 1; - - if (isset($this->rows[$nextRowKey])) { - $this->rows[$nextRowKey][$key] = $line; - } else { - $this->rows[$nextRowKey] = array($key => $line); - } - } - } + $this->table->addRow($row); return $this; } public function setRow($column, array $row) { - $this->rows[$column] = $row; + $this->table->setRow($column, $row); return $this; } @@ -203,11 +112,7 @@ class TableHelper extends Helper */ public function setPaddingChar($paddingChar) { - if (!$paddingChar) { - throw new \LogicException('The padding char must not be empty'); - } - - $this->paddingChar = $paddingChar; + $this->table->getStyle()->setPaddingChar($paddingChar); return $this; } @@ -221,7 +126,7 @@ class TableHelper extends Helper */ public function setHorizontalBorderChar($horizontalBorderChar) { - $this->horizontalBorderChar = $horizontalBorderChar; + $this->table->getStyle()->setHorizontalBorderChar($horizontalBorderChar); return $this; } @@ -235,7 +140,7 @@ class TableHelper extends Helper */ public function setVerticalBorderChar($verticalBorderChar) { - $this->verticalBorderChar = $verticalBorderChar; + $this->table->getStyle()->setVerticalBorderChar($verticalBorderChar); return $this; } @@ -249,7 +154,7 @@ class TableHelper extends Helper */ public function setCrossingChar($crossingChar) { - $this->crossingChar = $crossingChar; + $this->table->getStyle()->setCrossingChar($crossingChar); return $this; } @@ -263,7 +168,7 @@ class TableHelper extends Helper */ public function setCellHeaderFormat($cellHeaderFormat) { - $this->cellHeaderFormat = $cellHeaderFormat; + $this->table->getStyle()->setCellHeaderFormat($cellHeaderFormat); return $this; } @@ -277,7 +182,7 @@ class TableHelper extends Helper */ public function setCellRowFormat($cellRowFormat) { - $this->cellRowFormat = $cellRowFormat; + $this->table->getStyle()->setCellHeaderFormat($cellRowFormat); return $this; } @@ -291,7 +196,7 @@ class TableHelper extends Helper */ public function setCellRowContentFormat($cellRowContentFormat) { - $this->cellRowContentFormat = $cellRowContentFormat; + $this->table->getStyle()->setCellRowContentFormat($cellRowContentFormat); return $this; } @@ -305,7 +210,7 @@ class TableHelper extends Helper */ public function setBorderFormat($borderFormat) { - $this->borderFormat = $borderFormat; + $this->table->getStyle()->setBorderFormat($borderFormat); return $this; } @@ -319,7 +224,7 @@ class TableHelper extends Helper */ public function setPadType($padType) { - $this->padType = $padType; + $this->table->getStyle()->setPadType($padType); return $this; } @@ -340,174 +245,11 @@ class TableHelper extends Helper */ public function render(OutputInterface $output) { - $this->output = $output; - - $this->renderRowSeparator(); - $this->renderRow($this->headers, $this->cellHeaderFormat); - if (!empty($this->headers)) { - $this->renderRowSeparator(); - } - foreach ($this->rows as $row) { - $this->renderRow($row, $this->cellRowFormat); - } - if (!empty($this->rows)) { - $this->renderRowSeparator(); - } - - $this->cleanup(); - } - - /** - * Renders horizontal header separator. - * - * Example: +-----+-----------+-------+ - */ - private function renderRowSeparator() - { - if (0 === $count = $this->getNumberOfColumns()) { - return; - } - - if (!$this->horizontalBorderChar && !$this->crossingChar) { - return; - } - - $markup = $this->crossingChar; - for ($column = 0; $column < $count; $column++) { - $markup .= str_repeat($this->horizontalBorderChar, $this->getColumnWidth($column)).$this->crossingChar; - } - - $this->output->writeln(sprintf($this->borderFormat, $markup)); - } - - /** - * Renders vertical column separator. - */ - private function renderColumnSeparator() - { - $this->output->write(sprintf($this->borderFormat, $this->verticalBorderChar)); - } - - /** - * Renders table row. - * - * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * - * @param array $row - * @param string $cellFormat - */ - private function renderRow(array $row, $cellFormat) - { - if (empty($row)) { - return; - } - - $this->renderColumnSeparator(); - for ($column = 0, $count = $this->getNumberOfColumns(); $column < $count; $column++) { - $this->renderCell($row, $column, $cellFormat); - $this->renderColumnSeparator(); - } - $this->output->writeln(''); - } - - /** - * Renders table cell with padding. - * - * @param array $row - * @param int $column - * @param string $cellFormat - */ - private function renderCell(array $row, $column, $cellFormat) - { - $cell = isset($row[$column]) ? $row[$column] : ''; - $width = $this->getColumnWidth($column); - - // str_pad won't work properly with multi-byte strings, we need to fix the padding - if (function_exists('mb_strlen') && false !== $encoding = mb_detect_encoding($cell)) { - $width += strlen($cell) - mb_strlen($cell, $encoding); - } - - $width += $this->strlen($cell) - $this->computeLengthWithoutDecoration($cell); - - $content = sprintf($this->cellRowContentFormat, $cell); - - $this->output->write(sprintf($cellFormat, str_pad($content, $width, $this->paddingChar, $this->padType))); - } - - /** - * Gets number of columns for this table. - * - * @return int - */ - private function getNumberOfColumns() - { - if (null !== $this->numberOfColumns) { - return $this->numberOfColumns; - } - - $columns = array(0); - $columns[] = count($this->headers); - foreach ($this->rows as $row) { - $columns[] = count($row); - } - - return $this->numberOfColumns = max($columns); - } - - /** - * Gets column width. - * - * @param int $column - * - * @return int - */ - private function getColumnWidth($column) - { - if (isset($this->columnWidths[$column])) { - return $this->columnWidths[$column]; - } - - $lengths = array(0); - $lengths[] = $this->getCellWidth($this->headers, $column); - foreach ($this->rows as $row) { - $lengths[] = $this->getCellWidth($row, $column); - } - - return $this->columnWidths[$column] = max($lengths) + strlen($this->cellRowContentFormat) - 2; - } - - /** - * Gets cell width. - * - * @param array $row - * @param int $column - * - * @return int - */ - private function getCellWidth(array $row, $column) - { - return isset($row[$column]) ? $this->computeLengthWithoutDecoration($row[$column]) : 0; - } - - /** - * Called after rendering to cleanup cache data. - */ - private function cleanup() - { - $this->columnWidths = array(); - $this->numberOfColumns = null; - } - - private function computeLengthWithoutDecoration($string) - { - $formatter = $this->output->getFormatter(); - $isDecorated = $formatter->isDecorated(); - $formatter->setDecorated(false); - - $string = $formatter->format($string); - $formatter->setDecorated($isDecorated); + $p = new \ReflectionProperty($this->table, 'output'); + $p->setAccessible(true); + $p->setValue($this->table, $output); - return $this->strlen($string); + $this->table->render(); } /** diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/TableSeparator.php b/vendor/symfony/console/Symfony/Component/Console/Helper/TableSeparator.php new file mode 100644 index 0000000..1f6981b --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/TableSeparator.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +/** + * Marks a row as being a separator. + * + * @author Fabien Potencier + */ +class TableSeparator +{ +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Helper/TableStyle.php b/vendor/symfony/console/Symfony/Component/Console/Helper/TableStyle.php new file mode 100644 index 0000000..338f1a0 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Helper/TableStyle.php @@ -0,0 +1,251 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Helper; + +/** + * Defines the styles for a Table. + * + * @author Fabien Potencier + * @author Саша Стаменковић + */ +class TableStyle +{ + private $paddingChar = ' '; + private $horizontalBorderChar = '-'; + private $verticalBorderChar = '|'; + private $crossingChar = '+'; + private $cellHeaderFormat = '%s'; + private $cellRowFormat = '%s'; + private $cellRowContentFormat = ' %s '; + private $borderFormat = '%s'; + private $padType = STR_PAD_RIGHT; + + /** + * Sets padding character, used for cell padding. + * + * @param string $paddingChar + * + * @return TableStyle + */ + public function setPaddingChar($paddingChar) + { + if (!$paddingChar) { + throw new \LogicException('The padding char must not be empty'); + } + + $this->paddingChar = $paddingChar; + + return $this; + } + + /** + * Gets padding character, used for cell padding. + * + * @return string + */ + public function getPaddingChar() + { + return $this->paddingChar; + } + + /** + * Sets horizontal border character. + * + * @param string $horizontalBorderChar + * + * @return TableStyle + */ + public function setHorizontalBorderChar($horizontalBorderChar) + { + $this->horizontalBorderChar = $horizontalBorderChar; + + return $this; + } + + /** + * Gets horizontal border character. + * + * @return string + */ + public function getHorizontalBorderChar() + { + return $this->horizontalBorderChar; + } + + /** + * Sets vertical border character. + * + * @param string $verticalBorderChar + * + * @return TableStyle + */ + public function setVerticalBorderChar($verticalBorderChar) + { + $this->verticalBorderChar = $verticalBorderChar; + + return $this; + } + + /** + * Gets vertical border character. + * + * @return string + */ + public function getVerticalBorderChar() + { + return $this->verticalBorderChar; + } + + /** + * Sets crossing character. + * + * @param string $crossingChar + * + * @return TableStyle + */ + public function setCrossingChar($crossingChar) + { + $this->crossingChar = $crossingChar; + + return $this; + } + + /** + * Gets crossing character. + * + * @return string $crossingChar + */ + public function getCrossingChar() + { + return $this->crossingChar; + } + + /** + * Sets header cell format. + * + * @param string $cellHeaderFormat + * + * @return TableStyle + */ + public function setCellHeaderFormat($cellHeaderFormat) + { + $this->cellHeaderFormat = $cellHeaderFormat; + + return $this; + } + + /** + * Gets header cell format. + * + * @return string + */ + public function getCellHeaderFormat() + { + return $this->cellHeaderFormat; + } + + /** + * Sets row cell format. + * + * @param string $cellRowFormat + * + * @return TableStyle + */ + public function setCellRowFormat($cellRowFormat) + { + $this->cellRowFormat = $cellRowFormat; + + return $this; + } + + /** + * Gets row cell format. + * + * @return string + */ + public function getCellRowFormat() + { + return $this->cellRowFormat; + } + + /** + * Sets row cell content format. + * + * @param string $cellRowContentFormat + * + * @return TableStyle + */ + public function setCellRowContentFormat($cellRowContentFormat) + { + $this->cellRowContentFormat = $cellRowContentFormat; + + return $this; + } + + /** + * Gets row cell content format. + * + * @return string + */ + public function getCellRowContentFormat() + { + return $this->cellRowContentFormat; + } + + /** + * Sets table border format. + * + * @param string $borderFormat + * + * @return TableStyle + */ + public function setBorderFormat($borderFormat) + { + $this->borderFormat = $borderFormat; + + return $this; + } + + /** + * Gets table border format. + * + * @return string + */ + public function getBorderFormat() + { + return $this->borderFormat; + } + + /** + * Sets cell padding type. + * + * @param int $padType STR_PAD_* + * + * @return TableStyle + */ + public function setPadType($padType) + { + $this->padType = $padType; + + return $this; + } + + /** + * Gets cell padding type. + * + * @return int + */ + public function getPadType() + { + return $this->padType; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php b/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/ArrayInput.php b/vendor/symfony/console/Symfony/Component/Console/Input/ArrayInput.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/Input.php b/vendor/symfony/console/Symfony/Component/Console/Input/Input.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/InputArgument.php b/vendor/symfony/console/Symfony/Component/Console/Input/InputArgument.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/InputAwareInterface.php b/vendor/symfony/console/Symfony/Component/Console/Input/InputAwareInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/InputDefinition.php b/vendor/symfony/console/Symfony/Component/Console/Input/InputDefinition.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/InputInterface.php b/vendor/symfony/console/Symfony/Component/Console/Input/InputInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/InputOption.php b/vendor/symfony/console/Symfony/Component/Console/Input/InputOption.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php b/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php old mode 100755 new mode 100644 index 7f87f71..6537e27 --- a/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php +++ b/vendor/symfony/console/Symfony/Component/Console/Input/StringInput.php @@ -72,9 +72,7 @@ class StringInput extends ArgvInput $tokens[] = stripcslashes($match[1]); } else { // should never happen - // @codeCoverageIgnoreStart throw new \InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); - // @codeCoverageIgnoreEnd } $cursor += strlen($match[0]); diff --git a/vendor/symfony/console/Symfony/Component/Console/LICENSE b/vendor/symfony/console/Symfony/Component/Console/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Logger/ConsoleLogger.php b/vendor/symfony/console/Symfony/Component/Console/Logger/ConsoleLogger.php new file mode 100644 index 0000000..dbd2e8b --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Logger; + +use Psr\Log\AbstractLogger; +use Psr\Log\InvalidArgumentException; +use Psr\Log\LogLevel; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Output\ConsoleOutputInterface; + +/** + * PSR-3 compliant console logger + * + * @author Kévin Dunglas + * @link http://www.php-fig.org/psr/psr-3/ + */ +class ConsoleLogger extends AbstractLogger +{ + const INFO = 'info'; + const ERROR = 'error'; + + /** + * @var OutputInterface + */ + private $output; + /** + * @var array + */ + private $verbosityLevelMap = array( + LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, + LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, + LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, + LogLevel::NOTICE => OutputInterface::VERBOSITY_VERBOSE, + LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, + LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG + ); + /** + * @var array + */ + private $formatLevelMap = array( + LogLevel::EMERGENCY => self::ERROR, + LogLevel::ALERT => self::ERROR, + LogLevel::CRITICAL => self::ERROR, + LogLevel::ERROR => self::ERROR, + LogLevel::WARNING => self::INFO, + LogLevel::NOTICE => self::INFO, + LogLevel::INFO => self::INFO, + LogLevel::DEBUG => self::INFO + ); + + /** + * @param OutputInterface $output + * @param array $verbosityLevelMap + * @param array $formatLevelMap + */ + public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) + { + $this->output = $output; + $this->verbosityLevelMap = $verbosityLevelMap + $this->verbosityLevelMap; + $this->formatLevelMap = $formatLevelMap + $this->formatLevelMap; + } + + /** + * {@inheritdoc} + */ + public function log($level, $message, array $context = array()) + { + if (!isset($this->verbosityLevelMap[$level])) { + throw new InvalidArgumentException(sprintf('The log level "%s" does not exist.', $level)); + } + + // Write to the error output if necessary and available + if ($this->formatLevelMap[$level] === self::ERROR && $this->output instanceof ConsoleOutputInterface) { + $output = $this->output->getErrorOutput(); + } else { + $output = $this->output; + } + + if ($output->getVerbosity() >= $this->verbosityLevelMap[$level]) { + $output->writeln(sprintf('<%1$s>[%2$s] %3$s', $this->formatLevelMap[$level], $level, $this->interpolate($message, $context))); + } + } + + /** + * Interpolates context values into the message placeholders + * + * @author PHP Framework Interoperability Group + * @param string $message + * @param array $context + * @return string + */ + private function interpolate($message, array $context) + { + // build a replacement array with braces around the context keys + $replace = array(); + foreach ($context as $key => $val) { + if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { + $replace[sprintf('{%s}', $key)] = $val; + } + } + + // interpolate replacement values into the message and return + return strtr($message, $replace); + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/BufferedOutput.php b/vendor/symfony/console/Symfony/Component/Console/Output/BufferedOutput.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php b/vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutput.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Symfony/Component/Console/Output/ConsoleOutputInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/NullOutput.php b/vendor/symfony/console/Symfony/Component/Console/Output/NullOutput.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/Output.php b/vendor/symfony/console/Symfony/Component/Console/Output/Output.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/OutputInterface.php b/vendor/symfony/console/Symfony/Component/Console/Output/OutputInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php b/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php old mode 100755 new mode 100644 index 6415fa2..23d49d2 --- a/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php +++ b/vendor/symfony/console/Symfony/Component/Console/Output/StreamOutput.php @@ -75,10 +75,8 @@ class StreamOutput extends Output protected function doWrite($message, $newline) { if (false === @fwrite($this->stream, $message.($newline ? PHP_EOL : ''))) { - // @codeCoverageIgnoreStart // should never happen throw new \RuntimeException('Unable to write output.'); - // @codeCoverageIgnoreEnd } fflush($this->stream); @@ -96,12 +94,10 @@ class StreamOutput extends Output */ protected function hasColorSupport() { - // @codeCoverageIgnoreStart if (DIRECTORY_SEPARATOR == '\\') { return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); } return function_exists('posix_isatty') && @posix_isatty($this->stream); - // @codeCoverageIgnoreEnd } } diff --git a/vendor/symfony/console/Symfony/Component/Console/Question/ChoiceQuestion.php b/vendor/symfony/console/Symfony/Component/Console/Question/ChoiceQuestion.php new file mode 100644 index 0000000..59808e1 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Question/ChoiceQuestion.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Question; + +/** + * Represents a choice question. + * + * @author Fabien Potencier + */ +class ChoiceQuestion extends Question +{ + private $choices; + private $multiselect = false; + private $prompt = ' > '; + private $errorMessage = 'Value "%s" is invalid'; + + public function __construct($question, array $choices, $default = null) + { + parent::__construct($question, $default); + + $this->choices = $choices; + $this->setValidator($this->getDefaultValidator()); + $this->setAutocompleterValues(array_keys($choices)); + } + + /** + * Returns available choices. + * + * @return array + */ + public function getChoices() + { + return $this->choices; + } + + /** + * Sets multiselect option. + * + * When multiselect is set to true, multiple choices can be answered. + * + * @param bool $multiselect + * + * @return ChoiceQuestion The current instance + */ + public function setMultiselect($multiselect) + { + $this->multiselect = $multiselect; + $this->setValidator($this->getDefaultValidator()); + + return $this; + } + + /** + * Gets the prompt for choices. + * + * @return string + */ + public function getPrompt() + { + return $this->prompt; + } + + /** + * Sets the prompt for choices. + * + * @param string $prompt + * + * @return ChoiceQuestion The current instance + */ + public function setPrompt($prompt) + { + $this->prompt = $prompt; + + return $this; + } + + /** + * Sets the error message for invalid values. + * + * The error message has a string placeholder (%s) for the invalid value. + * + * @param string $errorMessage + * + * @return ChoiceQuestion The current instance + */ + public function setErrorMessage($errorMessage) + { + $this->errorMessage = $errorMessage; + $this->setValidator($this->getDefaultValidator()); + + return $this; + } + + private function getDefaultValidator() + { + $choices = $this->choices; + $errorMessage = $this->errorMessage; + $multiselect = $this->multiselect; + + return function ($selected) use ($choices, $errorMessage, $multiselect) { + // Collapse all spaces. + $selectedChoices = str_replace(' ', '', $selected); + + if ($multiselect) { + // Check for a separated comma values + if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) { + throw new \InvalidArgumentException(sprintf($errorMessage, $selected)); + } + $selectedChoices = explode(',', $selectedChoices); + } else { + $selectedChoices = array($selected); + } + + $multiselectChoices = array(); + foreach ($selectedChoices as $value) { + if (empty($choices[$value])) { + throw new \InvalidArgumentException(sprintf($errorMessage, $value)); + } + array_push($multiselectChoices, $choices[$value]); + } + + if ($multiselect) { + return $multiselectChoices; + } + + return $choices[$selected]; + }; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Question/ConfirmationQuestion.php b/vendor/symfony/console/Symfony/Component/Console/Question/ConfirmationQuestion.php new file mode 100644 index 0000000..0438640 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Question/ConfirmationQuestion.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Question; + +/** + * Represents a yes/no question. + * + * @author Fabien Potencier + */ +class ConfirmationQuestion extends Question +{ + public function __construct($question, $default = true) + { + parent::__construct($question, (bool) $default); + + $this->setNormalizer($this->getDefaultNormalizer()); + } + + private function getDefaultNormalizer() + { + $default = $this->getDefault(); + + return function ($answer) use ($default) { + if (is_bool($answer)) { + return $answer; + } + + if (false === $default) { + return $answer && 'y' === strtolower($answer[0]); + } + + return !$answer || 'y' === strtolower($answer[0]); + }; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Question/Question.php b/vendor/symfony/console/Symfony/Component/Console/Question/Question.php new file mode 100644 index 0000000..e47bfb1 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Question/Question.php @@ -0,0 +1,239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Question; +use Doctrine\Common\Proxy\Exception\InvalidArgumentException; + +/** + * Represents a Question. + * + * @author Fabien Potencier + */ +class Question +{ + private $question; + private $attempts; + private $hidden = false; + private $hiddenFallback = true; + private $autocompleterValues; + private $validator; + private $default; + private $normalizer; + + /** + * Constructor. + * + * @param string $question The question to ask to the user + * @param mixed $default The default answer to return if the user enters nothing + */ + public function __construct($question, $default = null) + { + $this->question = $question; + $this->default = $default; + } + + /** + * Returns the question. + * + * @return string + */ + public function getQuestion() + { + return $this->question; + } + + /** + * Returns the default answer. + * + * @return mixed + */ + public function getDefault() + { + return $this->default; + } + + /** + * Returns whether the user response must be hidden. + * + * @return bool + */ + public function isHidden() + { + return $this->hidden; + } + + /** + * Sets whether the user response must be hidden or not. + * + * @param bool $hidden + * + * @return Question The current instance + * + * @throws \LogicException In case the autocompleter is also used + */ + public function setHidden($hidden) + { + if ($this->autocompleterValues) { + throw new \LogicException('A hidden question cannot use the autocompleter.'); + } + + $this->hidden = (bool) $hidden; + + return $this; + } + + /** + * In case the response can not be hidden, whether to fallback on non-hidden question or not. + * + * @return bool + */ + public function isHiddenFallback() + { + return $this->hiddenFallback; + } + + /** + * Sets whether to fallback on non-hidden question if the response can not be hidden. + * + * @param bool $fallback + * + * @return Question The current instance + */ + public function setHiddenFallback($fallback) + { + $this->hiddenFallback = (bool) $fallback; + + return $this; + } + + /** + * Gets values for the autocompleter. + * + * @return null|array|Traversable + */ + public function getAutocompleterValues() + { + return $this->autocompleterValues; + } + + /** + * Sets values for the autocompleter. + * + * @param null|array|Traversable $values + * + * @return Question The current instance + * + * @throws \InvalidArgumentException + * @throws \LogicException + */ + public function setAutocompleterValues($values) + { + if (null !== $values && !is_array($values)) { + if (!$values instanceof \Traversable || $values instanceof \Countable) { + throw new \InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.'); + } + } + + if ($this->hidden) { + throw new \LogicException('A hidden question cannot use the autocompleter.'); + } + + $this->autocompleterValues = $values; + + return $this; + } + + /** + * Sets a validator for the question. + * + * @param null|callable $validator + * + * @return Question The current instance + */ + public function setValidator($validator) + { + $this->validator = $validator; + + return $this; + } + + /** + * Gets the validator for the question + * + * @return null|callable + */ + public function getValidator() + { + return $this->validator; + } + + /** + * Sets the maximum number of attempts. + * + * Null means an unlimited number of attempts. + * + * @param null|int $attempts + * + * @return Question The current instance + * + * @throws InvalidArgumentException In case the number of attempts is invalid. + */ + public function setMaxAttempts($attempts) + { + if (null !== $attempts && $attempts < 1) { + throw new \InvalidArgumentException('Maximum number of attempts must be a positive value.'); + } + + $this->attempts = $attempts; + + return $this; + } + + /** + * Gets the maximum number of attempts. + * + * Null means an unlimited number of attempts. + * + * @return null|int + */ + public function getMaxAttempts() + { + return $this->attempts; + } + + /** + * Sets a normalizer for the response. + * + * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. + * + * @param string|Closure $normalizer + * + * @return Question The current instance + */ + public function setNormalizer($normalizer) + { + $this->normalizer = $normalizer; + + return $this; + } + + /** + * Gets the normalizer for the response. + * + * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. + * + * @return string|Closure + */ + public function getNormalizer() + { + return $this->normalizer; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/README.md b/vendor/symfony/console/Symfony/Component/Console/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Resources/bin/hiddeninput.exe b/vendor/symfony/console/Symfony/Component/Console/Resources/bin/hiddeninput.exe old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Shell.php b/vendor/symfony/console/Symfony/Component/Console/Shell.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php b/vendor/symfony/console/Symfony/Component/Console/Tester/ApplicationTester.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tester/CommandTester.php b/vendor/symfony/console/Symfony/Component/Console/Tester/CommandTester.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php old mode 100755 new mode 100644 index 32a23aa..59f0de1 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php @@ -925,6 +925,28 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase return $dispatcher; } + + public function testSetRunCustomDefaultCommand() + { + $command = new \FooCommand(); + + $application = new Application(); + $application->setAutoExit(false); + $application->add($command); + $application->setDefaultCommand($command->getName()); + + $tester = new ApplicationTester($application); + $tester->run(array()); + $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + + $application = new CustomDefaultCommandApplication(); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + $tester->run(array()); + + $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); + } } class CustomApplication extends Application @@ -949,3 +971,18 @@ class CustomApplication extends Application return new HelperSet(array(new FormatterHelper())); } } + +class CustomDefaultCommandApplication extends Application +{ + /** + * Overwrites the constructor in order to set a different default command. + */ + public function __construct() + { + parent::__construct(); + + $command = new \FooCommand(); + $this->add($command); + $this->setDefaultCommand($command->getName()); + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/CommandTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Command/CommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Command/HelpCommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Command/ListCommandTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php new file mode 100644 index 0000000..aef6d22 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Fixtures; + +use Symfony\Component\Console\Output\BufferedOutput; + +/** + * Dummy output + * + * @author Kévin Dunglas + */ +class DummyOutput extends BufferedOutput +{ + /** + * @return array + */ + public function getLogs() + { + $logs = array(); + foreach (explode("\n", trim($this->fetch())) as $message) { + preg_match('/^\[(.*)\] (.*)/', $message, $matches); + $logs[] = sprintf('%s %s', $matches[1], $matches[2]); + } + + return $logs; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/TestCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/TestCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt old mode 100755 new mode 100644 index 4bdcd77..b44d50b --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt @@ -1,27 +1,27 @@ -  - [Exception]  - Third exception comment  -  +  + [Exception]  + Third exception comment  +  -  - [Exception]  - Second exception comment  -  +  + [Exception]  + Second exception comment  +  -  - [Exception]  - First exception 

    this is html

      -  +  + [Exception]  + First exception 

    this is html

      +  -foo3:bar +foo3:bar diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt old mode 100755 new mode 100644 index c68a60f..8c8801b --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt @@ -1,11 +1,11 @@ -  - [Exception]  - エラーメッセージ  -  +  + [Exception]  + エラーメッセージ  +  -foo +foo diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run3.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run4.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_astext.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_astext.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php old mode 100755 new mode 100644 index 6890a9b..c9e21fd --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php @@ -18,13 +18,13 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase public function testConstructor() { $style = new OutputFormatterStyle('green', 'black', array('bold', 'underscore')); - $this->assertEquals("\033[32;40;1;4mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[32;40;1;4mfoo\033[39;49;21;24m", $style->apply('foo')); $style = new OutputFormatterStyle('red', null, array('blink')); - $this->assertEquals("\033[31;5mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[31;5mfoo\033[39;25m", $style->apply('foo')); $style = new OutputFormatterStyle(null, 'white'); - $this->assertEquals("\033[47mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[47mfoo\033[49m", $style->apply('foo')); } public function testForeground() @@ -32,10 +32,10 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle(); $style->setForeground('black'); - $this->assertEquals("\033[30mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[30mfoo\033[39m", $style->apply('foo')); $style->setForeground('blue'); - $this->assertEquals("\033[34mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[34mfoo\033[39m", $style->apply('foo')); $this->setExpectedException('InvalidArgumentException'); $style->setForeground('undefined-color'); @@ -46,10 +46,10 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle(); $style->setBackground('black'); - $this->assertEquals("\033[40mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[40mfoo\033[49m", $style->apply('foo')); $style->setBackground('yellow'); - $this->assertEquals("\033[43mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[43mfoo\033[49m", $style->apply('foo')); $this->setExpectedException('InvalidArgumentException'); $style->setBackground('undefined-color'); @@ -60,19 +60,19 @@ class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle(); $style->setOptions(array('reverse', 'conceal')); - $this->assertEquals("\033[7;8mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[7;8mfoo\033[27;28m", $style->apply('foo')); $style->setOption('bold'); - $this->assertEquals("\033[7;8;1mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[7;8;1mfoo\033[27;28;21m", $style->apply('foo')); $style->unsetOption('reverse'); - $this->assertEquals("\033[8;1mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[8;1mfoo\033[28;21m", $style->apply('foo')); $style->setOption('bold'); - $this->assertEquals("\033[8;1mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[8;1mfoo\033[28;21m", $style->apply('foo')); $style->setOptions(array('bold')); - $this->assertEquals("\033[1mfoo\033[0m", $style->apply('foo')); + $this->assertEquals("\033[1mfoo\033[21m", $style->apply('foo')); try { $style->setOption('foo'); diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php old mode 100755 new mode 100644 index c8f0b98..c36c08b --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php @@ -31,7 +31,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $this->assertEquals("\\some info\\", OutputFormatter::escape('some info')); $this->assertEquals( - "\033[33mSymfony\\Component\\Console does work very well!\033[0m", + "\033[33mSymfony\\Component\\Console does work very well!\033[39m", $formatter->format('Symfony\Component\Console does work very well!') ); } @@ -46,19 +46,19 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $this->assertTrue($formatter->hasStyle('question')); $this->assertEquals( - "\033[37;41msome error\033[0m", + "\033[37;41msome error\033[39;49m", $formatter->format('some error') ); $this->assertEquals( - "\033[32msome info\033[0m", + "\033[32msome info\033[39m", $formatter->format('some info') ); $this->assertEquals( - "\033[33msome comment\033[0m", + "\033[33msome comment\033[39m", $formatter->format('some comment') ); $this->assertEquals( - "\033[30;46msome question\033[0m", + "\033[30;46msome question\033[39;49m", $formatter->format('some question') ); } @@ -68,7 +68,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "\033[37;41msome \033[0m\033[32msome info\033[0m\033[37;41m error\033[0m", + "\033[37;41msome \033[39;49m\033[32msome info\033[39m\033[37;41m error\033[39;49m", $formatter->format('some some info error') ); } @@ -78,7 +78,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "\033[37;41msome error\033[0m\033[32msome info\033[0m", + "\033[37;41msome error\033[39;49m\033[32msome info\033[39m", $formatter->format('some errorsome info') ); } @@ -88,7 +88,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "(\033[32m>=2.0,<2.3\033[0m)", + "(\033[32m>=2.0,<2.3\033[39m)", $formatter->format('(>=2.0,<2.3)') ); } @@ -98,7 +98,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "(\033[32mz>=2.0,=2.0,format('('.$formatter->escape('z>=2.0,)') ); } @@ -108,7 +108,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter = new OutputFormatter(true); $this->assertEquals( - "\033[37;41merror\033[0m\033[32minfo\033[0m\033[33mcomment\033[0m\033[37;41merror\033[0m", + "\033[37;41merror\033[39;49m\033[32minfo\033[39m\033[33mcomment\033[39m\033[37;41merror\033[39;49m", $formatter->format('errorinfocommenterror') ); } @@ -126,7 +126,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle('blue', 'white'); $formatter->setStyle('b', $style); - $this->assertEquals("\033[34;47msome \033[0m\033[34;47mcustom\033[0m\033[34;47m msg\033[0m", $formatter->format('some custom msg')); + $this->assertEquals("\033[34;47msome \033[39;49m\033[34;47mcustom\033[39;49m\033[34;47m msg\033[39;49m", $formatter->format('some custom msg')); } public function testRedefineStyle() @@ -136,29 +136,29 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $style = new OutputFormatterStyle('blue', 'white'); $formatter->setStyle('info', $style); - $this->assertEquals("\033[34;47msome custom msg\033[0m", $formatter->format('some custom msg')); + $this->assertEquals("\033[34;47msome custom msg\033[39;49m", $formatter->format('some custom msg')); } public function testInlineStyle() { $formatter = new OutputFormatter(true); - $this->assertEquals("\033[34;41msome text\033[0m", $formatter->format('some text')); - $this->assertEquals("\033[34;41msome text\033[0m", $formatter->format('some text')); + $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('some text')); + $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('some text')); } public function testNonStyleTag() { $formatter = new OutputFormatter(true); - $this->assertEquals("\033[32msome \033[0m\033[32m\033[0m\033[32m styled \033[0m\033[32m

    \033[0m\033[32msingle-char tag\033[0m\033[32m

    \033[0m", $formatter->format('some styled

    single-char tag

    ')); + $this->assertEquals("\033[32msome \033[39m\033[32m\033[39m\033[32m styled \033[39m\033[32m

    \033[39m\033[32msingle-char tag\033[39m\033[32m

    \033[39m", $formatter->format('some styled

    single-char tag

    ')); } public function testFormatLongString() { $formatter = new OutputFormatter(true); $long = str_repeat("\\", 14000); - $this->assertEquals("\033[37;41msome error\033[0m".$long, $formatter->format('some error'.$long)); + $this->assertEquals("\033[37;41msome error\033[39;49m".$long, $formatter->format('some error'.$long)); } public function testNotDecoratedFormatter() @@ -186,16 +186,16 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $formatter->setDecorated(true); $this->assertEquals( - "\033[37;41msome error\033[0m", $formatter->format('some error') + "\033[37;41msome error\033[39;49m", $formatter->format('some error') ); $this->assertEquals( - "\033[32msome info\033[0m", $formatter->format('some info') + "\033[32msome info\033[39m", $formatter->format('some info') ); $this->assertEquals( - "\033[33msome comment\033[0m", $formatter->format('some comment') + "\033[33msome comment\033[39m", $formatter->format('some comment') ); $this->assertEquals( - "\033[30;46msome question\033[0m", $formatter->format('some question') + "\033[30;46msome question\033[39;49m", $formatter->format('some question') ); } @@ -205,7 +205,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase $this->assertEquals(<<format(<< @@ -215,7 +215,7 @@ EOF $this->assertEquals(<<format(<<some text @@ -226,7 +226,7 @@ EOF $this->assertEquals(<<format(<< @@ -239,7 +239,7 @@ EOF \033[32m some text more text -\033[0m +\033[39m EOF , $formatter->format(<< diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/HelperSetTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/HelperSetTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php new file mode 100644 index 0000000..ba5db29 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -0,0 +1,418 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Console\Helper\Helper; +use Symfony\Component\Console\Output\StreamOutput; + +class ProgressBarTest extends \PHPUnit_Framework_TestCase +{ + protected $lastMessagesLength; + + public function testAdvance() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0 [>---------------------------]'). + $this->generateOutput(' 1 [->--------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAdvanceWithStep() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(5); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0 [>---------------------------]'). + $this->generateOutput(' 5 [----->----------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testAdvanceMultipleTimes() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->advance(3); + $bar->advance(2); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0 [>---------------------------]'). + $this->generateOutput(' 3 [--->------------------------]'). + $this->generateOutput(' 5 [----->----------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testCustomizations() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setBarWidth(10); + $bar->setBarCharacter('_'); + $bar->setEmptyBarCharacter(' '); + $bar->setProgressCharacter('/'); + $bar->setFormat(' %current%/%max% [%bar%] %percent:3s%%'); + $bar->start(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/10 [/ ] 0%'). + $this->generateOutput(' 1/10 [_/ ] 10%'), + stream_get_contents($output->getStream()) + ); + } + + public function testPercent() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->display(); + $bar->advance(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 1/50 [>---------------------------] 2%'). + $this->generateOutput(' 2/50 [=>--------------------------] 4%'), + stream_get_contents($output->getStream()) + ); + } + + public function testOverwriteWithShorterLine() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->setFormat(' %current%/%max% [%bar%] %percent:3s%%'); + $bar->start(); + $bar->display(); + $bar->advance(); + + // set shorter format + $bar->setFormat(' %current%/%max% [%bar%]'); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 1/50 [>---------------------------] 2%'). + $this->generateOutput(' 2/50 [=>--------------------------] '), + stream_get_contents($output->getStream()) + ); + } + + public function testSetCurrentProgress() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->display(); + $bar->advance(); + $bar->setCurrent(15); + $bar->setCurrent(25); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 1/50 [>---------------------------] 2%'). + $this->generateOutput(' 15/50 [========>-------------------] 30%'). + $this->generateOutput(' 25/50 [==============>-------------] 50%'), + stream_get_contents($output->getStream()) + ); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage You must start the progress bar + */ + public function testSetCurrentBeforeStarting() + { + $bar = new ProgressBar($this->getOutputStream()); + $bar->setCurrent(15); + } + + /** + * @expectedException \LogicException + * @expectedExceptionMessage You can't regress the progress bar + */ + public function testRegressProgress() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->setCurrent(15); + $bar->setCurrent(10); + } + + public function testRedrawFrequency() + { + $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($output = $this->getOutputStream(), 6)); + $bar->expects($this->exactly(4))->method('display'); + + $bar->setRedrawFrequency(2); + $bar->start(); + $bar->setCurrent(1); + $bar->advance(2); + $bar->advance(2); + $bar->advance(1); + } + + public function testMultiByteSupport() + { + if (!function_exists('mb_strlen') || (false === $encoding = mb_detect_encoding('■'))) { + $this->markTestSkipped('The mbstring extension is needed for multi-byte support'); + } + + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->start(); + $bar->setBarCharacter('■'); + $bar->advance(3); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0 [>---------------------------]'). + $this->generateOutput(' 3 [■■■>------------------------]'), + stream_get_contents($output->getStream()) + ); + } + + public function testClear() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 50); + $bar->start(); + $bar->setCurrent(25); + $bar->clear(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/50 [>---------------------------] 0%'). + $this->generateOutput(' 25/50 [==============>-------------] 50%'). + $this->generateOutput(' '), + stream_get_contents($output->getStream()) + ); + } + + public function testPercentNotHundredBeforeComplete() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 200); + $bar->start(); + $bar->display(); + $bar->advance(199); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/200 [>---------------------------] 0%'). + $this->generateOutput(' 0/200 [>---------------------------] 0%'). + $this->generateOutput(' 199/200 [===========================>] 99%'). + $this->generateOutput(' 200/200 [============================] 100%'), + stream_get_contents($output->getStream()) + ); + } + + public function testNonDecoratedOutput() + { + $bar = new ProgressBar($output = $this->getOutputStream(false)); + $bar->start(); + $bar->advance(); + + rewind($output->getStream()); + $this->assertEquals('', stream_get_contents($output->getStream())); + } + + public function testParallelBars() + { + $output = $this->getOutputStream(); + $bar1 = new ProgressBar($output, 2); + $bar2 = new ProgressBar($output, 3); + $bar2->setProgressCharacter('#'); + $bar3 = new ProgressBar($output); + + $bar1->start(); + $output->write("\n"); + $bar2->start(); + $output->write("\n"); + $bar3->start(); + + for ($i = 1; $i <= 3; $i++) { + // up two lines + $output->write("\033[2A"); + if ($i <= 2) { + $bar1->advance(); + } + $output->write("\n"); + $bar2->advance(); + $output->write("\n"); + $bar3->advance(); + } + $output->write("\033[2A"); + $output->write("\n"); + $output->write("\n"); + $bar3->finish(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/2 [>---------------------------] 0%')."\n". + $this->generateOutput(' 0/3 [#---------------------------] 0%')."\n". + rtrim($this->generateOutput(' 0 [>---------------------------]')). + + "\033[2A". + $this->generateOutput(' 1/2 [==============>-------------] 50%')."\n". + $this->generateOutput(' 1/3 [=========#------------------] 33%')."\n". + rtrim($this->generateOutput(' 1 [->--------------------------]')). + + "\033[2A". + $this->generateOutput(' 2/2 [============================] 100%')."\n". + $this->generateOutput(' 2/3 [==================#---------] 66%')."\n". + rtrim($this->generateOutput(' 2 [-->-------------------------]')). + + "\033[2A". + "\n". + $this->generateOutput(' 3/3 [============================] 100%')."\n". + rtrim($this->generateOutput(' 3 [--->------------------------]')). + + "\033[2A". + "\n". + "\n". + rtrim($this->generateOutput(' 3 [============================]')), + stream_get_contents($output->getStream()) + ); + } + + public function testAddingPlaceholderFormatter() + { + ProgressBar::setPlaceholderFormatterDefinition('remaining_steps', function (ProgressBar $bar) { + return $bar->getMaxSteps() - $bar->getStep(); + }); + $bar = new ProgressBar($output = $this->getOutputStream(), 3); + $bar->setFormat(' %remaining_steps% [%bar%]'); + + $bar->start(); + $bar->advance(); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 3 [>---------------------------]'). + $this->generateOutput(' 2 [=========>------------------]'). + $this->generateOutput(' 0 [============================]'), + stream_get_contents($output->getStream()) + ); + } + + public function testMultilineFormat() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 3); + $bar->setFormat("%bar%\nfoobar"); + + $bar->start(); + $bar->advance(); + $bar->clear(); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(">---------------------------\nfoobar"). + $this->generateOutput("=========>------------------\nfoobar "). + $this->generateOutput(" \n "). + $this->generateOutput("============================\nfoobar "), + stream_get_contents($output->getStream()) + ); + } + + public function testAnsiColorsAndEmojis() + { + $bar = new ProgressBar($output = $this->getOutputStream(), 15); + ProgressBar::setPlaceholderFormatterDefinition('memory', function (ProgressBar $bar) { + static $i = 0; + $mem = 100000 * $i; + $colors = $i++ ? '41;37' : '44;37'; + + return "\033[".$colors."m ".Helper::formatMemory($mem)." \033[0m"; + }); + $bar->setFormat(" \033[44;37m %title:-37s% \033[0m\n %current%/%max% %bar% %percent:3s%%\n 🏁 %remaining:-10s% %memory:37s%"); + $bar->setBarCharacter($done = "\033[32m●\033[0m"); + $bar->setEmptyBarCharacter($empty = "\033[31m●\033[0m"); + $bar->setProgressCharacter($progress = "\033[32m➤ \033[0m"); + + $bar->setMessage('Starting the demo... fingers crossed', 'title'); + $bar->start(); + $bar->setMessage('Looks good to me...', 'title'); + $bar->advance(4); + $bar->setMessage('Thanks, bye', 'title'); + $bar->finish(); + + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput( + " \033[44;37m Starting the demo... fingers crossed \033[0m\n". + " 0/15 ".$progress.str_repeat($empty, 26)." 0%\n". + " \xf0\x9f\x8f\x81 1 sec \033[44;37m 0 B \033[0m" + ). + $this->generateOutput( + " \033[44;37m Looks good to me... \033[0m\n". + " 4/15 ".str_repeat($done, 7).$progress.str_repeat($empty, 19)." 26%\n". + " \xf0\x9f\x8f\x81 1 sec \033[41;37m 97 KiB \033[0m" + ). + $this->generateOutput( + " \033[44;37m Thanks, bye \033[0m\n". + " 15/15 ".str_repeat($done, 28)." 100%\n". + " \xf0\x9f\x8f\x81 1 sec \033[41;37m 195 KiB \033[0m" + ), + stream_get_contents($output->getStream()) + ); + } + + public function testSetFormat() + { + $bar = new ProgressBar($output = $this->getOutputStream()); + $bar->setFormat('normal'); + $bar->start(); + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0 [>---------------------------]'), + stream_get_contents($output->getStream()) + ); + + $bar = new ProgressBar($output = $this->getOutputStream(), 10); + $bar->setFormat('normal'); + $bar->start(); + rewind($output->getStream()); + $this->assertEquals( + $this->generateOutput(' 0/10 [>---------------------------] 0%'), + stream_get_contents($output->getStream()) + ); + } + + protected function getOutputStream($decorated = true) + { + return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated); + } + + protected function generateOutput($expected) + { + $count = substr_count($expected, "\n"); + + return "\x0D".($count ? sprintf("\033[%dA", $count) : '').$expected; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php old mode 100755 new mode 100644 index 40d856f..88adf69 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressHelperTest.php @@ -192,9 +192,19 @@ class ProgressHelperTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->generateOutput(' 0/200 [>---------------------------] 0%').$this->generateOutput(' 199/200 [===========================>] 99%').$this->generateOutput(' 200/200 [============================] 100%'), stream_get_contents($output->getStream())); } - protected function getOutputStream() + public function testNonDecoratedOutput() { - return new StreamOutput(fopen('php://memory', 'r+', false)); + $progress = new ProgressHelper(); + $progress->start($output = $this->getOutputStream(false)); + $progress->advance(); + + rewind($output->getStream()); + $this->assertEquals('', stream_get_contents($output->getStream())); + } + + protected function getOutputStream($decorated = true) + { + return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated); } protected $lastMessagesLength; diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php new file mode 100644 index 0000000..bba2537 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php @@ -0,0 +1,238 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use Symfony\Component\Console\Helper\QuestionHelper; +use Symfony\Component\Console\Helper\HelperSet; +use Symfony\Component\Console\Helper\FormatterHelper; +use Symfony\Component\Console\Output\StreamOutput; +use Symfony\Component\Console\Question\ChoiceQuestion; +use Symfony\Component\Console\Question\ConfirmationQuestion; +use Symfony\Component\Console\Question\Question; + +class QuestionHelperTest extends \PHPUnit_Framework_TestCase +{ + public function testAskChoice() + { + $questionHelper = new QuestionHelper(); + + $helperSet = new HelperSet(array(new FormatterHelper())); + $questionHelper->setHelperSet($helperSet); + + $heroes = array('Superman', 'Batman', 'Spiderman'); + + $questionHelper->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); + // first answer is an empty answer, we're supposed to receive the default value + $this->assertEquals('Spiderman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); + $question->setErrorMessage('Input "%s" is not a superhero!'); + $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); + + rewind($output->getStream()); + $stream = stream_get_contents($output->getStream()); + $this->assertContains('Input "Fabien" is not a superhero!', $stream); + + try { + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1'); + $question->setMaxAttempts(1); + $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); + } + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); + $question->setMultiselect(true); + + $this->assertEquals(array('Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); + $question->setMultiselect(true); + + $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + public function testAsk() + { + $dialog = new QuestionHelper(); + + $dialog->setInputStream($this->getInputStream("\n8AM\n")); + + $question = new Question('What time is it?', '2PM'); + $this->assertEquals('2PM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $question = new Question('What time is it?', '2PM'); + $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); + + rewind($output->getStream()); + $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); + } + + public function testAskWithAutocomplete() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + // Acm + // AcsTest + // + // + // Test + // + // S + // F00oo + $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($inputStream); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new Question('Please select a bundle', 'FrameworkBundle'); + $question->setAutocompleterValues(array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle')); + + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('FrameworkBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('SecurityBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + /** + * @group tty + */ + public function testAskHiddenResponse() + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->markTestSkipped('This test is not supported on Windows'); + } + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream("8AM\n")); + + $question = new Question('What time is it?'); + $question->setHidden(true); + + $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + public function testAskConfirmation() + { + $dialog = new QuestionHelper(); + + $dialog->setInputStream($this->getInputStream("\n\n")); + $question = new ConfirmationQuestion('Do you like French fries?'); + $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $question = new ConfirmationQuestion('Do you like French fries?', false); + $this->assertFalse($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $dialog->setInputStream($this->getInputStream("y\nyes\n")); + $question = new ConfirmationQuestion('Do you like French fries?', false); + $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $question = new ConfirmationQuestion('Do you like French fries?', false); + $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $dialog->setInputStream($this->getInputStream("n\nno\n")); + $question = new ConfirmationQuestion('Do you like French fries?', true); + $this->assertFalse($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $question = new ConfirmationQuestion('Do you like French fries?', true); + $this->assertFalse($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + } + + public function testAskAndValidate() + { + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $error = 'This is not a color!'; + $validator = function ($color) use ($error) { + if (!in_array($color, array('white', 'black'))) { + throw new \InvalidArgumentException($error); + } + + return $color; + }; + + $question = new Question('What color was the white horse of Henry IV?', 'white'); + $question->setValidator($validator); + $question->setMaxAttempts(2); + + $dialog->setInputStream($this->getInputStream("\nblack\n")); + $this->assertEquals('white', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->assertEquals('black', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + + $dialog->setInputStream($this->getInputStream("green\nyellow\norange\n")); + try { + $this->assertEquals('white', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $this->fail(); + } catch (\InvalidArgumentException $e) { + $this->assertEquals($error, $e->getMessage()); + } + } + + public function testNoInteraction() + { + $dialog = new QuestionHelper(); + $question = new Question('Do you have a job?', 'not yet'); + $this->assertEquals('not yet', $dialog->ask($this->createInputInterfaceMock(false), $this->createOutputInterface(), $question)); + } + + protected function getInputStream($input) + { + $stream = fopen('php://memory', 'r+', false); + fputs($stream, $input); + rewind($stream); + + return $stream; + } + + protected function createOutputInterface() + { + return new StreamOutput(fopen('php://memory', 'r+', false)); + } + + protected function createInputInterfaceMock($interactive = true) + { + $mock = $this->getMock('Symfony\Component\Console\Input\InputInterface'); + $mock->expects($this->any()) + ->method('isInteractive') + ->will($this->returnValue($interactive)); + + return $mock; + } + + private function hasSttyAvailable() + { + exec('stty 2>&1', $output, $exitcode); + + return $exitcode === 0; + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableHelperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableTest.php new file mode 100644 index 0000000..18a2ab6 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -0,0 +1,357 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Helper; + +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Helper\TableStyle; +use Symfony\Component\Console\Helper\TableSeparator; +use Symfony\Component\Console\Output\StreamOutput; + +class TableTest extends \PHPUnit_Framework_TestCase +{ + protected $stream; + + protected function setUp() + { + $this->stream = fopen('php://memory', 'r+'); + } + + protected function tearDown() + { + fclose($this->stream); + $this->stream = null; + } + + /** + * @dataProvider testRenderProvider + */ + public function testRender($headers, $rows, $style, $expected) + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders($headers) + ->setRows($rows) + ->setStyle($style) + ; + $table->render(); + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + /** + * @dataProvider testRenderProvider + */ + public function testRenderAddRows($headers, $rows, $style, $expected) + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders($headers) + ->addRows($rows) + ->setStyle($style) + ; + $table->render(); + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + /** + * @dataProvider testRenderProvider + */ + public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected) + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders($headers) + ->setStyle($style) + ; + foreach ($rows as $row) { + $table->addRow($row); + } + $table->render(); + + $this->assertEquals($expected, $this->getOutputContent($output)); + } + + public function testRenderProvider() + { + $books = array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), + array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), + ); + + return array( + array( + array('ISBN', 'Title', 'Author'), + $books, + 'default', +<< array( + array('ISBN', 'Title', 'Author'), + array( + array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + ), + 'default', +<<
    array( + array('ISBN', 'Title', 'Author'), + array( + array('99921-58-10-700', 'Divine Com', 'Dante Alighieri'), + array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), + ), + 'default', +<<
    99921-58-10-700 | Divine Com | Dante Alighieri | +| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | ++----------------------------------+----------------------+-----------------+ + +TABLE + ), + ); + } + + public function testRenderMultiByte() + { + if (!function_exists('mb_strlen')) { + $this->markTestSkipped('The "mbstring" extension is not available'); + } + + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('■■')) + ->setRows(array(array(1234))) + ->setStyle('default') + ; + $table->render(); + + $expected = +<<
    assertEquals($expected, $this->getOutputContent($output)); + } + + public function testStyle() + { + $style = new TableStyle(); + $style + ->setHorizontalBorderChar('.') + ->setVerticalBorderChar('.') + ->setCrossingChar('.') + ; + + Table::setStyleDefinition('dotfull', $style); + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('Foo')) + ->setRows(array(array('Bar'))) + ->setStyle('dotfull'); + $table->render(); + + $expected = +<<
    assertEquals($expected, $this->getOutputContent($output)); + } + + public function testRowSeparator() + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('Foo')) + ->setRows(array( + array('Bar1'), + new TableSeparator(), + array('Bar2'), + new TableSeparator(), + array('Bar3'), + )); + $table->render(); + + $expected = +<<
    assertEquals($expected, $this->getOutputContent($output)); + } + + protected function getOutputStream() + { + return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false); + } + + protected function getOutputContent(StreamOutput $output) + { + rewind($output->getStream()); + + return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArgvInputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArrayInputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArrayInputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputArgumentTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputArgumentTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputOptionTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputOptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/StringInputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/StringInputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php new file mode 100644 index 0000000..2b9f5c7 --- /dev/null +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\Logger; + +use Psr\Log\Test\LoggerInterfaceTest; +use Psr\Log\LogLevel; +use Symfony\Component\Console\Logger\ConsoleLogger; +use Symfony\Component\Console\Tests\Fixtures\DummyOutput; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * Console logger test + * + * @author Kévin Dunglas + */ +class ConsoleLoggerTest extends LoggerInterfaceTest +{ + /** + * @var DummyOutput + */ + protected $output; + + /** + * {@inheritdoc} + */ + public function getLogger() + { + $this->output = new DummyOutput(OutputInterface::VERBOSITY_VERBOSE); + + return new ConsoleLogger($this->output, array( + LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, + LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, + LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, + LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, + LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, + LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL, + LogLevel::DEBUG => OutputInterface::VERBOSITY_NORMAL + )); + } + + /** + * {@inheritdoc} + */ + public function getLogs() + { + return $this->output->getLogs(); + } +} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/NullOutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/NullOutputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php old mode 100755 new mode 100644 index 95bbbe6..cfb4afe --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php +++ b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php @@ -113,7 +113,7 @@ class OutputTest extends \PHPUnit_Framework_TestCase $output->getFormatter()->setStyle('FOO', $fooStyle); $output->setDecorated(true); $output->writeln('foo'); - $this->assertEquals("\033[33;41;5mfoo\033[0m\n", $output->output, '->writeln() decorates the output'); + $this->assertEquals("\033[33;41;5mfoo\033[39;49;25m\n", $output->output, '->writeln() decorates the output'); } /** diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/StreamOutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/StreamOutputTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/console/Symfony/Component/Console/composer.json b/vendor/symfony/console/Symfony/Component/Console/composer.json old mode 100755 new mode 100644 index 77777aa..e7a8e2f --- a/vendor/symfony/console/Symfony/Component/Console/composer.json +++ b/vendor/symfony/console/Symfony/Component/Console/composer.json @@ -19,10 +19,12 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/event-dispatcher": "~2.1" + "symfony/event-dispatcher": "~2.1", + "psr/log": "~1.0" }, "suggest": { - "symfony/event-dispatcher": "" + "symfony/event-dispatcher": "", + "psr/log": "For using the console logger" }, "autoload": { "psr-0": { "Symfony\\Component\\Console\\": "" } @@ -31,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/console/Symfony/Component/Console/phpunit.xml.dist b/vendor/symfony/console/Symfony/Component/Console/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/.gitignore b/vendor/symfony/css-selector/Symfony/Component/CssSelector/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/CHANGELOG.md b/vendor/symfony/css-selector/Symfony/Component/CssSelector/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/CssSelector.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/CssSelector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExceptionInterface.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/ExpressionErrorException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/InternalErrorException.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/InternalErrorException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/ParseException.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/ParseException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Exception/SyntaxErrorException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/LICENSE b/vendor/symfony/css-selector/Symfony/Component/CssSelector/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/AbstractNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/AbstractNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/AttributeNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/AttributeNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/ClassNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/ClassNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/CombinedSelectorNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/ElementNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/ElementNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/FunctionNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/FunctionNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/HashNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/HashNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/NegationNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/NegationNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/NodeInterface.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/NodeInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/PseudoNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/PseudoNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/SelectorNode.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/SelectorNode.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/Specificity.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Node/Specificity.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/CommentHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/HandlerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/HashHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/IdentifierHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/NumberHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/StringHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Handler/WhitespaceHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Parser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/ParserInterface.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/ParserInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Reader.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Reader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/ClassParser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/ElementParser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Shortcut/HashParser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Token.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Token.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/TokenStream.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/TokenStream.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/Tokenizer.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerEscaping.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Parser/Tokenizer/TokenizerPatterns.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/README.md b/vendor/symfony/css-selector/Symfony/Component/CssSelector/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/CssSelectorTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/CssSelectorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/AbstractNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/AttributeNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/ClassNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/CombinedSelectorNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/FunctionNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/HashNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/NegationNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/PseudoNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/SelectorNodeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Node/SpecificityTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/AbstractHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/CommentHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/HashHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/IdentifierHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/NumberHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/StringHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Handler/WhitespaceHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/ParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/ReaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ClassParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/ElementParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/EmptyStringParserTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/EmptyStringParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/Shortcut/HashParserTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/TokenStreamTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/Parser/TokenStreamTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/Fixtures/ids.html b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/Fixtures/ids.html old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/Fixtures/lang.xml b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/Fixtures/lang.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/Fixtures/shakespear.html b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/Fixtures/shakespear.html old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/AbstractExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/AttributeMatchingExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/CombinationExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/ExtensionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/HtmlExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/NodeExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Extension/PseudoClassExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Translator.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/Translator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/TranslatorInterface.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/TranslatorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/XPathExpr.php b/vendor/symfony/css-selector/Symfony/Component/CssSelector/XPath/XPathExpr.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json b/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json old mode 100755 new mode 100644 index 1ab133f..5b4231d --- a/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json +++ b/vendor/symfony/css-selector/Symfony/Component/CssSelector/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/css-selector/Symfony/Component/CssSelector/phpunit.xml.dist b/vendor/symfony/css-selector/Symfony/Component/CssSelector/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/.gitignore b/vendor/symfony/debug/Symfony/Component/Debug/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md b/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md old mode 100755 new mode 100644 index 84335a1..776468f --- a/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md +++ b/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +2.5.0 +----- + +* added ExceptionHandler::setHandler() +* added UndefinedMethodFatalErrorHandler +* deprecated DummyException + 2.4.0 ----- diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Debug.php b/vendor/symfony/debug/Symfony/Component/Debug/Debug.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php b/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php old mode 100755 new mode 100644 index 67db200..eb1be7a --- a/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/DebugClassLoader.php @@ -14,46 +14,72 @@ namespace Symfony\Component\Debug; /** * Autoloader checking if the class is really defined in the file found. * - * The ClassLoader will wrap all registered autoloaders providing a - * findFile method and will throw an exception if a file is found but does + * The ClassLoader will wrap all registered autoloaders + * and will throw an exception if a file is found but does * not declare the class. * * @author Fabien Potencier * @author Christophe Coevoet + * @author Nicolas Grekas * * @api */ class DebugClassLoader { - private $classFinder; + private $classLoader; + private $isFinder; + private $wasFinder; + private static $caseCheck; /** * Constructor. * - * @param object $classFinder + * @param callable|object $classLoader * * @api + * @deprecated since 2.5, passing an object is deprecated and support for it will be removed in 3.0 */ - public function __construct($classFinder) + public function __construct($classLoader) { - $this->classFinder = $classFinder; + $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); + + if ($this->wasFinder) { + $this->classLoader = array($classLoader, 'loadClass'); + $this->isFinder = true; + } else { + $this->classLoader = $classLoader; + $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile'); + } + + if (!isset(self::$caseCheck)) { + self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0; + } } /** * Gets the wrapped class loader. * - * @return object a class loader instance + * @return callable|object a class loader + * + * @deprecated since 2.5, returning an object is deprecated and support for it will be removed in 3.0 */ public function getClassLoader() { - return $this->classFinder; + if ($this->wasFinder) { + return $this->classLoader[0]; + } else { + return $this->classLoader; + } } /** - * Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper. + * Wraps all autoloaders */ public static function enable() { + // Ensures we don't hit https://bugs.php.net/42098 + class_exists(__NAMESPACE__.'\ErrorHandler', true); + if (!is_array($functions = spl_autoload_functions())) { return; } @@ -63,8 +89,8 @@ class DebugClassLoader } foreach ($functions as $function) { - if (is_array($function) && !$function[0] instanceof self && method_exists($function[0], 'findFile')) { - $function = array(new static($function[0]), 'loadClass'); + if (!is_array($function) || !$function[0] instanceof self) { + $function = array(new static($function), 'loadClass'); } spl_autoload_register($function); @@ -86,7 +112,7 @@ class DebugClassLoader foreach ($functions as $function) { if (is_array($function) && $function[0] instanceof self) { - $function[0] = $function[0]->getClassLoader(); + $function = $function[0]->getClassLoader(); } spl_autoload_register($function); @@ -99,10 +125,14 @@ class DebugClassLoader * @param string $class A class name to resolve to file * * @return string|null + * + * @deprecated Deprecated since 2.5, to be removed in 3.0. */ public function findFile($class) { - return $this->classFinder->findFile($class); + if ($this->wasFinder) { + return $this->classLoader[0]->findFile($class); + } } /** @@ -116,16 +146,79 @@ class DebugClassLoader */ public function loadClass($class) { - if ($file = $this->classFinder->findFile($class)) { - require $file; + ErrorHandler::stackErrors(); + + try { + if ($this->isFinder) { + if ($file = $this->classLoader[0]->findFile($class)) { + require $file; + } + } else { + call_user_func($this->classLoader, $class); + $file = false; + } + } catch (\Exception $e) { + ErrorHandler::unstackErrors(); + + throw $e; + } - if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) { + ErrorHandler::unstackErrors(); + + $exists = class_exists($class, false) || interface_exists($class, false) || (function_exists('trait_exists') && trait_exists($class, false)); + + if ('\\' === $class[0]) { + $class = substr($class, 1); + } + + if ($exists) { + $refl = new \ReflectionClass($class); + $name = $refl->getName(); + + if ($name !== $class) { + throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: %s vs %s', $class, $name)); + } + } + + if ($file) { + if (!$exists) { if (false !== strpos($class, '/')) { throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); } throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file)); } + if (self::$caseCheck && preg_match('#([/\\\\][a-zA-Z_\x7F-\xFF][a-zA-Z0-9_\x7F-\xFF]*)+\.(php|hh)$#D', $file, $tail)) { + $tail = $tail[0]; + $real = $refl->getFilename(); + + if (2 === self::$caseCheck) { + // realpath() on MacOSX doesn't normalize the case of characters + $cwd = getcwd(); + $basename = strrpos($real, '/'); + chdir(substr($real, 0, $basename)); + $basename = substr($real, $basename + 1); + // glob() patterns are case-sensitive even if the underlying fs is not + if (!in_array($basename, glob($basename.'*', GLOB_NOSORT), true)) { + $real = getcwd().'/'; + $h = opendir('.'); + while (false !== $f = readdir($h)) { + if (0 === strcasecmp($f, $basename)) { + $real .= $f; + break; + } + } + closedir($h); + } + chdir($cwd); + } + + if ( 0 === substr_compare($real, $tail, -strlen($tail), strlen($tail), true) + && 0 !== substr_compare($real, $tail, -strlen($tail), strlen($tail), false) + ) { + throw new \RuntimeException(sprintf('Case mismatch between class and source file names: %s vs %s', $class, $real)); + } + } return true; } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php old mode 100755 new mode 100644 index e865f37..b0699f3 --- a/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/ErrorHandler.php @@ -11,11 +11,13 @@ namespace Symfony\Component\Debug; +use Psr\Log\LogLevel; use Psr\Log\LoggerInterface; use Symfony\Component\Debug\Exception\ContextErrorException; use Symfony\Component\Debug\Exception\FatalErrorException; -use Symfony\Component\Debug\Exception\DummyException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler; use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; @@ -24,6 +26,7 @@ use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; * * @author Fabien Potencier * @author Konstantin Myakshin + * @author Nicolas Grekas */ class ErrorHandler { @@ -42,7 +45,7 @@ class ErrorHandler E_ERROR => 'Error', E_CORE_ERROR => 'Core Error', E_COMPILE_ERROR => 'Compile Error', - E_PARSE => 'Parse', + E_PARSE => 'Parse Error', ); private $level; @@ -56,6 +59,10 @@ class ErrorHandler */ private static $loggers = array(); + private static $stackedErrors = array(); + + private static $stackedErrorLevels = array(); + /** * Registers the error handler. * @@ -102,7 +109,7 @@ class ErrorHandler * Sets a logger for the given channel. * * @param LoggerInterface $logger A logger interface - * @param string $channel The channel associated with the logger (deprecation or emergency) + * @param string $channel The channel associated with the logger (deprecation, emergency or scream) */ public static function setLogger(LoggerInterface $logger, $channel = 'deprecation') { @@ -110,113 +117,181 @@ class ErrorHandler } /** - * @throws ContextErrorException When error_reporting returns error + * @throws \ErrorException When error_reporting returns error */ public function handle($level, $message, $file = 'unknown', $line = 0, $context = array()) { - if (0 === $this->level) { - return false; - } - if ($level & (E_USER_DEPRECATED | E_DEPRECATED)) { if (isset(self::$loggers['deprecation'])) { - if (version_compare(PHP_VERSION, '5.4', '<')) { - $stack = array_map( - function ($row) { - unset($row['args']); - - return $row; - }, - array_slice(debug_backtrace(false), 0, 10) - ); + if (self::$stackedErrorLevels) { + self::$stackedErrors[] = func_get_args(); } else { - $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10); - } - - self::$loggers['deprecation']->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack)); - } + if (version_compare(PHP_VERSION, '5.4', '<')) { + $stack = array_map( + function ($row) { + unset($row['args']); + + return $row; + }, + array_slice(debug_backtrace(false), 0, 10) + ); + } else { + $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10); + } - return true; - } + self::$loggers['deprecation']->warning($message, array('type' => self::TYPE_DEPRECATION, 'stack' => $stack)); + } - if ($this->displayErrors && error_reporting() & $level && $this->level & $level) { - // make sure the ContextErrorException class is loaded (https://bugs.php.net/bug.php?id=65322) - if (!class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { - require __DIR__.'/Exception/ContextErrorException.php'; + return true; } - if (!class_exists('Symfony\Component\Debug\Exception\FlattenException')) { - require __DIR__.'/Exception/FlattenException.php'; + } elseif ($this->displayErrors && error_reporting() & $level && $this->level & $level) { + if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) { + $c = $context; // Whatever the signature of the method, + unset($c['GLOBALS'], $context); // $context is always a reference in 5.3 + $context = $c; } - if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS']) && is_array($context)) { - unset($context['GLOBALS']); + $exception = sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line); + if ($context && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { + // Checking for class existence is a work around for https://bugs.php.net/42098 + $exception = new ContextErrorException($exception, 0, $level, $file, $line, $context); + } else { + $exception = new \ErrorException($exception, 0, $level, $file, $line); } - $exception = new ContextErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line), 0, $level, $file, $line, $context); + if (PHP_VERSION_ID <= 50407 && (PHP_VERSION_ID >= 50400 || PHP_VERSION_ID <= 50317)) { + // Exceptions thrown from error handlers are sometimes not caught by the exception + // handler and shutdown handlers are bypassed before 5.4.8/5.3.18. + // We temporarily re-enable display_errors to prevent any blank page related to this bug. - // Exceptions thrown from error handlers are sometimes not caught by the exception - // handler, so we invoke it directly (https://bugs.php.net/bug.php?id=54275) - $exceptionHandler = set_exception_handler(function () {}); - restore_exception_handler(); + $exception->errorHandlerCanary = new ErrorHandlerCanary(); + } - if (is_array($exceptionHandler) && $exceptionHandler[0] instanceof ExceptionHandler) { - $exceptionHandler[0]->handle($exception); + throw $exception; + } - if (!class_exists('Symfony\Component\Debug\Exception\DummyException')) { - require __DIR__.'/Exception/DummyException.php'; + if (isset(self::$loggers['scream']) && !(error_reporting() & $level)) { + if (self::$stackedErrorLevels) { + self::$stackedErrors[] = func_get_args(); + } else { + switch ($level) { + case E_USER_ERROR: + case E_RECOVERABLE_ERROR: + $logLevel = LogLevel::ERROR; + break; + + case E_WARNING: + case E_USER_WARNING: + $logLevel = LogLevel::WARNING; + break; + + default: + $logLevel = LogLevel::NOTICE; + break; } - // we must stop the PHP script execution, as the exception has - // already been dealt with, so, let's throw an exception that - // will be caught by a dummy exception handler - set_exception_handler(function (\Exception $e) use ($exceptionHandler) { - if (!$e instanceof DummyException) { - // happens if our dummy exception is caught by a - // catch-all from user code, in which case, let's the - // current handler handle this "new" exception - call_user_func($exceptionHandler, $e); - } - }); - - throw new DummyException(); + self::$loggers['scream']->log($logLevel, $message, array( + 'type' => $level, + 'file' => $file, + 'line' => $line, + 'scream' => error_reporting(), + )); } } return false; } - public function handleFatal() + /** + * Configure the error handler for delayed handling. + * Ensures also that non-catchable fatal errors are never silenced. + * + * As shown by http://bugs.php.net/42098 and http://bugs.php.net/60724 + * PHP has a compile stage where it behaves unusually. To workaround it, + * we plug an error handler that only stacks errors for later. + * + * The most important feature of this is to prevent + * autoloading until unstackErrors() is called. + */ + public static function stackErrors() { - if (null === $error = error_get_last()) { - return; + self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); + } + + /** + * Unstacks stacked errors and forwards to the regular handler + */ + public static function unstackErrors() + { + $level = array_pop(self::$stackedErrorLevels); + + if (null !== $level) { + $e = error_reporting($level); + if ($e !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { + // If the user changed the error level, do not overwrite it + error_reporting($e); + } } + if (empty(self::$stackedErrorLevels)) { + $errors = self::$stackedErrors; + self::$stackedErrors = array(); + + $errorHandler = set_error_handler('var_dump'); + restore_error_handler(); + + if ($errorHandler) { + foreach ($errors as $e) { + call_user_func_array($errorHandler, $e); + } + } + } + } + + public function handleFatal() + { $this->reservedMemory = ''; - $type = $error['type']; - if (0 === $this->level || !in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) { + gc_collect_cycles(); + $error = error_get_last(); + + // get current exception handler + $exceptionHandler = set_exception_handler('var_dump'); + restore_exception_handler(); + + try { + while (self::$stackedErrorLevels) { + static::unstackErrors(); + } + } catch (\Exception $exception) { + if ($exceptionHandler) { + call_user_func($exceptionHandler, $exception); + + return; + } + + if ($this->displayErrors) { + ini_set('display_errors', 1); + } + + throw $exception; + } + + if (!$error || !$this->level || !($error['type'] & (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_PARSE))) { return; } if (isset(self::$loggers['emergency'])) { $fatal = array( - 'type' => $type, + 'type' => $error['type'], 'file' => $error['file'], 'line' => $error['line'], ); - self::$loggers['emergency']->emerg($error['message'], $fatal); + self::$loggers['emergency']->emergency($error['message'], $fatal); } - if (!$this->displayErrors) { - return; - } - - // get current exception handler - $exceptionHandler = set_exception_handler(function () {}); - restore_exception_handler(); - - if (is_array($exceptionHandler) && $exceptionHandler[0] instanceof ExceptionHandler) { - $this->handleFatalError($exceptionHandler[0], $error); + if ($this->displayErrors && $exceptionHandler) { + $this->handleFatalError($exceptionHandler, $error); } } @@ -231,22 +306,64 @@ class ErrorHandler { return array( new UndefinedFunctionFatalErrorHandler(), + new UndefinedMethodFatalErrorHandler(), new ClassNotFoundFatalErrorHandler(), ); } - private function handleFatalError(ExceptionHandler $exceptionHandler, array $error) + private function handleFatalError($exceptionHandler, array $error) { + // Let PHP handle any further error + set_error_handler('var_dump', 0); + ini_set('display_errors', 1); + $level = isset($this->levels[$error['type']]) ? $this->levels[$error['type']] : $error['type']; $message = sprintf('%s: %s in %s line %d', $level, $error['message'], $error['file'], $error['line']); - $exception = new FatalErrorException($message, 0, $error['type'], $error['file'], $error['line']); - - foreach ($this->getFatalErrorHandlers() as $handler) { - if ($ex = $handler->handleError($error, $exception)) { - return $exceptionHandler->handle($ex); + if (0 === strpos($error['message'], 'Allowed memory') || 0 === strpos($error['message'], 'Out of memory')) { + $exception = new OutOfMemoryException($message, 0, $error['type'], $error['file'], $error['line'], 3, false); + } else { + $exception = new FatalErrorException($message, 0, $error['type'], $error['file'], $error['line'], 3, true); + + foreach ($this->getFatalErrorHandlers() as $handler) { + if ($e = $handler->handleError($error, $exception)) { + $exception = $e; + break; + } } } - $exceptionHandler->handle($exception); + try { + call_user_func($exceptionHandler, $exception); + } catch (\Exception $e) { + // The handler failed. Let PHP handle that now. + throw $exception; + } + } +} + +/** + * Private class used to work around https://bugs.php.net/54275 + * + * @author Nicolas Grekas + * + * @internal + */ +class ErrorHandlerCanary +{ + private static $displayErrors = null; + + public function __construct() + { + if (null === self::$displayErrors) { + self::$displayErrors = ini_set('display_errors', 1); + } + } + + public function __destruct() + { + if (null !== self::$displayErrors) { + ini_set('display_errors', self::$displayErrors); + self::$displayErrors = null; + } } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php old mode 100755 new mode 100644 index 94169b4..b91bf46 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php @@ -28,5 +28,6 @@ class ClassNotFoundException extends FatalErrorException $previous->getLine(), $previous->getPrevious() ); + $this->setTrace($previous->getTrace()); } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/ContextErrorException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/ContextErrorException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php old mode 100755 new mode 100644 index 8891f2f..967e033 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php @@ -12,9 +12,9 @@ namespace Symfony\Component\Debug\Exception; /** - * Used to stop execution of a PHP script after handling a fatal error. - * * @author Fabien Potencier + * + * @deprecated since version 2.5, to be removed in 3.0. */ class DummyException extends \ErrorException { diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php old mode 100755 new mode 100644 index bf37ef8..d5b5846 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FatalErrorException.php @@ -14,8 +14,58 @@ namespace Symfony\Component\Debug\Exception; /** * Fatal Error Exception. * + * @author Fabien Potencier * @author Konstanton Myakshin + * @author Nicolas Grekas */ class FatalErrorException extends \ErrorException { + public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true) + { + parent::__construct($message, $code, $severity, $filename, $lineno); + + if (null !== $traceOffset) { + if (function_exists('xdebug_get_function_stack')) { + $trace = xdebug_get_function_stack(); + if (0 < $traceOffset) { + array_splice($trace, -$traceOffset); + } + + foreach ($trace as &$frame) { + if (!isset($frame['type'])) { + // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 + if (isset($frame['class'])) { + $frame['type'] = '::'; + } + } elseif ('dynamic' === $frame['type']) { + $frame['type'] = '->'; + } elseif ('static' === $frame['type']) { + $frame['type'] = '::'; + } + + // XDebug also has a different name for the parameters array + if (!$traceArgs) { + unset($frame['params'], $frame['args']); + } elseif (isset($frame['params']) && !isset($frame['args'])) { + $frame['args'] = $frame['params']; + unset($frame['params']); + } + } + + unset($frame); + $trace = array_reverse($trace); + } else { + $trace = array(); + } + + $this->setTrace($trace); + } + } + + protected function setTrace($trace) + { + $traceReflector = new \ReflectionProperty('Exception', 'trace'); + $traceReflector->setAccessible(true); + $traceReflector->setValue($this, $trace); + } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php old mode 100755 new mode 100644 index 878ac4d..eb49d46 --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/FlattenException.php @@ -172,36 +172,7 @@ class FlattenException public function setTraceFromException(\Exception $exception) { - $trace = $exception->getTrace(); - - if ($exception instanceof FatalErrorException) { - if (function_exists('xdebug_get_function_stack')) { - $trace = array_slice(array_reverse(xdebug_get_function_stack()), 4); - - foreach ($trace as $i => $frame) { - // XDebug pre 2.1.1 doesn't currently set the call type key http://bugs.xdebug.org/view.php?id=695 - if (!isset($frame['type'])) { - $trace[$i]['type'] = '??'; - } - - if ('dynamic' === $trace[$i]['type']) { - $trace[$i]['type'] = '->'; - } elseif ('static' === $trace[$i]['type']) { - $trace[$i]['type'] = '::'; - } - - // XDebug also has a different name for the parameters array - if (isset($frame['params']) && !isset($frame['args'])) { - $trace[$i]['args'] = $frame['params']; - unset($trace[$i]['params']); - } - } - } else { - $trace = array_slice(array_reverse($trace), 1); - } - } - - $this->setTrace($trace, $exception->getFile(), $exception->getLine()); + $this->setTrace($exception->getTrace(), $exception->getFile(), $exception->getLine()); } public function setTrace($trace, $file, $line) diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/OutOfMemoryException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/OutOfMemoryException.php new file mode 100644 index 0000000..fec1979 --- /dev/null +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/OutOfMemoryException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Out of memory exception. + * + * @author Nicolas Grekas + */ +class OutOfMemoryException extends FatalErrorException +{ +} diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php old mode 100755 new mode 100644 index 572c8b3..a66ae2a --- a/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php @@ -28,5 +28,6 @@ class UndefinedFunctionException extends FatalErrorException $previous->getLine(), $previous->getPrevious() ); + $this->setTrace($previous->getTrace()); } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedMethodException.php b/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedMethodException.php new file mode 100644 index 0000000..350dc31 --- /dev/null +++ b/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedMethodException.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Exception; + +/** + * Undefined Method Exception. + * + * @author Grégoire Pineau + */ +class UndefinedMethodException extends FatalErrorException +{ + public function __construct($message, \ErrorException $previous) + { + parent::__construct( + $message, + $previous->getCode(), + $previous->getSeverity(), + $previous->getFile(), + $previous->getLine(), + $previous->getPrevious() + ); + $this->setTrace($previous->getTrace()); + } +} diff --git a/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php old mode 100755 new mode 100644 index 9688c71..bfbd783 --- a/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/ExceptionHandler.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Debug; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Debug\Exception\FlattenException; +use Symfony\Component\Debug\Exception\OutOfMemoryException; if (!defined('ENT_SUBSTITUTE')) { define('ENT_SUBSTITUTE', 8); @@ -33,6 +34,8 @@ class ExceptionHandler { private $debug; private $charset; + private $handler; + private $caughtOutput = 0; public function __construct($debug = true, $charset = 'UTF-8') { @@ -57,23 +60,86 @@ class ExceptionHandler } /** + * Sets a user exception handler. + * + * @param callable $handler An handler that will be called on Exception + * + * @return callable|null The previous exception handler if any + */ + public function setHandler($handler) + { + if (isset($handler) && !is_callable($handler)) { + throw new \LogicException('The exception handler must be a valid PHP callable.'); + } + $old = $this->handler; + $this->handler = $handler; + + return $old; + } + + /** + * {@inheritdoc} + * * Sends a response for the given Exception. * * If you have the Symfony HttpFoundation component installed, * this method will use it to create and send the response. If not, * it will fallback to plain PHP functions. * - * @param \Exception $exception An \Exception instance - * * @see sendPhpResponse * @see createResponse */ public function handle(\Exception $exception) { - if (class_exists('Symfony\Component\HttpFoundation\Response')) { - $this->createResponse($exception)->send(); - } else { + if ($exception instanceof OutOfMemoryException) { $this->sendPhpResponse($exception); + + return; + } + + // To be as fail-safe as possible, the exception is first handled + // by our simple exception handler, then by the user exception handler. + // The latter takes precedence and any output from the former is cancelled, + // if and only if nothing bad happens in this handling path. + + $caughtOutput = 0; + + $this->caughtOutput = false; + ob_start(array($this, 'catchOutput')); + try { + if (class_exists('Symfony\Component\HttpFoundation\Response')) { + $response = $this->createResponse($exception); + $response->sendHeaders(); + $response->sendContent(); + } else { + $this->sendPhpResponse($exception); + } + } catch (\Exception $e) { + // Ignore this $e exception, we have to deal with $exception + } + if (false === $this->caughtOutput) { + ob_end_clean(); + } + if (isset($this->caughtOutput[0])) { + ob_start(array($this, 'cleanOutput')); + echo $this->caughtOutput; + $caughtOutput = ob_get_length(); + } + $this->caughtOutput = 0; + + if (!empty($this->handler)) { + try { + call_user_func($this->handler, $exception); + + if ($caughtOutput) { + $this->caughtOutput = $caughtOutput; + } + } catch (\Exception $e) { + if (!$caughtOutput) { + // All handlers failed. Let PHP handle that now. + throw $exception; + } + } } } @@ -315,4 +381,30 @@ EOF; return implode(', ', $result); } + + /** + * @internal + */ + public function catchOutput($buffer) + { + $this->caughtOutput = $buffer; + + return ''; + } + + /** + * @internal + */ + public function cleanOutput($buffer) + { + if ($this->caughtOutput) { + // use substr_replace() instead of substr() for mbstring overloading resistance + $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtOutput); + if (isset($cleanBuffer[0])) { + $buffer = $cleanBuffer; + } + } + + return $buffer; + } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php old mode 100755 new mode 100644 index 1554a81..f25fd90 --- a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -103,8 +103,17 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface } // get class loaders wrapped by DebugClassLoader - if ($function[0] instanceof DebugClassLoader && method_exists($function[0], 'getClassLoader')) { - $function[0] = $function[0]->getClassLoader(); + if ($function[0] instanceof DebugClassLoader) { + $function = $function[0]->getClassLoader(); + + // Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated + if (is_object($function)) { + $function = array($function); + } + + if (!is_array($function)) { + continue; + } } if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) { diff --git a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php old mode 100755 new mode 100644 index 4b6fc90..f460c66 --- a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedFunctionFatalErrorHandler.php @@ -80,6 +80,7 @@ class UndefinedFunctionFatalErrorHandler implements FatalErrorHandlerInterface } if ($candidates) { + sort($candidates); $message .= ' Did you mean to call: '.implode(', ', array_map(function ($val) { return '"'.$val.'"'; }, $candidates)).'?'; diff --git a/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php new file mode 100644 index 0000000..7cc55c6 --- /dev/null +++ b/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/UndefinedMethodFatalErrorHandler.php @@ -0,0 +1,54 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\FatalErrorHandler; + +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\Exception\UndefinedMethodException; + +/** + * ErrorHandler for undefined methods. + * + * @author Grégoire Pineau + */ +class UndefinedMethodFatalErrorHandler implements FatalErrorHandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handleError(array $error, FatalErrorException $exception) + { + preg_match('/^Call to undefined method (.*)::(.*)\(\)$/', $error['message'], $matches); + if (!$matches) { + return; + } + + $className = $matches[1]; + $methodName = $matches[2]; + + $message = sprintf('Attempted to call method "%s" on class "%s" in %s line %d.', $methodName, $className, $error['file'], $error['line']); + + $candidates = array(); + foreach (get_class_methods($className) as $definedMethodName) { + $lev = levenshtein($methodName, $definedMethodName); + if ($lev <= strlen($methodName) / 3 || false !== strpos($definedMethodName, $methodName)) { + $candidates[] = $definedMethodName; + } + } + + if ($candidates) { + sort($candidates); + $message .= sprintf(' Did you mean to call: "%s"?', implode('", "', $candidates)); + } + + return new UndefinedMethodException($message, $exception); + } +} diff --git a/vendor/symfony/debug/Symfony/Component/Debug/LICENSE b/vendor/symfony/debug/Symfony/Component/Debug/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/README.md b/vendor/symfony/debug/Symfony/Component/Debug/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php old mode 100755 new mode 100644 index a18e581..12224e0 --- a/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php @@ -12,46 +12,145 @@ namespace Symfony\Component\Debug\Tests; use Symfony\Component\Debug\DebugClassLoader; +use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\Debug\Exception\ContextErrorException; class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase { + /** + * @var int Error reporting level before running tests. + */ + private $errorReporting; + private $loader; protected function setUp() { + $this->errorReporting = error_reporting(E_ALL | E_STRICT); $this->loader = new ClassLoader(); - spl_autoload_register(array($this->loader, 'loadClass')); + spl_autoload_register(array($this->loader, 'loadClass'), true, true); + DebugClassLoader::enable(); } protected function tearDown() { + DebugClassLoader::disable(); spl_autoload_unregister(array($this->loader, 'loadClass')); + error_reporting($this->errorReporting); } public function testIdempotence() { DebugClassLoader::enable(); - DebugClassLoader::enable(); $functions = spl_autoload_functions(); foreach ($functions as $function) { if (is_array($function) && $function[0] instanceof DebugClassLoader) { $reflClass = new \ReflectionClass($function[0]); - $reflProp = $reflClass->getProperty('classFinder'); + $reflProp = $reflClass->getProperty('classLoader'); $reflProp->setAccessible(true); $this->assertNotInstanceOf('Symfony\Component\Debug\DebugClassLoader', $reflProp->getValue($function[0])); - DebugClassLoader::disable(); - return; } } - DebugClassLoader::disable(); - $this->fail('DebugClassLoader did not register'); } + + public function testUnsilencing() + { + ob_start(); + $bak = array( + ini_set('log_errors', 0), + ini_set('display_errors', 1), + ); + + // See below: this will fail with parse error + // but this should not be @-silenced. + @class_exists(__NAMESPACE__.'\TestingUnsilencing', true); + + ini_set('log_errors', $bak[0]); + ini_set('display_errors', $bak[1]); + $output = ob_get_clean(); + + $this->assertStringMatchesFormat('%aParse error%a', $output); + } + + public function testStacking() + { + // the ContextErrorException must not be loaded to test the workaround + // for https://bugs.php.net/65322. + if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { + $this->markTestSkipped('The ContextErrorException class is already loaded.'); + } + + ErrorHandler::register(); + + try { + // Trigger autoloading + E_STRICT at compile time + // which in turn triggers $errorHandler->handle() + // that again triggers autoloading for ContextErrorException. + // Error stacking works around the bug above and everything is fine. + + eval(' + namespace '.__NAMESPACE__.'; + class ChildTestingStacking extends TestingStacking { function foo($bar) {} } + '); + $this->fail('ContextErrorException expected'); + } catch (\ErrorException $exception) { + // if an exception is thrown, the test passed + restore_error_handler(); + restore_exception_handler(); + $this->assertEquals(E_STRICT, $exception->getSeverity()); + $this->assertStringStartsWith(__FILE__, $exception->getFile()); + $this->assertRegexp('/^Runtime Notice: Declaration/', $exception->getMessage()); + } catch (\Exception $e) { + restore_error_handler(); + restore_exception_handler(); + + throw $e; + } + } + + /** + * @expectedException \RuntimeException + */ + public function testNameCaseMismatch() + { + class_exists(__NAMESPACE__.'\TestingCaseMismatch', true); + } + + /** + * @expectedException \RuntimeException + */ + public function testFileCaseMismatch() + { + if (!file_exists(__DIR__.'/Fixtures/CaseMismatch.php')) { + $this->markTestSkipped('Can only be run on case insensitive filesystems'); + } + + class_exists(__NAMESPACE__.'\Fixtures\CaseMismatch', true); + } + + /** + * @expectedException \RuntimeException + */ + public function testPsr4CaseMismatch() + { + class_exists(__NAMESPACE__.'\Fixtures\Psr4CaseMismatch', true); + } + + public function testNotPsr0() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\NotPSR0', true)); + } + + public function testNotPsr0Bis() + { + $this->assertTrue(class_exists(__NAMESPACE__.'\Fixtures\NotPSR0bis', true)); + } } class ClassLoader @@ -60,7 +159,27 @@ class ClassLoader { } + public function getClassMap() + { + return array(__NAMESPACE__.'\Fixtures\NotPSR0bis' => __DIR__.'/Fixtures/notPsr0Bis.php'); + } + public function findFile($class) { + if (__NAMESPACE__.'\TestingUnsilencing' === $class) { + eval('-- parse error --'); + } elseif (__NAMESPACE__.'\TestingStacking' === $class) { + eval('namespace '.__NAMESPACE__.'; class TestingStacking { function foo() {} }'); + } elseif (__NAMESPACE__.'\TestingCaseMismatch' === $class) { + eval('namespace '.__NAMESPACE__.'; class TestingCaseMisMatch {}'); + } elseif (__NAMESPACE__.'\Fixtures\CaseMismatch' === $class) { + return __DIR__.'/Fixtures/CaseMismatch.php'; + } elseif (__NAMESPACE__.'\Fixtures\Psr4CaseMismatch' === $class) { + return __DIR__.'/Fixtures/psr4/Psr4CaseMismatch.php'; + } elseif (__NAMESPACE__.'\Fixtures\NotPSR0' === $class) { + return __DIR__.'/Fixtures/reallyNotPsr0.php'; + } elseif (__NAMESPACE__.'\Fixtures\NotPSR0bis' === $class) { + return __DIR__.'/Fixtures/notPsr0Bis.php'; + } } } diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php old mode 100755 new mode 100644 index e764b4d..4765285 --- a/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Debug\Tests; use Symfony\Component\Debug\ErrorHandler; -use Symfony\Component\Debug\Exception\DummyException; +use Symfony\Component\Debug\Exception\ContextErrorException; /** * ErrorHandlerTest @@ -44,104 +44,35 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase error_reporting($this->errorReporting); } - public function testCompileTimeError() + public function testNotice() { - // the ContextErrorException must not be loaded to test the workaround - // for https://bugs.php.net/bug.php?id=65322. - if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { - $this->markTestSkipped('The ContextErrorException class is already loaded.'); - } - - $exceptionHandler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('handle')); - - // the following code forces some PHPUnit classes to be loaded - // so that they will be available in the exception handler - // as they won't be autoloaded by PHP - class_exists('PHPUnit_Framework_MockObject_Invocation_Object'); - $this->assertInstanceOf('stdClass', new \stdClass()); - $this->assertEquals(1, 1); - $this->assertStringStartsWith('foo', 'foobar'); - $this->assertArrayHasKey('bar', array('bar' => 'foo')); - - $that = $this; - $exceptionCheck = function ($exception) use ($that) { - $that->assertInstanceOf('Symfony\Component\Debug\Exception\ContextErrorException', $exception); - $that->assertEquals(E_STRICT, $exception->getSeverity()); - $that->assertEquals(2, $exception->getLine()); - $that->assertStringStartsWith('Runtime Notice: Declaration of _CompileTimeError::foo() should be compatible with', $exception->getMessage()); - $that->assertArrayHasKey('bar', $exception->getContext()); - }; - - $exceptionHandler->expects($this->once()) - ->method('handle') - ->will($this->returnCallback($exceptionCheck)) - ; - ErrorHandler::register(); - set_exception_handler(array($exceptionHandler, 'handle')); - - // dummy variable to check for in error handler. - $bar = 123; - // trigger compile time error try { - eval(<<<'PHP' -class _BaseCompileTimeError { function foo() {} } -class _CompileTimeError extends _BaseCompileTimeError { function foo($invalid) {} } -PHP - ); - } catch (DummyException $e) { + self::triggerNotice($this); + $this->fail('ContextErrorException expected'); + } catch (ContextErrorException $exception) { // if an exception is thrown, the test passed - } catch (\Exception $e) { restore_error_handler(); - restore_exception_handler(); - - throw $e; - } - - restore_error_handler(); - restore_exception_handler(); - } - - public function testNotice() - { - $exceptionHandler = $this->getMock('Symfony\Component\Debug\ExceptionHandler', array('handle')); - set_exception_handler(array($exceptionHandler, 'handle')); - - $that = $this; - $exceptionCheck = function ($exception) use ($that) { - $that->assertInstanceOf('Symfony\Component\Debug\Exception\ContextErrorException', $exception); - $that->assertEquals(E_NOTICE, $exception->getSeverity()); - $that->assertEquals(__LINE__ + 44, $exception->getLine()); - $that->assertEquals(__FILE__, $exception->getFile()); - $that->assertRegexp('/^Notice: Undefined variable: (foo|bar)/', $exception->getMessage()); - $that->assertArrayHasKey('foobar', $exception->getContext()); + $this->assertEquals(E_NOTICE, $exception->getSeverity()); + $this->assertEquals(__FILE__, $exception->getFile()); + $this->assertRegexp('/^Notice: Undefined variable: (foo|bar)/', $exception->getMessage()); + $this->assertArrayHasKey('foobar', $exception->getContext()); $trace = $exception->getTrace(); - $that->assertEquals(__FILE__, $trace[0]['file']); - $that->assertEquals('Symfony\Component\Debug\ErrorHandler', $trace[0]['class']); - $that->assertEquals('handle', $trace[0]['function']); - $that->assertEquals('->', $trace[0]['type']); - - $that->assertEquals(__FILE__, $trace[1]['file']); - $that->assertEquals(__CLASS__, $trace[1]['class']); - $that->assertEquals('triggerNotice', $trace[1]['function']); - $that->assertEquals('::', $trace[1]['type']); - - $that->assertEquals(__CLASS__, $trace[2]['class']); - $that->assertEquals('testNotice', $trace[2]['function']); - $that->assertEquals('->', $trace[2]['type']); - }; - - $exceptionHandler->expects($this->once()) - ->method('handle') - ->will($this->returnCallback($exceptionCheck)); - ErrorHandler::register(); - - try { - self::triggerNotice($this); - } catch (DummyException $e) { - // if an exception is thrown, the test passed + $this->assertEquals(__FILE__, $trace[0]['file']); + $this->assertEquals('Symfony\Component\Debug\ErrorHandler', $trace[0]['class']); + $this->assertEquals('handle', $trace[0]['function']); + $this->assertEquals('->', $trace[0]['type']); + + $this->assertEquals(__FILE__, $trace[1]['file']); + $this->assertEquals(__CLASS__, $trace[1]['class']); + $this->assertEquals('triggerNotice', $trace[1]['function']); + $this->assertEquals('::', $trace[1]['type']); + + $this->assertEquals(__CLASS__, $trace[2]['class']); + $this->assertEquals('testNotice', $trace[2]['function']); + $this->assertEquals('->', $trace[2]['type']); } catch (\Exception $e) { restore_error_handler(); @@ -203,12 +134,12 @@ PHP restore_error_handler(); $handler = ErrorHandler::register(E_USER_DEPRECATED); - $this->assertTrue($handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); restore_error_handler(); $handler = ErrorHandler::register(E_DEPRECATED); - $this->assertTrue($handler->handle(E_DEPRECATED, 'foo', 'foo.php', 12, array())); + $this->assertFalse($handler->handle(E_DEPRECATED, 'foo', 'foo.php', 12, array())); restore_error_handler(); @@ -231,7 +162,29 @@ PHP $handler = ErrorHandler::register(E_USER_DEPRECATED); $handler->setLogger($logger); - $handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array()); + $this->assertTrue($handler->handle(E_USER_DEPRECATED, 'foo', 'foo.php', 12, array())); + + restore_error_handler(); + + $logger = $this->getMock('Psr\Log\LoggerInterface'); + + $that = $this; + $logArgCheck = function ($level, $message, $context) use ($that) { + $that->assertEquals('Undefined variable: undefVar', $message); + $that->assertArrayHasKey('type', $context); + $that->assertEquals($context['type'], E_NOTICE); + }; + + $logger + ->expects($this->once()) + ->method('log') + ->will($this->returnCallback($logArgCheck)) + ; + + $handler = ErrorHandler::register(E_NOTICE); + $handler->setLogger($logger, 'scream'); + unset($undefVar); + @$undefVar++; restore_error_handler(); } catch (\Exception $e) { @@ -251,10 +204,11 @@ PHP $m = new \ReflectionMethod($handler, 'handleFatalError'); $m->setAccessible(true); - $m->invoke($handler, $exceptionHandler, $error); + $m->invoke($handler, array($exceptionHandler, 'handle'), $error); $this->assertInstanceof($class, $exceptionHandler->e); - $this->assertSame($translatedMessage, $exceptionHandler->e->getMessage()); + // class names are case insensitive and PHP/HHVM do not return the same + $this->assertSame(strtolower($translatedMessage), strtolower($exceptionHandler->e->getMessage())); $this->assertSame($error['type'], $exceptionHandler->e->getSeverity()); $this->assertSame($error['file'], $exceptionHandler->e->getFile()); $this->assertSame($error['line'], $exceptionHandler->e->getLine()); diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/ExceptionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php old mode 100755 new mode 100644 index 511f204..27d50ff --- a/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -25,7 +25,8 @@ class UndefinedFunctionFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); $this->assertInstanceof('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception); - $this->assertSame($translatedMessage, $exception->getMessage()); + // class names are case insensitive and PHP/HHVM do not return the same + $this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage())); $this->assertSame($error['type'], $exception->getSeverity()); $this->assertSame($error['file'], $exception->getFile()); $this->assertSame($error['line'], $exception->getLine()); diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php new file mode 100644 index 0000000..8e1893c --- /dev/null +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Debug\Tests\FatalErrorHandler; + +use Symfony\Component\Debug\Exception\FatalErrorException; +use Symfony\Component\Debug\FatalErrorHandler\UndefinedMethodFatalErrorHandler; + +class UndefinedMethodFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider provideUndefinedMethodData + */ + public function testUndefinedMethod($error, $translatedMessage) + { + $handler = new UndefinedMethodFatalErrorHandler(); + $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); + + $this->assertInstanceof('Symfony\Component\Debug\Exception\UndefinedMethodException', $exception); + $this->assertSame($translatedMessage, $exception->getMessage()); + $this->assertSame($error['type'], $exception->getSeverity()); + $this->assertSame($error['file'], $exception->getFile()); + $this->assertSame($error['line'], $exception->getLine()); + } + + public function provideUndefinedMethodData() + { + return array( + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined method SplObjectStorage::what()', + ), + 'Attempted to call method "what" on class "SplObjectStorage" in foo.php line 12.', + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined method SplObjectStorage::walid()', + ), + 'Attempted to call method "walid" on class "SplObjectStorage" in foo.php line 12. Did you mean to call: "valid"?', + ), + array( + array( + 'type' => 1, + 'line' => 12, + 'file' => 'foo.php', + 'message' => 'Call to undefined method SplObjectStorage::offsetFet()', + ), + 'Attempted to call method "offsetFet" on class "SplObjectStorage" in foo.php line 12. Did you mean to call: "offsetGet", "offsetSet", "offsetUnset"?', + ), + ); + } +} diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/PEARClass.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/PEARClass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/RequiredTwice.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/RequiredTwice.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php b/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php new file mode 100644 index 0000000..691d660 --- /dev/null +++ b/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/casemismatch.php @@ -0,0 +1,7 @@ + * @@ -637,9 +637,7 @@ class Crawler extends \SplObjectStorage public function filter($selector) { if (!class_exists('Symfony\\Component\\CssSelector\\CssSelector')) { - // @codeCoverageIgnoreStart throw new \RuntimeException('Unable to filter with a CSS selector as the Symfony CssSelector is not installed (you can use filterXPath instead).'); - // @codeCoverageIgnoreEnd } // The CssSelector already prefixes the selector with descendant-or-self:: @@ -911,9 +909,7 @@ class Crawler extends \SplObjectStorage if ($i == $position) { return $node; } - // @codeCoverageIgnoreStart } - // @codeCoverageIgnoreEnd } /** diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php old mode 100755 new mode 100644 index 9af67c1..56e74dc --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/ChoiceFormField.php @@ -161,11 +161,11 @@ class ChoiceFormField extends FormField * * This method should only be used internally. * - * @param \DOMNode $node A \DOMNode + * @param \DOMElement $node * * @throws \LogicException When choice provided is not multiple nor radio */ - public function addChoice(\DOMNode $node) + public function addChoice(\DOMElement $node) { if (!$this->multiple && 'radio' !== $this->type) { throw new \LogicException(sprintf('Unable to add a choice for "%s" as it is not multiple or is not a radio button.', $this->name)); @@ -259,15 +259,15 @@ class ChoiceFormField extends FormField /** * Returns option value with associated disabled flag * - * @param \DOMNode $node + * @param \DOMElement $node * * @return array */ - private function buildOptionValue($node) + private function buildOptionValue(\DOMElement $node) { $option = array(); - $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : '1'; + $defaultValue = (isset($node->nodeValue) && !empty($node->nodeValue)) ? $node->nodeValue : 'on'; $option['value'] = $node->hasAttribute('value') ? $node->getAttribute('value') : $defaultValue; $option['disabled'] = $node->hasAttribute('disabled'); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FileFormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FileFormField.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php old mode 100755 new mode 100644 index 9db4335..785e301 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/FormField.php @@ -19,7 +19,7 @@ namespace Symfony\Component\DomCrawler\Field; abstract class FormField { /** - * @var \DOMNode + * @var \DOMElement */ protected $node; /** @@ -46,9 +46,9 @@ abstract class FormField /** * Constructor. * - * @param \DOMNode $node The node associated with this field + * @param \DOMElement $node The node associated with this field */ - public function __construct(\DOMNode $node) + public function __construct(\DOMElement $node) { $this->node = $node; $this->name = $node->getAttribute('name'); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/InputFormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/InputFormField.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/TextareaFormField.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Field/TextareaFormField.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php old mode 100755 new mode 100644 index e8faf49..8770c40 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Form.php @@ -23,7 +23,7 @@ use Symfony\Component\DomCrawler\Field\FormField; class Form extends Link implements \ArrayAccess { /** - * @var \DOMNode + * @var \DOMElement */ private $button; @@ -35,15 +35,15 @@ class Form extends Link implements \ArrayAccess /** * Constructor. * - * @param \DOMNode $node A \DOMNode instance - * @param string $currentUri The URI of the page where the form is embedded - * @param string $method The method to use for the link (if null, it defaults to the method defined by the form) + * @param \DOMElement $node A \DOMElement instance + * @param string $currentUri The URI of the page where the form is embedded + * @param string $method The method to use for the link (if null, it defaults to the method defined by the form) * * @throws \LogicException if the node is not a button inside a form tag * * @api */ - public function __construct(\DOMNode $node, $currentUri, $method = null) + public function __construct(\DOMElement $node, $currentUri, $method = null) { parent::__construct($node, $currentUri, $method); @@ -53,7 +53,7 @@ class Form extends Link implements \ArrayAccess /** * Gets the form node associated with this form. * - * @return \DOMNode A \DOMNode instance + * @return \DOMElement A \DOMElement instance */ public function getFormNode() { @@ -359,13 +359,13 @@ class Form extends Link implements \ArrayAccess /** * Sets the node for the form. * - * Expects a 'submit' button \DOMNode and finds the corresponding form element. + * Expects a 'submit' button \DOMElement and finds the corresponding form element, or the form element itself. * - * @param \DOMNode $node A \DOMNode instance + * @param \DOMElement $node A \DOMElement instance * * @throws \LogicException If given node is not a button or input or does not have a form ancestor */ - protected function setNode(\DOMNode $node) + protected function setNode(\DOMElement $node) { $this->button = $node; if ('button' === $node->nodeName || ('input' === $node->nodeName && in_array(strtolower($node->getAttribute('type')), array('submit', 'button', 'image')))) { @@ -446,7 +446,7 @@ class Form extends Link implements \ArrayAccess } } - private function addField(\DOMNode $node) + private function addField(\DOMElement $node) { if (!$node->hasAttribute('name') || !$node->getAttribute('name')) { return; diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/FormFieldRegistry.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/FormFieldRegistry.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/LICENSE b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php old mode 100755 new mode 100644 index 05d5e92..9ddf2b2 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Link.php @@ -21,7 +21,7 @@ namespace Symfony\Component\DomCrawler; class Link { /** - * @var \DOMNode A \DOMNode instance + * @var \DOMElement */ protected $node; /** @@ -36,15 +36,15 @@ class Link /** * Constructor. * - * @param \DOMNode $node A \DOMNode instance - * @param string $currentUri The URI of the page where the link is embedded (or the base href) - * @param string $method The method to use for the link (get by default) + * @param \DOMElement $node A \DOMElement instance + * @param string $currentUri The URI of the page where the link is embedded (or the base href) + * @param string $method The method to use for the link (get by default) * * @throws \InvalidArgumentException if the node is not a link * * @api */ - public function __construct(\DOMNode $node, $currentUri, $method = 'GET') + public function __construct(\DOMElement $node, $currentUri, $method = 'GET') { if (!in_array(strtolower(substr($currentUri, 0, 4)), array('http', 'file'))) { throw new \InvalidArgumentException(sprintf('Current URI must be an absolute URL ("%s").', $currentUri)); @@ -58,7 +58,7 @@ class Link /** * Gets the node associated with this link. * - * @return \DOMNode A \DOMNode instance + * @return \DOMElement A \DOMElement instance */ public function getNode() { @@ -180,13 +180,13 @@ class Link } /** - * Sets current \DOMNode instance. + * Sets current \DOMElement instance. * - * @param \DOMNode $node A \DOMNode instance + * @param \DOMElement $node A \DOMElement instance * * @throws \LogicException If given node is not an anchor */ - protected function setNode(\DOMNode $node) + protected function setNode(\DOMElement $node) { if ('a' !== $node->nodeName && 'area' !== $node->nodeName) { throw new \LogicException(sprintf('Unable to click on a "%s" tag.', $node->nodeName)); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/README.md b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php old mode 100755 new mode 100644 index 44c3a56..15bcb7d --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -47,7 +47,7 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $crawler = new Crawler(); $crawler->add($this->createNodeList()->item(0)); - $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from an \DOMNode'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->add() adds nodes from a \DOMElement'); $crawler = new Crawler(); $crawler->add('Foo'); @@ -284,7 +284,7 @@ EOF $crawler = new Crawler(); $crawler->addNode($this->createNodeList()->item(0)); - $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNode() adds nodes from an \DOMNode'); + $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNode() adds nodes from a \DOMElement'); } public function testClear() diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php old mode 100755 new mode 100644 index c2970f6..9b31945 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/ChoiceFormFieldTest.php @@ -221,7 +221,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $this->assertNull($field->getValue(), '->getValue() returns null if the checkbox is not checked'); $this->assertFalse($field->isMultiple(), '->hasValue() returns false for checkboxes'); try { - $field->addChoice(new \DOMNode()); + $field->addChoice(new \DOMElement('input')); $this->fail('->addChoice() throws a \LogicException for checkboxes'); } catch (\LogicException $e) { $this->assertTrue(true, '->initialize() throws a \LogicException for checkboxes'); @@ -231,7 +231,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $field = new ChoiceFormField($node); $this->assertTrue($field->hasValue(), '->hasValue() returns true when the checkbox is checked'); - $this->assertEquals('1', $field->getValue(), '->getValue() returns 1 if the checkbox is checked and has no value attribute'); + $this->assertEquals('on', $field->getValue(), '->getValue() returns 1 if the checkbox is checked and has no value attribute'); $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked', 'value' => 'foo')); $field = new ChoiceFormField($node); @@ -279,7 +279,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name')); $field = new ChoiceFormField($node); $field->tick(); - $this->assertEquals(1, $field->getValue(), '->tick() ticks checkboxes'); + $this->assertEquals('on', $field->getValue(), '->tick() ticks checkboxes'); } public function testUntick() @@ -305,7 +305,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'checked' => 'checked')); $field = new ChoiceFormField($node); $field->select(true); - $this->assertEquals(1, $field->getValue(), '->select() changes the value of the field'); + $this->assertEquals('on', $field->getValue(), '->select() changes the value of the field'); $field->select(false); $this->assertNull($field->getValue(), '->select() changes the value of the field'); diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FileFormFieldTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FormFieldTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FormFieldTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/FormFieldTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/InputFormFieldTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Field/TextareaFormFieldTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Fixtures/no-extension b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Fixtures/no-extension old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Fixtures/windows-1250.html b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/Fixtures/windows-1250.html old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/FormTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/FormTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/LinkTest.php b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/Tests/LinkTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json old mode 100755 new mode 100644 index 2040ddc..0246346 --- a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json +++ b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/phpunit.xml.dist b/vendor/symfony/dom-crawler/Symfony/Component/DomCrawler/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitignore b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/CHANGELOG.md b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/GenericEventTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/ImmutableEventDispatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist b/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/.gitignore b/vendor/symfony/filesystem/Symfony/Component/Filesystem/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/CHANGELOG.md b/vendor/symfony/filesystem/Symfony/Component/Filesystem/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/ExceptionInterface.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/FileNotFoundException.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/FileNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/IOException.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/IOException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Filesystem.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Filesystem.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/LICENSE b/vendor/symfony/filesystem/Symfony/Component/Filesystem/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/README.md b/vendor/symfony/filesystem/Symfony/Component/Filesystem/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests/ExceptionTest.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests/ExceptionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests/FilesystemTest.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests/FilesystemTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php b/vendor/symfony/filesystem/Symfony/Component/Filesystem/Tests/FilesystemTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/composer.json b/vendor/symfony/filesystem/Symfony/Component/Filesystem/composer.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/filesystem/Symfony/Component/Filesystem/phpunit.xml.dist b/vendor/symfony/filesystem/Symfony/Component/Filesystem/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/.gitignore b/vendor/symfony/finder/Symfony/Component/Finder/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/AdapterInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/BsdFindAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/GnuFindAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Adapter/PhpAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md b/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md old mode 100755 new mode 100644 index 7ad2308..f1dd7d5 --- a/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md +++ b/vendor/symfony/finder/Symfony/Component/Finder/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +2.5.0 +----- + * added support for GLOB_BRACE in the paths passed to Finder::in() + 2.3.0 ----- diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php b/vendor/symfony/finder/Symfony/Component/Finder/Comparator/Comparator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Comparator/DateComparator.php b/vendor/symfony/finder/Symfony/Component/Finder/Comparator/DateComparator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Comparator/NumberComparator.php b/vendor/symfony/finder/Symfony/Component/Finder/Comparator/NumberComparator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/AccessDeniedException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/AccessDeniedException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/AdapterFailureException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/OperationNotPermitedException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php b/vendor/symfony/finder/Symfony/Component/Finder/Exception/ShellCommandFailureException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Glob.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/Glob.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/Regex.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php b/vendor/symfony/finder/Symfony/Component/Finder/Expression/ValueInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Finder.php b/vendor/symfony/finder/Symfony/Component/Finder/Finder.php old mode 100755 new mode 100644 index db4d851..f8fa71f --- a/vendor/symfony/finder/Symfony/Component/Finder/Finder.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Finder.php @@ -661,7 +661,7 @@ class Finder implements \IteratorAggregate, \Countable foreach ((array) $dirs as $dir) { if (is_dir($dir)) { $resolvedDirs[] = $dir; - } elseif ($glob = glob($dir, GLOB_ONLYDIR)) { + } elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) { $resolvedDirs = array_merge($resolvedDirs, $glob); } else { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Glob.php b/vendor/symfony/finder/Symfony/Component/Finder/Glob.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/CustomFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php old mode 100755 new mode 100644 index bad682e..958f843 --- a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DateRangeFilterIterator.php @@ -44,10 +44,6 @@ class DateRangeFilterIterator extends FilterIterator { $fileinfo = $this->current(); - if (!$fileinfo->isFile()) { - return true; - } - $filedate = $fileinfo->getMTime(); foreach ($this->comparators as $compare) { if (!$compare->test($filedate)) { diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/DepthRangeFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilePathsIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilecontentFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilecontentFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilenameFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SizeRangeFilterIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Iterator/SortableIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/LICENSE b/vendor/symfony/finder/Symfony/Component/Finder/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/README.md b/vendor/symfony/finder/Symfony/Component/Finder/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Shell/Command.php b/vendor/symfony/finder/Symfony/Component/Finder/Shell/Command.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php b/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/SplFileInfo.php b/vendor/symfony/finder/Symfony/Component/Finder/SplFileInfo.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Comparator/ComparatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Comparator/DateComparatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Comparator/NumberComparatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/ExpressionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/GlobTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/GlobTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/DummyAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/FailingAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/NamedAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FakeAdapter/UnsupportedAdapter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php old mode 100755 new mode 100644 index a42b0d7..0b7a6b7 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/FinderTest.php @@ -336,6 +336,17 @@ class FinderTest extends Iterator\RealIteratorTestCase /** * @dataProvider getAdaptersTestData */ + public function testInWithGlobBrace($adapter) + { + $finder = $this->buildFinder($adapter); + $finder->in(array(__DIR__.'/Fixtures/{A,copy/A}/B/C'))->getIterator(); + + $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); + } + + /** + * @dataProvider getAdaptersTestData + */ public function testGetIterator($adapter) { $finder = $this->buildFinder($adapter); diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/C/abc.dat old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/B/ab.dat old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/a.dat b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/A/a.dat old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/B/ab.dat.copy old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/copy/A/a.dat.copy old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/dolor.txt b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/dolor.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/ipsum.txt b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/ipsum.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/lorem.txt b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/lorem.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/one/a b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/one/a old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/one/b/c.neon b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/one/b/c.neon old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/one/b/d.neon b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/one/b/d.neon old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/with space/foo.txt b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Fixtures/with space/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/CustomFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php old mode 100755 new mode 100644 index 18896d5..008f966 --- a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php +++ b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php @@ -57,12 +57,8 @@ class DateRangeFilterIteratorTest extends RealIteratorTestCase ); $untilLastMonth = array( - '.git', - 'foo', 'foo/bar.tmp', 'test.php', - 'toto', - '.foo', ); return array( diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/DepthRangeFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilePathsIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FileTypeFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilenameFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/FilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/Iterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/Iterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/IteratorTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MockSplFileInfo.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RealIteratorTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SizeRangeFilterIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php b/vendor/symfony/finder/Symfony/Component/Finder/Tests/Iterator/SortableIteratorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/finder/Symfony/Component/Finder/composer.json b/vendor/symfony/finder/Symfony/Component/Finder/composer.json old mode 100755 new mode 100644 index 7de4713..b6e6997 --- a/vendor/symfony/finder/Symfony/Component/Finder/composer.json +++ b/vendor/symfony/finder/Symfony/Component/Finder/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/finder/Symfony/Component/Finder/phpunit.xml.dist b/vendor/symfony/finder/Symfony/Component/Finder/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitignore b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeader.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/AcceptHeaderItem.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md old mode 100755 new mode 100644 index 061d47e..0da734b --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +2.5.0 +----- + + * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation + of the options used while encoding data to JSON format. + 2.4.0 ----- diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Cookie.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Cookie.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ExpressionRequestMatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UploadException.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UploadException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/File.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesser.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php old mode 100755 new mode 100644 index 0bba18f..31f349c --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php @@ -291,7 +291,7 @@ class UploadedFile extends File public function getErrorMessage() { static $errors = array( - UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d kb).', + UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', UPLOAD_ERR_NO_FILE => 'No file was uploaded.', diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/FileBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/HeaderBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/IpUtils.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/IpUtils.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php old mode 100755 new mode 100644 index 22e6d2a..2e40d40 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/JsonResponse.php @@ -26,6 +26,7 @@ class JsonResponse extends Response { protected $data; protected $callback; + protected $encodingOptions; /** * Constructor. @@ -41,6 +42,10 @@ class JsonResponse extends Response if (null === $data) { $data = new \ArrayObject(); } + + // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. + $this->encodingOptions = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT; + $this->setData($data); } @@ -80,7 +85,7 @@ class JsonResponse extends Response } /** - * Sets the data to be sent as json. + * Sets the data to be sent as JSON. * * @param mixed $data * @@ -90,8 +95,7 @@ class JsonResponse extends Response */ public function setData($data = array()) { - // Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML. - $this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT); + $this->data = @json_encode($data, $this->encodingOptions); if (JSON_ERROR_NONE !== json_last_error()) { throw new \InvalidArgumentException($this->transformJsonError()); @@ -101,7 +105,31 @@ class JsonResponse extends Response } /** - * Updates the content and headers according to the json data and callback. + * Returns options used while encoding data to JSON. + * + * @return int + */ + public function getEncodingOptions() + { + return $this->encodingOptions; + } + + /** + * Sets options used while encoding data to JSON. + * + * @param int $encodingOptions + * + * @return JsonResponse + */ + public function setEncodingOptions($encodingOptions) + { + $this->encodingOptions = (int) $encodingOptions; + + return $this->setData(json_decode($this->data)); + } + + /** + * Updates the content and headers according to the JSON data and callback. * * @return JsonResponse */ diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/LICENSE b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ParameterBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ParameterBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RedirectResponse.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestStack.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestStack.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php old mode 100755 new mode 100644 index eeec855..95e432b --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php @@ -376,24 +376,7 @@ class Response if (function_exists('fastcgi_finish_request')) { fastcgi_finish_request(); } elseif ('cli' !== PHP_SAPI) { - // ob_get_level() never returns 0 on some Windows configurations, so if - // the level is the same two times in a row, the loop should be stopped. - $previous = null; - $obStatus = ob_get_status(1); - while (($level = ob_get_level()) > 0 && $level !== $previous) { - $previous = $level; - if ($obStatus[$level - 1]) { - if (version_compare(PHP_VERSION, '5.4', '>=')) { - if (isset($obStatus[$level - 1]['flags']) && ($obStatus[$level - 1]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE)) { - ob_end_flush(); - } - } else { - if (isset($obStatus[$level - 1]['del']) && $obStatus[$level - 1]['del']) { - ob_end_flush(); - } - } - } - } + static::closeOutputBuffers(0, true); flush(); } @@ -1243,7 +1226,36 @@ class Response } /** - * Check if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9 + * Cleans or flushes output buffers up to target level. + * + * Resulting level can be greater than target level if a non-removable buffer has been encountered. + * + * @param int $targetLevel The target output buffering level + * @param bool $flush Whether to flush or clean the buffers + */ + public static function closeOutputBuffers($targetLevel, $flush) + { + $status = ob_get_status(true); + $level = count($status); + + while ($level-- > $targetLevel + && (!empty($status[$level]['del']) + || (isset($status[$level]['flags']) + && ($status[$level]['flags'] & PHP_OUTPUT_HANDLER_REMOVABLE) + && ($status[$level]['flags'] & ($flush ? PHP_OUTPUT_HANDLER_FLUSHABLE : PHP_OUTPUT_HANDLER_CLEANABLE)) + ) + ) + ) { + if ($flush) { + ob_end_flush(); + } else { + ob_end_clean(); + } + } + } + + /** + * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9 * * @link http://support.microsoft.com/kb/323308 */ diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ResponseHeaderBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ServerBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ServerBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/AutoExpireFlashBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Flash/FlashBagInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Session.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/WriteCheckSessionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MetadataBag.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/PhpBridgeSessionStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/SessionStorageInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/StreamedResponse.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/StreamedResponse.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderItemTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/AcceptHeaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ApacheRequestTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/CookieTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ExpressionRequestMatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FileTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/.empty b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/.empty old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/MimeType/MimeTypeTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/FileBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php old mode 100755 new mode 100644 index ef392ca..c7ea726 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php @@ -166,6 +166,25 @@ class JsonResponseTest extends \PHPUnit_Framework_TestCase $this->assertEquals('"\u003C\u003E\u0027\u0026\u0022"', $response->getContent()); } + public function testGetEncodingOptions() + { + $response = new JsonResponse(); + + $this->assertEquals(JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT, $response->getEncodingOptions()); + } + + public function testSetEncodingOptions() + { + $response = new JsonResponse(); + $response->setData(array(array(1, 2, 3))); + + $this->assertEquals('[[1,2,3]]', $response->getContent()); + + $response->setEncodingOptions(JSON_FORCE_OBJECT); + + $this->assertEquals('{"0":{"0":1,"1":2,"2":3}}', $response->getContent()); + } + /** * @expectedException \InvalidArgumentException */ diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RedirectResponseTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestMatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestStackTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestStackTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ServerBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/SessionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MetadataBagTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockArraySessionStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/StreamedResponseTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json old mode 100755 new mode 100644 index 81d3e4a..db57eb5 --- a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json +++ b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/phpunit.xml.dist b/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitignore b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/Bundle.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/Bundle.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/BundleInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/BundleInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md old mode 100755 new mode 100644 index 66219ae..2b2e827 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +2.5.0 +----- + + * deprecated `Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass`, use `Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass` instead + 2.4.0 ----- diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Config/FileLocator.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Config/FileLocator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerReference.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerReference.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolver.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/ControllerResolverInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/EventDataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/ExceptionDataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php old mode 100755 new mode 100644 index ba2ea44..48cde66 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php @@ -11,8 +11,8 @@ namespace Symfony\Component\HttpKernel\DataCollector; +use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Debug\ErrorHandler; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; @@ -46,11 +46,8 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte public function lateCollect() { if (null !== $this->logger) { - $this->data = array( - 'error_count' => $this->logger->countErrors(), - 'logs' => $this->sanitizeLogs($this->logger->getLogs()), - 'deprecation_count' => $this->computeDeprecationCount() - ); + $this->data = $this->computeErrorsCount(); + $this->data['logs'] = $this->sanitizeLogs($this->logger->getLogs()); } } @@ -76,11 +73,21 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return isset($this->data['logs']) ? $this->data['logs'] : array(); } + public function getPriorities() + { + return isset($this->data['priorities']) ? $this->data['priorities'] : array(); + } + public function countDeprecations() { return isset($this->data['deprecation_count']) ? $this->data['deprecation_count'] : 0; } + public function countScreams() + { + return isset($this->data['scream_count']) ? $this->data['scream_count'] : 0; + } + /** * {@inheritdoc} */ @@ -119,15 +126,36 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte return $context; } - private function computeDeprecationCount() + private function computeErrorsCount() { - $count = 0; + $count = array( + 'error_count' => $this->logger->countErrors(), + 'deprecation_count' => 0, + 'scream_count' => 0, + 'priorities' => array(), + ); + foreach ($this->logger->getLogs() as $log) { - if (isset($log['context']['type']) && ErrorHandler::TYPE_DEPRECATION === $log['context']['type']) { - $count++; + if (isset($count['priorities'][$log['priority']])) { + ++$count['priorities'][$log['priority']]['count']; + } else { + $count['priorities'][$log['priority']] = array( + 'count' => 1, + 'name' => $log['priorityName'], + ); + } + + if (isset($log['context']['type'])) { + if (ErrorHandler::TYPE_DEPRECATION === $log['context']['type']) { + ++$count['deprecation_count']; + } elseif (isset($log['context']['scream'])) { + ++$count['scream_count']; + } } } + ksort($count['priorities']); + return $count; } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/MemoryDataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php old mode 100755 new mode 100644 index 9371748..9c19f06 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php @@ -48,14 +48,17 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter $responseHeaders['Set-Cookie'] = $cookies; } + // attributes are serialized and as they can be anything, they need to be converted to strings. $attributes = array(); foreach ($request->attributes->all() as $key => $value) { if ('_route' === $key && is_object($value)) { - $attributes['_route'] = $this->varToString($value->getPath()); + $attributes[$key] = $this->varToString($value->getPath()); } elseif ('_route_params' === $key) { - foreach ($value as $key => $v) { - $attributes['_route_params'][$key] = $this->varToString($v); + // we need to keep route params as an array (see getRouteParams()) + foreach ($value as $k => $v) { + $value[$k] = $this->varToString($v); } + $attributes[$key] = $value; } else { $attributes[$key] = $this->varToString($value); } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/RouterDataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php old mode 100755 new mode 100644 index ceafa68..31b60e6 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php @@ -19,23 +19,38 @@ class ValueExporter /** * Converts a PHP value to a string. * - * @param mixed $value The PHP value + * @param mixed $value The PHP value + * @param int $depth only for internal usage + * @param bool $deep only for internal usage * * @return string The string representation of the given value */ - public function exportValue($value) + public function exportValue($value, $depth = 1, $deep = false) { if (is_object($value)) { return sprintf('Object(%s)', get_class($value)); } if (is_array($value)) { + if (empty($value)) { + return '[]'; + } + + $indent = str_repeat(' ', $depth); + $a = array(); foreach ($value as $k => $v) { - $a[] = sprintf('%s => %s', $k, $this->exportValue($v)); + if (is_array($v)) { + $deep = true; + } + $a[] = sprintf('%s => %s', $k, $this->exportValue($v, $depth + 1, $deep)); + } + + if ($deep) { + return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1)); } - return sprintf("Array(%s)", implode(', ', $a)); + return sprintf("[%s]", implode(', ', $a)); } if (is_resource($value)) { diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php old mode 100755 new mode 100644 index 4e5a0c1..ed2417b --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -11,14 +11,10 @@ namespace Symfony\Component\HttpKernel\Debug; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher; use Symfony\Component\HttpKernel\Profiler\Profiler; -use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; /** * Collects some data about event listeners. @@ -27,30 +23,8 @@ use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; * * @author Fabien Potencier */ -class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEventDispatcherInterface +class TraceableEventDispatcher extends BaseTraceableEventDispatcher { - private $logger; - private $called = array(); - private $stopwatch; - private $dispatcher; - private $wrappedListeners = array(); - private $firstCalledEvent = array(); - private $lastEventId = 0; - - /** - * Constructor. - * - * @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance - * @param Stopwatch $stopwatch A Stopwatch instance - * @param LoggerInterface $logger A LoggerInterface instance - */ - public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, LoggerInterface $logger = null) - { - $this->dispatcher = $dispatcher; - $this->stopwatch = $stopwatch; - $this->logger = $logger; - } - /** * Sets the profiler. * @@ -69,262 +43,8 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve /** * {@inheritdoc} */ - public function addListener($eventName, $listener, $priority = 0) - { - $this->dispatcher->addListener($eventName, $listener, $priority); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->dispatcher->addSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function removeListener($eventName, $listener) - { - return $this->dispatcher->removeListener($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->removeSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function getListeners($eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function hasListeners($eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function dispatch($eventName, Event $event = null) - { - if (null === $event) { - $event = new Event(); - } - - $eventId = ++$this->lastEventId; - - $this->preDispatch($eventName, $eventId, $event); - - $e = $this->stopwatch->start($eventName, 'section'); - - $this->firstCalledEvent[$eventName] = $this->stopwatch->start($eventName.'.loading', 'event_listener_loading'); - - if (!$this->dispatcher->hasListeners($eventName)) { - $this->firstCalledEvent[$eventName]->stop(); - } - - $this->dispatcher->dispatch($eventName, $event); - - unset($this->firstCalledEvent[$eventName]); - - if ($e->isStarted()) { - $e->stop(); - } - - $this->postDispatch($eventName, $eventId, $event); - - return $event; - } - - /** - * {@inheritdoc} - */ - public function getCalledListeners() - { - return $this->called; - } - - /** - * {@inheritdoc} - */ - public function getNotCalledListeners() - { - $notCalled = array(); - - foreach ($this->getListeners() as $name => $listeners) { - foreach ($listeners as $listener) { - $info = $this->getListenerInfo($listener, null, $name); - if (!isset($this->called[$name.'.'.$info['pretty']])) { - $notCalled[$name.'.'.$info['pretty']] = $info; - } - } - } - - return $notCalled; - } - - /** - * Proxies all method calls to the original event dispatcher. - * - * @param string $method The method name - * @param array $arguments The method arguments - * - * @return mixed - */ - public function __call($method, $arguments) - { - return call_user_func_array(array($this->dispatcher, $method), $arguments); - } - - /** - * This is a private method and must not be used. - * - * This method is public because it is used in a closure. - * Whenever Symfony will require PHP 5.4, this could be changed - * to a proper private method. - */ - public function logSkippedListeners($eventName, $eventId, Event $event, $listener) - { - if (null === $this->logger) { - return; - } - - $info = $this->getListenerInfo($listener, $eventId, $eventName); - - $this->logger->debug(sprintf('Listener "%s" stopped propagation of the event "%s".', $info['pretty'], $eventName)); - - $skippedListeners = $this->getListeners($eventName); - $skipped = false; - - foreach ($skippedListeners as $skippedListener) { - $skippedListener = $this->unwrapListener($skippedListener, $eventId); - - if ($skipped) { - $info = $this->getListenerInfo($skippedListener, $eventId, $eventName); - $this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $info['pretty'], $eventName)); - } - - if ($skippedListener === $listener) { - $skipped = true; - } - } - } - - /** - * This is a private method. - * - * This method is public because it is used in a closure. - * Whenever Symfony will require PHP 5.4, this could be changed - * to a proper private method. - */ - public function preListenerCall($eventName, $eventId, $listener) - { - // is it the first called listener? - if (isset($this->firstCalledEvent[$eventName])) { - $this->firstCalledEvent[$eventName]->stop(); - - unset($this->firstCalledEvent[$eventName]); - } - - $info = $this->getListenerInfo($listener, $eventId, $eventName); - - if (null !== $this->logger) { - $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, $info['pretty'])); - } - - $this->called[$eventName.'.'.$info['pretty']] = $info; - - return $this->stopwatch->start(isset($info['class']) ? $info['class'] : $info['type'], 'event_listener'); - } - - /** - * Returns information about the listener - * - * @param object $listener The listener - * @param string $eventName The event name - * - * @return array Information about the listener - */ - private function getListenerInfo($listener, $eventId, $eventName) - { - $listener = $this->unwrapListener($listener, $eventId); - - $info = array( - 'event' => $eventName, - ); - if ($listener instanceof \Closure) { - $info += array( - 'type' => 'Closure', - 'pretty' => 'closure' - ); - } elseif (is_string($listener)) { - try { - $r = new \ReflectionFunction($listener); - $file = $r->getFileName(); - $line = $r->getStartLine(); - } catch (\ReflectionException $e) { - $file = null; - $line = null; - } - $info += array( - 'type' => 'Function', - 'function' => $listener, - 'file' => $file, - 'line' => $line, - 'pretty' => $listener, - ); - } elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) { - if (!is_array($listener)) { - $listener = array($listener, '__invoke'); - } - $class = is_object($listener[0]) ? get_class($listener[0]) : $listener[0]; - try { - $r = new \ReflectionMethod($class, $listener[1]); - $file = $r->getFileName(); - $line = $r->getStartLine(); - } catch (\ReflectionException $e) { - $file = null; - $line = null; - } - $info += array( - 'type' => 'Method', - 'class' => $class, - 'method' => $listener[1], - 'file' => $file, - 'line' => $line, - 'pretty' => $class.'::'.$listener[1], - ); - } - - return $info; - } - - private function preDispatch($eventName, $eventId, Event $event) + protected function preDispatch($eventName, Event $event) { - // wrap all listeners before they are called - $this->wrappedListeners[$eventId] = new \SplObjectStorage(); - - $listeners = $this->dispatcher->getListeners($eventName); - - foreach ($listeners as $listener) { - $this->dispatcher->removeListener($eventName, $listener); - $wrapped = $this->wrapListener($eventName, $eventId, $listener); - $this->wrappedListeners[$eventId][$wrapped] = $listener; - $this->dispatcher->addListener($eventName, $wrapped); - } - switch ($eventName) { case KernelEvents::REQUEST: $this->stopwatch->openSection(); @@ -338,7 +58,7 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve break; case KernelEvents::TERMINATE: $token = $event->getResponse()->headers->get('X-Debug-Token'); - // There is a very special case when using builtin AppCache class as kernel wrapper, in the case + // There is a very special case when using built-in AppCache class as kernel wrapper, in the case // of an ESI request leading to a `stale` response [B] inside a `fresh` cached response [A]. // In this case, `$token` contains the [B] debug token, but the open `stopwatch` section ID // is equal to the [A] debug token. Trying to reopen section with the [B] token throws an exception @@ -350,7 +70,10 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve } } - private function postDispatch($eventName, $eventId, Event $event) + /** + * {@inheritdoc} + */ + protected function postDispatch($eventName, Event $event) { switch ($eventName) { case KernelEvents::CONTROLLER: @@ -369,49 +92,5 @@ class TraceableEventDispatcher implements EventDispatcherInterface, TraceableEve } catch (\LogicException $e) {} break; } - - foreach ($this->wrappedListeners[$eventId] as $wrapped) { - $this->dispatcher->removeListener($eventName, $wrapped); - $this->dispatcher->addListener($eventName, $this->wrappedListeners[$eventId][$wrapped]); - } - - unset($this->wrappedListeners[$eventId]); - } - - private function wrapListener($eventName, $eventId, $listener) - { - $self = $this; - - return function (Event $event) use ($self, $eventName, $eventId, $listener) { - $e = $self->preListenerCall($eventName, $eventId, $listener); - - call_user_func($listener, $event, $eventName, $self); - - if ($e->isStarted()) { - $e->stop(); - } - - if ($event->isPropagationStopped()) { - $self->logSkippedListeners($eventName, $eventId, $event, $listener); - } - }; - } - - private function unwrapListener($listener, $eventId) - { - // get the original listener - if (is_object($listener)) { - if (null === $eventId) { - foreach (array_keys($this->wrappedListeners) as $eventId) { - if (isset($this->wrappedListeners[$eventId][$listener])) { - return $this->wrappedListeners[$eventId][$listener]; - } - } - } elseif (isset($this->wrappedListeners[$eventId][$listener])) { - return $this->wrappedListeners[$eventId][$listener]; - } - } - - return $listener; } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ConfigurableExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php old mode 100755 new mode 100644 index e48c409..0e14e91 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php @@ -11,96 +11,13 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass; /** * Compiler pass to register tagged services for an event dispatcher. + * + * @deprecated Deprecated in 2.5, to be removed in 3.0. Use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass instead. */ -class RegisterListenersPass implements CompilerPassInterface +class RegisterListenersPass extends BaseRegisterListenersPass { - /** - * @var string - */ - protected $dispatcherService; - - /** - * @var string - */ - protected $listenerTag; - - /** - * @var string - */ - protected $subscriberTag; - - /** - * Constructor. - * - * @param string $dispatcherService Service name of the event dispatcher in processed container - * @param string $listenerTag Tag name used for listener - * @param string $subscriberTag Tag name used for subscribers - */ - public function __construct($dispatcherService = 'event_dispatcher', $listenerTag = 'kernel.event_listener', $subscriberTag = 'kernel.event_subscriber') - { - $this->dispatcherService = $dispatcherService; - $this->listenerTag = $listenerTag; - $this->subscriberTag = $subscriberTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) { - return; - } - - $definition = $container->findDefinition($this->dispatcherService); - - foreach ($container->findTaggedServiceIds($this->listenerTag) as $id => $events) { - $def = $container->getDefinition($id); - if (!$def->isPublic()) { - throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event listeners are lazy-loaded.', $id)); - } - - if ($def->isAbstract()) { - throw new \InvalidArgumentException(sprintf('The service "%s" must not be abstract as event listeners are lazy-loaded.', $id)); - } - - foreach ($events as $event) { - $priority = isset($event['priority']) ? $event['priority'] : 0; - - if (!isset($event['event'])) { - throw new \InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); - } - - if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback(array( - '/(?<=\b)[a-z]/i', - '/[^a-z0-9]/i', - ), function ($matches) { return strtoupper($matches[0]); }, $event['event']); - $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); - } - - $definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority)); - } - } - - foreach ($container->findTaggedServiceIds($this->subscriberTag) as $id => $attributes) { - $def = $container->getDefinition($id); - if (!$def->isPublic()) { - throw new \InvalidArgumentException(sprintf('The service "%s" must be public as event subscribers are lazy-loaded.', $id)); - } - - // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); - - $refClass = new \ReflectionClass($class); - $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface'; - if (!$refClass->implementsInterface($interface)) { - throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface)); - } - - $definition->addMethodCall('addSubscriberService', array($id, $class)); - } - } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterControllerEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FilterResponseEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/GetResponseForExceptionEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/KernelEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/PostResponseEvent.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/PostResponseEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php new file mode 100644 index 0000000..c37a537 --- /dev/null +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\KernelEvents; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; + +/** + * Adds configured formats to each request + * + * @author Gildas Quemener + */ +class AddRequestFormatsListener implements EventSubscriberInterface +{ + /** + * @var array + */ + protected $formats; + + /** + * @param array $formats + */ + public function __construct(array $formats) + { + $this->formats = $formats; + } + + /** + * Adds request formats + * + * @param GetResponseEvent $event + */ + public function onKernelRequest(GetResponseEvent $event) + { + foreach ($this->formats as $format => $mimeTypes) { + $event->getRequest()->setFormat($format, $mimeTypes); + } + } + + /** + * {@inheritdoc} + */ + public static function getSubscribedEvents() + { + return array(KernelEvents::REQUEST => 'onKernelRequest'); + } +} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php new file mode 100644 index 0000000..f46ef71 --- /dev/null +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/DebugHandlersListener.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\EventListener; + +use Symfony\Component\Debug\ExceptionHandler; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Configures the ExceptionHandler. + * + * @author Nicolas Grekas + */ +class DebugHandlersListener implements EventSubscriberInterface +{ + private $exceptionHandler; + + public function __construct($exceptionHandler) + { + if (is_callable($exceptionHandler)) { + $this->exceptionHandler = $exceptionHandler; + } + } + + public function configure() + { + if ($this->exceptionHandler) { + $mainHandler = set_exception_handler('var_dump'); + restore_exception_handler(); + if ($mainHandler instanceof ExceptionHandler) { + $mainHandler->setHandler($this->exceptionHandler); + } + $this->exceptionHandler = null; + } + } + + public static function getSubscribedEvents() + { + return array(KernelEvents::REQUEST => array('configure', 2048)); + } +} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php old mode 100755 new mode 100644 index 13940ab..025b647 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php @@ -12,7 +12,7 @@ namespace Symfony\Component\HttpKernel\EventListener; use Psr\Log\LoggerInterface; -use Symfony\Component\HttpKernel\Debug\ErrorHandler; +use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\KernelEvents; @@ -38,11 +38,12 @@ class ErrorsLoggerListener implements EventSubscriberInterface { if (null !== $this->logger) { ErrorHandler::setLogger($this->logger, $this->channel); + $this->logger = null; } } public static function getSubscribedEvents() { - return array(KernelEvents::REQUEST => 'injectLogger'); + return array(KernelEvents::REQUEST => array('injectLogger', 2048)); } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/EsiListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/FragmentListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/FragmentListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/LocaleListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ResponseListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/ResponseListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/SessionListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/SessionListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/StreamedResponseListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FatalErrorException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FatalErrorException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php new file mode 100644 index 0000000..c51da53 --- /dev/null +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Exception; + +/** + * UnprocessableEntityHttpException. + * + * @author Steve Hutchins + */ +class UnprocessableEntityHttpException extends HttpException +{ + /** + * Constructor. + * + * @param string $message The internal exception message + * @param \Exception $previous The previous exception + * @param int $code The internal exception code + */ + public function __construct($message = null, \Exception $previous = null, $code = 0) + { + parent::__construct(422, $message, $previous, array(), $code); + } +} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/EsiFragmentRenderer.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/FragmentRendererInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php old mode 100755 new mode 100644 index c6ca3d4..a6ab82e --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/InlineFragmentRenderer.php @@ -93,9 +93,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer } // let's clean up the output buffers that were created by the sub-request - while (ob_get_level() > $level) { - ob_get_clean(); - } + Response::closeOutputBuffers($level, false); if (isset($options['alt'])) { $alt = $options['alt']; diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Fragment/RoutableFragmentRenderer.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Esi.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php old mode 100755 new mode 100644 index 7931f01..84a10f7 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -522,7 +522,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface protected function lock(Request $request, Response $entry) { // try to acquire a lock to call the backend - $lock = $this->store->lock($request, $entry); + $lock = $this->store->lock($request); // there is already another process calling the backend if (true !== $lock) { diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/Store.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/StoreInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php old mode 100755 new mode 100644 index fda4075..68d89c9 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php @@ -86,6 +86,25 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } /** + * @throws \LogicException If the request stack is empty + * + * @internal + */ + public function terminateWithException(\Exception $exception) + { + if (!$request = $this->requestStack->getMasterRequest()) { + throw new \LogicException('Request stack is empty', 0, $exception); + } + + $response = $this->handleException($exception, $request, self::MASTER_REQUEST); + + $response->sendHeaders(); + $response->sendContent(); + + $this->terminate($request, $response); + } + + /** * Handles a request to convert it to a response. * * Exceptions are not caught. diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernelInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php old mode 100755 new mode 100644 index b2de8e2..24fc68f --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php @@ -59,11 +59,11 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.4.6'; - const VERSION_ID = '20406'; + const VERSION = '2.5.0'; + const VERSION_ID = '20500'; const MAJOR_VERSION = '2'; - const MINOR_VERSION = '4'; - const RELEASE_VERSION = '6'; + const MINOR_VERSION = '5'; + const RELEASE_VERSION = '0'; const EXTRA_VERSION = ''; /** diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelEvents.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelEvents.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/KernelInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/LICENSE b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/LoggerInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/LoggerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/NullLogger.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/NullLogger.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MemcacheProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MemcachedProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profile.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/Profiler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/ProfilerStorageInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/README.md b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php old mode 100755 new mode 100644 index a451b7a..f31d245 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php @@ -11,10 +11,8 @@ namespace Symfony\Component\HttpKernel\Tests\Bundle; -use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand; use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle; @@ -38,10 +36,11 @@ class BundleTest extends \PHPUnit_Framework_TestCase public function testRegisterCommandsIngoreCommandAsAService() { $container = new ContainerBuilder(); - $container->addCompilerPass(new AddConsoleCommandPass()); - $definition = new Definition('Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'); + $commandClass = 'Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand'; + $definition = new Definition($commandClass); $definition->addTag('console.command'); $container->setDefinition('my-command', $definition); + $container->setAlias('console.command.'.strtolower(str_replace('\\', '_', $commandClass)), 'my-command'); $container->compile(); $application = $this->getMock('Symfony\Component\Console\Application'); diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/ClientTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/ClientTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Config/FileLocatorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Config/FileLocatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Controller/ControllerResolverTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php old mode 100755 new mode 100644 index 7cd4d06..cdb06af --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/LoggerDataCollectorTest.php @@ -19,7 +19,7 @@ class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase /** * @dataProvider getCollectTestData */ - public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount) + public function testCollect($nb, $logs, $expectedLogs, $expectedDeprecationCount, $expectedScreamCount, $expectedPriorities = null) { $logger = $this->getMock('Symfony\Component\HttpKernel\Log\DebugLoggerInterface'); $logger->expects($this->once())->method('countErrors')->will($this->returnValue($nb)); @@ -32,6 +32,11 @@ class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase $this->assertSame($nb, $c->countErrors()); $this->assertSame($expectedLogs ? $expectedLogs : $logs, $c->getLogs()); $this->assertSame($expectedDeprecationCount, $c->countDeprecations()); + $this->assertSame($expectedScreamCount, $c->countScreams()); + + if (isset($expectedPriorities)) { + $this->assertSame($expectedPriorities, $c->getPriorities()); + } } public function getCollectTestData() @@ -39,30 +44,36 @@ class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase return array( array( 1, - array(array('message' => 'foo', 'context' => array())), + array(array('message' => 'foo', 'context' => array(), 'priority' => 100, 'priorityName' => 'DEBUG')), null, - 0 + 0, + 0, ), array( 1, - array(array('message' => 'foo', 'context' => array('foo' => fopen(__FILE__, 'r')))), - array(array('message' => 'foo', 'context' => array('foo' => 'Resource(stream)'))), - 0 + array(array('message' => 'foo', 'context' => array('foo' => fopen(__FILE__, 'r')), 'priority' => 100, 'priorityName' => 'DEBUG')), + array(array('message' => 'foo', 'context' => array('foo' => 'Resource(stream)'), 'priority' => 100, 'priorityName' => 'DEBUG')), + 0, + 0, ), array( 1, - array(array('message' => 'foo', 'context' => array('foo' => new \stdClass()))), - array(array('message' => 'foo', 'context' => array('foo' => 'Object(stdClass)'))), - 0 + array(array('message' => 'foo', 'context' => array('foo' => new \stdClass()), 'priority' => 100, 'priorityName' => 'DEBUG')), + array(array('message' => 'foo', 'context' => array('foo' => 'Object(stdClass)'), 'priority' => 100, 'priorityName' => 'DEBUG')), + 0, + 0, ), array( 1, array( - array('message' => 'foo', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION)), - array('message' => 'foo2', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION)) + array('message' => 'foo', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION), 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo2', 'context' => array('type' => ErrorHandler::TYPE_DEPRECATION), 'priority' => 100, 'priorityName' => 'DEBUG'), + array('message' => 'foo3', 'context' => array('type' => E_USER_WARNING, 'scream' => 0), 'priority' => 100, 'priorityName' => 'DEBUG'), ), null, - 2 + 2, + 1, + array(100 => array('count' => 3, 'name' => 'DEBUG')), ), ); } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/MemoryDataCollectorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php old mode 100755 new mode 100644 index bb80781..f542774 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -22,20 +22,19 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase { - /** - * @dataProvider provider - */ - public function testCollect(Request $request, Response $response) + public function testCollect() { $c = new RequestDataCollector(); - $c->collect($request, $response); + $c->collect($this->createRequest(), $this->createResponse()); + + $attributes = $c->getRequestAttributes(); $this->assertSame('request', $c->getName()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getRequestHeaders()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestServer()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestCookies()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestAttributes()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $attributes); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestRequest()); $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestQuery()); $this->assertSame('html', $c->getFormat()); @@ -43,6 +42,8 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase $this->assertSame(array('name' => 'foo'), $c->getRouteParams()); $this->assertSame(array(), $c->getSessionAttributes()); $this->assertSame('en', $c->getLocale()); + $this->assertRegExp('/Resource\(stream#\d+\)/', $attributes->get('resource')); + $this->assertSame('Object(stdClass)', $attributes->get('object')); $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getResponseHeaders()); $this->assertSame('OK', $c->getStatusText()); @@ -52,10 +53,8 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase /** * Test various types of controller callables. - * - * @dataProvider provider */ - public function testControllerInspection(Request $request, Response $response) + public function testControllerInspection() { // make sure we always match the line number $r1 = new \ReflectionMethod($this, 'testControllerInspection'); @@ -136,7 +135,8 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase ); $c = new RequestDataCollector(); - + $request = $this->createRequest(); + $response = $this->createResponse(); foreach ($controllerTests as $controllerTest) { $this->injectController($c, $controllerTest[1], $request); $c->collect($request, $response); @@ -144,17 +144,20 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase } } - public function provider() + protected function createRequest() { - if (!class_exists('Symfony\Component\HttpFoundation\Request')) { - return array(array(null, null)); - } - $request = Request::create('http://test.com/foo?bar=baz'); $request->attributes->set('foo', 'bar'); $request->attributes->set('_route', 'foobar'); $request->attributes->set('_route_params', array('name' => 'foo')); + $request->attributes->set('resource', fopen(__FILE__, 'r')); + $request->attributes->set('object', new \stdClass()); + + return $request; + } + protected function createResponse() + { $response = new Response(); $response->setStatusCode(200); $response->headers->set('Content-Type', 'application/json'); @@ -162,9 +165,7 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase $response->headers->setCookie(new Cookie('bar','foo',new \DateTime('@946684800'))); $response->headers->setCookie(new Cookie('bazz','foo','2000-12-12')); - return array( - array($request, $response) - ); + return $response; } /** diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/TimeDataCollectorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php old mode 100755 new mode 100644 index d30837d..399f1a7 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php @@ -12,8 +12,6 @@ namespace Symfony\Component\HttpKernel\Tests\Debug; use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher; use Symfony\Component\HttpKernel\HttpKernel; use Symfony\Component\HttpFoundation\Request; @@ -22,148 +20,6 @@ use Symfony\Component\Stopwatch\Stopwatch; class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase { - public function testAddRemoveListener() - { - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - - $tdispatcher->addListener('foo', $listener = function () { ; }); - $listeners = $dispatcher->getListeners('foo'); - $this->assertCount(1, $listeners); - $this->assertSame($listener, $listeners[0]); - - $tdispatcher->removeListener('foo', $listener); - $this->assertCount(0, $dispatcher->getListeners('foo')); - } - - public function testGetListeners() - { - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - - $tdispatcher->addListener('foo', $listener = function () { ; }); - $this->assertSame($dispatcher->getListeners('foo'), $tdispatcher->getListeners('foo')); - } - - public function testHasListeners() - { - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - - $this->assertFalse($dispatcher->hasListeners('foo')); - $this->assertFalse($tdispatcher->hasListeners('foo')); - - $tdispatcher->addListener('foo', $listener = function () { ; }); - $this->assertTrue($dispatcher->hasListeners('foo')); - $this->assertTrue($tdispatcher->hasListeners('foo')); - } - - public function testAddRemoveSubscriber() - { - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - - $subscriber = new EventSubscriber(); - - $tdispatcher->addSubscriber($subscriber); - $listeners = $dispatcher->getListeners('foo'); - $this->assertCount(1, $listeners); - $this->assertSame(array($subscriber, 'call'), $listeners[0]); - - $tdispatcher->removeSubscriber($subscriber); - $this->assertCount(0, $dispatcher->getListeners('foo')); - } - - public function testGetCalledListeners() - { - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () { ; }); - - $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getNotCalledListeners()); - - $tdispatcher->dispatch('foo'); - - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getCalledListeners()); - $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); - } - - public function testLogger() - { - $logger = $this->getMock('Psr\Log\LoggerInterface'); - - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); - $tdispatcher->addListener('foo', $listener1 = function () { ; }); - $tdispatcher->addListener('foo', $listener2 = function () { ; }); - - $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); - $logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); - - $tdispatcher->dispatch('foo'); - } - - public function testLoggerWithStoppedEvent() - { - $logger = $this->getMock('Psr\Log\LoggerInterface'); - - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); - $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); - $tdispatcher->addListener('foo', $listener2 = function () { ; }); - - $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); - $logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\"."); - $logger->expects($this->at(2))->method('debug')->with("Listener \"closure\" was not called for event \"foo\"."); - - $tdispatcher->dispatch('foo'); - } - - public function testDispatchCallListeners() - { - $called = array(); - - $dispatcher = new EventDispatcher(); - $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener1 = function () use (&$called) { $called[] = 'foo1'; }); - $tdispatcher->addListener('foo', $listener2 = function () use (&$called) { $called[] = 'foo2'; }); - - $tdispatcher->dispatch('foo'); - - $this->assertEquals(array('foo1', 'foo2'), $called); - } - - public function testDispatchNested() - { - $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); - $loop = 1; - $dispatcher->addListener('foo', $listener1 = function () use ($dispatcher, &$loop) { - ++$loop; - if (2 == $loop) { - $dispatcher->dispatch('foo'); - } - }); - - $dispatcher->dispatch('foo'); - } - - public function testDispatchReusedEventNested() - { - $nestedCall = false; - $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); - $dispatcher->addListener('foo', function (Event $e) use ($dispatcher) { - $dispatcher->dispatch('bar', $e); - }); - $dispatcher->addListener('bar', function (Event $e) use (&$nestedCall) { - $nestedCall = true; - }); - - $this->assertFalse($nestedCall); - $dispatcher->dispatch('foo'); - $this->assertTrue($nestedCall); - } - public function testStopwatchSections() { $dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch = new Stopwatch()); @@ -176,14 +32,10 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array( '__section__', 'kernel.request', - 'kernel.request.loading', 'kernel.controller', - 'kernel.controller.loading', 'controller', 'kernel.response', - 'kernel.response.loading', 'kernel.terminate', - 'kernel.terminate.loading', ), array_keys($events)); } @@ -232,11 +84,3 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase return new HttpKernel($dispatcher, $resolver); } } - -class EventSubscriber implements EventSubscriberInterface -{ - public static function getSubscribedEvents() - { - return array('foo' => 'call'); - } -} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php deleted file mode 100755 index b82053e..0000000 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DependencyInjection/RegisterListenersPassTest.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpKernel\Tests\DependencyInjection; - -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass; - -class RegisterListenersPassTest extends \PHPUnit_Framework_TestCase -{ - /** - * Tests that event subscribers not implementing EventSubscriberInterface - * trigger an exception. - * - * @expectedException \InvalidArgumentException - */ - public function testEventSubscriberWithoutInterface() - { - // one service, not implementing any interface - $services = array( - 'my_event_subscriber' => array(0 => array()), - ); - - $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); - $definition->expects($this->atLeastOnce()) - ->method('isPublic') - ->will($this->returnValue(true)); - $definition->expects($this->atLeastOnce()) - ->method('getClass') - ->will($this->returnValue('stdClass')); - - $builder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); - $builder->expects($this->any()) - ->method('hasDefinition') - ->will($this->returnValue(true)); - - // We don't test kernel.event_listener here - $builder->expects($this->atLeastOnce()) - ->method('findTaggedServiceIds') - ->will($this->onConsecutiveCalls(array(), $services)); - - $builder->expects($this->atLeastOnce()) - ->method('getDefinition') - ->will($this->returnValue($definition)); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->process($builder); - } - - public function testValidEventSubscriber() - { - $services = array( - 'my_event_subscriber' => array(0 => array()), - ); - - $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition'); - $definition->expects($this->atLeastOnce()) - ->method('isPublic') - ->will($this->returnValue(true)); - $definition->expects($this->atLeastOnce()) - ->method('getClass') - ->will($this->returnValue('Symfony\Component\HttpKernel\Tests\DependencyInjection\SubscriberService')); - - $builder = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder'); - $builder->expects($this->any()) - ->method('hasDefinition') - ->will($this->returnValue(true)); - - // We don't test kernel.event_listener here - $builder->expects($this->atLeastOnce()) - ->method('findTaggedServiceIds') - ->will($this->onConsecutiveCalls(array(), $services)); - - $builder->expects($this->atLeastOnce()) - ->method('getDefinition') - ->will($this->returnValue($definition)); - - $builder->expects($this->atLeastOnce()) - ->method('findDefinition') - ->will($this->returnValue($definition)); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->process($builder); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The service "foo" must be public as event listeners are lazy-loaded. - */ - public function testPrivateEventListener() - { - $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setPublic(false)->addTag('kernel.event_listener', array()); - $container->register('event_dispatcher', 'stdClass'); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->process($container); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The service "foo" must be public as event subscribers are lazy-loaded. - */ - public function testPrivateEventSubscriber() - { - $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setPublic(false)->addTag('kernel.event_subscriber', array()); - $container->register('event_dispatcher', 'stdClass'); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->process($container); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The service "foo" must not be abstract as event listeners are lazy-loaded. - */ - public function testAbstractEventListener() - { - $container = new ContainerBuilder(); - $container->register('foo', 'stdClass')->setAbstract(true)->addTag('kernel.event_listener', array()); - $container->register('event_dispatcher', 'stdClass'); - - $registerListenersPass = new RegisterListenersPass(); - $registerListenersPass->process($container); - } -} - -class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface -{ - public static function getSubscribedEvents() {} -} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php new file mode 100644 index 0000000..26bdf70 --- /dev/null +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php @@ -0,0 +1,83 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\HttpKernel\Tests\EventListener; + +use Symfony\Component\HttpKernel\EventListener\AddRequestFormatsListener; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\KernelEvents; + +/** + * Test AddRequestFormatsListener class + * + * @author Gildas Quemener + */ +class AddRequestFormatsListenerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @var AddRequestFormatsListener + */ + private $listener; + + protected function setUp() + { + $this->listener = new AddRequestFormatsListener(array('csv' => array('text/csv', 'text/plain'))); + } + + protected function tearDown() + { + $this->listener = null; + } + + public function testIsAnEventSubscriber() + { + $this->assertInstanceOf('Symfony\Component\EventDispatcher\EventSubscriberInterface', $this->listener); + } + + public function testRegisteredEvent() + { + $this->assertEquals( + array(KernelEvents::REQUEST => 'onKernelRequest'), + AddRequestFormatsListener::getSubscribedEvents() + ); + } + + public function testSetAdditionalFormats() + { + $request = $this->getRequestMock(); + $event = $this->getGetResponseEventMock($request); + + $request->expects($this->once()) + ->method('setFormat') + ->with('csv', array('text/csv', 'text/plain')); + + $this->listener->onKernelRequest($event); + } + + protected function getRequestMock() + { + return $this->getMock('Symfony\Component\HttpFoundation\Request'); + } + + protected function getGetResponseEventMock(Request $request) + { + $event = $this + ->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent') + ->disableOriginalConstructor() + ->getMock(); + + $event->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + + return $event; + } +} diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/EsiListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/EsiListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/FragmentListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ResponseListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/RouterListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/TestSessionListenerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/hide.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/hide.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/bar.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/bar.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/hide.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/hide.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/hide.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/hide.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/foo.txt b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/foo.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/EsiFragmentRendererTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/HIncludeFragmentRendererTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/InlineFragmentRendererTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fragment/RoutableFragmentRendererTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Logger.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Logger.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MemcacheProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MemcacheProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MemcachedProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MemcachedProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcacheMock.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcacheMock.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcachedMock.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcachedMock.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/RedisProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/RedisProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/UriSignerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/UriSigner.php b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/UriSigner.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json old mode 100755 new mode 100644 index a09b001..dd01364 --- a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json +++ b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.3", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.4", - "symfony/debug": "~2.3", + "symfony/debug": "~2.5", "psr/log": "~1.0" }, "require-dev": { @@ -49,7 +49,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/phpunit.xml.dist b/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/.gitignore b/vendor/symfony/process/Symfony/Component/Process/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md b/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md old mode 100755 new mode 100644 index 3d13b99..2f3c1be --- a/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md +++ b/vendor/symfony/process/Symfony/Component/Process/CHANGELOG.md @@ -1,6 +1,15 @@ CHANGELOG ========= +2.5.0 +----- + + * added support for PTY mode + * added the convenience method "mustRun" + * deprecation: Process::setStdin() is deprecated in favor of Process::setInput() + * deprecation: Process::getStdin() is deprecated in favor of Process::getInput() + * deprecation: Process::setInput() and ProcessBuilder::setInput() do not accept non-scalar types + 2.4.0 ----- diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/ExceptionInterface.php b/vendor/symfony/process/Symfony/Component/Process/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/InvalidArgumentException.php b/vendor/symfony/process/Symfony/Component/Process/Exception/InvalidArgumentException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/LogicException.php b/vendor/symfony/process/Symfony/Component/Process/Exception/LogicException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php b/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php old mode 100755 new mode 100644 index 8909359..7523a5e --- a/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php +++ b/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessFailedException.php @@ -28,16 +28,20 @@ class ProcessFailedException extends RuntimeException throw new InvalidArgumentException('Expected a failed process, but the given process was successful.'); } - parent::__construct( - sprintf( - 'The command "%s" failed.'."\nExit Code: %s(%s)\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", - $process->getCommandLine(), - $process->getExitCode(), - $process->getExitCodeText(), + $error = sprintf('The command "%s" failed.'."\nExit Code: %s(%s)", + $process->getCommandLine(), + $process->getExitCode(), + $process->getExitCodeText() + ); + + if (!$process->isOutputDisabled()) { + $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", $process->getOutput(), $process->getErrorOutput() - ) - ); + ); + } + + parent::__construct($error); $this->process = $process; } diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessTimedOutException.php b/vendor/symfony/process/Symfony/Component/Process/Exception/ProcessTimedOutException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Exception/RuntimeException.php b/vendor/symfony/process/Symfony/Component/Process/Exception/RuntimeException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/ExecutableFinder.php b/vendor/symfony/process/Symfony/Component/Process/ExecutableFinder.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/LICENSE b/vendor/symfony/process/Symfony/Component/Process/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php b/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php old mode 100755 new mode 100644 index 9001f41..cda8699 --- a/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php +++ b/vendor/symfony/process/Symfony/Component/Process/PhpExecutableFinder.php @@ -34,8 +34,8 @@ class PhpExecutableFinder public function find() { // HHVM support - if (defined('HHVM_VERSION') && false !== $hhvm = getenv('PHP_BINARY')) { - return $hhvm; + if (defined('HHVM_VERSION')) { + return (false !== ($hhvm = getenv('PHP_BINARY')) ? $hhvm : PHP_BINARY).' --php'; } // PHP_BINARY return the current sapi executable diff --git a/vendor/symfony/process/Symfony/Component/Process/PhpProcess.php b/vendor/symfony/process/Symfony/Component/Process/PhpProcess.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Process.php b/vendor/symfony/process/Symfony/Component/Process/Process.php old mode 100755 new mode 100644 index 2e7bb49..e5edf59 --- a/vendor/symfony/process/Symfony/Component/Process/Process.php +++ b/vendor/symfony/process/Symfony/Component/Process/Process.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Process; use Symfony\Component\Process\Exception\InvalidArgumentException; use Symfony\Component\Process\Exception\LogicException; +use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Exception\ProcessTimedOutException; use Symfony\Component\Process\Exception\RuntimeException; @@ -44,7 +45,7 @@ class Process private $commandline; private $cwd; private $env; - private $stdin; + private $input; private $starttime; private $lastOutputTime; private $timeout; @@ -53,6 +54,7 @@ class Process private $exitcode; private $fallbackExitcode; private $processInformation; + private $outputDisabled = false; private $stdout; private $stderr; private $enhanceWindowsCompatibility = true; @@ -62,6 +64,7 @@ class Process private $incrementalOutputOffset = 0; private $incrementalErrorOutputOffset = 0; private $tty; + private $pty; private $useFileHandles = false; /** @var ProcessPipes */ @@ -125,7 +128,7 @@ class Process * @param string $commandline The command line to run * @param string|null $cwd The working directory or null to use the working dir of the current PHP process * @param array|null $env The environment variables or null to inherit - * @param string|null $stdin The STDIN content + * @param string|null $input The input * @param int|float|null $timeout The timeout in seconds or null to disable * @param array $options An array of options for proc_open * @@ -133,7 +136,7 @@ class Process * * @api */ - public function __construct($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) { if (!function_exists('proc_open')) { throw new RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); @@ -153,9 +156,11 @@ class Process $this->setEnv($env); } - $this->stdin = $stdin; + $this->input = $input; $this->setTimeout($timeout); $this->useFileHandles = defined('PHP_WINDOWS_VERSION_BUILD'); + $this->pty = false; + $this->enhanceWindowsCompatibility = true; $this->enhanceSigchildCompatibility = !defined('PHP_WINDOWS_VERSION_BUILD') && $this->isSigchildEnabled(); $this->options = array_replace(array('suppress_errors' => true, 'binary_pipes' => true), $options); } @@ -188,6 +193,7 @@ class Process * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process stopped after receiving signal + * @throws LogicException In case a callback is provided and output has been disabled * * @api */ @@ -199,7 +205,26 @@ class Process } /** - * Starts the process and returns after sending the STDIN. + * Runs the process. + * + * This is identical to run() except that an exception is thrown if the process + * exits with a non-zero exit code. + * + * @param callable|null $callback + * + * @return self + */ + public function mustRun($callback = null) + { + if (0 !== $this->run($callback)) { + throw new ProcessFailedException($this); + } + + return $this; + } + + /** + * Starts the process and returns after writing the input to STDIN. * * This method blocks until all STDIN data is sent to the process then it * returns while the process runs in the background. @@ -220,12 +245,16 @@ class Process * * @throws RuntimeException When process can't be launched * @throws RuntimeException When process is already running + * @throws LogicException In case a callback is provided and output has been disabled */ public function start($callback = null) { if ($this->isRunning()) { throw new RuntimeException('Process is already running'); } + if ($this->outputDisabled && null !== $callback) { + throw new LogicException('Output has been disabled, enable it to allow the use of a callback.'); + } $this->resetProcessData(); $this->starttime = $this->lastOutputTime = microtime(true); @@ -259,7 +288,7 @@ class Process return; } - $this->processPipes->write(false, $this->stdin); + $this->processPipes->write(false, $this->input); $this->updateStatus(false); $this->checkTimeout(); } @@ -370,16 +399,70 @@ class Process } /** + * Disables fetching output and error output from the underlying process. + * + * @return Process + * + * @throws RuntimeException In case the process is already running + */ + public function disableOutput() + { + if ($this->isRunning()) { + throw new RuntimeException('Disabling output while the process is running is not possible.'); + } + if (null !== $this->idleTimeout) { + throw new LogicException('Output can not be disabled while an idle timeout is set.'); + } + + $this->outputDisabled = true; + + return $this; + } + + /** + * Enables fetching output and error output from the underlying process. + * + * @return Process + * + * @throws RuntimeException In case the process is already running + */ + public function enableOutput() + { + if ($this->isRunning()) { + throw new RuntimeException('Enabling output while the process is running is not possible.'); + } + + $this->outputDisabled = false; + + return $this; + } + + /** + * Returns true in case the output is disabled, false otherwise. + * + * @return bool + */ + public function isOutputDisabled() + { + return $this->outputDisabled; + } + + /** * Returns the current output of the process (STDOUT). * * @return string The process output * + * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @api */ public function getOutput() { + if ($this->outputDisabled) { + throw new LogicException('Output has been disabled.'); + } + $this->requireProcessIsStarted(__FUNCTION__); $this->readPipes(false, defined('PHP_WINDOWS_VERSION_BUILD') ? !$this->processInformation['running'] : true); @@ -393,6 +476,7 @@ class Process * In comparison with the getOutput method which always return the whole * output, this one returns the new output since the last call. * + * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @return string The process output since the last call @@ -427,12 +511,17 @@ class Process * * @return string The process error output * + * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @api */ public function getErrorOutput() { + if ($this->outputDisabled) { + throw new LogicException('Output has been disabled.'); + } + $this->requireProcessIsStarted(__FUNCTION__); $this->readPipes(false, defined('PHP_WINDOWS_VERSION_BUILD') ? !$this->processInformation['running'] : true); @@ -447,6 +536,7 @@ class Process * whole error output, this one returns the new error output since the last * call. * + * @throws LogicException in case the output has been disabled * @throws LogicException In case the process is not started * * @return string The process error output since the last call @@ -813,6 +903,10 @@ class Process */ public function setIdleTimeout($timeout) { + if (null !== $timeout && $this->outputDisabled) { + throw new LogicException('Idle timeout can not be set while the output is disabled.'); + } + $this->idleTimeout = $this->validateTimeout($timeout); return $this; @@ -849,6 +943,30 @@ class Process } /** + * Sets PTY mode. + * + * @param bool $bool + * + * @return self + */ + public function setPty($bool) + { + $this->pty = (bool) $bool; + + return $this; + } + + /** + * Returns PTY state. + * + * @return bool + */ + public function isPty() + { + return $this->pty; + } + + /** * Gets the working directory. * * @return string|null The current working directory or null on failure @@ -920,29 +1038,63 @@ class Process * Gets the contents of STDIN. * * @return string|null The current contents + * + * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * This method is deprecated in favor of getInput. */ public function getStdin() { - return $this->stdin; + return $this->getInput(); + } + + /** + * Gets the Process input. + * + * @return null|string The Process input + */ + public function getInput() + { + return $this->input; } /** * Sets the contents of STDIN. * + * Deprecation: As of Symfony 2.5, this method only accepts scalar values. + * * @param string|null $stdin The new contents * * @return self The current Process instance * + * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * This method is deprecated in favor of setInput. + * * @throws LogicException In case the process is running * @throws InvalidArgumentException In case the argument is invalid */ public function setStdin($stdin) { + return $this->setInput($stdin); + } + + /** + * Sets the input. + * + * This content will be passed to the underlying process standard input. + * + * @param string|null $input The content + * + * @return self The current Process instance + * + * @throws LogicException In case the process is running + */ + public function setInput($input) + { if ($this->isRunning()) { - throw new LogicException('STDIN can not be set while the process is running.'); + throw new LogicException('Input can not be set while the process is running.'); } - $this->stdin = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $stdin); + $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); return $this; } @@ -1053,14 +1205,41 @@ class Process } /** + * Returns whether PTY is supported on the current operating system. + * + * @return bool + */ + public static function isPtySupported() + { + static $result; + + if (null !== $result) { + return $result; + } + + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + return $result = false; + } + + $proc = @proc_open('echo 1', array(array('pty'), array('pty'), array('pty')), $pipes); + if (is_resource($proc)) { + proc_close($proc); + + return $result = true; + } + + return $result = false; + } + + /** * Creates the descriptors needed by the proc_open. * * @return array */ private function getDescriptors() { - $this->processPipes = new ProcessPipes($this->useFileHandles, $this->tty); - $descriptors = $this->processPipes->getDescriptors(); + $this->processPipes = new ProcessPipes($this->useFileHandles, $this->tty, $this->pty); + $descriptors = $this->processPipes->getDescriptors($this->outputDisabled); if (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { // last exit code is output on the fourth pipe and caught to work around --enable-sigchild diff --git a/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php b/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php old mode 100755 new mode 100644 index c0f1615..40b8d70 --- a/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php +++ b/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php @@ -24,11 +24,12 @@ class ProcessBuilder private $arguments; private $cwd; private $env = array(); - private $stdin; + private $input; private $timeout = 60; private $options = array(); private $inheritEnv = true; private $prefix = array(); + private $outputDisabled = false; /** * Constructor @@ -155,15 +156,17 @@ class ProcessBuilder /** * Sets the input of the process. * - * @param string|null $stdin The input as a string + * Deprecation: As of Symfony 2.5, this method only accepts string values. + * + * @param string|null $input The input as a string * * @return ProcessBuilder * * @throws InvalidArgumentException In case the argument is invalid */ - public function setInput($stdin) + public function setInput($input) { - $this->stdin = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $stdin); + $this->input = ProcessUtils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); return $this; } @@ -214,6 +217,30 @@ class ProcessBuilder } /** + * Disables fetching output and error output from the underlying process. + * + * @return Process + */ + public function disableOutput() + { + $this->outputDisabled = true; + + return $this; + } + + /** + * Enables fetching output and error output from the underlying process. + * + * @return Process + */ + public function enableOutput() + { + $this->outputDisabled = false; + + return $this; + } + + /** * Creates a Process instance and returns it. * * @return Process @@ -238,6 +265,12 @@ class ProcessBuilder $env = $this->env; } - return new Process($script, $this->cwd, $env, $this->stdin, $this->timeout, $options); + $process = new Process($script, $this->cwd, $env, $this->input, $this->timeout, $options); + + if ($this->outputDisabled) { + $process->disableOutput(); + } + + return $process; } } diff --git a/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php b/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php old mode 100755 new mode 100644 index f35d1c1..82bf5c2 --- a/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php +++ b/vendor/symfony/process/Symfony/Component/Process/ProcessPipes.php @@ -30,13 +30,16 @@ class ProcessPipes private $useFiles; /** @var bool */ private $ttyMode; + /** @var bool */ + private $ptyMode; const CHUNK_SIZE = 16384; - public function __construct($useFiles, $ttyMode) + public function __construct($useFiles, $ttyMode, $ptyMode = false) { $this->useFiles = (bool) $useFiles; $this->ttyMode = (bool) $ttyMode; + $this->ptyMode = (bool) $ptyMode; // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. // Workaround for this problem is to use temporary files instead of pipes on Windows platform. @@ -104,10 +107,22 @@ class ProcessPipes /** * Returns an array of descriptors for the use of proc_open. * + * @param bool $disableOutput Whether to redirect STDOUT and STDERR to /dev/null or not. + * * @return array */ - public function getDescriptors() + public function getDescriptors($disableOutput) { + if ($disableOutput) { + $nullstream = fopen(defined('PHP_WINDOWS_VERSION_BUILD') ? 'NUL' : '/dev/null', 'c'); + + return array( + array('pipe', 'r'), + $nullstream, + $nullstream, + ); + } + if ($this->useFiles) { // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800) // We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650 @@ -125,6 +140,12 @@ class ProcessPipes array('file', '/dev/tty', 'w'), array('file', '/dev/tty', 'w'), ); + } elseif ($this->ptyMode && Process::isPtySupported()) { + return array( + array('pty'), + array('pty'), + array('pty'), + ); } return array( diff --git a/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php b/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php old mode 100755 new mode 100644 index 441522d..35ae17c --- a/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php +++ b/vendor/symfony/process/Symfony/Component/Process/ProcessUtils.php @@ -75,7 +75,7 @@ class ProcessUtils } /** - * Validates and normalized a Process input + * Validates and normalizes a Process input * * @param string $caller The name of method call that validates the input * @param mixed $input The input to validate @@ -87,7 +87,11 @@ class ProcessUtils public static function validateInput($caller, $input) { if (null !== $input) { - if (is_scalar($input) || (is_object($input) && method_exists($input, '__toString'))) { + if (is_scalar($input)) { + return (string) $input; + } + // deprecated as of Symfony 2.5, to be removed in 3.0 + if (is_object($input) && method_exists($input, '__toString')) { return (string) $input; } diff --git a/vendor/symfony/process/Symfony/Component/Process/README.md b/vendor/symfony/process/Symfony/Component/Process/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php old mode 100755 new mode 100644 index 57b6e16..4e0f4b5 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/AbstractProcessTest.php @@ -151,39 +151,39 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $expectedLength = (1024 * $size) + 1; $p = $this->getProcess(sprintf('php -r %s', escapeshellarg($code))); - $p->setStdin($expected); + $p->setInput($expected); $p->run(); $this->assertEquals($expectedLength, strlen($p->getOutput())); $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); } - public function testSetStdinWhileRunningThrowsAnException() + public function testSetInputWhileRunningThrowsAnException() { $process = $this->getProcess('php -r "usleep(500000);"'); $process->start(); try { - $process->setStdin('foobar'); + $process->setInput('foobar'); $process->stop(); $this->fail('A LogicException should have been raised.'); } catch (LogicException $e) { - $this->assertEquals('STDIN can not be set while the process is running.', $e->getMessage()); + $this->assertEquals('Input can not be set while the process is running.', $e->getMessage()); } $process->stop(); } /** - * @dataProvider provideInvalidStdinValues + * @dataProvider provideInvalidInputValues * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException - * @expectedExceptionMessage Symfony\Component\Process\Process::setStdin only accepts strings. + * @expectedExceptionMessage Symfony\Component\Process\Process::setInput only accepts strings. */ - public function testInvalidStdin($value) + public function testInvalidInput($value) { $process = $this->getProcess('php -v'); - $process->setStdin($value); + $process->setInput($value); } - public function provideInvalidStdinValues() + public function provideInvalidInputValues() { return array( array(array()), @@ -193,16 +193,16 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } /** - * @dataProvider provideStdinValues + * @dataProvider provideInputValues */ - public function testValidStdin($expected, $value) + public function testValidInput($expected, $value) { $process = $this->getProcess('php -v'); - $process->setStdin($value); - $this->assertSame($expected, $process->getStdin()); + $process->setInput($value); + $this->assertSame($expected, $process->getInput()); } - public function provideStdinValues() + public function provideInputValues() { return array( array(null, null), @@ -365,6 +365,43 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $this->assertNull($process->getExitCodeText()); } + public function testPTYCommand() + { + if (!Process::isPtySupported()) { + $this->markTestSkipped('PTY is not supported on this operating system.'); + } + + $process = $this->getProcess('echo "foo"'); + $process->setPty(true); + $process->run(); + + $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); + $this->assertEquals("foo\r\n", $process->getOutput()); + } + + public function testMustRun() + { + $process = $this->getProcess('echo foo'); + + $this->assertSame($process, $process->mustRun()); + $this->assertEquals("foo".PHP_EOL, $process->getOutput()); + } + + public function testSuccessfulMustRunHasCorrectExitCode() + { + $process = $this->getProcess('echo foo')->mustRun(); + $this->assertEquals(0, $process->getExitCode()); + } + + /** + * @expectedException Symfony\Component\Process\Exception\ProcessFailedException + */ + public function testMustRunThrowsException() + { + $process = $this->getProcess('exit 1'); + $process->mustRun(); + } + public function testExitCodeText() { $process = $this->getProcess(''); @@ -648,9 +685,9 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase */ public function testIdleTimeout() { - $process = $this->getProcess('sleep 3'); + $process = $this->getProcess('php -r "sleep(3);"'); $process->setTimeout(10); - $process->setIdleTimeout(1); + $process->setIdleTimeout(0.5); try { $process->run(); @@ -659,7 +696,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } catch (ProcessTimedOutException $ex) { $this->assertTrue($ex->isIdleTimeout()); $this->assertFalse($ex->isGeneralTimeout()); - $this->assertEquals(1.0, $ex->getExceededTimeout()); + $this->assertEquals(0.5, $ex->getExceededTimeout()); } } @@ -668,9 +705,9 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase */ public function testIdleTimeoutNotExceededWhenOutputIsSent() { - $process = $this->getProcess('echo "foo" && sleep 1 && echo "foo" && sleep 1 && echo "foo" && sleep 1 && echo "foo" && sleep 5'); - $process->setTimeout(5); - $process->setIdleTimeout(3); + $process = $this->getProcess('php -r "echo \'foo\'; sleep(1); echo \'foo\'; sleep(1); echo \'foo\'; sleep(1); "'); + $process->setTimeout(2); + $process->setIdleTimeout(1.5); try { $process->run(); @@ -678,7 +715,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } catch (ProcessTimedOutException $ex) { $this->assertTrue($ex->isGeneralTimeout()); $this->assertFalse($ex->isIdleTimeout()); - $this->assertEquals(5.0, $ex->getExceededTimeout()); + $this->assertEquals(2, $ex->getExceededTimeout()); } } @@ -686,6 +723,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase { $process = $this->getProcess('php -r "$n = 1000; while ($n--) {echo \'\'; usleep(1000); }"'); $process->setTimeout(0.1); + try { $process->run(); $this->fail('An exception should have been raised.'); @@ -693,7 +731,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } $process->start(); - usleep(10000); + usleep(1000); $process->stop(); } @@ -849,6 +887,108 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $process->signal('Céphalopodes'); } + public function testDisableOutputDisablesTheOutput() + { + $p = $this->getProcess('php -r "usleep(500000);"'); + $this->assertFalse($p->isOutputDisabled()); + $p->disableOutput(); + $this->assertTrue($p->isOutputDisabled()); + $p->enableOutput(); + $this->assertFalse($p->isOutputDisabled()); + } + + public function testDisableOutputWhileRunningThrowsException() + { + $p = $this->getProcess('php -r "usleep(500000);"'); + $p->start(); + $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Disabling output while the process is running is not possible.'); + $p->disableOutput(); + } + + public function testEnableOutputWhileRunningThrowsException() + { + $p = $this->getProcess('php -r "usleep(500000);"'); + $p->disableOutput(); + $p->start(); + $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Enabling output while the process is running is not possible.'); + $p->enableOutput(); + } + + public function testEnableOrDisableOutputAfterRunDoesNotThrowException() + { + $p = $this->getProcess('php -r "usleep(500000);"'); + $p->disableOutput(); + $p->start(); + $p->wait(); + $p->enableOutput(); + $p->disableOutput(); + } + + public function testDisableOutputWhileIdleTimeoutIsSet() + { + $process = $this->getProcess('sleep 3'); + $process->setIdleTimeout(1); + $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output can not be disabled while an idle timeout is set.'); + $process->disableOutput(); + } + + public function testSetIdleTimeoutWhileOutputIsDisabled() + { + $process = $this->getProcess('sleep 3'); + $process->disableOutput(); + $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Idle timeout can not be set while the output is disabled.'); + $process->setIdleTimeout(1); + } + + public function testSetNullIdleTimeoutWhileOutputIsDisabled() + { + $process = $this->getProcess('sleep 3'); + $process->disableOutput(); + $process->setIdleTimeout(null); + } + + /** + * @dataProvider provideStartMethods + */ + public function testStartWithACallbackAndDisabledOutput($startMethod) + { + $p = $this->getProcess('php -r "usleep(500000);"'); + $p->disableOutput(); + $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'); + call_user_func(array($p, $startMethod), function () {}); + } + + public function provideStartMethods() + { + return array( + array('start'), + array('run'), + array('mustRun'), + ); + } + + /** + * @dataProvider provideOutputFetchingMethods + */ + public function testGetOutputWhileDisabled($fetchMethod) + { + $p = $this->getProcess('php -r "usleep(500000);"'); + $p->disableOutput(); + $p->start(); + $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output has been disabled.'); + call_user_func(array($p, $fetchMethod)); + } + + public function provideOutputFetchingMethods() + { + return array( + array('getOutput'), + array('getIncrementalOutput'), + array('getErrorOutput'), + array('getIncrementalErrorOutput'), + ); + } + public function responsesCodeProvider() { return array( @@ -894,6 +1034,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase array('WorkingDirectory'), array('Env'), array('Stdin'), + array('Input'), array('Options') ); @@ -901,16 +1042,16 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase } /** - * @param string $commandline - * @param null $cwd - * @param array $env - * @param null $stdin - * @param int $timeout - * @param array $options + * @param string $commandline + * @param null|string $cwd + * @param null|array $env + * @param null|string $input + * @param int $timeout + * @param array $options * * @return Process */ - abstract protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()); + abstract protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()); } class Stringifiable diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/NonStopableProcess.php b/vendor/symfony/process/Symfony/Component/Process/Tests/NonStopableProcess.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/PhpProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/PhpProcessTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php b/vendor/symfony/process/Symfony/Component/Process/Tests/PipeStdinInStdoutStdErrStreamSelect.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php old mode 100755 new mode 100644 index c543b49..56e4052 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessBuilderTest.php @@ -194,6 +194,25 @@ class ProcessBuilderTest extends \PHPUnit_Framework_TestCase } } + public function testShouldReturnProcessWithDisabledOutput() + { + $process = ProcessBuilder::create(array('/usr/bin/php')) + ->disableOutput() + ->getProcess(); + + $this->assertTrue($process->isOutputDisabled()); + } + + public function testShouldReturnProcessWithEnabledOutput() + { + $process = ProcessBuilder::create(array('/usr/bin/php')) + ->disableOutput() + ->enableOutput() + ->getProcess(); + + $this->assertFalse($process->isOutputDisabled()); + } + /** * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException * @expectedExceptionMessage Symfony\Component\Process\ProcessBuilder::setInput only accepts strings. diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php old mode 100755 new mode 100644 index 5da55e7..c48648f --- a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php @@ -54,25 +54,33 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase $process = $this->getMock( 'Symfony\Component\Process\Process', - array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText'), + array('isSuccessful', 'getOutput', 'getErrorOutput', 'getExitCode', 'getExitCodeText', 'isOutputDisabled'), array($cmd) ); $process->expects($this->once()) ->method('isSuccessful') ->will($this->returnValue(false)); + $process->expects($this->once()) ->method('getOutput') ->will($this->returnValue($output)); + $process->expects($this->once()) ->method('getErrorOutput') ->will($this->returnValue($errorOutput)); + $process->expects($this->once()) ->method('getExitCode') ->will($this->returnValue($exitCode)); + $process->expects($this->once()) ->method('getExitCodeText') ->will($this->returnValue($exitText)); + $process->expects($this->once()) + ->method('isOutputDisabled') + ->will($this->returnValue(false)); + $exception = new ProcessFailedException($process); $this->assertEquals( @@ -80,4 +88,49 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase $exception->getMessage() ); } + + /** + * Tests that ProcessFailedException does not extract information from + * process output if it was previously disabled + */ + public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput() + { + $cmd = 'php'; + $exitCode = 1; + $exitText = 'General error'; + + $process = $this->getMock( + 'Symfony\Component\Process\Process', + array('isSuccessful', 'isOutputDisabled', 'getExitCode', 'getExitCodeText', 'getOutput', 'getErrorOutput'), + array($cmd) + ); + $process->expects($this->once()) + ->method('isSuccessful') + ->will($this->returnValue(false)); + + $process->expects($this->never()) + ->method('getOutput'); + + $process->expects($this->never()) + ->method('getErrorOutput'); + + $process->expects($this->once()) + ->method('getExitCode') + ->will($this->returnValue($exitCode)); + + $process->expects($this->once()) + ->method('getExitCodeText') + ->will($this->returnValue($exitText)); + + $process->expects($this->once()) + ->method('isOutputDisabled') + ->will($this->returnValue(true)); + + $exception = new ProcessFailedException($process); + + $this->assertEquals( + "The command \"$cmd\" failed.\nExit Code: $exitCode($exitText)", + $exception->getMessage() + ); + } } diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessInSigchildEnvironment.php b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessInSigchildEnvironment.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessUtilsTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/ProcessUtilsTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php old mode 100755 new mode 100644 index 798e66a..d0a0f25 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildDisabledProcessTest.php @@ -51,7 +51,23 @@ class SigchildDisabledProcessTest extends AbstractProcessTest /** * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage his PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. + * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. + */ + public function testSuccessfulMustRunHasCorrectExitCode() + { + parent::testSuccessfulMustRunHasCorrectExitCode(); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\RuntimeException + */ + public function testMustRunThrowsException() + { + parent::testMustRunThrowsException(); + } + + /** + * @expectedException \Symfony\Component\Process\Exception\RuntimeException */ public function testProcessIsSignaledIfStopped() { @@ -214,9 +230,9 @@ class SigchildDisabledProcessTest extends AbstractProcessTest /** * {@inheritdoc} */ - protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); + $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $input, $timeout, $options); $process->setEnhanceSigchildCompatibility(false); return $process; diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php old mode 100755 new mode 100644 index 65dd4bb..05b9dad --- a/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/SigchildEnabledProcessTest.php @@ -123,9 +123,9 @@ class SigchildEnabledProcessTest extends AbstractProcessTest /** * {@inheritdoc} */ - protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $stdin, $timeout, $options); + $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $input, $timeout, $options); $process->setEnhanceSigchildCompatibility(true); return $process; diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SignalListener.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SignalListener.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php b/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php old mode 100755 new mode 100644 index 69ad3d5..5c0f6d6 --- a/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php +++ b/vendor/symfony/process/Symfony/Component/Process/Tests/SimpleProcessTest.php @@ -150,9 +150,9 @@ class SimpleProcessTest extends AbstractProcessTest /** * {@inheritdoc} */ - protected function getProcess($commandline, $cwd = null, array $env = null, $stdin = null, $timeout = 60, array $options = array()) + protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) { - return new Process($commandline, $cwd, $env, $stdin, $timeout, $options); + return new Process($commandline, $cwd, $env, $input, $timeout, $options); } private function skipIfPHPSigchild() diff --git a/vendor/symfony/process/Symfony/Component/Process/composer.json b/vendor/symfony/process/Symfony/Component/Process/composer.json old mode 100755 new mode 100644 index a05735b..b5dbfe1 --- a/vendor/symfony/process/Symfony/Component/Process/composer.json +++ b/vendor/symfony/process/Symfony/Component/Process/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/process/Symfony/Component/Process/phpunit.xml.dist b/vendor/symfony/process/Symfony/Component/Process/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/.gitignore b/vendor/symfony/routing/Symfony/Component/Routing/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Annotation/Route.php b/vendor/symfony/routing/Symfony/Component/Routing/Annotation/Route.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md b/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md old mode 100755 new mode 100644 index f0c616d..8b604ea --- a/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md +++ b/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +2.5.0 +----- + + * [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and + will be removed in Symfony 3.0, since the performance gains were minimal and + it's hard to replicate the behaviour of PHP implementation. + 2.3.0 ----- diff --git a/vendor/symfony/routing/Symfony/Component/Routing/CompiledRoute.php b/vendor/symfony/routing/Symfony/Component/Routing/CompiledRoute.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Exception/ExceptionInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Exception/InvalidParameterException.php b/vendor/symfony/routing/Symfony/Component/Routing/Exception/InvalidParameterException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Exception/MethodNotAllowedException.php b/vendor/symfony/routing/Symfony/Component/Routing/Exception/MethodNotAllowedException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php b/vendor/symfony/routing/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Exception/ResourceNotFoundException.php b/vendor/symfony/routing/Symfony/Component/Routing/Exception/ResourceNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Exception/RouteNotFoundException.php b/vendor/symfony/routing/Symfony/Component/Routing/Exception/RouteNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/ConfigurableRequirementsInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php old mode 100755 new mode 100644 index c52fab4..8d42030 --- a/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.php @@ -92,6 +92,7 @@ EOF; $properties[] = $route->getRequirements(); $properties[] = $compiledRoute->getTokens(); $properties[] = $compiledRoute->getHostTokens(); + $properties[] = $route->getSchemes(); $routes .= sprintf(" '%s' => %s,\n", $name, str_replace("\n", '', var_export($properties, true))); } @@ -114,9 +115,9 @@ EOF; throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', \$name)); } - list(\$variables, \$defaults, \$requirements, \$tokens, \$hostTokens) = self::\$declaredRoutes[\$name]; + list(\$variables, \$defaults, \$requirements, \$tokens, \$hostTokens, \$requiredSchemes) = self::\$declaredRoutes[\$name]; - return \$this->doGenerate(\$variables, \$defaults, \$requirements, \$tokens, \$parameters, \$name, \$referenceType, \$hostTokens); + return \$this->doGenerate(\$variables, \$defaults, \$requirements, \$tokens, \$parameters, \$name, \$referenceType, \$hostTokens, \$requiredSchemes); } EOF; } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php old mode 100755 new mode 100644 index c827ca7..899da20 --- a/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php @@ -137,7 +137,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt // the Route has a cache of its own and is not recompiled as long as it does not get modified $compiledRoute = $route->compile(); - return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens()); + return $this->doGenerate($compiledRoute->getVariables(), $route->getDefaults(), $route->getRequirements(), $compiledRoute->getTokens(), $parameters, $name, $referenceType, $compiledRoute->getHostTokens(), $route->getSchemes()); } /** @@ -145,7 +145,7 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt * @throws InvalidParameterException When a parameter value for a placeholder is not correct because * it does not match the requirement */ - protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens) + protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) { $variables = array_flip($variables); $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); @@ -204,7 +204,24 @@ class UrlGenerator implements UrlGeneratorInterface, ConfigurableRequirementsInt $schemeAuthority = ''; if ($host = $this->context->getHost()) { $scheme = $this->context->getScheme(); - if (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { + + if ($requiredSchemes) { + $schemeMatched = false; + foreach ($requiredSchemes as $requiredScheme) { + if ($scheme === $requiredScheme) { + $schemeMatched = true; + + break; + } + } + + if (!$schemeMatched) { + $referenceType = self::ABSOLUTE_URL; + $scheme = current($requiredSchemes); + } + + } elseif (isset($requirements['_scheme']) && ($req = strtolower($requirements['_scheme'])) && $scheme !== $req) { + // We do this for BC; to be removed if _scheme is not supported anymore $referenceType = self::ABSOLUTE_URL; $scheme = $req; } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGeneratorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/LICENSE b/vendor/symfony/routing/Symfony/Component/Routing/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php old mode 100755 new mode 100644 index eb79a64..f6d4425 --- a/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php @@ -108,58 +108,12 @@ abstract class AnnotationClassLoader implements LoaderInterface throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); } - $globals = array( - 'path' => '', - 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), - 'host' => '', - 'condition' => '', - ); - $class = new \ReflectionClass($class); if ($class->isAbstract()) { throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class)); } - if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) { - // for BC reasons - if (null !== $annot->getPath()) { - $globals['path'] = $annot->getPath(); - } elseif (null !== $annot->getPattern()) { - $globals['path'] = $annot->getPattern(); - } - - if (null !== $annot->getRequirements()) { - $globals['requirements'] = $annot->getRequirements(); - } - - if (null !== $annot->getOptions()) { - $globals['options'] = $annot->getOptions(); - } - - if (null !== $annot->getDefaults()) { - $globals['defaults'] = $annot->getDefaults(); - } - - if (null !== $annot->getSchemes()) { - $globals['schemes'] = $annot->getSchemes(); - } - - if (null !== $annot->getMethods()) { - $globals['methods'] = $annot->getMethods(); - } - - if (null !== $annot->getHost()) { - $globals['host'] = $annot->getHost(); - } - - if (null !== $annot->getCondition()) { - $globals['condition'] = $annot->getCondition(); - } - } + $globals = $this->getGlobals($class); $collection = new RouteCollection(); $collection->addResource(new FileResource($class->getFileName())); @@ -204,7 +158,7 @@ abstract class AnnotationClassLoader implements LoaderInterface $condition = $globals['condition']; } - $route = new Route($globals['path'].$annot->getPath(), $defaults, $requirements, $options, $host, $schemes, $methods, $condition); + $route = $this->createRoute($globals['path'].$annot->getPath(), $defaults, $requirements, $options, $host, $schemes, $methods, $condition); $this->configureRoute($route, $class, $method, $annot); @@ -252,5 +206,63 @@ abstract class AnnotationClassLoader implements LoaderInterface return $name; } + protected function getGlobals(\ReflectionClass $class) + { + $globals = array( + 'path' => '', + 'requirements' => array(), + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), + 'host' => '', + 'condition' => '', + ); + + if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) { + // for BC reasons + if (null !== $annot->getPath()) { + $globals['path'] = $annot->getPath(); + } elseif (null !== $annot->getPattern()) { + $globals['path'] = $annot->getPattern(); + } + + if (null !== $annot->getRequirements()) { + $globals['requirements'] = $annot->getRequirements(); + } + + if (null !== $annot->getOptions()) { + $globals['options'] = $annot->getOptions(); + } + + if (null !== $annot->getDefaults()) { + $globals['defaults'] = $annot->getDefaults(); + } + + if (null !== $annot->getSchemes()) { + $globals['schemes'] = $annot->getSchemes(); + } + + if (null !== $annot->getMethods()) { + $globals['methods'] = $annot->getMethods(); + } + + if (null !== $annot->getHost()) { + $globals['host'] = $annot->getHost(); + } + + if (null !== $annot->getCondition()) { + $globals['condition'] = $annot->getCondition(); + } + } + + return $globals; + } + + protected function createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition) + { + return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); + } + abstract protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationFileLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/ClosureLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/ClosureLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/PhpFileLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/PhpFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/XmlFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Loader/YamlFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd b/vendor/symfony/routing/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php old mode 100755 new mode 100644 index 55aac6b..35b1dc5 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -16,6 +16,10 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException; /** * ApacheUrlMatcher matches URL based on Apache mod_rewrite matching (see ApacheMatcherDumper). * + * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * The performance gains are minimal and it's very hard to replicate + * the behavior of PHP implementation. + * * @author Fabien Potencier * @author Arnaud Le Blanc */ diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php old mode 100755 new mode 100644 index 5b32684..fc76c19 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -16,6 +16,10 @@ use Symfony\Component\Routing\Route; /** * Dumps a set of Apache mod_rewrite rules. * + * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * The performance gains are minimal and it's very hard to replicate + * the behavior of PHP implementation. + * * @author Fabien Potencier * @author Kris Wallsmith */ diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperCollection.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperPrefixCollection.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php old mode 100755 new mode 100644 index 19e74b0..b108fc1 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/PhpMatcherDumper.php @@ -288,14 +288,15 @@ EOF; EOF; } - if ($scheme = $route->getRequirement('_scheme')) { + if ($schemes = $route->getSchemes()) { if (!$supportsRedirections) { - throw new \LogicException('The "_scheme" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.'); + throw new \LogicException('The "schemes" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.'); } - + $schemes = str_replace("\n", '', var_export(array_flip($schemes), true)); $code .= <<context->getScheme() !== '$scheme') { - return \$this->redirect(\$pathinfo, '$name', '$scheme'); + \$requiredSchemes = $schemes; + if (!isset(\$requiredSchemes[\$this->context->getScheme()])) { + return \$this->redirect(\$pathinfo, '$name', key(\$requiredSchemes)); } @@ -313,8 +314,11 @@ EOF; } $vars[] = "array('_route' => '$name')"; - $code .= sprintf(" return \$this->mergeDefaults(array_replace(%s), %s);\n" - , implode(', ', $vars), str_replace("\n", '', var_export($route->getDefaults(), true))); + $code .= sprintf( + " return \$this->mergeDefaults(array_replace(%s), %s);\n", + implode(', ', $vars), + str_replace("\n", '', var_export($route->getDefaults(), true)) + ); } elseif ($route->getDefaults()) { $code .= sprintf(" return %s;\n", str_replace("\n", '', var_export(array_replace($route->getDefaults(), array('_route' => $name)), true))); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php old mode 100755 new mode 100644 index 3435a57..236f55a --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php @@ -56,9 +56,10 @@ abstract class RedirectableUrlMatcher extends UrlMatcher implements Redirectable } // check HTTP scheme requirement - $scheme = $route->getRequirement('_scheme'); - if ($scheme && $this->context->getScheme() !== $scheme) { - return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, $scheme)); + $scheme = $this->context->getScheme(); + $schemes = $route->getSchemes(); + if ($schemes && !$route->hasScheme($scheme)) { + return array(self::ROUTE_MATCH, $this->redirect($pathinfo, $name, current($schemes))); } return array(self::REQUIREMENT_MATCH, null); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RequestMatcherInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php old mode 100755 new mode 100644 index 1dd57f0..22af699 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/TraceableUrlMatcher.php @@ -103,9 +103,11 @@ class TraceableUrlMatcher extends UrlMatcher } // check HTTP scheme requirement - if ($scheme = $route->getRequirement('_scheme')) { - if ($this->context->getScheme() !== $scheme) { - $this->addTrace(sprintf('Scheme "%s" does not match the requirement ("%s"); the user will be redirected', $this->context->getScheme(), $scheme), self::ROUTE_ALMOST_MATCHES, $name, $route); + if ($requiredSchemes = $route->getSchemes()) { + $scheme = $this->context->getScheme(); + + if (!$route->hasScheme($scheme)) { + $this->addTrace(sprintf('Scheme "%s" does not match any of the required schemes ("%s"); the user will be redirected to first required scheme', $scheme, implode(', ', $requiredSchemes)), self::ROUTE_ALMOST_MATCHES, $name, $route); return true; } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php old mode 100755 new mode 100644 index 5c56078..8d081a8 --- a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php @@ -205,8 +205,8 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface } // check HTTP scheme requirement - $scheme = $route->getRequirement('_scheme'); - $status = $scheme && $scheme !== $this->context->getScheme() ? self::REQUIREMENT_MISMATCH : self::REQUIREMENT_MATCH; + $scheme = $this->context->getScheme(); + $status = $route->getSchemes() && !$route->hasScheme($scheme) ? self::REQUIREMENT_MISMATCH : self::REQUIREMENT_MATCH; return array($status, null); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcherInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/README.md b/vendor/symfony/routing/Symfony/Component/Routing/README.md old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/RequestContext.php b/vendor/symfony/routing/Symfony/Component/Routing/RequestContext.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/RequestContextAwareInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/RequestContextAwareInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Route.php b/vendor/symfony/routing/Symfony/Component/Routing/Route.php old mode 100755 new mode 100644 index 65c00d8..ad8ec49 --- a/vendor/symfony/routing/Symfony/Component/Routing/Route.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Route.php @@ -248,6 +248,25 @@ class Route implements \Serializable } /** + * Checks if a scheme requirement has been set. + * + * @param string $scheme + * + * @return bool true if the scheme requirement exists, otherwise false + */ + public function hasScheme($scheme) + { + $scheme = strtolower($scheme); + foreach ($this->schemes as $requiredScheme) { + if ($scheme === $requiredScheme) { + return true; + } + } + + return false; + } + + /** * Returns the uppercased HTTP methods this route is restricted to. * So an empty array means that any method is allowed. * diff --git a/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php b/vendor/symfony/routing/Symfony/Component/Routing/RouteCollection.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/RouteCompiler.php b/vendor/symfony/routing/Symfony/Component/Routing/RouteCompiler.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/RouteCompilerInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/RouteCompilerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Router.php b/vendor/symfony/routing/Symfony/Component/Routing/Router.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/RouterInterface.php b/vendor/symfony/routing/Symfony/Component/Routing/RouterInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Annotation/RouteTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/CompiledRouteTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/CompiledRouteTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/annotated.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/annotated.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.apache old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher1.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php old mode 100755 new mode 100644 index d7b99d6..acf1163 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.php @@ -321,8 +321,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // secure if ($pathinfo === '/secure') { - if ($this->context->getScheme() !== 'https') { - return $this->redirect($pathinfo, 'secure', 'https'); + $requiredSchemes = array ( 'https' => 0,); + if (!isset($requiredSchemes[$this->context->getScheme()])) { + return $this->redirect($pathinfo, 'secure', key($requiredSchemes)); } return array('_route' => 'secure'); @@ -330,8 +331,9 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Tests\Fixtures\Redirec // nonsecure if ($pathinfo === '/nonsecure') { - if ($this->context->getScheme() !== 'http') { - return $this->redirect($pathinfo, 'nonsecure', 'http'); + $requiredSchemes = array ( 'http' => 0,); + if (!isset($requiredSchemes[$this->context->getScheme()])) { + return $this->redirect($pathinfo, 'nonsecure', key($requiredSchemes)); } return array('_route' => 'nonsecure'); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher3.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/empty.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/empty.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/foo.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/foo.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/foo1.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/foo1.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonesense_resource_plus_path.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonesense_resource_plus_path.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonesense_type_without_resource.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonesense_type_without_resource.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validresource.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validresource.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validresource.yml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validresource.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/withdoctype.xml b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/withdoctype.xml old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php old mode 100755 new mode 100644 index ab5f4cd..4165741 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -60,7 +60,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $this->routeCollection->add('Test2', new Route('/testing2')); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump()); - include ($this->testTmpFilepath); + include $this->testTmpFilepath; $projectUrlGenerator = new \ProjectUrlGenerator(new RequestContext('/app.php')); @@ -81,7 +81,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase public function testDumpWithoutRoutes() { file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'WithoutRoutesUrlGenerator'))); - include ($this->testTmpFilepath); + include $this->testTmpFilepath; $projectUrlGenerator = new \WithoutRoutesUrlGenerator(new RequestContext('/app.php')); @@ -96,7 +96,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $this->routeCollection->add('Test', new Route('/test')); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'NonExistingRoutesUrlGenerator'))); - include ($this->testTmpFilepath); + include $this->testTmpFilepath; $projectUrlGenerator = new \NonExistingRoutesUrlGenerator(new RequestContext()); $url = $projectUrlGenerator->generate('NonExisting', array()); @@ -107,11 +107,44 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase $this->routeCollection->add('Test', new Route('/testing/{foo}', array('foo' => 'bar'))); file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'DefaultRoutesUrlGenerator'))); - include ($this->testTmpFilepath); + include $this->testTmpFilepath; $projectUrlGenerator = new \DefaultRoutesUrlGenerator(new RequestContext()); $url = $projectUrlGenerator->generate('Test', array()); $this->assertEquals($url, '/testing'); } + + public function testDumpWithSchemeRequirement() + { + $this->routeCollection->add('Test1', new Route('/testing', array(), array(), array(), '', array('ftp', 'https'))); + $this->routeCollection->add('Test2', new Route('/testing_bc', array(), array('_scheme' => 'https'))); // BC + + file_put_contents($this->testTmpFilepath, $this->generatorDumper->dump(array('class' => 'SchemeUrlGenerator'))); + include $this->testTmpFilepath; + + $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php')); + + $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), true); + $absoluteUrlBC = $projectUrlGenerator->generate('Test2', array(), true); + $relativeUrl = $projectUrlGenerator->generate('Test1', array(), false); + $relativeUrlBC = $projectUrlGenerator->generate('Test2', array(), false); + + $this->assertEquals($absoluteUrl, 'ftp://localhost/app.php/testing'); + $this->assertEquals($absoluteUrlBC, 'https://localhost/app.php/testing_bc'); + $this->assertEquals($relativeUrl, 'ftp://localhost/app.php/testing'); + $this->assertEquals($relativeUrlBC, 'https://localhost/app.php/testing_bc'); + + $projectUrlGenerator = new \SchemeUrlGenerator(new RequestContext('/app.php', 'GET', 'localhost', 'https')); + + $absoluteUrl = $projectUrlGenerator->generate('Test1', array(), true); + $absoluteUrlBC = $projectUrlGenerator->generate('Test2', array(), true); + $relativeUrl = $projectUrlGenerator->generate('Test1', array(), false); + $relativeUrlBC = $projectUrlGenerator->generate('Test2', array(), false); + + $this->assertEquals($absoluteUrl, 'https://localhost/app.php/testing'); + $this->assertEquals($absoluteUrlBC, 'https://localhost/app.php/testing_bc'); + $this->assertEquals($relativeUrl, '/app.php/testing'); + $this->assertEquals($relativeUrlBC, '/app.php/testing_bc'); + } } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php old mode 100755 new mode 100644 index 2ab21b2..143e344 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -244,22 +244,40 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase public function testSchemeRequirementDoesNothingIfSameCurrentScheme() { - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); // BC $this->assertEquals('/app.php/', $this->getGenerator($routes)->generate('test')); - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); // BC + $this->assertEquals('/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); + + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); + $this->assertEquals('/app.php/', $this->getGenerator($routes)->generate('test')); + + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); $this->assertEquals('/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); } public function testSchemeRequirementForcesAbsoluteUrl() { - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'https'))); // BC + $this->assertEquals('https://localhost/app.php/', $this->getGenerator($routes)->generate('test')); + + $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); // BC + $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); + + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('https'))); $this->assertEquals('https://localhost/app.php/', $this->getGenerator($routes)->generate('test')); - $routes = $this->getRoutes('test', new Route('/', array(), array('_scheme' => 'http'))); + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('http'))); $this->assertEquals('http://localhost/app.php/', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test')); } + public function testSchemeRequirementCreatesUrlForFirstRequiredScheme() + { + $routes = $this->getRoutes('test', new Route('/', array(), array(), array(), '', array('Ftp', 'https'))); + $this->assertEquals('ftp://localhost/app.php/', $this->getGenerator($routes)->generate('test')); + } + public function testPathWithTwoStartingSlashes() { $routes = $this->getRoutes('test', new Route('//path-and-not-domain')); @@ -443,7 +461,7 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertNull($generator->generate('test', array('foo' => 'baz'), false)); } - public function testGenerateNetworkPath() + public function testGenerateNetworkPathBC() { $routes = $this->getRoutes('test', new Route('/{name}', array(), array('_scheme' => 'http'), array(), '{locale}.example.com')); @@ -461,13 +479,32 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase ); } + public function testGenerateNetworkPath() + { + $routes = $this->getRoutes('test', new Route('/{name}', array(), array(), array(), '{locale}.example.com', array('http'))); + + $this->assertSame('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', + array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'network path with different host' + ); + $this->assertSame('//fr.example.com/app.php/Fabien?query=string', $this->getGenerator($routes, array('host' => 'fr.example.com'))->generate('test', + array('name' =>'Fabien', 'locale' => 'fr', 'query' => 'string'), UrlGeneratorInterface::NETWORK_PATH), 'network path although host same as context' + ); + $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes, array('scheme' => 'https'))->generate('test', + array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::NETWORK_PATH), 'absolute URL because scheme requirement does not match context' + ); + $this->assertSame('http://fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test', + array('name' =>'Fabien', 'locale' => 'fr'), UrlGeneratorInterface::ABSOLUTE_URL), 'absolute URL with same scheme because it is requested' + ); + } + public function testGenerateRelativePath() { $routes = new RouteCollection(); $routes->add('article', new Route('/{author}/{article}/')); $routes->add('comments', new Route('/{author}/{article}/comments')); $routes->add('host', new Route('/{article}', array(), array(), array(), '{author}.example.com')); - $routes->add('scheme', new Route('/{author}', array(), array('_scheme' => 'https'))); + $routes->add('schemeBC', new Route('/{author}', array(), array('_scheme' => 'https'))); // BC + $routes->add('scheme', new Route('/{author}/blog', array(), array(), array(), '', array('https'))); $routes->add('unrelated', new Route('/about')); $generator = $this->getGenerator($routes, array('host' => 'example.com', 'pathInfo' => '/fabien/symfony-is-great/')); @@ -487,9 +524,12 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertSame('//bernhard.example.com/app.php/forms-are-great', $generator->generate('host', array('author' =>'bernhard', 'article' => 'forms-are-great'), UrlGeneratorInterface::RELATIVE_PATH) ); - $this->assertSame('https://example.com/app.php/bernhard', $generator->generate('scheme', + $this->assertSame('https://example.com/app.php/bernhard', $generator->generate('schemeBC', array('author' =>'bernhard'), UrlGeneratorInterface::RELATIVE_PATH) ); + $this->assertSame('https://example.com/app.php/bernhard/blog', $generator->generate('scheme', + array('author' =>'bernhard'), UrlGeneratorInterface::RELATIVE_PATH) + ); $this->assertSame('../../about', $generator->generate('unrelated', array(), UrlGeneratorInterface::RELATIVE_PATH) ); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php old mode 100755 new mode 100644 index c609979..3b39a66 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -125,6 +125,32 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->assertEquals($routeDatas['condition'], $route->getCondition(), '->load preserves condition annotation'); } + public function testClassRouteLoad() + { + $classRouteDatas = array('path' => '/classRoutePrefix'); + + $routeDatas = array( + 'name' => 'route1', + 'path' => '/', + ); + + $this->reader + ->expects($this->once()) + ->method('getClassAnnotation') + ->will($this->returnValue($this->getAnnotatedRoute($classRouteDatas))) + ; + + $this->reader + ->expects($this->once()) + ->method('getMethodAnnotations') + ->will($this->returnValue(array($this->getAnnotatedRoute($routeDatas)))) + ; + $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass'); + $route = $routeCollection->get($routeDatas['name']); + + $this->assertSame($classRouteDatas['path'].$routeDatas['path'], $route->getPath(), '->load preserves class route path annotation'); + } + private function getAnnotatedRoute($datas) { return new Route($datas); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationDirectoryLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AnnotationFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/ClosureLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/ClosureLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/PhpFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php old mode 100755 new mode 100644 index f83b9ec..e6c8029 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php @@ -64,7 +64,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertSame('MyBundle:Blog:show', $route->getDefault('_controller')); $this->assertSame('\w+', $route->getRequirement('slug')); $this->assertSame('en|fr|de', $route->getRequirement('_locale')); - $this->assertSame(null, $route->getDefault('slug')); + $this->assertNull($route->getDefault('slug')); $this->assertSame('RouteCompiler', $route->getOption('compiler_class')); } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/ApacheUrlMatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/ApacheMatcherDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperPrefixCollectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php old mode 100755 new mode 100644 index 2ad4fc8..5cbb605 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -41,7 +41,7 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase $matcher->match('/foo'); } - public function testSchemeRedirect() + public function testSchemeRedirectBC() { $coll = new RouteCollection(); $coll->add('foo', new Route('/foo', array(), array('_scheme' => 'https'))); @@ -55,4 +55,32 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase ; $matcher->match('/foo'); } + + public function testSchemeRedirectRedirectsToFirstScheme() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('FTP', 'HTTPS'))); + + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); + $matcher + ->expects($this->once()) + ->method('redirect') + ->with('/foo', 'foo', 'ftp') + ->will($this->returnValue(array('_route' => 'foo'))) + ; + $matcher->match('/foo'); + } + + public function testNoSchemaRedirectIfOnOfMultipleSchemesMatches() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https', 'http'))); + + $matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext())); + $matcher + ->expects($this->never()) + ->method('redirect') + ; + $matcher->match('/foo'); + } } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/TraceableUrlMatcherTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php old mode 100755 new mode 100644 index b31cada..b03b0c3 --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php @@ -313,13 +313,23 @@ class UrlMatcherTest extends \PHPUnit_Framework_TestCase /** * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException */ - public function testSchemeRequirement() + public function testSchemeRequirementBC() { $coll = new RouteCollection(); $coll->add('foo', new Route('/foo', array(), array('_scheme' => 'https'))); $matcher = new UrlMatcher($coll, new RequestContext()); $matcher->match('/foo'); } + /** + * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testSchemeRequirement() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo', array(), array(), array(), '', array('https'))); + $matcher = new UrlMatcher($coll, new RequestContext()); + $matcher->match('/foo'); + } /** * @expectedException \Symfony\Component\Routing\Exception\ResourceNotFoundException diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RequestContextTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RequestContextTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCollectionTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteCompilerTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php old mode 100755 new mode 100644 index 47f285b..cbd5ccb --- a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php +++ b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouteTest.php @@ -153,10 +153,15 @@ class RouteTest extends \PHPUnit_Framework_TestCase { $route = new Route('/'); $this->assertEquals(array(), $route->getSchemes(), 'schemes is initialized with array()'); + $this->assertFalse($route->hasScheme('http')); $route->setSchemes('hTTp'); $this->assertEquals(array('http'), $route->getSchemes(), '->setSchemes() accepts a single scheme string and lowercases it'); + $this->assertTrue($route->hasScheme('htTp')); + $this->assertFalse($route->hasScheme('httpS')); $route->setSchemes(array('HttpS', 'hTTp')); $this->assertEquals(array('https', 'http'), $route->getSchemes(), '->setSchemes() accepts an array of schemes and lowercases them'); + $this->assertTrue($route->hasScheme('htTp')); + $this->assertTrue($route->hasScheme('httpS')); } public function testSchemeIsBC() @@ -165,6 +170,9 @@ class RouteTest extends \PHPUnit_Framework_TestCase $route->setRequirement('_scheme', 'http|https'); $this->assertEquals('http|https', $route->getRequirement('_scheme')); $this->assertEquals(array('http', 'https'), $route->getSchemes()); + $this->assertTrue($route->hasScheme('https')); + $this->assertTrue($route->hasScheme('http')); + $this->assertFalse($route->hasScheme('ftp')); $route->setSchemes(array('hTTp')); $this->assertEquals('http', $route->getRequirement('_scheme')); $route->setSchemes(array()); diff --git a/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouterTest.php b/vendor/symfony/routing/Symfony/Component/Routing/Tests/RouterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/routing/Symfony/Component/Routing/composer.json b/vendor/symfony/routing/Symfony/Component/Routing/composer.json old mode 100755 new mode 100644 index 3517b23..9a88cc1 --- a/vendor/symfony/routing/Symfony/Component/Routing/composer.json +++ b/vendor/symfony/routing/Symfony/Component/Routing/composer.json @@ -38,7 +38,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/routing/Symfony/Component/Routing/phpunit.xml.dist b/vendor/symfony/routing/Symfony/Component/Routing/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/.gitignore b/vendor/symfony/security-core/Symfony/Component/Security/Core/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationManagerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationProviderManager.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolver.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/AuthenticationTrustResolverInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/AnonymousAuthenticationProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/AuthenticationProviderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php old mode 100755 new mode 100644 index 21ce8d0..11c3cda --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php @@ -47,23 +47,23 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn $this->providerKey = $providerKey; } - /** - * {@inheritdoc} - */ - public function authenticate(TokenInterface $token) - { - if (!$this->supports($token)) { - return; - } + /** + * {@inheritdoc} + */ + public function authenticate(TokenInterface $token) + { + if (!$this->supports($token)) { + return; + } if (!$user = $token->getUser()) { throw new BadCredentialsException('No pre-authenticated principal found in request.'); } -/* + /* if (null === $token->getCredentials()) { throw new BadCredentialsException('No pre-authenticated credentials found in request.'); } -*/ + */ $user = $this->userProvider->loadUserByUsername($user); $this->userChecker->checkPostAuth($user); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/SimpleAuthenticationProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentToken.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/PersistentTokenInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/RememberMe/TokenProviderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/SimpleAuthenticatorInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/SimpleAuthenticatorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/SimpleFormAuthenticatorInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/SimpleFormAuthenticatorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/SimplePreAuthenticatorInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/SimplePreAuthenticatorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/AnonymousToken.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/AuthenticationEvents.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/AuthenticationEvents.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php old mode 100755 new mode 100644 index 726f62e..84856f6 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -22,6 +22,10 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; */ class AccessDecisionManager implements AccessDecisionManagerInterface { + const STRATEGY_AFFIRMATIVE = 'affirmative'; + const STRATEGY_CONSENSUS = 'consensus'; + const STRATEGY_UNANIMOUS = 'unanimous'; + private $voters; private $strategy; private $allowIfAllAbstainDecisions; @@ -37,7 +41,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface * * @throws \InvalidArgumentException */ - public function __construct(array $voters, $strategy = 'affirmative', $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) + public function __construct(array $voters, $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true) { if (!$voters) { throw new \InvalidArgumentException('You must at least add one voter.'); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/AccessDecisionManagerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/ExpressionLanguage.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/AuthenticatedVoter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/RoleHierarchyVoter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/RoleVoter.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Authorization/Voter/VoterInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php old mode 100755 new mode 100644 index b27c2b0..97d707b --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php @@ -89,7 +89,9 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface /** * Checks if the password is too long. * - * @return bool true if the password is too long, false otherwise + * @param string $password The password + * + * @return bool true if the password is too long, false otherwise */ protected function isPasswordTooLong($password) { diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php new file mode 100644 index 0000000..22ae820 --- /dev/null +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderAwareInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Security\Core\Encoder; + +/** + * @author Christophe Coevoet + */ +interface EncoderAwareInterface +{ + /** + * Gets the name of the encoder used to encode the password. + * + * If the method returns null, the standard way to retrieve the encoder + * will be used instead. + * + * @return string + */ + public function getEncoderName(); +} diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php old mode 100755 new mode 100644 index 0337380..77021ec --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactory.php @@ -30,19 +30,32 @@ class EncoderFactory implements EncoderFactoryInterface */ public function getEncoder($user) { - foreach ($this->encoders as $class => $encoder) { - if ((is_object($user) && !$user instanceof $class) || (!is_object($user) && !is_subclass_of($user, $class) && $user != $class)) { - continue; + $encoderKey = null; + + if ($user instanceof EncoderAwareInterface && (null !== $encoderName = $user->getEncoderName())) { + if (!array_key_exists($encoderName, $this->encoders)) { + throw new \RuntimeException(sprintf('The encoder "%s" was not configured.', $encoderName)); } - if (!$encoder instanceof PasswordEncoderInterface) { - return $this->encoders[$class] = $this->createEncoder($encoder); + $encoderKey = $encoderName; + } else { + foreach ($this->encoders as $class => $encoder) { + if ((is_object($user) && $user instanceof $class) || (!is_object($user) && (is_subclass_of($user, $class) || $user == $class))) { + $encoderKey = $class; + break; + } } + } + + if (null === $encoderKey) { + throw new \RuntimeException(sprintf('No encoder has been configured for account "%s".', is_object($user) ? get_class($user) : $user)); + } - return $this->encoders[$class]; + if (!$this->encoders[$encoderKey] instanceof PasswordEncoderInterface) { + $this->encoders[$encoderKey] = $this->createEncoder($this->encoders[$encoderKey]); } - throw new \RuntimeException(sprintf('No encoder has been configured for account "%s".', is_object($user) ? get_class($user) : $user)); + return $this->encoders[$encoderKey]; } /** diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/EncoderFactoryInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/MessageDigestPasswordEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Encoder/PlaintextPasswordEncoder.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Event/AuthenticationEvent.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Event/AuthenticationEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Event/AuthenticationFailureEvent.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AccessDeniedException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AccessDeniedException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AccountExpiredException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AccountExpiredException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AccountStatusException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AccountStatusException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AuthenticationCredentialsNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AuthenticationException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AuthenticationException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/AuthenticationServiceException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/BadCredentialsException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/BadCredentialsException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/CookieTheftException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/CookieTheftException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/CredentialsExpiredException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/DisabledException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/DisabledException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/ExceptionInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/InsufficientAuthenticationException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/InvalidArgumentException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/InvalidArgumentException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/InvalidCsrfTokenException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/LockedException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/LockedException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/LogoutException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/LogoutException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/NonceExpiredException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/NonceExpiredException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/ProviderNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/RuntimeException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/RuntimeException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/SessionUnavailableException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/TokenNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/UnsupportedUserException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/UnsupportedUserException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Exception/UsernameNotFoundException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/LICENSE b/vendor/symfony/security-core/Symfony/Component/Security/Core/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md b/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md old mode 100755 new mode 100644 index 7fc281d..4585a5d --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/README.md @@ -11,7 +11,7 @@ Resources Documentation: -http://symfony.com/doc/2.4/book/security.html +http://symfony.com/doc/2.5/book/security.html Tests ----- diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ar.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ca.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.cs.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.da.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.da.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.de.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.de.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.el.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.el.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.en.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.en.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.es.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.es.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.fa.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.fr.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.gl.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.hu.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.it.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.it.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.lb.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.nl.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.no.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.no.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.pl.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.pt_BR.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.pt_PT.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ro.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ru.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sk.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sl.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sr_Cyrl.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sr_Latn.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.sv.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.tr.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf b/vendor/symfony/security-core/Symfony/Component/Security/Core/Resources/translations/security.ua.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/Role.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/Role.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php old mode 100755 new mode 100644 index 2e7df0e..793007e --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchy.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Security\Core\Role; class RoleHierarchy implements RoleHierarchyInterface { private $hierarchy; - private $map; + protected $map; /** * Constructor. @@ -52,7 +52,7 @@ class RoleHierarchy implements RoleHierarchyInterface return $reachableRoles; } - private function buildRoleMap() + protected function buildRoleMap() { $this->map = array(); foreach ($this->hierarchy as $main => $roles) { diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleHierarchyInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/RoleInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/SwitchUserRole.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Role/SwitchUserRole.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/SecurityContext.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/SecurityContext.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/SecurityContextInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/SecurityContextInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php old mode 100755 new mode 100644 index b053d73..f63ef79 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationProviderManagerTest.php @@ -129,7 +129,7 @@ class AuthenticationProviderManagerTest extends \PHPUnit_Framework_TestCase } elseif (null !== $exception) { $provider->expects($this->once()) ->method('authenticate') - ->will($this->throwException($this->getMock($exception, null, array(), '', false))) + ->will($this->throwException($this->getMock($exception, null, array(), '', true))) ; } diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/AuthenticationTrustResolverTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/AnonymousAuthenticationProviderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php old mode 100755 new mode 100644 index 3e285d7..ae96f10 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/DaoAuthenticationProviderTest.php @@ -14,6 +14,7 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder; use Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { @@ -37,7 +38,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException($this->getMock('Symfony\\Component\\Security\\Core\\Exception\\UsernameNotFoundException', null, array(), '', false))) + ->will($this->throwException(new UsernameNotFoundException())) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); @@ -55,7 +56,7 @@ class DaoAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userProvider = $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserProviderInterface'); $userProvider->expects($this->once()) ->method('loadUserByUsername') - ->will($this->throwException($this->getMock('RuntimeException', null, array(), '', false))) + ->will($this->throwException(new \RuntimeException())) ; $provider = new DaoAuthenticationProvider($userProvider, $this->getMock('Symfony\\Component\\Security\\Core\\User\\UserCheckerInterface'), 'key', $this->getMock('Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface')); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php old mode 100755 new mode 100644 index 4a8bf6c..5fd7b05 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/PreAuthenticatedAuthenticationProviderTest.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider; +use Symfony\Component\Security\Core\Exception\LockedException; class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { @@ -79,7 +80,7 @@ class PreAuthenticatedAuthenticationProviderTest extends \PHPUnit_Framework_Test $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\LockedException', null, array(), '', false))) + ->will($this->throwException(new LockedException())) ; $provider = $this->getProvider($user, $userChecker); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php old mode 100755 new mode 100644 index 43da274..d278ba4 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider; -use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken; +use Symfony\Component\Security\Core\Exception\AccountExpiredException; use Symfony\Component\Security\Core\Role\Role; class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase @@ -52,7 +52,7 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '', false))) + ->will($this->throwException(new AccountExpiredException())) ; $provider = $this->getProvider($userChecker); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php old mode 100755 new mode 100644 index db47589..0503054 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Provider/UserAuthenticationProviderTest.php @@ -11,10 +11,12 @@ namespace Symfony\Component\Security\Core\Tests\Authentication\Provider; -use Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider; +use Symfony\Component\Security\Core\Exception\AccountExpiredException; +use Symfony\Component\Security\Core\Exception\BadCredentialsException; +use Symfony\Component\Security\Core\Exception\CredentialsExpiredException; +use Symfony\Component\Security\Core\Exception\UsernameNotFoundException; use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\Security\Core\Role\SwitchUserRole; -use Symfony\Component\Security\Core\Exception\BadCredentialsException; class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase { @@ -41,7 +43,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $provider = $this->getProvider(false, false); $provider->expects($this->once()) ->method('retrieveUser') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '', false))) + ->will($this->throwException(new UsernameNotFoundException())) ; $provider->authenticate($this->getSupportedToken()); @@ -55,7 +57,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $provider = $this->getProvider(false, true); $provider->expects($this->once()) ->method('retrieveUser') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\UsernameNotFoundException', null, array(), '', false))) + ->will($this->throwException(new UsernameNotFoundException())) ; $provider->authenticate($this->getSupportedToken()); @@ -83,7 +85,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPreAuth') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\CredentialsExpiredException', null, array(), '', false))) + ->will($this->throwException(new CredentialsExpiredException())) ; $provider = $this->getProvider($userChecker); @@ -103,7 +105,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase $userChecker = $this->getMock('Symfony\Component\Security\Core\User\UserCheckerInterface'); $userChecker->expects($this->once()) ->method('checkPostAuth') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\AccountExpiredException', null, array(), '', false))) + ->will($this->throwException(new AccountExpiredException())) ; $provider = $this->getProvider($userChecker); @@ -128,7 +130,7 @@ class UserAuthenticationProviderTest extends \PHPUnit_Framework_TestCase ; $provider->expects($this->once()) ->method('checkAuthentication') - ->will($this->throwException($this->getMock('Symfony\Component\Security\Core\Exception\BadCredentialsException', null, array(), '', false))) + ->will($this->throwException(new BadCredentialsException())) ; $provider->authenticate($this->getSupportedToken()); diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/InMemoryTokenProviderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/PersistentTokenTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/RememberMe/PersistentTokenTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/AbstractTokenTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/AnonymousTokenTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/PreAuthenticatedTokenTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authentication/Token/UsernamePasswordTokenTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php old mode 100755 new mode 100644 index b0557a3..e182838 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/AccessDecisionManagerTest.php @@ -77,34 +77,34 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase { return array( // affirmative - array('affirmative', $this->getVoters(1, 0, 0), false, true, true), - array('affirmative', $this->getVoters(1, 2, 0), false, true, true), - array('affirmative', $this->getVoters(0, 1, 0), false, true, false), - array('affirmative', $this->getVoters(0, 0, 1), false, true, false), - array('affirmative', $this->getVoters(0, 0, 1), true, true, true), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 0, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(1, 2, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 1, 0), false, true, false), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), false, true, false), + array(AccessDecisionManager::STRATEGY_AFFIRMATIVE, $this->getVoters(0, 0, 1), true, true, true), // consensus - array('consensus', $this->getVoters(1, 0, 0), false, true, true), - array('consensus', $this->getVoters(1, 2, 0), false, true, false), - array('consensus', $this->getVoters(2, 1, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 0, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(1, 2, 0), false, true, false), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 1, 0), false, true, true), - array('consensus', $this->getVoters(0, 0, 1), false, true, false), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), false, true, false), - array('consensus', $this->getVoters(0, 0, 1), true, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(0, 0, 1), true, true, true), - array('consensus', $this->getVoters(2, 2, 0), false, true, true), - array('consensus', $this->getVoters(2, 2, 1), false, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, true, true), - array('consensus', $this->getVoters(2, 2, 0), false, false, false), - array('consensus', $this->getVoters(2, 2, 1), false, false, false), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 0), false, false, false), + array(AccessDecisionManager::STRATEGY_CONSENSUS, $this->getVoters(2, 2, 1), false, false, false), // unanimous - array('unanimous', $this->getVoters(1, 0, 0), false, true, true), - array('unanimous', $this->getVoters(1, 0, 1), false, true, true), - array('unanimous', $this->getVoters(1, 1, 0), false, true, false), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 0), false, true, true), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 0, 1), false, true, true), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(1, 1, 0), false, true, false), - array('unanimous', $this->getVoters(0, 0, 2), false, true, false), - array('unanimous', $this->getVoters(0, 0, 2), true, true, true), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), false, true, false), + array(AccessDecisionManager::STRATEGY_UNANIMOUS, $this->getVoters(0, 0, 2), true, true, true), ); } diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/ExpressionLanguageTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/ExpressionVoterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Authorization/Voter/RoleVoterTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/BCryptPasswordEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/BasePasswordEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php old mode 100755 new mode 100644 index 18c8c4a..3d34d04 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/EncoderFactoryTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Core\Tests\Encoder; use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder; use Symfony\Component\Security\Core\Encoder\EncoderFactory; +use Symfony\Component\Security\Core\Encoder\EncoderAwareInterface; use Symfony\Component\Security\Core\User\User; use Symfony\Component\Security\Core\User\UserInterface; @@ -78,6 +79,59 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); } + + public function testGetNamedEncoderForEncoderAware() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha256'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha1') + )); + + $encoder = $factory->getEncoder(new EncAwareUser('user', 'pass')); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + public function testGetNullNamedEncoderForEncoderAware() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha256') + )); + + $user = new EncAwareUser('user', 'pass'); + $user->encoderName = null; + $encoder = $factory->getEncoder($user); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } + + /** + * @expectedException RuntimeException + */ + public function testGetInvalidNamedEncoderForEncoderAware() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha256') + )); + + $user = new EncAwareUser('user', 'pass'); + $user->encoderName = 'invalid_encoder_name'; + $encoder = $factory->getEncoder($user); + } + + public function testGetEncoderForEncoderAwareWithClassName() + { + $factory = new EncoderFactory(array( + 'Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser' => new MessageDigestPasswordEncoder('sha1'), + 'encoder_name' => new MessageDigestPasswordEncoder('sha256') + )); + + $encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\EncAwareUser'); + $expectedEncoder = new MessageDigestPasswordEncoder('sha1'); + $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); + } } class SomeUser implements UserInterface @@ -92,3 +146,13 @@ class SomeUser implements UserInterface class SomeChildUser extends SomeUser { } + +class EncAwareUser extends SomeUser implements EncoderAwareInterface +{ + public $encoderName = 'encoder_name'; + + public function getEncoderName() + { + return $this->encoderName; + } +} diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/MessageDigestPasswordEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/Pbkdf2PasswordEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Encoder/PlaintextPasswordEncoderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Role/RoleHierarchyTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Role/RoleTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Role/RoleTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Role/SwitchUserRoleTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/SecurityContextTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/SecurityContextTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/User/ChainUserProviderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/User/UserTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/User/UserTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Util/ClassUtilsTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Util/ClassUtilsTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Util/SecureRandomTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Util/SecureRandomTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Util/StringUtilsTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Util/StringUtilsTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/AdvancedUserInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/AdvancedUserInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/ChainUserProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/ChainUserProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/EquatableInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/EquatableInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/InMemoryUserProvider.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/User.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/User.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserChecker.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserChecker.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserCheckerInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserCheckerInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserProviderInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/User/UserProviderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/ClassUtils.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/ClassUtils.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/SecureRandom.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/SecureRandom.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/SecureRandomInterface.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/SecureRandomInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/StringUtils.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Util/StringUtils.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php b/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php old mode 100755 new mode 100644 index ab455f3..5f9ad2a --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php @@ -17,6 +17,7 @@ use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\ConstraintDefinitionException; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; class UserPasswordValidator extends ConstraintValidator { @@ -34,6 +35,10 @@ class UserPasswordValidator extends ConstraintValidator */ public function validate($password, Constraint $constraint) { + if (!$constraint instanceof UserPassword) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UserPassword'); + } + $user = $this->securityContext->getToken()->getUser(); if (!$user instanceof UserInterface) { diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json b/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json old mode 100755 new mode 100644 index acadcf7..249d4c1 --- a/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json +++ b/vendor/symfony/security-core/Symfony/Component/Security/Core/composer.json @@ -40,7 +40,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/security-core/Symfony/Component/Security/Core/phpunit.xml.dist b/vendor/symfony/security-core/Symfony/Component/Security/Core/phpunit.xml.dist old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/.gitignore b/vendor/symfony/translation/Symfony/Component/Translation/.gitignore old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md b/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md old mode 100755 new mode 100644 index b8027ab..8aedc37 --- a/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md +++ b/vendor/symfony/translation/Symfony/Component/Translation/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +2.5.0 +----- + + * added relative file path template to the file dumpers + * added optional backup to the file dumpers + * changed IcuResFileDumper to extend FileDumper + 2.3.0 ----- diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/AbstractOperation.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php b/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/DiffOperation.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/MergeOperation.php b/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/MergeOperation.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/OperationInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/Catalogue/OperationInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/CsvFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/DumperInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/DumperInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php old mode 100755 new mode 100644 index 853f177..7672400 --- a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php @@ -25,6 +25,40 @@ use Symfony\Component\Translation\MessageCatalogue; abstract class FileDumper implements DumperInterface { /** + * A template for the relative paths to files. + * + * @var string + */ + protected $relativePathTemplate = '%domain%.%locale%.%extension%'; + + /** + * Make file backup before the dump. + * + * @var bool + */ + private $backup = true; + + /** + * Sets the template for the relative paths to files. + * + * @param string $relativePathTemplate A template for the relative paths to files + */ + public function setRelativePathTemplate($relativePathTemplate) + { + $this->relativePathTemplate = $relativePathTemplate; + } + + /** + * Sets backup flag. + * + * @param bool + */ + public function setBackup($backup) + { + $this->backup = $backup; + } + + /** * {@inheritdoc} */ public function dump(MessageCatalogue $messages, $options = array()) @@ -35,11 +69,17 @@ abstract class FileDumper implements DumperInterface // save a file for each domain foreach ($messages->getDomains() as $domain) { - $file = $domain.'.'.$messages->getLocale().'.'.$this->getExtension(); // backup - $fullpath = $options['path'].'/'.$file; + $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); if (file_exists($fullpath)) { - copy($fullpath, $fullpath.'~'); + if ($this->backup) { + copy($fullpath, $fullpath.'~'); + } + } else { + $directory = dirname($fullpath); + if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { + throw new \RuntimeException(sprintf('Unable to create directory "%s".', $directory)); + } } // save file file_put_contents($fullpath, $this->format($messages, $domain)); @@ -62,4 +102,21 @@ abstract class FileDumper implements DumperInterface * @return string file extension */ abstract protected function getExtension(); + + /** + * Gets the relative file path using the template. + * + * @param string $domain The domain + * @param string $locale The locale + * + * @return string The relative file path + */ + private function getRelativePath($domain, $locale) + { + return strtr($this->relativePathTemplate, array( + '%domain%' => $domain, + '%locale%' => $locale, + '%extension%' => $this->getExtension() + )); + } } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php old mode 100755 new mode 100644 index 2da7cf3..0a2ed9f --- a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php @@ -18,35 +18,12 @@ use Symfony\Component\Translation\MessageCatalogue; * * @author Stealth35 */ -class IcuResFileDumper implements DumperInterface +class IcuResFileDumper extends FileDumper { /** * {@inheritdoc} */ - public function dump(MessageCatalogue $messages, $options = array()) - { - if (!array_key_exists('path', $options)) { - throw new \InvalidArgumentException('The file dumper need a path options.'); - } - - // save a file for each domain - foreach ($messages->getDomains() as $domain) { - $file = $messages->getLocale().'.'.$this->getExtension(); - $path = $options['path'].'/'.$domain.'/'; - - if (!file_exists($path)) { - mkdir($path); - } - - // backup - if (file_exists($path.$file)) { - copy($path.$file, $path.$file.'~'); - } - - // save file - file_put_contents($path.$file, $this->format($messages, $domain)); - } - } + protected $relativePathTemplate = '%domain%/%locale%.%extension%'; /** * {@inheritdoc} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IniFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IniFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/JsonFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/JsonFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PhpFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PoFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PoFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/QtFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/QtFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/XliffFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php b/vendor/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Exception/ExceptionInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/Exception/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Exception/InvalidResourceException.php b/vendor/symfony/translation/Symfony/Component/Translation/Exception/InvalidResourceException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Exception/NotFoundResourceException.php b/vendor/symfony/translation/Symfony/Component/Translation/Exception/NotFoundResourceException.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php b/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ChainExtractor.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/Extractor/ExtractorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/IdentityTranslator.php b/vendor/symfony/translation/Symfony/Component/Translation/IdentityTranslator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Interval.php b/vendor/symfony/translation/Symfony/Component/Translation/Interval.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/LICENSE b/vendor/symfony/translation/Symfony/Component/Translation/LICENSE old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/ArrayLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/ArrayLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/CsvFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/CsvFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/IcuDatFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/IcuDatFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/IcuResFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/IcuResFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/IniFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/IniFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/JsonFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/JsonFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/LoaderInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/LoaderInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/MoFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/MoFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/PhpFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/PhpFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/PoFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/PoFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/QtFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/QtFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/XliffFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/XliffFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/YamlFileLoader.php b/vendor/symfony/translation/Symfony/Component/Translation/Loader/YamlFileLoader.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd b/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xliff-core-1.2-strict.xsd old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd b/vendor/symfony/translation/Symfony/Component/Translation/Loader/schema/dic/xliff-core/xml.xsd old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/MessageCatalogue.php b/vendor/symfony/translation/Symfony/Component/Translation/MessageCatalogue.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/MessageCatalogueInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/MessageCatalogueInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php b/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php old mode 100755 new mode 100644 index 1802d16..cdf814e --- a/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/MessageSelector.php @@ -82,7 +82,7 @@ class MessageSelector return $standardRules[0]; } - throw new \InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $message, $locale)); + throw new \InvalidArgumentException(sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $message, $locale, $number)); } return $standardRules[$position]; diff --git a/vendor/symfony/translation/Symfony/Component/Translation/MetadataAwareInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/MetadataAwareInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php b/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php old mode 100755 new mode 100644 index b09a787..221be60 --- a/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/PluralizationRules.php @@ -18,7 +18,6 @@ namespace Symfony\Component\Translation; */ class PluralizationRules { - // @codeCoverageIgnoreStart private static $rules = array(); /** @@ -212,6 +211,4 @@ class PluralizationRules self::$rules[$locale] = $rule; } - - // @codeCoverageIgnoreEnd } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/README.md b/vendor/symfony/translation/Symfony/Component/Translation/README.md old mode 100755 new mode 100644 index bfcdfe1..641db87 --- a/vendor/symfony/translation/Symfony/Component/Translation/README.md +++ b/vendor/symfony/translation/Symfony/Component/Translation/README.md @@ -26,7 +26,7 @@ https://github.com/fabpot/Silex/blob/master/src/Silex/Provider/TranslationServic Documentation: -http://symfony.com/doc/2.4/book/translation.html +http://symfony.com/doc/2.5/book/translation.html You can run the unit tests with the following command: diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/DiffOperationTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Catalogue/MergeOperationTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/CsvFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php new file mode 100644 index 0000000..9682089 --- /dev/null +++ b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/FileDumperTest.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Dumper; + +use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\Dumper\FileDumper; + +class FileDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testDumpBackupsFileIfExisting() + { + $tempDir = sys_get_temp_dir(); + $file = $tempDir.'/messages.en.concrete'; + $backupFile = $file.'~'; + + @touch($file); + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertTrue(file_exists($backupFile)); + + @unlink($file); + @unlink($backupFile); + } + + public function testDumpCreatesNestedDirectoriesAndFile() + { + $tempDir = sys_get_temp_dir(); + $translationsDir = $tempDir.'/test/translations'; + $file = $translationsDir.'/messages.en.concrete'; + + $catalogue = new MessageCatalogue('en'); + $catalogue->add(array('foo' => 'bar')); + + $dumper = new ConcreteFileDumper(); + $dumper->setRelativePathTemplate('test/translations/%domain%.%locale%.%extension%'); + $dumper->dump($catalogue, array('path' => $tempDir)); + + $this->assertTrue(file_exists($file)); + + @unlink($file); + @rmdir($translationsDir); + } +} + +class ConcreteFileDumper extends FileDumper +{ + protected function format(MessageCatalogue $messages, $domain) + { + return ''; + } + + protected function getExtension() + { + return 'concrete'; + } +} diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php old mode 100755 new mode 100644 index cb30c66..4c188ac --- a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IcuResFileDumperTest.php @@ -26,14 +26,13 @@ class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase $catalogue->add(array('foo' => 'bar')); $tempDir = sys_get_temp_dir() . '/IcuResFileDumperTest'; - mkdir($tempDir); $dumper = new IcuResFileDumper(); $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertEquals(file_get_contents(__DIR__.'/../fixtures/resourcebundle/res/en.res'), file_get_contents($tempDir.'/messages/en.res')); - unlink($tempDir.'/messages/en.res'); - rmdir($tempDir.'/messages'); - rmdir($tempDir); + @unlink($tempDir.'/messages/en.res'); + @rmdir($tempDir.'/messages'); + @rmdir($tempDir); } } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/IniFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/JsonFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/MoFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PhpFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/PoFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/QtFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/XliffFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Dumper/YamlFileDumperTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/IdentityTranslatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/IntervalTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/IntervalTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/CsvFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuDatFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IcuResFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/IniFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/JsonFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/LocalizedTestCase.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/MoFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PhpFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/PoFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/QtFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/Loader/YamlFileLoaderTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageCatalogueTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageCatalogueTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageSelectorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/MessageSelectorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/PluralizationRulesTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorTest.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/TranslatorTest.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty-translation.po old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.csv b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.csv old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.ini b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.ini old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.json b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.mo old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.po old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.yml b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/empty.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/encoding.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/encoding.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/invalid-xml-resources.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/malformed.json b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/malformed.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.yml b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/non-valid.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.mo old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/plurals.po old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resname.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resname.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/corrupted/resources.dat old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.res old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/en.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.res old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/fr.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/packagelist.txt old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/dat/resources.dat old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resourcebundle/res/en.res old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources-clean.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.csv b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.csv old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ini b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ini old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.json b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.json old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.mo b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.mo old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.php b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.po b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.po old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ts b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.ts old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.yml b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/resources.yml old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/valid.csv b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/valid.csv old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf b/vendor/symfony/translation/Symfony/Component/Translation/Tests/fixtures/withdoctype.xlf old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Translator.php b/vendor/symfony/translation/Symfony/Component/Translation/Translator.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php b/vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php old mode 100755 new mode 100644 diff --git a/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php b/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php old mode 100755 new mode 100644 index 9d70c12..8d90797 --- a/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php +++ b/vendor/symfony/translation/Symfony/Component/Translation/Writer/TranslationWriter.php @@ -40,6 +40,16 @@ class TranslationWriter } /** + * Disables dumper backup. + */ + public function disableBackup() + { + foreach ($this->dumpers as $dumper) { + $dumper->setBackup(false); + } + } + + /** * Obtains the list of supported formats. * * @return array diff --git a/vendor/symfony/translation/Symfony/Component/Translation/composer.json b/vendor/symfony/translation/Symfony/Component/Translation/composer.json old mode 100755 new mode 100644 index dd485bb..37fef30 --- a/vendor/symfony/translation/Symfony/Component/Translation/composer.json +++ b/vendor/symfony/translation/Symfony/Component/Translation/composer.json @@ -33,7 +33,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.4-dev" + "dev-master": "2.5-dev" } } } diff --git a/vendor/symfony/translation/Symfony/Component/Translation/phpunit.xml.dist b/vendor/symfony/translation/Symfony/Component/Translation/phpunit.xml.dist old mode 100755 new mode 100644