Skip to content

Commit

Permalink
Release 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegnat committed Aug 4, 2019
1 parent 760a56a commit db47e20
Show file tree
Hide file tree
Showing 12 changed files with 2,847 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ composer.phar
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock

# Output for PHPUnit coverage reports
.tmp
Expand Down
27 changes: 27 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

$config = PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setUsingCache(false)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'native_function_invocation' => true,
'ordered_imports' => true,
'declare_strict_types' => true,
'single_import_per_statement' => false,
'concat_space' => ['spacing' => 'one'],
'phpdoc_align' => ['align' => 'left'],
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->ignoreDotFiles(false)
->name(['.php_cs.dist'])
)
;

return $config;
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ $ composer create-project zegnat/website-starter
[PSR-15 Middlewares][PSR-15].
5. Using [FastRoute][] to parse requested URIs and find the matching
[PSR-15 RequestHandlers][PSR-15].
6. Using [PHP_CodeSniffer][] to check all code against the
[PSR-2 Coding Style Guide][PSR-2].
7. Using a [Zend Emitter][] to output a final response to the web server.
6. Using a [Zend Emitter][] to output a final response to the web server.
7. Using [PHP CS Fixer][] to check all code against a somewhat opinionated set
of style rules based on the [Symfony Coding Standards][].
8. Using [PHPUnit][] to test all classes used in the project and generate
coverage reports using [`phpdbg`][].

## PSR-7 & PSR-17 Providers

Expand All @@ -59,11 +61,13 @@ them can be defined as `Nyholm\Psr7\Factory\Psr17Factory::class`.
[Middleland]: https://github.com/oscarotero/middleland
[nyholm/psr7]: https://github.com/Nyholm/psr7
[nyholm/psr7-server]: https://github.com/Nyholm/psr7-server
[PHP_CodeSniffer]: https://github.com/squizlabs/PHP_CodeSniffer
[PSR-2]: http://www.php-fig.org/psr/psr-2/
[PHP CS Fixer]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[`phpdbg`]: https://www.php.net/manual/en/book.phpdbg.php
[PHPUnit]: https://phpunit.de/
[PSR-7]: http://www.php-fig.org/psr/psr-7/
[PSR-15]: https://www.php-fig.org/psr/psr-15/
[PSR-17]: https://www.php-fig.org/psr/psr-17/
[Symfony Coding Standards]: https://symfony.com/doc/current/contributing/code/standards.html
[Zend Emitter]: https://docs.zendframework.com/zend-httphandlerrunner/emitters/

## License
Expand Down
6 changes: 3 additions & 3 deletions app/RequestHandler/Home.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

declare(strict_types = 1);
declare(strict_types=1);

namespace app\RequestHandler;

use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;

class Home implements RequestHandlerInterface
{
Expand Down
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zegnat/website-starter",
"description": "My minimum viable setup for starting a PHP project.",
"type": "project",
"version": "5.0.0",
"version": "6.0.0",
"license": "0BSD",
"authors": [
{
Expand All @@ -18,14 +18,18 @@
"nyholm/psr7-server": "^0.3.0",
"oscarotero/middleland": "^1.0",
"rdlowrey/auryn": "^1.4",
"zendframework/zend-diactoros": "^2.0",
"zendframework/zend-diactoros": "^2.1",
"zendframework/zend-httphandlerrunner": "^1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.3"
"friendsofphp/php-cs-fixer": "^2.15",
"phpunit/phpunit": "^8.3"
},
"scripts": {
"check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 app config public"
"check-style": "php-cs-fixer fix --dry-run -vvv",
"fix-style": "php-cs-fixer fix",
"test": "phpdbg -qrr vendor/bin/phpunit",
"serve": "@php -S localhost:8000 -t public/"
},
"config": {
"sort-packages": true
Expand Down
Loading

0 comments on commit db47e20

Please sign in to comment.