diff --git a/.flake8 b/.flake8 index 0d1fd1c33b..a570f5e020 100644 --- a/.flake8 +++ b/.flake8 @@ -1,19 +1,35 @@ [flake8] -max_line_length = 88 +max-line-length = 88 ignore = - C408 # Unnecessary dict/list/tuple call - rewrite as a literal - E203 # whitespace before ':' - doesn't work well with black - E225 # missing whitespace around operator - let black worry about that - E262 # inline comment should start with '# ' - E265 # block comment should start with '# ' - E266 # too many leading '#' for block comment - E302 # expected 2 blank lines, found 1 - E402 # module level import not at top of file - E501 # line too long - let black handle that - E711 # comparison to None should be - E712 # comparison to False/True should be - E741 # ambiguous variable name - F405 # may be undefined, or defined from star imports - W291 # trailing - W503 # line break occurred before a binary operator - let black worry about that - W504 # line break occurred adter a binary operator - let black worry about that + # Unnecessary dict/list/tuple call - rewrite as a literal + C408 + # whitespace before ':' - doesn't work well with black + E203 + # missing whitespace around operator - let black worry about that + E225 + # inline comment should start with '# ' + E262 + # block comment should start with '# ' + E265 + # too many leading '#' for block comment + E266 + # expected 2 blank lines, found 1 + E302 + # module level import not at top of file + E402 + # line too long - let black handle that + E501 + # comparison to None should be + E711 + # comparison to False/True should be + E712 + # ambiguous variable name + E741 + # may be undefined, or defined from star imports + F405 + # trailing + W291 + # line break occurred before a binary operator - let black worry about that + W503 + # line break occurred after a binary operator - let black worry about that + W504 diff --git a/.github/workflows/build-mapscript-php.yml b/.github/workflows/build-mapscript-php.yml index 549819b27e..9c1f73ae71 100644 --- a/.github/workflows/build-mapscript-php.yml +++ b/.github/workflows/build-mapscript-php.yml @@ -3,9 +3,14 @@ name: Build and test PHP MapScript on: push: branches: - - 'main' + - '*' except: - /^(cherry-pick-)?backport-\d+-to-/ + pull_request: + branches: + - '*' + except: + - /^(cherry-pick-)?backport-\d+-to-/ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -19,13 +24,13 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - php-version: [8.1, 8.2] + php-version: [8.3, 8.2] env: IGNORE_COMPARISON_RESULT_ON_CI: 'true' steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/build-mapscript-python.yml b/.github/workflows/build-mapscript-python.yml index 8f13ca3107..346a0654fc 100644 --- a/.github/workflows/build-mapscript-python.yml +++ b/.github/workflows/build-mapscript-python.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4511b81bfe..5e27badfb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository contents - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Build run: | diff --git a/.github/workflows/check-crlf.yml b/.github/workflows/check-crlf.yml index 1df7d3136b..9bd0b81fc0 100644 --- a/.github/workflows/check-crlf.yml +++ b/.github/workflows/check-crlf.yml @@ -19,9 +19,9 @@ jobs: steps: - name: Checkout repository contents - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Use action to check for CRLF endings - uses: erclu/check-crlf@v1.2.0 + uses: erclu/check-crlf@master with: # ignore directories containing *.pdf and *.tab exclude: msautotest/misc/data/ /msautotest/renderers/expected/ diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index 86cea4d3ab..d9894e7867 100644 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -14,6 +14,8 @@ jobs: linting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-python@v5 + with: + python-version: '3.12' - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1467a258e2..b0c519edd7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 4ea9667da7..9b4edea437 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 if: github.repository == 'MapServer/MapServer' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install Libraries run: | diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index 4e2970b091..e6b19101ef 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -16,7 +16,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install Requirements run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b991cc649..6465ead931 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: isort args: ["--profile", "black"] - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + rev: 7.1.1 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-clang-format diff --git a/CMakeLists.txt b/CMakeLists.txt index b078877221..79175b0cfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,8 @@ include(CheckIncludeFile) include(CheckCSourceCompiles) set (MapServer_VERSION_MAJOR 8) -set (MapServer_VERSION_MINOR 1) -set (MapServer_VERSION_REVISION 0) +set (MapServer_VERSION_MINOR 2) +set (MapServer_VERSION_REVISION 2) set (MapServer_VERSION_SUFFIX "") # Set C++ version @@ -1135,7 +1135,6 @@ option(BUILD_TESTING "Build unit test" ON) if(BUILD_DYNAMIC AND BUILD_TESTING) enable_testing() add_executable(unit_test tests/unit/test.cpp) - target_include_directories(unit_test PRIVATE src) target_link_libraries(unit_test PRIVATE mapserver) add_test(NAME unit_test COMMAND unit_test) endif() diff --git a/HISTORY.md b/HISTORY.md index d104673937..32b8a252ea 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -13,6 +13,88 @@ https://mapserver.org/development/changelog/ The online Migration Guide can be found at https://mapserver.org/MIGRATION_GUIDE.html +8.2.2 release (2024-09-02) +-------------------------- + +- fix build against FreeType 2.13.3 release (#7142) + +see detailed changelog for other fixes + +8.2.1 release (2024-07-21) +-------------------------- + +- security: validate tostring() expression function (#7123) + +- handle PHP MapScript out of source builds (#7108) + +8.2.0 release (2024-07-08) +-------------------------- + +RC3 was released as the final 8.2.0 (see major changes below) + +8.2.0-rc3 release (2024-06-28) +------------------------------ + +- fix memory corruption in msUpdate...FromString (#7038) + +8.2.0-rc2 release (2024-06-27) +------------------------------ + +- fix SWIG MapScript build failure (#7090) + +8.2.0-rc1 release (2024-06-14) +------------------------------ + +- no changes since beta3 (see major changes below) + +8.2.0-beta3 release (2024-06-11) +-------------------------------- + +- security fix to prevent SQL injections through regex validation (#7075) + +8.2.0-beta2 release (2024-06-08) +-------------------------------- + +- fix Python MapScript installation (#7071) + +8.2.0-beta1 release (2024-06-06) +-------------------------------- + +- restructure repo to move source code into /src (#6837) + +- remove sym2img.c from codebase (#6593) + +- handle templates + includes (#6113) + +- handle empty query response (#6907) + +- remove support for GDAL < 3 (#6901) + +- remove support for PROJ < 6 (#6900) + +- OGC API Features: implement Part 2 - CRS (#6893) + +- allow custom projections to be requested via WMS (#6795) + +- allow mapfiles to be accessed via URL Keys (#6862) + +- allow expressions in LABEL PRIORITY (#6884) + +- reference SLD files in Mapfiles (#7034) + +see detailed changelog for other fixes + +8.0.1 release (2023-04-17) +-------------------------- + +- fix WFS paging on Oracle (#6774) + +- allow runtime substitutions on the Web template parameter (#6804) + +- handle multiple PROJ_DATA paths through config (#6863) + +see detailed changelog for other fixes + 8.0.0 release (2022-09-12) -------------------------- @@ -72,6 +154,15 @@ RC2 was released as the final 8.0.0 (see major changes below) - upgrade Travis and GitHub CI to run on Ubuntu Focal (#6430) +7.6.5 release (2023-04-17) +-------------------------- + +- remove password content from logs (#6621) + +- increase security and stability (#6818) + +see detailed changelog for other fixes + 7.6.4 release (2021-07-12) -------------------------- diff --git a/INSTALL b/INSTALL.md similarity index 61% rename from INSTALL rename to INSTALL.md index fc27754e6d..f2c56a5acd 100644 --- a/INSTALL +++ b/INSTALL.md @@ -4,11 +4,11 @@ instructions. Unix compilation instructions ----------------------------- -See INSTALL.CMAKE or the document on the MapServer website at - +See [INSTALL.CMAKE](INSTALL.CMAKE) or the document on the MapServer website at +https://mapserver.org/installation/unix.html Win32 compilation instructions ------------------------------ See README.WIN32 or the document on the MapServer website at - +https://mapserver.org/installation/win32.html diff --git a/LICENSE.md b/LICENSE.md index 78a65ccd0a..5ad42611da 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -28,9 +28,9 @@ SOFTWARE. FlatGeobuf ---------- -Refer to the FlatGeobuf license found at [/flatgeobuf/LICENSE](flatgeobuf/LICENSE) +Refer to the FlatGeobuf license found at [/src/flatgeobuf/LICENSE](src/flatgeobuf/LICENSE) FlatBuffers ----------- -Refer to the FlatBuffers license found at [/flatgeobuf/include/flatbuffers/LICENSE](flatgeobuf/include/flatbuffers/LICENSE) \ No newline at end of file +Refer to the FlatBuffers license found at [/src/flatgeobuf/include/flatbuffers/LICENSE](src/flatgeobuf/include/flatbuffers/LICENSE) \ No newline at end of file diff --git a/Makefile b/Makefile index 50cb0cfd1f..adfc92c359 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ FLEX=flex YACC=yacc CMAKEFLAGS_MAPSCRIPT_PYTHON=-DWITH_CLIENT_WMS=1 \ -DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 \ - -DWITH_PYTHON=1-DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=1 -DWITH_EXEMPI=1 \ + -DWITH_PYTHON=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=1 -DWITH_EXEMPI=1 \ -DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 ${EXTRA_CMAKEFLAGS} -DLIBMAPSERVER_EXTRA_FLAGS="${LIBMAPSERVER_EXTRA_FLAGS}" -DCMAKE_INSTALL_PREFIX=/tmp/install-mapserver CMAKEFLAGS_NOCOVERAGE=-DWITH_CLIENT_WMS=1 \ diff --git a/SECURITY.md b/SECURITY.md index ac7faa18b5..43e72602a5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -11,25 +11,30 @@ submissions, when describing the vulnerability (see https://mapserver.org/develo ## Supported Versions The MapServer PSC (Project Steering Committee) will release patches for security vulnerabilities -for the last release branch of the **two most recent release series** (such as 8.x, 7.x. 6.x, etc...). +for the last release branch of the **two most recent release series** (such as 8.x, 7.x, 6.x, etc..., +where "x" is the most recent release in the series, such as: 7.6.6 being supported, but +not 7.6.5). For example, once 8.4 is released, support for 8.2 will be dropped. + Patches will only be provided **for a period of three years** from the release date of the current series. -For example, as 8.0 has been released, now only 8.0.x and 7.6.x will be supported/patched and 7.6.x will -only be supported for three years from the date of the 8.0 series release. +For example, as 8.2 has been released, now 8.2.x, and 7.6.x will be supported/patched, and 7.6.x will +only be supported for three years from the date of the 8.0 series release (until 2025-09-12). Currently, the following versions are supported: -| Version | Supported | -| ------- | ------------------ | -| 8.0.x | :white_check_mark: | -| 7.6.x | :white_check_mark: | -| 7.4.x | :x: | -| 7.2.x | :x: | -| 7.0.x | :x: | -| 6.4.x | :x: | -| < 6.4 | :x: | - -Note: _MapServer 8.0.0 was released on 2022-09-12._ -Note: _MapServer 7.0.0 was released on 2015-07-24._ +| Version | Supported | Support Until | +| ------- | ------------------ |-------------- | +| 8.2.x | :white_check_mark: | | +| 8.0.x | :x: | | +| 7.6.x | :white_check_mark: | 2025-09-12 | +| 7.4.x | :x: | | +| 7.2.x | :x: | | +| 7.0.x | :x: | | +| 6.4.x | :x: | | +| < 6.4 | :x: | | + +- _MapServer 8.2.0 was released on 2024-07-08_ +- _MapServer 8.0.0 was released on 2022-09-12_ +- _MapServer 7.0.0 was released on 2015-07-24_ ## Version Numbering: Explained diff --git a/appveyor.yml b/appveyor.yml index ce8a0de890..01ba55fd9d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -85,7 +85,9 @@ build_script: - cd %BUILD_FOLDER%/build # set the MapScript custom environment variable for python 3.8+ - set MAPSERVER_DLL_PATH=%BUILD_FOLDER%/build/Release;%SDK_BIN% - - set PROJ_LIB=%SDK_BIN%/proj9/SHARE + - set PROJ_DATA=%SDK_BIN%/proj9/SHARE + # ensure the GIF driver is available for tests + - set GDAL_DRIVER_PATH=%SDK_BIN%/gdal/plugins # check the mapserver exe can run - mapserv -v - cmake --build . --target pythonmapscript-wheel --config Release diff --git a/ci/build.sh b/ci/build.sh index 4ced832179..1afdf0ea23 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -5,7 +5,7 @@ export CC="ccache gcc" export CXX="ccache g++" if [ "${MAPSCRIPT_PYTHON_ONLY:-}" = "true" ]; then - # only build MapServer with the Python MapScript + # only build MapServer with the Python MapScript and not PHP, Perl etc. make cmakebuild_mapscript_python MFLAGS="-j$(nproc)" CMAKE_C_FLAGS="-O2" CMAKE_CXX_FLAGS="-O2" LIBMAPSERVER_EXTRA_FLAGS="-Wall -Werror -Wextra" # build the wheel and run the Python MapScript test suite make mspython-wheel @@ -43,12 +43,19 @@ python -m pyflakes . # run the Python server for the tests python -m http.server &> /dev/null & -# get phpunit +# get PHPUnit echo "PHP version" php -v -cd php && curl -LO https://phar.phpunit.de/phpunit-10.phar -echo "phpunit version" -php phpunit-10.phar --version +PHPVersionMinor=$(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) +if [ ${PHPVersionMinor} -gt 81 ]; then + cd php && curl -LO https://phar.phpunit.de/phpunit-11.phar + echo "PHPUnit version" + php phpunit-11.phar --version +else + cd php && curl -LO https://phar.phpunit.de/phpunit-10.phar + echo "PHPUnit version" + php phpunit-10.phar --version +fi echo "PHP includes" php-config --includes diff --git a/msautotest/misc/attrbind.map b/msautotest/misc/attrbind.map index eafef5e65d..536ab26d51 100644 --- a/msautotest/misc/attrbind.map +++ b/msautotest/misc/attrbind.map @@ -4,6 +4,8 @@ # REQUIRES: INPUT=SHAPE OUTPUT=PNG # # RUN_PARMS: attrbind_test001.png [MAP2IMG] -m [MAPFILE] -l test001 -o [RESULT] +# RUN_PARMS: attrbind_test002.png [MAP2IMG] -m [MAPFILE] -l test002 -o [RESULT] + MAP NAME 'attrbind' EXTENT -1.5 0.1 -0.6 1.0 @@ -71,5 +73,25 @@ MAP END END END + + # test with an alpha channel in bound colour + LAYER + NAME 'test002' + TYPE POINT + STATUS OFF + CONNECTIONTYPE OGR + CONNECTION "data/attrbind.shp" + DATA "SELECT *, '#006D2C14' AS hex FROM attrbind" + CLASS + STYLE + OPACITY 20 + COLOR [hex] + SYMBOL [symbol] + OFFSET 2 2 + SIZE 30 + END + END + END + END diff --git a/msautotest/misc/cluster.map b/msautotest/misc/cluster.map new file mode 100644 index 0000000000..7796f826dd --- /dev/null +++ b/msautotest/misc/cluster.map @@ -0,0 +1,89 @@ +# +# Test a layer with clustering +# +# REQUIRES: INPUT=GDAL INPUT=POSTGIS OUTPUT=PNG SUPPORTS=WMS +# +# RUN_PARMS: cluster.png [MAP2IMG] -m [MAPFILE] -l popplace -o [RESULT] +# +# Capabilities (return latest supported version by default) +# +# RUN_PARMS: wms_cluster_cap_latestversion.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&REQUEST=GetCapabilities" > [RESULT_DEVERSION] +# RUN_PARMS: wms_cluster_cap.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities" > [RESULT_DEVERSION] +# +# Draw a map +# RUN_PARMS: wms_get_map_cluster.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:3978&BBOX=2279399,-55345,2600377,461587&FORMAT=image/png&WIDTH=400&HEIGHT=400&STYLES=&LAYERS=popplace" > [RESULT_DEMIME] +# +MAP + +NAME "clusters" +EXTENT 2279399 -55345 2600377 461587 +SIZE 400 400 + +PROJECTION + "epsg:3978" +END + +IMAGETYPE png + +SYMBOL + NAME 'circle' + TYPE ELLIPSE + POINTS 1 1 END + FILLED TRUE +END + +WEB + METADATA + "ows_enable_request" "*" + "ows_srs" "EPSG:3978" + "ows_onlineresource" "http://foo" + END +END + +LAYER + NAME popplace + TYPE POINT + CONNECTIONTYPE POSTGIS + CONNECTION "user=postgres dbname=msautotest" + DATA "the_geom FROM popplace USING UNIQUE gid USING srid=3978" + PROCESSING "CLOSE_CONNECTION=DEFER" + STATUS OFF + CLUSTER + MAXDISTANCE 50 + REGION "ellipse" + END + LABELITEM "Cluster_FeatureCount" + CLASSITEM "Cluster_FeatureCount" + + CLASS + NAME "single" + EXPRESSION "1" + STYLE + COLOR 50 50 50 + SIZE 5 + SYMBOL 'circle' + END + END + + CLASS + NAME "cluster" + EXPRESSION ("[Cluster_FeatureCount]" != "1") + LABEL + SIZE 8 + COLOR 0 0 0 + ALIGN CENTER + PRIORITY 10 + BUFFER 1 + PARTIALS TRUE + POSITION cc + FORCE TRUE + END + STYLE + COLOR 0 255 0 + SIZE 20 + SYMBOL 'circle' + END + END +END + +END diff --git a/msautotest/misc/data/styleitem_style.csv b/msautotest/misc/data/styleitem_style.csv new file mode 100644 index 0000000000..fd9963a5a4 --- /dev/null +++ b/msautotest/misc/data/styleitem_style.csv @@ -0,0 +1,2 @@ +WKT,STYLE,comment +"LINESTRING(0.1 0.9,0.9 0.9)","STYLE WIDTH 1 COLOR 0 0 255 END","" diff --git a/msautotest/misc/expected/attrbind_test002.png b/msautotest/misc/expected/attrbind_test002.png new file mode 100644 index 0000000000..909ae2d84e Binary files /dev/null and b/msautotest/misc/expected/attrbind_test002.png differ diff --git a/msautotest/misc/expected/cluster.png b/msautotest/misc/expected/cluster.png new file mode 100644 index 0000000000..486bf1620f Binary files /dev/null and b/msautotest/misc/expected/cluster.png differ diff --git a/msautotest/misc/expected/scale_factor_inheritance.png b/msautotest/misc/expected/scale_factor_inheritance.png new file mode 100644 index 0000000000..5aa2d66910 Binary files /dev/null and b/msautotest/misc/expected/scale_factor_inheritance.png differ diff --git a/msautotest/misc/expected/wms_cluster_cap.xml b/msautotest/misc/expected/wms_cluster_cap.xml new file mode 100644 index 0000000000..5f9bf72259 --- /dev/null +++ b/msautotest/misc/expected/wms_cluster_cap.xml @@ -0,0 +1,127 @@ +Content-Type: application/vnd.ogc.wms_xml; charset=UTF-8 + + + + ]> + + + + OGC:WMS + + clusters + + + + + + + + + application/vnd.ogc.wms_xml + + + + + + + + + image/png + image/jpeg + image/png; mode=8bit + image/vnd.jpeg-png + image/vnd.jpeg-png8 + application/x-pdf + image/svg+xml + image/tiff + application/vnd.google-earth.kml+xml + application/vnd.google-earth.kmz + application/vnd.mapbox-vector-tile + application/x-protobuf + application/json + + + + + + + + + text/plain + application/vnd.ogc.gml + + + + + + + + + text/xml + + + + + + + + + image/png + image/jpeg + image/png; mode=8bit + image/vnd.jpeg-png + image/vnd.jpeg-png8 + + + + + + + + + text/xml + + + + + + + + + + application/vnd.ogc.se_xml + application/vnd.ogc.se_inimage + application/vnd.ogc.se_blank + + + + + clusters + + clusters + clusters + EPSG:3978 + + + popplace + + popplace + + + text/xml + + + + + + + diff --git a/msautotest/misc/expected/wms_cluster_cap_latestversion.xml b/msautotest/misc/expected/wms_cluster_cap_latestversion.xml new file mode 100644 index 0000000000..5bdafd0e4e --- /dev/null +++ b/msautotest/misc/expected/wms_cluster_cap_latestversion.xml @@ -0,0 +1,133 @@ +Content-Type: text/xml; charset=UTF-8 + + + + + WMS + + clusters + + + + 4096 + 4096 + + + + + + text/xml + + + + + + + + + image/png + image/jpeg + image/png; mode=8bit + image/vnd.jpeg-png + image/vnd.jpeg-png8 + application/x-pdf + image/svg+xml + image/tiff + application/vnd.google-earth.kml+xml + application/vnd.google-earth.kmz + application/vnd.mapbox-vector-tile + application/x-protobuf + application/json + + + + + + + + + text/plain + application/vnd.ogc.gml + + + + + + + + + text/xml + + + + + + + + + image/png + image/jpeg + image/png; mode=8bit + image/vnd.jpeg-png + image/vnd.jpeg-png8 + + + + + + + + + text/xml + + + + + + + + + + XML + INIMAGE + BLANK + + + + clusters + + clusters + clusters + EPSG:3978 + + -66.328620 + -59.688211 + 42.563121 + 47.941252 + + + popplace + + popplace + + -66.328617 + -59.688212 + 42.563125 + 47.941251 + + + text/xml + + + + + + + diff --git a/msautotest/misc/expected/wms_get_map_cluster.png b/msautotest/misc/expected/wms_get_map_cluster.png new file mode 100644 index 0000000000..601bc60a47 Binary files /dev/null and b/msautotest/misc/expected/wms_get_map_cluster.png differ diff --git a/msautotest/misc/scale_factor_inheritance.map b/msautotest/misc/scale_factor_inheritance.map new file mode 100644 index 0000000000..c7baa7fde1 --- /dev/null +++ b/msautotest/misc/scale_factor_inheritance.map @@ -0,0 +1,25 @@ +# +# Test style scale factor inheritance with STYLEITEM +# +# REQUIRES: INPUT=GDAL OUTPUT=PNG +# + +# RUN_PARMS: scale_factor_inheritance.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&layer=test&mode=map" > [RESULT_DEMIME] + +MAP + EXTENT 0 -1 1 1 + SIZE 100 100 + LAYER + NAME "test" + EXTENT 0 -1 1 1 + CONNECTIONTYPE OGR + CONNECTION "data/styleitem_style.csv" + DATA "styleitem_style" + TYPE LINE + STATUS ON + SYMBOLSCALEDENOM 500 + STYLEITEM "STYLE" + CLASS + END + END +END diff --git a/msautotest/mspython/test_rq.py b/msautotest/mspython/test_rq.py index 69515f0b57..1bd6f81b98 100755 --- a/msautotest/mspython/test_rq.py +++ b/msautotest/mspython/test_rq.py @@ -398,6 +398,9 @@ def test_rq_9(): def test_rq_10(): + """ + This test requires the GIF driver to be available in GDAL, by setting GDAL_DRIVER_PATH + """ map = mapscript.mapObj(get_relpath_to_this("../gdal/classtest1.map")) layer = map.getLayer(0) @@ -453,6 +456,9 @@ def test_rq_10(): def test_rqtest_12(): + """ + This test requires the GIF driver to be available in GDAL, by setting GDAL_DRIVER_PATH + """ map = mapscript.mapObj(get_relpath_to_this("../gdal/classtest1.map")) layer = map.getLayer(0) diff --git a/msautotest/php/run_test.sh b/msautotest/php/run_test.sh index 2dd3fc3117..6408f83ba9 100755 --- a/msautotest/php/run_test.sh +++ b/msautotest/php/run_test.sh @@ -1,9 +1,16 @@ #!/bin/bash +PHPVersionMinor=$(php --version | head -n 1 | cut -d " " -f 2 | cut -c 1,3) +if [ ${PHPVersionMinor} -gt 81 ]; then + PHPUnitVersion=11 +else + PHPUnitVersion=10 +fi + if test -z $PHP_MAPSCRIPT_SO; then - php phpunit-10.phar . + php phpunit-$PHPUnitVersion.phar . exit $? else - php -d "extension=$PHP_MAPSCRIPT_SO" phpunit-10.phar . + php -d "extension=$PHP_MAPSCRIPT_SO" phpunit-$PHPUnitVersion.phar . exit $? fi diff --git a/msautotest/query/expected/rfc62_test003.txt b/msautotest/query/expected/rfc62_test003.txt index cb7687360a..9b6b6d1b8d 100644 --- a/msautotest/query/expected/rfc62_test003.txt +++ b/msautotest/query/expected/rfc62_test003.txt @@ -1,6 +1,5 @@ --xxOGRBoundaryxx -Content-Disposition: attachment; filename=foo -bar.gml +Content-Disposition: attachment; filename=some_default_value.gml Content-Type: application/binary Content-Transfer-Encoding: binary @@ -8,8 +7,7 @@ Content-Transfer-Encoding: binary 363237.626104089 5045148.78911013591752.164237744 5386497.208 @@ -59,8 +57,7 @@ bar.xsd" --xxOGRBoundaryxx -Content-Disposition: attachment; filename=foo -bar.xsd +Content-Disposition: attachment; filename=some_default_value.xsd Content-Type: application/binary Content-Transfer-Encoding: binary diff --git a/msautotest/renderers/expected/compositing.png b/msautotest/renderers/expected/compositing.png index 7957fd23de..f3514f705f 100644 Binary files a/msautotest/renderers/expected/compositing.png and b/msautotest/renderers/expected/compositing.png differ diff --git a/msautotest/sld/data/duplicated_namedstyles.sld b/msautotest/sld/data/duplicated_namedstyles.sld new file mode 100644 index 0000000000..6803c9eefb --- /dev/null +++ b/msautotest/sld/data/duplicated_namedstyles.sld @@ -0,0 +1,37 @@ + + + duplicate + + green + true + + + + + 3 + 0.5 + #00FF00 + + + + + + + + duplicate + + blue + + + + + 1 + 0.5 + #0000FF + + + + + + + \ No newline at end of file diff --git a/msautotest/sld/data/nomatch_namedstyles.sld b/msautotest/sld/data/nomatch_namedstyles.sld new file mode 100644 index 0000000000..6005fde389 --- /dev/null +++ b/msautotest/sld/data/nomatch_namedstyles.sld @@ -0,0 +1,20 @@ + + + no_matching_layer + + green + true + + + + + 3 + 0.5 + #00FF00 + + + + + + + \ No newline at end of file diff --git a/msautotest/sld/expected/sld_styleitem_file_duplicate.png b/msautotest/sld/expected/sld_styleitem_file_duplicate.png new file mode 100644 index 0000000000..c48d782640 Binary files /dev/null and b/msautotest/sld/expected/sld_styleitem_file_duplicate.png differ diff --git a/msautotest/sld/expected/sld_styleitem_file_no_match.png b/msautotest/sld/expected/sld_styleitem_file_no_match.png new file mode 100644 index 0000000000..a9f7e05deb Binary files /dev/null and b/msautotest/sld/expected/sld_styleitem_file_no_match.png differ diff --git a/msautotest/sld/label.map b/msautotest/sld/label.map index 6e986e6abe..8ceb325bee 100644 --- a/msautotest/sld/label.map +++ b/msautotest/sld/label.map @@ -5,7 +5,7 @@ # # ---