Skip to content

Commit e106c4f

Browse files
committed
Updated the version of PyramidalTests to version 2.
1 parent 898bfc6 commit e106c4f

17 files changed

+1390
-646
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ nbproject/
44
!.editorconfig
55
!.gitignore
66
!.php_cs.dist
7-
!.travis.yml
7+
!.travis.yml
8+
!.php-cs-fixer.dist.php

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
])
88
;
99

10-
return PhpCsFixer\Config::create()
11-
->setRules([
10+
$config = new PhpCsFixer\Config();
11+
12+
return $config->setRules([
1213
'@PSR1' => true,
1314
'@PSR2' => true,
1415
'no_unused_imports' => true,
16+
'ordered_imports' => true,
1517
'single_blank_line_before_namespace' => true,
1618
])
1719
->setFinder($finder)

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ php:
44
- '7.2'
55
- '7.3'
66
- '7.4'
7-
#- '8.0'
7+
- '8.0'
8+
- '8.1'
89

910
before_script: composer update
10-
script: vendor/bin/phpunit
11+
script: composer test

README.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
<div align="center">
2-
<a href="https://github.com/thenlabs/class-builder/blob/v1/LICENSE.txt" target="_blank">
3-
<img src="https://img.shields.io/github/license/thenlabs/class-builder?style=for-the-badge">
4-
</a>
5-
<img src="https://img.shields.io/packagist/php-v/thenlabs/class-builder?style=for-the-badge">
6-
<a href="https://travis-ci.com/github/thenlabs/class-builder" target="_blank">
7-
<img src="https://img.shields.io/travis/com/thenlabs/class-builder?style=for-the-badge">
8-
</a>
9-
<a href="https://twitter.com/ThenLabsOrg" target="_blank">
10-
<img src="https://img.shields.io/twitter/follow/thenlabs?style=for-the-badge">
11-
</a>
12-
</div>
1+
# ClassBuilder
132

14-
<br>
3+
Dynamic management of classes, traits and interfaces in PHP.
154

16-
<h1 align="center">ClassBuilder</h1>
17-
<h3 align="center">Dynamic management of classes, traits and interfaces in PHP.</h3>
5+
>If you like this project gift us a ⭐.
186
19-
<br>
7+
## Documentation.
208

21-
The next example shows a way to create dinamically a PHP class using our `ClassBuilder`. Learn more in the documentation.
9+
1. English (Pending)
10+
2. [Español](doc/es/index.md)
11+
12+
## Installation.
13+
14+
$ composer require thenlabs/class-builder
15+
16+
>Require PHP >= 7.2
17+
18+
## Example.
19+
20+
The next example shows a way to create dinamically a PHP class using our `ClassBuilder`.
2221

2322
```php
2423
<?php
@@ -46,28 +45,19 @@ $andy->getName() === 'Andy'; // true
4645
$andy instanceof \ThenLabs\Demo\Person; // true
4746
```
4847

49-
## 📖 Documentation.
50-
51-
1. 🇬🇧 English (Pending)
52-
2. [🇪🇸 Español](https://thenlabs.org/es/doc/class-builder/master/index.html)
48+
## Development.
5349

54-
## 🧪 Running the tests.
50+
Clone this repository and install the Composer dependencies.
5551

56-
All the tests of this project was written with our testing framework [PyramidalTests][pyramidal-tests] wich is an extension of [PHPUnit][phpunit].
52+
$ composer install
5753

58-
After clone this repository, install the Composer dependencies:
54+
### Running the tests.
5955

60-
$ composer install
56+
All the tests of this project was written with our testing framework [PyramidalTests][pyramidal-tests] wich is based on [PHPUnit][phpunit].
6157

62-
Run PHPUnit:
58+
Run tests:
6359

64-
$ ./vendor/bin/phpunit
60+
$ composer test
6561

6662
[phpunit]: https://phpunit.de
6763
[pyramidal-tests]: https://github.com/thenlabs/pyramidal-tests
68-
69-
If you want to run the tests with a specific version of PHP, it is possible to use Docker as follows:
70-
71-
$ docker run -it --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp php:7.2-cli php vendor/bin/phpunit
72-
73-
>Change 7.2 for the desired PHP version.

bootstrap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
<?php
22

33
require_once __DIR__ . '/vendor/autoload.php';
4-
require_once __DIR__ . '/vendor/thenlabs/pyramidal-tests/src/DSL/PHPUnit.php';

composer.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"name": "thenlabs/class-builder",
3+
"description": "Dynamic management of classes, traits and interfaces in PHP.",
4+
"keywords": [
5+
"builder",
6+
"builder-pattern",
7+
"php-class",
8+
"php-classes",
9+
"php-builder"
10+
],
311
"license": "MIT",
412
"authors": [
513
{
@@ -11,8 +19,8 @@
1119
"php": ">=7.2"
1220
},
1321
"require-dev": {
14-
"friendsofphp/php-cs-fixer": "^2.12",
15-
"thenlabs/pyramidal-tests": "^1.0",
22+
"friendsofphp/php-cs-fixer": "^3.2",
23+
"thenlabs/pyramidal-tests": "2.0.x-dev",
1624
"doctrine/annotations": "^1.8"
1725
},
1826
"autoload": {
@@ -24,5 +32,9 @@
2432
"psr-4": {
2533
"ThenLabs\\ClassBuilder\\Tests\\": "tests/"
2634
}
35+
},
36+
"scripts": {
37+
"fix": "./vendor/bin/php-cs-fixer fix",
38+
"test": "./vendor/bin/pyramidal"
2739
}
2840
}

0 commit comments

Comments
 (0)