Skip to content

Commit

Permalink
PHP 8.2, recude package size.
Browse files Browse the repository at this point in the history
  • Loading branch information
bupy7 committed Dec 12, 2022
1 parent 9426fd6 commit a2584b1
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.gitignore export-ignore
/.gitattributes export-ignore
/phpunit.xml export-ignore
/workenv export-ignore
/tests export-ignore
/.github export-ignore
/phpcs.php
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- 7.4
- 8.0
- 8.1
- 8.2
steps:
- uses: actions/checkout@v2

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ php-html-form
- *Dep*: Deprecated.
- *Fix*: Fixed.

2.0.2 [2022-12-12]
------------------

- Add: Support of PHP 8.2.
- Enh: Reduce size of package.

2.0.1 [2022-01-30]
------------------

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,22 @@ $ XDEBUG_MODE=coverage ./vendor/bin/phpunit
HTML coverage path: `build/coverage/index.html`
Code style
---
To fix code style, run:
```
~/.composer/vendor/bin/php-cs-fixer fix --config=./phpcs.php --verbose
```
You have to install [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) at first, if you
don't use build-in Docker image:

```
composer global require friendsofphp/php-cs-fixer "^3.13.0"
```

License
---

Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,5 @@
},
"autoload-dev": {
"classmap": ["tests/"]
},
"scripts": {
"cs:fix": "~/.composer/vendor/bin/php-cs-fixer fix --config=./phpcs.php --verbose"
}
}
5 changes: 5 additions & 0 deletions phpcs.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php declare(strict_types=1);

/**
* Configuration of code style fixer and checker for this library.
* This configuration compatible with friendsofphp/php-cs-fixer "^3.13.0".
*/

use PhpCsFixer\Finder;
use PhpCsFixer\Config;

Expand Down
6 changes: 3 additions & 3 deletions workenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM php:8.1-cli-alpine
FROM php:8.2-cli-alpine

RUN apk add --no-cache $PHPIZE_DEPS
RUN apk add --no-cache $PHPIZE_DEPS && apk add --update --no-cache linux-headers

RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
Expand All @@ -13,6 +13,6 @@ RUN if [ ${GITHUB_OAUTH_TOKEN} != false ]; then \
;fi
RUN export COMPOSER_DISABLE_XDEBUG_WARN=1

RUN composer global require friendsofphp/php-cs-fixer "^3.5.0"
RUN composer global require friendsofphp/php-cs-fixer "^3.13.0"

CMD ["php", "-a"]

0 comments on commit a2584b1

Please sign in to comment.