Commit graph

48 commits

Author SHA1 Message Date
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
cf9ca6bd5c
chore: update PHP CodeSniffer and add Pint configuration
- Updated phpcs.xml to use Php Coding Standard and optimized rules.
- Added pint.json for code style configuration.
- Adjusted phpstan.neon to include tests directory and set level to 10.
2026-11-03 15:38:09 +01:00
8225142fa7
feat(Facades): add StorageService facade with methods for file operations
Introduces a new StorageService facade to provide a simplified interface for file operations.
2026-11-03 15:36:45 +01:00
6840fc90b9
refactor(StorageGatewayImpl): specify return type for getStorageForDisk
Clarifies the return type of the getStorageForDisk method.
2026-11-03 15:34:07 +01:00
1234c46f8f
chore: remove FileStorageHelper class
This class is no longer needed as its functionality has been refactored or replaced.
2026-11-03 15:33:26 +01:00
88ae440bc7
refactor(DiskName): implement Stringable interface
Added __toString method to DiskName class for better string representation.
2026-11-03 15:32:48 +01:00
32b3953a31
intial work 2026-11-03 15:29:18 +01:00