68369b615c
docs: update changelog and bump version to 1.0.3
2026-11-04 17:26:16 +01:00
117f70510f
feat(StorageServiceConfig): support scoped driver with boot-time underlying driver resolution
2026-11-04 17:25:33 +01:00
15cc0cd1ec
style(tests): fix spacing in docblock for allowedExtensions
...
Improves readability of the code by standardizing spacing in the docblock.
2026-11-04 09:31:30 +01:00
0552f17521
chore(cliff.toml): add spacing before release headings in changelog
2026-11-04 08:18:14 +01:00
969ec1363c
docs: update changelog for version 1.0.2
2026-11-04 08:14:53 +01:00
bbcc9c6353
1.0.2 release
2026-11-04 08:14:16 +01:00
8dc7434133
feat(StorageServiceConfig): add prefix handling and validation
...
- Introduced prefix property in StorageServiceConfig.
- Implemented prefix validation and trimming logic.
- Updated path generators to utilize the configured prefix.
- Added tests for prefix validation and retrieval.
2026-11-04 08:11:57 +01:00
d3ec44f871
docs: update changelog for version 1.0.1
2026-11-04 07:34:27 +01:00
9f3b0f22c1
chore(cliff.toml): skip changelog commits in parser
...
Exclude changelog-related commits from the commit parser to streamline changelog generation.
2026-11-04 07:33:51 +01:00
a7edc98c0d
docs: update changelog for version 1.0.1
...
- Document new features and tasks for version 1.0.1.
- Improve formatting and consistency in changelog entries.
2026-11-04 07:31:39 +01:00
908c988305
1.0.1 release
2026-11-04 07:30:31 +01:00
24e5d6b270
chore: update .gitignore and add bun.lock and cliff.toml
...
- Added node_modules/ to .gitignore to prevent tracking of dependencies.
- Created bun.lock for dependency management.
- Added cliff.toml for changelog configuration.
- Introduced package.json for project scripts and dependencies.
2026-11-04 07:27:52 +01:00
934c6aa4b1
feat(StorageFilePath): implement JsonSerializable interface
2026-11-04 07:25:07 +01:00
50f74301cd
1.0.0 release
2026-11-03 18:12:20 +01:00
4372a471c2
Merge branch 'tests' into develop
2026-11-03 18:08:23 +01:00
2a4da11008
test(StorageServiceImpl): add unit tests for file operations
...
This commit introduces unit tests for the StorageServiceImpl class,
covering file validation, existence checks, retrieval, storage,
and removal operations.
2026-11-03 17:35:56 +01:00
e2e77ee388
test(StorageGatewayImpl): add unit tests for file storage operations
...
Includes tests for storing, retrieving, checking existence, and deleting files.
2026-11-03 17:35:51 +01:00
fbce63220b
test(MimeTypeCheckerImpl): ignore type argument for PHPStan
2026-11-03 17:35:46 +01:00
2c43d24256
chore(dependencies): update phpstan-mockery version in composer.json
...
Added phpstan/phpstan-mockery as a development dependency for improved testing capabilities.
2026-11-03 17:35:33 +01:00
f6e246d4fb
test(FileSanitizerImpl): add PHPDoc for allowedExtensions parameter
2026-11-03 17:30:32 +01:00
125d968a6c
test(MimeTypeCheckerImpl): ignore type argument for PHPStan
2026-11-03 17:29:01 +01:00
dfc74c6d41
test(Utils): add unit tests for disk existence and extension validation
...
This commit introduces unit tests for the Utils class, verifying
the behavior of disk existence checks and allowed file extensions.
2026-11-03 17:28:47 +01:00
bfac833847
test(FileSanitizerImpl): add tests for file sanitization errors
...
- Add tests to verify behavior when files are unreadable.
- Ensure proper exception handling for unsupported file types.
2026-11-03 17:28:40 +01:00
3d3bb88a0d
refactor(Utils): remove unused Facade import and redundant check
...
Cleaned up the Utils class by removing an unused import and a redundant check for the Facade application.
2026-11-03 17:28:27 +01:00
1483adabe2
test(StorageServiceConfig): add unit tests for configuration validation
...
Added comprehensive unit tests for StorageServiceConfig to validate instantiation, disk eligibility, and allowed extensions.
2026-11-03 17:14:58 +01:00
c29629a9f9
test(FileStream): skip test for chmod 0000 in superuser environments
...
Bypassing read restrictions in superuser/root environments to ensure test reliability.
2026-11-03 17:13:37 +01:00
1fcb763984
chore(tests): add .gitkeep files for Feature and Integration directories
...
This ensures the directories are tracked in version control.
2026-11-03 17:04:34 +01:00
dcfec3de04
test(DateHashPathGenerator): add unit tests for path generation
...
Added comprehensive unit tests for DateHashPathGenerator to validate path generation
with and without directories, ensuring unique paths for identical files and proper
slugging of filenames.
2026-11-03 17:04:29 +01:00
4a41f429ac
fix(FileStream): handle resource creation failure in constructor
...
Ensure that an exception is thrown if the temporary stream cannot be created.
2026-11-03 16:54:25 +01:00
27e4361d10
refactor(StorageServiceProvider): improve disk configuration handling
...
Enhanced the boot method to filter eligible disks and allowed extensions
from the configuration, ensuring only valid entries are processed.
2026-11-03 16:51:06 +01:00
98a28c44b8
refactor(StorageServiceProvider): use Arr::string for driver assignment
...
Refactor driver assignment to use Arr::string for better clarity.
2026-11-03 16:46:43 +01:00
bb1129c209
fix(FileStream): improve stream validation in constructor
...
Ensure the stream is readable and metadata is correctly checked.
2026-11-03 16:44:42 +01:00
f956a47c35
style(StorageService): update phpcs line length disable comment
...
style(FileStream): ignore discouraged silenced errors for fopen
2026-11-03 16:40:35 +01:00
3d4ade6204
style(StorageService): disable line length check for facade comments
...
This change allows for longer comments in the StorageService facade without triggering PHPCS warnings.
2026-11-03 16:37:08 +01:00
5075caa54b
test: add unit tests for DiskName, FileStream, and SanitizedFile
...
- Implement tests for DiskName instantiation and validation.
- Add tests for FileStream instantiation and methods.
- Create tests for SanitizedFile instantiation and validation.
- Introduce TestDiskBackedEnum and TestDiskUnitEnum for testing purposes.
2026-11-03 16:32:09 +01:00
fc267c330c
feat(tests): add initial test structure and example tests
...
- Introduced Pest testing framework with basic test cases.
- Created TestCase and ExampleTest for unit testing.
- Updated phpunit.xml for improved test configuration.
2026-11-03 16:20:14 +01:00
3d50ba6ba2
chore: update phpcs and phpstan configurations
...
- Updated phpcs.xml to reflect the correct ruleset name and adjusted file paths.
- Modified phpstan.neon to include additional extensions and clarified parameters.
- Changed pint.json preset to psr12 and added versioning.
2026-11-03 16:17:24 +01:00
839b092b24
chore: add .gitattributes for line endings and export-ignore rules
...
This file sets default behavior for line endings and specifies files to exclude from Composer package archives.
2026-11-03 16:16:49 +01:00
92b8a7b7f1
refactor(StorageServiceConfig): rename getEligiblesDisks to getEligibleDisks
...
Improves method naming consistency in StorageServiceConfig.
2026-11-03 16:16:19 +01:00
3ab415139c
feat(MimeTypeChecker): add unsupported MIME types for SVG and XML
...
Added checks to prevent SVG and XML file types from being processed.
2026-11-03 16:15:57 +01:00
1521a91ec2
refactor(exceptions): replace StorageException with UnexpectedStorageException
...
Updated exception handling across the codebase to use UnexpectedStorageException for better clarity and specificity in error reporting.
2026-11-03 16:07:54 +01:00
9f4a6e417d
feat(StorageService): add methods to store files using SplFileObject
...
New methods for storing files have been implemented to enhance file handling capabilities.
2026-11-03 15:53:22 +01:00
f658df0c7b
refactor(FileStream): ensure resource is closed in destructor
...
Added a destructor to close the resource when the object is destroyed.
2026-11-03 15:53:12 +01:00
08fda2cdfd
refactor(StorageService): change remove methods to return bool
2026-11-03 15:53:07 +01:00
b56f43b5c8
refactor(SanitizedFile): remove unused Utils methods
...
Cleaned up the SanitizedFile class by removing unused validation logic related to file extensions and MIME types.
2026-11-03 15:49:14 +01:00
f6f99fdedf
feat(StorageFilePath): implement Stringable interface
...
Add __toString method to StorageFilePath for string representation.
2026-11-03 15:49:10 +01:00
8a54f09dae
style(PathGenerators): format code for consistency
2026-11-03 15:49:02 +01:00
c881e9abb8
refactor(Utils, DiskName): improve disk handling with enum support
...
Updated diskExists and DiskName constructor to handle
BackedEnum and UnitEnum types for better type safety.
2026-11-03 15:48:55 +01:00
b6b5066bc2
feat(FileSanitizerImpl): add mimeType and size to SanitizedFile
...
Enhance the SanitizedFile creation by including mimeType and file size.
2026-11-03 15:48:39 +01:00
d4c4d5b22a
refactor(Exceptions): format exception classes for consistency
...
Improves code readability by ensuring consistent formatting in exception classes.
2026-11-03 15:48:30 +01:00