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

Commit a65c8cf

Browse files
committed
Updated to 1.1.4 version
1 parent 5d92fbf commit a65c8cf

File tree

1,367 files changed

+118494
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,367 files changed

+118494
-136
lines changed

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/tests export-ignore
2+
/src/bootstrap.php export-ignore
3+
/vendor export-ignore
24
.gitattributes export-ignore
35
.gitignore export-ignore
6+
_config.yml export-ignore
7+
.travis.yml export-ignore
48
CHANGELOG.md export-ignore
9+
phpunit.xml.dist export-ignore
510
CONDUCT.md export-ignore
611
contributors.txt export-ignore
712
README.md export-ignore

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ phpunit.xml
22
composer.phar
33
composer.lock
44
composer-test.lock
5-
vendor/
65
build/artifacts/
76
artifacts/
87
docs/_build

.travis.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: php
2+
3+
sudo: false
4+
5+
dist: trusty
6+
7+
git:
8+
depth: 5
9+
10+
php:
11+
- 5.6
12+
- 7.0
13+
- 7.1
14+
- hhvm
15+
- nightly
16+
17+
matrix:
18+
fast_finish: true
19+
allow_failures:
20+
- php: nightly
21+
22+
before_script:
23+
- composer self-update
24+
- composer install
25+
26+
script:
27+
- composer test

CHANGELOG.md

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

3+
## 1.1.4 - 2017-09-13
4+
5+
* Unit tests supported by `PHPUnit` were added.
6+
7+
* The repository was synchronized with Travis CI to implement continuous integration.
8+
9+
* Added `File/src/bootstrap.php` file
10+
11+
* Added `File/tests/bootstrap.php` file.
12+
13+
* Added `File/phpunit.xml.dist` file.
14+
* Added `File/_config.yml` file.
15+
* Added `File/.travis.yml` file.
16+
17+
* Deleted `Josantonius\File\Tests\FileTest::testSearchString()` method.
18+
19+
* Deleted `Josantonius\File\Tests\FileTest` class.
20+
* Deleted `Josantonius\File\Tests\FileTest::testSearchString()` method.
21+
22+
* Added `Josantonius\File\Test\FileTest` class.
23+
* Added `Josantonius\File\Test\FileTest::testIfLocalFileExists()` method.
24+
* Added `Josantonius\File\Test\FileTest::testIfLocalFileDoesNotExists()` method.
25+
* Added `Josantonius\File\Test\FileTest::testIfExternalFileExists()` method.
26+
* Added `Josantonius\File\Test\FileTest::testIfExternalFileDoesNotExists()` method.
27+
* Added `Josantonius\File\Test\FileTest::testDeleteLocalFile()` method.
28+
* Added `Josantonius\File\Test\FileTest::testDeleteMissingLocalFile()` method.
29+
* Added `Josantonius\File\Test\FileTest::testCreateDir()` method.
30+
* Added `Josantonius\File\Test\FileTest::testCreateDirError()` method.
31+
* Added `Josantonius\File\Test\FileTest::testDeleteEmptyDir()` method.
32+
* Added `Josantonius\File\Test\FileTest::testDeleteEmptyDirError()` method.
33+
* Added `Josantonius\File\Test\FileTest::testDeleteDirRecursively()` method.
34+
* Added `Josantonius\File\Test\FileTest::testDeleteMissingDirRecursively()` method.
35+
* Added `Josantonius\File\Test\FileTest::testGetFilesFromDir()` method.
36+
* Added `Josantonius\File\Test\FileTest::testGetFilesFromMissingDir()` method.
37+
338
## 1.1.3 - 2017-09-03
439

540
* Added `Josantonius\File\File::exists()` method.
@@ -10,28 +45,35 @@
1045
* Added `Josantonius\File\File::getFilesFromDir()` method.
1146

1247
## 1.1.2 - 2017-07-16
48+
1349
* Deleted `Josantonius\File\Exception\FileException` class.
1450
* Deleted `Josantonius\File\Exception\Exceptions` abstract class.
1551
* Deleted `Josantonius\File\Exception\FileException->__construct()` method.
1652

1753
## 1.1.1 - 2017-03-18
54+
1855
* Some files were excluded from download and comments and readme files were updated.
1956

2057
## 1.1.0 - 2017-01-30
58+
2159
* Compatible with PHP 5.6 or higher.
2260

2361
## 1.0.0 - 2017-01-30
62+
2463
* 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.
2564

2665
## 1.0.0 - 2017-01-17
66+
2767
* Added `Josantonius\File\File` class.
2868
* Added `Josantonius\File\File::searchString()` method.
2969

3070
## 1.0.0 - 2017-01-17
71+
3172
* Added `Josantonius\File\Exception\FileException` class.
3273
* Added `Josantonius\File\Exception\Exceptions` abstract class.
3374
* Added `Josantonius\File\Exception\FileException->__construct()` method.
3475

3576
## 1.0.0 - 2017-01-17
77+
3678
* Added `Josantonius\File\Tests\FileTest` class.
3779
* Added `Josantonius\File\Tests\FileTest::testSearchString()` method.

README-ES.md

+7-31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP File library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/file/v/stable)](https://packagist.org/packages/josantonius/file) [![Total Downloads](https://poser.pugx.org/josantonius/file/downloads)](https://packagist.org/packages/josantonius/file) [![Latest Unstable Version](https://poser.pugx.org/josantonius/file/v/unstable)](https://packagist.org/packages/josantonius/file) [![License](https://poser.pugx.org/josantonius/file/license)](https://packagist.org/packages/josantonius/file)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/file/v/stable)](https://packagist.org/packages/josantonius/file) [![Total Downloads](https://poser.pugx.org/josantonius/file/downloads)](https://packagist.org/packages/josantonius/file) [![Latest Unstable Version](https://poser.pugx.org/josantonius/file/v/unstable)](https://packagist.org/packages/josantonius/file) [![License](https://poser.pugx.org/josantonius/file/license)](https://packagist.org/packages/josantonius/file) [![Travis](https://travis-ci.org/Josantonius/PHP-File.svg)](https://travis-ci.org/Josantonius/PHP-File)
44

55
[English version](README.md)
66

@@ -22,16 +22,6 @@ Biblioteca PHP para manejo de archivos.
2222

2323
---
2424

25-
<p align="center"><strong>Echa un vistazo al código</strong></p>
26-
27-
<p align="center">
28-
<a href="https://youtu.be/DNsyo9iVPq8" title="Echa un vistazo al código">
29-
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
30-
</a>
31-
</p>
32-
33-
---
34-
3525
### Instalación
3626

3727
La mejor forma de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
@@ -82,35 +72,21 @@ Ejemplo de uso para esta biblioteca:
8272
require __DIR__ . '/vendor/autoload.php';
8373

8474
use Josantonius\File\File;
85-
86-
$search = 'Morbi';
87-
88-
$filepath = getcwd() . '/' . 'resources/file.txt';
89-
90-
File::searchString($search, $filepath); /* bool(true) */
9175
```
9276

9377
### Tests
9478

95-
Para utilizar la clase de [pruebas](tests), simplemente:
79+
Para ejecutar las [pruebas](tests/File/test) simplemente:
9680

97-
```php
98-
<?php
99-
$loader = require __DIR__ . '/vendor/autoload.php';
81+
$ git clone https://github.com/Josantonius/PHP-File.git
82+
83+
$ cd PHP-File
10084

101-
$loader->addPsr4('Josantonius\\File\\Tests\\', __DIR__ . '/vendor/josantonius/file/tests');
102-
103-
use Josantonius\File\Tests\FileTest;
104-
```
105-
Métodos de prueba disponibles en esta biblioteca:
106-
107-
```php
108-
FileTest::testSearchString();
109-
```
85+
$ phpunit
11086

11187
## ☑ TODO
11288

113-
- [ ] Completar tests
89+
- [*] Completar tests
11490
- [ ] Completar archivos README
11591

11692
### Contribuir

README.md

+7-27
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP File library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/file/v/stable)](https://packagist.org/packages/josantonius/file) [![Total Downloads](https://poser.pugx.org/josantonius/file/downloads)](https://packagist.org/packages/josantonius/file) [![Latest Unstable Version](https://poser.pugx.org/josantonius/file/v/unstable)](https://packagist.org/packages/josantonius/file) [![License](https://poser.pugx.org/josantonius/file/license)](https://packagist.org/packages/josantonius/file)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/file/v/stable)](https://packagist.org/packages/josantonius/file) [![Total Downloads](https://poser.pugx.org/josantonius/file/downloads)](https://packagist.org/packages/josantonius/file) [![Latest Unstable Version](https://poser.pugx.org/josantonius/file/v/unstable)](https://packagist.org/packages/josantonius/file) [![License](https://poser.pugx.org/josantonius/file/license)](https://packagist.org/packages/josantonius/file) [![Travis](https://travis-ci.org/Josantonius/PHP-File.svg)](https://travis-ci.org/Josantonius/PHP-File)
44

55
[Versión en español](README-ES.md)
66

@@ -22,16 +22,6 @@ PHP library for file management.
2222

2323
---
2424

25-
<p align="center"><strong>Take a look at the code</strong></p>
26-
27-
<p align="center">
28-
<a href="https://youtu.be/DNsyo9iVPq8" title="Take a look at the code">
29-
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
30-
</a>
31-
</p>
32-
33-
---
34-
3525
### Installation
3626

3727
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
@@ -82,31 +72,21 @@ Example of use for this library:
8272
require __DIR__ . '/vendor/autoload.php';
8373

8474
use Josantonius\File\File;
85-
86-
$search = 'Morbi';
87-
88-
$filepath = getcwd() . '/' . 'resources/file.txt';
89-
90-
File::searchString($search, $filepath); /* bool(true) */
9175
```
9276

9377
### Tests
9478

95-
To use the [test](tests) class, simply:
96-
97-
```php
98-
<?php
99-
$loader = require __DIR__ . '/vendor/autoload.php';
100-
101-
$loader->addPsr4('Josantonius\\File\\Tests\\', __DIR__ . '/vendor/josantonius/file/tests');
79+
To run [tests](tests/File/test) simply:
10280

103-
use Josantonius\File\Tests\FileTest;
81+
$ git clone https://github.com/Josantonius/PHP-File.git
82+
83+
$ cd PHP-File
10484

105-
```
85+
$ phpunit
10686

10787
## ☑ TODO
10888

109-
- [ ] Expand tests
89+
- [*] Expand tests
11090
- [ ] Expand README files
11191

11292
Available test methods in this library:

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-cayman

composer.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "josantonius/file",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"type": "library",
55
"description": "PHP library for file management.",
66
"keywords": [
@@ -21,6 +21,8 @@
2121
}
2222
],
2323
"support": {
24+
"issues": "https://github.com/josantonius/php-file/issues",
25+
"forum": "http://stackoverflow.com/tags/josantonius/php-file",
2426
"source": "https://github.com/josantonius/php-file"
2527
},
2628
"config": {
@@ -30,19 +32,20 @@
3032
"require": {
3133
"php": "^5.6 || ^7.0"
3234
},
35+
"require-dev": {
36+
"phpunit/phpunit": "5.7.*"
37+
},
3338
"autoload": {
3439
"psr-4": {
35-
"Josantonius\\File\\": "src/"
36-
}
37-
},
38-
"autoload-dev": {
39-
"psr-4": {
40-
"Josantonius\\File\\Tests\\": "tests/"
40+
"Josantonius\\File\\": "src/File/"
4141
}
4242
},
4343
"extra": {
4444
"branch-alias": {
4545
"dev-master": "1.0-dev"
4646
}
47+
},
48+
"scripts": {
49+
"test": "phpunit"
4750
}
4851
}

phpunit.xml.dist

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="tests/bootstrap.php"
13+
>
14+
<testsuites>
15+
<testsuite name="File Test Suite">
16+
<directory>tests/File</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
<filter>
21+
<whitelist>
22+
<directory>src/File</directory>
23+
</whitelist>
24+
</filter>
25+
</phpunit>

0 commit comments

Comments
 (0)