Releases: rotexsoft/slim-skeleton-mvc-tools
New Minor Major Release
- Enhancements to \SlimMvcTools\Controllers\BaseController
- renderLayout & renderView generates a 404 response if the layout or view file cannot be found
- Added a new optional argument ?\Throwable $previous_exception = null to the forceHttp### methods for injecting a previous excption into the http exception to be thrown
Full Changelog: 7.1.1...7.2.0
Minor Release
- Added PHPUnit 12 as a dev dependency
Full Changelog: 7.1.0...7.1.1
Minor Major Release
- Updated rotexsoft/file-renderer to version ^8.0
Full Changelog: 7.0.1...7.1.0
Minor Release
- Minor tweaks
Full Changelog: 7.0.0...7.0.1
New Major Version
-
Added new public helper methods to SlimMvcTools\Controllers\BaseController:
- responseWithContentTypeCsv(string $content, string $filename, int $status = 200): ResponseInterface
- responseWithContentTypeHtml(string $html, int $status = 200): ResponseInterface
- responseWithContentTypeJson(array|string $data, int $status = 200): ResponseInterface
- isAppInDevMode(): bool
- isAppInProductionMode(): bool
- isAppInStagingMode(): bool
- isAppInTestingMode(): bool
- isDeleteRequest(): bool
- isGetRequest(): bool
- isOptionsRequest(): bool
- isPatchRequest(): bool
- isPostRequest(): bool
- isPutRequest(): bool
- logError(string $logMessage): static
- logInfo(string $logMessage): static
- logNotice(string $logMessage): static
- logWarning(string $logMessage): static
- redirect(string $url, bool $callMakeLink=true, int $status = 301): ResponseInterface
-
Making this a new major version in order to avoid existing apps that may have declared any of these methods in any sub-class of SlimMvcTools\Controllers\BaseController from breaking
Full Changelog: 6.3.3...7.0.0
Minor Release
- Now allowing the use of a new placeholder {{{APP_BASE_PATH}}} in the file specified in AppSettingsKeys::ERROR_TEMPLATE_FILE_PATH for injecting the app's base path into the specified file
- Added getContainerItem(string $containerKey, mixed $fallbackValue=null): mixed to src/BaseErrorRendererTrait.php
Full Changelog: 6.3.2...6.3.3
Minor Release
- Updated \SlimMvcTools\LogErrorRenderer->__invoke(\Throwable $exception, bool $displayErrorDetails): string to also respect the logErrorDetails app settings when rendering errors destined for the logger. It previously only respected the displayErrorDetails setting.
Full Changelog: 6.3.1...6.3.2
Minor Release
-
The following renderers are now capable of displaying localized texts via the new getLocalizedText(string $localeKey, string $fallbackText=''): string method added to \SlimMvcTools\BaseErrorRendererTrait (if a container instance is set on each of them via the new setContainer(?\Psr\Container\ContainerInterface $newContainer): static method added to \SlimMvcTools\BaseErrorRendererTrait)
- \SlimMvcTools\HtmlErrorRenderer
- \SlimMvcTools\LogErrorRenderer
- \SlimMvcTools\JsonErrorRenderer
- \SlimMvcTools\XmlErrorRenderer
The container is set on each of these renderers in https://github.com/rotexsoft/slim-skeleton-mvc-app/blob/master/config/routes-and-middlewares-dist.php so you should not have to set them if you are using any of the renderers above
- The forceHttp### methods in \SlimMvcTools\Controllers\BaseController now throw Exceptions with localized titles and descriptions
Full Changelog: 6.3.0...6.3.1
Minor Major Release
- Tweaked all calls to nl2br to now spit out <br> instead of <br />
Full Changelog: 6.2.0...6.3.0