Release notes for PHP: Nelson Martell Library.
This project adheres to Semantic Versioning.
-
Classes:
NelsonMartell\Extensions\Arrays.NelsonMartell\Extensions\MethodExtension.NelsonMartell\Extensions\Numbers.NelsonMartell\Extensions\Objects.NelsonMartell\Extensions\PropertyExtension.
-
Interfaces:
IMagicPropertiesContainer.
-
Methods:
NelsonMartell\Text::compare()NelsonMartell\Type::getInterfaces().NelsonMartell\Type::getProperties(), in replacement forNelsonMartell\Type::getVars().NelsonMartell\Type::hasGetTraits().NelsonMartell\Type::hasProperty().NelsonMartell\Type::is()NelsonMartell\Type::isIn()NelsonMartell\Extensions\Objects::compare(), in replacement forNelsonMartell\StrictObject::compare().NelsonMartell\Utilities\Text::camelize()(fromCake\Utility\Inflector).NelsonMartell\Utilities\Text::delimit()(fromCake\Utility\Inflector).NelsonMartell\Utilities\Text::humanize()(fromCake\Utility\Inflector).NelsonMartell\Utilities\Text::underscore()(fromCake\Utility\Inflector).NelsonMartell\Utilities\Text::variable()(fromCake\Utility\Inflector).
-
Support PHP versions:
7.3,7.4and8.0.
- Remove public access to most of getters methods. Now you should access it via property instead.
- Remove Pascal Case in properties. Properties updated to be camel case only (e.g. use
$version->majorinstead of$version->Major). - Signature of
NelsonMartell\PropertiesHandler::getPropertyGetter()andNelsonMartell\PropertiesHandler::getPropertySetter()methods: add$prefixand$useCustomparams. - Strict-typed return type of methods in
NelsonMartell\ICustomPrefixedPropertiesContainer. NelsonMartell\StrictObjectclass is abstract now.- Signature of
NelsonMartell\Type::getMethods()method: 🆕$filtersparameter with a default value.
NelsonMartell\StrictObject::compare()method. UseNelsonMartell\Extensions\Objects::compare()instead.NelsonMartell\Type::getVars()method. UseNelsonMartell\Type::getProperties()instead.
- Drop active support for eol PHP versions (https://www.php.net/supported-versions.php):
5.6,7.0,7.1and7.2(still keept internally for building documentation). Using this versions is dangerous. - Remove deprecated classes under
NelsonMartell\Utilitiesnamespace. - Remove
NelsonMartell\Type::$varsproperty. UseType::getProperties()method directly instead. - Remove
NelsonMartell\Type::$methodsproperty. UseType::getMethods()method directly instead. - Remove deprecated
NelsonMartell\IComparable::compare()method. ImplementNelsonMartell\IComparerinstead. - Remove
cakephp/utilydependency.NelsonMartell\Utilities\Textimplements a copy of used methods fromCake\Utility\Text(some basic methods fromCake\Utility\Inflectorwere placed inNelsonMartell\Utilities\Textclass).
- Problem in
NelsonMartell\StrictObject::compare()for some types, move implementation toNelsonMartell\Extensions\Objects, make it more generic and split implementation to:- 🆕
NelsonMartell\Text::compare() - 🆕
NelsonMartell\Arrays::compare() - 🆕
NelsonMartell\Numbers::compare()
- 🆕
- 🎨 📝 Improve DocBlocks.
- 🎨 Improve content and style of documentation.
- 🆙 Improve tests and increase the code coverage.
- 🆙 Improve coding style: add more rules to checks the code.
- 🆕 Composer command to perform PHP Syntax checks:
composer cs:php. - 🆕 Setup Rector and add composer commands to refactor (
composer refactor:lint,composer refactor:write). - 🆕 Setup PHPStan (used in
composer cs:php). - 🆕 Setup Prettier (
npm run cs:lint,npm run cs:fix). - 🆙 Rename composer commands and add descriptions (check CONTRIBUTING file).
- 🆕
class:NelsonMartell\Test\Helpers\ImplementsIConvertibleToString. - ⬆️ 📦 PHPUnit 5 -> PHPUnit 7. Add compatibility with PHPUnit 8 and 9.
- ⭐ Use Github Actions and Netlify for code review, testing and deploying documentation.
- 🔥 Disable Travis CI.
See changes since v0.7.2 for more detailed info.
- 🔥 Deprecate unsupported PHP versions: 5.6 and 7.0 (http://php.net/supported-versions.php).
See changes since v0.7.1 for more detailed info.
- 🆕 Documentation with VuePress (including API docs).
- 🆕 Compatible with PHP 7.3.
- 🆙 Improve Travis CI to auto-generate documentation.
- 🆙 Contributing instructions
See changes since v0.7.0 for more detailed info.
This release is mainly intended to provide PHP 7 compatibility:
- 🔥 Rename class
NelsonMartell\Extensions\StringtoNelsonMartell\Extensions\Text, but still available in PHP 5.6 as alias. - 🔥 Rename class
NelsonMartell\ObjecttoNelsonMartell\StrictObject, but still available in PHP < 7.2 as alias. - 🔥 Drop support for PHP < 5.6.
- 🔥 Remove deprecated code in v0.6.
- 🔥 Remove global functions. Are only available under
NelsonMartellnamespace now. - 🐛 Correct minor issues.
There are some improvements for development:
- ⬆️ Use PHPUnit 5.7 and update tests.
- ⬆️ Use PHP Code Sniffer 3.0.
- ⬆️ Prepare code to use ApiGen 5.0 (removed as dependency).
- 🆙 Update some internal scripts and other moved to the composer.json.
- 🆕 Add utility scripts to the composer.json (check the CONTRIBUTING file for more details):
composer test-codecomposer analize-codecomposer autofix-codecomposer check-allcomposer build:composer build-code-coverage:composer build-code-coverage-clovercomposer build-code-coverage-xmlcomposer build-code-coverage-html
composer build-api
- 🆕 Add CONTRIBUTING file.
NOTE: API Documentation not updated to this release due to conflict in API generation tool.
See changes since v0.6.1 for more detailed info.
- Minor improvements in sources and documentation info.
- Improvements in README instruccions.
- API deployment changes:
- 🔥 Deploy API documentation in local instead of TravisCI auto-generation.
- 📝 Improve API deployment script.
- 🆕 Interfaces:
IConvertibleToString.IConvertibleToJson.
See changes since v0.6.0 for more detailed info.
- 🔥 Removed dependencies copy. Now you must install dependencies manually if not using
composer.
- 🐛 Fixed issue (possible bug) in properties with custom prefix. Now, it must be implemented
ICustomPrefixedPropertiesContainerin order to use custom getter/setter prefixes (in addition toget/setdefaults).- 🆕 Interface:
ICustomPrefixedPropertiesContainer. Enables the use of custom properties getter/setter's prefixes. - 🔥 Removed
PropertiesHandler::$getterPrefixandPropertiesHandler::$setterPrefixstatic attributes (functionality replaced byICustomPrefixedPropertiesContainermethods). - 🆙 Methods of
PropertiesHandlertrait are nowprotected(instead ofprivate) and rewritten to work in astaticcontext (instead of object context).
- 🆕 Interface:
- 🐛 Fixed possible errors in
Extensions\String::formatif placeholder values arestdClassor warnings if value is not convertible to string (this is a weakness inusortusage in\Cake\Utility\Text\insert).Extensions\String::formatnow throws a catchable\InvalidArgumentExceptionif value of placeholder can't be convertible to string to avoid this 🐛. - 🆕 Interface:
IPropertiesContainer. - 🆕 Interface:
IComparer. Split fromIComparableto use onlycomparemethod.Objectclass already implementsIComparer. - 🆙 Deprecate
IComparable::comparemethod, to be replaced byIComparer::compare. - 🆙
IComparable::compareToimplementations are now able to returnnullif objects can't be compared. - 🐛 🆙 Improve
Object::comparemethod to compare different types. - 🆕 Created namespaced global functions under
NelsonMartelland deprecated the global ones (typeof(mixed $obj)and other internal functions) to be removed in the nextv0.7.0orv0.8.0release (see issue #17). - 📝 Improved and updated API documentation.
- 🆙 Other minor improvements and fixes.
Classes/interfaces/traits names in this description are under
NelsonMartellnamespace by default (unless name starts with\).
- 🆕 Tracking development progress in waffle.io.
- 🎨 Update copyright year and email in source files.
- 📝 Improve & update README file.
- ✅ Configure UnitTesting and added some tests for classes.
- ✅ Configure PHP CodeSniffer to be compliance with PSR2 coding standar by default.
- 🆕 Testing helpers (traits):
NelsonMartell\Test\Helpers\:ExporterPluginConstructorMethodTesterIComparerTesterIComparableTesterIPropertiesContainerTester
- 🆙 Configure Travis CI for testing and API documentation generation.
- 🆕 Utility scripts (read
script/README.mdfile: - 🎨 Other minor code and documentation improvements.
See changes since v0.5.1 for more detailed info.
- Automatize API generation via Travis CI
- Some improvements in documentation and instructions
- Minor fixes in possible errors
- Coding standards and other minor fixes
See detailed changelog.