diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7018845..2589ff9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,8 +21,8 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: Ortus-Solutions/commandbox-action@v1.0.2 + - uses: Ortus-Solutions/commandbox-action@v1.0.3 with: cmd: run-script format:check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a5f6d6a..b0a9c75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup CommandBox uses: Ortus-Solutions/setup-commandbox@v2.0.1 @@ -82,7 +82,7 @@ jobs: - name: Upload Build Artifacts if: success() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.MODULE_ID }} path: | @@ -138,7 +138,7 @@ jobs: steps: # Checkout development - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: development @@ -148,7 +148,7 @@ jobs: forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} - name: Download build artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: ${{ env.MODULE_ID }} path: .tmp diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 45d7dd1..136fb7a 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -20,10 +20,10 @@ 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 + uses: Ortus-Solutions/commandbox-action@v1.0.3 with: cmd: run-script format diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cdd77f8..7be8598 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,14 +18,11 @@ jobs: strategy: fail-fast: false matrix: - cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] + cfengine: [ "lucee@5", "adobe@2018", "adobe@2021", "adobe@2023" ] experimental: [ false ] - include: - - cfengine: "adobe@2023" - experimental: true steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # - name: Setup Database and Fixtures # run: | @@ -82,7 +79,7 @@ jobs: - name: Upload Test Results to Artifacts if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: test-results-${{ matrix.cfengine }}-${{ matrix.coldboxVersion }} path: | @@ -95,7 +92,7 @@ jobs: - name: Upload Debug Logs To Artifacts if: ${{ failure() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Failure Debugging Info - ${{ matrix.cfengine }} path: | diff --git a/.markdownlint.json b/.markdownlint.json index 3707fcb..21bc843 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -11,5 +11,6 @@ "no-duplicate-header" : { "siblings_only" : true }, + "no-duplicate-heading" : false, "no-inline-html" : false } diff --git a/changelog.md b/changelog.md index af9d38e..fdc7da1 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Better engine recognition in base proxy +- Added Adobe 2023 support + ## [1.1.0] - 2023-04-28 ### Added diff --git a/models/BaseProxy.cfc b/models/BaseProxy.cfc index 68e580b..14c7e4e 100644 --- a/models/BaseProxy.cfc +++ b/models/BaseProxy.cfc @@ -48,12 +48,15 @@ component accessors="true" { variables.loadAppContext = arguments.loadAppContext; variables.threadHashCode = getCurrentThread().hashCode(); + variables.isLucee = server.keyExists( "lucee" ); + variables.isAdobe = server.keyExists( "coldfusion" ) && server.coldfusion.productName.findNocase( "ColdFusion" ) > 0; + // If loading App context or not if ( arguments.loadAppContext ) { - if ( server.keyExists( "lucee" ) ) { + if ( variables.isLucee ) { variables.cfContext = getCFMLContext().getApplicationContext(); variables.pageContext = getCFMLContext(); - } else { + } else if( variables.isAdobe ) { variables.DataSrcImplStatic = createObject( "java", "coldfusion.sql.DataSrcImpl" ); variables.fusionContextStatic = createObject( "java", "coldfusion.filter.FusionContext" ); variables.originalFusionContext = fusionContextStatic.getCurrent().clone(); @@ -103,9 +106,9 @@ component accessors="true" { try { // Lucee vs Adobe Implementations - if ( server.keyExists( "lucee" ) ) { + if ( variables.isLucee ) { getCFMLContext().setApplicationContext( variables.cfContext ); - } else { + } else if( variables.isAdobe ) { // Set the current thread's class loader from the CF space to avoid // No class defined issues in thread land. getCurrentThread().setContextClassLoader( @@ -164,8 +167,7 @@ component accessors="true" { try { // Lucee vs Adobe Implementations - if ( server.keyExists( "lucee" ) ) { - } else { + if( variables.isAdobe ) { // Ensure any DB connections used get returned to the connection pool. Without clearSqlProxy an executor will hold onto any connections it touched while running and they will not timeout/close, and no other code can use the connection except for the executor that last touched it. Credit to Brad Wood for finding this! variables.DataSrcImplStatic.clearSqlProxy(); variables.fusionContextStatic.setCurrent( javacast( "null", "" ) ); @@ -199,10 +201,10 @@ component accessors="true" { * Amend this check once Adobe fixes this in a later update */ function getConcurrentEngineLockName(){ - if ( server.keyExists( "lucee" ) ) { - return createUUID(); - } else { + if( variables.isAdobe ){ return variables.UUID; + } else { + return createUUID(); } }