diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 52ea026..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,44 +0,0 @@ -defaults: &defaults - steps: - # common php steps - - run: echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories - - run: if [ -n "$ADD_PACKAGES" ]; then apk -U add $ADD_PACKAGES; fi; - - run: if [ -n "$ADD_MODULES" ]; then docker-php-ext-install $ADD_MODULES; fi; - - run: echo "date.timezone = UTC" >> $(php --ini |grep Scan |awk '{print $NF}')/timezone.ini - - run: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer - - # pre-checkout steps - - # checkout - - checkout - - # post-checkout steps - - # run tests - - run: composer install -n --prefer-dist - - run: php vendor/phpunit/phpunit/phpunit -c phpunit.xml --log-junit /tmp/test-results/phpunit/junit.xml - - store_test_results: - path: /tmp/test-results - -version: 2 -jobs: - build-php73: - <<: *defaults - docker: - - image: php:7.3-alpine - build-php74: - <<: *defaults - docker: - - image: php:7.4-alpine - build-php80: - <<: *defaults - docker: - - image: php:8.0-alpine - -workflows: - version: 2 - build: - jobs: - - build-php73 - - build-php74 - - build-php80 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 69398c1..5af5aa9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ 7.3, 7.4, 8.0 ] + php: [ '7.3', '7.4', '8.2', '8.3', '8.4', '8.5' ] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v7 with: fetch-depth: 0 diff --git a/.gitignore b/.gitignore index 0088688..0d12c86 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ !.yarn/releases !.yarn/plugins .pnp.* +/.phpunit.result.cache diff --git a/php/src/DataHandlers/AbstractDataHandler.php b/php/src/DataHandlers/AbstractDataHandler.php index f223232..19935d0 100644 --- a/php/src/DataHandlers/AbstractDataHandler.php +++ b/php/src/DataHandlers/AbstractDataHandler.php @@ -97,7 +97,7 @@ public function setId(string $id) */ public function getLabel() { - return $this->_label ?? Strings::titleize(Strings::splitOnCamelCase($this->getName())); + return $this->_label ?? Strings::titleize(Strings::splitOnCamelCase((string)$this->getName())); } /** @@ -116,7 +116,7 @@ public function setLabel($label) */ public function getPlaceholder() { - return $this->_placeholder ?? Strings::titleize(Strings::splitOnCamelCase($this->getName())); + return $this->_placeholder ?? Strings::titleize(Strings::splitOnCamelCase((string)$this->getName())); } /** diff --git a/php/src/DataHandlers/EnumDataHandler.php b/php/src/DataHandlers/EnumDataHandler.php index 9fac86d..5fba22f 100644 --- a/php/src/DataHandlers/EnumDataHandler.php +++ b/php/src/DataHandlers/EnumDataHandler.php @@ -21,7 +21,7 @@ class EnumDataHandler extends AbstractDataHandler protected $_options = []; protected $_inputStyle = self::INPUT_STYLE_COMBINED; - public function __construct(array $options = null) + public function __construct(?array $options = null) { if($options !== null) { diff --git a/php/src/Form/Form.php b/php/src/Form/Form.php index ab15920..306158d 100644 --- a/php/src/Form/Form.php +++ b/php/src/Form/Form.php @@ -298,6 +298,7 @@ public function decorate($for): Decorator public function getHandlerDecorator($fieldName = null): DataHandlerDecorator { + $fieldName = $fieldName ?? ''; if(!isset($this->_handlerDecorator[$fieldName])) { $this->_handlerDecorator[$fieldName] = clone $this->_defaultHandlerDecorator(); @@ -305,7 +306,7 @@ public function getHandlerDecorator($fieldName = null): DataHandlerDecorator return $this->_handlerDecorator[$fieldName]; } - public function setHandlerDecorator(DataHandlerDecorator $decorator, string $field = null) + public function setHandlerDecorator(DataHandlerDecorator $decorator, ?string $field = null) { if($field === null) { diff --git a/phpunit.xml b/phpunit.xml index a7a915f..3deb43f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@