Skip to content

Commit e9b048b

Browse files
authored
Merge pull request #5 from eclipxe13/master
Library maintenance
2 parents 00fe9b2 + d421e0b commit e9b048b

9 files changed

+29
-22
lines changed

.scrutinizer.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ filter:
44
- 'vendor/'
55

66
build:
7+
dependencies:
8+
override:
9+
- composer self-update --no-interaction --no-progress
10+
- composer remove squizlabs/php_codesniffer friendsofphp/php-cs-fixer phpstan/phpstan --dev --no-interaction --no-progress --no-update
11+
- composer install --no-interaction
712
nodes:
813
analysis:
914
tests:

.travis.yml

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
language: php
22

33
# php compatibility
4-
php:
5-
- "7.2"
6-
- "7.3"
7-
- "7.4snapshot"
8-
9-
matrix:
10-
allow_failures:
11-
- php: "7.4snapshot"
12-
13-
env:
14-
global:
15-
- PHP_CS_FIXER_FUTURE_MODE=1
16-
- PHP_CS_FIXER_IGNORE_ENV=1
4+
php: ["7.2", "7.3", "7.4"]
175

186
cache:
197
- directories:

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 PHPCFDI
3+
Copyright (c) 2019 - 2020 PHPCFDI
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,15 @@ $document->load('archivo-cfdi.xml');
6363

6464
// obtenemos la expresión
6565
$expression = $extractor->extract($document);
66+
67+
// y también podemos obtener los valores inviduales
68+
$values = $extractor->obtain($document);
6669
```
6770

6871
## Compatilibilidad
6972

7073
Esta librería se mantendrá compatible con al menos la versión con
71-
[soporte activo de PHP](http://php.net/supported-versions.php) más reciente.
74+
[soporte activo de PHP](https://www.php.net/supported-versions.php) más reciente.
7275

7376
También utilizamos [Versionado Semántico 2.0.0](https://semver.org/lang/es/) por lo que puedes usar esta librería
7477
sin temor a romper tu aplicación.
@@ -95,15 +98,15 @@ and licensed for use under the MIT License (MIT). Please see [LICENSE][] for mor
9598
[source]: https://github.com/phpcfdi/cfdi-expresiones
9699
[release]: https://github.com/phpcfdi/cfdi-expresiones/releases
97100
[license]: https://github.com/phpcfdi/cfdi-expresiones/blob/master/LICENSE
98-
[build]: https://travis-ci.org/phpcfdi/cfdi-expresiones?branch=master
101+
[build]: https://travis-ci.com/phpcfdi/cfdi-expresiones?branch=master
99102
[quality]: https://scrutinizer-ci.com/g/phpcfdi/cfdi-expresiones/
100103
[coverage]: https://scrutinizer-ci.com/g/phpcfdi/cfdi-expresiones/code-structure/master/code-coverage
101104
[downloads]: https://packagist.org/packages/phpcfdi/cfdi-expresiones
102105

103106
[badge-source]: https://img.shields.io/badge/source-phpcfdi/cfdi--expresiones-blue.svg?style=flat-square
104107
[badge-release]: https://img.shields.io/github/release/phpcfdi/cfdi-expresiones.svg?style=flat-square
105108
[badge-license]: https://img.shields.io/github/license/phpcfdi/cfdi-expresiones.svg?style=flat-square
106-
[badge-build]: https://img.shields.io/travis/phpcfdi/cfdi-expresiones/master.svg?style=flat-square
109+
[badge-build]: https://img.shields.io/travis/com/phpcfdi/cfdi-expresiones/master.svg?style=flat-square
107110
[badge-quality]: https://img.shields.io/scrutinizer/g/phpcfdi/cfdi-expresiones/master.svg?style=flat-square
108111
[badge-coverage]: https://img.shields.io/scrutinizer/coverage/g/phpcfdi/cfdi-expresiones/master.svg?style=flat-square
109112
[badge-downloads]: https://img.shields.io/packagist/dt/phpcfdi/cfdi-expresiones.svg?style=flat-square

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
"ext-dom": "*"
2828
},
2929
"require-dev": {
30-
"phpunit/phpunit": "^8.4",
30+
"phpunit/phpunit": "^8.5",
3131
"squizlabs/php_codesniffer": "^3.0",
3232
"friendsofphp/php-cs-fixer": "^2.4",
33-
"phpstan/phpstan-shim": "^0.11"
33+
"phpstan/phpstan": "^0.12"
3434
},
3535
"autoload": {
3636
"psr-4": {

docs/CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
Notice: This library follows [SEMVER 2.0.0](https://semver.org/spec/v2.0.0.html) convention.
44

5+
## Version 3.0.1 2020-01-24
6+
7+
This is a maintenance release.
8+
9+
- Add example for `obtain` method.
10+
- Upgrade from `phpstan/phpstan-shim: ^0.11` to `phpstan/phpstan-shim: ^0.12`.
11+
- Update license year to 2020.
12+
- Fix links on README.
13+
- Update Travis-CI and Scrutinizer-CI scripts.
14+
515
## Version 3.0.0 2019-10-24
616

717
You should not have any trouble upgrading to from version `2.0.0` to `3.0.0` unless you are creating a concrete

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.4/phpunit.xsd"
2+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
33
bootstrap="./tests/bootstrap.php" colors="true" verbose="true" cacheResultFile="build/phpunit.result.cache">
44
<testsuites>
55
<testsuite name="Default">

src/ExpressionExtractorInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function matches(DOMDocument $document): bool;
2727
* Obtain the relevant values from the given XML Document
2828
*
2929
* @param DOMDocument $document
30-
* @return array
30+
* @return array<string, string>
3131
*/
3232
public function obtain(DOMDocument $document): array;
3333

tests/Unit/DiscoverExtractorTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public function testThrowExceptionOnUnmatchedDocument(): void
4141
$extrator->extract($document);
4242
}
4343

44-
public function providerExpressionOnValidDocuments()
44+
/** @return array<string, array> */
45+
public function providerExpressionOnValidDocuments(): array
4546
{
4647
return [
4748
'Cfdi33' => [$this->documentCfdi33(), 'CFDI33'],

0 commit comments

Comments
 (0)