Skip to content

Releases: rotexsoft/slim-skeleton-mvc-tools

New Major Release

31 Jan 11:25
Compare
Choose a tag to compare
New Major Release Pre-release
Pre-release

Since there hasn't been a stable version 4.x release yet, the release notes on this major pre-release version will contain all the changes since the last stable version 3.x 3.0.6...4.2.0-RC1

  • The namespace prefix Slim3MvcTools has now been renamed to SlimMvcTools

  • Added more strict type hinting all over the code base where applicable.

  • Since Slim 4 doesn't ship with a Container implementation, \SlimMvcTools\Container which is powered by pimple (https://packagist.org/packages/pimple/pimple#v3.5.0) has been added and automatically provided as the default PSR Container implementation

  • \SlimMvcTools\ContainerKeys has been added to contain constants that will be used as keys to store items inside the Container. It should be extended in applications to add more Constants that will be used to store other items (specific to each application) inside the Container

  • \SlimMvcTools\ErrorHandler has been added and is the default Error Handler

  • ./src/ExpectedContainerItemMissingException.php has been deleted and replaced by the appropriate \Slim\Exception\* classes

  • \SlimMvcTools\HtmlErrorRenderer has been added to help users customize error pages in their applications for things like HTTP 404, 500, etc

  • \SlimMvcTools\LogErrorRenderer has been added to help users customize errors in their applications for things like HTTP 404, 500, etc are logged to the PSR Log destination configured for their application

  • src/HttpMethodNotAllowedController.php, src/HttpNotFoundController.php, src/HttpServerErrorController.php & src/IncorrectlySetPropertyException.php classes have deleted and replaced by the appropriate \Slim\Exception\* classes

  • \SlimMvcTools\MvcRouteHandler was added to handle MVC routing, it instantiates the desired controller and invokes the desired action (optionally with the specified arguments). Users do not really need to do anything with this class other than report bugs if encountered in the way it performs its tasks

  • Lots of changes to \SlimMvcTools\Controllers\BaseController

    • Getters and Setters available for its non-public properties where it makes sense
    • Added a locale object as a property of the controller for translating text and added code to set the current language
    • Added getAppBasePath() returns the value associated with app_base_path in the config/app_settings.php file of each app
    • Added getAppSetting(string $setting_key) as a shortcut for retrieving app setting values
    • Added makeLink(string $path) for generating redirect links in Responses & also links in view files
    • The current controller is available as $controller_object in View & Layout files rendered via renderLayout(...) & renderView(...)
    • The login related methods now have relevant texts localized and configurable in ./config/languages/*.php of each app
    • actionHttpNotFound(...) has been removed
    • determineContentType(ServerRequestInterface $request) has been removed
    • ensureVespulaAuthObjectIsSet() has been removed
    • generateNotAllowedResponse(...) has been removed
    • generateNotFoundResponse(...) has been removed
    • generateServerErrorResponse(...) has been removed
    • getContainerItem(string $item_key_in_container) now throws \Slim\Exception\HttpInternalServerErrorException instead of the now removed ExpectedContainerItemMissingException
    • New forceHttp###(string $message, ?ServerRequestInterface $request=null) methods were added for forcing things like HTTP 404 within action methods. They replace the now removed generateNotAllowedResponse(...), generateNotFoundResponse(...) & generateServerErrorResponse(...) methods
    • Take a look at the revamped code to find out how to fully take advantage of this rearchitected BaseController class
  • s3MVC_CreateController(...) has been renamed to sMVC_CreateController(...) & now throws \Slim\Exception\HttpBadRequestException & \Slim\Exception\HttpNotFoundException instead of \Exception & it also now has an explicit \SlimMvcTools\Controllers\BaseController return type

  • s3MVC_DumpAuthinfo(...) has been renamed to sMVC_DumpAuthinfo(...) with an explicit string return type

  • s3MVC_DumpVar($v) is now sMVC_DumpVar(...$vals): void

  • s3MVC_GetBaseUrlPath() has been removed; use \SlimMvcTools\Controllers\BaseController->getAppBasePath(): string instead

  • s3MVC_MakeLink($path) has been removed; use \SlimMvcTools\Controllers\BaseController->makeLink(string $path): string instead

  • s3MVC_GetSuperGlobal($global_name='', $key='', $default_val='') is now sMVC_GetSuperGlobal(string $global_name='', string $key='', $default_val='')

  • s3MVC_UriToString(\Psr\Http\Message\UriInterface $uri) is now sMVC_UriToString(\Psr\Http\Message\UriInterface $uri): string

  • s3MVC_addQueryStrParamToUri(\Psr\Http\Message\UriInterface $uri, $param_name, $param_value) is now sMVC_AddQueryStrParamToUri(\Psr\Http\Message\UriInterface $uri, string $param_name, string $param_value): \Psr\Http\Message\UriInterface

  • Added sMVC_DisplayAndLogFrameworkFileNotFoundError(...)

  • Added sMVC_DoGetCurrentAppEnvironment(string $app_path): string

  • Removed s3MVC_psr7RequestObjToString(...) & s3MVC_psr7UploadedFileToString(...)

  • Added sMVC_PrependAction2ActionMethodName(...)

  • Added sMVC_AddLangSelectionParamToUri(...)

  • Refactored a lot of the cli code

    • src/scripts/cli-script-helper-functions.php has now been namespaced to SlimMvcTools\Functions\CliHelpers
    • createController($argc, array $argv) is now createController($argc, array $argv): \SlimMvcTools\Functions\CliHelpers\CreateControllerReturnValue
    • displayHelp($cur_script):void is now displayHelp(string $cur_script): string
    • getOptVal($opt, array $args) is now getOptVal(string $opt, array $args): ?string
    • isCommandAvailableOnOs($command) has been removed
  • Close to 100% unit test coverage now

  • See 3.0.6...4.2.0-RC1 for detailed changes across the code base

Slim 4 Prep

19 Feb 02:05
Compare
Choose a tag to compare
Slim 4 Prep Pre-release
Pre-release

Full Changelog: 4.1.0-RC3...4.1.0-RC4

Slim 4 Prep

18 Feb 13:19
Compare
Choose a tag to compare
Slim 4 Prep Pre-release
Pre-release

Full Changelog: 4.1.0-RC2...4.1.0-RC3

Slim 4 Prep

18 Feb 10:49
Compare
Choose a tag to compare
Slim 4 Prep Pre-release
Pre-release

Full Changelog: 4.1.0-RC1...4.1.0-RC2

Slim 4 Prep

18 Feb 09:53
Compare
Choose a tag to compare
Slim 4 Prep Pre-release
Pre-release

Full Changelog: 4.0.1-RC1...4.1.0-RC1

Slim 4 Prep

28 Jan 00:51
Compare
Choose a tag to compare
Slim 4 Prep Pre-release
Pre-release

Full Changelog: 4.0.0...4.0.1

Maintenance Release

10 May 23:31
Compare
Choose a tag to compare
  • Updated badges & license to BSD 3

Maintenance Release

15 Mar 13:08
Compare
Choose a tag to compare
  • Enhanced login error messages

Major Release

09 Apr 07:01
Compare
Choose a tag to compare
Major Release Pre-release
Pre-release
  • Upgraded to use Slim 4

Enhancement

09 Apr 01:32
Compare
Choose a tag to compare

Renamed s3mvc-create-controller* to smvc-create-controller* in prep for slim 4 upgrade