Skip to content
This repository was archived by the owner on Aug 14, 2022. It is now read-only.

Commit d12bca5

Browse files
committed
Library modified to be compatible with PHP 5.6 or higher
1 parent c79d867 commit d12bca5

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 1.1.0 - 2017-01-30
4+
* Compatible with PHP 5.6 or higher.
5+
6+
## 1.0.0-v - 2017-01-30
7+
* Compatible only with PHP 7.0 or higher. In the next versions, the library will be modified to make it compatible with PHP 5.6 or higher.
8+
39
## 1.0.0 - 2017-01-17
410
* Added `Josantonius\File\File` class.
511
* Added `Josantonius\File\File::searchString()` method.

README-ES.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ Para instalar PHP File library, simplemente escribe:
3232

3333
### Requisitos
3434

35-
Esta ĺibrería es soportada por versiones de PHP 7.0 o superiores y es compatible con versiones de HHVM 3.0 o superiores.
36-
37-
Para utilizar esta librería en HHVM (HipHop Virtual Machine) tendrás que activar los tipos escalares. Añade la siguiente ĺínea "hhvm.php7.scalar_types = true" en tu "/etc/hhvm/php.ini".
35+
Esta ĺibrería es soportada por versiones de PHP 5.6 o superiores y es compatible con versiones de HHVM 3.0 o superiores.
3836

3937
### Cómo empezar y ejemplos
4038

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ To install PHP File library, simply:
3232

3333
### Requirements
3434

35-
This library is supported by PHP versions 7.0 or higher and is compatible with HHVM versions 3.0 or higher.
36-
37-
To use this library in HHVM (HipHop Virtual Machine) you will have to activate the scalar types. Add the following line "hhvm.php7.scalar_types = true" in your "/etc/hhvm/php.ini".
35+
This library is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.
3836

3937
### Quick Start and Examples
4038

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "josantonius/file",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"type": "library",
55
"description": "PHP library for file management.",
66
"keywords": [
@@ -23,7 +23,7 @@
2323
"minimum-stability": "dev",
2424
"prefer-stable" : true,
2525
"require": {
26-
"php" : ">=7.0"
26+
"php" : ">=5.6"
2727
},
2828
"autoload": {
2929
"psr-4": {
@@ -40,4 +40,4 @@
4040
"dev-master": "1.0-dev"
4141
}
4242
}
43-
}
43+
}

src/Exception/FileException.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php declare(strict_types=1);
1+
<?php
22
/**
33
* PHP library for file management.
44
*
@@ -35,7 +35,7 @@ class FileException extends \Exception {
3535
* @param int $error → error code (Optional)
3636
* @param int $status → HTTP response status code (Optional)
3737
*/
38-
public function __construct(string $msg = '', int $error = 0, int $status = 0) {
38+
public function __construct($msg = '', $error = 0, $status = 0) {
3939

4040
$this->message = $msg;
4141
$this->code = $error;

src/File.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php declare(strict_types=1);
1+
<?php
22
/**
33
* PHP library for file management.
44
*
@@ -8,9 +8,9 @@
88
* @author Josantonius - [email protected]
99
* @copyright Copyright (c) 2017 JST PHP Framework
1010
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11-
* @version 1.0.0
11+
* @version 1.1.0
1212
* @link https://github.com/Josantonius/PHP-File
13-
* @since File available since 1.0.0 - Update: 2017-01-17
13+
* @since File available since 1.0.0 - Update: 2017-01-30
1414
*/
1515

1616
namespace Josantonius\File;
@@ -34,7 +34,7 @@ class File {
3434
*
3535
* @return bool
3636
*/
37-
public static function searchString(string $search, string $pathfile): bool {
37+
public static function searchString($search, $pathfile) {
3838

3939
$file = fopen($pathfile, "r+");
4040

tests/FileTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
* @author Josantonius - [email protected]
99
* @copyright Copyright (c) 2017 JST PHP Framework
1010
* @license https://opensource.org/licenses/MIT - The MIT License (MIT)
11-
* @version 1.0.0
11+
* @version 1.1.0
1212
* @link https://github.com/Josantonius/PHP-File
13-
* @since File available since 1.0.0 - Update: 2017-01-17
13+
* @since File available since 1.0.0 - Update: 2017-01-30
1414
*/
1515

1616
namespace Josantonius\File\Tests;

0 commit comments

Comments
 (0)