Skip to content

Releases: neoground/charm

v3.6

12 Dec 16:38
Compare
Choose a tag to compare

✨ 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) and C::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([]) and C::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 filtered scanDirFor...() methods
  • Update composer packages

🐞 Fixed

  • Fix URL construction in Router module for URLs with ports + fragments

v3.5.4

16 Sep 09:55
Compare
Choose a tag to compare

✨ Add laravel/serializable-closure package which is a replacement for opis/closure

v3.5.3

16 Sep 09:43
Compare
Choose a tag to compare

Move dev packages back to require because they are needed for the app development, not only for the framework development.

v3.5.2

18 Aug 16:52
Compare
Choose a tag to compare

🔧 Adjust log output to new interface, update dependencies

v3.5.1

18 Aug 15:10
Compare
Choose a tag to compare

🐞 Small bug fix for new Header module

v3.5

18 Aug 13:25
Compare
Choose a tag to compare

✨ Added

  • Model filtering via filterBasedOnRequest() and getFilteredPaginatedData() 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 via C::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 module C::Header()

v3.4.1

21 Apr 15:16
Compare
Choose a tag to compare

🐞 Small bug fix for the crown system, now works as expected again

v3.4

20 Apr 18:53
Compare
Choose a tag to compare

✨ 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 adding C::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

14 Mar 09:23
Compare
Choose a tag to compare

✨ Added

  • UserModel class which is the new base model for the app's User 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 and c:down to harmonize the namespace of charm's own CLI commands
  • Merge charm creator CLI commands into a single c:new, only c:env stays the same
  • C::Arrays()->get(...) and C::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 via C::Performance()->getTotalRuntimeMetric() and easily adjust the start and end time of Metric 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.

v3.2.2

03 Mar 10:39
Compare
Choose a tag to compare

Minor improvements