It's working!

This commit is contained in:
José David Guillén 2022-01-12 17:10:25 +00:00
parent 81352ef075
commit e581a2d62e
8 changed files with 295 additions and 5 deletions

View File

@ -7,6 +7,7 @@
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"sensio/framework-extra-bundle": "^6.2",
"symfony/console": "5.4.*",
"symfony/dotenv": "5.4.*",
"symfony/flex": "^1.17|^2",
@ -14,8 +15,6 @@
"symfony/runtime": "5.4.*",
"symfony/yaml": "5.4.*"
},
"require-dev": {
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,

228
composer.lock generated
View File

@ -4,8 +4,156 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e5b48b46cc68536c0f6497e15a39811e",
"content-hash": "5888aaccbfe89b5a08d9b8a52dd15058",
"packages": [
{
"name": "doctrine/annotations",
"version": "1.13.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "5b668aef16090008790395c02c893b1ba13f7e08"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08",
"reference": "5b668aef16090008790395c02c893b1ba13f7e08",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
"ext-tokenizer": "*",
"php": "^7.1 || ^8.0",
"psr/cache": "^1 || ^2 || ^3"
},
"require-dev": {
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/coding-standard": "^6.0 || ^8.1",
"phpstan/phpstan": "^0.12.20",
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5",
"symfony/cache": "^4.4 || ^5.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "Docblock Annotations Parser",
"homepage": "https://www.doctrine-project.org/projects/annotations.html",
"keywords": [
"annotations",
"docblock",
"parser"
],
"support": {
"issues": "https://github.com/doctrine/annotations/issues",
"source": "https://github.com/doctrine/annotations/tree/1.13.2"
},
"time": "2021-08-05T19:00:23+00:00"
},
{
"name": "doctrine/lexer",
"version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
"reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c",
"reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^9.0",
"phpstan/phpstan": "1.3",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.11"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com"
}
],
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
"homepage": "https://www.doctrine-project.org/projects/lexer.html",
"keywords": [
"annotations",
"docblock",
"lexer",
"parser",
"php"
],
"support": {
"issues": "https://github.com/doctrine/lexer/issues",
"source": "https://github.com/doctrine/lexer/tree/1.2.2"
},
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
"type": "tidelift"
}
],
"time": "2022-01-12T08:27:12+00:00"
},
{
"name": "psr/cache",
"version": "1.0.1",
@ -203,6 +351,84 @@
},
"time": "2021-05-03T11:20:27+00:00"
},
{
"name": "sensio/framework-extra-bundle",
"version": "v6.2.5",
"source": {
"type": "git",
"url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git",
"reference": "812b11b75298577984f90758aeb7bdc8ecd22c20"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/812b11b75298577984f90758aeb7bdc8ecd22c20",
"reference": "812b11b75298577984f90758aeb7bdc8ecd22c20",
"shasum": ""
},
"require": {
"doctrine/annotations": "^1.0",
"php": ">=7.2.5",
"symfony/config": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
"symfony/http-kernel": "^4.4|^5.0|^6.0"
},
"conflict": {
"doctrine/doctrine-cache-bundle": "<1.3.1",
"doctrine/persistence": "<1.3"
},
"require-dev": {
"doctrine/dbal": "^2.10|^3.0",
"doctrine/doctrine-bundle": "^1.11|^2.0",
"doctrine/orm": "^2.5",
"symfony/browser-kit": "^4.4|^5.0|^6.0",
"symfony/doctrine-bridge": "^4.4|^5.0|^6.0",
"symfony/dom-crawler": "^4.4|^5.0|^6.0",
"symfony/expression-language": "^4.4|^5.0|^6.0",
"symfony/finder": "^4.4|^5.0|^6.0",
"symfony/monolog-bridge": "^4.0|^5.0|^6.0",
"symfony/monolog-bundle": "^3.2",
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0",
"symfony/security-bundle": "^4.4|^5.0|^6.0",
"symfony/twig-bundle": "^4.4|^5.0|^6.0",
"symfony/yaml": "^4.4|^5.0|^6.0",
"twig/twig": "^1.34|^2.4|^3.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "6.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Sensio\\Bundle\\FrameworkExtraBundle\\": "src/"
},
"exclude-from-classmap": [
"/tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
}
],
"description": "This bundle provides a way to configure your controllers with annotations",
"keywords": [
"annotations",
"controllers"
],
"support": {
"issues": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues",
"source": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/tree/v6.2.5"
},
"time": "2022-01-02T16:55:10+00:00"
},
{
"name": "symfony/cache",
"version": "v5.4.2",

View File

@ -2,4 +2,5 @@
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
];

View File

@ -0,0 +1,3 @@
sensio_framework_extra:
router:
annotations: false

View File

@ -1,3 +1,3 @@
#index:
# path: /
# controller: App\Controller\DefaultController::index
# path: /
# controller: App\Controller\QuestionController::homepage

View File

@ -0,0 +1,7 @@
controllers:
resource: ../../src/Controller/
type: annotation
kernel:
resource: ../../src/Kernel.php
type: annotation

View File

@ -0,0 +1,27 @@
<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class QuestionController
{
/**
* @Route("/")
*/
public function homepage()
{
return new Response('What a bewitching controller we have conjured!');
}
/**
* @Route("/questions/{slug}")
*/
public function show($slug)
{
return new Response(sprintf(
ucwords(str_replace('-', ' ', $slug))
));
}
}

View File

@ -1,4 +1,19 @@
{
"doctrine/annotations": {
"version": "1.13",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
},
"files": [
"config/routes/annotations.yaml"
]
},
"doctrine/lexer": {
"version": "1.2.2"
},
"psr/cache": {
"version": "1.0.1"
},
@ -11,6 +26,18 @@
"psr/log": {
"version": "1.1.4"
},
"sensio/framework-extra-bundle": {
"version": "6.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "5.2",
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
},
"files": [
"config/packages/sensio_framework_extra.yaml"
]
},
"symfony/cache": {
"version": "v5.4.2"
},