Skip to content

Commit

Permalink
Ideas for future releases
Browse files Browse the repository at this point in the history
  • Loading branch information
meritoo committed Nov 14, 2024
1 parent b607cc6 commit 989229d
Showing 1 changed file with 37 additions and 16 deletions.
53 changes: 37 additions & 16 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,40 @@

## Things to do

### Fix PHPStan errors

- [x] `Undefined variable: $isEqual` - replace `eval()` with callable
in [src/Utilities/Regex.php:151](./src/Utilities/Regex.php)
- [x] `Unsafe usage of new static()` - chose one
of [possible solutions](https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static) -
in [src/Type/Base/BaseType.php:37](./src/Type/Base/BaseType.php)
- [x] `Unsafe usage of new static()` - chose one
of [possible solutions](https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static) -
in [src/Exception/Base/UnknownTypeException.php:40](./src/Exception/Base/UnknownTypeException.php)
- [x] Clean and remove the [phpstan-baseline.neon](phpstan-baseline.neon) file finally

### Refactoring

- [ ] Replace `Meritoo\Common\Type\OopVisibilityType` class
with [PHP enum](https://www.php.net/manual/en/language.types.enumerations.php)
- [ ] Bump PHP version: `8.0` -> `8.2`
- [ ] Run GitHub Actions for `8.2`, `8.3`, and `8.4` (do not run for `8.0` and `8.1`)
- [ ] Fix deprecations when running PHPUnit tests
- [ ] Replace all the `*Type` classes
with [enumerations](https://www.php.net/manual/en/language.types.enumerations.php) (
classes that extend `Meritoo\Common\Type\Base\BaseType`)

**A new `enum`:**

```php
<?php

declare(strict_types=1);

namespace Meritoo\Common\Enums;

enum OopVisibility: string
{
case Private = '3';
case Protected = '2';
case Public = '1';
}
```

**A new piece of `[CHANGELOG.md](CHANGELOG.md)`:**

6. Replace all the `*Type` classes
with [enumerations](https://www.php.net/manual/en/language.types.enumerations.php) (
classes that extend `Meritoo\Common\Type\Base\BaseType`)

| Before | After |
|---------------------------|----------------------|
| `class OopVisibilityType` | `enum OopVisibility` |
| ... | ... |
| ... | ... |

- [ ] Bump PHPStan level: `1` -> `2`

0 comments on commit 989229d

Please sign in to comment.