Add cs fixer and first controller with route /.
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -8,4 +8,8 @@
|
|||||||
/var/
|
/var/
|
||||||
/vendor/
|
/vendor/
|
||||||
###< symfony/framework-bundle ###
|
###< symfony/framework-bundle ###
|
||||||
.idea
|
.idea
|
||||||
|
###> php-cs-fixer/shim ###
|
||||||
|
/.php-cs-fixer.php
|
||||||
|
/.php-cs-fixer.cache
|
||||||
|
###< php-cs-fixer/shim ###
|
||||||
|
|||||||
13
.php-cs-fixer.dist.php
Normal file
13
.php-cs-fixer.dist.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = (new PhpCsFixer\Finder())
|
||||||
|
->in(__DIR__)
|
||||||
|
->exclude('var')
|
||||||
|
;
|
||||||
|
|
||||||
|
return (new PhpCsFixer\Config())
|
||||||
|
->setRules([
|
||||||
|
'@Symfony' => true,
|
||||||
|
])
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"php": ">=8.2",
|
"php": ">=8.2",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
|
"php-cs-fixer/shim": "^3.64",
|
||||||
"symfony/console": "7.1.*",
|
"symfony/console": "7.1.*",
|
||||||
"symfony/dotenv": "7.1.*",
|
"symfony/dotenv": "7.1.*",
|
||||||
"symfony/flex": "^2",
|
"symfony/flex": "^2",
|
||||||
@@ -14,8 +15,6 @@
|
|||||||
"symfony/runtime": "7.1.*",
|
"symfony/runtime": "7.1.*",
|
||||||
"symfony/yaml": "7.1.*"
|
"symfony/yaml": "7.1.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
|
||||||
},
|
|
||||||
"config": {
|
"config": {
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"php-http/discovery": true,
|
"php-http/discovery": true,
|
||||||
|
|||||||
54
composer.lock
generated
54
composer.lock
generated
@@ -4,8 +4,60 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "50f9c0973acafa44bb359f58b30b8e58",
|
"content-hash": "6f438d4470aff3ca26ab7be26faa0b50",
|
||||||
"packages": [
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "php-cs-fixer/shim",
|
||||||
|
"version": "v3.64.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/PHP-CS-Fixer/shim.git",
|
||||||
|
"reference": "81ccfd24baf3a10810dab1152c403981a790b837"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/81ccfd24baf3a10810dab1152c403981a790b837",
|
||||||
|
"reference": "81ccfd24baf3a10810dab1152c403981a790b837",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"php": "^7.4 || ^8.0"
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"friendsofphp/php-cs-fixer": "self.version"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-dom": "For handling output formats in XML",
|
||||||
|
"ext-mbstring": "For handling non-UTF8 characters."
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"php-cs-fixer",
|
||||||
|
"php-cs-fixer.phar"
|
||||||
|
],
|
||||||
|
"type": "application",
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Dariusz Rumiński",
|
||||||
|
"email": "dariusz.ruminski@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A tool to automatically fix PHP code style",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/PHP-CS-Fixer/shim/issues",
|
||||||
|
"source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.64.0"
|
||||||
|
},
|
||||||
|
"time": "2024-08-30T23:10:11+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
|
|||||||
15
src/Controller/MainController.php
Normal file
15
src/Controller/MainController.php
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
|
|
||||||
|
class MainController
|
||||||
|
{
|
||||||
|
#[Route('/', name: 'main')]
|
||||||
|
public function homepage(): Response
|
||||||
|
{
|
||||||
|
return new Response('Hello World!');
|
||||||
|
}
|
||||||
|
}
|
||||||
12
symfony.lock
12
symfony.lock
@@ -1,4 +1,16 @@
|
|||||||
{
|
{
|
||||||
|
"php-cs-fixer/shim": {
|
||||||
|
"version": "3.64",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "3.0",
|
||||||
|
"ref": "16422bf8eac6c3be42afe07d37e2abc89d2bdf6b"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
".php-cs-fixer.dist.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/console": {
|
"symfony/console": {
|
||||||
"version": "7.1",
|
"version": "7.1",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
|
|||||||
Reference in New Issue
Block a user