Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - 2026-05-04
### Changed
- Marked `\CodeOwners\Exception\NoMatchFoundException` and `\CodeOwners\Exception\UnableToParseException` as final

## Backwards compatibility breaking changes
If you are extending `\CodeOwners\Exception\NoMatchFoundException` or `\CodeOwners\Exception\UnableToParseException` in your code, you will need to update your code to not extend these classes.

## [2.3.1] - 2025-01-29
### Removed
- Support for PHP 8.0
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/NoMatchFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

namespace CodeOwners\Exception;

class NoMatchFoundException extends \RuntimeException
final class NoMatchFoundException extends \RuntimeException
{
}
2 changes: 1 addition & 1 deletion src/Exception/UnableToParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

use RuntimeException;

class UnableToParseException extends RuntimeException
final class UnableToParseException extends RuntimeException
{
}
4 changes: 2 additions & 2 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class Parser implements ParserInterface
* @return Pattern[]
* @throws UnableToParseException
*/
public function parseFile(string $file): array
#[\Override] public function parseFile(string $file): array
{
return $this->parseIterable($this->getFileIterable($file), $file);
}
Expand All @@ -24,7 +24,7 @@ public function parseFile(string $file): array
* @return Pattern[]
* @throws UnableToParseException
*/
public function parseString(string $lines, ?string $filename = null): array
#[\Override] public function parseString(string $lines, ?string $filename = null): array
{
return $this->parseIterable(explode(PHP_EOL, $lines), $filename);
}
Expand Down
2 changes: 1 addition & 1 deletion src/PatternMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(Pattern ...$patterns)
$this->patterns = $patterns;
}

public function match(string $filename): Pattern
#[\Override] public function match(string $filename): Pattern
{
$matchedPatterns = array_filter(
$this->patterns,
Expand Down
Loading