View gist:59e785ac3fdff5c2deccb5f54ff8a7a1
Generating optimized autoload files
> post-update-cmd: Illuminate\Foundation\ComposerScripts::postUpdate
> post-update-cmd: php artisan optimize
Script php artisan optimize handling the post-update-cmd event returned with an error
Error Output:
Exception trace:
() at phar:///var/www/parseci/releases/20160715023715/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:226
View implements problem
$set = new StrategySet();
class StrategySet implements Countable
public function count()
return 0;
View verify-example.php
$user = (object)[
'username' => 'ccornutt',
'password' => password_hash('test1234', PASSWORD_DEFAULT),
'permissions' => ['test1', 'test2', 'edit']
$subject = new \Psecio\Verify\Subject\Simple($user);
$gate = new Gateway($subject);
View slim3-routes-invoke.php
$routes = $app->getContainer()->get('router')->getRoutes();
$grouped = [];
foreach ($routes as $index => $route) {
$pattern = $route->getPattern();
preg_match('/\{.+?Id\}/', $pattern, $match);
if (isset($match[0])) {
View authn.php
interface Subject
public function getIdentifier();
public function getCredential();
interface Enforcer
View propauth-blade-provider.php
namespace App\Providers;
use Blade;
use Illuminate\Support\ServiceProvider;
class PropAuthBladeServiceProvider extends ServiceProvider
View property-auth-example.php
// First, our service provider defining the policies
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Psecio\PropAuth\Enforcer;
use Psecio\PropAuth\Policy;
View property auth library
require_once 'vendor/autoload.php';
use \Psecio\PropAuth\Enforcer;
use \Psecio\PropAuth\User;
use \Psecio\PropAuth\Policy;
use \Psecio\PropAuth\PolicySet;
View gist:c6e182860a00f743cade
Chriss-MacBook-Pro:laravel ccornutt$ composer require psecio/gatekeeper
Using version ^2.6 for psecio/gatekeeper
./composer.json has been updated
> php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for vlucas/phpdotenv == -> satisfiable by vlucas/phpdotenv[v1.1.1].
View gist:b4b0d047a8c15ac40764
Late yesterday afternoon the PSR-9 and PSR-10 drafts were moved into master on the <a href="" title="PHP-FIG Standards">php-fig/standards</a> repository, moving them along to the next step and to get the wider perspective of the main PHP-FIG group's opinions on it.
What are <b>PSR-9</b> and <b>PSR-10</b>, you ask? Here's a brief summary so far:
At the end of last year (2014) <i>Lukas Smith</i> <a href="">made a proposal</a> to the PHP-FIG group for a standard that would make reporting security issues with PHP projects and libraries a much more structured thing. The general idea is that a standardized document (or documents?) in a project's repository would provide information about current and past security issues in a well-defined structure that could have some automated tooling around it. <a href="!searchin/php-fig/security/php-fig/45AIj5bPHJ4/ThERB43j-u8J">Much discuss