Releases: neoground/charm
Releases · neoground/charm
v3.6
✨ Added
- Garbage collector config options, improve default garbage collection in session module
- Facade classes for modules: Config, DB (eloquent connection, similar to laravel's DB facade), Log,
Request, Router, Session - New methods to delete a directory and its content:
C::Storage()->deleteDirectory($dir)
andC::Storage()->deleteFilesInDirectory($dir)
- Model methods:
beforeDelete()
+afterDelete()
, simplified cache handling on save / on delete - Set multiple request values at once via array (for
C::Request()->set([])
andC::Request()->setMultiple([])
) Charm\Storage\File
class for file related methods, added SHA256 + MD5 checksum methods
🔧 Changed
- Improve performance and code structure of
C::Storage()->scanDir()
and the filteredscanDirFor...()
methods - Update composer packages
🐞 Fixed
- Fix URL construction in Router module for URLs with ports + fragments
v3.5.4
v3.5.3
v3.5.2
v3.5.1
v3.5
✨ Added
- Model filtering via
filterBasedOnRequest()
andgetFilteredPaginatedData()
can now be customized
with a custom callback which allows adjusting the QueryBuilder - Run cron jobs via a dedicated daemon:
bob cron:daemon start/stop/info
, works beautifully with a systemd service - Uploaded files can now directly be transformed into an
Image
object for easy image manipulation / conversion - Add base64 support for fetching multiple files in a single upload (array of base64 strings)
- Create and validate a CSRF token in a session via
C::Session()->generateCsrfToken()
- A string can now easily be escaped via
C::Formatter()->escape($str)
- New module
C::Header()
for easy handling of request / response headers with handy methods to set the most
common headers directly, including CORS and security related headers - Login throttling via
C::Guard()->throttleLogin()
, check if a client is blocked viaC::Guard()->isBlocked()
- Logging of the stack trace when an exception happens during a cron job
🔧 Changed
- Replace symfony/process with exec for better detachment of cron jobs in background
- Move dev packages (debugbar, kint, phpunit, whoops) to require-dev, made their usage optional in the framework
- Failed login attempts are stored more intelligently and expired failed logins are removed automatically
🐞 Fixed
- A bug when a view is rendered via CLI where the Session module is not available
🔥 Removed
- Polyfill for
apache_request_headers()
since we now have an own moduleC::Header()
v3.4.1
v3.4
✨ Added
- New console command
cron:info
which shows all cron jobs and allows the creation of systemd service + timer files - New console command
sys:info
which displays some basic information of the app - Caching to Model's
getFilteredPaginatedData()
- Caching to Json outputs via
Json::makeWithCache(...)
, can automatically append a unique hash based on the request - New CLI command method
$this->io->writelnVerbose($message)
to output a message only if output verbosity is verbose - CLI command helper constants for verbose output, input option and input arguments
🔧 Changed
- The formatted duration of a Performance Metric only returns the seconds if duration is below 1 minute
- The module installer is now called via
bob c:mod
and is prepared to install and uninstall modules (still WIP!) - When using
C::Cache()->remember(...)
you can now also specify optional tags to apply to the saved entry - Creating a Token via
C::Token()->createToken($length)
is now improved and returns a better string utilizing
the whole alphabet instead of base64, also addingC::Token()->generateSecureToken($length)
for simple token
string generation - Crown is now running jobs in a detached process utilizing
nohup
, improve systemd service for parallel running
v3.3
✨ Added
UserModel
class which is the new base model for the app'sUser
model.- Types, refactoring and default values for EngineManager
C::Arrays()->array_merge_recursive(...)
now allows any data type as input arrays and will cast them into arrays.- When creating a
View
output object you can now access the twig environment to modify it as you like. - Model properties can now be filtered as
array_like
, so you can provide multiple values which all must be
contained in the property. - When getting the current user via
C::Guard()->getUser(true)
you can now set a bool parameter to decide if
the user data should be fetched from the cache (true, default) or from the database via a query (false).
🔧 Changed
- Maintenance mode commands are now
c:up
andc:down
to harmonize the namespace of charm's own CLI commands - Merge charm creator CLI commands into a single
c:new
, onlyc:env
stays the same C::Arrays()->get(...)
andC::Arrays()->has(...)
now take any type as an array input
and will cast it into an array.- Add total runtime metric method and refine time measurement. You can easily get the
Metric
object of the total
runtime viaC::Performance()->getTotalRuntimeMetric()
and easily adjust the start and end time ofMetric
objects. - When an error occurs while outputting the error exception will be thrown instead of a generic one. This gives
you the correct stack trace for debugging, if exception throwing is enabled. - The CLI's
$this->io
CommandHelper class now has own setters for input and output objects and can be created without
any of them.
🐞 Fixed
- The database migrator command
bob db:sync
now displays the stats correctly. - Command's
$this->io->choice(...)
worke fine again. - Performance tracking of CLI commands
🔥 Removed
- Dropped support for FTP filesystems (SFTP is preferred if needed at all).
- Removed kint-twig package to remove unnecessary overhead, if needed it can be added and linked manually.