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

Fix Lexer 2 compatibility #349

Merged
merged 1 commit into from
Jan 2, 2023
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
11 changes: 9 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4, '8.0', 8.1, 8.2]
egulias marked this conversation as resolved.
Show resolved Hide resolved
php: ['8.1', '8.2']
deps: [highest]

name: PHP ${{ matrix.php }}
include:
- php: '8.1'
deps: lowest
Comment on lines +22 to +24
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This new Job tests with low dependencies. This way, issues like the one I've just fixed can be spotted more easily.

Copy link
Owner

Choose a reason for hiding this comment

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

If we add lowest to matrix.deps should that work for both versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Do you want a deps=lowest job for both PHP versions? I felt like one of those is enough.

Copy link
Owner

Choose a reason for hiding this comment

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

Ok, yes, one is enough.


name: PHP ${{ matrix.php }} / ${{ matrix.deps }}

steps:
- name: Checkout code
Expand All @@ -34,6 +39,8 @@ jobs:

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.deps }}

- name: Setup logs directory
run: mkdir -p build/logs
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ build:
override:
- command: "vendor/bin/phpunit --coverage-clover=clover.xml --exclude-group flaky"
coverage:
file: "clover.xml"
file: "build/logs/clover.xml"
format: "clover"
- php-scrutinizer-run
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"symfony/polyfill-intl-idn": "^1.26"
},
"require-dev": {
"phpunit/phpunit": "^8.5.8|^9.3.3",
"vimeo/psalm": "^4"
"phpunit/phpunit": "^9.5.27",
"vimeo/psalm": "^4.30"
},
"suggest": {
"ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
Expand All @@ -34,4 +34,4 @@
"Egulias\\EmailValidator\\Tests\\": "tests"
}
}
}
}
9 changes: 1 addition & 8 deletions src/EmailLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ class EmailLexer extends AbstractLexer
*/
public Token $current;

/**
* The next token in the input.
*
* @var Token<int, string>|null
*/
public Token|null $lookahead;
egulias marked this conversation as resolved.
Show resolved Hide resolved

/**
* @var Token<int, string>
*/
Expand Down Expand Up @@ -334,4 +327,4 @@ public function clearRecorded(): void
{
$this->accumulator = '';
}
}
}