Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
LT php7 (#648)
Browse files Browse the repository at this point in the history
* Use libertAPI 1.0

* Doc and return values typed

* Updated travis

* Correction suite r/t

* json parsing isn't in stdClass anymore

* formatting issues
  • Loading branch information
prytoegrian authored May 21, 2018
1 parent 8ab1e6b commit 3c988da
Show file tree
Hide file tree
Showing 106 changed files with 1,873 additions and 1,235 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: php
php:
- '5.6'
- '7.0'
notifications:
email:
Expand Down
2 changes: 1 addition & 1 deletion App/Libraries/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private function request($method, $uri, array $options)
$emptyClass->data = [];
return $emptyClass;
}
$jsonBody = json_decode($body, false);
$jsonBody = json_decode($body, true);
if (null === $jsonBody) {
throw new \RuntimeException('La réponse n\'est pas du JSON');
}
Expand Down
8 changes: 4 additions & 4 deletions App/Views/Planning/Liste.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
<tr><td colspan="2"><center><?= _('aucun_resultat') ?></center></td></tr>
<?php else : ?>
<?php foreach ($plannings as $planning) : ?>
<tr><td><?= $planning->name ?></td>
<tr><td><?= $planning['name'] ?></td>
<td>
<form action="" method="post" accept-charset="UTF-8"
enctype="application/x-www-form-urlencoded">
<a title="<?= _('form_modif') ?>" href="<?= $lienModif ?>&amp;id=<?= $planning->id ?>"><i class="fa fa-pencil"></i></a>&nbsp;&nbsp;
<a title="<?= _('form_modif') ?>" href="<?= $lienModif ?>&amp;id=<?= $planning['id'] ?>"><i class="fa fa-pencil"></i></a>&nbsp;&nbsp;
<?php if ($isHr) : ?>
<?php if (in_array($planning->id, $listIdUsed)) : ?>
<?php if (in_array($planning['id'], $listIdUsed)) : ?>
<button title="<?= _('planning_used') ?>" type="button" class="btn btn-link disabled"><i class="fa fa-times-circle"></i></button>
<?php else : ?>
<input type="hidden" name="planning_id" value="<?= $planning->id ?>" />
<input type="hidden" name="planning_id" value="<?= $planning['id'] ?>" />
<input type="hidden" name="_METHOD" value="DELETE" />
<button type="submit" class="btn btn-link" title="<?= _('form_supprim') ?>"><i class="fa fa-times-circle"></i></button>
<?php endif ?>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Chaque nouvelle version est mise à disposition sur [github](https://github.com/
# Support minimum
| Logiciel | Version |
|-------|-----|
| php | 5.6 |
| php | 7.0 |
| mysql | 5.6 |
| apache| 2.4 |

Expand Down
8 changes: 4 additions & 4 deletions Tests/Units/App/Libraries/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ private function requestOk(callable $closure, $method, $uri, array $options)

$this->mock($this->client)->call('request')->withIdenticalArguments($method, $uri, $options)->once();

$this->string($request->code);
$this->string($request->status);
$this->string($request->message);
$this->string($request->data);
$this->string($request['code']);
$this->string($request['status']);
$this->string($request['message']);
$this->string($request['data']);
}

public function testClone()
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"vendor-dir": "vendor"
},
"require": {
"php": "^5.6|^7.0",
"php": "^7.0",
"ext-mbstring": "*",
"ext-Reflection": "*",
"ext-curl": "*",
Expand All @@ -37,7 +37,7 @@
"jasig/phpcas": "1.3.5",
"yohang/calendr": "^2.0",
"guzzlehttp/guzzle": "6.2.2",
"libertempo/libertempo-api": "0.7.0"
"libertempo/libertempo-api": "1.0.0"
},
"repositories": [
{
Expand Down
19 changes: 10 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3c988da

Please sign in to comment.