Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2018c7c
Docker & composer : removing php7.4 and 8.0, which are not maintained…
rayanlevert Jul 2, 2025
a4469b5
Docker : adding container for php8.4 #1
rayanlevert Jul 2, 2025
ca190b7
composer update + removing ext-json, enabled by default since 8.0 #1
rayanlevert Jul 2, 2025
3d0359c
composer : upgrading Codeception to ^5.0 #1
rayanlevert Jul 2, 2025
9947447
Functional tests : removing the username+password to avoid SMTP Authe…
rayanlevert Jul 2, 2025
8a0c717
PHP : uses constructor property promotion for both classes #1
rayanlevert Jul 2, 2025
d4a6c5d
GitHub Actions : added correct PHP & Phalcon versions #1
rayanlevert Jul 2, 2025
a6fda80
Removing Psalm, there are too many 'false' errors since the v6 #1
rayanlevert Jul 2, 2025
c5216f2
GitHub Actions : upgrading action/cache and checkout to v4 #1
rayanlevert Jul 2, 2025
7b58125
Docker : adding :z flag if selinux is enabled #1
rayanlevert Jul 2, 2025
f496237
Message & Manager : adding union type for methods #1
rayanlevert Jul 3, 2025
4094e6b
Merge pull request #3 from rayanlevert/feature/php8.4
rayanlevert Jul 3, 2025
293369f
composer : removed Codeception and installed phpunit v10.5 #2
rayanlevert Jul 3, 2025
4f84c20
tests : reorganized files and directories from Codeception to PHPUnit #2
rayanlevert Jul 3, 2025
f168fcc
PHPUnit : adapting all unit tests for ManagerTest #2
rayanlevert Jul 3, 2025
41d9a26
added phpunit.xml conf file #2
rayanlevert Jul 3, 2025
f2bab40
tests : remember to add .env before running tests #2
rayanlevert Jul 3, 2025
07d0397
tests : uses methods from Dotenv to assert env variables #2
rayanlevert Jul 3, 2025
c830d9c
Message::setFrom() : parameter is now a string not nullable #2
rayanlevert Jul 3, 2025
aa9f7ec
tests/MessageTest : adapting all unit tests to PHPUnit #2
rayanlevert Jul 3, 2025
75f8dc8
tests/ManagerSmtpTest : adapting all tests to PHPUnit #2
rayanlevert Jul 3, 2025
97f6241
tests/ManagerSendmailTest : adapting all tests to PHPUnit #2
rayanlevert Jul 3, 2025
4584db5
tests : adding CoversClass PHP attributes #2
rayanlevert Jul 3, 2025
7ac003c
phpunit : added testsuite #2
rayanlevert Jul 3, 2025
3bb347f
Removed codeception.yml and for GitHub Actions #2
rayanlevert Jul 3, 2025
4e9f52c
GitHub Action : fix typography #2
rayanlevert Jul 3, 2025
1aafd5e
renaming both unit test classes Sendmail and Smtp #2
rayanlevert Jul 3, 2025
76dd72b
GitHub Actions : adding xdebug for code coverage #2
rayanlevert Jul 4, 2025
488b697
Merge pull request #4 from rayanlevert/feature/phpunit
rayanlevert Jul 4, 2025
52ea572
.gitattributes : added file to ignore files when imported
rayanlevert Jul 4, 2025
bb14196
GitHub Actions : fixing the actions/checkout step not importing all d…
rayanlevert Jul 4, 2025
514771f
GitHub Actions : adding PHP extensions in a environment variable #5
rayanlevert Jul 5, 2025
619d532
Docker : unified one unique Dockerfile taking PHP and Phalcon version…
rayanlevert Jul 5, 2025
a313e64
phpunit : using the vendor namespace schema location .xsd file instea…
rayanlevert Jul 5, 2025
afe975a
tests : moved 'fixtures' under '_data' directory #5
rayanlevert Jul 5, 2025
029b6e1
Merge pull request #6 from rayanlevert/feature/i5-review-feedbacks
rayanlevert Jul 5, 2025
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
File renamed without changes.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.github export-ignore
/docker export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/docker-compose.yml export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
21 changes: 11 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
name: PHP ${{ matrix.php-versions }}

runs-on: ubuntu-latest
container: ubuntu

services:
mailpit:
Expand All @@ -17,15 +16,17 @@ jobs:
- 8025:8025

env:
extensions: mbstring, intl, json, xdebug, phalcon-5.2.1
extensions: mbstring, intl, json, xdebug, phalcon-5.9.3
key: cache-v0.0.2

strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup cache environment
id: cache-env
Expand All @@ -36,7 +37,7 @@ jobs:
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
Expand All @@ -54,7 +55,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -65,8 +66,8 @@ jobs:

- name: Setup Tests
run: |
cp tests/_ci/.env.default .env
vendor/bin/codecept build
cp .env.default .env
sed -i "s/DATA_MAILPIT_HOST_URI='mailpit'/DATA_MAILPIT_HOST_URI='localhost'/" .env

- name: Install Mailpit and create a symbolic link to sendmail command
run: |
Expand All @@ -75,11 +76,11 @@ jobs:

- name: Run test suites
if: success()
run: vendor/bin/codecept run --coverage-xml=coverage-${{ matrix.php-versions }}.xml
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover coverage-${{ matrix.php-versions }}.xml

- name: Upload coverage to Codecov
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./tests/_output/coverage-*.xml
file: ./tests/_output/coverage-*.xml
22 changes: 10 additions & 12 deletions .github/workflows/validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: PSR-12 Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate
Expand All @@ -15,7 +15,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -31,17 +31,19 @@ jobs:
name: Static Code with PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
env:
extensions: mbstring, intl, json, phalcon-5.2.1
extensions: mbstring, intl, json, phalcon-5.9.3
key: cache-v0.0.2
needs: validate-code-style
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout the code
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup cache environment
id: cache-env
Expand All @@ -52,7 +54,7 @@ jobs:
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
Expand All @@ -70,7 +72,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -79,10 +81,6 @@ jobs:
- name: Install Composer dependencies
run: composer require --prefer-dist

- name: Run Psalm
if: always()
run: vendor/bin/psalm --show-info=false

- name: Run PHPStan
if: always()
run: vendor/bin/phpstan analyse -l 5 src
run: vendor/bin/phpstan analyse -l 5 src
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
composer.phar
/vendor/
.env

# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
tests/fixtures/views/mail/*.volt.php
.phpunit.cache
17 changes: 0 additions & 17 deletions codeception.yml

This file was deleted.

21 changes: 8 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,20 @@
"forum": "https://forum.phalcon.io"
},
"require": {
"php": ">=7.4",
"ext-phalcon": "^5.0",
"ext-json": "*",
"php": ">=8.1",
"ext-phalcon": "^5.9.3",
"phpmailer/phpmailer": "^6.7"
},
"require-dev": {
"phalcon/ide-stubs": "^5.0",
"phalcon/ide-stubs": "^5.9.3",
"vlucas/phpdotenv": "^5.5",
"codeception/codeception": "^4.2",
"codeception/module-asserts": "^2.0",
"vimeo/psalm": "^5.9",
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "^3.7"
"squizlabs/php_codesniffer": "^3.7",
"phpunit/phpunit": "^10.5"
},
"config": {
"platform": {
"php": "7.4"
"php": "8.1.32"
}
},
"autoload": {
Expand All @@ -55,8 +52,7 @@
},
"autoload-dev": {
"psr-4": {
"Phalcon\\Incubator\\Mailer\\Tests\\Unit\\": "tests/unit/",
"Phalcon\\Incubator\\Mailer\\Tests\\Functional\\": "tests/functional/"
"Phalcon\\Incubator\\Mailer\\Tests\\": "tests/"
}
},
"minimum-stability": "dev",
Expand All @@ -71,8 +67,7 @@
"codeception.yml",
"phpcs.xml.dist",
"phpstan.neon.dist",
"phpunit.xml.dist",
"psalm.xml.dist"
"phpunit.xml.dist"
]
}
}
Loading
Loading