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

Refactor Extension and ExcludeExtension Validators #355

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

gsteel
Copy link
Member

@gsteel gsteel commented Jul 11, 2024

Q A
Documentation yes
BC Break yes
QA yes

Description

  • Remove compat with legacy Laminas\File\Transfer api
  • Remove all setters and getters
  • Adjust inheritance so both classes can be final
  • Only accept an options array to the constructor
  • Add new error message for completely invalid values (non-string, non-upload) instead of throwing an exception

- Remove compat with legacy `Laminas\File\Transfer` api
- Remove all setters and getters
- Adjust inheritance so both classes can be final
- Only accept an options array to the constructor
- Add new error message for completely invalid values (non-string, non-upload) instead of throwing an exception

Signed-off-by: George Steel <[email protected]>
Signed-off-by: George Steel <[email protected]>
Signed-off-by: George Steel <[email protected]>
@gsteel gsteel force-pushed the v3/file-extension-refactor branch from 070be7b to 7c74483 Compare July 11, 2024 13:17
Copy link
Member

@froschdesign froschdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

}
$this->caseSensitive = $options['case'] ?? false;
$this->allowNonExistentFile = $options['allowNonExistentFile'] ?? false;
$this->extensions = self::resolveExtensionList($options['extension'] ?? []);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as before: the singular is okay.

@gsteel
Copy link
Member Author

gsteel commented Jul 11, 2024

Thank you @froschdesign 🙏

@gsteel gsteel self-assigned this Jul 11, 2024
@gsteel gsteel merged commit efa02ac into laminas:3.0.x Jul 11, 2024
14 of 15 checks passed
@gsteel gsteel deleted the v3/file-extension-refactor branch July 11, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File extension comparison treats some distinct extensions as equal
2 participants