Closed curtisdelicata closed 1 month ago
We decided to make the following renames to help you solve the GitHub issue:
Rename src/Gedcom/Record/Indi.php
to src/Record/Indi.php
I'm going to follow the following steps to help you solve the GitHub issue:
src/Record/Indi.php
to comply with PSR-4 autoloading standard.Gedcom\Record\Indi
class in other files to use the new namespace.autoload
configuration in composer.json
to map the Record
namespace to the src/Record/
directory.Here are the changes we decided to make. I'm done making edits and now I'm just validating the changes using a linter to catch any mistakes like syntax errors or undefined variables:
src/Record/Indi.php
Update the namespace declaration to match the file path according to PSR-4 autoloading standards.
---
+++
@@ -1,6 +1,6 @@
<?php
-namespace Gedcom\Record;
+namespace Record;
class Indi
{
src/Parser/Indi.php
Update references to the `Gedcom\Record\Indi` class to use the new namespace.
---
+++
@@ -1,2 +1,2 @@
- $indi = new \Gedcom\Record\Indi();
+ $indi = new \Record\Indi();
$indi->setId($identifier);
src/Gedcom.php
Update references to the `Gedcom\Record\Indi` class in docblocks and method signatures.
---
+++
@@ -1,6 +1,6 @@
/**
* Stores all the individuals contained within the GEDCOM file.
*
- * @var \Gedcom\Record\Indi[]
+ * @var \Record\Indi[]
*/
protected $indi = [];
composer.json
Update the `autoload` configuration to map the `Record` namespace to the `src/Record/` directory.
---
+++
@@ -1,5 +1,6 @@
"autoload": {
"psr-4": {
- "Gedcom\\": "src/"
+ "Gedcom\\": "src/",
+ "Record\\": "src/Record/"
}
},
Your changes have been successfully made to the branch sweep/psr4_ecc88
. I have validated these changes using a syntax checker and a linter.
[!TIP] To recreate the pull request, edit the issue title or description.
This is an automated message generated by Sweep AI.
Details
src\Gedcom\Record\Indi.php does not comply with psr-4 autoloading standard.