Skip to content

Commit

Permalink
Merge pull request #12 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Laravel 10 Support + Updating the package
  • Loading branch information
arcanedev-maroc authored Mar 18, 2024
2 parents afc9cd7 + 57ca4f2 commit 01cdb76
Show file tree
Hide file tree
Showing 62 changed files with 617 additions and 1,297 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1]
php: [8.1, 8.2]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

Expand All @@ -30,19 +30,16 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
coverage: pcov

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction

- name: Execute tests
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
run: composer test:ci

# - name: Scrutinizer CI
# run: |
# composer require scrutinizer/ocular --dev
# vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover
- name: Scrutinizer CI
run: |
composer require scrutinizer/ocular --dev
vendor/bin/ocular code-coverage:upload --format=php-clover /build/coverage/clover.xml
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/build/
/vendor/
/.phpunit.cache
/build
/vendor
/composer.lock
/composer.phar
.phpunit.result.cache
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^8.0",
"illuminate/support": "^9.0"
"php": "^8.1",
"illuminate/support": "^10.0"
},
"require-dev": {
"ext-dom": "*",
"phpunit/phpunit": "^9.5.8"
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand All @@ -32,12 +32,14 @@
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
"test": "phpunit --colors=always",
"test:dox": "phpunit --testdox --colors=always",
"test:cov": "phpunit --coverage-html",
"test:ci": "phpunit --coverage-text"
},
"extra": {
"branch-alias": {
"dev-develop": "6.x-dev"
"dev-develop": "7.x-dev"
}
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests</directory>
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
Expand Down
13 changes: 4 additions & 9 deletions src/Contracts/Elements/HtmlElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@ public function getAttributes();
/**
* Set an attribute.
*
* @param string $name
* @param string|null $value
*
* @return static
* @return $this
*/
public function attribute(string $name, $value = null);
public function attribute(string $name, mixed $value = null): static;

/**
* Set the attributes.
*
* @param iterable $attributes
*
* @return static
* @return $this
*/
public function attributes($attributes);
public function attributes(iterable $attributes): static;
}
Loading

0 comments on commit 01cdb76

Please sign in to comment.