Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
darkalchemy committed Jan 13, 2022
1 parent a06f8ce commit 0a6642c
Show file tree
Hide file tree
Showing 9 changed files with 1,203 additions and 851 deletions.
54 changes: 54 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude(['vendor', 'node_modules', 'resources/views/cache', 'public/resources', 'var', 'locale'])
->ignoreDotFiles(true)
->ignoreVCS(true);

$config = new PhpCsFixer\Config();

return $config
->setUsingCache(false)
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['operators' => ['=' => 'align_single_space', '=>' => 'align_single_space']],
'cast_spaces' => true,
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'linebreak_after_opening_tag' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_extra_blank_lines' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_whitespace_in_blank_line' => true,
'no_spaces_around_offset' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'normalize_index_brace' => true,
'phpdoc_indent' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'no_superfluous_phpdoc_tags' => false,
'single_quote' => true,
'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'no_break_comment' => false,
'blank_line_before_statement' => true,
'declare_equal_normalize' => ['space' => 'none'],
'declare_strict_types' => true,
'fully_qualified_strict_types' => true,
'blank_line_after_opening_tag' => true,
'yoda_style' => false,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
])
->setFinder($finder);

60 changes: 0 additions & 60 deletions .php_cs.dist

This file was deleted.

13 changes: 13 additions & 0 deletions .phplint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
path: ./
jobs: 10
cache: no
extensions:
- php
exclude:
- vendor
- node_modules
- resources/views/cache
- public/resources
- var
- locale
warning: true
6 changes: 3 additions & 3 deletions app/Middleware/RedirectIfGuest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public function __invoke(ServerRequestInterface $request, RequestHandlerInterfac
$response = new Response();

return $response->withHeader(
'Location',
$this->routeParser->urlFor('auth.signin') .
'Location',
$this->routeParser->urlFor('auth.signin') .
'?' .
http_build_query(['redirect' => $request->getUri()->getPath()])
);
);
}

return $handler->handle($request);
Expand Down
4 changes: 1 addition & 3 deletions app/Utilities/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Psr\Container\ContainerInterface;
use Selective\Config\Configuration;
use Slim\Views\Twig;
use Slim\Views\TwigExtension;

/**
* @param $array
Expand Down Expand Up @@ -46,8 +45,7 @@ function compile_twig_templates(ContainerInterface $container)
$twig_config = $settings['twig'];
$cache = $twig_config['cache'] ?? $settings['root'] . '/resources/views/cache/';
$twig = $container->get(Twig::class)->getEnvironment();
$twig->addExtension(new TwigExtension());
$compiler = new TwigCompiler($twig, $cache, true);
$compiler = new TwigCompiler($twig, $cache, true);

try {
$compiler->compile();
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"homepage": "https://github.com/darkalchemy/slim-auth",
"license": "MIT",
"require": {
"php": ">=7.4.0",
"php": "^7.4",
"ext-intl": "*",
"ext-json": "*",
"ext-pdo": "*",
Expand Down Expand Up @@ -75,7 +75,7 @@
"translate-all": "php bin/utilities.php translate-all",
"clear_cache": "php bin/utilities.php clear_cache",
"set-perms": "Umpirsky\\PermissionsHandler\\ScriptHandler::setPermissions",
"phplint": "phplint ./ --exclude=vendor --no-cache",
"phplint": "phplint",
"post-create-project-cmd": [
"php -r \"copy('config/settings.example.php', 'config/settings.php');\"",
"npm install",
Expand Down
Loading

0 comments on commit 0a6642c

Please sign in to comment.