Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.2.1 #118

Merged
merged 4 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
$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');

Check warning on line 176 in src/EduFramework/Core/Controller/Request.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/EduFramework/Core/Controller/Request.php#L176

The use of function file_get_contents() is discouraged
}
}
Loading