This guide helps you upgrade from version 3.x to 4.0.0.
OLD: PHP 7.4+
{
"require": {
"php": ">= 7.4"
}
}NEW: PHP 8.2+
{
"require": {
"php": ">= 8.2"
}
}Action Required: Update your environment to PHP 8.2 or higher.
OLD: Classes in src/Parsers/ namespace
use Tomaj\BankMailsParser\Parsers\TatraBanka\TatraBankaMailParser;NEW: Classes in src/Parser/ namespace
use Tomaj\BankMailsParser\Parser\TatraBanka\TatraBankaMailParser;Action Required: Update your import statements to use Parser instead of Parsers.
OLD: PHPUnit 9.x with @test annotations
/**
* @test
*/
public function testSomething()
{
// test code
}NEW: PHPUnit 11.x with PHP 8 attributes
#[Test]
public function something()
{
// test code
}Action Required:
- If extending tests: Use
#[Test]attributes instead of@testdocblocks - Remove "test" prefixes from method names
- Add
#[CoversClass(YourClass::class)]to test classes
OLD: PHPUnit 9.x
{
"require-dev": {
"phpunit/phpunit": "^9"
}
}NEW: PHPUnit 11.x
{
"require-dev": {
"phpunit/phpunit": "^11"
}
}Action Required: Update development dependencies if you're contributing to the project.
use Tomaj\BankMailsParser\Parser\Vub\VubMailParser;
$parser = new VubMailParser();
$result = $parser->parse($vubEmail);- All parsers now handle edge cases gracefully
- Empty content and invalid input scenarios tested
- Comprehensive error handling validation
- Complete API documentation for all methods
- Professional bank support matrix
- Security considerations and best practices
- Update PHP version to 8.2 or higher
- Update composer dependencies:
composer update
- Update import statements to use
Parserinstead ofParsers - Test your implementation with the new version
- Update any custom tests to use PHP 8 attributes (if applicable)
- Backward compatible: All existing parser APIs remain unchanged
- Runtime compatible: No behavior changes in parsing logic
- New parsers: Additional VUB support without affecting existing code
If you encounter issues during upgrade:
- Check that your PHP version is 8.2+
- Verify all imports use the new
Parsernamespace - Run your existing tests to ensure functionality
- Report issues at: https://github.com/tomaj/bank-mails-parser/issues