mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-19 14:36:55 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d48c27245 |
@@ -3,6 +3,7 @@ name: static analysis
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- '*.x'
|
- '*.x'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
name: unit-tests
|
name: build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- master
|
||||||
- '*.x'
|
- '*.x'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
@@ -45,6 +48,13 @@ jobs:
|
|||||||
- name: Execute tests
|
- name: Execute tests
|
||||||
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml --exclude-group flaky
|
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml --exclude-group flaky
|
||||||
|
|
||||||
|
- name: Coverage
|
||||||
|
if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
|
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/logs/clover.xml
|
||||||
|
|
||||||
- name: Store artifacts
|
- name: Store artifacts
|
||||||
if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }}
|
if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
name: upload-coverage-to-codacy
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["unit-tests"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
upload:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: true
|
|
||||||
name: upload-coverage
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Setup logs directory
|
|
||||||
run: mkdir -p build/coverage
|
|
||||||
|
|
||||||
- name: Download clover.xml artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: clover.xml
|
|
||||||
path: build/coverage
|
|
||||||
|
|
||||||
- name: Upload Coverage to Codacy
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
|
||||||
|
|
||||||
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r build/coverage/clover.xml
|
|
||||||
@@ -109,6 +109,7 @@ Validations not present in the RFCs
|
|||||||
1. [SpoofCheckValidation](/src/Validation/Extra/SpoofCheckValidation.php):
|
1. [SpoofCheckValidation](/src/Validation/Extra/SpoofCheckValidation.php):
|
||||||
Will check for multi-utf-8 chars that can signal an erroneous email name.
|
Will check for multi-utf-8 chars that can signal an erroneous email name.
|
||||||
|
|
||||||
|
|
||||||
### How to extend
|
### How to extend
|
||||||
|
|
||||||
It's easy! You just need to implement
|
It's easy! You just need to implement
|
||||||
@@ -125,8 +126,7 @@ Is short and simple and will help a lot.
|
|||||||
(You can find current contributors
|
(You can find current contributors
|
||||||
[here](https://github.com/egulias/EmailValidator/graphs/contributors))
|
[here](https://github.com/egulias/EmailValidator/graphs/contributors))
|
||||||
|
|
||||||
As this is a port from another library and work, here are other people related
|
As this is a port from another library and work, here are other people related to the previous one:
|
||||||
to the previous one:
|
|
||||||
|
|
||||||
* Ricard Clau [@ricardclau](https://github.com/ricardclau):
|
* Ricard Clau [@ricardclau](https://github.com/ricardclau):
|
||||||
Performance against PHP built-in filter_var (v2 and earlier)
|
Performance against PHP built-in filter_var (v2 and earlier)
|
||||||
|
|||||||
@@ -6,26 +6,22 @@ interface Result
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Is validation result valid?
|
* Is validation result valid?
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function isValid(): bool;
|
public function isValid() : bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is validation result invalid?
|
* Is validation result invalid?
|
||||||
* Usually the inverse of isValid()
|
* Usually the inverse of isValid()
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function isInvalid(): bool;
|
public function isInvalid() : bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Short description of the result, human readable.
|
* Short description of the result, human readable.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function description(): string;
|
public function description() : string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Code for user land to act upon.
|
* Code for user land to act upon.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function code(): int;
|
public function code() : int;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user