Skip to content

Commit b480f2d

Browse files
authored
Merge pull request #38 from eclipxe13/fix-build-20221219
Mantenimiento 2022-12-20 (v0.5.1)
2 parents f6ed886 + 78c9029 commit b480f2d

10 files changed

Lines changed: 113 additions & 24 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup PHP
1919
uses: shivammathur/setup-php@v2 # see https://github.com/marketplace/actions/setup-php-action
2020
with:
21-
php-version: '8.1'
21+
php-version: '8.2'
2222
coverage: none
2323
tools: composer-normalize
2424
env:
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup PHP
3636
uses: shivammathur/setup-php@v2 # see https://github.com/marketplace/actions/setup-php-action
3737
with:
38-
php-version: '8.1'
38+
php-version: '8.2'
3939
coverage: none
4040
tools: cs2pr, phpcs
4141
env:
@@ -67,17 +67,17 @@ jobs:
6767
- name: Checkout
6868
uses: actions/checkout@v3
6969
- name: Setup PHP
70-
uses: shivammathur/setup-php@v2 # see https://github.com/marketplace/actions/setup-php-action
70+
uses: shivammathur/setup-php@v2
7171
with:
72-
php-version: '8.1'
72+
php-version: '8.2'
7373
coverage: none
7474
tools: composer:v2, phpstan
7575
extensions: soap
7676
env:
7777
fail-fast: true
7878
- name: Get composer cache directory
7979
id: composer-cache
80-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
80+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8181
- name: Cache dependencies
8282
uses: actions/cache@v3
8383
with:
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: "ubuntu-latest"
9595
strategy:
9696
matrix:
97-
php-versions: ['7.3', '7.4', '8.0', '8.1']
97+
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2']
9898
steps:
9999
- name: Checkout
100100
uses: actions/checkout@v3
@@ -109,7 +109,7 @@ jobs:
109109
fail-fast: true
110110
- name: Get composer cache directory
111111
id: composer-cache
112-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
112+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
113113
- name: Cache dependencies
114114
uses: actions/cache@v3
115115
with:

.github/workflows/functional-tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
push:
66
branches: [ 'main' ]
77

8+
# Actions
9+
# shivammathur/setup-php@v2 https://github.com/marketplace/actions/setup-php-action
10+
# sudo-bot/action-scrutinizer@latest https://github.com/marketplace/actions/action-scrutinizer
11+
812
jobs:
913
functional-tests:
1014
name: Functional tests
@@ -14,12 +18,13 @@ jobs:
1418

1519
- name: Checkout
1620
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0 # required for sudo-bot/action-scrutinizer
1723

18-
# see https://github.com/marketplace/actions/setup-php-action
1924
- name: Setup PHP
2025
uses: shivammathur/setup-php@v2
2126
with:
22-
php-version: '8.1'
27+
php-version: '8.2'
2328
extensions: soap
2429
coverage: xdebug
2530
tools: composer:v2
@@ -28,7 +33,7 @@ jobs:
2833

2934
- name: Get composer cache directory
3035
id: composer-cache
31-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
36+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
3237

3338
- name: Cache dependencies
3439
uses: actions/cache@v3
@@ -51,7 +56,6 @@ jobs:
5156
- name: Run integration tests with code coverage
5257
run: vendor/bin/phpunit --testdox --verbose --exclude-group large --coverage-clover=build/coverage-clover.xml
5358

54-
# see https://github.com/marketplace/actions/action-scrutinizer
5559
- name: Upload code coverage to scrutinizer
5660
uses: sudo-bot/action-scrutinizer@latest
5761
with:

.phive/phars.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<phive xmlns="https://phar.io/phive">
33
<phar name="phpcs" version="^3.7.1" installed="3.7.1" location="./tools/phpcs" copy="false"/>
44
<phar name="phpcbf" version="^3.7.1" installed="3.7.1" location="./tools/phpcbf" copy="false"/>
5-
<phar name="php-cs-fixer" version="^3.11.0" installed="3.11.0" location="./tools/php-cs-fixer" copy="false"/>
6-
<phar name="phpstan" version="^1.8.4" installed="1.8.4" location="./tools/phpstan" copy="false"/>
7-
<phar name="composer-normalize" version="^2.28.3" installed="2.28.3" location="./tools/composer-normalize" copy="false"/>
5+
<phar name="php-cs-fixer" version="^3.13.1" installed="3.13.1" location="./tools/php-cs-fixer" copy="false"/>
6+
<phar name="phpstan" version="^1.9.4" installed="1.9.4" location="./tools/phpstan" copy="false"/>
7+
<phar name="composer-normalize" version="^2.29.3" installed="2.29.0" location="./tools/composer-normalize" copy="false"/>
88
</phive>

.php-cs-fixer.dist.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@
1111

1212
return (new PhpCsFixer\Config())
1313
->setRiskyAllowed(true)
14-
->setCacheFile(__DIR__ . '/build/php_cs.cache')
14+
->setCacheFile(__DIR__ . '/build/php-cs-fixer.cache')
1515
->setRules([
1616
'@PSR12' => true,
1717
'@PSR12:risky' => true,
1818
'@PHP71Migration:risky' => true,
1919
'@PHP73Migration' => true,
20-
// PSR12 (remove when php-cs-fixer reaches ^3.1.1)
21-
'class_definition' => ['space_before_parenthesis' => true],
2220
// symfony
2321
'class_attributes_separation' => true,
2422
'whitespace_after_comma_in_array' => true,
2523
'no_empty_statement' => true,
2624
'no_extra_blank_lines' => true,
2725
'function_typehint_space' => true,
26+
'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arrays']],
2827
'no_blank_lines_after_phpdoc' => true,
2928
'object_operator_without_whitespace' => true,
3029
'binary_operator_spaces' => true,
@@ -37,16 +36,18 @@
3736
'standardize_not_equals' => true,
3837
'concat_space' => ['spacing' => 'one'],
3938
'linebreak_after_opening_tag' => true,
39+
'fully_qualified_strict_types' => true,
4040
// symfony:risky
4141
'no_alias_functions' => true,
4242
'self_accessor' => true,
4343
// contrib
4444
'not_operator_with_successor_space' => true,
45+
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']], // @PSR12 sort_algorithm: none
4546
])
4647
->setFinder(
4748
PhpCsFixer\Finder::create()
4849
->in(__DIR__)
4950
->append([__FILE__])
50-
->exclude(['vendor', 'tools', 'build'])
51+
->exclude(['vendor', 'tools', 'build']),
5152
)
5253
;

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ Durante el proceso de implementación he creado diversas notas y documentos:
234234
- [X] [El acuse de cancelación entregado al cancelar y al solicitar el acuse no coinciden](docs/issues/AcuseCancelacionNoCoincidente.md)
235235
- [X] [Error de cancelación de retenciones 1308 - Certificado revocado o caduco](docs/issues/CancelacionRetencionesError1308.md)
236236
- [X] [El valor `CodEstatus` está ausente en la cancelación de CFDI de Retenciones](docs/issues/CancelacionRetencionesCodEstatus.md)
237+
- [ ] [El método `Registration#Get` con `taxpayer_id` vacío no devuelve el listado de clientes](docs/issues/RegistrationGetNoList.md)
237238

238239
## Compatibilidad
239240

@@ -273,7 +274,7 @@ and licensed for use under the MIT License (MIT). Please see [LICENSE][] for mor
273274
[badge-source]: https://img.shields.io/badge/source-phpcfdi/finkok-blue?style=flat-square
274275
[badge-release]: https://img.shields.io/github/release/phpcfdi/finkok?style=flat-square
275276
[badge-license]: https://img.shields.io/github/license/phpcfdi/finkok?style=flat-square
276-
[badge-build]: https://img.shields.io/github/workflow/status/phpcfdi/finkok/build/main?style=flat-square
277+
[badge-build]: https://img.shields.io/github/actions/workflow/status/phpcfdi/finkok/build.yml?branch=main&style=flat-square
277278
[badge-quality]: https://img.shields.io/scrutinizer/g/phpcfdi/finkok/main?style=flat-square
278279
[badge-coverage]: https://img.shields.io/scrutinizer/coverage/g/phpcfdi/finkok/main?style=flat-square
279280
[badge-downloads]: https://img.shields.io/packagist/dt/phpcfdi/finkok?style=flat-square

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"eclipxe/micro-catalog": "^0.1.0",
3131
"phpcfdi/cfdi-expresiones": "^3.2",
3232
"phpcfdi/credentials": "^1.0.1",
33-
"phpcfdi/xml-cancelacion": "^2.0.1",
33+
"phpcfdi/xml-cancelacion": "^2.0.2",
3434
"psr/log": "^1.1 || ^2.0 || ^3.0",
3535
"robrichards/xmlseclibs": "^3.0.4"
3636
},

docs/CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,27 @@ Nos apegamos a [SEMVER](SEMVER.md), revisa la información para entender mejor e
66

77
Estos cambios se aplican y se publican, pero aún no son parte de una versión liberada.
88

9-
### 2022-09-05
9+
## Versión 0.5.1 2022-12-19
10+
11+
Se actualiza `phpcfdi/xml-cancelacion` a la versión `^2.0.2`.
12+
Esta actualización remueve el atributo vacío `FolioSustitucion` en la solicitud de cancelación firmada.
13+
Se aplican los cambios necesarios en las pruebas.
14+
15+
Se documenta el error de funcionamiento en Finkok en el método `Registration#Get`.
16+
17+
### Cambios de entorno de desarrollo
18+
19+
- Se actualizan las herramientas de desarrollo.
20+
- Se actualiza la herramienta configuración de `php-cs-fixer` a la última usada por los otros proyectos de PhpCfdi.
21+
- Se actualizan los flujos de trabajo de GitHub:
22+
- Se agrega PHP 8.2 a la matriz de pruebas.
23+
- Se cambia el uso de `::set-output` por `$GITHUB_OUTPUT`.
24+
- Los trabajos corren en PHP 8.2, excepto por `php-cs-fixer`.
25+
- Se agrega `fetch-depth: 0` cuando se sube la cobertura de código a Scrutinizer-CI.
26+
27+
### Se integran los cambios previos no liberados
28+
29+
#### 2022-09-05
1030

1131
El proceso de integración contínua con las herramientas de desarrollo actualizadas falló,
1232
por lo que se aplicaron los siguientes cambios:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# El método `Registration#Get` con `taxpayer_id` vacío no devuelve el listado de clientes
2+
3+
## Descripción
4+
5+
El método `Registration#Get` debería devolver todos los clientes relacionados con la cuenta
6+
cuando no se envía el parámetro `taxpayer_id`.
7+
8+
Así está documentado en el webservice:
9+
10+
- https://facturacion.finkok.com/servicios/soap/registration.wsdl
11+
12+
> This function lists all the user of the account if no taxpayer_id is passed
13+
> otherwise will return the taxpayer_id and status of the given user.
14+
15+
```xml
16+
<wsdl:operation name="get" parameterOrder="get">
17+
<wsdl:documentation>
18+
This function lists all the user of the account if no taxpayer_id is passed otherwise will return the taxpayer_id and status of the given user.
19+
</wsdl:documentation>
20+
<wsdl:input name="get" message="tns:get"/>
21+
<wsdl:output name="getResponse" message="tns:getResponse"/>
22+
</wsdl:operation>
23+
```
24+
25+
Y en la documentación:
26+
27+
- <https://wiki.finkok.com/doku.php?id=get>
28+
29+
> Este método tiene como finalidad la de otorgar al socio de negocios un listado
30+
> o el status del RFC Emisor que esté ingresando y tenga registrado en su cuenta.
31+
32+
Al correr pruebas de integración, hemos notado que este ya no es el caso, y en su lugar, en vez de devolver el listado,
33+
devuelve el mensaje `RFC Invalido` (así, sin acento). Anteriormente, sí devolvía el listado de clientes.
34+
35+
## Reporte
36+
37+
Se reportó a Finkok en el [ticket #66516](https://support.finkok.com/support/tickets/66516), sin embargo,
38+
la respuesta fue que —efectivamente— este método se comportaba de la manera documentada y esperada en el
39+
entorno de pruebas, pero que el cambio nunca llegó a producción. Actualmente, no devuelve el listado de
40+
clientes ni en el entorno de pruebas ni en producción.
41+
42+
También comentan que se agregará otro método diferente para poder obtener el listado, sin embargo,
43+
todavía no tienen fecha estimada para la implementación.
44+
45+
Finkok debería considerar esto como un fallo en su aplicación, no como una nueva funcionalidad a agregar.
46+
Y, consecuentemente, darle prioridad alta para repararlo.
47+
48+
## Solución
49+
50+
No existe solución. La recomendación que te hacemos desde esta librería es:
51+
52+
1. Levanta un ticket comentando que necesitas este método funcionando.
53+
2. Lleva un control de tus clientes y usa la interfaz web para corroborar que estás en sincronía.
54+
55+
## Actualizaciones
56+
57+
2022-12-20: Se reportó y documentó el problema.

tests/Integration/Services/Registration/ObtainServiceTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ public function testConsumeObtainServiceGettingAllRecords(): void
4444
{
4545
$service = $this->createService();
4646
$result = $service->obtain(new ObtainCommand());
47+
if ('RFC Invalido' === $result->message()) {
48+
$this->markTestSkipped(<<< MESSAGE
49+
Finkok does not have implemented the list of customers.
50+
See https://support.finkok.com/support/tickets/66516
51+
MESSAGE);
52+
}
4753

4854
$this->assertSame('', $result->message());
4955
$this->assertGreaterThanOrEqual(1, count($result->customers()));

tests/_files/cancel-cancelsignature-format.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Cancelacion xmlns="http://cancelacfd.sat.gob.mx" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" RfcEmisor="EKU9003173C9" Fecha="2022-01-06T17:49:12">
44
<Folios>
5-
<Folio UUID="62B00C5E-4187-4336-B569-44E0030DC729" Motivo="02" FolioSustitucion=""></Folio>
5+
<Folio UUID="62B00C5E-4187-4336-B569-44E0030DC729" Motivo="02"></Folio>
66
</Folios>
77
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
88
<SignedInfo>
@@ -13,10 +13,10 @@
1313
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
1414
</Transforms>
1515
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
16-
<DigestValue>C5CrlWmW2k+LRbwIz2JTydPW2+g=</DigestValue>
16+
<DigestValue>28wlg0suJ57t4P4P+LshbcH5PYE=</DigestValue>
1717
</Reference>
1818
</SignedInfo>
19-
<SignatureValue>Kxm+BjKx10C/G3c8W8IItAXgdxKP1hmBf2F4DnVcPLTKNfvRu/E29NG2PXDcXGUauAOLi13+7BT2ovURHQKNsjErmAD5Ya09gkUHNstg8ja6K3O5haTNWSIGGf1ZGi1fY8pZ/VSL32L1BnJsu3d81tnxnpriSWkqSQHG2xcll9L2qxdjxlhPfllL1D9nF1TrCv6QCGzgmnRXs6sgUz7Zb2nZaJzPPnausyktEs56LnQr+dpgGs12G8X4NyqFVo8byNA5/fSwF6WLl7RN4p9fKI1WGZg93yHLG6R1fZ+80N0vebNmRDJCHnTrO2aLOn1dkneCqBExOzj8hJMWljzWGQ==</SignatureValue>
19+
<SignatureValue>h1USGSs4ziIxiWowgp4KItvI/4HlneSyAP+4wSK59NK2ym4Qlyxmtj9O7YCb6Sr6iNhPWBX4pYcNEOpS2rSmpADdhUlxHxxed5XUdfxGViBtSF8y8hahuTiImdE+d41BiXdu2ml/GUbXhDjbWImDYgAevg5tQILJ02PuMNZYWE2WNUGbvwiT9239+vmKmxYtrZYTBaNfI5ESd3Bf6mOeu8qEGCfV0V8O8iBzrkxCuKbfkowe6a/CROcybPJ/WiwXNHP2pPS7FCvQScdObtC89UOCvafgIDEziWREU4SFMydApyhG9Hk/hB9MbsrDdAS/3OjZTNjfRCPV5bo2zAngHg==</SignatureValue>
2020
<KeyInfo>
2121
<X509Data>
2222
<X509IssuerSerial>

0 commit comments

Comments
 (0)