Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into feature/app…
Browse files Browse the repository at this point in the history
…-password-reset

* remotes/origin/master: (30 commits)
  Dropped failing group annotation
  Applied styleci patch
  Adds error code 16777217 to fatal error codes for hhvm
  Removes HHVM exception fix
  Updated composer to get latest Illumintate/hashing updates to resolve hhvm issues with bcrypt.
  Fixed current state logged in check in logout.
  Added redirect to home page when logging out from a logged in state.
  Added state logged in requirement handling
  Fixed registration incorrect key naming error.
  Dropped error comment
  Fixed login method calling the error handler multiple times
  Fixed login spec to assert the credentials can be retried on failure.
  Switched to cleaner toast implementation
  Fixed login pattern to use notify
  Added social login icons and added social login method to the rootscope so the login dialog can use it.
  Added timezones service with tests
  Added country definition interface
  Added countries caching strategy.
  Restructured services module to allow for angulars undefined load order. Added countries service wireframe with (failing) tests.
  Added social login dummy
  ...
  • Loading branch information
zakhenry committed Jul 27, 2015
2 parents a75a89a + f5e3eaf commit d86c920
Show file tree
Hide file tree
Showing 37 changed files with 1,349 additions and 442 deletions.
117 changes: 0 additions & 117 deletions api/app/Exceptions/HandleExceptionsFix.php

This file was deleted.

16 changes: 16 additions & 0 deletions api/app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,20 @@
$app->get('jwt/login', 'AuthController@login');
$app->get('jwt/refresh', 'AuthController@refresh');
$app->get('jwt/token', 'AuthController@token');


//@todo implement proper social logins
$app->get('social/facebook', function (Request $request) {
echo "Dummy Facebook request:\n";
return $request;
});
$app->get('social/twitter', function (Request $request) {
echo "Dummy Twitter request:\n";
return $request;
});
$app->get('social/google', function (Request $request) {
echo "Dummy Google request:\n";
return $request;
});

});
30 changes: 30 additions & 0 deletions api/app/SpiraApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@

class SpiraApplication extends Application
{
/**
* Set the error handling for the application.
*
* @return void
*/
protected function registerErrorHandling()
{
parent::registerErrorHandling();

// Don't display additional errors on top of the exception being rendered
ini_set('display_errors', 0);
if ('cli' !== php_sapi_name() && (!ini_get('log_errors') || ini_get('error_log'))) {
// CLI - display errors only if they're not already logged to STDERR
ini_set('display_errors', 1);
}
}

/**
* Get the Monolog handler for the application.
*
Expand All @@ -22,4 +39,17 @@ protected function getMonologHandler()
return parent::getMonologHandler();
// @codeCoverageIgnoreEnd
}

/**
* @codeCoverageIgnore
* Determine if the error type is fatal.
*
* @param int $type
* @return bool
*/
protected function isFatalError($type)
{
// *** Add type 16777217 that HVVM returns for fatal
return in_array($type, [16777217, E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE]);
}
}
7 changes: 2 additions & 5 deletions api/bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
realpath(__DIR__.'/../')
);

$hhvmfix = new App\Exceptions\HandleExceptionsFix();
$hhvmfix->bootstrap($app);
$app->withFacades();

$app->withFacades();

$app->withEloquent();
$app->withEloquent();

$app->configure('hosts');

Expand Down
Loading

0 comments on commit d86c920

Please sign in to comment.