Skip to content

Commit c0d6e7b

Browse files
authored
Update and Fix Test Suite (#74)
* Updated Dependencies and Fix Security Vulnerabilities * added Changelog * updated changelog and removed travis.yml * updated readme and modernized CI/CD pipelines * clarified readme * clarified readme * making sure tests are up to date * making sure tests are up to date
1 parent 010b4d2 commit c0d6e7b

68 files changed

Lines changed: 1768 additions & 60 deletions

Some content is hidden

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

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":{"Gedcomx\\Unit\\GedcomxFileTests::testCreateGedxFile":5},"times":{"Gedcomx\\Tests\\Unit\\Agent\\AddressTests::testAddressDeserialization":0.012,"Gedcomx\\Tests\\Unit\\Agent\\AddressTests::testAddressGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Agent\\AddressTests::testAddressWithMinimalData":0,"Gedcomx\\Tests\\Unit\\Agent\\AgentTests::testAgentDeserialization":0.002,"Gedcomx\\Tests\\Unit\\Agent\\AgentTests::testAgentGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Agent\\AgentTests::testAgentWithoutNames":0,"Gedcomx\\Tests\\Unit\\Conclusion\\DocumentTests::testDocumentDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Conclusion\\DocumentTests::testDocumentGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\DocumentTests::testDocumentWithoutText":0,"Gedcomx\\Tests\\Unit\\Conclusion\\EventTests::testEventDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Conclusion\\EventTests::testEventGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\EventTests::testEventWithoutRoles":0,"Gedcomx\\Tests\\Unit\\Conclusion\\FactTests::testFactDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\FactTests::testFactGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\FactTests::testFactWithoutDate":0,"Gedcomx\\Tests\\Unit\\Conclusion\\GenderTests::testGenderDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\GenderTests::testGenderGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\GenderTests::testGenderWithNullType":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NameTests::testNameDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NameTests::testNameGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NameTests::testNameWithMultipleForms":0,"Gedcomx\\Tests\\Unit\\Conclusion\\PersonTests::testPerson":0.002,"Gedcomx\\Tests\\Unit\\Conclusion\\PlaceDescriptionTests::testPlaceDescriptionDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\PlaceDescriptionTests::testPlaceDescriptionGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\PlaceDescriptionTests::testPlaceDescriptionWithoutCoordinates":0,"Gedcomx\\Tests\\Unit\\Conclusion\\RelationshipTests::testRelationshipDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Conclusion\\RelationshipTests::testRelationshipGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\RelationshipTests::testRelationshipWithoutFacts":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\CommentTests::testCommentDeserialization":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\CommentTests::testCommentGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\CommentTests::testCommentWithoutContributor":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\DiscussionReferenceTests::testDiscussionReferenceGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\DiscussionReferenceTests::testDiscussionReferenceWithoutResourceId":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\DiscussionReferenceTests::testDiscussionReferenceEmpty":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\DiscussionTests::testDiscussionDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\DiscussionTests::testDiscussionGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\DiscussionTests::testDiscussionWithoutComments":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\UserTests::testUserDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\UserTests::testUserGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\UserTests::testUserWithMinimalData":0,"Gedcomx\\Unit\\GedcomxFileTests::testReadGedcomxFile":0.002,"Gedcomx\\Unit\\GedcomxFileTests::testXMLSerialization":0.002,"Gedcomx\\Unit\\GedcomxFileTests::testXMLDeserialization":0.001,"Gedcomx\\Unit\\GedcomxFileTests::testCreateGedxFile":0.003,"Gedcomx\\Tests\\Unit\\Source\\SourceCitationTests::testSourceCitationGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Source\\SourceCitationTests::testSourceCitationWithLanguage":0,"Gedcomx\\Tests\\Unit\\Source\\SourceCitationTests::testSourceCitationEmpty":0,"Gedcomx\\Tests\\Unit\\Source\\SourceDescriptionTests::testSourceDescriptionDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Source\\SourceDescriptionTests::testSourceDescriptionGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Source\\SourceDescriptionTests::testSourceDescriptionWithoutCitations":0,"Gedcomx\\Tests\\Unit\\Source\\SourceReferenceTests::testSourceReferenceGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Source\\SourceReferenceTests::testSourceReferenceWithoutDescription":0,"Gedcomx\\Tests\\Unit\\Source\\SourceReferenceTests::testSourceReferenceWithAttribution":0,"Gedcomx\\Tests\\Unit\\XMLTests::testDeserializeXML":0,"Gedcomx\\Tests\\Unit\\Agent\\OnlineAccountTests::testOnlineAccountDeserialization":0,"Gedcomx\\Tests\\Unit\\Agent\\OnlineAccountTests::testOnlineAccountGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Agent\\OnlineAccountTests::testOnlineAccountWithoutServiceHomepage":0,"Gedcomx\\Tests\\Unit\\Conclusion\\DateInfoTests::testDateInfoDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Conclusion\\DateInfoTests::testDateInfoGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\DateInfoTests::testDateInfoWithoutFormal":0,"Gedcomx\\Tests\\Unit\\Conclusion\\EventRoleTests::testEventRoleDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\EventRoleTests::testEventRoleGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\EventRoleTests::testEventRoleWithoutDetails":0,"Gedcomx\\Tests\\Unit\\Conclusion\\IdentifierTests::testIdentifierDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\IdentifierTests::testIdentifierGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\IdentifierTests::testIdentifierWithoutType":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NameFormTests::testNameFormDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Conclusion\\NameFormTests::testNameFormGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NameFormTests::testNameFormWithoutParts":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NamePartTests::testNamePartDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NamePartTests::testNamePartGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\NamePartTests::testNamePartWithoutType":0,"Gedcomx\\Tests\\Unit\\Conclusion\\PlaceReferenceTests::testPlaceReferenceDeserialization":0,"Gedcomx\\Tests\\Unit\\Conclusion\\PlaceReferenceTests::testPlaceReferenceGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Conclusion\\PlaceReferenceTests::testPlaceReferenceWithoutNormalized":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\ArtifactMetadataTests::testArtifactMetadataConstruction":0.001,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\ArtifactMetadataTests::testArtifactMetadataGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\ArtifactMetadataTests::testArtifactMetadataWithEmptyData":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\ChangeInfoTests::testChangeInfoDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\ChangeInfoTests::testChangeInfoGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\ChangeInfoTests::testChangeInfoWithoutReason":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MatchInfoTests::testMatchInfoDeserialization":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MatchInfoTests::testMatchInfoGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MatchInfoTests::testMatchInfoWithoutCollection":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeAnalysisTests::testMergeAnalysisConstruction":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeAnalysisTests::testMergeAnalysisGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeAnalysisTests::testMergeAnalysisWithEmptyData":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeConflictTests::testMergeConflictConstruction":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeConflictTests::testMergeConflictGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeConflictTests::testMergeConflictWithEmptyData":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeTests::testMergeDeserialization":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeTests::testMergeGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Extensions\\FamilySearch\\MergeTests::testMergeWithoutResources":0,"Gedcomx\\Tests\\Unit\\Source\\CitationFieldTests::testCitationFieldDeserialization":0,"Gedcomx\\Tests\\Unit\\Source\\CitationFieldTests::testCitationFieldGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Source\\CitationFieldTests::testCitationFieldEmpty":0,"Gedcomx\\Tests\\Unit\\Source\\CoverageTests::testCoverageDeserialization":0.001,"Gedcomx\\Tests\\Unit\\Source\\CoverageTests::testCoverageGettersAndSetters":0,"Gedcomx\\Tests\\Unit\\Source\\CoverageTests::testCoverageWithoutSpatial":0}}

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# GedcomX - PHP SDK
22

33
[![Packagist](https://img.shields.io/packagist/v/gedcomx/gedcomx-php.svg)](https://packagist.org/packages/gedcomx/gedcomx-php)
4-
[![CI](https://github.com/FamilySearch/gedcomx-php/actions/workflows/ci.yml/badge.svg)](https://github.com/FamilySearch/gedcomx-php/actions/workflows/ci.yml)
4+
[![Build Status](https://travis-ci.org/FamilySearch/gedcomx-php.svg?branch=master)](https://travis-ci.org/FamilySearch/gedcomx-php)
55
[![Coverage Status](https://coveralls.io/repos/FamilySearch/gedcomx-php/badge.svg?branch=master&service=github)](https://coveralls.io/github/FamilySearch/gedcomx-php?branch=master)
6+
[![Dependency Status](https://www.versioneye.com/user/projects/5633c23236d0ab0016001f02/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5633c23236d0ab0016001f02)
67

78
The PHP implementation of [GEDCOM X](http://www.gedcomx.org), including GEDCOM X extension projects.
89
The library only provides classes for serialization and deserialization of GEDCOM X
@@ -68,13 +69,6 @@ Do **one** of the following steps to activate Composer and install the gedcomx-p
6869
6970
## Changelog
7071
71-
* v3.1.0
72-
* Migrate from Travis CI to GitHub Actions
73-
* Add multi-version PHP testing (7.4, 8.0, 8.1, 8.2, 8.3)
74-
* Update CI/CD pipeline with automated testing and coverage reporting
75-
* Update README badges to reflect GitHub Actions status
76-
* Added CHANGELOG.md for a more extensive overview on changes
77-
7872
* v3.0.0
7973
* Split out the API networking code into [gedcomx-php-client](https://github.com/FamilySearch/gedcomx-php-client)
8074

TESTING.md

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
# Testing Guide
2+
3+
## Overview
4+
5+
The GEDCOM X PHP SDK includes a comprehensive test suite using PHPUnit 9.5+ to ensure compatibility across PHP versions 7.4 through 8.3.
6+
7+
## Running Tests
8+
9+
### Prerequisites
10+
11+
- PHP 7.4, 8.0, 8.1, 8.2, or 8.3
12+
- Composer dependencies installed
13+
- Xdebug or PCOV extension (optional, for coverage reports)
14+
15+
### Basic Test Execution
16+
17+
Run the complete test suite:
18+
19+
```bash
20+
vendor/bin/phpunit
21+
```
22+
23+
### Running Specific Tests
24+
25+
Run a specific test file:
26+
27+
```bash
28+
vendor/bin/phpunit tests/unit/PersonTests.php
29+
```
30+
31+
Run a specific test method:
32+
33+
```bash
34+
vendor/bin/phpunit --filter testPerson
35+
```
36+
37+
## Code Coverage
38+
39+
### Generating Coverage Reports
40+
41+
**HTML Report** (most detailed):
42+
43+
```bash
44+
vendor/bin/phpunit --coverage-html build/coverage
45+
```
46+
47+
Then open `build/coverage/index.html` in your browser.
48+
49+
**Text Report** (terminal output):
50+
51+
```bash
52+
vendor/bin/phpunit --coverage-text
53+
```
54+
55+
**Clover XML** (for CI/CD integration):
56+
57+
```bash
58+
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
59+
```
60+
61+
### Coverage Baseline (2026)
62+
63+
Current test coverage baseline established:
64+
65+
- **Test Files**: 28 test suites
66+
- **Test Cases**: 99 tests with 237 assertions
67+
- **Source Files**: 125+ PHP files
68+
- **Core Models**: Complete GEDCOM X conceptual model class coverage
69+
- **Extensions**: Comprehensive FamilySearch platform extension coverage
70+
71+
### Coverage Areas
72+
73+
#### Well-Covered Components (as of v3.2.0)
74+
75+
- **GEDCOM X file format**: .gedx reading and writing, XML serialization/deserialization
76+
- **Core conclusion models**: Person, Gender, Fact, Name, NameForm, NamePart, Event, EventRole, Relationship, Document, PlaceDescription, PlaceReference, DateInfo, Identifier
77+
- **Agent models**: Agent, Address, OnlineAccount
78+
- **Source models**: SourceDescription, SourceReference, SourceCitation, Coverage, CitationField
79+
- **FamilySearch extensions**: User, Discussion, Comment, DiscussionReference, ChildAndParentsRelationship, ChangeInfo, MatchInfo, Merge, MergeAnalysis, MergeConflict, ArtifactMetadata
80+
81+
#### Areas for Future Expansion
82+
83+
Additional test coverage could be added for:
84+
85+
1. **Abstract/Base Classes**
86+
- Subject and Conclusion base classes
87+
- HasFacts trait
88+
- DisplayProperties models
89+
90+
2. **Serialization Edge Cases**
91+
- JSON serialization for all models (currently only XML is comprehensively tested)
92+
- Malformed data handling
93+
- Namespace handling for extensions
94+
- Large file performance
95+
96+
4. **Collections and Utilities**
97+
- Collection class operations
98+
- Reference resolvers
99+
- Model visitor patterns
100+
101+
## Test Structure
102+
103+
### Directory Layout
104+
105+
```
106+
tests/
107+
├── bootstrap.php # Test initialization
108+
├── ApiTestCase.php # Base test case class
109+
├── ArtifactBuilder.php # Test artifact generation
110+
├── PersonBuilder.php # Test person creation
111+
├── TestBuilder.php # General test utilities
112+
├── XMLBuilder.php # XML test utilities
113+
├── files/ # Test fixtures
114+
│ ├── person.json
115+
│ ├── record.xml
116+
│ ├── sample.gedx
117+
│ └── cap-relationship-control.xml
118+
├── tmp/ # Temporary test output
119+
└── unit/ # Unit tests
120+
├── PersonTests.php
121+
├── XMLTests.php
122+
└── GedcomxFileTests.php
123+
```
124+
125+
### Test Fixtures
126+
127+
Test fixtures are located in `tests/files/`:
128+
129+
- **Core model fixtures**: person.json, gender.json, fact.json, name.json, date-info.json, identifier.json, name-form.json, name-part.json, event.json, event-role.json, relationship.json, document.json, place-description.json, place-reference.json
130+
- **Agent fixtures**: agent.json, address.json, online-account.json
131+
- **Source fixtures**: source-description.json, source-citation.json, coverage.json, citation-field.json
132+
- **FamilySearch extension fixtures**: user.json, discussion.json, comment.json, change-info.json, match-info.json, merge.json
133+
- **XML fixtures**: record.xml, cap-relationship-control.xml
134+
- **Archive files**: sample.gedx
135+
- **Test images**: test-image.jpg (for GEDX file tests)
136+
137+
### Base Test Class
138+
139+
All tests extend `Gedcomx\Tests\ApiTestCase`, which provides:
140+
141+
- Automatic setup and teardown
142+
- Temporary directory management
143+
- Test fixture loading helpers
144+
- Common test utilities
145+
146+
## PHP Version Compatibility
147+
148+
### Tested Versions
149+
150+
The SDK is automatically tested on:
151+
152+
- PHP 7.4
153+
- PHP 8.0
154+
- PHP 8.1
155+
- PHP 8.2
156+
- PHP 8.3
157+
158+
### Compatibility Notes
159+
160+
**PHP 8.0+ Changes Addressed**:
161+
162+
- ✅ Explicit nullable type declarations (`?Type` instead of implicit null defaults)
163+
- ✅ Return type declarations for interface implementations (ArrayAccess, Countable, IteratorAggregate)
164+
- ✅ Modern PHPUnit assertions (removed deprecated `assertEqualXMLStructure`)
165+
166+
**External Dependencies**:
167+
168+
Test fixtures are used instead of runtime image generation, eliminating external dependencies and ensuring consistent test behavior across all PHP versions.
169+
170+
## Continuous Integration
171+
172+
### GitHub Actions Workflow
173+
174+
The CI pipeline (`.github/workflows/ci.yml`) automatically:
175+
176+
1. Tests against all supported PHP versions
177+
2. Validates composer.json and composer.lock
178+
3. Runs the complete test suite
179+
4. Generates code coverage reports
180+
5. Uploads coverage to Coveralls (PHP 8.3 only)
181+
182+
### Running CI Locally
183+
184+
Simulate CI testing for a specific PHP version using Docker:
185+
186+
```bash
187+
docker run --rm -v $(pwd):/app -w /app php:8.3-cli bash -c \
188+
"apt-get update && apt-get install -y git zip unzip && \
189+
php -r \"copy('https://getcomposer.org/installer', 'composer-setup.php');\" && \
190+
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
191+
composer install --prefer-dist --no-progress && \
192+
vendor/bin/phpunit"
193+
```
194+
195+
## Writing New Tests
196+
197+
### Best Practices
198+
199+
1. **Extend ApiTestCase**: Use the base test case for common functionality
200+
2. **Use Fixtures**: Place test data files in `tests/files/`
201+
3. **Clean Up**: Tests automatically clean up `tests/tmp/` after each run
202+
4. **Assertions**: Use modern PHPUnit assertions
203+
5. **Naming**: Test files should end with `Tests.php` (e.g., `PersonTests.php`)
204+
6. **Namespace**: Use `Gedcomx\Tests\Unit` or `Gedcomx\Tests\Integration`
205+
206+
### Example Test
207+
208+
```php
209+
<?php
210+
211+
namespace Gedcomx\Tests\Unit;
212+
213+
use Gedcomx\Tests\ApiTestCase;
214+
use Gedcomx\Conclusion\Person;
215+
216+
class PersonTests extends ApiTestCase
217+
{
218+
public function testPersonDeserialization()
219+
{
220+
$person = new Person($this->loadJson('person.json'));
221+
222+
$this->assertEquals('PPPJ-MYZ', $person->getId());
223+
$this->assertCount(2, $person->getFacts());
224+
$this->assertCount(1, $person->getNames());
225+
}
226+
}
227+
```
228+
229+
## Troubleshooting
230+
231+
### Coverage Not Generated
232+
233+
If coverage reports aren't generated:
234+
235+
1. Install Xdebug:
236+
```bash
237+
pecl install xdebug
238+
```
239+
240+
2. Or install PCOV (faster):
241+
```bash
242+
pecl install pcov
243+
```
244+
245+
3. Verify installation:
246+
```bash
247+
php -m | grep -i xdebug
248+
# or
249+
php -m | grep -i pcov
250+
```
251+
252+
### Tests Failing on PHP 8+
253+
254+
If you see deprecation warnings or failures on PHP 8+:
255+
256+
1. Ensure you're using PHPUnit 9.5+ (check `composer.json`)
257+
2. Verify explicit nullable types are used (`?Type` not `Type = null`)
258+
3. Check that interface implementations have proper return types
259+
260+
### Permission Issues with tests/tmp/
261+
262+
Ensure the temporary directory is writable:
263+
264+
```bash
265+
chmod 755 tests/tmp
266+
```
267+
268+
## Contributing
269+
270+
When contributing new features:
271+
272+
1. Add unit tests for new functionality
273+
2. Ensure all tests pass on all supported PHP versions
274+
3. Maintain or improve code coverage
275+
4. Follow existing test patterns and structure
276+
5. Update this document if adding new test categories
277+
278+
## References
279+
280+
- [PHPUnit Documentation](https://phpunit.de/documentation.html)
281+
- [GEDCOM X Specification](http://www.gedcomx.org)
282+
- [FamilySearch API Documentation](https://www.familysearch.org/developers/)

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"require-dev": {
2121
"phpunit/phpunit": "^9.5",
2222
"fakerphp/faker": "^1.9",
23-
"intervention/image": "^2.7",
2423
"php-coveralls/php-coveralls": "^2.5"
2524
},
2625
"autoload": {

phpunit.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./tests/bootstrap.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="./tests/bootstrap.php"
35
colors="true"
46
processIsolation="false"
57
stopOnFailure="false"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true">
8+
beStrictAboutOutputDuringTests="true"
9+
failOnRisky="false"
10+
failOnWarning="false">
911

1012
<testsuites>
1113
<testsuite name="Gedcomx">
1214
<directory suffix="Tests.php">tests/unit</directory>
1315
</testsuite>
1416
</testsuites>
1517

16-
<coverage>
18+
<coverage processUncoveredFiles="true">
1719
<include>
1820
<directory suffix=".php">./src</directory>
1921
</include>
22+
<exclude>
23+
<directory>./src/Rs/Client</directory>
24+
</exclude>
25+
<report>
26+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
27+
</report>
2028
</coverage>
2129

2230
</phpunit>

src/GedcomxFile/GedcomxFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class GedcomxFile
5454
*
5555
* @throws \Gedcomx\GedcomxFile\GedcomxFileException
5656
*/
57-
public function __construct($filepath, GedcomxEntryDeserializer $deserializer = null)
57+
public function __construct($filepath, ?GedcomxEntryDeserializer $deserializer = null)
5858
{
5959
$this->deserializer = $deserializer;
6060
if( $this->deserializer == null){

0 commit comments

Comments
 (0)