From 94125988269ce122fdba06ce6fcd2ee8049dbe1e Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 11 Dec 2023 22:32:15 +0100 Subject: [PATCH 01/41] fix markdown rul;es --- .markdownlint.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.markdownlint.json b/.markdownlint.json index 3707fcb8c..cd13022ac 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -8,8 +8,7 @@ "no-multiple-blanks": { "maximum": 2 }, - "no-duplicate-header" : { - "siblings_only" : true - }, + "no-duplicate-header" : false, + "no-duplicate-heading" : false, "no-inline-html" : false } From e7ef1f7dce614b68a301034a53ba90ce537e1aea Mon Sep 17 00:00:00 2001 From: Github Actions Date: Mon, 11 Dec 2023 21:37:01 +0000 Subject: [PATCH 02/41] Version bump --- box.json | 2 +- changelog.md | 306 ++++++++++++++++++++++++++------------------------- 2 files changed, 156 insertions(+), 152 deletions(-) diff --git a/box.json b/box.json index c4126477e..20bee1cf6 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"ColdBox Platform", - "version":"7.2.1", + "version":"7.3.0", "location":"https://downloads.ortussolutions.com/ortussolutions/coldbox/@build.version@/coldbox-@build.version@.zip", "author":"Ortus Solutions ", "slug":"coldbox", diff --git a/changelog.md b/changelog.md index d3f565237..779b7691e 100644 --- a/changelog.md +++ b/changelog.md @@ -9,17 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.2.1] - 2023-12-11 + ### ColdBox HMVC #### Bug Fixes -* COLDBOX-1264 - standalone libs issue with agressive excludes on build process and wirebox standalone not building correctly +- COLDBOX-1264 - standalone libs issue with agressive excludes on build process and wirebox standalone not building correctly ### CacheBox #### Bug Fixes -* CACHEBOX-85 - Improve Lock and Double `get` from getOrSet +- CACHEBOX-85 - Improve Lock and Double `get` from getOrSet ## [7.2.0] - 2023-11-18 @@ -27,68 +29,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### New Feature -* [COLDBOX-1248](https://ortussolutions.atlassian.net/browse/COLDBOX-1248) Scheduled tasks now get a \`group\` property so you can use it for grouping purposes -* [COLDBOX-1252](https://ortussolutions.atlassian.net/browse/COLDBOX-1252) New \`now()\` method in the DateTmeHelper with optional TimeZone -* [COLDBOX-1253](https://ortussolutions.atlassian.net/browse/COLDBOX-1253) New datetimehelper method: getSystemTimezoneAsString() -* [COLDBOX-1256](https://ortussolutions.atlassian.net/browse/COLDBOX-1256) New ScheduledTask helper: getLastResult() to get the latest result -* [COLDBOX-1257](https://ortussolutions.atlassian.net/browse/COLDBOX-1257) LastResult is now a cbproxies Optional to denote a value or not (COMPAT) -* [COLDBOX-1258](https://ortussolutions.atlassian.net/browse/COLDBOX-1258) new scheduledTask method: isEnabled() to verify if the task is enabled -* [COLDBOX-1259](https://ortussolutions.atlassian.net/browse/COLDBOX-1259) Complete rewrite of Scheduled Task setNextRuntime() calculations to account for start end running scenarios -* [COLDBOX-1260](https://ortussolutions.atlassian.net/browse/COLDBOX-1260) new ScheduledTask period : everySecond() -* [COLDBOX-1262](https://ortussolutions.atlassian.net/browse/COLDBOX-1262) New SchemaInfo helper to help interrogate databases for metadata -* [COLDBOX-1263](https://ortussolutions.atlassian.net/browse/COLDBOX-1263) Add an errorHandler to the allApply method so you can attach your own error handler to each future computation +- [COLDBOX-1248](https://ortussolutions.atlassian.net/browse/COLDBOX-1248) Scheduled tasks now get a \`group\` property so you can use it for grouping purposes +- [COLDBOX-1252](https://ortussolutions.atlassian.net/browse/COLDBOX-1252) New \`now()\` method in the DateTmeHelper with optional TimeZone +- [COLDBOX-1253](https://ortussolutions.atlassian.net/browse/COLDBOX-1253) New datetimehelper method: getSystemTimezoneAsString() +- [COLDBOX-1256](https://ortussolutions.atlassian.net/browse/COLDBOX-1256) New ScheduledTask helper: getLastResult() to get the latest result +- [COLDBOX-1257](https://ortussolutions.atlassian.net/browse/COLDBOX-1257) LastResult is now a cbproxies Optional to denote a value or not (COMPAT) +- [COLDBOX-1258](https://ortussolutions.atlassian.net/browse/COLDBOX-1258) new scheduledTask method: isEnabled() to verify if the task is enabled +- [COLDBOX-1259](https://ortussolutions.atlassian.net/browse/COLDBOX-1259) Complete rewrite of Scheduled Task setNextRuntime() calculations to account for start end running scenarios +- [COLDBOX-1260](https://ortussolutions.atlassian.net/browse/COLDBOX-1260) new ScheduledTask period : everySecond() +- [COLDBOX-1262](https://ortussolutions.atlassian.net/browse/COLDBOX-1262) New SchemaInfo helper to help interrogate databases for metadata +- [COLDBOX-1263](https://ortussolutions.atlassian.net/browse/COLDBOX-1263) Add an errorHandler to the allApply method so you can attach your own error handler to each future computation #### Improvement -* [COLDBOX-1246](https://ortussolutions.atlassian.net/browse/COLDBOX-1246) casting to long instead of int when using LocalDateTime and plus methods to avoid casting issues. -* [COLDBOX-1247](https://ortussolutions.atlassian.net/browse/COLDBOX-1247) Do not expose restful handler exception data unless you are in debug mode -* [COLDBOX-1250](https://ortussolutions.atlassian.net/browse/COLDBOX-1250) RestHandler.cfc should catch NotAuthorized exception -* [COLDBOX-1254](https://ortussolutions.atlassian.net/browse/COLDBOX-1254) getFirstBusinessDayOfTheMonth(), getLastBusinessDayOfTheMonth() now refactored to the dateTimeHelper -* [COLDBOX-1255](https://ortussolutions.atlassian.net/browse/COLDBOX-1255) validateTime() is now a helper method in the DateTimeHelper -* [COLDBOX-1261](https://ortussolutions.atlassian.net/browse/COLDBOX-1261) Migration of old tasks to new task syntax of task() +- [COLDBOX-1246](https://ortussolutions.atlassian.net/browse/COLDBOX-1246) casting to long instead of int when using LocalDateTime and plus methods to avoid casting issues. +- [COLDBOX-1247](https://ortussolutions.atlassian.net/browse/COLDBOX-1247) Do not expose restful handler exception data unless you are in debug mode +- [COLDBOX-1250](https://ortussolutions.atlassian.net/browse/COLDBOX-1250) RestHandler.cfc should catch NotAuthorized exception +- [COLDBOX-1254](https://ortussolutions.atlassian.net/browse/COLDBOX-1254) getFirstBusinessDayOfTheMonth(), getLastBusinessDayOfTheMonth() now refactored to the dateTimeHelper +- [COLDBOX-1255](https://ortussolutions.atlassian.net/browse/COLDBOX-1255) validateTime() is now a helper method in the DateTimeHelper +- [COLDBOX-1261](https://ortussolutions.atlassian.net/browse/COLDBOX-1261) Migration of old tasks to new task syntax of task() #### Bug -* [COLDBOX-1241](https://ortussolutions.atlassian.net/browse/COLDBOX-1241) Scheduled Task Stats "NextRun", "Created", "LastRun" Using Wrong Timezones -* [COLDBOX-1244](https://ortussolutions.atlassian.net/browse/COLDBOX-1244) onSessionEnd Error when using Coldbox_App_Key -* [COLDBOX-1245](https://ortussolutions.atlassian.net/browse/COLDBOX-1245) Scheduled task isConstrainted() on day of the month was calculating the days in month backwards -* [COLDBOX-1251](https://ortussolutions.atlassian.net/browse/COLDBOX-1251) set next run time when using first or last business day was not accounting times +- [COLDBOX-1241](https://ortussolutions.atlassian.net/browse/COLDBOX-1241) Scheduled Task Stats "NextRun", "Created", "LastRun" Using Wrong Timezones +- [COLDBOX-1244](https://ortussolutions.atlassian.net/browse/COLDBOX-1244) onSessionEnd Error when using Coldbox_App_Key +- [COLDBOX-1245](https://ortussolutions.atlassian.net/browse/COLDBOX-1245) Scheduled task isConstrainted() on day of the month was calculating the days in month backwards +- [COLDBOX-1251](https://ortussolutions.atlassian.net/browse/COLDBOX-1251) set next run time when using first or last business day was not accounting times ### CacheBox #### Improvement -* [CACHEBOX-70](https://ortussolutions.atlassian.net/browse/CACHEBOX-70) Support ad-hoc struct literal of CacheBox DSL to configure CacheBox +- [CACHEBOX-70](https://ortussolutions.atlassian.net/browse/CACHEBOX-70) Support ad-hoc struct literal of CacheBox DSL to configure CacheBox ### LogBox #### New Feature -* [LOGBOX-75](https://ortussolutions.atlassian.net/browse/LOGBOX-75) New listeners for all appenders: preProcessQueue() postProcessQueue() -* [LOGBOX-76](https://ortussolutions.atlassian.net/browse/LOGBOX-76) Add the queue as an argument to the processQueueElement() method -* [LOGBOX-79](https://ortussolutions.atlassian.net/browse/LOGBOX-79) new rolling appender property archiveLayout which is a closure that returns the pattern of the archive layout +- [LOGBOX-75](https://ortussolutions.atlassian.net/browse/LOGBOX-75) New listeners for all appenders: preProcessQueue() postProcessQueue() +- [LOGBOX-76](https://ortussolutions.atlassian.net/browse/LOGBOX-76) Add the queue as an argument to the processQueueElement() method +- [LOGBOX-79](https://ortussolutions.atlassian.net/browse/LOGBOX-79) new rolling appender property archiveLayout which is a closure that returns the pattern of the archive layout #### Bug -* [LOGBOX-73](https://ortussolutions.atlassian.net/browse/LOGBOX-73) Unhandled race conditions in FileRotator lead to errors and potential log data loss -* [LOGBOX-77](https://ortussolutions.atlassian.net/browse/LOGBOX-77) log rotator was not checking for file existence and 1000s of errors could be produced +- [LOGBOX-73](https://ortussolutions.atlassian.net/browse/LOGBOX-73) Unhandled race conditions in FileRotator lead to errors and potential log data loss +- [LOGBOX-77](https://ortussolutions.atlassian.net/browse/LOGBOX-77) log rotator was not checking for file existence and 1000s of errors could be produced #### Improvement -* [LOGBOX-62](https://ortussolutions.atlassian.net/browse/LOGBOX-62) Support ad-hoc struct literal of LogBox DSL to configure LogBox -* [LOGBOX-70](https://ortussolutions.atlassian.net/browse/LOGBOX-70) Add \`Exclude\` key to Logbox Categories to Easily Exclude Appenders -* [LOGBOX-74](https://ortussolutions.atlassian.net/browse/LOGBOX-74) shutdown the appenders first instead of the executors to avoid chicken and egg issues -* [LOGBOX-78](https://ortussolutions.atlassian.net/browse/LOGBOX-78) Change fileMaxArchives default from 2 to 10 +- [LOGBOX-62](https://ortussolutions.atlassian.net/browse/LOGBOX-62) Support ad-hoc struct literal of LogBox DSL to configure LogBox +- [LOGBOX-70](https://ortussolutions.atlassian.net/browse/LOGBOX-70) Add \`Exclude\` key to Logbox Categories to Easily Exclude Appenders +- [LOGBOX-74](https://ortussolutions.atlassian.net/browse/LOGBOX-74) shutdown the appenders first instead of the executors to avoid chicken and egg issues +- [LOGBOX-78](https://ortussolutions.atlassian.net/browse/LOGBOX-78) Change fileMaxArchives default from 2 to 10 #### Task -* [LOGBOX-72](https://ortussolutions.atlassian.net/browse/LOGBOX-72) Removal of instance approach in preferences to accessors for the LogBoxConfig +- [LOGBOX-72](https://ortussolutions.atlassian.net/browse/LOGBOX-72) Removal of instance approach in preferences to accessors for the LogBoxConfig ### WireBox #### New Features -* [WIREBOX-61](https://ortussolutions.atlassian.net/browse/WIREBOX-61) Make wirebox.system.aop.Mixer listener load automatically if any aspects are defined/mapped +- [WIREBOX-61](https://ortussolutions.atlassian.net/browse/WIREBOX-61) Make wirebox.system.aop.Mixer listener load automatically if any aspects are defined/mapped * * * @@ -98,44 +100,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### Bug -* [COLDBOX-1233](https://ortussolutions.atlassian.net/browse/COLDBOX-1233) Exception bean can't cast \`"i"\` to a number value +- [COLDBOX-1233](https://ortussolutions.atlassian.net/browse/COLDBOX-1233) Exception bean can't cast \`"i"\` to a number value #### New Feature -* [COLDBOX-1229](https://ortussolutions.atlassian.net/browse/COLDBOX-1229) Added debug argument to ScheduleExecutor and Scheduler when creating tasks for consistency -* [COLDBOX-1230](https://ortussolutions.atlassian.net/browse/COLDBOX-1230) Reorganized ScheduledTasks functions within the CFC into code groups and comments -* [COLDBOX-1235](https://ortussolutions.atlassian.net/browse/COLDBOX-1235) New StringUtil.prettySQL method for usage in debugging and whoops reports -* [COLDBOX-1238](https://ortussolutions.atlassian.net/browse/COLDBOX-1238) New testing matcher: toRedirectTo for easier testing against relocations -* [COLDBOX-1239](https://ortussolutions.atlassian.net/browse/COLDBOX-1239) New REST convention for custom error handlers: \`on{errorType}Exception()\` +- [COLDBOX-1229](https://ortussolutions.atlassian.net/browse/COLDBOX-1229) Added debug argument to ScheduleExecutor and Scheduler when creating tasks for consistency +- [COLDBOX-1230](https://ortussolutions.atlassian.net/browse/COLDBOX-1230) Reorganized ScheduledTasks functions within the CFC into code groups and comments +- [COLDBOX-1235](https://ortussolutions.atlassian.net/browse/COLDBOX-1235) New StringUtil.prettySQL method for usage in debugging and whoops reports +- [COLDBOX-1238](https://ortussolutions.atlassian.net/browse/COLDBOX-1238) New testing matcher: toRedirectTo for easier testing against relocations +- [COLDBOX-1239](https://ortussolutions.atlassian.net/browse/COLDBOX-1239) New REST convention for custom error handlers: \`on{errorType}Exception()\` #### Improvements -* [COLDBOX-1041](https://ortussolutions.atlassian.net/browse/COLDBOX-1041) Logging category in ColdBox scheduler is generic -* [COLDBOX-1231](https://ortussolutions.atlassian.net/browse/COLDBOX-1231) Improve RestHandler Exception handler with on#ExceptionType#Exception() convention -* [COLDBOX-1234](https://ortussolutions.atlassian.net/browse/COLDBOX-1234) Account for null or empty incoming json to prettyjson output -* [COLDBOX-1236](https://ortussolutions.atlassian.net/browse/COLDBOX-1236) Incorporate appName into the appHash to give more uniqueness to locks internally +- [COLDBOX-1041](https://ortussolutions.atlassian.net/browse/COLDBOX-1041) Logging category in ColdBox scheduler is generic +- [COLDBOX-1231](https://ortussolutions.atlassian.net/browse/COLDBOX-1231) Improve RestHandler Exception handler with on#ExceptionType#Exception() convention +- [COLDBOX-1234](https://ortussolutions.atlassian.net/browse/COLDBOX-1234) Account for null or empty incoming json to prettyjson output +- [COLDBOX-1236](https://ortussolutions.atlassian.net/browse/COLDBOX-1236) Incorporate appName into the appHash to give more uniqueness to locks internally #### Tasks -* [COLDBOX-1237](https://ortussolutions.atlassian.net/browse/COLDBOX-1237) Removal of Lucee RC tests - no longer needed +- [COLDBOX-1237](https://ortussolutions.atlassian.net/browse/COLDBOX-1237) Removal of Lucee RC tests - no longer needed ### WireBox #### Bug -* [WIREBOX-148](https://ortussolutions.atlassian.net/browse/WIREBOX-148) Several AOP and Internal WireBox methods not excluded from delegations -* [WIREBOX-150](https://ortussolutions.atlassian.net/browse/WIREBOX-150) Wirebox standalone is missing delegates -* [WIREBOX-151](https://ortussolutions.atlassian.net/browse/WIREBOX-151) Injections are null, sometimes -* [WIREBOX-152](https://ortussolutions.atlassian.net/browse/WIREBOX-152) getEnv errors in Binder context -* [WIREBOX-154](https://ortussolutions.atlassian.net/browse/WIREBOX-154) populateFromQuery delegate defaulting composeRelationships to true +- [WIREBOX-148](https://ortussolutions.atlassian.net/browse/WIREBOX-148) Several AOP and Internal WireBox methods not excluded from delegations +- [WIREBOX-150](https://ortussolutions.atlassian.net/browse/WIREBOX-150) Wirebox standalone is missing delegates +- [WIREBOX-151](https://ortussolutions.atlassian.net/browse/WIREBOX-151) Injections are null, sometimes +- [WIREBOX-152](https://ortussolutions.atlassian.net/browse/WIREBOX-152) getEnv errors in Binder context +- [WIREBOX-154](https://ortussolutions.atlassian.net/browse/WIREBOX-154) populateFromQuery delegate defaulting composeRelationships to true #### Improvement -* [WIREBOX-147](https://ortussolutions.atlassian.net/browse/WIREBOX-147) Improve debug logging to not send the full memento on several debug operations +- [WIREBOX-147](https://ortussolutions.atlassian.net/browse/WIREBOX-147) Improve debug logging to not send the full memento on several debug operations #### Task -* [WIREBOX-149](https://ortussolutions.atlassian.net/browse/WIREBOX-149) \`toWebservice()\` is now deprecated +- [WIREBOX-149](https://ortussolutions.atlassian.net/browse/WIREBOX-149) \`toWebservice()\` is now deprecated * * * @@ -145,141 +147,143 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### Bugs -* [COLDBOX-1133](https://ortussolutions.atlassian.net/browse/COLDBOX-1133) \`getFullURL\` encodes the query string when it should not. -* [COLDBOX-1136](https://ortussolutions.atlassian.net/browse/COLDBOX-1136) Scoping lookup bug in Lucee affects route() -* [COLDBOX-1138](https://ortussolutions.atlassian.net/browse/COLDBOX-1138) Event Cache Response Has Status Code of 0 (or Null) -* [COLDBOX-1139](https://ortussolutions.atlassian.net/browse/COLDBOX-1139) make event caching cache keys lower cased to avoid case issues when clearing keys -* [COLDBOX-1143](https://ortussolutions.atlassian.net/browse/COLDBOX-1143) render inline PDF (CB 6.8.1) throws a 500 error -* [COLDBOX-1145](https://ortussolutions.atlassian.net/browse/COLDBOX-1145) RestHandler OnError() Exception not checking for empty \`exception\` blocks which would cause another exception on development ONLY -* [COLDBOX-1146](https://ortussolutions.atlassian.net/browse/COLDBOX-1146) BiConsumer proxy was making both arguments required, when they can be null so execution fails -* [COLDBOX-1149](https://ortussolutions.atlassian.net/browse/COLDBOX-1149) Woops and Adobe CF needs a double check if session/client is defined even if sessionManagement/clientManagement is defined -* [COLDBOX-1150](https://ortussolutions.atlassian.net/browse/COLDBOX-1150) virtual app controller scoping is missing on ocassion due to this.load|unload flags -* [COLDBOX-1151](https://ortussolutions.atlassian.net/browse/COLDBOX-1151) Integration Tests do not support NoRender() -* [COLDBOX-1153](https://ortussolutions.atlassian.net/browse/COLDBOX-1153) RestHandler.cfc missing exception information on InvalidCredentials & TokenInvalidException -* [COLDBOX-1154](https://ortussolutions.atlassian.net/browse/COLDBOX-1154) Invalid DateFormat Mask in Whoops.cfm -* [COLDBOX-1173](https://ortussolutions.atlassian.net/browse/COLDBOX-1173) Update the Router.cfc to look at not only the cgi host but the forwarded hosts -* [COLDBOX-1175](https://ortussolutions.atlassian.net/browse/COLDBOX-1175) calling function "view" from within function which has an argument named "view" causes error. -* [COLDBOX-1176](https://ortussolutions.atlassian.net/browse/COLDBOX-1176) viewLocations struct does not exist in function renderer.layout() on line 684 if nolayout = true -* [COLDBOX-1191](https://ortussolutions.atlassian.net/browse/COLDBOX-1191) Attempts to use \`getHTMLBaseURL()\` inside of Async Task Fail on ACF -* [COLDBOX-1193](https://ortussolutions.atlassian.net/browse/COLDBOX-1193) Missing java casting on arrayRange() method ont the asyncmanager -* [COLDBOX-1194](https://ortussolutions.atlassian.net/browse/COLDBOX-1194) Ensure modules are applied to routing action structs when necessary #243 -* [COLDBOX-1196](https://ortussolutions.atlassian.net/browse/COLDBOX-1196) Render collections items and counter variables are not thread safe since we migrated to a singleton renderer -* [COLDBOX-1202](https://ortussolutions.atlassian.net/browse/COLDBOX-1202) urlMatches in the request context does not account for the path to be larger than the requested uri -* [COLDBOX-1204](https://ortussolutions.atlassian.net/browse/COLDBOX-1204) Overridden events in preProcess interceptions assume event cache configuration of original request -* [COLDBOX-1211](https://ortussolutions.atlassian.net/browse/COLDBOX-1211) Base Model and Interceptor Tests where overriding application.wirebox in integration tests -* [COLDBOX-1213](https://ortussolutions.atlassian.net/browse/COLDBOX-1213) Var scoping issue on \`includeUDF\` in the super type +- [COLDBOX-1133](https://ortussolutions.atlassian.net/browse/COLDBOX-1133) \`getFullURL\` encodes the query string when it should not. +- [COLDBOX-1136](https://ortussolutions.atlassian.net/browse/COLDBOX-1136) Scoping lookup bug in Lucee affects route() +- [COLDBOX-1138](https://ortussolutions.atlassian.net/browse/COLDBOX-1138) Event Cache Response Has Status Code of 0 (or Null) +- [COLDBOX-1139](https://ortussolutions.atlassian.net/browse/COLDBOX-1139) make event caching cache keys lower cased to avoid case issues when clearing keys +- [COLDBOX-1143](https://ortussolutions.atlassian.net/browse/COLDBOX-1143) render inline PDF (CB 6.8.1) throws a 500 error +- [COLDBOX-1145](https://ortussolutions.atlassian.net/browse/COLDBOX-1145) RestHandler OnError() Exception not checking for empty \`exception\` blocks which would cause another exception on development ONLY +- [COLDBOX-1146](https://ortussolutions.atlassian.net/browse/COLDBOX-1146) BiConsumer proxy was making both arguments required, when they can be null so execution fails +- [COLDBOX-1149](https://ortussolutions.atlassian.net/browse/COLDBOX-1149) Woops and Adobe CF needs a double check if session/client is defined even if sessionManagement/clientManagement is defined +- [COLDBOX-1150](https://ortussolutions.atlassian.net/browse/COLDBOX-1150) virtual app controller scoping is missing on ocassion due to this.load|unload flags +- [COLDBOX-1151](https://ortussolutions.atlassian.net/browse/COLDBOX-1151) Integration Tests do not support NoRender() +- [COLDBOX-1153](https://ortussolutions.atlassian.net/browse/COLDBOX-1153) RestHandler.cfc missing exception information on InvalidCredentials & TokenInvalidException +- [COLDBOX-1154](https://ortussolutions.atlassian.net/browse/COLDBOX-1154) Invalid DateFormat Mask in Whoops.cfm +- [COLDBOX-1173](https://ortussolutions.atlassian.net/browse/COLDBOX-1173) Update the Router.cfc to look at not only the cgi host but the forwarded hosts +- [COLDBOX-1175](https://ortussolutions.atlassian.net/browse/COLDBOX-1175) calling function "view" from within function which has an argument named "view" causes error. +- [COLDBOX-1176](https://ortussolutions.atlassian.net/browse/COLDBOX-1176) viewLocations struct does not exist in function renderer.layout() on line 684 if nolayout = true +- [COLDBOX-1191](https://ortussolutions.atlassian.net/browse/COLDBOX-1191) Attempts to use \`getHTMLBaseURL()\` inside of Async Task Fail on ACF +- [COLDBOX-1193](https://ortussolutions.atlassian.net/browse/COLDBOX-1193) Missing java casting on arrayRange() method ont the asyncmanager +- [COLDBOX-1194](https://ortussolutions.atlassian.net/browse/COLDBOX-1194) Ensure modules are applied to routing action structs when necessary #243 +- [COLDBOX-1196](https://ortussolutions.atlassian.net/browse/COLDBOX-1196) Render collections items and counter variables are not thread safe since we migrated to a singleton renderer +- [COLDBOX-1202](https://ortussolutions.atlassian.net/browse/COLDBOX-1202) urlMatches in the request context does not account for the path to be larger than the requested uri +- [COLDBOX-1204](https://ortussolutions.atlassian.net/browse/COLDBOX-1204) Overridden events in preProcess interceptions assume event cache configuration of original request +- [COLDBOX-1211](https://ortussolutions.atlassian.net/browse/COLDBOX-1211) Base Model and Interceptor Tests where overriding application.wirebox in integration tests +- [COLDBOX-1213](https://ortussolutions.atlassian.net/browse/COLDBOX-1213) Var scoping issue on \`includeUDF\` in the super type #### Improvements -* [COLDBOX-1029](https://ortussolutions.atlassian.net/browse/COLDBOX-1029) ModuleAwareness : Wirebox Injector Lookup Should Check Current Module First -* [COLDBOX-1155](https://ortussolutions.atlassian.net/browse/COLDBOX-1155) Implement abort logic onAuthenticationFailure on RESTHandler -* [COLDBOX-1157](https://ortussolutions.atlassian.net/browse/COLDBOX-1157) Reuse existing controller in getMockRequestContext() -* [COLDBOX-1159](https://ortussolutions.atlassian.net/browse/COLDBOX-1159) JSON Serialization in \`forAttribute\` Does Not Support ACF Prefixing -* [COLDBOX-1171](https://ortussolutions.atlassian.net/browse/COLDBOX-1171) Do not allow injection of the same applicatio helper on the same target -* [COLDBOX-1177](https://ortussolutions.atlassian.net/browse/COLDBOX-1177) Please add more debugging info to REST handler -* [COLDBOX-1184](https://ortussolutions.atlassian.net/browse/COLDBOX-1184) When whoops error template defaults to public for non-dev, the messaging is very confusing -* [COLDBOX-1185](https://ortussolutions.atlassian.net/browse/COLDBOX-1185) ColdBox DebugMode with inDebugMode() helper -* [COLDBOX-1190](https://ortussolutions.atlassian.net/browse/COLDBOX-1190) Reworking of several rest handler exception methods so they log the issues instead of announcing \`onException\` events and announce their appropriate events , onAuthenticationFailure, onAuthorizationFailure, onValidationException, onEntityNotFoundException -* [COLDBOX-1195](https://ortussolutions.atlassian.net/browse/COLDBOX-1195) ColdBox Proxy should ignore the routing service captures to avoid redirects or returns -* [COLDBOX-1210](https://ortussolutions.atlassian.net/browse/COLDBOX-1210) encapsulate route finding by name to the actual router itself -* [COLDBOX-1214](https://ortussolutions.atlassian.net/browse/COLDBOX-1214) Compatibility layer for env methods in the Util object: getSystemSetting(), getSystemProperty(), getEnv() +- [COLDBOX-1029](https://ortussolutions.atlassian.net/browse/COLDBOX-1029) ModuleAwareness : Wirebox Injector Lookup Should Check Current Module First +- [COLDBOX-1155](https://ortussolutions.atlassian.net/browse/COLDBOX-1155) Implement abort logic onAuthenticationFailure on RESTHandler +- [COLDBOX-1157](https://ortussolutions.atlassian.net/browse/COLDBOX-1157) Reuse existing controller in getMockRequestContext() +- [COLDBOX-1159](https://ortussolutions.atlassian.net/browse/COLDBOX-1159) JSON Serialization in \`forAttribute\` Does Not Support ACF Prefixing +- [COLDBOX-1171](https://ortussolutions.atlassian.net/browse/COLDBOX-1171) Do not allow injection of the same applicatio helper on the same target +- [COLDBOX-1177](https://ortussolutions.atlassian.net/browse/COLDBOX-1177) Please add more debugging info to REST handler +- [COLDBOX-1184](https://ortussolutions.atlassian.net/browse/COLDBOX-1184) When whoops error template defaults to public for non-dev, the messaging is very confusing +- [COLDBOX-1185](https://ortussolutions.atlassian.net/browse/COLDBOX-1185) ColdBox DebugMode with inDebugMode() helper +- [COLDBOX-1190](https://ortussolutions.atlassian.net/browse/COLDBOX-1190) Reworking of several rest handler exception methods so they log the issues instead of announcing \`onException\` events and announce their appropriate events , onAuthenticationFailure, onAuthorizationFailure, onValidationException, onEntityNotFoundException +- [COLDBOX-1195](https://ortussolutions.atlassian.net/browse/COLDBOX-1195) ColdBox Proxy should ignore the routing service captures to avoid redirects or returns +- [COLDBOX-1210](https://ortussolutions.atlassian.net/browse/COLDBOX-1210) encapsulate route finding by name to the actual router itself +- [COLDBOX-1214](https://ortussolutions.atlassian.net/browse/COLDBOX-1214) Compatibility layer for env methods in the Util object: getSystemSetting(), getSystemProperty(), getEnv() #### New Features -* [COLDBOX-1022](https://ortussolutions.atlassian.net/browse/COLDBOX-1022) Allow for Flash RAM to use a third party provided tracking variable via the new setting identifierProvider -* [COLDBOX-1039](https://ortussolutions.atlassian.net/browse/COLDBOX-1039) Allow unregistering closure listeners -* [COLDBOX-1077](https://ortussolutions.atlassian.net/browse/COLDBOX-1077) Provide ability for handlers/interceptors/etc. to have inherent self-knowledge of the module they live in for modulesettings/moduleConfig injections -* [COLDBOX-1137](https://ortussolutions.atlassian.net/browse/COLDBOX-1137) Allow passing interception point first in interceptor listen() method -* [COLDBOX-1140](https://ortussolutions.atlassian.net/browse/COLDBOX-1140) Whoops updates galore! SQL Syntax highlighting, json formatting and highlighting, and more -* [COLDBOX-1141](https://ortussolutions.atlassian.net/browse/COLDBOX-1141) New Flow delegate helpers for functional usage everywhere in ColdBox land -* [COLDBOX-1142](https://ortussolutions.atlassian.net/browse/COLDBOX-1142) New convention for module setting overrides: config/{moduleName}.cfc -* [COLDBOX-1147](https://ortussolutions.atlassian.net/browse/COLDBOX-1147) PostLayoutRender and PostViewRender now pass which view/layout path was used to render -* [COLDBOX-1148](https://ortussolutions.atlassian.net/browse/COLDBOX-1148) postEvent now get's new interceptData: ehBean, handler and data results -* [COLDBOX-1152](https://ortussolutions.atlassian.net/browse/COLDBOX-1152) this.unloadColdBox is false now as the default thanks to the virtual test app -* [COLDBOX-1158](https://ortussolutions.atlassian.net/browse/COLDBOX-1158) New \`back()\` function in super type that you can use to redirect back to your referer or a fallback -* [COLDBOX-1161](https://ortussolutions.atlassian.net/browse/COLDBOX-1161) new toJson() helper in the Util class which is delegated in many locations around the framework to add struct based query serialization and no dubm security prefixes -* [COLDBOX-1162](https://ortussolutions.atlassian.net/browse/COLDBOX-1162) Add in functionality to exclude patterns via router's findRoute() -* [COLDBOX-1165](https://ortussolutions.atlassian.net/browse/COLDBOX-1165) New convention for modules for storing and using coldfusion tags: \`/tags\` -* [COLDBOX-1166](https://ortussolutions.atlassian.net/browse/COLDBOX-1166) Lazy loading and persistence of engine helper to assist in continued performance and initial load speed -* [COLDBOX-1167](https://ortussolutions.atlassian.net/browse/COLDBOX-1167) New core delegates for smaller building blocks, which leverages the \`@coreDelegates\` namespace -* [COLDBOX-1168](https://ortussolutions.atlassian.net/browse/COLDBOX-1168) New coldbox based delegates mapped with \`@cbDelegates\` -* [COLDBOX-1172](https://ortussolutions.atlassian.net/browse/COLDBOX-1172) core json utils now include a prettyJson() and a toPrettyJson() utilities -* [COLDBOX-1174](https://ortussolutions.atlassian.net/browse/COLDBOX-1174) New getEnv() method on the base test class to get access to the env delegate for inquiring for env and java properties -* [COLDBOX-1178](https://ortussolutions.atlassian.net/browse/COLDBOX-1178) ChronoUnit becomes the official cb Date Time Helper to assist with date/time conversions and formatting -* [COLDBOX-1179](https://ortussolutions.atlassian.net/browse/COLDBOX-1179) New super type methods: getDateTimeHelper() getIsoTime() to assist with recurrent iso time conversions in modern APIs and responses -* [COLDBOX-1186](https://ortussolutions.atlassian.net/browse/COLDBOX-1186) Add three environment location helpers in the controller and supertype: isProduction(), isDevelopment(), isTesting() -* [COLDBOX-1188](https://ortussolutions.atlassian.net/browse/COLDBOX-1188) Request Context setRequestTimeout() method encapsulation, so you can control the time limit of a request -* [COLDBOX-1189](https://ortussolutions.atlassian.net/browse/COLDBOX-1189) setRequestTimeout() mock in testing Request Context so handlers cannot override testing timeouts -* [COLDBOX-1192](https://ortussolutions.atlassian.net/browse/COLDBOX-1192) Module Inception Isolation - every module has it's own injector that matches the module hierarchy -* [COLDBOX-1197](https://ortussolutions.atlassian.net/browse/COLDBOX-1197) All rendering methods now accept a \`viewVariables\` argument that allows you to add variables into the view's \`variables\` scope -* [COLDBOX-1199](https://ortussolutions.atlassian.net/browse/COLDBOX-1199) New request context method: \`routeIs( name ):boolean\` that evaluates if the passed name is the same as the current route -* [COLDBOX-1200](https://ortussolutions.atlassian.net/browse/COLDBOX-1200) request context \`getFullUrl()\` renamed to \`getUrl()\` -* [COLDBOX-1201](https://ortussolutions.atlassian.net/browse/COLDBOX-1201) request context \`getFullPath()\` renamed to \`getPath()\` -* [COLDBOX-1205](https://ortussolutions.atlassian.net/browse/COLDBOX-1205) request context \`event.getUrl( withQuery:true )\` new argument \`withQuery\` to allow adding the query string or not -* [COLDBOX-1206](https://ortussolutions.atlassian.net/browse/COLDBOX-1206) request context \`event.getPath( withQuery:true )\` new argument \`withQuery\` to allow adding the query string or not -* [COLDBOX-1207](https://ortussolutions.atlassian.net/browse/COLDBOX-1207) New request context methods: \`getPathSegments():array, getPathSegment( index, defaultValue ):string\` so you can segment the incoming url path -* [COLDBOX-1208](https://ortussolutions.atlassian.net/browse/COLDBOX-1208) Add \`persist\` and \`persistStruct\` to the \`back()\` method in the supertype -* [COLDBOX-1209](https://ortussolutions.atlassian.net/browse/COLDBOX-1209) Add route names to resourceful routes according to conventions -* [COLDBOX-1215](https://ortussolutions.atlassian.net/browse/COLDBOX-1215) this.moduleInjector enables modular injector hiearchy. By default it is false until ColdBox 8 -* [COLDBOX-1216](https://ortussolutions.atlassian.net/browse/COLDBOX-1216) New super type method: \`getRootWireBox()\` to get an instance of the root wirebox in the application -* [COLDBOX-1217](https://ortussolutions.atlassian.net/browse/COLDBOX-1217) New `AppModes` delegate that helps objects know in which modes the application is on: debugMode, testing, production, etc. -* [COLDBOX-1226](https://ortussolutions.atlassian.net/browse/COLDBOX-1226) Many Many Many Scheduled Tasks Updates +- [COLDBOX-1022](https://ortussolutions.atlassian.net/browse/COLDBOX-1022) Allow for Flash RAM to use a third party provided tracking variable via the new setting identifierProvider +- [COLDBOX-1039](https://ortussolutions.atlassian.net/browse/COLDBOX-1039) Allow unregistering closure listeners +- [COLDBOX-1077](https://ortussolutions.atlassian.net/browse/COLDBOX-1077) Provide ability for handlers/interceptors/etc. to have inherent self-knowledge of the module they live in for modulesettings/moduleConfig injections +- [COLDBOX-1137](https://ortussolutions.atlassian.net/browse/COLDBOX-1137) Allow passing interception point first in interceptor listen() method +- [COLDBOX-1140](https://ortussolutions.atlassian.net/browse/COLDBOX-1140) Whoops updates galore! SQL Syntax highlighting, json formatting and highlighting, and more +- [COLDBOX-1141](https://ortussolutions.atlassian.net/browse/COLDBOX-1141) New Flow delegate helpers for functional usage everywhere in ColdBox land +- [COLDBOX-1142](https://ortussolutions.atlassian.net/browse/COLDBOX-1142) New convention for module setting overrides: config/{moduleName}.cfc +- [COLDBOX-1147](https://ortussolutions.atlassian.net/browse/COLDBOX-1147) PostLayoutRender and PostViewRender now pass which view/layout path was used to render +- [COLDBOX-1148](https://ortussolutions.atlassian.net/browse/COLDBOX-1148) postEvent now get's new interceptData: ehBean, handler and data results +- [COLDBOX-1152](https://ortussolutions.atlassian.net/browse/COLDBOX-1152) this.unloadColdBox is false now as the default thanks to the virtual test app +- [COLDBOX-1158](https://ortussolutions.atlassian.net/browse/COLDBOX-1158) New \`back()\` function in super type that you can use to redirect back to your referer or a fallback +- [COLDBOX-1161](https://ortussolutions.atlassian.net/browse/COLDBOX-1161) new toJson() helper in the Util class which is delegated in many locations around the framework to add struct based query serialization and no dubm security prefixes +- [COLDBOX-1162](https://ortussolutions.atlassian.net/browse/COLDBOX-1162) Add in functionality to exclude patterns via router's findRoute() +- [COLDBOX-1165](https://ortussolutions.atlassian.net/browse/COLDBOX-1165) New convention for modules for storing and using coldfusion tags: \`/tags\` +- [COLDBOX-1166](https://ortussolutions.atlassian.net/browse/COLDBOX-1166) Lazy loading and persistence of engine helper to assist in continued performance and initial load speed +- [COLDBOX-1167](https://ortussolutions.atlassian.net/browse/COLDBOX-1167) New core delegates for smaller building blocks, which leverages the \`@coreDelegates\` namespace +- [COLDBOX-1168](https://ortussolutions.atlassian.net/browse/COLDBOX-1168) New coldbox based delegates mapped with \`@cbDelegates\` +- [COLDBOX-1172](https://ortussolutions.atlassian.net/browse/COLDBOX-1172) core json utils now include a prettyJson() and a toPrettyJson() utilities +- [COLDBOX-1174](https://ortussolutions.atlassian.net/browse/COLDBOX-1174) New getEnv() method on the base test class to get access to the env delegate for inquiring for env and java properties +- [COLDBOX-1178](https://ortussolutions.atlassian.net/browse/COLDBOX-1178) ChronoUnit becomes the official cb Date Time Helper to assist with date/time conversions and formatting +- [COLDBOX-1179](https://ortussolutions.atlassian.net/browse/COLDBOX-1179) New super type methods: getDateTimeHelper() getIsoTime() to assist with recurrent iso time conversions in modern APIs and responses +- [COLDBOX-1186](https://ortussolutions.atlassian.net/browse/COLDBOX-1186) Add three environment location helpers in the controller and supertype: isProduction(), isDevelopment(), isTesting() +- [COLDBOX-1188](https://ortussolutions.atlassian.net/browse/COLDBOX-1188) Request Context setRequestTimeout() method encapsulation, so you can control the time limit of a request +- [COLDBOX-1189](https://ortussolutions.atlassian.net/browse/COLDBOX-1189) setRequestTimeout() mock in testing Request Context so handlers cannot override testing timeouts +- [COLDBOX-1192](https://ortussolutions.atlassian.net/browse/COLDBOX-1192) Module Inception Isolation - every module has it's own injector that matches the module hierarchy +- [COLDBOX-1197](https://ortussolutions.atlassian.net/browse/COLDBOX-1197) All rendering methods now accept a \`viewVariables\` argument that allows you to add variables into the view's \`variables\` scope +- [COLDBOX-1199](https://ortussolutions.atlassian.net/browse/COLDBOX-1199) New request context method: \`routeIs( name ):boolean\` that evaluates if the passed name is the same as the current route +- [COLDBOX-1200](https://ortussolutions.atlassian.net/browse/COLDBOX-1200) request context \`getFullUrl()\` renamed to \`getUrl()\` +- [COLDBOX-1201](https://ortussolutions.atlassian.net/browse/COLDBOX-1201) request context \`getFullPath()\` renamed to \`getPath()\` +- [COLDBOX-1205](https://ortussolutions.atlassian.net/browse/COLDBOX-1205) request context \`event.getUrl( withQuery:true )\` new argument \`withQuery\` to allow adding the query string or not +- [COLDBOX-1206](https://ortussolutions.atlassian.net/browse/COLDBOX-1206) request context \`event.getPath( withQuery:true )\` new argument \`withQuery\` to allow adding the query string or not +- [COLDBOX-1207](https://ortussolutions.atlassian.net/browse/COLDBOX-1207) New request context methods: \`getPathSegments():array, getPathSegment( index, defaultValue ):string\` so you can segment the incoming url path +- [COLDBOX-1208](https://ortussolutions.atlassian.net/browse/COLDBOX-1208) Add \`persist\` and \`persistStruct\` to the \`back()\` method in the supertype +- [COLDBOX-1209](https://ortussolutions.atlassian.net/browse/COLDBOX-1209) Add route names to resourceful routes according to conventions +- [COLDBOX-1215](https://ortussolutions.atlassian.net/browse/COLDBOX-1215) this.moduleInjector enables modular injector hiearchy. By default it is false until ColdBox 8 +- [COLDBOX-1216](https://ortussolutions.atlassian.net/browse/COLDBOX-1216) New super type method: \`getRootWireBox()\` to get an instance of the root wirebox in the application +- [COLDBOX-1217](https://ortussolutions.atlassian.net/browse/COLDBOX-1217) New `AppModes` delegate that helps objects know in which modes the application is on: debugMode, testing, production, etc. +- [COLDBOX-1226](https://ortussolutions.atlassian.net/browse/COLDBOX-1226) Many Many Many Scheduled Tasks Updates #### Task -* [COLDBOX-1160](https://ortussolutions.atlassian.net/browse/COLDBOX-1160) COMPAT: jsonQueryFormat has been removed in preference to "struct". -* [COLDBOX-1169](https://ortussolutions.atlassian.net/browse/COLDBOX-1169) routes.cfm Support Removal -* [COLDBOX-1170](https://ortussolutions.atlassian.net/browse/COLDBOX-1170) populateModel deprecated - refactored to just populate() in the supertype methods -* [COLDBOX-1187](https://ortussolutions.atlassian.net/browse/COLDBOX-1187) Removal of uniqueUrls boolean indicator for URL routing, since Pretty URLs are now the standard. This rerouting feature needs to be removed. +- [COLDBOX-1160](https://ortussolutions.atlassian.net/browse/COLDBOX-1160) COMPAT: jsonQueryFormat has been removed in preference to "struct". +- [COLDBOX-1169](https://ortussolutions.atlassian.net/browse/COLDBOX-1169) routes.cfm Support Removal +- [COLDBOX-1170](https://ortussolutions.atlassian.net/browse/COLDBOX-1170) populateModel deprecated - refactored to just populate() in the supertype methods +- [COLDBOX-1187](https://ortussolutions.atlassian.net/browse/COLDBOX-1187) Removal of uniqueUrls boolean indicator for URL routing, since Pretty URLs are now the standard. This rerouting feature needs to be removed. ### LogBox #### Improvements -* [LOGBOX-67](https://ortussolutions.atlassian.net/browse/LOGBOX-67) Come up with better default serialization for exception objects on LogEvents +- [LOGBOX-67](https://ortussolutions.atlassian.net/browse/LOGBOX-67) Come up with better default serialization for exception objects on LogEvents #### New Features -* [LOGBOX-61](https://ortussolutions.atlassian.net/browse/LOGBOX-61) Allow for closure for all logging messages in the logger, this way, we can verify the logging level automatically. -* [LOGBOX-69](https://ortussolutions.atlassian.net/browse/LOGBOX-69) LogEvents in JSON are now prettified +- [LOGBOX-61](https://ortussolutions.atlassian.net/browse/LOGBOX-61) Allow for closure for all logging messages in the logger, this way, we can verify the logging level automatically. +- [LOGBOX-69](https://ortussolutions.atlassian.net/browse/LOGBOX-69) LogEvents in JSON are now prettified ### CacheBox #### Bugs -* [CACHEBOX-83](https://ortussolutions.atlassian.net/browse/CACHEBOX-83) Intermittent Exception from MetadataIndexer +- [CACHEBOX-83](https://ortussolutions.atlassian.net/browse/CACHEBOX-83) Intermittent Exception from MetadataIndexer ### WireBox #### Improvements -* [WIREBOX-133](https://ortussolutions.atlassian.net/browse/WIREBOX-133) BeanPopulator renamed to ObjectPopulator to be consistent with naming +- [WIREBOX-133](https://ortussolutions.atlassian.net/browse/WIREBOX-133) BeanPopulator renamed to ObjectPopulator to be consistent with naming #### Bugs -* [WIREBOX-132](https://ortussolutions.atlassian.net/browse/WIREBOX-132) WireBox caches Singletons even if their autowired dependencies throw exceptions. +- [WIREBOX-132](https://ortussolutions.atlassian.net/browse/WIREBOX-132) WireBox caches Singletons even if their autowired dependencies throw exceptions. #### New Features -* [WIREBOX-89](https://ortussolutions.atlassian.net/browse/WIREBOX-89) Wirebox - add onInjectorMissingDependency event -* [WIREBOX-130](https://ortussolutions.atlassian.net/browse/WIREBOX-130) Ability to remove specific objects from wirebox injector singleton's and request scopes via a \`clear( key )\` method -* [WIREBOX-131](https://ortussolutions.atlassian.net/browse/WIREBOX-131) Object Delegators -* [WIREBOX-134](https://ortussolutions.atlassian.net/browse/WIREBOX-134) Object Populator is now created by the Injector and it is now a singleton -* [WIREBOX-135](https://ortussolutions.atlassian.net/browse/WIREBOX-135) Object populator now caches orm entity maps, so they are ONLy loaded once and population with orm objects accelerates tremendously -* [WIREBOX-136](https://ortussolutions.atlassian.net/browse/WIREBOX-136) object populator cache relational metadata for faster population of the same objects -* [WIREBOX-137](https://ortussolutions.atlassian.net/browse/WIREBOX-137) New \`this.population\` marker for controlling mas population of objects. It can include an \`include\` and and \`exclude\` list. -* [WIREBOX-138](https://ortussolutions.atlassian.net/browse/WIREBOX-138) Lazy Properties -* [WIREBOX-139](https://ortussolutions.atlassian.net/browse/WIREBOX-139) Property Observers -* [WIREBOX-140](https://ortussolutions.atlassian.net/browse/WIREBOX-140) Transient request cache for injections and delegations -* [WIREBOX-141](https://ortussolutions.atlassian.net/browse/WIREBOX-141) New config setting transientInjectionCache to enable or disable globally, default is true -* [WIREBOX-142](https://ortussolutions.atlassian.net/browse/WIREBOX-142) You can now instantiate an Injector with the \`binder\` argument being the config structure instead of creating a binder -* [WIREBOX-143](https://ortussolutions.atlassian.net/browse/WIREBOX-143) New injection DSL for ColdBox Root Injector \`coldbox:rootWireBox\` -* [WIREBOX-144](https://ortussolutions.atlassian.net/browse/WIREBOX-144) Injectors can now track the root injector by having a root reference via \`getRoot(), hasRoot()\` methods -* [WIREBOX-145](https://ortussolutions.atlassian.net/browse/WIREBOX-145) New DSL for wirebox only root injectors: \`wirebox:root\` +- [WIREBOX-89](https://ortussolutions.atlassian.net/browse/WIREBOX-89) Wirebox - add onInjectorMissingDependency event +- [WIREBOX-130](https://ortussolutions.atlassian.net/browse/WIREBOX-130) Ability to remove specific objects from wirebox injector singleton's and request scopes via a \`clear( key )\` method +- [WIREBOX-131](https://ortussolutions.atlassian.net/browse/WIREBOX-131) Object Delegators +- [WIREBOX-134](https://ortussolutions.atlassian.net/browse/WIREBOX-134) Object Populator is now created by the Injector and it is now a singleton +- [WIREBOX-135](https://ortussolutions.atlassian.net/browse/WIREBOX-135) Object populator now caches orm entity maps, so they are ONLy loaded once and population with orm objects accelerates tremendously +- [WIREBOX-136](https://ortussolutions.atlassian.net/browse/WIREBOX-136) object populator cache relational metadata for faster population of the same objects +- [WIREBOX-137](https://ortussolutions.atlassian.net/browse/WIREBOX-137) New \`this.population\` marker for controlling mas population of objects. It can include an \`include\` and and \`exclude\` list. +- [WIREBOX-138](https://ortussolutions.atlassian.net/browse/WIREBOX-138) Lazy Properties +- [WIREBOX-139](https://ortussolutions.atlassian.net/browse/WIREBOX-139) Property Observers +- [WIREBOX-140](https://ortussolutions.atlassian.net/browse/WIREBOX-140) Transient request cache for injections and delegations +- [WIREBOX-141](https://ortussolutions.atlassian.net/browse/WIREBOX-141) New config setting transientInjectionCache to enable or disable globally, default is true +- [WIREBOX-142](https://ortussolutions.atlassian.net/browse/WIREBOX-142) You can now instantiate an Injector with the \`binder\` argument being the config structure instead of creating a binder +- [WIREBOX-143](https://ortussolutions.atlassian.net/browse/WIREBOX-143) New injection DSL for ColdBox Root Injector \`coldbox:rootWireBox\` +- [WIREBOX-144](https://ortussolutions.atlassian.net/browse/WIREBOX-144) Injectors can now track the root injector by having a root reference via \`getRoot(), hasRoot()\` methods +- [WIREBOX-145](https://ortussolutions.atlassian.net/browse/WIREBOX-145) New DSL for wirebox only root injectors: \`wirebox:root\` * * * -[Unreleased]: https://github.com/ColdBox/coldbox-platform/compare/v7.2.0...HEAD +[Unreleased]: https://github.com/ColdBox/coldbox-platform/compare/v7.2.1...HEAD + +[7.2.1]: https://github.com/ColdBox/coldbox-platform/compare/v7.2.0...v7.2.1 [7.2.0]: https://github.com/ColdBox/coldbox-platform/compare/v7.1.0...v7.2.0 From 512893237ef8d067f76e9d233cd5ab1eefa92912 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 14 Dec 2023 15:27:00 +0100 Subject: [PATCH 03/41] build file updates [no ci] --- build/release.boxr | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/build/release.boxr b/build/release.boxr index e216f22da..a63f2ccdb 100755 --- a/build/release.boxr +++ b/build/release.boxr @@ -7,19 +7,8 @@ # Merge development into it for release !git merge --no-ff development -# Tag the master repo with the version from box.json -!git tag v`box package show version` - # Push all branches back out to github !git push origin --all -# Push all tags -!git push origin --tags - # Check development again !git checkout -f development - -# Bump to prepare for a new release, do minor, change if needed and don't tag -bump --minor --!tagVersion -!git commit -a -m "version bump" -!git push origin development \ No newline at end of file From 691abaacace36638284dbe41b01b672358eb684e Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 9 Jan 2024 19:09:59 +0100 Subject: [PATCH 04/41] COLDBOX-1266 #resolve Logger for MS SQL using date not datetime. --- system/core/database/SchemaInfo.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/database/SchemaInfo.cfc b/system/core/database/SchemaInfo.cfc index 6369bd08d..92ad1ca02 100644 --- a/system/core/database/SchemaInfo.cfc +++ b/system/core/database/SchemaInfo.cfc @@ -209,7 +209,7 @@ component singleton { return "cf_sql_timestamp"; } case "Microsoft SQL Server": { - return "cf_sql_date"; + return "cf_sql_datetime"; } case "Oracle": { return "cf_sql_timestamp"; From 8f833670c220c1801104d8f25a121ccd105620d9 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 10 Jan 2024 15:40:25 +0100 Subject: [PATCH 05/41] - Prettier SQL printing in `StringUtil.prettySQL()` --- changelog.md | 4 +++ system/core/delegates/StringUtil.cfc | 44 +++++++++++++++++++--------- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/changelog.md b/changelog.md index 779b7691e..810d0a7de 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Prettier SQL printing in `StringUtil.prettySQL()` + ## [7.2.1] - 2023-12-11 ### ColdBox HMVC diff --git a/system/core/delegates/StringUtil.cfc b/system/core/delegates/StringUtil.cfc index f9610b26b..dae74759e 100644 --- a/system/core/delegates/StringUtil.cfc +++ b/system/core/delegates/StringUtil.cfc @@ -18,44 +18,60 @@ component singleton { */ function prettySql( string target = "" ){ var keywords = [ - "SELECT", + "ALTER TABLE", + "CREATE TABLE", + "DELETE", + "DROP TABLE", "FROM", - "WHERE", "GROUP BY", "HAVING", - "ORDER BY", "INSERT INTO", + "LIMIT", + "ORDER BY", + "OFFSET", + "SELECT", + "UNION", "UPDATE", - "DELETE", - "CREATE TABLE", - "ALTER TABLE", - "DROP TABLE", - "UNION" + "WHERE" ]; var indentedKeywords = [ + "FULL JOIN", + "INNER JOIN", "JOIN", "LEFT JOIN", - "INNER JOIN", - "OUTER JOIN", - "FULL JOIN" + "OUTER JOIN" ]; var indent = " "; return arguments.target .listToArray( variables.NEW_LINE ) .map( ( item ) => item.trim() ) + // comma spacing .map( ( item ) => item.reReplace( - "(\s)*,(\s)*", + "\s*(?![^()]*\))(,)\s*", ",#variables.NEW_LINE##indent#", "all" ) ) + // Parenthesis spacing + .map( ( item ) => item.reReplace( + "\((\w)", + "( \1", + "all" + ) ) + .map( ( item ) => item.reReplace( + "(\w)\)", + "\1 )", + "all" + ) ) + // Keyword spacing .map( ( item ) => { return item.reReplacenocase( - "(\s)*(#keywords.toList( "|" )#)(\s)*", - "\2#variables.NEW_LINE##indent#", + "(\s)*(#keywords.toList( "|" )#)(\s)+", + "#variables.NEW_LINE#\2#variables.NEW_LINE##indent#", "all" ) } ) + // Indented keyword spacing .map( ( item ) => { return item.reReplacenocase( "(#indentedKeywords.toList( "|" )#)", From eac02724350b41d7297e6d604b0a2cbe01830de8 Mon Sep 17 00:00:00 2001 From: lmajano Date: Wed, 10 Jan 2024 14:41:35 +0000 Subject: [PATCH 06/41] Apply cfformat changes --- system/core/delegates/StringUtil.cfc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/system/core/delegates/StringUtil.cfc b/system/core/delegates/StringUtil.cfc index dae74759e..8dbf018e7 100644 --- a/system/core/delegates/StringUtil.cfc +++ b/system/core/delegates/StringUtil.cfc @@ -53,16 +53,8 @@ component singleton { "all" ) ) // Parenthesis spacing - .map( ( item ) => item.reReplace( - "\((\w)", - "( \1", - "all" - ) ) - .map( ( item ) => item.reReplace( - "(\w)\)", - "\1 )", - "all" - ) ) + .map( ( item ) => item.reReplace( "\((\w)", "( \1", "all" ) ) + .map( ( item ) => item.reReplace( "(\w)\)", "\1 )", "all" ) ) // Keyword spacing .map( ( item ) => { return item.reReplacenocase( From c6e2398ed264eafdf1045509c7ff39791100b16c Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Fri, 12 Jan 2024 10:53:39 +0100 Subject: [PATCH 07/41] COLDBOX-1267 #resolve Lucee only isEmpty function call --- system/RestHandler.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/RestHandler.cfc b/system/RestHandler.cfc index 8b57e783b..85bc89847 100644 --- a/system/RestHandler.cfc +++ b/system/RestHandler.cfc @@ -176,7 +176,7 @@ component extends="EventHandler" { ){ // Try to discover exception, if not, hard error if ( - !isNull( arguments.prc.exception ) && ( isNull( arguments.exception ) || isEmpty( arguments.exception ) ) + !isNull( arguments.prc.exception ) && ( isNull( arguments.exception ) || structIsEmpty( arguments.exception ) ) ) { arguments.exception = arguments.prc.exception.getExceptionStruct(); } From 418bbcf85a1a56b1b6e7f223f7f32db6c176a7b5 Mon Sep 17 00:00:00 2001 From: lmajano Date: Fri, 12 Jan 2024 09:54:40 +0000 Subject: [PATCH 08/41] Apply cfformat changes --- system/RestHandler.cfc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/RestHandler.cfc b/system/RestHandler.cfc index 85bc89847..cc9f0d932 100644 --- a/system/RestHandler.cfc +++ b/system/RestHandler.cfc @@ -176,7 +176,9 @@ component extends="EventHandler" { ){ // Try to discover exception, if not, hard error if ( - !isNull( arguments.prc.exception ) && ( isNull( arguments.exception ) || structIsEmpty( arguments.exception ) ) + !isNull( arguments.prc.exception ) && ( + isNull( arguments.exception ) || structIsEmpty( arguments.exception ) + ) ) { arguments.exception = arguments.prc.exception.getExceptionStruct(); } From 268d39476075b373e198c78fdfd6849493d9cc8a Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Fri, 2 Feb 2024 13:37:06 +0100 Subject: [PATCH 09/41] COLDBOX-1268 #resolve WireBox Singleton auto reload now only affects app singletons and not core singletons --- system/Bootstrap.cfc | 2 +- system/ioc/Injector.cfc | 8 ++++++++ system/ioc/scopes/Singleton.cfc | 30 ++++++++++++++++++++++++++++++ test-harness/config/Coldbox.cfc | 3 +++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/system/Bootstrap.cfc b/system/Bootstrap.cfc index 5f53d35bd..4bb6da743 100644 --- a/system/Bootstrap.cfc +++ b/system/Bootstrap.cfc @@ -191,7 +191,7 @@ component serializable="false" accessors="true" { // WireBox Singleton AutoReload if ( cbController.getSetting( "Wirebox" ).singletonReload ) { lock type="exclusive" name="#appHash#" timeout="#lockTimeout#" throwontimeout="true" { - cbController.getWireBox().clearSingletons(); + cbController.getWireBox().clearAppSingletons(); } } // Handler's Index Auto Reload diff --git a/system/ioc/Injector.cfc b/system/ioc/Injector.cfc index 98f80cfbf..540cc43ea 100644 --- a/system/ioc/Injector.cfc +++ b/system/ioc/Injector.cfc @@ -1068,6 +1068,14 @@ component serializable="false" accessors="true" { return this; } + /** + * Clear the app singleton cache + */ + Injector function clearAppSingletons(){ + getScope( "SINGLETON" ).clearAppOnly(); + return this; + } + /** * Return a self reference using the scoped registration, mostly used by providers or scope widening objects * diff --git a/system/ioc/scopes/Singleton.cfc b/system/ioc/scopes/Singleton.cfc index 23c763f1a..532a45fc0 100644 --- a/system/ioc/scopes/Singleton.cfc +++ b/system/ioc/scopes/Singleton.cfc @@ -23,6 +23,11 @@ component accessors="true" { */ property name="log"; + /** + * These are keys we use internally in ColdBox, so we don't want to clear them when doing clearAppOnly() calls + */ + variables.RESERVED_KEYS = [ "@coldbox", "interceptor-", "cbscheduler", "@coreDelegates", "@cbdelegates" ]; + /** * Configure the scope for operation and returns itself * @@ -133,4 +138,29 @@ component accessors="true" { return this; } + /** + * Clear application only singletons + */ + function clearAppOnly(){ + var keys = variables.singletons.keySet().toArray(); + for( var key in keys ){ + // They key must NOT match any pattern in our reserved keys, so we can clear it + if( !inReservedKeys( key ) ){ + variables.singletons.remove( key ); + } + } + return this; + } + + /** + * Discover if a key is in our reserved keys + * + * @key The key to check + * + * @return boolean + */ + private boolean function inReservedKeys( String key ){ + return variables.RESERVED_KEYS.some( ( reservedKey ) => findNoCase( reservedKey, key ) ); + } + } diff --git a/test-harness/config/Coldbox.cfc b/test-harness/config/Coldbox.cfc index 0e5fbede4..2f25834fe 100644 --- a/test-harness/config/Coldbox.cfc +++ b/test-harness/config/Coldbox.cfc @@ -144,5 +144,8 @@ } function development(){ + wirebox = { + singletonReload : true + } } } From 63c8554cd8cef0926e78aa36d25ff9d50c4a9805 Mon Sep 17 00:00:00 2001 From: lmajano Date: Fri, 2 Feb 2024 12:38:15 +0000 Subject: [PATCH 10/41] Apply cfformat changes --- system/ioc/scopes/Singleton.cfc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/system/ioc/scopes/Singleton.cfc b/system/ioc/scopes/Singleton.cfc index 532a45fc0..250b33e1d 100644 --- a/system/ioc/scopes/Singleton.cfc +++ b/system/ioc/scopes/Singleton.cfc @@ -26,7 +26,13 @@ component accessors="true" { /** * These are keys we use internally in ColdBox, so we don't want to clear them when doing clearAppOnly() calls */ - variables.RESERVED_KEYS = [ "@coldbox", "interceptor-", "cbscheduler", "@coreDelegates", "@cbdelegates" ]; + variables.RESERVED_KEYS = [ + "@coldbox", + "interceptor-", + "cbscheduler", + "@coreDelegates", + "@cbdelegates" + ]; /** * Configure the scope for operation and returns itself @@ -143,9 +149,9 @@ component accessors="true" { */ function clearAppOnly(){ var keys = variables.singletons.keySet().toArray(); - for( var key in keys ){ + for ( var key in keys ) { // They key must NOT match any pattern in our reserved keys, so we can clear it - if( !inReservedKeys( key ) ){ + if ( !inReservedKeys( key ) ) { variables.singletons.remove( key ); } } From 788f64f71ef3a9f25cb979ac22e61b765549288e Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Fri, 9 Feb 2024 05:52:19 -0700 Subject: [PATCH 11/41] Restart the scheduler to call configure again to get new tasks (#588) * Restart the scheduler to call configure again to get new tasks * Add force and shutdownTimeout args to `SchedulerService#shutdownScheduler` * Pass the `force` and `shutdownTimeout` arguments to the Scheduler instance * Fix passing arguments to scheduler restart --- system/async/tasks/Scheduler.cfc | 35 ++++++++++++++++++++---- system/web/services/SchedulerService.cfc | 25 ++++++++++++++++- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/system/async/tasks/Scheduler.cfc b/system/async/tasks/Scheduler.cfc index 5c2eec07d..8cf2c1169 100644 --- a/system/async/tasks/Scheduler.cfc +++ b/system/async/tasks/Scheduler.cfc @@ -63,13 +63,8 @@ component accessors="true" singleton { variables.tasks = structNew( "ordered" ); // Default TimeZone to UTC for all tasks variables.timezone = createObject( "java", "java.time.ZoneId" ).systemDefault(); - // Build out the executor for this scheduler - variables.executor = arguments.asyncManager.newExecutor( - name: arguments.name & "-scheduler", - type: "scheduled" - ); // Bit that denotes if this scheduler has been started or not - variables.started = false; + variables.started = false; // Send notice arguments.asyncManager.out( "√ Scheduler (#arguments.name#) has been registered" ); @@ -167,6 +162,12 @@ component accessors="true" singleton { if ( !variables.started ) { lock name="scheduler-#getName()#-startup" type="exclusive" timeout="45" throwOnTimeout="true" { if ( !variables.started ) { + // Build out the executor for this scheduler + variables.executor = arguments.asyncManager.newExecutor( + name: arguments.name & "-scheduler", + type: "scheduled" + ); + // Iterate over tasks and send them off for scheduling variables.tasks.each( function( taskName, taskRecord ){ // Verify we can start it up the task or not @@ -250,6 +251,28 @@ component accessors="true" singleton { return this; } + /** + * Restarts a scheduler by shutting it down, clearing out the tasks, calling `configure`, and starting it again. + * Useful when loading tasks from a database or other dynamic sources. + * + * @force If true, it forces all shutdowns this is usually true when doing reinits + * @timeout The timeout in seconds to wait for the shutdown of all tasks, defaults to 30 or whatever you set using the setShutdownTimeout() method + */ + public Scheduler function restart( boolean force = false, numeric timeout = variables.shutdownTimeout ){ + variables.asyncManager.out( "√ Scheduler (#arguments.name#) is being restarted" ); + shutdown( argumentCollection = arguments ); + clearTasks(); + configure(); + startup(); + variables.asyncManager.out( "√ Scheduler (#arguments.name#) has been restarted" ); + return this; + } + + public Scheduler function clearTasks(){ + variables.tasks = structNew( "ordered" ); + return this; + } + /** * -------------------------------------------------------------------------- * Life - Cycle Callbacks diff --git a/system/web/services/SchedulerService.cfc b/system/web/services/SchedulerService.cfc index 1eb3856b0..499b599df 100644 --- a/system/web/services/SchedulerService.cfc +++ b/system/web/services/SchedulerService.cfc @@ -146,7 +146,7 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" { } /** - * This method is ran by the laoder service once the ColdBox application is ready to serve requests. + * This method is ran by the loader service once the ColdBox application is ready to serve requests. * It will startup all the schedulers in the order they where registered. */ SchedulerService function startupSchedulers(){ @@ -195,4 +195,27 @@ component extends="coldbox.system.web.services.BaseService" accessors="true" { return false; } + /** + * Restarts a scheduler from this manager, if it exists. + * + * @name The name of the scheduler + * @force If true, it forces all shutdowns this is usually true when doing reinits + * @timeout The timeout in seconds to wait for the shutdown of all tasks, defaults to the scheduler's shutdown timeout + * + * @return True if restarted, false if not found + */ + boolean function restartScheduler( + required name, + boolean force = false, + numeric timeout + ){ + if ( hasScheduler( arguments.name ) ) { + var scheduler = variables.scheduler[ arguments.name ]; + structDelete( arguments, "name" ); + scheduler.restart( argumentCollection = arguments ); + return true; + } + return false; + } + } From e30e130c1d101abbb03bc2521a15a38ede27c02c Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:27:19 +0100 Subject: [PATCH 12/41] updated github actions --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fabd30373..cc6ad10f1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: experimental: false steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Database and Fixtures run: | @@ -47,7 +47,7 @@ jobs: mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < tests/resources/coolblog.sql - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "temurin" java-version: ${{ matrix.jdkVersion }} @@ -96,7 +96,7 @@ jobs: - name: Upload Test Results Artifacts if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coldbox-test-results-${{ matrix.cfengine }} path: | @@ -124,7 +124,7 @@ jobs: - name: Upload Debugging Info To Artifacts if: ${{ failure() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Failure Debugging Info - ${{ matrix.cfengine }} path: | From db26640df5cd2aff9cc4d32f431f2a2342024267 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:34:05 +0100 Subject: [PATCH 13/41] more updates on githubactions --- .github/workflows/lts.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 8 ++++---- .github/workflows/snapshot.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lts.yml b/.github/workflows/lts.yml index bb4c27beb..bb6ed3ce4 100644 --- a/.github/workflows/lts.yml +++ b/.github/workflows/lts.yml @@ -20,7 +20,7 @@ jobs: name: Code Auto-Formatting runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Auto-format uses: Ortus-Solutions/commandbox-action@v1.0.2 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 540017d95..d33ba8131 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Repository - uses: actions/checkout@v3.2.0 + uses: actions/checkout@v4.2.0 - uses: Ortus-Solutions/commandbox-action@v1.0.2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56cc0d152..e88c47048 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,10 +40,10 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "temurin" java-version: "11" @@ -175,13 +175,13 @@ jobs: needs: [ build ] steps: - name: Checkout Development Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: env.LTS == 'false' with: ref: development - name: Checkout LTS Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 if: env.LTS == 'true' - name: Setup CommandBox diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 947b2b144..1ba5b46da 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -22,7 +22,7 @@ jobs: name: Code Auto-Formatting runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Auto-format uses: Ortus-Solutions/commandbox-action@v1.0.2 From 922a61479556c38abdedfe36b9b0a49758e6e9c2 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:36:11 +0100 Subject: [PATCH 14/41] more updates to github actions --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e88c47048..40f32492e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,7 +88,7 @@ jobs: box task run build/Build.cfc run ${{ env.COLDBOX_VERSION }} ${{ github.run_number }} ${{ env.BRANCH }} - name: Commit Changelog [unreleased] with latest version - uses: EndBug/add-and-commit@v9.1.1 + uses: EndBug/add-and-commit@v9.1.4 if: env.SNAPSHOT == 'false' with: author_name: Github Actions @@ -97,7 +97,7 @@ jobs: add: changelog.md - name: Tag Version - uses: rickstaa/action-create-tag@v1.6.1 + uses: rickstaa/action-create-tag@v1.7.2 if: env.SNAPSHOT == 'false' with: tag: "v${{ env.COLDBOX_VERSION }}" @@ -106,7 +106,7 @@ jobs: - name: Upload Build Artifacts if: success() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coldbox-variants path: | @@ -144,7 +144,7 @@ jobs: cd $ROOT_DIR/.artifacts/logbox/${{ env.COLDBOX_VERSION }} && box forgebox publish - name: Create Github Release - uses: taiki-e/create-gh-release-action@v1.6.2 + uses: taiki-e/create-gh-release-action@v1.8.0 continue-on-error: true if: env.SNAPSHOT == 'false' with: @@ -190,7 +190,7 @@ jobs: forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} - name: Download build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: coldbox-variants path: .tmp @@ -210,7 +210,7 @@ jobs: git pull - name: Commit Version Bump - uses: EndBug/add-and-commit@v9.1.1 + uses: EndBug/add-and-commit@v9.1.4 with: author_name: Github Actions author_email: info@ortussolutions.com From c49b106304f5480dca64ecabbfdae1782107dc26 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 15 Feb 2024 11:09:12 +0100 Subject: [PATCH 15/41] COLDBOX-1269 #resolve Do not add double headers if `event.setHTTPHeader()` is called more than once --- system/web/context/RequestContext.cfc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/system/web/context/RequestContext.cfc b/system/web/context/RequestContext.cfc index 88be95762..eb78941cc 100644 --- a/system/web/context/RequestContext.cfc +++ b/system/web/context/RequestContext.cfc @@ -4,7 +4,7 @@ * --- * Models a ColdBox request, stores the incoming request collection (FORM/URL/REMOTE) and private request collection. * It is also used to determine metadata about a request and helps you build RESTFul responses. - **/ + */ component serializable="false" accessors="true" { /** @@ -1785,11 +1785,12 @@ component serializable="false" accessors="true" { /** * Set an HTTP Response Header * - * @statusCode the status code - * @statusText the status text - * @name The header name - * @value The header value - * @charset The charset to use, defaults to UTF-8 + * @statusCode the status code header + * @statusText the status text header + * @name The header name; Mutually exclusive with statusCode + * @value The header value; Mutually exclusive with statusText + * + * @throws RequestContext.InvalidHTTPHeaderParameters - If no name or statusCode is passed * * @return RequestContext */ @@ -1800,16 +1801,16 @@ component serializable="false" accessors="true" { .getResponse() .setStatus( javacast( "int", arguments.statusCode ), javacast( "string", arguments.statusText ) ); } - // Name Exists + // Name Exists and not already set. else if ( !isNull( arguments.name ) ) { getPageContext() .getResponse() - .addHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); + .setHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); variables.responseHeaders[ arguments.name ] = arguments.value; } else { throw( message = "Invalid header arguments", - detail = "Pass in either a statusCode or name argument", + detail = "Pass in either a [statusCode] or [name] argument", type = "RequestContext.InvalidHTTPHeaderParameters" ); } From 1c72cbc930d58977cecef34f8f97a39e717e4d07 Mon Sep 17 00:00:00 2001 From: lmajano Date: Thu, 15 Feb 2024 10:10:27 +0000 Subject: [PATCH 16/41] Apply cfformat changes --- system/web/context/RequestContext.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/web/context/RequestContext.cfc b/system/web/context/RequestContext.cfc index eb78941cc..71b5d094e 100644 --- a/system/web/context/RequestContext.cfc +++ b/system/web/context/RequestContext.cfc @@ -1790,9 +1790,9 @@ component serializable="false" accessors="true" { * @name The header name; Mutually exclusive with statusCode * @value The header value; Mutually exclusive with statusText * - * @throws RequestContext.InvalidHTTPHeaderParameters - If no name or statusCode is passed - * * @return RequestContext + * + * @throws RequestContext.InvalidHTTPHeaderParameters - If no name or statusCode is passed */ function setHTTPHeader( statusCode, statusText = "", name, value = "" ){ // status code? We do not add to response headers as this is a separate marker identifier to the response From d955433659a6c9d21b5dfd1d667a4386c76a8bd3 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 5 Mar 2024 10:29:03 -0600 Subject: [PATCH 17/41] COLDBOX-1270 #resolve Abililty to restart schedulers with a `restart()` method --- system/async/tasks/Scheduler.cfc | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/system/async/tasks/Scheduler.cfc b/system/async/tasks/Scheduler.cfc index 8cf2c1169..0e50c6c96 100644 --- a/system/async/tasks/Scheduler.cfc +++ b/system/async/tasks/Scheduler.cfc @@ -63,6 +63,8 @@ component accessors="true" singleton { variables.tasks = structNew( "ordered" ); // Default TimeZone to UTC for all tasks variables.timezone = createObject( "java", "java.time.ZoneId" ).systemDefault(); + // Build out the executor for this scheduler + createSchedulerExecutor(); // Bit that denotes if this scheduler has been started or not variables.started = false; // Send notice @@ -162,12 +164,6 @@ component accessors="true" singleton { if ( !variables.started ) { lock name="scheduler-#getName()#-startup" type="exclusive" timeout="45" throwOnTimeout="true" { if ( !variables.started ) { - // Build out the executor for this scheduler - variables.executor = arguments.asyncManager.newExecutor( - name: arguments.name & "-scheduler", - type: "scheduled" - ); - // Iterate over tasks and send them off for scheduling variables.tasks.each( function( taskName, taskRecord ){ // Verify we can start it up the task or not @@ -246,6 +242,8 @@ component accessors="true" singleton { variables.asyncManager.deleteExecutor( variables.name & "-scheduler" ); // Mark it variables.started = false; + // Clear the tasks + clearTasks(); // Log it variables.asyncManager.out( "√ Scheduler (#getName()#) has been shutdown!" ); return this; @@ -261,13 +259,17 @@ component accessors="true" singleton { public Scheduler function restart( boolean force = false, numeric timeout = variables.shutdownTimeout ){ variables.asyncManager.out( "√ Scheduler (#arguments.name#) is being restarted" ); shutdown( argumentCollection = arguments ); - clearTasks(); + createSchedulerExecutor(); configure(); startup(); variables.asyncManager.out( "√ Scheduler (#arguments.name#) has been restarted" ); return this; } + /** + * Clear the tasks from this scheduler + * BEWARE: This will not stop the tasks, it will just remove them from the scheduler + */ public Scheduler function clearTasks(){ variables.tasks = structNew( "ordered" ); return this; @@ -411,4 +413,14 @@ component accessors="true" singleton { return createObject( "java", "java.lang.Thread" ).currentThread(); } + /** + * Create a new scheduled executor for this scheduler according to it's name and type + */ + private function createSchedulerExecutor(){ + variables.executor = variables.asyncManager.newExecutor( + name: variables.name & "-scheduler", + type: "scheduled" + ); + } + } From 18445090f5658c1621f5961997b3b49a8b9cd4dd Mon Sep 17 00:00:00 2001 From: lmajano Date: Tue, 5 Mar 2024 16:30:20 +0000 Subject: [PATCH 18/41] Apply cfformat changes --- system/async/tasks/Scheduler.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/async/tasks/Scheduler.cfc b/system/async/tasks/Scheduler.cfc index 0e50c6c96..4e278b63e 100644 --- a/system/async/tasks/Scheduler.cfc +++ b/system/async/tasks/Scheduler.cfc @@ -66,7 +66,7 @@ component accessors="true" singleton { // Build out the executor for this scheduler createSchedulerExecutor(); // Bit that denotes if this scheduler has been started or not - variables.started = false; + variables.started = false; // Send notice arguments.asyncManager.out( "√ Scheduler (#arguments.name#) has been registered" ); From 693583884dd93ffc3bc5af8e5f03390a3a5257e3 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 5 Mar 2024 11:06:15 -0600 Subject: [PATCH 19/41] updating test results in ci --- .github/workflows/tests.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc6ad10f1..39b462e34 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,21 +19,18 @@ jobs: strategy: fail-fast: false matrix: - commandbox_version: [ "5.9.0" ] + commandbox_version: [ "6.0.0" ] cfengine: [ "lucee@5", "adobe@2018", "adobe@2021", "adobe@2023" ] jdkVersion: [ "11" ] experimental: [false] include: - cfengine: "lucee@6" - commandbox_version: "6.0.0-alpha" jdkVersion: "11" experimental: true - cfengine: "lucee@6" - commandbox_version: "6.0.0-alpha" jdkVersion: "17" experimental: true - cfengine: "adobe@2023" - commandbox_version: "5.9.0" jdkVersion: "17" experimental: false steps: @@ -87,18 +84,11 @@ jobs: - name: Set cfengine version env run: echo "CFENGINE_VERSION=$(box echo ${serverInfo.engineName@coldbox-${{ matrix.cfengine }}}@${serverInfo.engineVersion@coldbox-${{ matrix.cfengine }}})" >> $GITHUB_ENV - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() - with: - files: tests/results/**/*.xml - check_name: "${{ env.CFENGINE_VERSION }} Test Results" - - name: Upload Test Results Artifacts if: always() uses: actions/upload-artifact@v4 with: - name: coldbox-test-results-${{ matrix.cfengine }} + name: Test Results Engine ${{ matrix.cfengine }} JDK ${{ matrix.jdkVersion }} path: | tests/results/**/* @@ -115,7 +105,7 @@ jobs: SLACK_USERNAME: CI SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} - - name: Failure Debugging Info + - name: Output Failure Debugging Info if: ${{ failure() }} run: | box version @@ -126,7 +116,24 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v4 with: - name: Failure Debugging Info - ${{ matrix.cfengine }} + name: Failure Debugging Info - ${{ matrix.cfengine }} - ${{ matrix.jdkVersion }} path: | .engine/**/logs/* .engine/**/WEB-INF/cfusion/logs/* + + # Publish the test results + publish-test-results: + name: Publish Test Results + needs: tests + runs-on: ubuntu-latest + if: always() + steps: + - name: Download Test Results Artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: artifacts/**/*.xml From c65e892ae870b354c296188cb290d25513244937 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 5 Mar 2024 11:19:05 -0600 Subject: [PATCH 20/41] missing commandbox version --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 39b462e34..539211334 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,12 +26,15 @@ jobs: include: - cfengine: "lucee@6" jdkVersion: "11" + commandbox_version: "6.0.0" experimental: true - cfengine: "lucee@6" jdkVersion: "17" + commandbox_version: "6.0.0" experimental: true - cfengine: "adobe@2023" jdkVersion: "17" + commandbox_version: "6.0.0" experimental: false steps: - name: Checkout Repository From 5a23d6879864a32ef08c6ed1c423e4725d925dc9 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 5 Mar 2024 12:17:59 -0600 Subject: [PATCH 21/41] directory creates for docs output --- apidocs/cachebox.cfm | 5 +++++ apidocs/coldbox.cfm | 5 +++++ apidocs/logbox.cfm | 5 +++++ apidocs/wirebox.cfm | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/apidocs/cachebox.cfm b/apidocs/cachebox.cfm index c539eec77..f84f63778 100755 --- a/apidocs/cachebox.cfm +++ b/apidocs/cachebox.cfm @@ -4,6 +4,11 @@ docName = "CacheBox-APIDocs"; base = expandPath( "/cachebox/system" ); + // Create the output directory if it doesn't exist + if ( !directoryExists( url.path ) ) { + directoryCreate( url.path ); + } + docbox = new docbox.DocBox( properties = { projectTitle = "CacheBox v#url.version#", outputDir = url.path diff --git a/apidocs/coldbox.cfm b/apidocs/coldbox.cfm index 6d72c423e..0ed78c556 100755 --- a/apidocs/coldbox.cfm +++ b/apidocs/coldbox.cfm @@ -4,6 +4,11 @@ docName = "ColdBox-APIDocs"; base = expandPath( "/coldbox/system" ); + // Create the output directory if it doesn't exist + if ( !directoryExists( url.path ) ) { + directoryCreate( url.path ); + } + docbox = new docbox.DocBox( properties = { projectTitle = "ColdBox v#url.version#", outputDir = url.path diff --git a/apidocs/logbox.cfm b/apidocs/logbox.cfm index 5aabb6de1..a7b07de50 100755 --- a/apidocs/logbox.cfm +++ b/apidocs/logbox.cfm @@ -4,6 +4,11 @@ docName = "logbox-APIDocs"; base = expandPath( "/logbox/system" ); + // Create the output directory if it doesn't exist + if ( !directoryExists( url.path ) ) { + directoryCreate( url.path ); + } + docbox = new docbox.DocBox( properties = { projectTitle = "logbox v#url.version#", outputDir = url.path diff --git a/apidocs/wirebox.cfm b/apidocs/wirebox.cfm index 5db8aab27..a05c9c38e 100755 --- a/apidocs/wirebox.cfm +++ b/apidocs/wirebox.cfm @@ -4,6 +4,11 @@ docName = "wirebox-APIDocs"; base = expandPath( "/wirebox/system" ); + // Create the output directory if it doesn't exist + if ( !directoryExists( url.path ) ) { + directoryCreate( url.path ); + } + docbox = new docbox.DocBox( properties = { projectTitle = "wirebox v#url.version#", outputDir = url.path From 717eaa37a23dbd67da02da5f8c0564a99b33f18f Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 5 Mar 2024 12:50:14 -0600 Subject: [PATCH 22/41] dumb adobe elvis operator issues --- system/cache/store/indexers/MetadataIndexer.cfc | 7 ++++--- .../cache/providers/CacheBoxWithConcurrentStoreTest.cfc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/cache/store/indexers/MetadataIndexer.cfc b/system/cache/store/indexers/MetadataIndexer.cfc index 66e8b2678..dfc80f87e 100644 --- a/system/cache/store/indexers/MetadataIndexer.cfc +++ b/system/cache/store/indexers/MetadataIndexer.cfc @@ -96,7 +96,8 @@ component accessors="true" { * @objectKey The key to get */ struct function getObjectMetadata( required objectKey ){ - return variables.poolMetadata.get( arguments.objectKey ) ?: {}; + var results = variables.poolMetadata.get( arguments.objectKey ); + return isNull( results ) ? {} : results; } /** @@ -175,8 +176,8 @@ component accessors="true" { * Get an array of sorted keys for this indexer according to parameters * * @objectKey - * @property - * @value + * @property + * @value */ array function getSortedKeys( required property, diff --git a/tests/specs/cache/providers/CacheBoxWithConcurrentStoreTest.cfc b/tests/specs/cache/providers/CacheBoxWithConcurrentStoreTest.cfc index d8ad721eb..39f84be3f 100755 --- a/tests/specs/cache/providers/CacheBoxWithConcurrentStoreTest.cfc +++ b/tests/specs/cache/providers/CacheBoxWithConcurrentStoreTest.cfc @@ -8,7 +8,7 @@ objectDefaultTimeout : 60, objectDefaultLastAccessTimeout : 30, useLastAccessTimeouts : true, - reapFrequency : 2, + reapFrequency : 10, freeMemoryPercentageThreshold : 0, evictionPolicy : "LRU", evictCount : 1, From abd4d84728979af1e5819b7eff61b07a6797baef Mon Sep 17 00:00:00 2001 From: lmajano Date: Tue, 5 Mar 2024 18:51:16 +0000 Subject: [PATCH 23/41] Apply cfformat changes --- system/cache/store/indexers/MetadataIndexer.cfc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/cache/store/indexers/MetadataIndexer.cfc b/system/cache/store/indexers/MetadataIndexer.cfc index dfc80f87e..61d752847 100644 --- a/system/cache/store/indexers/MetadataIndexer.cfc +++ b/system/cache/store/indexers/MetadataIndexer.cfc @@ -97,7 +97,7 @@ component accessors="true" { */ struct function getObjectMetadata( required objectKey ){ var results = variables.poolMetadata.get( arguments.objectKey ); - return isNull( results ) ? {} : results; + return isNull( results ) ? {} : results; } /** @@ -176,8 +176,8 @@ component accessors="true" { * Get an array of sorted keys for this indexer according to parameters * * @objectKey - * @property - * @value + * @property + * @value */ array function getSortedKeys( required property, From a25e264be92f3a4689323c529a1a391bda5d85c9 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 5 Mar 2024 16:13:23 -0600 Subject: [PATCH 24/41] guaranteing async results --- tests/specs/async/AsyncManagerSpec.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/specs/async/AsyncManagerSpec.cfc b/tests/specs/async/AsyncManagerSpec.cfc index fe6fc4a8c..9c149c3a2 100644 --- a/tests/specs/async/AsyncManagerSpec.cfc +++ b/tests/specs/async/AsyncManagerSpec.cfc @@ -251,7 +251,7 @@ component extends="BaseAsyncSpec" { var f1 = asyncManager .newFuture() .run( function(){ - sleep( 1000 ); + sleep( 2000 ); return "hello"; } ); var f2 = asyncManager @@ -265,7 +265,7 @@ component extends="BaseAsyncSpec" { it( "can process multiple closures in parallel via the anyOf() method", function(){ var f1 = function(){ - sleep( 1000 ); + sleep( 2000 ); return "hello"; }; var f2 = function(){ From 01d8ef1c7cf663f7cb9774384160acad400e48de Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 11 Mar 2024 10:52:21 +0100 Subject: [PATCH 25/41] concurrent build stopage --- .github/workflows/snapshot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 1ba5b46da..391d10efc 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -7,6 +7,11 @@ on: branches: - development +# Unique group name per workflow-branch/tag combo +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: ############################################# # Tests First baby! We fail, no build :( From 20cdbf5f603fe2c4227ffbc9954ae10e1c5ccb15 Mon Sep 17 00:00:00 2001 From: Dave L Date: Wed, 13 Mar 2024 03:49:30 -0700 Subject: [PATCH 26/41] Add exception for set-cookie headers to always append (#589) --- system/web/context/RequestContext.cfc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/system/web/context/RequestContext.cfc b/system/web/context/RequestContext.cfc index 71b5d094e..cb1c27bb2 100644 --- a/system/web/context/RequestContext.cfc +++ b/system/web/context/RequestContext.cfc @@ -1803,9 +1803,16 @@ component serializable="false" accessors="true" { } // Name Exists and not already set. else if ( !isNull( arguments.name ) ) { - getPageContext() - .getResponse() - .setHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); + + var response = getPageContext().getResponse(); + + // special exception for Set-Cookie. We always append this header, instead of overwriting + if ( arguments.name == "Set-Cookie" ) { + response.addHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); + } else { + response.setHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); + } + variables.responseHeaders[ arguments.name ] = arguments.value; } else { throw( From 02f43be65631ab23cc6bf0a1101dcf80d3e94c45 Mon Sep 17 00:00:00 2001 From: lmajano Date: Wed, 13 Mar 2024 10:50:29 +0000 Subject: [PATCH 27/41] Apply cfformat changes --- system/web/context/RequestContext.cfc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/system/web/context/RequestContext.cfc b/system/web/context/RequestContext.cfc index cb1c27bb2..3099d4fe6 100644 --- a/system/web/context/RequestContext.cfc +++ b/system/web/context/RequestContext.cfc @@ -1803,16 +1803,15 @@ component serializable="false" accessors="true" { } // Name Exists and not already set. else if ( !isNull( arguments.name ) ) { - var response = getPageContext().getResponse(); - + // special exception for Set-Cookie. We always append this header, instead of overwriting - if ( arguments.name == "Set-Cookie" ) { + if ( arguments.name == "Set-Cookie" ) { response.addHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); } else { response.setHeader( javacast( "string", arguments.name ), javacast( "string", arguments.value ) ); } - + variables.responseHeaders[ arguments.name ] = arguments.value; } else { throw( From bf0fd9806252e00c16b5e6911dc35435950542b1 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 8 Apr 2024 06:15:35 +0200 Subject: [PATCH 28/41] COLDBOX-1273 #resolve Removal of deprecated CFML functions in core --- system/web/config/ApplicationLoader.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/web/config/ApplicationLoader.cfc b/system/web/config/ApplicationLoader.cfc index 4375848d5..1a4d79129 100644 --- a/system/web/config/ApplicationLoader.cfc +++ b/system/web/config/ApplicationLoader.cfc @@ -183,7 +183,7 @@ component accessors="true" { "" ); // Cleanup the template path - var localPath = getDirectoryFromPath( replaceNoCase( getTemplatePath(), "\", "/", "all" ) ); + var localPath = getDirectoryFromPath( replaceNoCase( getBaseTemplatePath(), "\", "/", "all" ) ); // Verify Path Location var pathLocation = findNoCase( webPath, localPath ); From d0be2164ab32fde7dd7530ff673c0ee4681e527e Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 8 Apr 2024 08:27:57 +0100 Subject: [PATCH 29/41] test debugging --- .github/workflows/snapshot.yml | 2 +- tests/specs/cache/CacheFactoryTest.cfc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 391d10efc..ed0814a48 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -9,7 +9,7 @@ on: # Unique group name per workflow-branch/tag combo concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: diff --git a/tests/specs/cache/CacheFactoryTest.cfc b/tests/specs/cache/CacheFactoryTest.cfc index 58a911359..9c96129c9 100755 --- a/tests/specs/cache/CacheFactoryTest.cfc +++ b/tests/specs/cache/CacheFactoryTest.cfc @@ -10,7 +10,11 @@ } function afterTests(){ - cacheFactory.shutdown(); + try{ + cacheFactory.shutdown(); + } catch( any e ){ + console( "Error shutting down cache factory #e.detail# #e.message#" ); + } } function testGetConfig(){ From ec8ad861f6b83f4a986e63d3808271b923e725b8 Mon Sep 17 00:00:00 2001 From: lmajano Date: Mon, 8 Apr 2024 07:29:01 +0000 Subject: [PATCH 30/41] Apply cfformat changes --- tests/specs/cache/CacheFactoryTest.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/specs/cache/CacheFactoryTest.cfc b/tests/specs/cache/CacheFactoryTest.cfc index 9c96129c9..01381cf1a 100755 --- a/tests/specs/cache/CacheFactoryTest.cfc +++ b/tests/specs/cache/CacheFactoryTest.cfc @@ -10,9 +10,9 @@ } function afterTests(){ - try{ + try { cacheFactory.shutdown(); - } catch( any e ){ + } catch ( any e ) { console( "Error shutting down cache factory #e.detail# #e.message#" ); } } From 5cbdaf02cd262f0e301ad328fdff265dc8379c0e Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 10 Apr 2024 09:59:49 -0500 Subject: [PATCH 31/41] COLDBOX-1275 #resolve Improved engine detection by the CFMLEngine feature class --- system/core/util/CFMLEngine.cfc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/util/CFMLEngine.cfc b/system/core/util/CFMLEngine.cfc index 88710e300..b8064b290 100644 --- a/system/core/util/CFMLEngine.cfc +++ b/system/core/util/CFMLEngine.cfc @@ -21,6 +21,7 @@ component { variables.features = { adobe2018 : { invokeArray : false }, adobe2021 : { invokeArray : false }, + adobe2023 : { invokeArray : false }, lucee : { invokeArray : true } }; variables.productVersion = listFirst( server.coldfusion.productversion ); @@ -53,7 +54,7 @@ component { * Verify if this is an adobe server */ boolean function isAdobe(){ - return !isLucee(); + return server.keyExists( "coldfusion" ) && server.coldfusion.productName.findNoCase( "ColdFusion" ); } /** From 9df9630b266d6a719d40768eef29bc6826936e9f Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Wed, 10 Apr 2024 11:10:11 -0500 Subject: [PATCH 32/41] more engine detection --- system/Bootstrap.cfc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/Bootstrap.cfc b/system/Bootstrap.cfc index 4bb6da743..ffbf7b6ff 100644 --- a/system/Bootstrap.cfc +++ b/system/Bootstrap.cfc @@ -737,9 +737,12 @@ component serializable="false" accessors="true" { * Helper method to deal with ACF's overload of the page context response, come on Adobe, get your act together! */ private function getPageContextResponse(){ - return server.keyExists( "lucee" ) ? getPageContext().getResponse() : getPageContext() + if( server.keyExists( "coldfusion" ) && server.coldfusion.productName.findNoCase( "ColdFusion" ) ){ + return getPageContext() .getResponse() .getResponse(); + } + return getPageContext().getResponse(); } } From 8fc0c7fd0fd28a86a1498d40a0d4d494670e3600 Mon Sep 17 00:00:00 2001 From: lmajano Date: Wed, 10 Apr 2024 16:11:27 +0000 Subject: [PATCH 33/41] Apply cfformat changes --- system/Bootstrap.cfc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/system/Bootstrap.cfc b/system/Bootstrap.cfc index ffbf7b6ff..ddeaf62c8 100644 --- a/system/Bootstrap.cfc +++ b/system/Bootstrap.cfc @@ -737,10 +737,8 @@ component serializable="false" accessors="true" { * Helper method to deal with ACF's overload of the page context response, come on Adobe, get your act together! */ private function getPageContextResponse(){ - if( server.keyExists( "coldfusion" ) && server.coldfusion.productName.findNoCase( "ColdFusion" ) ){ - return getPageContext() - .getResponse() - .getResponse(); + if ( server.keyExists( "coldfusion" ) && server.coldfusion.productName.findNoCase( "ColdFusion" ) ) { + return getPageContext().getResponse().getResponse(); } return getPageContext().getResponse(); } From dd7f07715dd3f0354ba2c6db5838cf8cfd3fb94c Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 22 Apr 2024 10:30:51 +0200 Subject: [PATCH 34/41] COLDBOX-1278 #resolve Remove unsafe evaluate function usage --- system/core/dynamic/MixerUtil.cfc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/core/dynamic/MixerUtil.cfc b/system/core/dynamic/MixerUtil.cfc index ffdc245fe..3def48540 100644 --- a/system/core/dynamic/MixerUtil.cfc +++ b/system/core/dynamic/MixerUtil.cfc @@ -164,7 +164,16 @@ component accessors="true" { * Removes a method in a CFC */ function removePropertyMixin( required propertyName, scope = "variables" ){ - structDelete( evaluate( arguments.scope ), arguments.propertyName ); + switch( arguments.scope ){ + case "variables": + return structDelete( variables, arguments.propertyName ); + break; + case "this": + structDelete( this, arguments.propertyName ); + break; + default: + throw( "Invalid scope" ); + } return this; } From b4ad0969ad8dd19950c035f391a36fdd718c651f Mon Sep 17 00:00:00 2001 From: lmajano Date: Mon, 22 Apr 2024 08:31:59 +0000 Subject: [PATCH 35/41] Apply cfformat changes --- system/core/dynamic/MixerUtil.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/dynamic/MixerUtil.cfc b/system/core/dynamic/MixerUtil.cfc index 3def48540..9109d1c6e 100644 --- a/system/core/dynamic/MixerUtil.cfc +++ b/system/core/dynamic/MixerUtil.cfc @@ -164,7 +164,7 @@ component accessors="true" { * Removes a method in a CFC */ function removePropertyMixin( required propertyName, scope = "variables" ){ - switch( arguments.scope ){ + switch ( arguments.scope ) { case "variables": return structDelete( variables, arguments.propertyName ); break; From ab2ed995785172a72404da161f831e30817b3d33 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 22 Apr 2024 10:39:59 +0200 Subject: [PATCH 36/41] COLDBOX-1278 #resolve Remove unsafe evaluate function usage --- tests/specs/web/context/eventhandlerBeanTest.cfc | 2 +- tests/specs/web/context/exceptionBeanTest.cfc | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/tests/specs/web/context/eventhandlerBeanTest.cfc b/tests/specs/web/context/eventhandlerBeanTest.cfc index bf6f95984..348b17cdf 100755 --- a/tests/specs/web/context/eventhandlerBeanTest.cfc +++ b/tests/specs/web/context/eventhandlerBeanTest.cfc @@ -15,7 +15,7 @@ this.ehbean.init( this.instance.invocationPath ); for ( var thisKey in this.instance ) { - evaluate( "this.ehBean.set#thisKey#( this.instance[ thisKey ] )" ); + invoke( this.ehBean, "set#thisKey#", [ this.instance[ thisKey ] ] ); } diff --git a/tests/specs/web/context/exceptionBeanTest.cfc b/tests/specs/web/context/exceptionBeanTest.cfc index 20c9cc9cc..3184125fe 100755 --- a/tests/specs/web/context/exceptionBeanTest.cfc +++ b/tests/specs/web/context/exceptionBeanTest.cfc @@ -58,14 +58,6 @@ - - - for ( key in this.instance ) { - evaluate( "this.e.get#key#()" ); - } - - - assertTrue( isStruct( this.e.getMemento() ) ); @@ -169,4 +161,3 @@ - From 1c27b4d7cbca2a934567cdf74c9b2be738caa772 Mon Sep 17 00:00:00 2001 From: lmajano Date: Mon, 22 Apr 2024 08:43:13 +0000 Subject: [PATCH 37/41] Apply cfformat changes --- tests/specs/web/context/eventhandlerBeanTest.cfc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/specs/web/context/eventhandlerBeanTest.cfc b/tests/specs/web/context/eventhandlerBeanTest.cfc index 348b17cdf..15e67cf6c 100755 --- a/tests/specs/web/context/eventhandlerBeanTest.cfc +++ b/tests/specs/web/context/eventhandlerBeanTest.cfc @@ -15,7 +15,11 @@ this.ehbean.init( this.instance.invocationPath ); for ( var thisKey in this.instance ) { - invoke( this.ehBean, "set#thisKey#", [ this.instance[ thisKey ] ] ); + invoke( + this.ehBean, + "set#thisKey#", + [ this.instance[ thisKey ] ] + ); } From 447969be00bc1032b83cfefb951c791bfe1a5beb Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 22 Apr 2024 10:45:17 +0200 Subject: [PATCH 38/41] COLDBOX-1279 #resolve Render encapsulator bleed of this scope by engines, workaround. --- system/web/RendererEncapsulator.cfm | 1 + 1 file changed, 1 insertion(+) diff --git a/system/web/RendererEncapsulator.cfm b/system/web/RendererEncapsulator.cfm index e2e48bf8a..e7f398975 100644 --- a/system/web/RendererEncapsulator.cfm +++ b/system/web/RendererEncapsulator.cfm @@ -27,6 +27,7 @@ variables.rc = attributes.rc; variables.prc = attributes.prc; variables.args = attributes.args; + variables.this = variables; // Spoof the arguments scope for backwards compat. i.e. arguments.args, arguments.view variables.arguments = { From a479ff8415b7c46bc59b92244b86327b5898f77b Mon Sep 17 00:00:00 2001 From: John Whish Date: Wed, 1 May 2024 16:34:44 +0100 Subject: [PATCH 39/41] Cache policies LRU error (#590) COLDBOX-1280 https://ortussolutions.atlassian.net/browse/COLDBOX-1280 #Resolve * check if md keys exist before referencing Fixes error: Error sorting via store indexer Element TIMEOUT is undefined in MD. coldfusion.runtime.UndefinedElementException: Element TIMEOUT is undefined in MD. * Add default value if missing Fixes error: Error sorting via store indexer Invalid property requested: isSoftReference Valid properties are: coldfusion.runtime.CustomException: Invalid property requested: isSoftReference --- system/cache/policies/AbstractEvictionPolicy.cfc | 3 +++ system/cache/store/ConcurrentSoftReferenceStore.cfc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/cache/policies/AbstractEvictionPolicy.cfc b/system/cache/policies/AbstractEvictionPolicy.cfc index e9569f60f..0da5c7ae9 100644 --- a/system/cache/policies/AbstractEvictionPolicy.cfc +++ b/system/cache/policies/AbstractEvictionPolicy.cfc @@ -83,6 +83,9 @@ component continue; } var md = indexer.getObjectMetadata( item ); + if ( NOT md.keyExists( "timeout" ) || NOT md.keyExists( "isExpired" ) ) { + continue; + } // Evict if not already marked for eviction or an eternal object. if ( md.timeout GT 0 AND NOT md.isExpired ) { diff --git a/system/cache/store/ConcurrentSoftReferenceStore.cfc b/system/cache/store/ConcurrentSoftReferenceStore.cfc index 70e973368..908b210c7 100644 --- a/system/cache/store/ConcurrentSoftReferenceStore.cfc +++ b/system/cache/store/ConcurrentSoftReferenceStore.cfc @@ -189,7 +189,8 @@ component extends="coldbox.system.cache.store.ConcurrentStore" accessors=true { if ( !isNull( local.softRef ) && variables.indexer.getObjectMetadataProperty( arguments.objectKey, - "isSoftReference" + "isSoftReference", + false ) ) { variables.softRefKeyMap.remove( softRef.hashCode() ); From c0555485aba1cdde93ffea325e5a83f77b4bfd74 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 13 May 2024 17:24:08 -0400 Subject: [PATCH 40/41] ready for release --- .github/workflows/tests.yml | 10 +++------- changelog.md | 17 ++++++++++++++++- server-lucee@5.json | 2 +- server-lucee@6.json | 2 +- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 539211334..14ae85df0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,22 +19,18 @@ jobs: strategy: fail-fast: false matrix: - commandbox_version: [ "6.0.0" ] + commandbox_version: [ "6.0.1" ] cfengine: [ "lucee@5", "adobe@2018", "adobe@2021", "adobe@2023" ] jdkVersion: [ "11" ] experimental: [false] include: - - cfengine: "lucee@6" - jdkVersion: "11" - commandbox_version: "6.0.0" - experimental: true - cfengine: "lucee@6" jdkVersion: "17" - commandbox_version: "6.0.0" + commandbox_version: "6.0.1" experimental: true - cfengine: "adobe@2023" jdkVersion: "17" - commandbox_version: "6.0.0" + commandbox_version: "6.0.1" experimental: false steps: - name: Checkout Repository diff --git a/changelog.md b/changelog.md index 810d0a7de..0bfc74f9f 100644 --- a/changelog.md +++ b/changelog.md @@ -9,9 +9,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Added +### New Feature - Prettier SQL printing in `StringUtil.prettySQL()` +- [COLDBOX-1270](https://ortussolutions.atlassian.net/browse/COLDBOX-1270) Abililty to restart schedulers with a \`restart\(\)\` method + +### Improvement + +- [COLDBOX-1268](https://ortussolutions.atlassian.net/browse/COLDBOX-1268) WireBox Singleton auto reload now only affects app singletons and not core singletons +- [COLDBOX-1269](https://ortussolutions.atlassian.net/browse/COLDBOX-1269) Do not add double headers if \`event.setHTTPHeader\(\)\` is called more than once +- [COLDBOX-1273](https://ortussolutions.atlassian.net/browse/COLDBOX-1273) Removal of deprecated CFML functions in core +- [COLDBOX-1275](https://ortussolutions.atlassian.net/browse/COLDBOX-1275) Improved engine detection by the CFMLEngine feature class +- [COLDBOX-1278](https://ortussolutions.atlassian.net/browse/COLDBOX-1278) Remove unsafe evaluate function usage + +### Bug + +- [COLDBOX-1266](https://ortussolutions.atlassian.net/browse/COLDBOX-1266) Logger for MS SQL using date not datetime. +- [COLDBOX-1267](https://ortussolutions.atlassian.net/browse/COLDBOX-1267) Lucee only isEmpty function call +- [COLDBOX-1279](https://ortussolutions.atlassian.net/browse/COLDBOX-1279) Render encapsulator bleed of this scope by engines ## [7.2.1] - 2023-12-11 diff --git a/server-lucee@5.json b/server-lucee@5.json index 8e4844083..1d19a7e53 100644 --- a/server-lucee@5.json +++ b/server-lucee@5.json @@ -1,6 +1,6 @@ { "app":{ - "cfengine":"lucee@5.4", + "cfengine":"lucee@5", "serverHomeDirectory":".engine/lucee5" }, "name":"coldbox-lucee@5", diff --git a/server-lucee@6.json b/server-lucee@6.json index f05e4b05f..f869f0a5a 100644 --- a/server-lucee@6.json +++ b/server-lucee@6.json @@ -1,6 +1,6 @@ { "app":{ - "cfengine":"lucee@6.0.0-snapshot", + "cfengine":"lucee@6", "serverHomeDirectory":".engine/lucee6" }, "name":"coldbox-lucee@6", From 961a4511daa6d39415b325ff59622efadb28a053 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Mon, 13 May 2024 18:35:22 -0400 Subject: [PATCH 41/41] artifacts specs [no ci] --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40f32492e..ba1a75ff9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,7 +108,6 @@ jobs: if: success() uses: actions/upload-artifact@v4 with: - name: coldbox-variants path: | .artifacts/**/* changelog.md @@ -192,7 +191,6 @@ jobs: - name: Download build artifacts uses: actions/download-artifact@v4 with: - name: coldbox-variants path: .tmp - name: Copy Changelog