Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Storage.php for handling file reading/writing #11

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

sevaske
Copy link
Contributor

@sevaske sevaske commented Feb 18, 2025

  • Created "Storage" for handing working with files.
  • Removed unnecessary echo statement in saveXMLFile.
  • Fixed issue when saving a file with a specific path without using "output".
  • Fixed file path handling issue on Windows OS.
  • Fixed "$json_data" ([0] issue) in README.md.

For tests:
composer test tests/StorageTest.php

- Removed unnecessary `echo` statement in `saveXMLFile`
- Fixed issue when saving a file with a specific path without using "output"
- Fixed file path handling issue on Windows OS
- Fixed "$json_data" ([0] issue) in README.md

#feat-storage
@sevaske
Copy link
Contributor Author

sevaske commented Feb 18, 2025

I had an issue when calling saveXMLFile(storage_path('signed.xml')) because "output" was being added to the file path inside saveXMLFile. I kept "output" in the saveXMLFile function to support existing.
public function saveXMLFile(string $filename = 'signed_invoice.xml', ?string $outputDir = 'output'): self
This ensures that if you use saveXMLFile({full path}, null), it will work correctly.

… function getXML(): string in InvoiceSigner.php #feat-storage
@Saleh7 Saleh7 merged commit 2caae57 into Saleh7:main Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants