diff --git a/.gitattributes b/.gitattributes index 709120a..63c0ce0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,4 +11,14 @@ # @link https://github.com/JBZoo/Less # +/.phan export-ignore +/build export-ignore +/tests export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/phpunit.xml.dist export-ignore +/Makefile export-ignore + * text eol=lf diff --git a/.phan/config.php b/.phan/config.php index d2ced60..7bf5b18 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + $default = include __DIR__ . '/../vendor/jbzoo/codestyle/src/phan/default.php'; return array_merge($default, [ diff --git a/.travis.yml b/.travis.yml index 48e20a2..90cfec8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,14 @@ php: - 7.2 - 7.3 - 7.4 + - 8.0 + - nightly + +jobs: + fast_finish: true + allow_failures: + - php: 8.0 + - php: nightly env: matrix: diff --git a/README.md b/README.md index df65b77..6e7dbad 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # JBZoo / Less -[![Build Status](https://travis-ci.org/JBZoo/Less.svg)](https://travis-ci.org/JBZoo/Less) [![Coverage Status](https://coveralls.io/repos/JBZoo/Less/badge.svg)](https://coveralls.io/github/JBZoo/Less) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Less/coverage.svg)](https://shepherd.dev/github/JBZoo/Less) +[![Build Status](https://travis-ci.org/JBZoo/Less.svg)](https://travis-ci.org/JBZoo/Less) [![Coverage Status](https://coveralls.io/repos/JBZoo/Less/badge.svg)](https://coveralls.io/github/JBZoo/Less) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Less/coverage.svg)](https://shepherd.dev/github/JBZoo/Less) [![PHP Strict Types](https://img.shields.io/badge/strict__types-%3D1-brightgreen)](https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict) [![Stable Version](https://poser.pugx.org/jbzoo/less/version)](https://packagist.org/packages/jbzoo/less) [![Latest Unstable Version](https://poser.pugx.org/jbzoo/less/v/unstable)](https://packagist.org/packages/jbzoo/less) [![Dependents](https://poser.pugx.org/jbzoo/less/dependents)](https://packagist.org/packages/jbzoo/less/dependents?order_by=downloads) [![GitHub Issues](https://img.shields.io/github/issues/jbzoo/less)](https://github.com/JBZoo/Less/issues) [![Total Downloads](https://poser.pugx.org/jbzoo/less/downloads)](https://packagist.org/packages/jbzoo/less/stats) [![GitHub License](https://img.shields.io/github/license/jbzoo/less)](https://github.com/JBZoo/Less/blob/master/LICENSE) diff --git a/composer.json b/composer.json index 5989674..2012238 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,13 @@ "require" : { "php" : ">=7.2", - "jbzoo/data" : "^4.1.3", - "jbzoo/utils" : "^4.2.3", + "jbzoo/data" : "^4.2.0", + "jbzoo/utils" : "^4.3.0", "wikimedia/less.php" : "^3.1.0" }, "require-dev" : { - "jbzoo/toolbox-dev" : "^2.6.2" + "jbzoo/toolbox-dev" : "^2.10.0" }, "autoload" : { diff --git a/src/Cache.php b/src/Cache.php index b29b735..8d88a16 100644 --- a/src/Cache.php +++ b/src/Cache.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\Less; use JBZoo\Data\Data; @@ -27,7 +29,7 @@ * Class Cache * @package JBZoo\Less */ -class Cache +final class Cache { /** * @var int diff --git a/src/Exception.php b/src/Exception.php index 99abb94..02bc8a9 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\Less; /** diff --git a/src/Gpeasy.php b/src/Gpeasy.php index 1b025b3..f2d1aae 100644 --- a/src/Gpeasy.php +++ b/src/Gpeasy.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\Less; use JBZoo\Data\Data; @@ -24,7 +26,7 @@ * Class Gpeasy * @package JBZoo\Less */ -class Gpeasy +final class Gpeasy { /** * @var Less_Parser|null diff --git a/src/Less.php b/src/Less.php index fec2c11..1c07ca1 100644 --- a/src/Less.php +++ b/src/Less.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\Less; use JBZoo\Data\Data; @@ -25,7 +27,7 @@ * Class Less * @package JBZoo\Less */ -class Less +final class Less { /** * @var array diff --git a/tests/AbstractLessTest.php b/tests/AbstractLessTest.php index d94fb37..e362b41 100644 --- a/tests/AbstractLessTest.php +++ b/tests/AbstractLessTest.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\PHPUnit; use JBZoo\Less\Less; diff --git a/tests/DriverGpeasyTest.php b/tests/DriverGpeasyTest.php index 368358f..9879794 100644 --- a/tests/DriverGpeasyTest.php +++ b/tests/DriverGpeasyTest.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\PHPUnit; /** diff --git a/tests/LessCodestyleTest.php b/tests/LessCodestyleTest1.php similarity index 83% rename from tests/LessCodestyleTest.php rename to tests/LessCodestyleTest1.php index b1a1d7e..d92fa8f 100644 --- a/tests/LessCodestyleTest.php +++ b/tests/LessCodestyleTest1.php @@ -13,15 +13,18 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\PHPUnit; /** * Class LessCodestyleTest * @package JBZoo\PHPUnit */ -class LessCodestyleTest extends AbstractCopyrightTest +class LessCopyrightTest extends AbstractCopyrightTest { - protected $packageName = "Less"; + protected $packageName = "Less"; + protected $isPhpStrictType = true; protected function setUp(): void { diff --git a/tests/LessComposerTest.php b/tests/LessComposerTest.php index 176ee3c..d602162 100644 --- a/tests/LessComposerTest.php +++ b/tests/LessComposerTest.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\PHPUnit; /** diff --git a/tests/LessCopyrightsTest.php b/tests/LessCopyrightsTest.php index be7d3d8..819cbef 100644 --- a/tests/LessCopyrightsTest.php +++ b/tests/LessCopyrightsTest.php @@ -13,13 +13,15 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\PHPUnit; /** - * Class LessCopyrightsTest + * Class LessCodestyleTest * @package JBZoo\PHPUnit */ -class LessCopyrightsTest extends AbstractCodestyleTest +class LessCodestyleTest extends AbstractCodestyleTest { } diff --git a/tests/LessReadmeTest.php b/tests/LessReadmeTest.php index f9830a1..cda0d12 100644 --- a/tests/LessReadmeTest.php +++ b/tests/LessReadmeTest.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + namespace JBZoo\PHPUnit; /** @@ -23,4 +25,10 @@ class LessReadmeTest extends AbstractReadmeTest { protected $packageName = 'Less'; + + protected function setUp(): void + { + parent::setUp(); + $this->params['strict_types'] = true; + } } diff --git a/tests/autoload.php b/tests/autoload.php index 577d475..1dc6ddd 100644 --- a/tests/autoload.php +++ b/tests/autoload.php @@ -13,6 +13,8 @@ * @link https://github.com/JBZoo/Less */ +declare(strict_types=1); + if (!defined('ROOT_PATH')) { // for PHPUnit process isolation define('ROOT_PATH', realpath('.')); }