fewedev / base
Feasible web development base classes
2.4.1
2026-11-18 17:41 UTC
Requires
- php: >=7.4
- ext-json: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.3
- phpstan/phpstan: ^2.2
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^9.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
FeWeDev Base provides helping classes for all feasible web developments.
Installation
$ composer require fewedev/base
Converting values
FeWeDev\Base\Variables converts values of unknown type, for example from configurations, requests or databases:
stringValue($value)returns scalars and objects with__toString()as string, other values as theirvar_export()code, for exampleNULLfor null.stringValueOrDefault($value, $defaultValue = '')returns scalars and objects with__toString()as string, other values (null, arrays, objects without__toString()) as the default value; use it where a missing value must not become the textNULL.intValue($value)returns an integer and throws anInvalidArgumentExceptionfor values that cannot be converted.
Development
composer test # unit tests composer ps # PHPStan composer cs # PHP CS Fixer, without changes
The library supports PHP 7.4 and newer. The CI workflow runs the unit tests with every PHP version from 7.4 to 8.5 and
PHPStan and PHP CS Fixer with PHP 8.4, on every push and pull request. A push to the main branch releases the version
of composer.json (tag and GitHub release with the section of CHANGELOG.md) when all checks pass; Packagist picks up
the tag.
License
FeWeDev Base is licensed under the MIT License - see the LICENSE file for details.