Skip to content

Commit

Permalink
Merge pull request #118 from studoo-app/2.x
Browse files Browse the repository at this point in the history
Release v2.2.1
  • Loading branch information
bfoujols authored Aug 23, 2024
2 parents cd7a98e + b7cdcfb commit 85a435a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/contributor/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Pour installer MKdocs, tapez la commande suivante :
Cette commande va installer MKdocs et les dépendances nécessaires.

```bash
python -m pip install requirements.txt
python -m pip install -r requirements.txt
```
!!! abstract "Pour aller plus loin"

Expand Down
4 changes: 0 additions & 4 deletions src/EduFramework/Commands/CreateApiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ private function generateController(string $className, array $router): void
//Add Imports
$namespace->addUse('Studoo\EduFramework\Core\Controller\ControllerInterface');
$namespace->addUse('Studoo\EduFramework\Core\Controller\Request');
$namespace->addUse('Studoo\EduFramework\Core\View\TwigCore');
$namespace->addUse('Twig\Error\LoaderError');
$namespace->addUse('Twig\Error\RuntimeError');
$namespace->addUse('Twig\Error\SyntaxError');
$namespace->addUse('OpenApi\Attributes');
//Generate ClassName
$class = $namespace->addClass($className);
Expand Down
4 changes: 2 additions & 2 deletions src/EduFramework/Core/ConfigCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public function __construct(array $config)
self::$config = array_merge(
[
'name' => 'EduFramework',
'version' => 'v2.2.0@stable',
'date_version' => '2024-07-08', // Date de la livraison de la version
'version' => 'v2.2.1@stable',
'date_version' => '2024-07-23', // Date de la livraison de la version
'php_version' => '8.2', // Warning : bin/edu require PHP 8.2 or higher
'base_path' => '/',
'twig_path' => '/app/Template',
Expand Down
9 changes: 9 additions & 0 deletions src/EduFramework/Core/Controller/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,13 @@ public function setRoute(string $route): Request
$this->route = $route;
return $this;
}

/**
* Permet de récupérer le body de la requête HTTP
* @return string
*/
public function getBody(): false|string
{
return file_get_contents('php://input');
}
}

0 comments on commit 85a435a

Please sign in to comment.