Skip to content

Commit

Permalink
Required PHP 8.3 (#42)
Browse files Browse the repository at this point in the history
* Required PHP 8.3

* Typed constants

* Fixed CHANGELOG
  • Loading branch information
davidbyoung committed Nov 29, 2023
1 parent f4264c2 commit 24ccdee
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
fail-fast: true
matrix:
include:
- php: '8.2'
stability: prefer-stable
- php: '8.3'
stability: prefer-stable
name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
Expand All @@ -35,7 +33,7 @@ jobs:
- name: Run Tests
run: composer phpunit
- name: Run Linter
run: PHP_CS_FIXER_IGNORE_ENV=1 composer phpcs-test
run: composer phpcs-test
- name: Run Psalm Static Analysis
run: composer psalm -- --shepherd
- name: Upload Coverage Results To Coveralls
Expand Down
4 changes: 2 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'compact_nullable_typehint' => true,
'compact_nullable_type_declaration' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'none'],
'declare_strict_types' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
// A very tiny micro-optimization to reduce the number of opcodes for native function calls
'native_function_invocation' => ['include' => ['@all']],
'new_with_braces' => true,
'new_with_parentheses' => true,
'no_empty_comment' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Changed

- Nothing
- Required PHP 8.3 ([#42](https://github.com/aphiria/app/pull/42))

## [v1.0.0-alpha5](https://github.com/aphiria/app/compare/v1.0.0-alpha4...v1.0.0-alpha5) (2023-09-24)

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ext-mbstring": "*",
"ext-pdo": "*",
"ext-sqlite3": "*",
"php": ">=8.2",
"php": ">=8.3",
"robmorgan/phinx": "0.x-dev",
"symfony/dotenv": "^6.1"
},
Expand All @@ -40,7 +40,7 @@
},
"scripts": {
"phpcs-test": "@phpcs-fix --dry-run",
"phpcs-fix": "php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --diff",
"phpcs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --diff",
"phpunit": "XDEBUG_MODE=coverage php vendor/phpunit/phpunit/phpunit --coverage-clover=./.coverage/clover.xml",
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.dist', '.env');\""
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/Schemes/CookieAuthenticationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
final class CookieAuthenticationHandler extends BaseCookieAuthenticationHandler
{
/** @var int The default cookie TTL in case one is not set in the cookie options */
private const DEFAULT_COOKIE_TTL_SECONDS = 3600;
private const int DEFAULT_COOKIE_TTL_SECONDS = 3600;

/**
* @param ITokenService $tokens The token service to create/retrieve tokens from
Expand Down
2 changes: 1 addition & 1 deletion src/Auth/SqlTokenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
final class SqlTokenService implements ITokenService
{
/** @var int The length of generated tokens */
private const TOKEN_LENGTH = 32;
private const int TOKEN_LENGTH = 32;

/**
* @param PDO $pdo The PDO instance to use to connect to the database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
final class DefaultCredentialGeneratorCommandHandler implements ICommandHandler
{
/** @const The length of the default user password */
private const DEFAULT_USER_PASSWORD_LENGTH = 32;
private const int DEFAULT_USER_PASSWORD_LENGTH = 32;

/**
* @inheritdoc
Expand Down
2 changes: 1 addition & 1 deletion src/Users/SqlUserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
final class SqlUserService implements IUserService
{
/** @var int The max allowed page size when paging through users */
private const MAX_PAGE_SIZE = 100;
private const int MAX_PAGE_SIZE = 100;

/**
* @param PDO $pdo The PDO instance to use to connect to the database
Expand Down

0 comments on commit 24ccdee

Please sign in to comment.